tb-supplement-list.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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="../../static/kj/element-ui/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. <style>
  20. .complete-modal .c-label,
  21. .confirm-in .c-label,
  22. .confirm-info .c-label {
  23. width: 290px;
  24. }
  25. </style>
  26. <body>
  27. <div class="vue-box" style="display: none;" :style="'display: block;'">
  28. <div class="c-panel">
  29. <!-- ------------- 检索参数 ------------- -->
  30. <div class="c-title">检索参数</div>
  31. <el-form ref="form" :model='p' @submit.native.prevent>
  32. <sa-item type="text" name="业务单号" placeholder="业务单号" v-model="p.no"></sa-item>
  33. <sa-item type="text" name="车牌号" placeholder="车牌号" v-model="p.carNo"></sa-item>
  34. <sa-item type="text" name="客户" placeholder="客户" v-model="p.customerName"></sa-item>
  35. <sa-item type="text" name="货主" placeholder="客户" v-model="p.owner"></sa-item>
  36. <div class="c-item">
  37. <label class="c-label">审批状态:</label>
  38. <el-select v-model="p.oaResult" placeholder="请选择" @change="f5()">
  39. <el-option label="全部" value=""></el-option>
  40. <el-option label="未审核" :value="0"></el-option>
  41. <el-option label="审核通过" :value="1"></el-option>
  42. <el-option label="不通过" :value="2"></el-option>
  43. </el-select>
  44. </div>
  45. <div class="c-item">
  46. <label class="c-label">业务项:</label>
  47. <el-select v-model="p.goodsId">
  48. <el-option v-for="good in goodsList" :key="good.id" :label="good.name" :value="good.id">
  49. </el-option>
  50. </el-select>
  51. </div>
  52. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  53. <el-button type="info" icon="el-icon-search"
  54. @click="p.carNo = '';p.oaResult='';p.customerName='';p.owner='';p.no=''; f5()">重置
  55. </el-button>
  56. <el-button v-if="sa.isAuth('tb-flex-business-add')" size="mini" type="primary" @click="add()">
  57. 新增</el-button>
  58. <br />
  59. </el-form>
  60. <!-- ------------- 数据列表 ------------- -->
  61. <el-table class="data-table" ref="data-table" :data="dataList" style="margin-top: 20px;">
  62. <el-table-column type="index" width="50"></el-table-column>
  63. <sa-td name="业务单号" prop="no" width="160"></sa-td>
  64. <sa-td name="客户名称" prop="customerName" width="190"></sa-td>
  65. <sa-td name="货主" prop="owner" width="160"></sa-td>
  66. <sa-td name="业务项" prop="goodsName" width="160"></sa-td>
  67. <el-table-column label="车牌号" width="160">
  68. <template slot-scope="s">
  69. <label>{{s.row.carNoStr}}</label>
  70. </template>
  71. </el-table-column>
  72. <sa-td name="作业时间" prop="operateTime" width="160"></sa-td>
  73. <sa-td name="确认" prop="adminConfirmInput" type="enum" :jv="{1: '已确认', 0: '未确认'}"></sa-td>
  74. <sa-td name="已支付(元)" prop="payMoney" width="140"></sa-td>
  75. <sa-td name="业务费用(元)" prop="itemPrice" width="120"></sa-td>
  76. <sa-td width="160" name="创建时间" prop="createTime"></sa-td>
  77. </sa-td>
  78. <el-table-column label="操作" width="415px" fixed="right">
  79. <template slot-scope="s">
  80. <el-button class="c-btn" type="primary" v-if="sa.isAuth('tb-flex-business-confirm')
  81. &&currentCustomerId=='1'&&s.row.adminConfirmInput==0" @click="confirmFn(s.row)">账单确认</el-button>
  82. <el-button class="c-btn" type="primary" v-if="sa.isAuth('tb-business-confirm')
  83. &&currentCustomerId=='1'&&s.row.adminConfirmInput==1" @click="checkConfirmFn(s.row)">查看账单</el-button>
  84. <el-button class="c-btn" type="success" @click="get(s.row)">查看</el-button>
  85. <el-button class="c-btn" type="primary"
  86. v-if="currentCustomerId=='1'||(s.row.adminConfirmInput==0&&sa.isAuth('tb-flex-business-edit'))"
  87. @click="update(s.row)">
  88. 修改</el-button>
  89. <el-button class="c-btn" type="danger"
  90. v-if="sa.isAuth('tb-flex-business-del')&&s.row.adminConfirmInput==0&&s.row.payMoney==0"
  91. @click="del(s.row)">删除
  92. </el-button>
  93. </template>
  94. </el-table-column>
  95. </el-table>
  96. <!-- ------------- 分页 ------------- -->
  97. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  98. </sa-item>
  99. </div>
  100. </div>
  101. <script>
  102. var app = new Vue({
  103. components: {
  104. "sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue'),
  105. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  106. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  107. },
  108. el: '.vue-box',
  109. data: {
  110. value: '',
  111. currentCustomerId: '1',
  112. confirm: {
  113. visible: false,
  114. title: '',
  115. form: {
  116. ids: ''
  117. }
  118. },
  119. p: { // 查询参数
  120. oaResult: '',
  121. customerName: '',
  122. owner: '',
  123. no: '',
  124. supplement: 1,
  125. carNo: '', // 车牌号
  126. goodsId: '',
  127. pageNo: 1, // 当前页
  128. pageSize: 20, // 页大小
  129. sortType: 0 // 排序方式
  130. },
  131. dataCount: 0,
  132. dataList: [], // 数据集合
  133. timmer: null,
  134. fresh: {
  135. value: 60
  136. },
  137. goodsList: [],
  138. },
  139. methods: {
  140. getGoodsList() {
  141. sa.ajax('/TbGoods/getList', function(resp) {
  142. this.goodsList = resp.data;
  143. }.bind(this));
  144. },
  145. businessFn(data) {
  146. sa.ajaxNoLoading('/TbBusinessCar/getOtherBusinessCarByBusinessId', {
  147. businessId: data.id
  148. }, function(resp) {
  149. let list = resp.data;
  150. let str = list.map(car => car.carNo).join('、');
  151. let businessCarIds = list.map(car => car.id).join(',');
  152. sa.showIframe('绑定车辆', 'tb-business-car-business.html?id=' + data.id +
  153. '&businessCarId=' + data.businessCarId + '&carNo=' + str +
  154. '&businessCarIds=' + businessCarIds, '90%', "90%");
  155. }.bind(this))
  156. },
  157. getCurrendCustomer() {
  158. sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
  159. this.currentCustomerId = resp.data;
  160. }.bind(this));
  161. },
  162. // 查看
  163. get: function(data) {
  164. sa.showIframe('补录单详情', 'tb-car-disincle-info.html?id=' + data.id, '1050px', '90%');
  165. },
  166. add: function(data) {
  167. sa.showIframe('新增补录单', 'tb-supplement-add.html?id=-1', '1080px', '90%');
  168. },
  169. update(data) {
  170. sa.showIframe('修改补录单', 'tb-car-disincle-edit.html?id=' + data.id, '1080px', '90%');
  171. },
  172. getPcodeByCurrRid() {
  173. sa.ajax('/SpRolePermission/getPcodeByCurrRid', function(resp) {
  174. this.perCode = resp.data;
  175. }.bind(this))
  176. },
  177. // 删除
  178. del: function(data) {
  179. sa.confirm('是否删除,此操作不可撤销', function() {
  180. sa.ajax('/TbBusiness/deleteOtherBusiness?id=' + data.id + '&businessCarId=' +
  181. data.businessCarId,
  182. function(res) {
  183. sa.arrayDelete(this.dataList, data);
  184. sa.ok('删除成功');
  185. sa.f5TableHeight(); // 刷新表格高度
  186. }.bind(this))
  187. }.bind(this));
  188. },
  189. // 刷新
  190. f5: function() {
  191. sa.ajaxNoLoading('/TbBusiness/getOtherBusiness', sa.removeNull(this.p), function(res) {
  192. this.dataList = res.data; // 数据
  193. this.dataCount = res.dataCount; // 数据总数
  194. sa.f5TableHeight(); // 刷新表格高度
  195. }.bind(this));
  196. },
  197. },
  198. created: function() {
  199. sa.onInputEnter();
  200. },
  201. mounted() {
  202. this.getCurrendCustomer();
  203. this.getGoodsList();
  204. this.f5();
  205. },
  206. })
  207. </script>
  208. </body>
  209. </html>