From 8d7621ec4138082c1abff396a9a965fea312a369 Mon Sep 17 00:00:00 2001 From: x_z Date: Thu, 20 Oct 2022 16:56:08 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E5=8C=BB=E9=99=A2=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E5=85=B3=E8=81=94=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/basic/stackRules.js | 7 ++ src/views/sys/bindPlatform.vue | 67 ++++++------------- src/views/sys/stackRules.vue | 9 ++- .../userManage/param/systemParamConfig.vue | 4 +- src/views/warehouse/stockOrderDelSearch.vue | 3 +- src/views/warehouse/stockOrderEdit.vue | 2 +- src/views/warehouse/stockOrderSearch.vue | 6 +- 7 files changed, 43 insertions(+), 55 deletions(-) diff --git a/src/api/basic/stackRules.js b/src/api/basic/stackRules.js index f8c932e..661bce9 100644 --- a/src/api/basic/stackRules.js +++ b/src/api/basic/stackRules.js @@ -24,3 +24,10 @@ export function saveStackRules(formName, data) { data: data }); } + +export function getEnableRulesNum() { + return axios({ + url: "/udims/stackRules/getEnableRulesNum", + method: "get" + }) +} diff --git a/src/views/sys/bindPlatform.vue b/src/views/sys/bindPlatform.vue index 72749fe..07c2b3c 100644 --- a/src/views/sys/bindPlatform.vue +++ b/src/views/sys/bindPlatform.vue @@ -75,19 +75,19 @@
- + @@ -107,7 +107,7 @@ > @@ -287,6 +287,7 @@ export default { }, editLogin: { id: null, + unitId: null, corpName: null, platformId: null, platformUsername: null, @@ -298,9 +299,10 @@ export default { targetAction: null, invCode: "", invSubCode: "", + customerId: this.$store.getters.customerId }, editPlatfromQuery: { - id: null, + unitId: null, name: null, host: null }, @@ -439,6 +441,7 @@ export default { //清空表单数据 this.editLogin = { id: null, + unitId: null, corpName: null, platformId: null, platformUsername: null, @@ -450,13 +453,12 @@ export default { targetAction: null, invCode: "", invSubCode: "", + customerId: this.$store.getters.customerId }; this.getLocalBussinessType(); this.getUnitMaintain(); this.getPlatformList(); }, - change() { - }, getUnitMaintain() { let unitQuery = { customerId: this.$store.getters.customerId, @@ -483,14 +485,17 @@ export default { this.platformList = []; }); }, + unitChange(value) { + this.editLogin.unitId = value; + }, intentPlatform(value) { this.editPlatfromQuery.id = value; this.curPlatformId = value; + this.targetPlatformEdit = true; //拉取对应平台的单据类型 this.getTargetInv(value); }, - getTargetActions() { this.targetActions = []; let query = { @@ -586,7 +591,7 @@ export default { }).then(() => { this.loading = true; let query = { - corpId: row.id + id: row.id }; unbindPlatform(query).then((res) => { this.loading = false; @@ -600,46 +605,12 @@ export default { }); }, linkSubmit() { - //判断此用户是否已经添加过 - let corpId = this.editLogin.corpName; - if (!this.editDialogVisible) { - let corpNameTemp = null; - this.corpNamesList.forEach(item => { - if (item.id == this.editLogin.corpName) { - corpNameTemp = item.name; - corpId = item.id; - return; - } - }); - - let flag = false; - //此时为添加 - this.list.forEach(item => { - if (item.corpName == corpNameTemp) { - flag = true; - return; - } - }); - - if (flag) { - this.$message.error('“' + corpNameTemp + '”' + " 已经关联"); - return; - } - - } else { - let corpNameTemp = null; - this.corpNamesList.forEach(item => { - if (item.name == this.editLogin.corpName) { - corpNameTemp = item.name; - corpId = item.id; - return; - } - }); + if (this.targetPlatformEdit) { + this.$message.error("请验证账号!"); + return; } - this.$refs["editLogin"].validate((valid) => { if (valid) { - this.editLogin.id = corpId; linkPlatform(this.editLogin) .then((response) => { if (response.code == 20000) { diff --git a/src/views/sys/stackRules.vue b/src/views/sys/stackRules.vue index 4ba2a57..2e06256 100644 --- a/src/views/sys/stackRules.vue +++ b/src/views/sys/stackRules.vue @@ -165,7 +165,7 @@