|
|
|
@ -136,6 +136,20 @@
|
|
|
|
|
}}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
|
|
<el-select v-model="formData.fromSubInvCode" placeholder="请选择分库" clearable="true"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in fromSubStorageOptions"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
|
|
|
|
|
<!--<span style="float: right; color: #8492a6; font-size: 13px">{{ item.action }}</span>-->
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="query-form-item" prop="fromCorp"
|
|
|
|
|
v-if="curAction.corpType ==2 && curAction.genUnit">
|
|
|
|
@ -426,7 +440,19 @@ export default {
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10,
|
|
|
|
|
},
|
|
|
|
|
formData: {noInvOut: false, locStorageCode: null, invWarehouseCode: null},
|
|
|
|
|
formData: {
|
|
|
|
|
noInvOut: false,
|
|
|
|
|
locStorageCode: null,
|
|
|
|
|
invWarehouseCode: null,
|
|
|
|
|
fromSubInvCode: null,
|
|
|
|
|
billNo: null,
|
|
|
|
|
billdate: "",
|
|
|
|
|
customerId: store.getters.customerId,
|
|
|
|
|
billType: "",
|
|
|
|
|
type: null,
|
|
|
|
|
corpName: "",
|
|
|
|
|
corpId: "",
|
|
|
|
|
},
|
|
|
|
|
formRules: {
|
|
|
|
|
corpName: [
|
|
|
|
|
{required: true, message: "请输入供应商", trigger: "blur"}
|
|
|
|
@ -448,6 +474,7 @@ export default {
|
|
|
|
|
codeArray: [],
|
|
|
|
|
fromOptions: [],
|
|
|
|
|
fromStorageOptions: [],
|
|
|
|
|
fromSubStorageOptions: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
loading: false,
|
|
|
|
|
index: null,
|
|
|
|
@ -587,9 +614,12 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
storageChange(row) {
|
|
|
|
|
console.log(row);
|
|
|
|
|
if (this.formData.fromSubInvCode != null)
|
|
|
|
|
this.formData.fromSubInvCode = "";
|
|
|
|
|
this.formData.corpId = row.code;
|
|
|
|
|
this.formData.corpName = row.name;
|
|
|
|
|
this.findSubStorageMethod();
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
getStorage(event) {
|
|
|
|
|
this.storageList = [];
|
|
|
|
@ -630,6 +660,37 @@ export default {
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
findSubStorageMethod() {
|
|
|
|
|
let cQuery = {
|
|
|
|
|
pcode: this.formData.corpId,
|
|
|
|
|
filter: 2,
|
|
|
|
|
};
|
|
|
|
|
filterSubByInv(cQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.fromSubStorageOptions = response.data || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
findSubInvByInv(invCode) {
|
|
|
|
|
this.subInvList = [];
|
|
|
|
|
let query = {
|
|
|
|
|
pcode: invCode
|
|
|
|
|
};
|
|
|
|
|
filterSubByInv(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.subInvList = response.data || [];
|
|
|
|
|
if (this.subInvList != null && this.subInvList.length == 1) {
|
|
|
|
|
this.formData.invWarehouseCode = this.subInvList[0].code;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
submitFunction(status) {
|
|
|
|
|
let tMessage = status === '501' ? '保存' : '提交';
|
|
|
|
|
this.loading = true;
|
|
|
|
@ -1099,14 +1160,16 @@ export default {
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
getBusType(invCode) {
|
|
|
|
|
getBusType() {
|
|
|
|
|
let query = {
|
|
|
|
|
enabled: true,
|
|
|
|
|
// code: invCode,
|
|
|
|
|
};
|
|
|
|
|
getLocalJoinByUser(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.busTypes = response.data.list || [];
|
|
|
|
|
if (this.$isNotBlank(this.formData.billType)) {
|
|
|
|
|
this.curAction = this.getActionItem(this.formData.billType);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
@ -1207,10 +1270,6 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getBusType("NOCODE");
|
|
|
|
|
this.getStorage();
|
|
|
|
|
this.codeArray = [];
|
|
|
|
|
this.closeConfirmFunction(false);
|
|
|
|
|
if (this.$isNotBlank(this.idQuery.id)) {
|
|
|
|
|
this.query.limit = 100;
|
|
|
|
|
this.query.orderIdFk = this.idQuery.id;
|
|
|
|
@ -1218,6 +1277,7 @@ export default {
|
|
|
|
|
this.orderEditor = true;
|
|
|
|
|
this.sValue = this.formData.corpName;
|
|
|
|
|
this.getStockOrderDetailList();
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
this.formData = {
|
|
|
|
|
billNo: null,
|
|
|
|
@ -1236,6 +1296,13 @@ export default {
|
|
|
|
|
this.formData.billdate = new Date();
|
|
|
|
|
// this.generateBillNo();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.getBusType();
|
|
|
|
|
this.getStorage();
|
|
|
|
|
this.findSubInvByInv();
|
|
|
|
|
this.findSubStorageMethod();
|
|
|
|
|
this.codeArray = [];
|
|
|
|
|
this.closeConfirmFunction(false);
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|