拣配优化 退料优化

master
hou 3 years ago
parent 68e809db99
commit cefa62b325

@ -304,10 +304,9 @@ export default class RawReceiptDetail extends BasePage {
async GetLocation() {
this.Location = [];
let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: sendSpot,
sendSpot: null,
factoryCode: means.session.user.factoryCode,
workArea: session.workareaCode,
};

@ -139,7 +139,7 @@ export default class RawReceiptDetail extends BasePage {
this.wlCode = e.pickerName;
}
//
handleRow({ data }: any) {
async handleRow({ data }: any) {
if (!this.model.aggregateList[data[0].index].sendSpot) {
uni.showModal({
content: this.$t('message.SAPLocation') as any,
@ -159,6 +159,24 @@ export default class RawReceiptDetail extends BasePage {
this.model.aggregateList[this.someIndex].currentAmount = 0;
this.LocationList = [];
this.qty = '';
this.model.LocList.length = 0
await this.model.queryItemLoc({
workArea:session.workareaCode,
loginName:session.loginName,
sendSpot:null,
materialCode:this.some.materialCode,
factoryCode:this.some.factoryCode
})
this.Location = [];
this.model.LocList.forEach((item:any) =>{
let arr:any = {
label:item.locationCode,
value:item.locationCode + '(' + item.sendSpot + ')' + '(' + item.amount + ')',
sendSpot:item.sendSpot
}
this.Location.push(arr)
})
console.log('this.Location',this.Location)
}
//
Add() {

@ -22,6 +22,7 @@ export class PickingModule extends VuexModule {
code = '';
orderOutIdList: any;
NEWparams: any;
LocList:any = []
/**
*
@ -334,7 +335,13 @@ export class PickingModule extends VuexModule {
console.log('code', code);
return { code };
}
@MutationAction
async queryItemLoc(params:any = {}) {
const res: any = await http.post(url.sortscan.save.order, params);
const LocList = res.data
console.log('list',LocList)
return { LocList };
}
/**
*
* @param list

@ -10,7 +10,7 @@
<u-form class="form" ref="form" :model="form" :error-type="['toast']" label-width="150rpx">
<!-- 订单号 -->
<u-form-item :required="true" :label="$t('message.Pi_OrderNo')" prop="prdOrder">
<u-search :placeholder="$t('message.po_PleaseInput')" v-model.trim="form.prdOrder" @search="model.queryOrderInInfo" :show-action="false"></u-search>
<u-search :placeholder="$t('message.po_PleaseInput')" v-model.trim="form.prdOrder" @search="query" :show-action="false"></u-search>
<u-button size="mini" style="margin-left: 10rpx" type="primary" @click="screen">{{ $t('message.screen') }}</u-button>
<!-- <jPicker
sureColor="#ff0000"
@ -149,6 +149,11 @@ export default class returningDom extends BasePage {
screen() {
this.redirectTo(this.page.raw.handover.returning.filter);
}
async query(){
await this.model.queryOrderInInfo(this.form.prdOrder)
this.form.wlName = this.model.orderInInfo.materialCode;
this.form.sendSpot = this.model.orderInInfo.sendSpot
}
LocationChoice(e: any) {
console.log('e>>>>>>>>>>>>>>>>>>>>>>>>', e);
this.wlCode = e.pickerName;
@ -188,6 +193,7 @@ export default class returningDom extends BasePage {
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
this.wlCode = this.Location[0];
}
back() {
// this.form.sendSpot = '';
@ -200,6 +206,7 @@ export default class returningDom extends BasePage {
this.$form.resetFields();
}
materialConfirm(v: any) {
console.log('vvvvvv',v)
this.form.materialCode = v[0].value;
this.form.wlName = v[0].label;
this.model.materielList.forEach((item: any) => {
@ -229,16 +236,23 @@ export default class returningDom extends BasePage {
// delete this.form.wlName;
this.form.wlCode = this.wlCode.label
await this.model.tluSubmit(this.form);
this.$form.resetFields();
// this.$form.resetFields();
this.operatorName = '';
// this.form.sendSpot = '';
// this.form.wkposCode = '';
this.model.orderInInfo.sapFactoryCode = '';
this.model.materielList = [];
// this.model.materielList = [];
this.model.materielList.length = 0;
this.empty()
});
}
}
async empty(){
this.form.wlName = ''
this.form.sendSpot = ''
this.form.amount = ''
await this.query()
}
/**
* 操作人输入回车
*/

@ -14,6 +14,8 @@ import { session } from "@/store/modules/session";
class OrderInInfo {
amount?: any;
sapFactoryCode?: any;
materialCode?: any;
sendSpot?: any;
}
@Module({

Loading…
Cancel
Save