dam-7 feat 原材料补料增加库位推荐 明细增加单号展示

master
hou 3 years ago
parent d84a1d05cf
commit 98b370b4af

@ -2,7 +2,7 @@
<view class="page-receipt-detail">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
<u-icon class="icon" name="arrow-left" @click="go" />
</view>
<view class="title">{{ $t('message.Pi_QueryResults') }}</view>
<view class="right"></view>
@ -17,11 +17,13 @@ import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import { headers } from './config';
import model from './model';
@Component
export default class RawReceiptDetail extends BasePage {
model = model;
headers = headers;
go() {
this.redirectTo(this.page.raw.handover.feeding.Location);
}
}
</script>
<style lang="scss" scoped>
@ -72,3 +74,5 @@ export default class RawReceiptDetail extends BasePage {
}
}
</style>
function go() { throw new Error('Function not implemented.'); }

@ -219,14 +219,72 @@ export default class RawReceiptDetail extends BasePage {
this.some = this.model.blDetailList[0];
this.someIndex = 0;
});
await this.model.queryItemLoc({
workArea: session.workareaCode,
loginName: session.loginName,
sendSpot: null,
materialCode: this.some.materialCode,
factoryCode: session.factoryCode,
});
if (this.model.LocList.length != 0) {
this.Location = [];
this.Location = this.model.LocList;
this.wlCode = this.Location[0];
} else {
this.Location = [];
let content = {
loginName: session.loginName,
sendSpot: null,
factoryCode: session.factoryCode,
workArea: session.workareaCode,
};
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
res.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
this.wlCode = this.Location[0];
}
}
materialChoice(e: any) {
async materialChoice(e: any) {
this.model.blDetailList.forEach((item: any, index: any) => {
if (item.materialCode == e.pickerName.label) {
this.some = item;
this.someIndex = index;
}
});
await this.model.queryItemLoc({
workArea: session.workareaCode,
loginName: session.loginName,
sendSpot: null,
materialCode: this.some.materialCode,
factoryCode: session.factoryCode,
});
if (this.model.LocList.length != 0) {
this.Location = [];
this.Location = this.model.LocList;
this.wlCode = this.Location[0];
} else {
this.Location = [];
let content = {
loginName: session.loginName,
sendSpot: null,
factoryCode: session.factoryCode,
workArea: session.workareaCode,
};
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
res.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
this.wlCode = this.Location[0];
}
this.qty = '';
}
LocationChoice(e: any) {

@ -3,6 +3,11 @@
*/
import vm from '@/main';
export const headers = [
{
label: vm.$t('message.InventoryOrderNo'),
key: 'prdOrder', //单号
width: 220,
},
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode', //物料号

@ -17,6 +17,7 @@ export class FeedingModule extends VuexModule {
*/
blDetailList: any[] = [];
detailedList: any;
LocList: any = [];
/**
*
@ -81,7 +82,21 @@ export class FeedingModule extends VuexModule {
}
});
}
@MutationAction
async queryItemLoc(params: any = {}) {
const res: any = await http.post(url.sortscan.save.queryWlByMat, params);
const LocList = [];
res.forEach((item: any) => {
const arr: any = {
label: item.locationCode,
value: item.locationCode + '(' + item.sendSpot + ')',
};
LocList.push(arr);
});
console.log('res', res);
console.log('LocList', LocList);
return { LocList };
}
/**
*
*/

Loading…
Cancel
Save