tb-enterprise-judge.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. <el-form ref="form" :model='p' @submit.native.prevent>
  24. <sa-item type="text" name="企业名称" v-model="p.name" :need="false" width=90px"></sa-item>
  25. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  26. <el-button type="info" icon="el-icon-refresh" @click="sa.f5()">重置</el-button>
  27. <el-button v-if="sa.isAuth('tb-enterprise-judge')" class="c-btn" type="success"
  28. icon="el-icon-s-check" @click="judgeBySelect">批量审核</el-button>
  29. </el-form>
  30. <!-- ------------- 数据列表 ------------- -->
  31. <el-table class="data-table" ref="data-table" :data="dataList">
  32. <sa-td type="selection" name="序号"></sa-td>
  33. <sa-td name="企业名称" prop="name">
  34. <template slot-scope="scope">
  35. <div class="omit">{{scope.row.name}}</div>
  36. </template>
  37. </sa-td>
  38. <sa-td name="税号" prop="dutyParagraph"></sa-td>
  39. <sa-td name="法人姓名" prop="legalPerson"></sa-td>
  40. <sa-td name="手机号码" width="100px" prop="contact"></sa-td>
  41. <sa-td name="营业执照" prop="businessLicense" type="img-list"></sa-td>
  42. <sa-td name="审核状态" prop="judgeStatus">
  43. <template slot-scope="scope">
  44. <el-tag type="danger" v-if="scope.row.judgeStatus==0">未审核</el-tag>
  45. <el-tag type="danger" v-if="scope.row.judgeStatus==2">审核驳回</el-tag>
  46. </template>
  47. </sa-td>
  48. <sa-td name="提交时间" width="160px" prop="createTime"></sa-td>
  49. <el-table-column label="操作" fixed="right" width="100px">
  50. <template slot-scope="s">
  51. <el-button v-if="sa.isAuth('tb-enterprise-judge')" class="c-btn" type="success"
  52. icon="el-icon-s-check" @click="get(s.row)">审核</el-button>
  53. </template>
  54. </el-table-column>
  55. </el-table>
  56. <!-- ------------- 分页 ------------- -->
  57. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount"
  58. @change="f5()"></sa-item>
  59. </div>
  60. <el-dialog title="批量审核" :visible.sync="modal.visible" width="400px">
  61. <el-form>
  62. <sa-item type="text" name="审核意见" v-model="modal.form.judgeContent" br></sa-item>
  63. <sa-item type="enum" name="审核结果" v-model="modal.form.judgeStatus" :jv="{1: '通过', 2: '驳回'}" jtype="3"
  64. br></sa-item>
  65. </el-form>
  66. <span slot="footer" class="dialog-footer">
  67. <el-button @click="modal.visible = false">取 消</el-button>
  68. <el-button type="primary" @click="doJudge">确 定</el-button>
  69. </span>
  70. </el-dialog>
  71. </div>
  72. <script>
  73. var app = new Vue({
  74. components: {
  75. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  76. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  77. },
  78. el: '.vue-box',
  79. data: {
  80. modal: {
  81. visible: false,
  82. form: {
  83. ids: '',
  84. judgeStatus: 1,
  85. judgeContent: '',
  86. }
  87. },
  88. p: { // 查询参数
  89. id: '', //
  90. name: '', // 名称
  91. nationality: '', // 国别
  92. judgeList: 1,
  93. pageNo: 1, // 当前页
  94. pageSize: 20, // 页大小
  95. sortType: 0 // 排序方式
  96. },
  97. dataCount: 0,
  98. dataList: [], // 数据集合
  99. },
  100. methods: {
  101. doJudge() {
  102. let form = this.modal.form;
  103. if (!form.judgeContent) {
  104. return sa.msg('请输入审核意见');
  105. }
  106. sa.ajax('/level-one-server/TbEnterprise/auditBatch', form, function(res) {
  107. sa.alert('审核成功');
  108. this.modal.visible = false;
  109. this.f5()
  110. }.bind(this));
  111. },
  112. // 刷新
  113. f5: function() {
  114. sa.ajax('/level-one-server/TbEnterprise/getList', sa.removeNull(this.p), function(res) {
  115. this.dataList = res.data; // 数据
  116. this.dataCount = res.dataCount; // 数据总数
  117. sa.f5TableHeight(); // 刷新表格高度
  118. }.bind(this));
  119. },
  120. judgeBySelect: function(data) {
  121. var selection = this.$refs['data-table'].selection;
  122. if (selection.length == 0) {
  123. return sa.msg('请选择一条数据')
  124. }
  125. this.modal.form.ids = selection.map(obj => obj.id).join(',');
  126. this.modal.visible = true;
  127. },
  128. // 查看
  129. get: function(data) {
  130. sa.showIframe('商户资料审核', 'tb-enterprise-do-judge.html?id=' + data.id, '850px', '80%');
  131. },
  132. // 修改
  133. update: function(data) {
  134. sa.showIframe('修改数据', 'tb-enterprise-add.html?id=' + data.id, '1000px', '90%');
  135. },
  136. },
  137. created: function() {
  138. this.f5();
  139. sa.onInputEnter();
  140. }
  141. })
  142. </script>
  143. </body>
  144. </html>