diff --git a/src/pages/quality/Materialinspection/index.vue b/src/pages/quality/Materialinspection/index.vue
index 6cc8986..75e555a 100644
--- a/src/pages/quality/Materialinspection/index.vue
+++ b/src/pages/quality/Materialinspection/index.vue
@@ -97,6 +97,11 @@
+
实际值:
@@ -209,6 +214,7 @@ export default class PurchaseWHSRM extends BasePage {
model = model;
moren = '请选择检验节点';
moren2 = '请选择批次号';
+ moren3 = '请选择不良分类';
list: any = [];
show = false;
showselect = false;
@@ -229,6 +235,7 @@ export default class PurchaseWHSRM extends BasePage {
},
];
selectList: any = {};
+ defectCodeList: any = {};
// remove: any = {};
// async onReady() {
// await this.model.queryLocation();
@@ -307,6 +314,8 @@ export default class PurchaseWHSRM extends BasePage {
cNoOkquality: null,
};
isvalue = false;
+ isvalue2 = false;
+ isvalue3 = false;
isquality = false;
isfocus = false;
isshow1 = false;
@@ -335,6 +344,7 @@ export default class PurchaseWHSRM extends BasePage {
}
async onLoad(options) {
this.getselectlist();
+ this.getDefectListPDA();
if (options.listitem) {
let str = decodeURIComponent(options.listitem);
if (str) {
@@ -356,6 +366,14 @@ export default class PurchaseWHSRM extends BasePage {
await this.model.getCheckType();
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) {
console.log('1234567', item, this.selectList);
this.clickitem = item;
@@ -425,6 +443,11 @@ export default class PurchaseWHSRM extends BasePage {
async selectProductlocCode1(e: any) {
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) {
console.log(item, value, index);
if (this.detaillistceshi[index].actualValue) {
@@ -476,6 +499,8 @@ export default class PurchaseWHSRM extends BasePage {
//点击收货按钮,录入批次(或系统自动生成)、数量、托盘码进行收货。
async onOk() {
this.isvalue = false;
+ this.isvalue2 = false;
+ this.isvalue3 = false;
this.isquality = false;
console.log(this.selectList, this.detaillistceshi);
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) => {
if (item.noOkQuality === null || item.noOkQuality === '') {
this.isquality = true;
@@ -505,7 +540,21 @@ export default class PurchaseWHSRM extends BasePage {
});
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({
title: '抽样数量不能为空',
type: 'default',
@@ -553,21 +602,21 @@ export default class PurchaseWHSRM extends BasePage {
incomeBatchNo: incomeBatchNo,
};
console.log(query);
- await this.model.commitCheckTaskList(query);
- if (this.model.SubmitCode.code == '200') {
- (this.$refs.uToast as any).show({
- title: '成功',
- type: 'default',
- });
- this.show = false;
- this.getlist();
- this.clear();
- } else {
- (this.$refs.uToast as any).show({
- title: '失败',
- type: 'default',
- });
- }
+ // await this.model.commitCheckTaskList(query);
+ // if (this.model.SubmitCode.code == '200') {
+ // (this.$refs.uToast as any).show({
+ // title: '成功',
+ // type: 'default',
+ // });
+ // this.show = false;
+ // this.getlist();
+ // this.clear();
+ // } else {
+ // (this.$refs.uToast as any).show({
+ // title: '失败',
+ // type: 'default',
+ // });
+ // }
}
clear() {
this.formdata.sampleQuality = null;
diff --git a/src/pages/quality/Materialinspection/model.ts b/src/pages/quality/Materialinspection/model.ts
index db7ef10..e1d460b 100644
--- a/src/pages/quality/Materialinspection/model.ts
+++ b/src/pages/quality/Materialinspection/model.ts
@@ -69,6 +69,19 @@ export class Materialinspection extends VuexModule {
}));
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);
diff --git a/src/utils/url.ts b/src/utils/url.ts
index 340533b..5a8e153 100644
--- a/src/utils/url.ts
+++ b/src/utils/url.ts
@@ -170,6 +170,8 @@ export const url = {
commitCheckTaskList: qianzhuione + '/quality/handCheck/commitCheckResults',
// 根据工单获取批次下拉
getBatchList: qianzhuione + '/quality/handCheck/getBatchList',
+ // 根据工单获取批次下拉
+ getDefectListPDA: qianzhuione + '/quality/handcheck/getDefectListPDA',
},
// 历史记录
Records: {