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

master
guoshuang 3 years ago
parent cc446d1aa8
commit 632e2159ca

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

@ -547,5 +547,7 @@ export default {
SPDR: 'Spare Part DN Receive', SPDR: 'Spare Part DN Receive',
Nodefectname: 'No defect name', Nodefectname: 'No defect name',
Nozonename: 'No zone 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 Получение', SPDR: 'Запасные части DN Получение',
Nodefectname: 'Имя дефекта отсутствует', Nodefectname: 'Имя дефекта отсутствует',
Nozonename: 'Нет названия региона', Nozonename: 'Нет названия региона',
isdeffrent: 'Материал кода контейнера отличается от выбранного материала.',
Notcompleted: 'Материалы пока не получены',
}, },
}; };

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

@ -212,6 +212,17 @@ export default class Aggregating extends BasePage {
async onLoad() { async onLoad() {
this.getLoc(); 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() { async getLoc() {
//debugger; //debugger;
await this.model.getSendSpotList1({ await this.model.getSendSpotList1({
@ -293,9 +304,12 @@ export default class Aggregating extends BasePage {
async onQuery() { async onQuery() {
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {
if (!valid) return; if (!valid) return;
await this.model.queryProOrder(Object.assign(this.formParams, { sendSpot: this.formone.aimWl.value })); await this.model.checkUserAndMrp({ mrpCodeRegion: this.form.mrpScope, loginName: session.loginName, factoryCode: session.factoryCode });
this.isFormChange = false; if (this.model.mrpcode == 1) {
this.model.isFormChange = this.formParams; 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 = []; locationList = [];
// mrp校验
mrpcode: any = '';
/** /**
* *
@ -323,6 +325,25 @@ export class AggregatingModule extends VuexModule {
const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content); const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
return res; 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); export default getModule(AggregatingModule);

@ -324,8 +324,25 @@ export default class RawReceiptDetail extends BasePage {
} }
} }
async onAggregate() { async onAggregate() {
await this.model.queryProOrder(this.model.formParams); try {
await this.model.queryProOrderResult(this.model.NEWparams); //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) { if (this.model.proOrderResultList.length == 0) {
this.disableflg = false; this.disableflg = false;
this.some = {}; this.some = {};

@ -310,8 +310,24 @@ export default class RawReceiptDetail extends BasePage {
} }
} }
async onAggregate() { async onAggregate() {
await this.model.queryProOrder(this.model.formParams); try {
await this.model.queryProOrderResult(this.model.NEWparams); 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 orderOutIdList = this.model.proOrderResultList.map((_: any) => _.orderOutId);
const params = { const params = {
factoryCode: session.factoryCode, factoryCode: session.factoryCode,

@ -172,14 +172,17 @@ export default class pickingDom extends BasePage {
} }
return params; return params;
} }
// async onLoad() { async onShow() {
// await this.getMRP(); await this.getMRP();
// } }
// async getMRP() { async getMRP() {
// let params = {}; let params = {
// await this.model.getMRP(params); factoryCode: session.factoryCode,
// this.form.mrpCodeRegion = model.mrpdata; loginName: session.loginName,
// } };
let res: any = await this.model.getMRP(params);
this.form.mrpCodeRegion = res.data;
}
// onReadyonLoad // onReadyonLoad
onReady() { onReady() {
this.$form.setRules(this.rules); this.$form.setRules(this.rules);
@ -241,12 +244,15 @@ export default class pickingDom extends BasePage {
onQuery() { onQuery() {
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {
if (!valid) return; if (!valid) return;
await this.model.queryProOrder(this.formParams); await this.model.checkUserAndMrp({ mrpCodeRegion: this.form.mrpCodeRegion, loginName: session.loginName, factoryCode: session.factoryCode });
this.model.checkAllProOrderList(true); if (this.model.mrpcode == 1) {
this.isFormChange = false; await this.model.queryProOrder(this.formParams);
model.mrpCodeRegion = this.form.mrpCodeRegion as any; this.model.checkAllProOrderList(true);
model.sapFactoryCode = this.form.sapFactoryCode as any; this.isFormChange = false;
model.formParams = this.formParams; 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: ''; sapFactoryCode: '';
formParams: ''; formParams: '';
code = ''; code = '';
//mrpdata: any; mrpdata: any;
orderOutIdList: any; orderOutIdList: any;
NEWparams: any; NEWparams: any;
LocList: any = []; LocList: any = [];
lockCode: any = ''; lockCode: any = '';
mrpcode: any = '';
/** /**
* *
@ -247,6 +248,16 @@ export class PickingModule extends VuexModule {
} }
return { proOrderList }; 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 @MutationAction
async queryOrder() { async queryOrder() {
const { list: proOrderList }: any = await http.post(url.sortscan.query.prdorder, this.formParams); const { list: proOrderList }: any = await http.post(url.sortscan.query.prdorder, this.formParams);
@ -407,14 +418,14 @@ export class PickingModule extends VuexModule {
return res; return res;
} }
//获取MRP //获取MRP
// @MutationAction @Action
// async getMRP(params: any = {}) { async getMRP(params: any = {}) {
// const res: any = await http.post(url.sortscan.save.order, params); const res = await http.post(url.sortscan.save.queryMrpByUser, params);
// const code = res.code; // const code = res.code;
// const mrpdata = res.data; // const mrpdata = res.data;
// console.log('code', code); // console.log('mrpdata', mrpdata);
// return { code, mrpdata }; return res;
// } }
} }
export default getModule(PickingModule); export default getModule(PickingModule);

@ -195,6 +195,17 @@ export default class Virtual extends BasePage {
async onLoad() { async onLoad() {
this.getLoc(); 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() { async getLoc() {
await this.model.getSendSpotList1({ await this.model.getSendSpotList1({
loginName: session.loginName, loginName: session.loginName,
@ -250,8 +261,11 @@ export default class Virtual 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(Object.assign(this.formParams, { sendSpot: this.formone.aimWl.value })); await this.model.checkUserAndMrp({ mrpCodeRegion: this.form.mrpScope, loginName: session.loginName, factoryCode: session.factoryCode });
this.isFormChange = false; if (this.model.mrpcode == 1) {
this.model.queryProOrder(Object.assign(this.formParams, { sendSpot: this.formone.aimWl.value }));
this.isFormChange = false;
}
}); });
} }
ondelete() { ondelete() {

@ -40,7 +40,8 @@ export class VirtualModule extends VuexModule {
* *
*/ */
proOrderList = []; 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[] }) { async uploadSummaryList(params: { sapFactoryCode: string; operatorPass: string; factoryCode: string; loginName: string; dataList: any[]; includeOrderOutIdList: string[] }) {
return await http.post(url.virtual.u.hzlist, params); 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); export default getModule(VirtualModule);

@ -151,7 +151,12 @@ export default class dnReceiptDom extends BasePage {
pickerName.sendSpot = item.sendSpot; pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName); 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[]> { async initLocation(condition): Promise<LocationDetail[]> {
@ -412,6 +417,31 @@ export default class dnReceiptDom extends BasePage {
this.customToast(this.$t('message.Commission_tips5') as any); this.customToast(this.$t('message.Commission_tips5') as any);
return null; 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); await this.model.submitOrderInEnter(this.DNReceivingList);
if (this.model.SubmitCode == '1') { if (this.model.SubmitCode == '1') {
const ServeUrl = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__')); const ServeUrl = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__'));

@ -166,7 +166,12 @@ export default class dnReceiptDom extends BasePage {
pickerName.sendSpot = item.sendSpot; pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName); 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[]> { async initLocation(condition): Promise<LocationDetail[]> {
@ -278,20 +283,21 @@ export default class dnReceiptDom extends BasePage {
// receiptAmount requestAmount // receiptAmount requestAmount
async materialChoice(e: any) { async materialChoice(e: any) {
this.receiptAmount = ''; this.receiptAmount = '';
this.Barcode = '';
// //
this.every = { ...e.pickerName }; this.every = { ...e.pickerName };
// //
console.log('this.every', this.every); console.log('this.every', this.every);
this.Location = []; //this.Location = [];
// //
this.Location = await this.initLocation(this.every); // this.Location = await this.initLocation(this.every);
if (this.Location.length == 0) { // if (this.Location.length == 0) {
await this.queryLoction(); // await this.queryLoction();
} // }
// //
this.LocationChoice({ // this.LocationChoice({
pickerName: this.Location.find(() => true), // pickerName: this.Location.find(() => true),
}); // });
this.DNReceivingList.forEach((item: any, index: any) => { this.DNReceivingList.forEach((item: any, index: any) => {
if (item.poNo == this.every.poNo && item.materialCode == this.every.materialCode && item.poLine == this.every.poLine) { if (item.poNo == this.every.poNo && item.materialCode == this.every.materialCode && item.poLine == this.every.poLine) {
this.everyIndex = index; this.everyIndex = index;
@ -362,6 +368,10 @@ export default class dnReceiptDom extends BasePage {
this.customToast(this.$t('message.Commission_tips4') as any); this.customToast(this.$t('message.Commission_tips4') as any);
return; return;
} }
if (this.Container.materialCode != this.every.materialCode) {
this.customToast(this.$t('message.isdeffrent') as any);
return;
}
let isTrue = true; let isTrue = true;
if (this.LocationList.length != 0) { if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => { this.LocationList.forEach((item: any) => {
@ -432,13 +442,13 @@ export default class dnReceiptDom extends BasePage {
// add table // add table
this.LocationList = []; this.LocationList = [];
// //
this.Location = []; // this.Location = [];
this.poNo = ''; this.poNo = '';
this.poList = []; this.poList = [];
// //
this.wl = { // this.wl = {
value: null, // value: null,
}; // };
// //
this.every = {}; this.every = {};
// //
@ -455,12 +465,12 @@ export default class dnReceiptDom extends BasePage {
this.Container = {}; this.Container = {};
this.Barcode = ''; this.Barcode = '';
this.LocationList = []; this.LocationList = [];
this.Location = []; //this.Location = [];
this.poNo = ''; this.poNo = '';
this.poList = []; this.poList = [];
this.wl = { // this.wl = {
value: null, // value: null,
}; // };
this.every = {}; this.every = {};
this.materialList = []; this.materialList = [];
this.receiptAmount = null; this.receiptAmount = null;
@ -476,11 +486,62 @@ export default class dnReceiptDom extends BasePage {
}, time); }, 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() { async onSubmit() {
if (this.LocationList.length === 0) { if (this.LocationList.length === 0) {
this.customToast(this.$t('message.Commission_tips5') as any); this.customToast(this.$t('message.Commission_tips5') as any);
return null; 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); await this.model.submitOrderInEnter(this.DNReceivingList);
if (this.model.SubmitCode == '1') { if (this.model.SubmitCode == '1') {
const ServeUrl = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__')); const ServeUrl = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__'));

@ -1,10 +1,10 @@
/* /*
* @Author: zhou lei * @Author: zhou lei
* @Date: 2021-12-24 12:02:31 * @Date: 2021-12-24 12:02:31
* @LastEditTime: 2021-12-24 14:33:54 * @LastEditTime: 2023-01-15 09:33:43
* @LastEditors: zhou lei * @LastEditors: zhou lei
* @Description: * @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 * :910592680@qq.com 18669792120
*/ */
/** /**
@ -104,4 +104,5 @@ export default interface LocationDetail {
productMix?: null; productMix?: null;
batchMix?: null; batchMix?: null;
ignoreId?: null; ignoreId?: null;
label?: string;
} }

@ -88,7 +88,12 @@ export default class dnReceiptDom extends BasePage {
pickerName.sendSpot = item.sendSpot; pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName); 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) { LocationChoice(e: any) {
this.wl = e.pickerName; this.wl = e.pickerName;

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

Loading…
Cancel
Save