单据上传新增仓库,分库

master
anthonyywj2 3 years ago
parent 6394c96c17
commit 58df53d6e7

@ -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
});
}

@ -9,7 +9,7 @@ export function getBussinessType(query) {
} }
export function getJoinBussinessType(query) { export function getJoinBussinessType(query) {
return axios({ return axios({
url: "/udiwms/bussinessType/joinFilter", url: "/udiwms/bussinessType/udimsFilter",
method: "get", method: "get",
params: query params: query
}); });

@ -250,7 +250,7 @@ export default {
}, },
created() { created() {
this.getCodeList(); this.getCodeList();
this.getStat(); // this.getStat();
this.getBusTypeByUser(); this.getBusTypeByUser();
}, },
}; };

@ -137,6 +137,40 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="20" class="el-col" type="flex">
<div class="text item">
<el-form-item label="目标仓库分库" prop="targetAction">
<el-select v-model="editLogin.invCode"
style="width: 35%;"
placeholder="目标仓库信息" @change="locInvChange"
clearable>
<el-option
v-for="item in targetInvs"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
<el-select v-model="editLogin.invSubCode" placeholder="目标分库信息"
style="width: 35%;"
@change="locSubInvChange"
clearable>
<el-option
v-for="item in targetSubInvs"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="15" class="el-col" type="flex"> <el-col :span="15" class="el-col" type="flex">
<div class="text item"> <div class="text item">
@ -158,6 +192,8 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="15" class="el-col" type="flex"> <el-col :span="15" class="el-col" type="flex">
<div class="text item"> <div class="text item">
@ -216,7 +252,7 @@ import {
linkPlatform, linkPlatform,
getLinkPlatformList, getLinkPlatformList,
unbindPlatform, unbindPlatform,
getTargetActions getTargetActions, getTargetInv, getTargetSubInv
} from "../../api/auth/platform"; } from "../../api/auth/platform";
import {getBusTypeByUser} from "@/api/warehouse/BusRole"; import {getBusTypeByUser} from "@/api/warehouse/BusRole";
@ -240,7 +276,9 @@ export default {
appKey: null, appKey: null,
sceretKey: null, sceretKey: null,
sourceAction: null, sourceAction: null,
targetAction: null targetAction: null,
invCode: "",
invSubCode: "",
}, },
editPlatfromQuery: { editPlatfromQuery: {
id: null, id: null,
@ -259,6 +297,8 @@ export default {
corpNamesList: [], corpNamesList: [],
bussinessTypes: [], bussinessTypes: [],
targetActions: [], targetActions: [],
targetInvs: [],
targetSubInvs: [],
platformRules: { platformRules: {
corpName: [ corpName: [
{required: true, message: "请选择往来单位", trigger: "change"} {required: true, message: "请选择往来单位", trigger: "change"}
@ -280,6 +320,9 @@ export default {
] ]
}, },
curPlatformId: "",
editType: 0, editType: 0,
corpTypeList: [ corpTypeList: [
{ {
@ -340,7 +383,11 @@ export default {
this.getUnitMaintain(); this.getUnitMaintain();
this.getPlatformList(); this.getPlatformList();
this.getLocalBussinessType(); this.getLocalBussinessType();
this.getTargetActions(row.platformId); this.curPlatformId = row.platformId;
this.getTargetInv();
this.getTargetSubInv();
this.getTargetActions();
}).catch(() => { }).catch(() => {
}); });
} else { } else {
@ -353,20 +400,22 @@ export default {
this.editType = 0; this.editType = 0;
this.editLoginVisible = true; this.editLoginVisible = true;
this.editDialogVisible = false; this.editDialogVisible = false;
this.curPlatformId = "",
// //
this.editLogin = { this.editLogin = {
id: null, id: null,
corpName: null, corpName: null,
platformId: null, platformId: null,
platformUsername: null, platformUsername: null,
platformPassword: null, platformPassword: null,
appid: null, appid: null,
appKey: null, appKey: null,
sceretKey: null, sceretKey: null,
sourceAction: null, sourceAction: null,
targetAction: null targetAction: null,
}; invCode: "",
invSubCode: "",
};
this.getLocalBussinessType(); this.getLocalBussinessType();
this.getUnitMaintain(); this.getUnitMaintain();
this.getPlatformList(); this.getPlatformList();
@ -401,13 +450,17 @@ export default {
}, },
intentPlatform(value) { intentPlatform(value) {
this.editPlatfromQuery.id = value; this.editPlatfromQuery.id = value;
this.curPlatformId = value;
// //
this.getTargetActions(value); this.getTargetInv(value);
}, },
getTargetActions(platformId) {
getTargetActions() {
this.targetActions = []; this.targetActions = [];
let query = { let query = {
platformId: platformId platformId: this.curPlatformId,
invSubCode: this.editLogin.invSubCode,
}; };
getTargetActions(query).then((res) => { getTargetActions(query).then((res) => {
this.targetActions = res.data.list || []; this.targetActions = res.data.list || [];
@ -415,6 +468,33 @@ export default {
this.$message.error("获取自助平台单据类型失败"); 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() { getLocalBussinessType() {
let tQuery = {}; let tQuery = {};
getBusTypeByUser(tQuery).then((res) => { getBusTypeByUser(tQuery).then((res) => {
@ -544,15 +624,20 @@ export default {
} }
}); });
}, },
exportTxt() {
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.query.page = val; this.query.page = val;
this.getList(); this.getList();
} },
locInvChange() {
this.getTargetSubInv();
},
locSubInvChange() {
this.getTargetActions();
},
}, },
mounted() { mounted() {
}, },

Loading…
Cancel
Save