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

fencang
anthonywj 3 years ago
parent ac7124d4c7
commit ae500bc78d

@ -1150,13 +1150,9 @@ export default {
//
let query = this.$route.query;
this.orderNo = query.id;
this.query = Object.assign(this.query, query);
this.query.limit = parseInt(this.query.limit);
this.query.corpOrderId = query.id;
//
// this.getCodeList();
}
this.formData.invWarehouseCode = this.$store.getters.locSubInvCode;
this.formData.locStorageCode = this.$store.getters.locInvCode;

@ -375,6 +375,7 @@ export default {
produceDate: null,
expireDate: null,
serialNo: null,
count:null,
},
formRules: {
temp: [

@ -63,11 +63,26 @@
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="price">
<el-form-item prop="serialNo">
<el-input v-model="editData.serialNo" auto-complete="off"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="3">
<div class="ao-text">
<span>数量</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="count">
<el-input v-model="editData.count" auto-complete="off"
type="number"
:disabled="editData.serialNo!=null && editData.serialNo!='' "></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="17">
</el-col>

@ -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>

Loading…
Cancel
Save