cosmoim-852 fix 补料新增解锁功能&&成品出库功能优化

master
hou 3 years ago
parent 14fb8b7104
commit f1a0420cc7

@ -85,31 +85,11 @@ import { session } from '@/store/modules/session';
import { headers } from './config';
@Component
export default class stoOutboundDom extends BasePage {
/**
* 表单引用
*/
@Ref('form') readonly $form!: VForm;
/**
* 表格引用
*/
@Ref('table') readonly $table: any;
/**
* 页面Module
*/
model = model;
/**
* search焦点获取
*/
firstFocus = false;
/**
* 表头
*/
headers = headers;
/**
* 表单数据
*/
form = {
dockCode: null, // code
dockName: null, // name
@ -123,6 +103,7 @@ export default class stoOutboundDom extends BasePage {
row: '',
barCode: '',
};
rowItemIndex: any = null;
materialList: any = []; //
//
selectMaterielList: any = [];
@ -193,12 +174,38 @@ export default class stoOutboundDom extends BasePage {
duration: 2000,
image: '/static/icons/icon-51.png',
});
this.form.productCode = this.model.materielList[0].materialCode;
this.form.productDescZh = this.model.materielList[0].materialDesc;
this.form.rowItem = this.model.materielList[0].materialCode;
this.form.row = this.model.materielList[0].rowItem;
this.form.orderAmount = this.model.materielList[0].orderAmount;
this.form.scanAmount = parseFloat(this.model.materielList[0].outAmount);
if (this.rowItemIndex == null) {
this.form.productCode = this.model.materielList[0].materialCode;
this.form.productDescZh = this.model.materielList[0].materialDesc;
this.form.rowItem = this.model.materielList[0].materialCode;
this.form.row = this.model.materielList[0].rowItem;
this.form.orderAmount = this.model.materielList[0].orderAmount;
this.form.scanAmount = parseFloat(this.model.materielList[0].outAmount);
this.rowItemIndex = this.model.materielList[0].rowItem;
} else {
let rowIndex: any = null;
this.model.materielList.forEach((item: any, index) => {
if (item.rowItem == this.rowItemIndex) {
rowIndex == index;
}
});
if (rowIndex == null) {
this.form.productCode = this.model.materielList[0].materialCode;
this.form.productDescZh = this.model.materielList[0].materialDesc;
this.form.rowItem = this.model.materielList[0].materialCode;
this.form.row = this.model.materielList[0].rowItem;
this.form.orderAmount = this.model.materielList[0].orderAmount;
this.form.scanAmount = parseFloat(this.model.materielList[0].outAmount);
this.rowItemIndex = this.model.materielList[0].rowItem;
} else {
this.form.productCode = this.model.materielList[rowIndex].materialCode;
this.form.productDescZh = this.model.materielList[rowIndex].materialDesc;
this.form.rowItem = this.model.materielList[rowIndex].materialCode;
this.form.row = this.model.materielList[rowIndex].rowItem;
this.form.orderAmount = this.model.materielList[rowIndex].orderAmount;
this.form.scanAmount = parseFloat(this.model.materielList[rowIndex].outAmount);
}
}
}
}
//
@ -211,6 +218,7 @@ export default class stoOutboundDom extends BasePage {
this.form.productDescZh = item.materialDesc;
this.form.rowItem = item.materialCode;
this.form.row = item.rowItem;
this.rowItemIndex = item.rowItem;
this.form.orderAmount = item.orderAmount;
this.form.scanAmount = parseFloat(item.outAmount);
return;
@ -277,6 +285,7 @@ export default class stoOutboundDom extends BasePage {
this.form.rowItem = '';
this.form.row = '';
this.form.barCode = '';
this.rowItemIndex = null;
this.model.empty();
}
onOk() {

@ -3,7 +3,7 @@
<view class="top"></view>
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
<u-icon class="icon" name="arrow-left" @click="back" />
</view>
<view class="title">{{ $t('message.FillingMaterials') }}</view>
<view class="right"></view>
@ -165,6 +165,7 @@ export default class RawReceiptDetail extends BasePage {
amount: [{ required: true, message: this.$t('message.Pi_tip1') as string }],
};
detailHeader = detailHeader;
sapSupplyIdList: any = [];
empty() {
this.some = {};
this.someIndex = 0;
@ -183,10 +184,23 @@ export default class RawReceiptDetail extends BasePage {
this.model.blDetailList.length = 0;
this.LocationList = [];
}
async back() {
if (this.sapSupplyIdList.length != 0) {
await this.lock();
}
uni.navigateBack({ delta: 1 });
}
async lock() {
await this.model.lock(this.sapSupplyIdList);
}
async query() {
if (this.form.documentNo == '') {
this.customToast(this.$t('message.Commission_tips1') as string);
}
if (this.sapSupplyIdList.length != 0) {
await this.lock();
this.sapSupplyIdList = [];
}
this.LocEmpty();
this.wlCode = this.Location[0];
let inPrdOrderList = this.form.documentNo.split(',');
@ -202,7 +216,9 @@ export default class RawReceiptDetail extends BasePage {
};
this.materialList.push(arr);
item.wlList = [];
this.sapSupplyIdList.push(item.sapSupplyId);
});
console.log('this.sapSupplyIdList', this.sapSupplyIdList);
this.some = this.model.blDetailList[0];
this.someIndex = 0;
});
@ -435,6 +451,7 @@ export default class RawReceiptDetail extends BasePage {
await this.model.saveBlDetailUpload(params).then(() => {
this.qty = '';
this.LocationList = [];
this.sapSupplyIdList = [];
this.query();
});
}

@ -196,6 +196,17 @@ export class FeedingModule extends VuexModule {
const submitListCode = res.code;
return { submitListCode };
}
//补料解锁
@MutationAction
async lock(sapSupplyIdList: any) {
const res: any = await http.post(url.auth.query.lock, {
factoryCode: session.factoryCode,
loginName: session.loginName,
sapSupplyIdList,
});
console.log(res);
return {};
}
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async queryByFactoryCodeAndWorkAreaCode(content: any) {
const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);

@ -27,6 +27,7 @@ export const url = {
location1: '/wmspda/material/orderin/receiveloc',
queryAppendDetail: '/wmspda/bl/queryAppendDetail',
createAppendList: '/wmspda/bl/createAppendList',
lock: '/wmspda/bl/unlock',
},
systime: '/wmspda/auth/systime',
userInfo: '/wmspda/auth/userinfo',

Loading…
Cancel
Save