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

fencang
anthonywj 3 years ago
parent ac7124d4c7
commit ae500bc78d

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

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

@ -63,11 +63,26 @@
</div> </div>
</el-col> </el-col>
<el-col :span="7"> <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-input v-model="editData.serialNo" auto-complete="off"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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-row :gutter="20">
<el-col :span="17"> <el-col :span="17">
</el-col> </el-col>

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