guoshuang 3 years ago
commit 048334b49e

@ -189,11 +189,20 @@ export default class RawReceiptDetail extends BasePage {
this.materialList = [] this.materialList = []
this.model.blDetailList.length = 0 this.model.blDetailList.length = 0
} }
LocEmpty(){
this.some = {}
this.someIndex = 0
this.qty = ''
this.wlCode = ''
this.materialList = []
this.model.blDetailList.length = 0
}
async query(){ async query(){
if(this.form.documentNo == ''){ if(this.form.documentNo == ''){
this.customToast(this.$t('message.Commission_tips1') as string); this.customToast(this.$t('message.Commission_tips1') as string);
} }
this.empty() this.LocEmpty()
this.wlCode = this.Location[0]
let inPrdOrderList = this.form.documentNo.split(",") let inPrdOrderList = this.form.documentNo.split(",")
let params = { let params = {
inPrdOrderList inPrdOrderList

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

@ -139,7 +139,7 @@ export default class RawReceiptDetail extends BasePage {
this.wlCode = e.pickerName; this.wlCode = e.pickerName;
} }
// //
handleRow({ data }: any) { async handleRow({ data }: any) {
if (!this.model.aggregateList[data[0].index].sendSpot) { if (!this.model.aggregateList[data[0].index].sendSpot) {
uni.showModal({ uni.showModal({
content: this.$t('message.SAPLocation') as any, 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.model.aggregateList[this.someIndex].currentAmount = 0;
this.LocationList = []; this.LocationList = [];
this.qty = ''; 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() { Add() {

@ -22,6 +22,7 @@ export class PickingModule extends VuexModule {
code = ''; code = '';
orderOutIdList: any; orderOutIdList: any;
NEWparams: any; NEWparams: any;
LocList:any = []
/** /**
* *
@ -334,7 +335,13 @@ export class PickingModule extends VuexModule {
console.log('code', code); console.log('code', code);
return { 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 * @param list

@ -10,7 +10,7 @@
<u-form class="form" ref="form" :model="form" :error-type="['toast']" label-width="150rpx"> <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-form-item :required="true" :label="$t('message.Pi_OrderNo')" prop="prdOrder">
<u-search :placeholder="$t('message.po_PleaseInput')" v-model.trim="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> <u-button size="mini" style="margin-left: 10rpx" type="primary" @click="screen">{{ $t('message.screen') }}</u-button>
<!-- <jPicker <!-- <jPicker
sureColor="#ff0000" sureColor="#ff0000"
@ -42,7 +42,7 @@
v-model="form.wkposCode" v-model="form.wkposCode"
:placeholder="this.$t('message.po_PleaseInput')" :placeholder="this.$t('message.po_PleaseInput')"
/> --> /> -->
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode" class="search" :options="Location" /> <jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode.value" class="search" :options="Location" />
</u-form-item> </u-form-item>
</view> </view>
<!-- 工厂 --> <!-- 工厂 -->
@ -119,7 +119,7 @@ export default class returningDom extends BasePage {
// tlName: null, // 退name // tlName: null, // 退name
materialCode: null, // code materialCode: null, // code
wlName: '', // name wlName: '', // name
wlCode: '', wlCode: '' as any,
totalBackAmount: '0', totalBackAmount: '0',
}; };
prdOrder: any = []; prdOrder: any = [];
@ -149,9 +149,14 @@ export default class returningDom extends BasePage {
screen() { screen() {
this.redirectTo(this.page.raw.handover.returning.filter); 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) { LocationChoice(e: any) {
console.log('e>>>>>>>>>>>>>>>>>>>>>>>>', e); console.log('e>>>>>>>>>>>>>>>>>>>>>>>>', e);
this.form.wlCode = e.pickerName.label; this.wlCode = e.pickerName;
this.form.wkposCode = e.pickerName.sendSpot; this.form.wkposCode = e.pickerName.sendSpot;
} }
// onReadyonLoad // onReadyonLoad
@ -164,8 +169,7 @@ export default class returningDom extends BasePage {
let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any); let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
if (JSON.parse(sessionStorage.getItem('data') as any)) { if (JSON.parse(sessionStorage.getItem('data') as any)) {
this.data = JSON.parse(sessionStorage.getItem('data') as any); this.data = JSON.parse(sessionStorage.getItem('data') as any);
console.log('this.data',this.data) this.form.prdOrder = this.data.label;
this.prdOrder = this.data.label;
this.form.wlName = this.data.value; this.form.wlName = this.data.value;
this.form.sendSpot = this.data.sendSpot; this.form.sendSpot = this.data.sendSpot;
// this.form.amount = this.data.amount; // this.form.amount = this.data.amount;
@ -189,6 +193,7 @@ export default class returningDom extends BasePage {
pickerName.sendSpot = item.sendSpot; pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName); this.Location.push(pickerName);
}); });
this.wlCode = this.Location[0];
} }
back() { back() {
// this.form.sendSpot = ''; // this.form.sendSpot = '';
@ -201,6 +206,7 @@ export default class returningDom extends BasePage {
this.$form.resetFields(); this.$form.resetFields();
} }
materialConfirm(v: any) { materialConfirm(v: any) {
console.log('vvvvvv',v)
this.form.materialCode = v[0].value; this.form.materialCode = v[0].value;
this.form.wlName = v[0].label; this.form.wlName = v[0].label;
this.model.materielList.forEach((item: any) => { this.model.materielList.forEach((item: any) => {
@ -222,23 +228,31 @@ export default class returningDom extends BasePage {
} else { } else {
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {
if (!valid) return; if (!valid) return;
if (!this.model.orderInInfo.sapFactoryCode) { // if (!this.model.orderInInfo.sapFactoryCode) {
this.customToast(this.$t('message.return_Tip2') as string); // this.customToast(this.$t('message.return_Tip2') as string);
} // }
// (this.form.sendSpot as any) = this.model.orderInInfo.sendSpot; // (this.form.sendSpot as any) = this.model.orderInInfo.sendSpot;
(this.form.sapFactoryCode as any) = this.model.orderInInfo.sapFactoryCode; (this.form.sapFactoryCode as any) = this.model.orderInInfo.sapFactoryCode;
// delete this.form.wlName; // delete this.form.wlName;
this.form.wlCode = this.wlCode.label
await this.model.tluSubmit(this.form); await this.model.tluSubmit(this.form);
this.$form.resetFields(); // this.$form.resetFields();
this.operatorName = ''; this.operatorName = '';
// this.form.sendSpot = ''; // this.form.sendSpot = '';
// this.form.wkposCode = ''; // this.form.wkposCode = '';
this.model.orderInInfo.sapFactoryCode = ''; 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 { class OrderInInfo {
amount?: any; amount?: any;
sapFactoryCode?: any; sapFactoryCode?: any;
materialCode?: any;
sendSpot?: any;
} }
@Module({ @Module({

Loading…
Cancel
Save