|
|
|
@ -33,7 +33,7 @@
|
|
|
|
|
<u-row gutter="0">
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-form-item :label="$t('message.product_MaterilTotalNumber')">
|
|
|
|
|
<u-input v-model="form.orderAmount" :disabled="true" />
|
|
|
|
|
<u-input v-model="form.orderAmount" placeholder="" :disabled="true" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col :span="6">
|
|
|
|
@ -42,25 +42,28 @@
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-row>
|
|
|
|
|
<!-- 扫码 -->
|
|
|
|
|
<u-form-item :label="$t('message.product_BarCode')">
|
|
|
|
|
<u-search :placeholder="$t('message.po_PleaseInput')" v-model="form.barCode" @search="onSubmit" :focus="firstFocus" :show-action="false"></u-search>
|
|
|
|
|
<u-search :placeholder="$t('message.po_PleaseInput')" v-model="form.barCode" @search="onOk" :focus="firstFocus" :show-action="false"></u-search>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-col :span="12">
|
|
|
|
|
<!-- <u-col :span="12">
|
|
|
|
|
<view class="table-wrapper">
|
|
|
|
|
<wyb-table class="table" ref="table" width="100%" enable-check="multiple" show-left-and-right-border :headers="headers" :contents="materialList" :show-vert-border="false" @onCheck="onCheck"></wyb-table>
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-col> -->
|
|
|
|
|
</u-form>
|
|
|
|
|
<view class="bottom-bar">
|
|
|
|
|
<u-row class="button-bar">
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-button type="warning" @click="toPage(page.product.outbound.stoOutboundDetail)">{{ $t('message.detailed') }}</u-button>
|
|
|
|
|
<!-- Guoshuang 详细跳转要改,调接口 -->
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-button type="warning" @click="detailed">{{ $t('message.detailed') }}</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<!-- <u-col :span="4">
|
|
|
|
|
<u-button type="error" @click="resetHandle">{{ $t('message.product_Empty') }}</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-button type="primary" @click="onOk">{{ $t('message.po_Submit') }}</u-button>
|
|
|
|
|
</u-col> -->
|
|
|
|
|
<!-- Guoshuang 出库要改,入参 -->
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-button type="primary" @click="onOk">{{ $t('message.po_Deliver') }}</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<!-- <u-col :span="3">-->
|
|
|
|
|
<!-- <u-button type="success" @click="uni.navigateBack()">重提</u-button>-->
|
|
|
|
@ -141,20 +144,33 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
this.$form.setRules(this.rules);
|
|
|
|
|
model.queryReturningTypeList();
|
|
|
|
|
}
|
|
|
|
|
onCheck(e: any) {
|
|
|
|
|
console.log('e.data', e.data);
|
|
|
|
|
this.selectMaterielList = [];
|
|
|
|
|
e.data.forEach((line: any) => {
|
|
|
|
|
const { lineData: item } = line;
|
|
|
|
|
this.selectMaterielList.push(item);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//去掉页面表格,没有了onCheck方法
|
|
|
|
|
// onCheck(e: any) {
|
|
|
|
|
// console.log('e.data', e.data);
|
|
|
|
|
// this.selectMaterielList = [];
|
|
|
|
|
// e.data.forEach((line: any) => {
|
|
|
|
|
// const { lineData: item } = line;
|
|
|
|
|
// this.selectMaterielList.push(item);
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
back() {
|
|
|
|
|
this.form.barCode = '';
|
|
|
|
|
this.model.orderInInfo.stoAmount = 0;
|
|
|
|
|
this.selectMaterielList = [];
|
|
|
|
|
uni.navigateBack({ delta: 1 });
|
|
|
|
|
this.$table.onEmpty();
|
|
|
|
|
//this.$table.onEmpty();
|
|
|
|
|
}
|
|
|
|
|
//查询单号详细页面
|
|
|
|
|
async detailed() {
|
|
|
|
|
if (!this.form.orderNo) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Commission_tips1') as any,
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
await this.model.queryDetailed(this.form.orderNo);
|
|
|
|
|
this.toPage(this.page.product.outbound.stoOutboundDetail);
|
|
|
|
|
}
|
|
|
|
|
async query() {
|
|
|
|
|
if (!this.form.orderNo) {
|
|
|
|
@ -220,7 +236,7 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
/**
|
|
|
|
|
* 条码回车
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
//扫码也要改,扫码
|
|
|
|
|
onSubmit() {
|
|
|
|
|
this.$form.validate(async (valid: boolean) => {
|
|
|
|
|
// if (this.form.productCode.slice(0, 9) != this.form.barCode.slice(0, 9)) {
|
|
|
|
@ -265,6 +281,7 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
// // this.materialList.push(res);
|
|
|
|
|
// this.form.scanAmount = res.scanAmount;
|
|
|
|
|
// }
|
|
|
|
|
//guoshuang 注掉
|
|
|
|
|
if (this.materialList.length == 0) {
|
|
|
|
|
await this.materialList.push(res);
|
|
|
|
|
this.form.scanAmount += 1;
|
|
|
|
@ -308,26 +325,46 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
// } else {
|
|
|
|
|
this.$form.validate(async (valid: boolean) => {
|
|
|
|
|
if (!valid) return;
|
|
|
|
|
let selctlist: any = [];
|
|
|
|
|
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 (parseInt(this.form.orderAmount) <= this.form.scanAmount) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: 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,
|
|
|
|
|
// };
|
|
|
|
|
// });
|
|
|
|
|
const selctlist = {
|
|
|
|
|
barcode: this.form.barCode,
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
factoryCode: session.factoryCode,
|
|
|
|
|
keepBy: session.loginName,
|
|
|
|
|
order3: this.form.orderNo,
|
|
|
|
|
orderItem: this.form.rowItem,
|
|
|
|
|
type: 0,
|
|
|
|
|
orderType: 4,
|
|
|
|
|
productCode: this.form.productCode,
|
|
|
|
|
};
|
|
|
|
|
await this.model.confirmMove(selctlist);
|
|
|
|
|
// this.$form.resetFields();
|
|
|
|
|
// // this.form.barCode = '';
|
|
|
|
@ -336,10 +373,11 @@ export default class stoOutboundDom extends BasePage {
|
|
|
|
|
if (this.model.code == '1') {
|
|
|
|
|
this.materialList = [];
|
|
|
|
|
// this.model.materielList = [];
|
|
|
|
|
this.$table.onCheckAllTap();
|
|
|
|
|
//this.$table.onCheckAllTap();
|
|
|
|
|
uni.showToast({ icon: 'success', title: 'success' });
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.form.orderNo = '';
|
|
|
|
|
this.form.barCode = '';
|
|
|
|
|
this.form.productCode = '';
|
|
|
|
|
model.orderInInfo.stoAmount = 0;
|
|
|
|
|