委外出库优化 原材料交接表格展示修改

master
guoshuang 4 years ago
parent 7e20f0017d
commit ab259a7a14

@ -184,7 +184,7 @@ export default class dnReceiptDom extends BasePage {
// //
wlCode: any = ""; wlCode: any = "";
// //
async onShow() { async onReady() {
// //
let means: any = JSON.parse( let means: any = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
@ -200,7 +200,7 @@ export default class dnReceiptDom extends BasePage {
console.log("res res",res[0]); console.log("res res",res[0]);
// undefined // undefined
//guoshuang undefiend //guoshuang undefiend
res[0].forEach((item: any) => { res.forEach((item: any) => {
let pickerName: any = {}; let pickerName: any = {};
pickerName.label = item.locationCode; pickerName.label = item.locationCode;
pickerName.value = item.locationCode + "(" + item.sendSpot + ")"; pickerName.value = item.locationCode + "(" + item.sendSpot + ")";
@ -218,6 +218,7 @@ export default class dnReceiptDom extends BasePage {
}); });
return; return;
} }
this.materialList = [];
let res = await this.model.queryOutsourcing(this.form.documentNo); let res = await this.model.queryOutsourcing(this.form.documentNo);
this.material = res.data; this.material = res.data;
this.material.forEach((item: any) => { this.material.forEach((item: any) => {

@ -184,7 +184,7 @@ export default class dnReceiptDom extends BasePage {
// //
wlCode: any = ""; wlCode: any = "";
// //
async onShow() { async onReady() {
// //
let means: any = JSON.parse( let means: any = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
@ -199,7 +199,7 @@ export default class dnReceiptDom extends BasePage {
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content); let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
//undefinedres[[],[]],arry //undefinedres[[],[]],arry
//guoshuang undefined //guoshuang undefined
res[0].forEach((item: any) => { res.forEach((item: any) => {
let pickerName: any = {}; let pickerName: any = {};
pickerName.label = item.locationCode; pickerName.label = item.locationCode;
pickerName.value = item.locationCode + "(" + item.sendSpot + ")"; pickerName.value = item.locationCode + "(" + item.sendSpot + ")";
@ -216,6 +216,7 @@ export default class dnReceiptDom extends BasePage {
}); });
return; return;
} }
this.materialList = [];
let res = await this.model.queryOutsourcing(this.form.documentNo); let res = await this.model.queryOutsourcing(this.form.documentNo);
this.material = res.data; this.material = res.data;
this.material.forEach((item: any) => { this.material.forEach((item: any) => {

@ -8,6 +8,21 @@ export const headers = [
key: 'prdOrder', key: 'prdOrder',
width: 550, width: 550,
}, },
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount', //需求数量
width: 550,
},
{
label: vm.$t('message.Pi_materielNo'),
key: 'materialCode', //物料号
width: 550,
},
{
label: vm.$t('message.CommissionedMaterielDesc'),
key: 'materialDesc', //物料描述
width: 550,
},
]; ];
/** /**
@ -76,10 +91,10 @@ export const summaryHeaders = [
label: vm.$t('message.Summary_QuantityOfThisHandover'), label: vm.$t('message.Summary_QuantityOfThisHandover'),
key: 'hvAmount', key: 'hvAmount',
}, },
{ // {
label: vm.$t('message.po_DemandQuantity'), // label: vm.$t('message.po_DemandQuantity'),
key: 'amount', // key: 'amount',
}, // },
{ {
label: vm.$t('message.Pi_CumulativePickingQuantity'), label: vm.$t('message.Pi_CumulativePickingQuantity'),
key: 'totalMoAmount', key: 'totalMoAmount',
@ -129,10 +144,10 @@ export const orderHeaders = [
label: vm.$t('message.Summary_QuantityOfThisHandover'), label: vm.$t('message.Summary_QuantityOfThisHandover'),
key: 'hvAmount', key: 'hvAmount',
}, },
{ // {
label: vm.$t('message.po_DemandQuantity'), // label: vm.$t('message.po_DemandQuantity'),
key: 'amount', // key: 'amount',
}, // },
{ {
label: vm.$t('message.Pi_CumulativePickingQuantity'), label: vm.$t('message.Pi_CumulativePickingQuantity'),
key: 'totalMoAmount', key: 'totalMoAmount',

@ -275,7 +275,8 @@ export default class Aggregating extends BasePage {
onQuery() { onQuery() {
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {
if (!valid) return; if (!valid) return;
this.model.queryProOrder(this.formParams); await this.model.queryProOrder(this.formParams);
this.model.checkAllProOrderList(true);
this.isFormChange = false; this.isFormChange = false;
this.model.isFormChange = this.formParams; this.model.isFormChange = this.formParams;
}); });

@ -157,7 +157,17 @@ export class AggregatingModule extends VuexModule {
get isOrderCheckedAll() { get isOrderCheckedAll() {
return !this.orderList.filter((_: any) => !_.checked).length; return !this.orderList.filter((_: any) => !_.checked).length;
} }
/**
* /
* @param checked
*/
@Mutation
checkAllProOrderList(checked: boolean) {
this.proOrderList = this.proOrderList.map((item: any) => ({
...item,
checked,
}));
}
/** /**
* / * /
* @param checked * @param checked
@ -176,9 +186,9 @@ export class AggregatingModule extends VuexModule {
*/ */
@MutationAction @MutationAction
async queryProOrder(params: any) { async queryProOrder(params: any) {
const { values }: any = await http.post(url.sumscan.query.orderno, params); const { list: proOrderList }: any = await http.post(url.sumscan.query.orderno, params);
const proOrderList = values.map((v: string) => ({ prdOrder: v })); //const proOrderList = values.map((v: string) => ({ prdOrder: v }));
proOrderList.forEach((_: any) => (_.checked = true)); //proOrderList.forEach((_: any) => (_.checked = true));
if (!proOrderList.length) { if (!proOrderList.length) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',

Loading…
Cancel
Save