|
|
|
@ -62,7 +62,7 @@
|
|
|
|
|
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item prop="locStorageCode">
|
|
|
|
|
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locInChange"
|
|
|
|
|
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息"
|
|
|
|
|
:disabled="true"
|
|
|
|
|
style="width: 50%"
|
|
|
|
|
clearable>
|
|
|
|
@ -87,19 +87,67 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
<span>申购说明:</span>
|
|
|
|
|
<span>当前仓库:</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item prop="billNo">
|
|
|
|
|
<el-input v-model="formData.remark" auto-complete="off" type="textarea" :disabled="true"
|
|
|
|
|
autosize></el-input>
|
|
|
|
|
<el-form-item prop="targetInv">
|
|
|
|
|
<el-select v-model="formData.targetInv" placeholder="当前仓库信息" @change="locInChange"
|
|
|
|
|
style="width: 50%"
|
|
|
|
|
clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in targetInvList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-select v-model="formData.targetSubInv" placeholder="当前分库信息" style="width: 50%"
|
|
|
|
|
clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in targetSubInvList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20" style="margin-top: -10px">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
<span>生成采购计划:</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item prop="billType">
|
|
|
|
|
<el-select v-model="formData.targetBillType" placeholder="请选择采购类型" style="width: 100%"
|
|
|
|
|
clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in busTypes"
|
|
|
|
|
:key="item.originAction"
|
|
|
|
|
:label="item.originName"
|
|
|
|
|
:value="item.originAction">
|
|
|
|
|
<span style="float: left">{{ item.originName }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
<span>审核说明:</span>
|
|
|
|
@ -194,6 +242,7 @@ import stockOrderNewSelectProduct from "../business/stockOrderNewSelectProduct";
|
|
|
|
|
import {delApplyDetail, listApplyDetail, auditOrder} from "@/api/purchase/purApply";
|
|
|
|
|
import {filterAllByUser} from "@/api/basic/invWarehouse";
|
|
|
|
|
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
|
|
|
|
|
import {getBusChange} from "@/api/basic/busTypeChange";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "idQuery",
|
|
|
|
@ -229,6 +278,9 @@ export default {
|
|
|
|
|
deptCode: null,
|
|
|
|
|
locStorageCode: null,
|
|
|
|
|
invWarehouseCode: null,
|
|
|
|
|
targetInv: null,
|
|
|
|
|
targetSubInv: null,
|
|
|
|
|
targetBillType: null,
|
|
|
|
|
},
|
|
|
|
|
formRules: {},
|
|
|
|
|
codeArray: [],
|
|
|
|
@ -260,6 +312,11 @@ export default {
|
|
|
|
|
thisData: {},
|
|
|
|
|
storageList: [],
|
|
|
|
|
subInvList: [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
targetInvList: [],
|
|
|
|
|
targetSubInvList: [],
|
|
|
|
|
|
|
|
|
|
invQueryData: {},
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
@ -402,11 +459,6 @@ export default {
|
|
|
|
|
filterAllByUser()
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.storageList = response.data || [];
|
|
|
|
|
if (this.storageList != null && this.storageList.length == 1) {
|
|
|
|
|
this.formData.locStorageCode = this.storageList[0].code;
|
|
|
|
|
}
|
|
|
|
|
this.findSubInvs();
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
@ -426,12 +478,58 @@ export default {
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getTargetStorage() {
|
|
|
|
|
this.targetInvList = [];
|
|
|
|
|
filterAllByUser()
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.targetInvList = response.data || [];
|
|
|
|
|
if (this.targetInvList != null && this.targetInvList.length == 1) {
|
|
|
|
|
this.formData.targetInv = this.targetInvList[0].code;
|
|
|
|
|
}
|
|
|
|
|
this.findTargetSubInvs();
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
findTargetSubInvs() {
|
|
|
|
|
this.targetSubInvList = [];
|
|
|
|
|
let query = {
|
|
|
|
|
pcode: this.formData.targetInv
|
|
|
|
|
};
|
|
|
|
|
filterSubByInv(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.targetSubInvList = response.data || [];
|
|
|
|
|
if (this.targetSubInvList != null && this.targetSubInvList.length == 1) {
|
|
|
|
|
this.formData.targetSubInv = this.targetSubInvList[0].code;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
locInChange(item) {
|
|
|
|
|
if (this.formData.invWarehouseCode != null) {
|
|
|
|
|
this.formData.invWarehouseCode = "";
|
|
|
|
|
if (this.formData.targetSubInv != null) {
|
|
|
|
|
this.formData.targetSubInv = "";
|
|
|
|
|
}
|
|
|
|
|
this.formData.locStorageCode = item;
|
|
|
|
|
this.findSubInvs();
|
|
|
|
|
this.formData.targetInv = item;
|
|
|
|
|
this.findTargetSubInvs();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getBusType() {
|
|
|
|
|
let query = {
|
|
|
|
|
enable: false,
|
|
|
|
|
type: 3,
|
|
|
|
|
};
|
|
|
|
|
getBusChange(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.busTypes = response.data.list || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
filters: {},
|
|
|
|
@ -463,7 +561,10 @@ export default {
|
|
|
|
|
this.orderEditor = false;
|
|
|
|
|
}
|
|
|
|
|
this.getStorage();
|
|
|
|
|
this.findSubInvs();
|
|
|
|
|
this.getTargetStorage();
|
|
|
|
|
this.codeArray = [];
|
|
|
|
|
this.getBusType();
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|