diff --git a/src/utils/axios.js b/src/utils/axios.js index f1380bf..14e6b72 100644 --- a/src/utils/axios.js +++ b/src/utils/axios.js @@ -53,6 +53,9 @@ service.interceptors.response.use( }); }); } + // else if(data.code!=20000){ + // Message.error(data.message) + // } } return data; }, diff --git a/src/views/sys/bindPlatform.vue b/src/views/sys/bindPlatform.vue index 07c2b3c..c2d371d 100644 --- a/src/views/sys/bindPlatform.vue +++ b/src/views/sys/bindPlatform.vue @@ -182,7 +182,8 @@ - + @@ -329,11 +330,11 @@ export default { {required: true, message: "请选择自助平台", trigger: "change"} ], invCode: [ - {required: true, message: "请选择目标分库", trigger: "change"} - ], - invSubCode: [ - {required: true, message: "请选择目标分库", trigger: 'change'} + {required: true, message: "请选择目标仓库", trigger: "change"} ], + // invSubCode: [ + // {required: true, message: "请选择目标分库", trigger: 'change'} + // ], platformUsername: [ {required: true, message: "请输入账号", trigger: "change"} ], @@ -422,8 +423,8 @@ export default { this.curPlatformId = row.platformId; this.getTargetInv(); - this.getTargetSubInv(); - this.getTargetActions(); + // this.getTargetSubInv(); + // this.getTargetActions(); }).catch(() => { }); } else { @@ -484,6 +485,9 @@ export default { this.loading = false; this.platformList = []; }); + }, + change(){ + }, unitChange(value) { this.editLogin.unitId = value; @@ -493,7 +497,7 @@ export default { this.curPlatformId = value; this.targetPlatformEdit = true; //拉取对应平台的单据类型 - this.getTargetInv(value); + // this.getTargetInv(value); }, getTargetActions() { @@ -638,7 +642,13 @@ export default { this.getList(); }, locInvChange() { - this.getTargetSubInv(); + this.targetAction = null + let index = this.targetInvs.findIndex(i=>i.code==this.editLogin.invCode); + if(index!=-1){ + this.targetActions = this.targetInvs[index].bussinessTypeList||[] + this.editLogin.invSubCode = this.targetInvs[index].deptCode||'' + } + // this.getTargetSubInv(); }, locSubInvChange() { @@ -647,15 +657,15 @@ export default { testUserInfo() { if (isBlank(this.editLogin.platformId)) { this.$message.error("请选择自助平台"); - return; + return false; } if (isBlank(this.editLogin.platformUsername)) { this.$message.error("请输入用户名"); - return; + return false; } if (isBlank(this.editLogin.platformPassword)) { this.$message.error("请输入密码"); - return; + return false; } let data = { platformId: this.editLogin.platformId, @@ -665,6 +675,18 @@ export default { testUserInfo(data).then((res) => { if (res.code === 20000) { this.targetPlatformEdit = false; + + this.targetInvs = res.data?res.data.invList || []:[]; + if(this.editLogin.invCode){ + let index = this.targetInvs.findIndex(i=>i.code==this.editLogin.invCode); + if(index!=-1){ + this.targetActions = this.targetInvs[index].bussinessTypeList||[] + this.editLogin.invSubCode = this.targetInvs[index].deptCode||'' + } + } + this.editLogin.appid = res.data.license.appid + this.editLogin.appKey = res.data.license.appKey + this.editLogin.sceretKey = res.data.license.sceretKey this.$message.success("验证成功"); } else { this.$message.error(res.message); diff --git a/vue.config.js b/vue.config.js index 4a6e846..2578973 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,6 +1,10 @@ const UselessFile = require('useless-files-webpack-plugin'); module.exports = { + devServer:{ + port: 8089, + open: true + }, lintOnSave:false, baseUrl: process.env.NODE_ENV === "production"|| "test" ? "./" : "/", outputDir: process.env.outputDir,