diff --git a/src/api/auth/platform.js b/src/api/auth/platform.js index 92c82b1..66b3d66 100644 --- a/src/api/auth/platform.js +++ b/src/api/auth/platform.js @@ -68,4 +68,22 @@ export function getTargetActions(query) { }); } +export function getTargetInv(query) { + return axios({ + url: "/udims/platform/getTargetInv", + method: "get", + params: query + }); +} + + +export function getTargetSubInv(query) { + return axios({ + url: "/udims/platform/getTargetSubInv", + method: "get", + params: query + }); +} + + diff --git a/src/api/basic/bussinessType.js b/src/api/basic/bussinessType.js index 4f18c75..cbf41c7 100644 --- a/src/api/basic/bussinessType.js +++ b/src/api/basic/bussinessType.js @@ -9,7 +9,7 @@ export function getBussinessType(query) { } export function getJoinBussinessType(query) { return axios({ - url: "/udiwms/bussinessType/joinFilter", + url: "/udiwms/bussinessType/udimsFilter", method: "get", params: query }); diff --git a/src/views/inventory/InvPreProductsDetail.vue b/src/views/inventory/InvPreProductsDetail.vue index 3c97d81..2398605 100644 --- a/src/views/inventory/InvPreProductsDetail.vue +++ b/src/views/inventory/InvPreProductsDetail.vue @@ -250,7 +250,7 @@ export default { }, created() { this.getCodeList(); - this.getStat(); + // this.getStat(); this.getBusTypeByUser(); }, }; diff --git a/src/views/sys/bindPlatform.vue b/src/views/sys/bindPlatform.vue index ac09c71..6943741 100644 --- a/src/views/sys/bindPlatform.vue +++ b/src/views/sys/bindPlatform.vue @@ -137,6 +137,40 @@ + + + +
+ + + + {{ item.name }} + + + + + {{ item.name }} + + + +
+
+
+
@@ -158,6 +192,8 @@
+ +
@@ -216,7 +252,7 @@ import { linkPlatform, getLinkPlatformList, unbindPlatform, - getTargetActions + getTargetActions, getTargetInv, getTargetSubInv } from "../../api/auth/platform"; import {getBusTypeByUser} from "@/api/warehouse/BusRole"; @@ -240,7 +276,9 @@ export default { appKey: null, sceretKey: null, sourceAction: null, - targetAction: null + targetAction: null, + invCode: "", + invSubCode: "", }, editPlatfromQuery: { id: null, @@ -259,6 +297,8 @@ export default { corpNamesList: [], bussinessTypes: [], targetActions: [], + targetInvs: [], + targetSubInvs: [], platformRules: { corpName: [ {required: true, message: "请选择往来单位", trigger: "change"} @@ -280,6 +320,9 @@ export default { ] }, + + + curPlatformId: "", editType: 0, corpTypeList: [ { @@ -340,7 +383,11 @@ export default { this.getUnitMaintain(); this.getPlatformList(); this.getLocalBussinessType(); - this.getTargetActions(row.platformId); + this.curPlatformId = row.platformId; + this.getTargetInv(); + + this.getTargetSubInv(); + this.getTargetActions(); }).catch(() => { }); } else { @@ -353,20 +400,22 @@ export default { this.editType = 0; this.editLoginVisible = true; this.editDialogVisible = false; - - //清空表单数据 - this.editLogin = { - id: null, - corpName: null, - platformId: null, - platformUsername: null, - platformPassword: null, - appid: null, - appKey: null, - sceretKey: null, - sourceAction: null, - targetAction: null - }; + this.curPlatformId = "", + //清空表单数据 + this.editLogin = { + id: null, + corpName: null, + platformId: null, + platformUsername: null, + platformPassword: null, + appid: null, + appKey: null, + sceretKey: null, + sourceAction: null, + targetAction: null, + invCode: "", + invSubCode: "", + }; this.getLocalBussinessType(); this.getUnitMaintain(); this.getPlatformList(); @@ -401,13 +450,17 @@ export default { }, intentPlatform(value) { this.editPlatfromQuery.id = value; + this.curPlatformId = value; //拉取对应平台的单据类型 - this.getTargetActions(value); + this.getTargetInv(value); }, - getTargetActions(platformId) { + + + getTargetActions() { this.targetActions = []; let query = { - platformId: platformId + platformId: this.curPlatformId, + invSubCode: this.editLogin.invSubCode, }; getTargetActions(query).then((res) => { this.targetActions = res.data.list || []; @@ -415,6 +468,33 @@ export default { this.$message.error("获取自助平台单据类型失败"); }); }, + + + getTargetInv() { + this.targetActions = []; + let query = { + platformId: this.curPlatformId + }; + getTargetInv(query).then((res) => { + this.targetInvs = res.data || []; + }).catch((error) => { + this.$message.error("获取自助平台单据类型失败"); + }); + }, + + + getTargetSubInv() { + this.targetActions = []; + let query = { + invCode: this.editLogin.invCode, + platformId: this.curPlatformId + }; + getTargetSubInv(query).then((res) => { + this.targetSubInvs = res.data || []; + }).catch((error) => { + this.$message.error("获取自助平台单据类型失败"); + }); + }, getLocalBussinessType() { let tQuery = {}; getBusTypeByUser(tQuery).then((res) => { @@ -544,15 +624,20 @@ export default { } }); }, - exportTxt() { - }, handleSelectionChange(val) { this.multipleSelection = val; }, handleCurrentChange(val) { this.query.page = val; this.getList(); - } + }, + locInvChange() { + this.getTargetSubInv(); + }, + + locSubInvChange() { + this.getTargetActions(); + }, }, mounted() { },