拣配推荐库位 发货退扫功能

master
hou 3 years ago
parent d44f36fd2f
commit 4c05fba940

@ -21,6 +21,7 @@ export default {
request_Tip9: '服务不可用', request_Tip9: '服务不可用',
request_Tip10: '网关超时', request_Tip10: '网关超时',
request_Tip11: 'HTTP版本不受支持', request_Tip11: 'HTTP版本不受支持',
sweep:'是否退扫',
success: '操作成功', success: '操作成功',
error: '操作失败', error: '操作失败',
operation: '操作', operation: '操作',

@ -40,6 +40,7 @@ export default {
Tip2: 'Update succeeded. Are you sure to restart?', Tip2: 'Update succeeded. Are you sure to restart?',
//服务器设置 //服务器设置
ServerSetting: 'Server Setting', ServerSetting: 'Server Setting',
sweep:'Whether to back sweep',
PleaseInputIPAddress: 'Please input IP address', PleaseInputIPAddress: 'Please input IP address',
PleaseInputPortNumber: 'Please input port No', PleaseInputPortNumber: 'Please input port No',
Save: 'Save', Save: 'Save',

@ -27,7 +27,7 @@
</u-form-item> </u-form-item>
<!-- 行项目 --> <!-- 行项目 -->
<u-form-item :label="$t('message.Line')"> <u-form-item :label="$t('message.Line')">
<u-input :disabled="true" v-model="form.rowItem" placeholder="" /> <u-input :disabled="true" v-model="form.row" placeholder="" />
</u-form-item> </u-form-item>
<!-- 物料总数 --> <!-- 物料总数 -->
<u-row gutter="0"> <u-row gutter="0">
@ -185,7 +185,8 @@ export default class stoOutboundDom extends BasePage {
return; return;
} }
await this.model.findProdInfoByDN(this.form.orderNo); await this.model.findProdInfoByDN(this.form.orderNo);
if (model.DNcode == '1') { console.log('model.DNcode',this.model.DNcode)
if (this.model.DNcode == '1') {
uni.showToast({ uni.showToast({
icon: 'success', icon: 'success',
title: this.$t('message.successful') as any, title: this.$t('message.successful') as any,
@ -200,19 +201,9 @@ export default class stoOutboundDom extends BasePage {
} }
// //
materialConfirm(v: any) { materialConfirm(v: any) {
console.log('v[0].value', v[0]); console.log('v[0].value', v);
// this.form.productCode = v[0].value;
// this.model.materielList.forEach((item: any) => {
// if (v[0].value == item.stoItem) {
// this.form.productCode = item.materialCode;
// this.form.productDescZh = item.materialDesc;
// this.form.orderAmount = item.orderAmount;
// this.form.scanAmount = item.scanAmount;
// return;
// }
// });
this.model.materielList.forEach((item: any) => { this.model.materielList.forEach((item: any) => {
if (v[0].rowItem == item.rowItem) { if (v[0].value == item.materialCode) {
console.log('item', item); console.log('item', item);
this.form.productCode = item.materialCode; this.form.productCode = item.materialCode;
this.form.productDescZh = item.materialDesc; this.form.productDescZh = item.materialDesc;
@ -328,37 +319,16 @@ export default class stoOutboundDom extends BasePage {
// } // }
Posting() {} Posting() {}
onOk() { onOk() {
// if (this.selectMaterielList.length == 0) {
// uni.showToast({ icon: 'none', title: this.$t('message.product_Tip2') as string });
// } else {
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {
if (!valid) return; if (!valid) return;
if (parseInt(this.form.orderAmount) <= this.form.scanAmount) { if (parseInt(this.form.orderAmount) <= this.form.scanAmount) {
this.customToast(this.$t('message.product_Tip6') as string); this.customToast(this.$t('message.product_Tip6') as string);
return; return;
} }
//let selctlist: any = []; if(this.form.barCode == ''){
//selectMaterielList this.customToast(this.$t('message.barcode') as string);
// this.selectMaterielList.forEach((item: any, index: any) => { return
// // item.originWl = item.locCode; }
// selctlist[index] = {
// barCode: item.barcode,
// keepBy: session.loginName,
// loginName: session.loginName,
// //
// order3: this.form.orderNo,
// orderType: 4,
// type: 0,
// productCode: item.productCode,
// productDescZh: item.productDescZh,
// orderItem: this.form.rowItem,
// originWl: item.locCode,
// dockCode: item.dockCode,
// dockName: item.dockName,
// whCode: item.whCode,
// regionCode: item.regionCode,
// };
// });
const selctlist = { const selctlist = {
barcode: this.form.barCode, barcode: this.form.barCode,
loginName: session.loginName, loginName: session.loginName,
@ -370,41 +340,52 @@ export default class stoOutboundDom extends BasePage {
orderType: 4, orderType: 4,
productCode: this.form.productCode, productCode: this.form.productCode,
}; };
await this.model.confirmMove(selctlist); await this.model.confirmMove(selctlist).then(async () =>{
// this.$form.resetFields(); if (this.model.code == '1') {
// // this.form.barCode = '';
// this.selectMaterielList = [];
console.log('aaaaaaa', this.model);
if (this.model.code == '1') {
this.materialList = []; this.materialList = [];
// this.model.materielList = [];
//this.$table.onCheckAllTap();
uni.showToast({ icon: 'success', title: 'success' }); uni.showToast({ icon: 'success', title: 'success' });
} this.form.barCode = '';
if(this.model.code == '2'){ this.form.productCode = '';
let params = { model.orderInInfo.stoAmount = 0;
barcode: this.form.barCode, this.form.scanAmount = 0;
loginName: session.loginName, this.form.orderAmount = '';
keepBy: session.loginName, this.form.productDescZh = '';
factoryCode: session.factoryCode, this.selectMaterielList = [];
order3: this.form.orderNo, this.form.rowItem = '';
this.query();
} }
await this.model.delCode(params) if(this.model.code == '2'){
uni.showModal({
content:this.$t('message.sweep') as any,
cancelText:this.$t('message.Cancel') as any,
confirmText:this.$t('message.workArea_Confirm') as any,
success:async (res) =>{
if(res.confirm){
let params = {
barcode: this.form.barCode,
loginName: session.loginName,
keepBy: session.loginName,
factoryCode: session.factoryCode,
order3: this.form.orderNo,
}
await this.model.delCode(params)
this.form.barCode = '';
this.form.productCode = '';
model.orderInInfo.stoAmount = 0;
this.form.scanAmount = 0;
this.form.orderAmount = '';
this.form.productDescZh = '';
this.selectMaterielList = [];
this.form.rowItem = '';
this.query();
} else if(res.cancel){
this.form.barCode = '';
}
}
})
} }
});
}); });
// this.form.orderNo = '';
this.form.barCode = '';
this.form.productCode = '';
model.orderInInfo.stoAmount = 0;
// this.form.orderNo = null;
this.form.scanAmount = 0;
this.form.orderAmount = '';
this.form.productDescZh = '';
this.selectMaterielList = [];
this.form.rowItem = '';
//this.$table.onEmpty();
//debugger;
this.query();
} }
// } // }
} }

@ -86,7 +86,6 @@ export class ReturningModule extends VuexModule {
} }
/** /**
* *
* @param nxOutCode
*/ */
@MutationAction @MutationAction
async findProdInfoByDN(nxOutCode: string) { async findProdInfoByDN(nxOutCode: string) {
@ -171,8 +170,9 @@ export class ReturningModule extends VuexModule {
*/ */
@MutationAction @MutationAction
async confirmMove(list: any) { async confirmMove(list: any) {
const { code, data } = await http.post(url.outbound.stoOutbound.Bookkeeping, list); const res:any = await http.post(url.outbound.stoOutbound.Bookkeeping, list);
console.log('res数据', data, code); console.log('res数据', res);
const code = res.code
// if (code == '1') { // if (code == '1') {
// uni.showToast({ icon: 'success', title: msg }); // uni.showToast({ icon: 'success', title: msg });
// } else { // } else {

@ -151,7 +151,7 @@ export default class RawReceiptDetail extends BasePage {
console.log('e>>>>>>>>>>>>>>>>>>>>>>>>', e); console.log('e>>>>>>>>>>>>>>>>>>>>>>>>', e);
this.wlCode = e.pickerName; this.wlCode = e.pickerName;
} }
handleRow({ data }: any) { async handleRow({ data }: any) {
console.log('data[0]', data[0]); console.log('data[0]', data[0]);
if (!this.model.proOrderResultList[data[0].index].sendSpot) { if (!this.model.proOrderResultList[data[0].index].sendSpot) {
uni.showModal({ uni.showModal({
@ -170,6 +170,16 @@ export default class RawReceiptDetail extends BasePage {
this.model.proOrderResultList[this.someIndex].currentAmount = 0; this.model.proOrderResultList[this.someIndex].currentAmount = 0;
this.LocationList = []; this.LocationList = [];
this.qty = ''; this.qty = '';
await this.model.queryItemLoc({
workArea:session.workareaCode,
loginName:session.loginName,
sendSpot:null,
materialCode:this.some.materialCode,
factoryCode:session.factoryCode
})
this.Location = [];
this.Location = this.model.LocList
console.log('this.Location',this.Location)
} }
Add() { Add() {
if (this.qty == '' || this.wlCode == '') { if (this.qty == '' || this.wlCode == '') {

@ -159,23 +159,15 @@ 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({ await this.model.queryItemLoc({
workArea:session.workareaCode, workArea:session.workareaCode,
loginName:session.loginName, loginName:session.loginName,
sendSpot:null, sendSpot:null,
materialCode:this.some.materialCode, materialCode:this.some.materialCode,
factoryCode:this.some.factoryCode factoryCode:session.factoryCode
}) })
this.Location = []; this.Location = [];
this.model.LocList.forEach((item:any) =>{ this.Location = this.model.LocList
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) console.log('this.Location',this.Location)
} }
// //

@ -337,9 +337,17 @@ export class PickingModule extends VuexModule {
} }
@MutationAction @MutationAction
async queryItemLoc(params:any = {}) { async queryItemLoc(params:any = {}) {
const res: any = await http.post(url.sortscan.save.order, params); const res: any = await http.post(url.sortscan.save.queryWlByMat, params);
const LocList = res.data const LocList = []
console.log('list',LocList) res.forEach((item:any) =>{
let arr:any = {
label:item.locationCode,
value:item.locationCode + '(' + item.sendSpot + ')' + '(' + item.amount + ')'
}
LocList.push(arr)
})
console.log('res',res)
console.log('LocList',LocList)
return { LocList }; return { LocList };
} }
/** /**

@ -77,6 +77,8 @@ http.interceptors.response.use(
case '1': case '1':
// code === '1' 代表没有错误 // code === '1' 代表没有错误
return dataAxios; return dataAxios;
case '2':
return dataAxios;
case 401: case 401:
// [ 示例 ] 其它和后台约定的 code // [ 示例 ] 其它和后台约定的 code
store.dispatch('session/logout'); store.dispatch('session/logout');

@ -164,6 +164,7 @@ export const url = {
save: { save: {
aggregate: '/wmspda/sortscan/save/aggregate', aggregate: '/wmspda/sortscan/save/aggregate',
order: '/wmspda/sortscan/save/order', order: '/wmspda/sortscan/save/order',
queryWlByMat:'/wmspda/sortscan/queryWlByMat',
}, },
unlock: { unlock: {
list: '/wmspda/sortscan/unlock/list', list: '/wmspda/sortscan/unlock/list',

Loading…
Cancel
Save