cosmoim-852 fix 泰国成品dn退扫,拣配调整

master
guoshuang 2 years ago
parent 0fcbe0ee6f
commit 35d32fa062

@ -8,24 +8,19 @@
<view class="right"></view>
</view>
<u-form class="form" ref="form" :error-type="['toast']" label-width="150rpx">
<!-- DN单号 -->
<u-form-item :label="$t('message.dn_OddNumbers')">
<u-input v-model="order3" :disabled="true" />
</u-form-item>
<!-- 已扫数量 -->
<u-form-item :label="$t('message.SweptQuantity')">
<u-input v-model="scanAmount" :disabled="true" />
</u-form-item>
<!-- 已退数量 -->
<u-form-item :label="$t('message.QuantityReturned')">
<u-input v-model="retreatNum" :disabled="true" />
<!-- 单号查询 -->
<u-form-item :required="true" :label="$t('message.dn_OddNumbers')" prop="orderNo">
<u-search :placeholder="$t('message.Commission_tips1')" v-model.trim="form.orderNo" @search="query" :show-action="false"></u-search>
<view class="single-right">
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
</view>
</u-form-item>
<!-- 成品条码 -->
<u-form-item :label="$t('message.sweepBarCode')">
<u-search :placeholder="$t('message.barcode')" v-model="barCode" @search="BackSweep" :focus="firstFocus" :show-action="false"></u-search>
<u-search :placeholder="$t('message.barcode')" v-model="barCode" @search="BackSweep" :show-action="false"></u-search>
</u-form-item>
</u-form>
<view class="bottom-bar">
<!-- <view class="bottom-bar">
<u-row class="button-bar">
<u-col :span="6">
<u-button type="warning" @click="uni.navigateBack({ delta: 1 })">{{ $t('message.po_Return') }}</u-button>
@ -34,7 +29,7 @@
<u-button type="primary" @click="BackSweep">{{ $t('message.BackSweep') }}</u-button>
</u-col>
</u-row>
</view>
</view> -->
</view>
</template>
@ -51,18 +46,32 @@ export default class stoOutboundDom extends BasePage {
barCode: any = '';
scanAmount = 0;
retreatNum = 0;
form = {
dockCode: null, // code
dockName: null, // name
orderNo: null,
qty: 0,
orderAmount: '',
productCode: '', // name
productDescZh: '',
scanAmount: 0,
rowItem: '',
row: '',
barCode: '',
};
rowItemIndex: any = null;
async onReady() {
let code = uni.getStorageSync('SweepCode');
this.order3 = JSON.parse(code);
this.model.materielList.forEach((item: any) => {
this.scanAmount += parseFloat(item.outAmount);
});
let params = {
nxOutCode: this.order3,
loginName: session.loginName,
factoryCode: session.factoryCode,
};
await this.model.queryAmount(params);
//let code = uni.getStorageSync('SweepCode');
// this.order3 = JSON.parse(code);
// this.model.materielList.forEach((item: any) => {
// this.scanAmount += parseFloat(item.outAmount);
// });
// let params = {
// nxOutCode: this.order3,
// loginName: session.loginName,
// factoryCode: session.factoryCode,
// };
// await this.model.queryAmount(params);
}
async BackSweep() {
if (!this.barCode) {
@ -73,7 +82,7 @@ export default class stoOutboundDom extends BasePage {
barCode: this.barCode,
loginName: session.loginName,
factoryCode: session.factoryCode,
order3: this.order3,
order3: this.form.orderNo,
keepBy: session.loginName,
};
await this.model.BackSweep(params);
@ -89,6 +98,54 @@ export default class stoOutboundDom extends BasePage {
this.retreatNum += 1;
}
}
//
async query() {
if (!this.form.orderNo) {
this.customToast(this.$t('message.Commission_tips1') as any);
return;
}
await this.model.findProdInfoByDN(this.form.orderNo);
console.log('model.DNcode', this.model.DNcode);
if (this.model.DNcode == '1') {
// uni.showToast({
// title: this.$t('message.successful') as any,
// duration: 2000,
// image: '/static/icons/icon-51.png',
// });
if (this.rowItemIndex == null) {
this.form.productCode = this.model.materielList[0].materialCode;
this.form.productDescZh = this.model.materielList[0].materialDesc;
this.form.rowItem = this.model.materielList[0].materialCode;
this.form.row = this.model.materielList[0].rowItem;
this.form.orderAmount = this.model.materielList[0].orderAmount;
this.form.scanAmount = parseFloat(this.model.materielList[0].outAmount);
this.rowItemIndex = this.model.materielList[0].rowItem;
} else {
let rowIndex: any = null;
this.model.materielList.forEach((item: any, index) => {
if (item.rowItem == this.rowItemIndex) {
rowIndex = index;
}
});
if (rowIndex == null) {
this.form.productCode = this.model.materielList[0].materialCode;
this.form.productDescZh = this.model.materielList[0].materialDesc;
this.form.rowItem = this.model.materielList[0].materialCode;
this.form.row = this.model.materielList[0].rowItem;
this.form.orderAmount = this.model.materielList[0].orderAmount;
this.form.scanAmount = parseFloat(this.model.materielList[0].outAmount);
this.rowItemIndex = this.model.materielList[0].rowItem;
} else {
this.form.productCode = this.model.materielList[rowIndex].materialCode;
this.form.productDescZh = this.model.materielList[rowIndex].materialDesc;
this.form.rowItem = this.model.materielList[rowIndex].materialCode;
this.form.row = this.model.materielList[rowIndex].rowItem;
this.form.orderAmount = this.model.materielList[rowIndex].orderAmount;
this.form.scanAmount = parseFloat(this.model.materielList[rowIndex].outAmount);
}
}
}
}
}
</script>
<style lang="scss" scoped>

@ -152,11 +152,11 @@ export default class stoOutboundDom extends BasePage {
this.toPage(this.page.product.outbound.stoOutboundDetail);
}
BackSweep() {
if (!this.form.orderNo) {
this.customToast(this.$t('message.Commission_tips1') as any);
return;
}
uni.setStorageSync('SweepCode', JSON.stringify(this.form.orderNo));
// if (!this.form.orderNo) {
// this.customToast(this.$t('message.Commission_tips1') as any);
// return;
// }
//uni.setStorageSync('SweepCode', JSON.stringify(this.form.orderNo));
this.toPage(this.page.product.outbound.Back);
}
//
@ -316,7 +316,7 @@ export default class stoOutboundDom extends BasePage {
orderType: 4,
productCode: this.form.productCode,
};
await this.model.confirmMove(selctlist).then(async () => {
await this.model.taiscanBarcodeDNtha(selctlist).then(async () => {
if (this.model.code == '1') {
this.materialList = [];
// uni.showToast({

@ -184,6 +184,23 @@ export class ReturningModule extends VuexModule {
const materielList: any = [];
return { code, materielList };
}
/**
*
* @param orderNo
*/
@MutationAction
async taiscanBarcodeDNtha(list: any) {
const res: any = await http.post(url.outbound.stoOutbound.scanBarcodeDNtha, list);
console.log('res数据', res);
const code = res.code;
// if (code == '1') {
// uni.showToast({ icon: 'success', title: msg });
// } else {
// uni.showToast({ icon: 'none', title: msg });
// }
const materielList: any = [];
return { code, materielList };
}
/**
*
* @param orderNo

@ -172,7 +172,7 @@ export default class RawReceiptDetail extends BasePage {
this.model.proOrderResultList[this.someIndex].wlList = [];
this.model.proOrderResultList[this.someIndex].currentAmount = 0;
this.LocationList = [];
this.qty = '';
this.qty = data[0].lineData.differences;
await this.model.queryItemLoc({
workArea: session.workareaCode,
loginName: session.loginName,

@ -162,7 +162,7 @@ export default class RawReceiptDetail extends BasePage {
this.model.aggregateList[this.someIndex].wlList = [];
this.model.aggregateList[this.someIndex].currentAmount = 0;
this.LocationList = [];
this.qty = '';
this.qty = data[0].lineData.differences;
await this.model.queryItemLoc({
workArea: session.workareaCode,
loginName: session.loginName,

@ -43,7 +43,7 @@
<jPicker sureColor="#ff0000" @bindpicker="centerConfirm" showKey="label" valKey="value" :val="centerlist.value" class="search" :options="newcenterlist" />
</u-form-item>
<!-- 文件号 -->
<u-form-item :label="$t('message.DocumentNumber')">
<u-form-item :required="true" :label="$t('message.DocumentNumber')">
<u-input v-model="Some.fileNo" :border="border" :placeholder="$t('message.fileNumber')" />
</u-form-item>
<view class="newly">

@ -151,6 +151,7 @@ export const url = {
findSpareInfoByDN: '/wmspda/fg/findSpareInfoByDN',
confirmSpareDeliver: '/wmspda/fg/confirmSpareDeliver',
Bookkeeping: '/wmspda/fg/scanBarcodeDN',
scanBarcodeDNtha: '/wmspda/fg/scanBarcodeDN/tha',
close: '/wmspda/material/outsourcing/close',
// Bookkeeping: '/wmspda/fg/confirmMove',
checkScan: '/wmspda/fg/getMaterialByCode',

Loading…
Cancel
Save