tb-enterprise-judge.html 5.1 KB

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