|
|
|
@ -27,7 +27,7 @@
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 行项目 -->
|
|
|
|
|
<u-form-item :label="$t('message.Line')">
|
|
|
|
|
<u-input :disabled="true" v-model="form.rowItem" placeholder="" />
|
|
|
|
|
<u-input :disabled="true" v-model="form.row" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 物料总数 -->
|
|
|
|
|
<u-row gutter="0">
|
|
|
|
@ -185,7 +185,8 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
await this.model.findProdInfoByDN(this.form.orderNo);
|
|
|
|
|
if (model.DNcode == '1') {
|
|
|
|
|
console.log('model.DNcode',this.model.DNcode)
|
|
|
|
|
if (this.model.DNcode == '1') {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'success',
|
|
|
|
|
title: this.$t('message.successful') as any,
|
|
|
|
@ -200,19 +201,9 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
//选择成品编码
|
|
|
|
|
materialConfirm(v: any) {
|
|
|
|
|
console.log('v[0].value', v[0]);
|
|
|
|
|
// this.form.productCode = v[0].value;
|
|
|
|
|
// this.model.materielList.forEach((item: any) => {
|
|
|
|
|
// if (v[0].value == item.stoItem) {
|
|
|
|
|
// this.form.productCode = item.materialCode;
|
|
|
|
|
// this.form.productDescZh = item.materialDesc;
|
|
|
|
|
// this.form.orderAmount = item.orderAmount;
|
|
|
|
|
// this.form.scanAmount = item.scanAmount;
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
console.log('v[0].value', v);
|
|
|
|
|
this.model.materielList.forEach((item: any) => {
|
|
|
|
|
if (v[0].rowItem == item.rowItem) {
|
|
|
|
|
if (v[0].value == item.materialCode) {
|
|
|
|
|
console.log('item', item);
|
|
|
|
|
this.form.productCode = item.materialCode;
|
|
|
|
|
this.form.productDescZh = item.materialDesc;
|
|
|
|
@ -328,37 +319,16 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
// }
|
|
|
|
|
Posting() {}
|
|
|
|
|
onOk() {
|
|
|
|
|
// if (this.selectMaterielList.length == 0) {
|
|
|
|
|
// uni.showToast({ icon: 'none', title: this.$t('message.product_Tip2') as string });
|
|
|
|
|
// } else {
|
|
|
|
|
this.$form.validate(async (valid: boolean) => {
|
|
|
|
|
if (!valid) return;
|
|
|
|
|
if (parseInt(this.form.orderAmount) <= this.form.scanAmount) {
|
|
|
|
|
this.customToast(this.$t('message.product_Tip6') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//let selctlist: any = [];
|
|
|
|
|
//selectMaterielList 是选中表格数据列表
|
|
|
|
|
// this.selectMaterielList.forEach((item: any, index: any) => {
|
|
|
|
|
// // item.originWl = item.locCode;
|
|
|
|
|
// selctlist[index] = {
|
|
|
|
|
// barCode: item.barcode,
|
|
|
|
|
// keepBy: session.loginName,
|
|
|
|
|
// loginName: session.loginName,
|
|
|
|
|
// //单号
|
|
|
|
|
// order3: this.form.orderNo,
|
|
|
|
|
// orderType: 4,
|
|
|
|
|
// type: 0,
|
|
|
|
|
// productCode: item.productCode,
|
|
|
|
|
// productDescZh: item.productDescZh,
|
|
|
|
|
// orderItem: this.form.rowItem,
|
|
|
|
|
// originWl: item.locCode,
|
|
|
|
|
// dockCode: item.dockCode,
|
|
|
|
|
// dockName: item.dockName,
|
|
|
|
|
// whCode: item.whCode,
|
|
|
|
|
// regionCode: item.regionCode,
|
|
|
|
|
// };
|
|
|
|
|
// });
|
|
|
|
|
if(this.form.barCode == ''){
|
|
|
|
|
this.customToast(this.$t('message.barcode') as string);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
const selctlist = {
|
|
|
|
|
barcode: this.form.barCode,
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
@ -370,18 +340,27 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
orderType: 4,
|
|
|
|
|
productCode: this.form.productCode,
|
|
|
|
|
};
|
|
|
|
|
await this.model.confirmMove(selctlist);
|
|
|
|
|
// this.$form.resetFields();
|
|
|
|
|
// // this.form.barCode = '';
|
|
|
|
|
// this.selectMaterielList = [];
|
|
|
|
|
console.log('aaaaaaa', this.model);
|
|
|
|
|
await this.model.confirmMove(selctlist).then(async () =>{
|
|
|
|
|
if (this.model.code == '1') {
|
|
|
|
|
this.materialList = [];
|
|
|
|
|
// this.model.materielList = [];
|
|
|
|
|
//this.$table.onCheckAllTap();
|
|
|
|
|
uni.showToast({ icon: 'success', title: 'success' });
|
|
|
|
|
this.form.barCode = '';
|
|
|
|
|
this.form.productCode = '';
|
|
|
|
|
model.orderInInfo.stoAmount = 0;
|
|
|
|
|
this.form.scanAmount = 0;
|
|
|
|
|
this.form.orderAmount = '';
|
|
|
|
|
this.form.productDescZh = '';
|
|
|
|
|
this.selectMaterielList = [];
|
|
|
|
|
this.form.rowItem = '';
|
|
|
|
|
this.query();
|
|
|
|
|
}
|
|
|
|
|
if(this.model.code == '2'){
|
|
|
|
|
uni.showModal({
|
|
|
|
|
content:this.$t('message.sweep') as any,
|
|
|
|
|
cancelText:this.$t('message.Cancel') as any,
|
|
|
|
|
confirmText:this.$t('message.workArea_Confirm') as any,
|
|
|
|
|
success:async (res) =>{
|
|
|
|
|
if(res.confirm){
|
|
|
|
|
let params = {
|
|
|
|
|
barcode: this.form.barCode,
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
@ -390,21 +369,23 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
order3: this.form.orderNo,
|
|
|
|
|
}
|
|
|
|
|
await this.model.delCode(params)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// this.form.orderNo = '';
|
|
|
|
|
this.form.barCode = '';
|
|
|
|
|
this.form.productCode = '';
|
|
|
|
|
model.orderInInfo.stoAmount = 0;
|
|
|
|
|
// this.form.orderNo = null;
|
|
|
|
|
this.form.scanAmount = 0;
|
|
|
|
|
this.form.orderAmount = '';
|
|
|
|
|
this.form.productDescZh = '';
|
|
|
|
|
this.selectMaterielList = [];
|
|
|
|
|
this.form.rowItem = '';
|
|
|
|
|
//this.$table.onEmpty();
|
|
|
|
|
//debugger;
|
|
|
|
|
this.query();
|
|
|
|
|
} else if(res.cancel){
|
|
|
|
|
this.form.barCode = '';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|