From 49efd81d56131900c34f6fd62cb9f88710c0edc2 Mon Sep 17 00:00:00 2001 From: x_z Date: Thu, 6 Apr 2023 11:41:55 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=90=8C=E6=AD=A5=E8=AE=BE=E7=BD=AE=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=B7=BB=E5=8A=A0=E4=B8=9A=E5=8A=A1=E5=8D=95=E6=8D=AE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/sync/SysUdimsConfig.vue | 158 ++++++++++++++++++++++++++++-- 1 file changed, 150 insertions(+), 8 deletions(-) diff --git a/src/views/sync/SysUdimsConfig.vue b/src/views/sync/SysUdimsConfig.vue index 059df4e1..61563bde 100644 --- a/src/views/sync/SysUdimsConfig.vue +++ b/src/views/sync/SysUdimsConfig.vue @@ -54,7 +54,8 @@ - @@ -160,7 +161,8 @@ - @@ -209,8 +211,8 @@ @@ -276,6 +360,7 @@ import {findConfig, testConnect, updateConfig} from "@/api/sync/spsSyncStatus"; import store from "@/store"; import {getBussinessType} from "@/api/basic/bussinessType"; +import {getBusTypeChangeList} from "@/api/basic/busTypeChange"; export default { name: "SysUdimsConfig", @@ -306,6 +391,7 @@ export default { orderSyncDlTime: null, delaySyncTime: null, busTypes: [], + changeBusTypes: [], companyCert: null, manufacturerCert: null, productCert: null, @@ -313,6 +399,7 @@ export default { }, checkedBusTypes: [], + checkedChangeBusTypes: [], busQuery: { page: 1, limit: 10, @@ -322,6 +409,14 @@ export default { addBusDialogVisible: false, total: 0, testLoading: false, + addChangeBusDialogVisible: false, + changeBusQuery: { + page: 1, + limit: 10, + }, + changeBusTypeTotal: 0, + changeBusTypes: [], + changeBusTypeSelection: [] } }, methods: { @@ -331,6 +426,7 @@ export default { this.configQuery = response.data; this.checkedBusTypes = this.configQuery.busTypes; + this.checkedChangeBusTypes = this.configQuery.changeBusTypes; if (this.configQuery.busTypes != null) { // for (let i = 0; i < this.configQuery.busTypes.length; i++) { // @@ -365,6 +461,9 @@ export default { // this.configQuery.busTypes.push(this.checkedBusTypes); // } } + if (this.checkedChangeBusTypes != null) { + this.configQuery.changeBusTypes = this.checkedChangeBusTypes; + } updateConfig(this.configQuery) .then((response) => { this.loading = false; @@ -436,8 +535,6 @@ export default { }); this.addBusDialogVisible = false; }, - - remveBus(index, row) { this.checkedBusTypes.splice(index, 1); }, @@ -447,7 +544,51 @@ export default { handleCurrentChange(val) { this.busQuery.page = val; this.getBusType(); - + }, + addChangeBusType() { + let selectData = this.changeBusTypeSelection; + selectData.forEach((obj) => { + obj.outChange = false; + obj.orderStatus = 7; + let isPut = true; + for (let i = 0; i < this.checkedBusTypes.length; i++) { + if (this.checkedChangeBusTypes[i].action == obj.action) { + isPut = false; + } + } + if (isPut) + this.checkedChangeBusTypes.push(obj); + }); + this.addChangeBusDialogVisible = false; + }, + addChangeBusTypeDialog() { + this.addChangeBusDialogVisible = true; + this.changeBusTypeSelection = []; + this.changeBusQuery.page = 1; + }, + getChangeBusType() { + getBusTypeChangeList(this.changeBusQuery).then((res) => { + if (res.data.list.length > 0) { + res.data.list.forEach((item) => { + let changeBusType = { + action: item.originAction, + name: item.originName + }; + this.changeBusTypes.push(changeBusType); + }); + } + this.changeBusTypeTotal = res.data.total || 0; + }) + }, + handleCurrentChangePage(val) { + this.changeBusQuery.page = val; + this.getChangeBusType(); + }, + handleCheckedChangeBus(val) { + this.changeBusTypeSelection = val; + }, + checkSelectableChange(row) { + return !row.isSelect; }, }, created() { @@ -457,6 +598,7 @@ export default { }; this.getBusType(); + this.getChangeBusType(); this.getConfig(); }, }