@@ -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() {
},