tb-car-disincle-list.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  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. <div style="float: right;right: 20px;margin-top: 10px;">
  30. <label>刷新频率:</label>
  31. <el-select v-model="fresh.value" placeholder="请选择" @change="restartTimmer">
  32. <el-option label="10s" :value="10"></el-option>
  33. <el-option label="20s" :value="20"></el-option>
  34. <el-option label="30s" :value="30"></el-option>
  35. <el-option label="50s" :value="50"></el-option>
  36. <el-option label="60s" :value="60"></el-option>
  37. </el-select>
  38. </div>
  39. <!-- ------------- 检索参数 ------------- -->
  40. <div class="c-title">检索参数</div>
  41. <el-form ref="form" :model='p' @submit.native.prevent>
  42. <sa-item type="text" name="业务单号" placeholder="业务单号" v-model="p.no"></sa-item>
  43. <sa-item type="text" name="车牌号" placeholder="车牌号" v-model="p.carNo"></sa-item>
  44. <sa-item type="text" name="客户" placeholder="客户" v-model="p.customerName"></sa-item>
  45. <sa-item type="text" name="合作伙伴" placeholder="合作伙伴" v-model="p.pickCustomerName"></sa-item>
  46. <div class="c-item">
  47. <label class="c-label">确认状态:</label>
  48. <el-select v-model="p.adminConfirmInput" placeholder="请选择" @change="f5()">
  49. <el-option label="全部" :value="-1"></el-option>
  50. <el-option label="已确认" :value="1"></el-option>
  51. <el-option label="未确认" :value="0"></el-option>
  52. </el-select>
  53. </div>
  54. <div class="c-item">
  55. <label class="c-label">状态:</label>
  56. <el-select v-model="p.hasError" placeholder="请选择" @change="f5()">
  57. <el-option label="全部" :value="-1"></el-option>
  58. <el-option label="正常" :value="0"></el-option>
  59. <el-option label="异常" :value="1"></el-option>
  60. </el-select>
  61. </div>
  62. <div class="c-item">
  63. <label class="c-label">业务项:</label>
  64. <el-select v-model="p.goodsId">
  65. <el-option v-for="good in goodsList" :key="good.id" :label="good.name" :value="good.id">
  66. </el-option>
  67. </el-select>
  68. </div>
  69. <div>
  70. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  71. <el-button type="info" icon="el-icon-search"
  72. @click="p.carNo = '';p.adminConfirmInput=-1;p.customerName='';p.pickCustomerName='';p.owner='';p.no=''; f5()">
  73. 重置
  74. </el-button>
  75. <el-button v-if="sa.isAuth('tb-flex-business-add')" size="mini" type="primary" @click="add()">
  76. 新增
  77. </el-button>
  78. </div>
  79. </el-form>
  80. <!-- ------------- 数据列表 ------------- -->
  81. <el-table class="data-table" ref="data-table" :data="dataList" style="margin-top: 20px;">
  82. <el-table-column type="index" name="序号" width="50"></el-table-column>
  83. <sa-td name="业务单号" prop="no" width="160"></sa-td>
  84. <sa-td name="客户名称" prop="customerName" width="190"></sa-td>
  85. <sa-td name="合作伙伴" prop="pickCustomerName" width="190"></sa-td>
  86. <sa-td name="货物名称" prop="businessGoodsName" width="160"></sa-td>
  87. <sa-td name="业务项" prop="goodsName" width="160"></sa-td>
  88. <el-table-column label="车牌号" width="160">
  89. <template slot-scope="s">
  90. <label>{{s.row.carNoStr}}</label>
  91. </template>
  92. </el-table-column>
  93. <sa-td name="支付时间" prop="payTime" width="160"></sa-td>
  94. <sa-td name="审核状态" prop="confirmJudge" type="enum" :jv="{0: '未审核', 1:'审核通过',2:'审核驳回'}">
  95. </sa-td>
  96. <sa-td name="审核时间" prop="confirmJudgeTime" width="160"></sa-td>
  97. <!-- <sa-td name="确认" prop="adminConfirmInput" type="enum" :jv="{1: '已确认', 0: '未确认'}"></sa-td> -->
  98. <sa-td name="业务费用(元)" prop="itemPrice" width="120"></sa-td>
  99. <sa-td name="已支付(元)" prop="payMoney" width="140"></sa-td>
  100. <sa-td name="业务状态" prop="hasError" type="enum" :jv="{1: '异常[#ff0000]', 0: '正常[#005500]'}"></sa-td>
  101. <sa-td width="160" name="创建时间" prop="createTime"></sa-td>
  102. </sa-td>
  103. <el-table-column label="操作" width="230px" fixed="right">
  104. <template slot-scope="s">
  105. <!-- <el-button class="c-btn" type="primary" v-if="sa.isAuth('tb-flex-business-confirm')
  106. &&currentCustomerId=='1'&&s.row.adminConfirmInput==0" @click="confirmFn(s.row)">账单确认
  107. </el-button> -->
  108. <el-button class="c-btn" type="primary" v-if="sa.isAuth('tb-business-confirm')
  109. &&currentCustomerId=='1'&&s.row.adminConfirmInput==1" @click="checkConfirmFn(s.row)">查看账单
  110. </el-button>
  111. <el-button class="c-btn" type="success" @click="get(s.row)">查看</el-button>
  112. <el-button class="c-btn" type="primary"
  113. v-if="currentCustomerId=='1'||(s.row.adminConfirmInput==0&&sa.isAuth('tb-flex-business-edit'))"
  114. @click="update(s.row)">
  115. 修改
  116. </el-button>
  117. <el-button v-if="sa.isAuth('tb-flex-business-edit')" class="c-btn" type="primary"
  118. @click="carFn(s.row)">业务车辆
  119. </el-button>
  120. <!--
  121. <el-button v-if="sa.isAuth('tb-business-car-bind')" class="c-btn" type="primary"
  122. @click="businessFn(s.row)">绑定车辆
  123. </el-button> -->
  124. <el-button v-if="sa.isAuth('tb-business-zx-print')&&zxShow(s.row.goodsName)" class="c-btn"
  125. type="success" @click="zxPrint(s.row.id)">装卸打印
  126. </el-button>
  127. <el-button class="c-btn" type="danger"
  128. v-if="sa.isAuth('tb-flex-business-del')&&s.row.adminConfirmInput==0&&s.row.payMoney==0&&s.row.confirmJudge!=1"
  129. @click="del(s.row)">删除
  130. </el-button>
  131. <el-button class="c-btn" type="warning" v-if="s.row.hasError==1" @click="addErrorFn(s.row)">
  132. 补录单
  133. </el-button>
  134. </template>
  135. </el-table-column>
  136. </el-table>
  137. <!-- ------------- 分页 ------------- -->
  138. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  139. </sa-item>
  140. </div>
  141. <el-dialog :title="confirm.title" :visible.sync="confirm.visible" width="650px">
  142. <div class="confirm-info">
  143. <el-row>
  144. <sa-info name="订单号" br>{{confirm.form.no}}</sa-info>
  145. <sa-info :name="item.itemName" br v-for="item in confirm.form.items">
  146. {{item.itemPrice}}x{{item.num}}={{item.total}}元
  147. </sa-info>
  148. <sa-info name="创建时间" br>{{confirm.form.createTime}}</sa-info>
  149. <sa-info name="总计费用" br>{{confirm.form.itemPrice}}(元)</sa-info>
  150. </el-row>
  151. </div>
  152. <span slot="footer" class="dialog-footer">
  153. <div v-if="confirm.form.adminConfirmInput==0">
  154. <el-button @click="confirm.visible = false">取 消</el-button>
  155. <el-button type="primary" @click="sureConfirmFn">确 认</el-button>
  156. </div>
  157. <div v-else>
  158. <el-button @click="confirm.visible = false">关闭</el-button>
  159. </div>
  160. </span>
  161. </el-dialog>
  162. <el-dialog title="补录异常单" :visible.sync="error.visible" width="500px">
  163. <div class="confirm-info">
  164. <el-form label-position="left">
  165. <sa-info name="订单号" br>{{error.form.no}}</sa-info>
  166. <div class="c-item">
  167. <label class="c-label"><span style="color: red;">*</span>补录业务:</label>
  168. <el-select v-model="error.form.itemId" placeholder="请选择" filterable>
  169. <el-option v-for="item in itemList" :key="item.id" :label="item.itemName"
  170. :value="item.id">
  171. </el-option>
  172. </el-select>
  173. </div>
  174. </el-form>
  175. </div>
  176. <span slot="footer" class="dialog-footer">
  177. <div>
  178. <el-button @click="error.visible = false">取 消</el-button>
  179. <el-button type="primary" @click="sureAddFn">保 存</el-button>
  180. </div>
  181. </span>
  182. </el-dialog>
  183. </div>
  184. <script>
  185. var app = new Vue({
  186. components: {
  187. "sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue'),
  188. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  189. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  190. },
  191. el: '.vue-box',
  192. data: {
  193. value: '',
  194. currentCustomerId: '1',
  195. error: {
  196. visible: false,
  197. form: {
  198. }
  199. },
  200. confirm: {
  201. visible: false,
  202. title: '',
  203. form: {
  204. ids: ''
  205. }
  206. },
  207. p: { // 查询参数
  208. hasError: -1,
  209. adminConfirmInput: -1,
  210. pickCustomerName: '',
  211. confirmJudge: '',
  212. customerName: '',
  213. supplement: 0,
  214. owner: '',
  215. no: '',
  216. carNo: '', // 车牌号
  217. goodsId: '',
  218. pageNo: 1, // 当前页
  219. pageSize: 20, // 页大小
  220. sortType: 0 // 排序方式
  221. },
  222. dataCount: 0,
  223. itemList: [],
  224. dataList: [], // 数据集合
  225. timmer: null,
  226. fresh: {
  227. value: 60
  228. },
  229. goodsList: [],
  230. },
  231. methods: {
  232. sureAddFn() {
  233. },
  234. addErrorFn(data) {
  235. sa.showIframe('补录单', 'tb-business-item-supplement.html?id=' + data.id, '600px', '60%');
  236. },
  237. getItemList() {
  238. sa.ajax('/TbItem/getList', function(resp) {
  239. this.itemList = resp.data;
  240. }.bind(this));
  241. },
  242. judgeFn(data) {
  243. this.stopTimmer();
  244. sa.showIframe('业务审核', 'tb-business-judge.html?id=' + data.id, '1050px', '90%');
  245. },
  246. zxShow(goodsName) {
  247. var flag = goodsName.indexOf("整车");
  248. if (flag > 0 || flag === 0) {
  249. return true;
  250. } else {
  251. return false;
  252. }
  253. },
  254. zxPrint(id) {
  255. sa.showIframe('打印装卸业务确认单', 'print-zxbusiness.html?id=' + id, '1000px', '100%');
  256. },
  257. getGoodsList() {
  258. sa.ajax('/TbGoods/getList', function(resp) {
  259. this.goodsList = resp.data;
  260. }.bind(this));
  261. },
  262. stopTimmer() {
  263. if (this.timmer != null) {
  264. clearInterval(this.timmer);
  265. }
  266. },
  267. restartTimmer() {
  268. this.stopTimmer();
  269. let val = this.fresh.value;
  270. this.timmer = setInterval(() => {
  271. this.f5();
  272. }, val * 1000)
  273. },
  274. businessFn(data) {
  275. this.stopTimmer();
  276. sa.ajaxNoLoading('/TbBusinessCar/getOtherBusinessCarByBusinessId', {
  277. businessId: data.id
  278. }, function(resp) {
  279. let list = resp.data;
  280. let str = list.map(car => car.carNo).join('、');
  281. let businessCarIds = list.map(car => car.id).join(',');
  282. sa.showIframe('绑定车辆', 'tb-business-car-business.html?id=' + data.id +
  283. '&businessCarId=' + data.businessCarId + '&carNo=' + str +
  284. '&businessCarIds=' + businessCarIds, '90%', "90%");
  285. }.bind(this))
  286. },
  287. carFn(data) {
  288. this.stopTimmer();
  289. sa.showIframe('业务车辆管理', '../car/tb-business-car-list.html?id=' + data.id + '&payStatus=' + data
  290. .payStatus + '&confirm=' + data.confirmJudge, '1050px', '75%');
  291. },
  292. handlerPay(data) {
  293. this.stopTimmer();
  294. sa.showIframe('线下收费', 'tb-car-disincle-pay.html?id=' + data.id, '1050px', '95%');
  295. },
  296. getCurrendCustomer() {
  297. sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
  298. this.currentCustomerId = resp.data;
  299. }.bind(this));
  300. },
  301. // 查看
  302. get: function(data) {
  303. this.stopTimmer();
  304. sa.showIframe('数据详情', 'tb-car-disincle-info.html?id=' + data.id, '1150px', '90%');
  305. },
  306. add: function(data) {
  307. this.stopTimmer();
  308. sa.showIframe('新增数据', 'tb-car-disincle-add.html?id=-1', '1080px', '90%');
  309. },
  310. update(data) {
  311. if(data.confirmJudge==1){
  312. sa.error('业务已审核,请驳回后修改')
  313. return;
  314. }
  315. sa.showIframe('修改数据', 'tb-car-disincle-edit.html?id=' + data.id, '1080px', '90%');
  316. },
  317. getPcodeByCurrRid() {
  318. this.stopTimmer();
  319. sa.ajax('/SpRolePermission/getPcodeByCurrRid', function(resp) {
  320. this.perCode = resp.data;
  321. }.bind(this))
  322. },
  323. confirmFn(data) {
  324. sa.ajax('/TbBusinessItem/getList', {
  325. businessId: data.id
  326. }, function(resp) {
  327. data.items = resp.data;
  328. Object.assign(this.confirm, {
  329. visible: true,
  330. title: '账单确认',
  331. form: data,
  332. })
  333. this.confirm.form.ids = data.id;
  334. }.bind(this));
  335. },
  336. checkConfirmFn(data) {
  337. sa.ajax('/TbBusinessItem/getList', {
  338. businessId: data.id
  339. }, function(resp) {
  340. data.items = resp.data;
  341. Object.assign(this.confirm, {
  342. visible: true,
  343. title: '查看账单',
  344. form: data,
  345. })
  346. }.bind(this));
  347. },
  348. // 删除
  349. del: function(data) {
  350. if(data.confirmJudge==1){
  351. sa.error('业务已审核,无法删除')
  352. return;
  353. }
  354. sa.confirm('是否删除,此操作不可撤销', function() {
  355. sa.ajax('/TbBusiness/deleteOtherBusiness?id=' + data.id + '&businessCarId=' +
  356. data.businessCarId,
  357. function(res) {
  358. sa.arrayDelete(this.dataList, data);
  359. sa.ok('删除成功');
  360. sa.f5TableHeight(); // 刷新表格高度
  361. }.bind(this))
  362. }.bind(this));
  363. },
  364. sureConfirmFn() {
  365. sa.ajax('/TbBusiness/confirm', {
  366. ids: this.confirm.form.ids
  367. }, function(resp) {
  368. this.confirm.visible = false;
  369. this.f5();
  370. }.bind(this))
  371. },
  372. // 刷新
  373. f5: function() {
  374. sa.ajaxNoLoading('/TbBusiness/getOtherBusiness', sa.removeNull(this.p), function(res) {
  375. this.dataList = res.data; // 数据
  376. this.dataCount = res.dataCount; // 数据总数
  377. sa.f5TableHeight(); // 刷新表格高度
  378. this.restartTimmer();
  379. }.bind(this));
  380. },
  381. },
  382. created: function() {
  383. sa.onInputEnter();
  384. },
  385. mounted() {
  386. this.getCurrendCustomer();
  387. this.getGoodsList();
  388. this.getItemList();
  389. this.f5();
  390. },
  391. beforeDestroy() {
  392. this.stopTimmer();
  393. }
  394. })
  395. </script>
  396. </body>
  397. </html>