修改质量管理页面

master
LAPTOP-R6EHHS26\86155 1 year ago
parent c5c2de7846
commit 57b8231110

@ -97,6 +97,11 @@
</u-radio-group> </u-radio-group>
</div> </div>
</div> </div>
<div class="item1" style="color: #000">
<!-- <div class="item1">检查结果: {{ item.itemMethod }}</div> -->
<jPicker style="border: 1px solid #ffffff; color: #000" :moren="moren3" @bindpicker="selectProductlocCode2(index, $event)" showKey="label" valKey="value" :val="item.defectCode" :options="model.selectList" />
<u-input placeholder="请输入不合格数量" style="background: #fafafa; border: 1px dashed #e2e2e2; margin-top: 10px" :border="true" v-model="item.defectQuality" type="number" :focus="isfocus" />
</div>
<div class="item1 item2" v-if="item.propertyCode == '1'"> <div class="item1 item2" v-if="item.propertyCode == '1'">
<div class="input-box" id="input-box1"> <div class="input-box" id="input-box1">
实际值: 实际值:
@ -209,6 +214,7 @@ export default class PurchaseWHSRM extends BasePage {
model = model; model = model;
moren = '请选择检验节点'; moren = '请选择检验节点';
moren2 = '请选择批次号'; moren2 = '请选择批次号';
moren3 = '请选择不良分类';
list: any = []; list: any = [];
show = false; show = false;
showselect = false; showselect = false;
@ -229,6 +235,7 @@ export default class PurchaseWHSRM extends BasePage {
}, },
]; ];
selectList: any = {}; selectList: any = {};
defectCodeList: any = {};
// remove: any = {}; // remove: any = {};
// async onReady() { // async onReady() {
// await this.model.queryLocation(); // await this.model.queryLocation();
@ -307,6 +314,8 @@ export default class PurchaseWHSRM extends BasePage {
cNoOkquality: null, cNoOkquality: null,
}; };
isvalue = false; isvalue = false;
isvalue2 = false;
isvalue3 = false;
isquality = false; isquality = false;
isfocus = false; isfocus = false;
isshow1 = false; isshow1 = false;
@ -335,6 +344,7 @@ export default class PurchaseWHSRM extends BasePage {
} }
async onLoad(options) { async onLoad(options) {
this.getselectlist(); this.getselectlist();
this.getDefectListPDA();
if (options.listitem) { if (options.listitem) {
let str = decodeURIComponent(options.listitem); let str = decodeURIComponent(options.listitem);
if (str) { if (str) {
@ -356,6 +366,14 @@ export default class PurchaseWHSRM extends BasePage {
await this.model.getCheckType(); await this.model.getCheckType();
this.nodelist = this.model.orderNoItemList; this.nodelist = this.model.orderNoItemList;
} }
async getDefectListPDA() {
let query1 = {
factoryCode: session.PoolName,
checkType: this.selectList.value,
};
await this.model.getDefectListPDA(query1);
// this.nodelist = this.model.orderNoItemList;
}
async onPass(item) { async onPass(item) {
console.log('1234567', item, this.selectList); console.log('1234567', item, this.selectList);
this.clickitem = item; this.clickitem = item;
@ -425,6 +443,11 @@ export default class PurchaseWHSRM extends BasePage {
async selectProductlocCode1(e: any) { async selectProductlocCode1(e: any) {
this.incomeBatchNo = e.pickerName; this.incomeBatchNo = e.pickerName;
} }
async selectProductlocCode2(index, e: any) {
console.log(index, e);
this.defectCodeList = e.pickerName;
this.detaillistceshi[index].defectCode = this.defectCodeList.value;
}
focus(item, value, index) { focus(item, value, index) {
console.log(item, value, index); console.log(item, value, index);
if (this.detaillistceshi[index].actualValue) { if (this.detaillistceshi[index].actualValue) {
@ -476,6 +499,8 @@ export default class PurchaseWHSRM extends BasePage {
// //
async onOk() { async onOk() {
this.isvalue = false; this.isvalue = false;
this.isvalue2 = false;
this.isvalue3 = false;
this.isquality = false; this.isquality = false;
console.log(this.selectList, this.detaillistceshi); console.log(this.selectList, this.detaillistceshi);
let typeCode = ''; let typeCode = '';
@ -491,6 +516,16 @@ export default class PurchaseWHSRM extends BasePage {
} }
} }
}); });
this.detaillistceshi.forEach((item) => {
if (item.defectCode == null || item.defectCode == '') {
this.isvalue2 = true;
}
});
this.detaillistceshi.forEach((item) => {
if (item.defectQuality == null || item.defectQuality == '') {
this.isvalue3 = true;
}
});
this.detaillistdefects.forEach((item) => { this.detaillistdefects.forEach((item) => {
if (item.noOkQuality === null || item.noOkQuality === '') { if (item.noOkQuality === null || item.noOkQuality === '') {
this.isquality = true; this.isquality = true;
@ -505,7 +540,21 @@ export default class PurchaseWHSRM extends BasePage {
}); });
return; return;
} }
if (this.formdata.sampleQuality == null || this.formdata.sampleQuality == '') { if (this.isvalue) {
(this.$refs.uToast as any).show({
title: '请选择不良分类',
type: 'default',
});
return;
}
if (this.isvalue) {
(this.$refs.uToast as any).show({
title: '不合格数量不能为空',
type: 'default',
});
return;
}
if (this.formdata.sampleQuality === null || this.formdata.sampleQuality === '') {
(this.$refs.uToast as any).show({ (this.$refs.uToast as any).show({
title: '抽样数量不能为空', title: '抽样数量不能为空',
type: 'default', type: 'default',
@ -553,21 +602,21 @@ export default class PurchaseWHSRM extends BasePage {
incomeBatchNo: incomeBatchNo, incomeBatchNo: incomeBatchNo,
}; };
console.log(query); console.log(query);
await this.model.commitCheckTaskList(query); // await this.model.commitCheckTaskList(query);
if (this.model.SubmitCode.code == '200') { // if (this.model.SubmitCode.code == '200') {
(this.$refs.uToast as any).show({ // (this.$refs.uToast as any).show({
title: '成功', // title: '',
type: 'default', // type: 'default',
}); // });
this.show = false; // this.show = false;
this.getlist(); // this.getlist();
this.clear(); // this.clear();
} else { // } else {
(this.$refs.uToast as any).show({ // (this.$refs.uToast as any).show({
title: '失败', // title: '',
type: 'default', // type: 'default',
}); // });
} // }
} }
clear() { clear() {
this.formdata.sampleQuality = null; this.formdata.sampleQuality = null;

@ -69,6 +69,19 @@ export class Materialinspection extends VuexModule {
})); }));
return { locList }; return { locList };
} }
locList1: any = [];
getDefectList: any = '';
@MutationAction
async getDefectListPDA(params: any) {
const result: any = await http.post(url.lanjuquality.Materialinspection.getDefectListPDA, params);
console.log(result);
const getDefectList: [] = result;
const locList1 = getDefectList.map((item: any) => ({
label: item.defectsubclass,
value: item.defectCode,
}));
return { locList1 };
}
} }
export default getModule(Materialinspection); export default getModule(Materialinspection);

@ -170,6 +170,8 @@ export const url = {
commitCheckTaskList: qianzhuione + '/quality/handCheck/commitCheckResults', commitCheckTaskList: qianzhuione + '/quality/handCheck/commitCheckResults',
// 根据工单获取批次下拉 // 根据工单获取批次下拉
getBatchList: qianzhuione + '/quality/handCheck/getBatchList', getBatchList: qianzhuione + '/quality/handCheck/getBatchList',
// 根据工单获取批次下拉
getDefectListPDA: qianzhuione + '/quality/handcheck/getDefectListPDA',
}, },
// 历史记录 // 历史记录
Records: { Records: {

Loading…
Cancel
Save