|
|
|
@ -137,7 +137,11 @@
|
|
|
|
|
<u-form-item label="抽样数量:">
|
|
|
|
|
<u-input v-model="formdata.sampleQuality" placeholder="" type="number" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item v-if="isshow1" label="不合格数量:">
|
|
|
|
|
<u-form-item :label="item.defectSubclass" v-for="(item, index) in detaillistdefects" :key="index">
|
|
|
|
|
<u-input v-model="item.noOkQuality" placeholder="" type="number" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
|
|
<!-- <u-form-item v-if="isshow1" label="不合格数量:">
|
|
|
|
|
<u-input v-model="formdata.noOkQuality" placeholder="" type="number" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item v-if="isshow3" label="A类不良:">
|
|
|
|
@ -148,7 +152,7 @@
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item v-if="isshow3" label="C类不良:">
|
|
|
|
|
<u-input v-model="formdata.cNoOkquality" placeholder="" type="number" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-form-item> -->
|
|
|
|
|
</u-form>
|
|
|
|
|
<view class="poupbutton" style="margin-top: 10px">
|
|
|
|
|
<div>
|
|
|
|
@ -281,6 +285,7 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
detailsinfo: any = [];
|
|
|
|
|
nodelist: any = '';
|
|
|
|
|
detaillistceshi: any = [];
|
|
|
|
|
detaillistdefects: any = [];
|
|
|
|
|
clickitem: any = '';
|
|
|
|
|
formdata: any = {
|
|
|
|
|
sampleQuality: null,
|
|
|
|
@ -290,6 +295,7 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
cNoOkquality: null,
|
|
|
|
|
};
|
|
|
|
|
isvalue = false;
|
|
|
|
|
isquality = false;
|
|
|
|
|
isfocus = false;
|
|
|
|
|
isshow1 = false;
|
|
|
|
|
isshow2 = false;
|
|
|
|
@ -339,22 +345,15 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
async onPass(item) {
|
|
|
|
|
console.log('1234567', item);
|
|
|
|
|
this.clickitem = item;
|
|
|
|
|
let labelname = null;
|
|
|
|
|
this.nodelist.forEach((item) => {
|
|
|
|
|
if (item.orderCode == this.selectList.value) {
|
|
|
|
|
labelname = item.checkName;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (labelname == '来料检验') {
|
|
|
|
|
this.isshow1 = true;
|
|
|
|
|
} else if (labelname == '成品入库检验') {
|
|
|
|
|
this.isshow1 = true;
|
|
|
|
|
} else if (labelname == '过程检验') {
|
|
|
|
|
this.isshow3 = true;
|
|
|
|
|
}
|
|
|
|
|
let belongTo = item.recordId;
|
|
|
|
|
await this.model.getCheckTaskList(belongTo);
|
|
|
|
|
this.detaillistceshi = this.model.CheckTaskList;
|
|
|
|
|
let query = {
|
|
|
|
|
factoryCode: session.PoolName,
|
|
|
|
|
belongTo: belongTo,
|
|
|
|
|
checkType: this.selectList.value,
|
|
|
|
|
};
|
|
|
|
|
await this.model.getCheckTaskList(query);
|
|
|
|
|
this.detaillistceshi = this.model.CheckTaskList.qcCheckTaskDetails;
|
|
|
|
|
this.detaillistdefects = this.model.CheckTaskList.defects;
|
|
|
|
|
this.detaillistceshi.forEach((item) => {
|
|
|
|
|
item.factoryCode = session.PoolName;
|
|
|
|
|
item.checkType = this.selectList.value;
|
|
|
|
@ -435,24 +434,21 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
//点击收货按钮,录入批次(或系统自动生成)、数量、托盘码进行收货。
|
|
|
|
|
async onOk() {
|
|
|
|
|
this.isvalue = false;
|
|
|
|
|
this.isquality = false;
|
|
|
|
|
console.log(this.selectList, this.detaillistceshi);
|
|
|
|
|
let labelname = null;
|
|
|
|
|
|
|
|
|
|
this.nodelist.forEach((item) => {
|
|
|
|
|
if (item.orderCode == this.selectList.value) {
|
|
|
|
|
labelname = item.checkName;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.detaillistceshi.forEach((item) => {
|
|
|
|
|
if (item.propertyCode == 1) {
|
|
|
|
|
if (item.actualValue == null || item.actualValue == '') {
|
|
|
|
|
console.log(item);
|
|
|
|
|
this.isvalue = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
console.log(this.detaillistceshi, this.isvalue);
|
|
|
|
|
this.detaillistdefects.forEach((item) => {
|
|
|
|
|
if (item.noOkQuality == null || item.noOkQuality == '') {
|
|
|
|
|
this.isquality = true;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
console.log(this.detaillistceshi, this.isvalue, this.isquality);
|
|
|
|
|
if (this.isvalue) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '检查标准不能为空',
|
|
|
|
@ -467,75 +463,25 @@ export default class PurchaseWHSRM extends BasePage {
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.isshow1) {
|
|
|
|
|
if (this.formdata.noOkQuality == null || this.formdata.noOkQuality == '') {
|
|
|
|
|
if (this.isquality) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '不合格数量不能为空',
|
|
|
|
|
title: '数量不能为空',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (this.isshow3) {
|
|
|
|
|
if (this.formdata.aNoOkquality == null || this.formdata.aNoOkquality == '') {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: 'A类不良不能为空',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.formdata.bNoOkquality == null || this.formdata.bNoOkquality == '') {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: 'B类不良不能为空',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.formdata.cNoOkquality == null || this.formdata.cNoOkquality == '') {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: 'C类不良不能为空',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let query = {};
|
|
|
|
|
if (labelname == '来料检验') {
|
|
|
|
|
query = {
|
|
|
|
|
|
|
|
|
|
let query = {
|
|
|
|
|
sampleQuality: this.formdata.sampleQuality,
|
|
|
|
|
noOkQuality: this.formdata.noOkQuality,
|
|
|
|
|
updateBy: session.userName,
|
|
|
|
|
factoryCode: session.PoolName,
|
|
|
|
|
typeCode: this.selectList.value,
|
|
|
|
|
checkType: this.selectList.value,
|
|
|
|
|
orderCode: this.clickitem.orderNo,
|
|
|
|
|
qcCheckTaskDetails: this.detaillistceshi,
|
|
|
|
|
defects: this.detaillistdefects,
|
|
|
|
|
};
|
|
|
|
|
} else if (labelname == '成品入库检验') {
|
|
|
|
|
query = {
|
|
|
|
|
sampleQuality: this.formdata.sampleQuality,
|
|
|
|
|
noOkQuality: this.formdata.noOkQuality,
|
|
|
|
|
updateBy: session.userName,
|
|
|
|
|
factoryCode: session.PoolName,
|
|
|
|
|
typeCode: this.selectList.value,
|
|
|
|
|
checkType: this.selectList.value,
|
|
|
|
|
orderCode: this.clickitem.orderNo,
|
|
|
|
|
qcCheckTaskDetails: this.detaillistceshi,
|
|
|
|
|
};
|
|
|
|
|
} else if (labelname == '过程检验') {
|
|
|
|
|
query = {
|
|
|
|
|
sampleQuality: this.formdata.sampleQuality,
|
|
|
|
|
aNoOkquality: this.formdata.aNoOkquality,
|
|
|
|
|
bNoOkquality: this.formdata.bNoOkquality,
|
|
|
|
|
cNoOkquality: this.formdata.cNoOkquality,
|
|
|
|
|
updateBy: session.userName,
|
|
|
|
|
factoryCode: session.PoolName,
|
|
|
|
|
typeCode: this.selectList.value,
|
|
|
|
|
checkType: this.selectList.value,
|
|
|
|
|
orderCode: this.clickitem.orderNo,
|
|
|
|
|
qcCheckTaskDetails: this.detaillistceshi,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
console.log(query);
|
|
|
|
|
await this.model.commitCheckTaskList(query);
|
|
|
|
|
if (this.model.SubmitCode.code == '200') {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|