tb-purchaser-judge.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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.businessName" width="100px"></sa-item>
  26. <sa-item type="text" name="企业法人" v-model="p.legalPerson" width="100px"></sa-item>
  27. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  28. <el-button type="info" icon="el-icon-refresh" @click="sa.f5()">重置</el-button>
  29. <el-button v-if="sa.isAuth('tb-purchaser-judge')" class="c-btn" type="success"
  30. icon="el-icon-s-check" @click="judgeBySelect">批量审核</el-button>
  31. </el-form>
  32. <!-- ------------- 数据列表 ------------- -->
  33. <el-table class="data-table" ref="data-table" :data="dataList">
  34. <sa-td type="selection" name="序号"></sa-td>
  35. <sa-td name="企业名称" prop="businessName"></sa-td>
  36. <sa-td name="企业法人" prop="legalPerson"></sa-td>
  37. <sa-td name="统一社会信用代码" prop="dutyParagraph"></sa-td>
  38. <sa-td name="营业执照" prop="businessLicense" type="img-list"></sa-td>
  39. <sa-td name="联系人" prop="name" ></sa-td>
  40. <sa-td name="邮箱" prop="email" ></sa-td>
  41. <sa-td name="审核状态" prop="judgeStatus">
  42. <template slot-scope="scope">
  43. <el-tag type="danger" v-if="scope.row.judgeStatus==0">未审核</el-tag>
  44. <el-tag type="primary" v-if="scope.row.judgeStatus==1">审核通过</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="judgeTime"></sa-td>
  49. <sa-td name="提交时间" width="160px" prop="createTime"></sa-td>
  50. <el-table-column label="操作" fixed="right" width="100px">
  51. <template slot-scope="s">
  52. <el-button v-if="sa.isAuth('tb-purchaser-judge')" class="c-btn" type="success"
  53. icon="el-icon-s-check" @click="get(s.row)">审核</el-button>
  54. </template>
  55. </el-table-column>
  56. </el-table>
  57. <!-- ------------- 分页 ------------- -->
  58. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount"
  59. @change="f5()"></sa-item>
  60. </div>
  61. <el-dialog title="批量审核" :visible.sync="modal.visible" width="400px">
  62. <el-form>
  63. <sa-item type="text" name="审核意见" v-model="modal.form.judgeContent" width="80px" br></sa-item>
  64. <sa-item type="enum" name="审核结果" v-model="modal.form.judgeStatus" width="80px" :jv="{1: '通过', 2: '驳回'}" jtype="3" 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. type: 1, // 类型:企业收购商
  90. businessName: '', // 企业名称
  91. legalPerson: '', // 企业法人
  92. pageNo: 1, // 当前页
  93. pageSize: 20, // 页大小
  94. sortType: 0 // 排序方式
  95. },
  96. dataCount: 0,
  97. dataList: [], // 数据集合
  98. },
  99. methods: {
  100. doJudge() {
  101. let form = this.modal.form;
  102. if (!form.judgeContent) {
  103. return sa.msg('请输入审核意见');
  104. }
  105. sa.ajax('/level-two-server/TbPurchaser/auditBatch', form, function(res) {
  106. sa.alert('审核成功');
  107. this.modal.visible = false;
  108. this.f5()
  109. }.bind(this));
  110. },
  111. // 刷新
  112. f5: function() {
  113. sa.ajax('/level-two-server/TbPurchaser/getList', sa.removeNull(this.p), function(res) {
  114. this.dataList = res.data; // 数据
  115. this.dataCount = res.dataCount; // 数据总数
  116. sa.f5TableHeight(); // 刷新表格高度
  117. }.bind(this));
  118. },
  119. judgeBySelect: function(data) {
  120. var selection = this.$refs['data-table'].selection;
  121. if (selection.length == 0) {
  122. return sa.msg('请选择一条数据')
  123. }
  124. this.modal.form.ids = selection.map(obj => obj.id).join(',');
  125. this.modal.visible = true;
  126. },
  127. // 查看
  128. get: function(data) {
  129. sa.showIframe('企业商户资料审核', 'tb-purchaser-do-judge.html?id=' + data.id, '950px', '80%');
  130. },
  131. // 修改
  132. update: function(data) {
  133. sa.showIframe('修改数据', 'tb-purchaser-add.html?id=' + data.id, '1000px', '90%');
  134. },
  135. },
  136. created: function() {
  137. this.f5();
  138. sa.onInputEnter();
  139. }
  140. })
  141. </script>
  142. </body>
  143. </html>