tb-import-order-judge.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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="../../static/kj/element-ui/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. </head>
  17. <body>
  18. <div class="vue-box" style="display: none;" :style="'display: block;'">
  19. <div class="c-panel">
  20. <!-- ------------- 检索参数 ------------- -->
  21. <div class="c-title">检索参数</div>
  22. <el-form ref="form" :model='p' @submit.native.prevent>
  23. <sa-item type="text" name="业务编号" v-model="p.platSeqNo" width="100px"></sa-item>
  24. <sa-item type="text" name="车牌号" v-model="p.veNo" width="100px"></sa-item>
  25. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  26. <el-button size="mini" type="info" @click="sa.f5()">重置</el-button>
  27. </el-form>
  28. <!-- ------------- 数据列表 ------------- -->
  29. <el-table class="data-table" ref="data-table" :data="dataList" >
  30. <sa-td type="index" width='30px'></sa-td>
  31. <sa-td name="业务编号" prop="platSeqNo" width="150px"></sa-td>
  32. <sa-td name="预录入编号" prop="preNo" width="150px"></sa-td>
  33. <sa-td name="申报人姓名" prop="declareName" ></sa-td>
  34. <sa-td name="车牌号" prop="veNo" ></sa-td>
  35. <sa-td name="总金额" prop="sumAmt" ></sa-td>
  36. <sa-td name="互助委托协议" prop="cooperEntrustImg" type="img-list"></sa-td>
  37. <sa-td name="审核状态" prop="judgeStatus">
  38. <template slot-scope="scope">
  39. <el-tag type="danger" v-if="scope.row.judgeStatus==0">未审核</el-tag>
  40. <el-tag type="primary" v-if="scope.row.judgeStatus==1">审核通过</el-tag>
  41. <el-tag type="danger" v-if="scope.row.judgeStatus==2">审核驳回</el-tag>
  42. </template>
  43. </sa-td>
  44. <sa-td name="审核时间" prop="judgeTime" width="160px"></sa-td>
  45. <el-table-column label="操作" fixed="right" width="120px">
  46. <!-- <template slot-scope="s">
  47. <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>
  48. </template> -->
  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" @change="f5()"></sa-item>
  57. </div>
  58. </div>
  59. <script>
  60. var app = new Vue({
  61. components: {
  62. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  63. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  64. },
  65. el: '.vue-box',
  66. data: {
  67. p: { // 查询参数
  68. platSeqNo: '', // 业务编号
  69. veNo: '', // 车牌号
  70. pageNo: 1, // 当前页
  71. pageSize: 10, // 页大小
  72. sortType: 0 // 排序方式
  73. },
  74. dataCount: 0,
  75. dataList: [], // 数据集合
  76. },
  77. methods: {
  78. // 刷新
  79. f5: function() {
  80. sa.ajax('/level-one-server/TbImportOrder/getList', sa.removeNull(this.p), function(res) {
  81. this.dataList = res.data; // 数据
  82. this.dataList.map(item => {
  83. if(item.cooperEntrustImg != undefined) {
  84. item.cooperEntrustImg = item.cooperEntrustImg.replaceAll("/sp-admin",sa.cfg.api_url+"/sp-admin").replaceAll("[","").replaceAll("]","").replaceAll("\"","")
  85. }
  86. })
  87. console.log("---1---"+this.dataList[5].judgeTime)
  88. this.dataCount = res.dataCount; // 数据总数
  89. sa.f5TableHeight(); // 刷新表格高度
  90. }.bind(this));
  91. },
  92. // 查看
  93. get: function(data) {
  94. sa.showIframe('互助委托协议审核', 'tb-import-order-do-judge.html?id=' + data.id, '950px', '80%');
  95. },
  96. // 查看 - 根据选中的
  97. getBySelect: function(data) {
  98. var selection = this.$refs['data-table'].selection;
  99. if(selection.length == 0) {
  100. return sa.msg('请选择一条数据')
  101. }
  102. this.get(selection[0]);
  103. },
  104. // 修改
  105. update: function(data) {
  106. sa.showIframe('修改数据', 'tb-import-order-add.html?id=' + data.id, '1000px', '90%');
  107. },
  108. // 新增
  109. add: function(data) {
  110. sa.showIframe('新增数据', 'tb-import-order-add.html?id=-1', '1000px', '90%');
  111. },
  112. // 删除
  113. del: function(data) {
  114. sa.confirm('是否删除,此操作不可撤销', function() {
  115. sa.ajax('/level-one-server/TbImportOrder/delete?id=' + data.id, function(res) {
  116. sa.arrayDelete(this.dataList, data);
  117. sa.ok('删除成功');
  118. sa.f5TableHeight(); // 刷新表格高度
  119. }.bind(this))
  120. }.bind(this));
  121. },
  122. // 批量删除
  123. deleteByIds: function() {
  124. // 获取选中元素的id列表
  125. let selection = this.$refs['data-table'].selection;
  126. let ids = sa.getArrayField(selection, 'id');
  127. if(selection.length == 0) {
  128. return sa.msg('请至少选择一条数据')
  129. }
  130. // 提交删除
  131. sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
  132. sa.ajax('/level-one-server/TbImportOrder/deleteByIds', {ids: ids.join(',')}, function(res) {
  133. sa.arrayDelete(this.dataList, selection);
  134. sa.ok('删除成功');
  135. sa.f5TableHeight(); // 刷新表格高度
  136. }.bind(this))
  137. }.bind(this));
  138. },
  139. },
  140. created: function() {
  141. this.f5();
  142. sa.onInputEnter();
  143. }
  144. })
  145. </script>
  146. </body>
  147. </html>