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

master
hou 3 years ago
parent d44f36fd2f
commit 4c05fba940

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

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

@ -27,7 +27,7 @@
</u-form-item>
<!-- 行项目 -->
<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-row gutter="0">
@ -185,7 +185,8 @@ export default class stoOutboundDom extends BasePage {
return;
}
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({
icon: 'success',
title: this.$t('message.successful') as any,
@ -200,19 +201,9 @@ export default class stoOutboundDom extends BasePage {
}
//
materialConfirm(v: any) {
console.log('v[0].value', v[0]);
// 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;
// }
// });
console.log('v[0].value', v);
this.model.materielList.forEach((item: any) => {
if (v[0].rowItem == item.rowItem) {
if (v[0].value == item.materialCode) {
console.log('item', item);
this.form.productCode = item.materialCode;
this.form.productDescZh = item.materialDesc;
@ -328,37 +319,16 @@ export default class stoOutboundDom extends BasePage {
// }
Posting() {}
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) => {
if (!valid) return;
if (parseInt(this.form.orderAmount) <= this.form.scanAmount) {
this.customToast(this.$t('message.product_Tip6') as string);
return;
}
//let selctlist: any = [];
//selectMaterielList
// this.selectMaterielList.forEach((item: any, index: any) => {
// // 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,
// };
// });
if(this.form.barCode == ''){
this.customToast(this.$t('message.barcode') as string);
return
}
const selctlist = {
barcode: this.form.barCode,
loginName: session.loginName,
@ -370,41 +340,52 @@ export default class stoOutboundDom extends BasePage {
orderType: 4,
productCode: this.form.productCode,
};
await this.model.confirmMove(selctlist);
// this.$form.resetFields();
// // this.form.barCode = '';
// this.selectMaterielList = [];
console.log('aaaaaaa', this.model);
if (this.model.code == '1') {
await this.model.confirmMove(selctlist).then(async () =>{
if (this.model.code == '1') {
this.materialList = [];
// this.model.materielList = [];
//this.$table.onCheckAllTap();
uni.showToast({ icon: 'success', title: 'success' });
}
if(this.model.code == '2'){
let params = {
barcode: this.form.barCode,
loginName: session.loginName,
keepBy: session.loginName,
factoryCode: session.factoryCode,
order3: this.form.orderNo,
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();
}
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
async findProdInfoByDN(nxOutCode: string) {
@ -171,8 +170,9 @@ export class ReturningModule extends VuexModule {
*/
@MutationAction
async confirmMove(list: any) {
const { code, data } = await http.post(url.outbound.stoOutbound.Bookkeeping, list);
console.log('res数据', data, code);
const res:any = await http.post(url.outbound.stoOutbound.Bookkeeping, list);
console.log('res数据', res);
const code = res.code
// if (code == '1') {
// uni.showToast({ icon: 'success', title: msg });
// } else {

@ -151,7 +151,7 @@ export default class RawReceiptDetail extends BasePage {
console.log('e>>>>>>>>>>>>>>>>>>>>>>>>', e);
this.wlCode = e.pickerName;
}
handleRow({ data }: any) {
async handleRow({ data }: any) {
console.log('data[0]', data[0]);
if (!this.model.proOrderResultList[data[0].index].sendSpot) {
uni.showModal({
@ -170,6 +170,16 @@ export default class RawReceiptDetail extends BasePage {
this.model.proOrderResultList[this.someIndex].currentAmount = 0;
this.LocationList = [];
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() {
if (this.qty == '' || this.wlCode == '') {

@ -159,23 +159,15 @@ export default class RawReceiptDetail extends BasePage {
this.model.aggregateList[this.someIndex].currentAmount = 0;
this.LocationList = [];
this.qty = '';
this.model.LocList.length = 0
await this.model.queryItemLoc({
workArea:session.workareaCode,
loginName:session.loginName,
sendSpot:null,
materialCode:this.some.materialCode,
factoryCode:this.some.factoryCode
factoryCode:session.factoryCode
})
this.Location = [];
this.model.LocList.forEach((item:any) =>{
let arr:any = {
label:item.locationCode,
value:item.locationCode + '(' + item.sendSpot + ')' + '(' + item.amount + ')',
sendSpot:item.sendSpot
}
this.Location.push(arr)
})
this.Location = this.model.LocList
console.log('this.Location',this.Location)
}
//

@ -337,9 +337,17 @@ export class PickingModule extends VuexModule {
}
@MutationAction
async queryItemLoc(params:any = {}) {
const res: any = await http.post(url.sortscan.save.order, params);
const LocList = res.data
console.log('list',LocList)
const res: any = await http.post(url.sortscan.save.queryWlByMat, params);
const 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 };
}
/**

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

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

Loading…
Cancel
Save