tb-purchaser-personal-judge.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>个体收购商-列表</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  8. <!-- 所有的 css & js 资源 -->
  9. <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
  10. <link rel="stylesheet" href="../../static/sa.css">
  11. <script src="../../static/kj/vue.min.js"></script>
  12. <script src="../../static/kj/element-ui/index.js"></script>
  13. <script src="../../static/kj/httpVueLoader.js"></script>
  14. <script src="../../static/kj/jquery.min.js"></script>
  15. <script src="../../static/kj/layer/layer.js"></script>
  16. <script src="../../static/sa.js"></script>
  17. <script src="../../static/kj/upload-util.js"></script>
  18. </head>
  19. <body>
  20. <div class="vue-box" style="display: none;" :style="'display: block;'">
  21. <div class="c-panel">
  22. <!-- ------------- 检索参数 ------------- -->
  23. <div class="c-title">检索参数</div>
  24. <el-form ref="form" :model='p' @submit.native.prevent>
  25. <sa-item type="text" name="姓名" v-model="p.name"></sa-item>
  26. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  27. <el-button type="info" icon="el-icon-refresh" @click="sa.f5()">重置</el-button>
  28. <el-button v-if="sa.isAuth('tb-purchaser-judge')" class="c-btn" type="success"
  29. icon="el-icon-s-check" @click="judgeBySelect">批量审核</el-button>
  30. </el-form>
  31. <!-- ------------- 数据列表 ------------- -->
  32. <el-table class="data-table" ref="data-table" :data="dataList">
  33. <sa-td type="selection" name="序号"></sa-td>
  34. <sa-td name="姓名" prop="name" ></sa-td>
  35. <sa-td name="联系电话" prop="contact" type="phone"></sa-td>
  36. <sa-td name="身份证号" prop="idCard" type="idCard"></sa-td>
  37. <sa-td name="邮箱" prop="email" ></sa-td>
  38. <sa-td name="地址" prop="address" ></sa-td>
  39. <sa-td name="审核状态" prop="judgeStatus">
  40. <template slot-scope="scope">
  41. <el-tag type="danger" v-if="scope.row.judgeStatus==0">未审核</el-tag>
  42. <el-tag type="primary" v-if="scope.row.judgeStatus==1">审核通过</el-tag>
  43. <el-tag type="danger" v-if="scope.row.judgeStatus==2">审核驳回</el-tag>
  44. </template>
  45. </sa-td>
  46. <sa-td name="审核时间" width="160px" prop="judgeTime"></sa-td>
  47. <sa-td name="提交时间" width="160px" prop="createTime"></sa-td>
  48. <el-table-column label="操作" fixed="right" width="100px">
  49. <template slot-scope="s">
  50. <el-button v-if="sa.isAuth('tb-purchaser-judge')" class="c-btn" type="success"
  51. icon="el-icon-s-check" @click="get(s.row)">审核</el-button>
  52. </template>
  53. </el-table-column>
  54. </el-table>
  55. <!-- ------------- 分页 ------------- -->
  56. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount"
  57. @change="f5()"></sa-item>
  58. </div>
  59. <el-dialog title="批量审核" :visible.sync="modal.visible" width="400px">
  60. <el-form>
  61. <sa-item type="text" name="审核意见" v-model="modal.form.judgeContent" width="80px" br></sa-item>
  62. <sa-item type="enum" name="审核结果" v-model="modal.form.judgeStatus" width="80px" :jv="{1: '通过', 2: '驳回'}" jtype="3" br></sa-item>
  63. </el-form>
  64. <span slot="footer" class="dialog-footer">
  65. <el-button @click="modal.visible = false">取 消</el-button>
  66. <el-button type="primary" @click="doJudge">确 定</el-button>
  67. </span>
  68. </el-dialog>
  69. </div>
  70. <script>
  71. var app = new Vue({
  72. components: {
  73. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  74. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  75. },
  76. el: '.vue-box',
  77. data: {
  78. modal: {
  79. visible: false,
  80. form: {
  81. ids: '',
  82. judgeStatus: 1,
  83. judgeContent: '',
  84. }
  85. },
  86. p: { // 查询参数
  87. type: 2, // 类型:个人收购商
  88. name: '', // 姓名
  89. pageNo: 1, // 当前页
  90. pageSize: 20, // 页大小
  91. sortType: 0 // 排序方式
  92. },
  93. dataCount: 0,
  94. dataList: [], // 数据集合
  95. },
  96. methods: {
  97. doJudge() {
  98. let form = this.modal.form;
  99. if (!form.judgeContent) {
  100. return sa.msg('请输入审核意见');
  101. }
  102. sa.ajax('/level-two-server/TbPurchaser/auditBatch', form, function(res) {
  103. sa.alert('审核成功');
  104. this.modal.visible = false;
  105. this.f5()
  106. }.bind(this));
  107. },
  108. // 刷新
  109. f5: function() {
  110. sa.ajax('/level-two-server/TbPurchaser/getList', sa.removeNull(this.p), function(res) {
  111. this.dataList = res.data; // 数据
  112. this.dataCount = res.dataCount; // 数据总数
  113. sa.f5TableHeight(); // 刷新表格高度
  114. }.bind(this));
  115. },
  116. judgeBySelect: function(data) {
  117. var selection = this.$refs['data-table'].selection;
  118. if (selection.length == 0) {
  119. return sa.msg('请选择一条数据')
  120. }
  121. this.modal.form.ids = selection.map(obj => obj.id).join(',');
  122. this.modal.visible = true;
  123. },
  124. // 查看
  125. get: function(data) {
  126. sa.showIframe('个体商户资料审核', 'tb-purchaser-personal-do-judge.html?id=' + data.id, '950px', '80%');
  127. },
  128. // 修改
  129. update: function(data) {
  130. sa.showIframe('修改数据', 'tb-purchaser-personal-add.html?id=' + data.id, '1000px', '90%');
  131. },
  132. },
  133. created: function() {
  134. this.f5();
  135. sa.onInputEnter();
  136. }
  137. })
  138. </script>
  139. </body>
  140. </html>