tb-car-disincle-list.html 14 KB

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