新增扫码单据时无序列号可以直接输入数量,业务单据新增加入分库

fengcang
anthonyywj2 3 years ago
parent 057f316e14
commit 1dd413a391

@ -136,6 +136,20 @@
}}</span> }}</span>
</el-option> </el-option>
</el-select> </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>
<el-form-item class="query-form-item" prop="fromCorp" <el-form-item class="query-form-item" prop="fromCorp"
v-if="curAction.corpType ==2 && curAction.genUnit"> v-if="curAction.corpType ==2 && curAction.genUnit">
@ -426,7 +440,19 @@ export default {
page: 1, page: 1,
limit: 10, 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: { formRules: {
corpName: [ corpName: [
{required: true, message: "请输入供应商", trigger: "blur"} {required: true, message: "请输入供应商", trigger: "blur"}
@ -448,6 +474,7 @@ export default {
codeArray: [], codeArray: [],
fromOptions: [], fromOptions: [],
fromStorageOptions: [], fromStorageOptions: [],
fromSubStorageOptions: [],
total: 0, total: 0,
loading: false, loading: false,
index: null, index: null,
@ -587,9 +614,12 @@ export default {
}); });
}, },
storageChange(row) { storageChange(row) {
console.log(row); if (this.formData.fromSubInvCode != null)
this.formData.fromSubInvCode = "";
this.formData.corpId = row.code; this.formData.corpId = row.code;
this.formData.corpName = row.name; this.formData.corpName = row.name;
this.findSubStorageMethod();
}, },
getStorage(event) { getStorage(event) {
this.storageList = []; this.storageList = [];
@ -630,6 +660,37 @@ export default {
.catch(() => { .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) { submitFunction(status) {
let tMessage = status === '501' ? '保存' : '提交'; let tMessage = status === '501' ? '保存' : '提交';
this.loading = true; this.loading = true;
@ -1099,14 +1160,16 @@ export default {
// } // }
// }); // });
// }, // },
getBusType(invCode) { getBusType() {
let query = { let query = {
enabled: true, enabled: true,
// code: invCode,
}; };
getLocalJoinByUser(query) getLocalJoinByUser(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.busTypes = response.data.list || [];
if (this.$isNotBlank(this.formData.billType)) {
this.curAction = this.getActionItem(this.formData.billType);
}
}) })
.catch(() => { .catch(() => {
}); });
@ -1207,10 +1270,6 @@ export default {
}; };
}, },
created() { created() {
this.getBusType("NOCODE");
this.getStorage();
this.codeArray = [];
this.closeConfirmFunction(false);
if (this.$isNotBlank(this.idQuery.id)) { if (this.$isNotBlank(this.idQuery.id)) {
this.query.limit = 100; this.query.limit = 100;
this.query.orderIdFk = this.idQuery.id; this.query.orderIdFk = this.idQuery.id;
@ -1218,6 +1277,7 @@ export default {
this.orderEditor = true; this.orderEditor = true;
this.sValue = this.formData.corpName; this.sValue = this.formData.corpName;
this.getStockOrderDetailList(); this.getStockOrderDetailList();
} else { } else {
this.formData = { this.formData = {
billNo: null, billNo: null,
@ -1236,6 +1296,13 @@ export default {
this.formData.billdate = new Date(); this.formData.billdate = new Date();
// this.generateBillNo(); // this.generateBillNo();
} }
this.getBusType();
this.getStorage();
this.findSubInvByInv();
this.findSubStorageMethod();
this.codeArray = [];
this.closeConfirmFunction(false);
}, },
}; };
</script> </script>

Loading…
Cancel
Save