cosmoim-852 fix 泰国拣配获取mrp,俄罗斯问题修改

master
guoshuang 3 years ago
parent cc446d1aa8
commit 632e2159ca

@ -548,5 +548,7 @@ export default {
SPDR: '备件DN收货',
Nodefectname: '没有缺陷名称',
Nozonename: '没有区域名称',
isdeffrent: '容器码的物料与选择的物料不相同',
Notcompleted: '物料没有收货完成',
},
};

@ -547,5 +547,7 @@ export default {
SPDR: 'Spare Part DN Receive',
Nodefectname: 'No defect name',
Nozonename: 'No zone name',
isdeffrent: 'The material with container code is different from the selected material',
Notcompleted: 'material has not been received',
},
};

@ -547,5 +547,7 @@ export default {
SPDR: 'Запасные части DN Получение',
Nodefectname: 'Имя дефекта отсутствует',
Nozonename: 'Нет названия региона',
isdeffrent: 'Материал кода контейнера отличается от выбранного материала.',
Notcompleted: 'Материалы пока не получены',
},
};

@ -171,9 +171,9 @@ export default class LoginPage extends BasePage {
console.log('......', server.serverAddress);
if (server.serverAddress.includes('https://eurmom.haier.net')) {
//
this.Version = '1.1.22';
this.Version = '1.1.23';
} else {
this.Version = '1.0.47';
this.Version = '1.0.48';
}
console.log('////', this.Version);
}

@ -212,6 +212,17 @@ export default class Aggregating extends BasePage {
async onLoad() {
this.getLoc();
}
async onShow() {
await this.getMRP();
}
async getMRP() {
let params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
};
let res: any = await this.model.getMRP(params);
this.form.mrpScope = res.data;
}
async getLoc() {
//debugger;
await this.model.getSendSpotList1({
@ -293,9 +304,12 @@ export default class Aggregating extends BasePage {
async onQuery() {
this.$form.validate(async (valid: boolean) => {
if (!valid) return;
await this.model.queryProOrder(Object.assign(this.formParams, { sendSpot: this.formone.aimWl.value }));
this.isFormChange = false;
this.model.isFormChange = this.formParams;
await this.model.checkUserAndMrp({ mrpCodeRegion: this.form.mrpScope, loginName: session.loginName, factoryCode: session.factoryCode });
if (this.model.mrpcode == 1) {
await this.model.queryProOrder(Object.assign(this.formParams, { sendSpot: this.formone.aimWl.value }));
this.isFormChange = false;
this.model.isFormChange = this.formParams;
}
});
}
}

@ -45,6 +45,8 @@ export class AggregatingModule extends VuexModule {
*
*/
locationList = [];
// mrp校验
mrpcode: any = '';
/**
*
@ -323,6 +325,25 @@ export class AggregatingModule extends VuexModule {
const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
return res;
}
//获取MRP
@Action
async getMRP(params: any = {}) {
const res = await http.post(url.sortscan.save.queryMrpByUser, params);
// const code = res.code;
// const mrpdata = res.data;
// console.log('mrpdata', mrpdata);
return res;
}
/**
* mrp
* @param params
*/
@MutationAction
async checkUserAndMrp(params: any) {
const res: any = await http.post(url.sortscan.save.checkUserAndMrp, params);
const mrpcode = res.code;
return { mrpcode };
}
}
export default getModule(AggregatingModule);

@ -324,8 +324,25 @@ export default class RawReceiptDetail extends BasePage {
}
}
async onAggregate() {
await this.model.queryProOrder(this.model.formParams);
await this.model.queryProOrderResult(this.model.NEWparams);
try {
//this.model.formParams
await this.model.queryProOrder(this.model.formParams);
} catch {
this.model.proOrderResultList.forEach((item, index) => {
if (parseFloat(item.amount) <= parseFloat(item.currentAmount) + parseFloat(item.totalMoAmount)) {
this.model.proOrderResultList.splice(index, 1);
}
});
}
try {
await this.model.queryProOrderResult(this.model.NEWparams);
} catch {
this.model.proOrderResultList.forEach((item, index) => {
if (parseFloat(item.amount) <= parseFloat(item.currentAmount) + parseFloat(item.totalMoAmount)) {
this.model.proOrderResultList.splice(index, 1);
}
});
}
if (this.model.proOrderResultList.length == 0) {
this.disableflg = false;
this.some = {};

@ -310,8 +310,24 @@ export default class RawReceiptDetail extends BasePage {
}
}
async onAggregate() {
await this.model.queryProOrder(this.model.formParams);
await this.model.queryProOrderResult(this.model.NEWparams);
try {
await this.model.queryProOrder(this.model.formParams);
} catch {
this.model.aggregateList.forEach((item, index) => {
if (parseFloat(item.amount) <= parseFloat(item.currentAmount) + parseFloat(item.totalMoAmount)) {
this.model.aggregateList.splice(index, 1);
}
});
}
try {
await this.model.queryProOrderResult(this.model.NEWparams);
} catch {
this.model.aggregateList.forEach((item, index) => {
if (parseFloat(item.amount) <= parseFloat(item.currentAmount) + parseFloat(item.totalMoAmount)) {
this.model.aggregateList.splice(index, 1);
}
});
}
const orderOutIdList = this.model.proOrderResultList.map((_: any) => _.orderOutId);
const params = {
factoryCode: session.factoryCode,

@ -172,14 +172,17 @@ export default class pickingDom extends BasePage {
}
return params;
}
// async onLoad() {
// await this.getMRP();
// }
// async getMRP() {
// let params = {};
// await this.model.getMRP(params);
// this.form.mrpCodeRegion = model.mrpdata;
// }
async onShow() {
await this.getMRP();
}
async getMRP() {
let params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
};
let res: any = await this.model.getMRP(params);
this.form.mrpCodeRegion = res.data;
}
// onReadyonLoad
onReady() {
this.$form.setRules(this.rules);
@ -241,12 +244,15 @@ export default class pickingDom extends BasePage {
onQuery() {
this.$form.validate(async (valid: boolean) => {
if (!valid) return;
await this.model.queryProOrder(this.formParams);
this.model.checkAllProOrderList(true);
this.isFormChange = false;
model.mrpCodeRegion = this.form.mrpCodeRegion as any;
model.sapFactoryCode = this.form.sapFactoryCode as any;
model.formParams = this.formParams;
await this.model.checkUserAndMrp({ mrpCodeRegion: this.form.mrpCodeRegion, loginName: session.loginName, factoryCode: session.factoryCode });
if (this.model.mrpcode == 1) {
await this.model.queryProOrder(this.formParams);
this.model.checkAllProOrderList(true);
this.isFormChange = false;
model.mrpCodeRegion = this.form.mrpCodeRegion as any;
model.sapFactoryCode = this.form.sapFactoryCode as any;
model.formParams = this.formParams;
}
});
}
}

@ -20,11 +20,12 @@ export class PickingModule extends VuexModule {
sapFactoryCode: '';
formParams: '';
code = '';
//mrpdata: any;
mrpdata: any;
orderOutIdList: any;
NEWparams: any;
LocList: any = [];
lockCode: any = '';
mrpcode: any = '';
/**
*
@ -247,6 +248,16 @@ export class PickingModule extends VuexModule {
}
return { proOrderList };
}
/**
* mrp
* @param params
*/
@MutationAction
async checkUserAndMrp(params: any) {
const res: any = await http.post(url.sortscan.save.checkUserAndMrp, params);
const mrpcode = res.code;
return { mrpcode };
}
@MutationAction
async queryOrder() {
const { list: proOrderList }: any = await http.post(url.sortscan.query.prdorder, this.formParams);
@ -407,14 +418,14 @@ export class PickingModule extends VuexModule {
return res;
}
//获取MRP
// @MutationAction
// async getMRP(params: any = {}) {
// const res: any = await http.post(url.sortscan.save.order, params);
// const code = res.code;
// const mrpdata = res.data;
// console.log('code', code);
// return { code, mrpdata };
// }
@Action
async getMRP(params: any = {}) {
const res = await http.post(url.sortscan.save.queryMrpByUser, params);
// const code = res.code;
// const mrpdata = res.data;
// console.log('mrpdata', mrpdata);
return res;
}
}
export default getModule(PickingModule);

@ -195,6 +195,17 @@ export default class Virtual extends BasePage {
async onLoad() {
this.getLoc();
}
async onShow() {
await this.getMRP();
}
async getMRP() {
let params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
};
let res: any = await this.model.getMRP(params);
this.form.mrpScope = res.data;
}
async getLoc() {
await this.model.getSendSpotList1({
loginName: session.loginName,
@ -250,8 +261,11 @@ export default class Virtual extends BasePage {
onQuery() {
this.$form.validate(async (valid: boolean) => {
if (!valid) return;
this.model.queryProOrder(Object.assign(this.formParams, { sendSpot: this.formone.aimWl.value }));
this.isFormChange = false;
await this.model.checkUserAndMrp({ mrpCodeRegion: this.form.mrpScope, loginName: session.loginName, factoryCode: session.factoryCode });
if (this.model.mrpcode == 1) {
this.model.queryProOrder(Object.assign(this.formParams, { sendSpot: this.formone.aimWl.value }));
this.isFormChange = false;
}
});
}
ondelete() {

@ -40,7 +40,8 @@ export class VirtualModule extends VuexModule {
*
*/
proOrderList = [];
//mrp校验
mrpcode: any = '';
/**
*
*/
@ -179,6 +180,25 @@ export class VirtualModule extends VuexModule {
async uploadSummaryList(params: { sapFactoryCode: string; operatorPass: string; factoryCode: string; loginName: string; dataList: any[]; includeOrderOutIdList: string[] }) {
return await http.post(url.virtual.u.hzlist, params);
}
//获取MRP
@Action
async getMRP(params: any = {}) {
const res = await http.post(url.sortscan.save.queryMrpByUser, params);
// const code = res.code;
// const mrpdata = res.data;
// console.log('mrpdata', mrpdata);
return res;
}
/**
* mrp
* @param params
*/
@MutationAction
async checkUserAndMrp(params: any) {
const res: any = await http.post(url.sortscan.save.checkUserAndMrp, params);
const mrpcode = res.code;
return { mrpcode };
}
}
export default getModule(VirtualModule);

@ -151,7 +151,12 @@ export default class dnReceiptDom extends BasePage {
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
this.wl = this.Location[0];
this.Location.forEach((item, index) => {
if (item.label == '0011') {
this.wl = this.Location[index];
}
});
//this.wl = this.Location[0];
}
//
async initLocation(condition): Promise<LocationDetail[]> {
@ -412,6 +417,31 @@ export default class dnReceiptDom extends BasePage {
this.customToast(this.$t('message.Commission_tips5') as any);
return null;
}
let materialCodeListarr = [];
this.DNReceivingList.forEach((item) => {
if (parseFloat(item.receiptAmount) < parseFloat(item.requestAmount)) {
materialCodeListarr.push(item.materialCode);
}
});
if (materialCodeListarr.length != 0) {
let materialCodeListString = materialCodeListarr.toString();
//this.customToast((materialCodeListString + this.$t('message.Notcompleted')) as any);
this.uni.showModal({
content: (materialCodeListString + this.$t('message.Notcompleted')) as any,
showCancel: false,
success: (res) => {
if (res.confirm) {
//console.log('')
this.realysubmit();
} else if (res.cancel) {
//console.log('')
this.realysubmit();
}
},
});
}
}
async realysubmit() {
await this.model.submitOrderInEnter(this.DNReceivingList);
if (this.model.SubmitCode == '1') {
const ServeUrl = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__'));

@ -166,7 +166,12 @@ export default class dnReceiptDom extends BasePage {
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
this.wl = this.Location[0];
this.Location.forEach((item, index) => {
if (item.label == '0011') {
this.wl = this.Location[index];
}
});
//this.wl = this.Location[0];
}
//
async initLocation(condition): Promise<LocationDetail[]> {
@ -278,20 +283,21 @@ export default class dnReceiptDom extends BasePage {
// receiptAmount requestAmount
async materialChoice(e: any) {
this.receiptAmount = '';
this.Barcode = '';
//
this.every = { ...e.pickerName };
//
console.log('this.every', this.every);
this.Location = [];
//this.Location = [];
//
this.Location = await this.initLocation(this.every);
if (this.Location.length == 0) {
await this.queryLoction();
}
// this.Location = await this.initLocation(this.every);
// if (this.Location.length == 0) {
// await this.queryLoction();
// }
//
this.LocationChoice({
pickerName: this.Location.find(() => true),
});
// this.LocationChoice({
// pickerName: this.Location.find(() => true),
// });
this.DNReceivingList.forEach((item: any, index: any) => {
if (item.poNo == this.every.poNo && item.materialCode == this.every.materialCode && item.poLine == this.every.poLine) {
this.everyIndex = index;
@ -362,6 +368,10 @@ export default class dnReceiptDom extends BasePage {
this.customToast(this.$t('message.Commission_tips4') as any);
return;
}
if (this.Container.materialCode != this.every.materialCode) {
this.customToast(this.$t('message.isdeffrent') as any);
return;
}
let isTrue = true;
if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => {
@ -432,13 +442,13 @@ export default class dnReceiptDom extends BasePage {
// add table
this.LocationList = [];
//
this.Location = [];
// this.Location = [];
this.poNo = '';
this.poList = [];
//
this.wl = {
value: null,
};
// this.wl = {
// value: null,
// };
//
this.every = {};
//
@ -455,12 +465,12 @@ export default class dnReceiptDom extends BasePage {
this.Container = {};
this.Barcode = '';
this.LocationList = [];
this.Location = [];
//this.Location = [];
this.poNo = '';
this.poList = [];
this.wl = {
value: null,
};
// this.wl = {
// value: null,
// };
this.every = {};
this.materialList = [];
this.receiptAmount = null;
@ -476,11 +486,62 @@ export default class dnReceiptDom extends BasePage {
}, time);
};
}
// checknumber(arr: any = {}) {
// var map = {},
// dest = [];
// for (var i = 0; i < arr.length; i++) {
// var ai = arr[i];
// if (!map[ai.id]) {
// dest.push({
// id: ai.id,
// name: ai.name,
// value: ai.value,
// });
// map[ai.id] = ai;
// } else {
// for (var j = 0; j < dest.length; j++) {
// var dj = dest[j];
// if (dj.id == ai.id) {
// dj.value = (parseFloat(dj.value) + parseFloat(ai.value)).toString();
// break;
// }
// }
// }
// }
// console.log(dest);
// }
async onSubmit() {
if (this.LocationList.length === 0) {
this.customToast(this.$t('message.Commission_tips5') as any);
return null;
}
//this.checknumber(this.LocationList);
let materialCodeListarr = [];
this.DNReceivingList.forEach((item) => {
if (parseFloat(item.receiptAmount) < parseFloat(item.requestAmount)) {
materialCodeListarr.push(item.materialCode);
}
});
if (materialCodeListarr.length != 0) {
let materialCodeListString = materialCodeListarr.toString();
//this.customToast((materialCodeListString + this.$t('message.Notcompleted')) as any);
this.uni.showModal({
content: (materialCodeListString + this.$t('message.Notcompleted')) as any,
showCancel: false,
success: (res) => {
if (res.confirm) {
//console.log('')
this.realysubmit();
} else if (res.cancel) {
//console.log('')
this.realysubmit();
}
},
});
}
}
async realysubmit() {
//console.log('');
await this.model.submitOrderInEnter(this.DNReceivingList);
if (this.model.SubmitCode == '1') {
const ServeUrl = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__'));

@ -1,10 +1,10 @@
/*
* @Author: zhou lei
* @Date: 2021-12-24 12:02:31
* @LastEditTime: 2021-12-24 14:33:54
* @LastEditTime: 2023-01-15 09:33:43
* @LastEditors: zhou lei
* @Description:
* @FilePath: /wms_haiwai_app/src/pages/raw/ingoods/dnReceipt/model.location.ts
* @FilePath: \hgwms-factory-app\src\pages\raw\ingoods\RUS-dnReceipt\model.location.ts
* :910592680@qq.com 18669792120
*/
/**
@ -104,4 +104,5 @@ export default interface LocationDetail {
productMix?: null;
batchMix?: null;
ignoreId?: null;
label?: string;
}

@ -88,7 +88,12 @@ export default class dnReceiptDom extends BasePage {
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
this.wl = this.Location[0];
this.Location.forEach((item, index) => {
if (item.label == '0011') {
this.wl = this.Location[index];
}
});
//this.wl = this.Location[0];
}
LocationChoice(e: any) {
this.wl = e.pickerName;

@ -207,6 +207,8 @@ export const url = {
queryWlByMat: '/wmspda/sortscan/queryWlByMat',
queryWlByMatBL: '/wmspda/sortscan/queryWlByMatBL',
queryVirtualOrderAmountBl: '/wmspda/bl/queryVirtualOrderAmountBl',
queryMrpByUser: '/wmspda/material/queryMrpByUser',
checkUserAndMrp: '/wmspda/material/checkUserAndMrp',
},
unlock: {
list: '/wmspda/sortscan/unlock/list',

Loading…
Cancel
Save