tb-car-disincle-list.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  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="260px" 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. this.stopTimmer();
  245. sa.showIframe('审核业务', 'tb-car-disincle-judge.html?id=' + data.id, '1150px', '90%');
  246. },
  247. callback(data) {
  248. let that = this;
  249. console.log(data);
  250. layer.prompt({
  251. title: '填写驳回原因'
  252. }, function(content, index) {
  253. layer.close(index);
  254. sa.ajax('/TbBusiness/callback', {
  255. id: data.id,
  256. judgeContent: content
  257. }, function(res) {
  258. sa.alert('已驳回', that.f5);
  259. })
  260. });
  261. },
  262. sureAddFn() {
  263. },
  264. addErrorFn(data) {
  265. sa.showIframe('补录单', 'tb-business-item-supplement.html?id=' + data.id, '600px', '60%');
  266. },
  267. getItemList() {
  268. sa.ajax('/TbItem/getList', function(resp) {
  269. this.itemList = resp.data;
  270. }.bind(this));
  271. },
  272. judgeFn(data) {
  273. this.stopTimmer();
  274. sa.showIframe('业务审核', 'tb-business-judge.html?id=' + data.id, '1050px', '90%');
  275. },
  276. zxShow(goodsName) {
  277. var flag = goodsName.indexOf("整车");
  278. if (flag > 0 || flag === 0) {
  279. return true;
  280. } else {
  281. return false;
  282. }
  283. },
  284. zxPrint(id) {
  285. sa.showIframe('打印装卸业务确认单', 'print-zxbusiness.html?id=' + id, '1000px', '100%');
  286. },
  287. getGoodsList() {
  288. sa.ajax('/TbGoods/getList', function(resp) {
  289. this.goodsList = resp.data;
  290. }.bind(this));
  291. },
  292. stopTimmer() {
  293. if (this.timmer != null) {
  294. clearInterval(this.timmer);
  295. }
  296. },
  297. restartTimmer() {
  298. this.stopTimmer();
  299. let val = this.fresh.value;
  300. this.timmer = setInterval(() => {
  301. this.f5();
  302. }, val * 1000)
  303. },
  304. businessFn(data) {
  305. this.stopTimmer();
  306. sa.ajaxNoLoading('/TbBusinessCar/getOtherBusinessCarByBusinessId', {
  307. businessId: data.id
  308. }, function(resp) {
  309. let list = resp.data;
  310. let str = list.map(car => car.carNo).join('、');
  311. let businessCarIds = list.map(car => car.id).join(',');
  312. sa.showIframe('绑定车辆', 'tb-business-car-business.html?id=' + data.id +
  313. '&businessCarId=' + data.businessCarId + '&carNo=' + str +
  314. '&businessCarIds=' + businessCarIds, '90%', "90%");
  315. }.bind(this))
  316. },
  317. carFn(data) {
  318. this.stopTimmer();
  319. sa.showIframe('业务车辆管理', '../car/tb-business-car-list.html?id=' + data.id + '&payStatus=' + data
  320. .payStatus + '&confirm=' + data.confirmJudge, '1050px', '75%');
  321. },
  322. handlerPay(data) {
  323. this.stopTimmer();
  324. sa.showIframe('线下收费', 'tb-car-disincle-pay.html?id=' + data.id, '1050px', '95%');
  325. },
  326. getCurrendCustomer() {
  327. sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
  328. this.currentCustomerId = resp.data;
  329. }.bind(this));
  330. },
  331. // 查看
  332. get: function(data) {
  333. this.stopTimmer();
  334. sa.showIframe('数据详情', 'tb-car-disincle-info.html?id=' + data.id, '1150px', '90%');
  335. },
  336. add: function(data) {
  337. this.stopTimmer();
  338. sa.showIframe('新增数据', 'tb-car-disincle-add.html?id=-1', '1080px', '90%');
  339. },
  340. update(data) {
  341. if(data.confirmJudge==1){
  342. sa.error('业务已审核,请驳回后修改')
  343. return;
  344. }
  345. sa.showIframe('修改数据', 'tb-car-disincle-edit.html?id=' + data.id, '1080px', '90%');
  346. },
  347. getPcodeByCurrRid() {
  348. this.stopTimmer();
  349. sa.ajax('/SpRolePermission/getPcodeByCurrRid', function(resp) {
  350. this.perCode = resp.data;
  351. }.bind(this))
  352. },
  353. confirmFn(data) {
  354. sa.ajax('/TbBusinessItem/getList', {
  355. businessId: data.id
  356. }, function(resp) {
  357. data.items = resp.data;
  358. Object.assign(this.confirm, {
  359. visible: true,
  360. title: '账单确认',
  361. form: data,
  362. })
  363. this.confirm.form.ids = data.id;
  364. }.bind(this));
  365. },
  366. checkConfirmFn(data) {
  367. sa.ajax('/TbBusinessItem/getList', {
  368. businessId: data.id
  369. }, function(resp) {
  370. data.items = resp.data;
  371. Object.assign(this.confirm, {
  372. visible: true,
  373. title: '查看账单',
  374. form: data,
  375. })
  376. }.bind(this));
  377. },
  378. // 删除
  379. del: function(data) {
  380. if(data.confirmJudge==1){
  381. sa.error('业务已审核,无法删除')
  382. return;
  383. }
  384. sa.confirm('是否删除,此操作不可撤销', function() {
  385. sa.ajax('/TbBusiness/deleteOtherBusiness?id=' + data.id + '&businessCarId=' +
  386. data.businessCarId,
  387. function(res) {
  388. sa.arrayDelete(this.dataList, data);
  389. sa.ok('删除成功');
  390. sa.f5TableHeight(); // 刷新表格高度
  391. }.bind(this))
  392. }.bind(this));
  393. },
  394. sureConfirmFn() {
  395. sa.ajax('/TbBusiness/confirm', {
  396. ids: this.confirm.form.ids
  397. }, function(resp) {
  398. this.confirm.visible = false;
  399. this.f5();
  400. }.bind(this))
  401. },
  402. // 刷新
  403. f5: function() {
  404. sa.ajaxNoLoading('/TbBusiness/getOtherBusiness', sa.removeNull(this.p), function(res) {
  405. this.dataList = res.data; // 数据
  406. this.dataCount = res.dataCount; // 数据总数
  407. sa.f5TableHeight(); // 刷新表格高度
  408. this.restartTimmer();
  409. }.bind(this));
  410. },
  411. },
  412. created: function() {
  413. sa.onInputEnter();
  414. },
  415. mounted() {
  416. this.getCurrendCustomer();
  417. this.getGoodsList();
  418. this.getItemList();
  419. this.f5();
  420. },
  421. beforeDestroy() {
  422. this.stopTimmer();
  423. }
  424. })
  425. </script>
  426. </body>
  427. </html>