tb-car-disincle-list.html 16 KB

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