tb_cooper_entrust-judge.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>互助委托协议审核列表</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <!-- 所有的 css & js 资源 -->
  8. <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
  9. <link rel="stylesheet" href="../../static/sa.css">
  10. <script src="../../static/kj/vue.min.js"></script>
  11. <script src="../../static/kj/element-ui/index.js"></script>
  12. <script src="../../static/kj/httpVueLoader.js"></script>
  13. <script src="../../static/kj/jquery.min.js"></script>
  14. <script src="../../static/kj/layer/layer.js"></script>
  15. <script src="../../static/sa.js"></script>
  16. <script src="../../static/kj/upload-util.js"></script>
  17. </head>
  18. <body>
  19. <div class="vue-box" style="display: none;" :style="'display: block;'">
  20. <div class="c-panel">
  21. <!-- ------------- 检索参数 ------------- -->
  22. <div class="c-title">检索参数</div>
  23. <el-form ref="form" :model='p' @submit.native.prevent>
  24. <sa-item type="text" name="订单号" v-model="p.tradeNo" width="80px"></sa-item>
  25. <sa-item type="text" name="买家" v-model="p.buyUserName"></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="tradeNo" width="180"></sa-td>
  35. <sa-td name="买家" prop="buyUserName" ></sa-td>
  36. <sa-td name="商品名称" prop="goodsNames" ></sa-td>
  37. <sa-td name="总重量" prop="totalWeight" ></sa-td>
  38. <sa-td name="总金额" prop="totalPrice" ></sa-td>
  39. <sa-td name="车牌号" prop="veNo" ></sa-td>
  40. <sa-td name="互助委托协议" prop="businessLicense" type="img-list"></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. <el-table-column label="操作" fixed="right" width="100px">
  50. <template slot-scope="s">
  51. <el-button v-if="sa.isAuth('tb-purchaser-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" width="80px" br></sa-item>
  63. <sa-item type="enum" name="审核结果" v-model="modal.form.judgeStatus" width="80px" :jv="{1: '通过', 2: '驳回'}" jtype="3" br></sa-item>
  64. </el-form>
  65. <span slot="footer" class="dialog-footer">
  66. <el-button @click="modal.visible = false">取 消</el-button>
  67. <el-button type="primary" @click="doJudge">确 定</el-button>
  68. </span>
  69. </el-dialog>
  70. </div>
  71. <script>
  72. var app = new Vue({
  73. components: {
  74. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  75. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  76. },
  77. el: '.vue-box',
  78. data: {
  79. modal: {
  80. visible: false,
  81. form: {
  82. ids: '',
  83. judgeStatus: 1,
  84. judgeContent: '',
  85. }
  86. },
  87. p: { // 查询参数
  88. id: '', //
  89. name: '', // 名称
  90. nationality: '', // 国别
  91. judgeList: 1,
  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>