|
@@ -59,8 +59,13 @@
|
|
|
@handleDispose="handleDispose"
|
|
@handleDispose="handleDispose"
|
|
|
></sampleListDialog>
|
|
></sampleListDialog>
|
|
|
<sampleDisposeDialog
|
|
<sampleDisposeDialog
|
|
|
|
|
+ v-if="sampleDisposeVisble"
|
|
|
|
|
+ :sampleDisposeVisble.sync="sampleDisposeVisble"
|
|
|
ref="disposeRef"
|
|
ref="disposeRef"
|
|
|
@handleDisposeConfirm="handleDisposeConfirm"
|
|
@handleDisposeConfirm="handleDisposeConfirm"
|
|
|
|
|
+ :rowData="rowData"
|
|
|
|
|
+ @close="closeDispose"
|
|
|
|
|
+ @handleDispose="handleDispose"
|
|
|
></sampleDisposeDialog>
|
|
></sampleDisposeDialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -134,7 +139,9 @@
|
|
|
};
|
|
};
|
|
|
};
|
|
};
|
|
|
return {
|
|
return {
|
|
|
|
|
+ rowData: null,
|
|
|
defaultForm,
|
|
defaultForm,
|
|
|
|
|
+ sampleDisposeVisble: false,
|
|
|
// 表单数据
|
|
// 表单数据
|
|
|
form: { ...defaultForm() },
|
|
form: { ...defaultForm() },
|
|
|
voList: [],
|
|
voList: [],
|
|
@@ -149,6 +156,7 @@
|
|
|
// activeName: '2',
|
|
// activeName: '2',
|
|
|
|
|
|
|
|
packingList: [],
|
|
packingList: [],
|
|
|
|
|
+ // 样品清单,处置,批量处置,批量质检,质检的操作
|
|
|
sampleList: [],
|
|
sampleList: [],
|
|
|
schemeList: [],
|
|
schemeList: [],
|
|
|
inventoryList: [],
|
|
inventoryList: [],
|
|
@@ -756,7 +764,10 @@
|
|
|
console.log(res, '质检方案');
|
|
console.log(res, '质检方案');
|
|
|
this.schemeList = res.list;
|
|
this.schemeList = res.list;
|
|
|
},
|
|
},
|
|
|
|
|
+ // 取样
|
|
|
getConditionType(val) {
|
|
getConditionType(val) {
|
|
|
|
|
+ console.log(val, '------取样的回调');
|
|
|
|
|
+
|
|
|
this.form.conditionType = val;
|
|
this.form.conditionType = val;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -774,7 +785,7 @@
|
|
|
let URL =
|
|
let URL =
|
|
|
this.type == 'add' ? save : this.type == 'edit' ? update : '';
|
|
this.type == 'add' ? save : this.type == 'edit' ? update : '';
|
|
|
|
|
|
|
|
- this.form.qualityTimeStart = this.qualityTimeStart
|
|
|
|
|
|
|
+ this.form.qualityTimeStart = this.qualityTimeStart;
|
|
|
|
|
|
|
|
delete this.form['qualityTimeEnd'];
|
|
delete this.form['qualityTimeEnd'];
|
|
|
|
|
|
|
@@ -846,18 +857,22 @@
|
|
|
}, 0);
|
|
}, 0);
|
|
|
this.form.totalWeight = parseFloat(pNum.toFixed(2));
|
|
this.form.totalWeight = parseFloat(pNum.toFixed(2));
|
|
|
},
|
|
},
|
|
|
- handleDispose(index, row, type) {
|
|
|
|
|
- if (!this.sampleList[index]) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ handleDispose(data) {
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+ // return
|
|
|
|
|
+ this.rowData = data;
|
|
|
|
|
+ this.sampleDisposeVisble = true;
|
|
|
|
|
+ // if (!this.sampleList[index]) {
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
- this.sampleList[index].sampleDate = this.getNowTimes();
|
|
|
|
|
|
|
+ // this.sampleList[index].sampleDate = this.getNowTimes();
|
|
|
|
|
|
|
|
- this.sampleList[index].disposeTime = this.getNowTimes();
|
|
|
|
|
|
|
+ // this.sampleList[index].disposeTime = this.getNowTimes();
|
|
|
|
|
|
|
|
- console.log(index, row, type, this.qualityType);
|
|
|
|
|
|
|
+ // console.log(index, row, type, this.qualityType);
|
|
|
|
|
|
|
|
- this.$refs.disposeRef.openDispose(index, row, type, this.qualityType);
|
|
|
|
|
|
|
+ // this.$refs.disposeRef.openDispose(index, row, type, this.qualityType);
|
|
|
},
|
|
},
|
|
|
// 报工
|
|
// 报工
|
|
|
handleReporting(index, row) {
|
|
handleReporting(index, row) {
|
|
@@ -915,7 +930,7 @@
|
|
|
qualityInventoryList: this.inventoryList
|
|
qualityInventoryList: this.inventoryList
|
|
|
};
|
|
};
|
|
|
console.log(params, 'params');
|
|
console.log(params, 'params');
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
exeReportWork(params)
|
|
exeReportWork(params)
|
|
|
.then((msg) => {
|
|
.then((msg) => {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
@@ -931,20 +946,24 @@
|
|
|
// 处理确认事件
|
|
// 处理确认事件
|
|
|
handleDisposeConfirm(data, index) {
|
|
handleDisposeConfirm(data, index) {
|
|
|
console.log(data, index, '确认处置事件');
|
|
console.log(data, index, '确认处置事件');
|
|
|
|
|
+ console.log(this.sampleList);
|
|
|
|
|
|
|
|
- if (index != null) {
|
|
|
|
|
- this.$set(this.sampleList, index, data);
|
|
|
|
|
- } else {
|
|
|
|
|
|
|
+ if (index == undefined) {
|
|
|
this.sampleList.forEach((obj) => {
|
|
this.sampleList.forEach((obj) => {
|
|
|
- obj.disposalStatus = data.disposalStatus;
|
|
|
|
|
|
|
+ obj.disposeType = data.disposeType;
|
|
|
obj.sampleDate = data.sampleDate;
|
|
obj.sampleDate = data.sampleDate;
|
|
|
- obj.disposeTime = data.disposeTime;
|
|
|
|
|
obj.sampleCondition = data.sampleCondition;
|
|
obj.sampleCondition = data.sampleCondition;
|
|
|
obj.producerManufacturer = data.producerManufacturer;
|
|
obj.producerManufacturer = data.producerManufacturer;
|
|
|
obj.samplePlace = data.samplePlace;
|
|
obj.samplePlace = data.samplePlace;
|
|
|
obj.sampleRemark = data.sampleRemark;
|
|
obj.sampleRemark = data.sampleRemark;
|
|
|
|
|
+ obj.depotId = data.depotId;
|
|
|
|
|
+ obj.depotName = data.depotName;
|
|
|
});
|
|
});
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$set(this.sampleList, index, data);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ console.log(this.sampleList);
|
|
|
},
|
|
},
|
|
|
//确认质检
|
|
//确认质检
|
|
|
handleConfirm(list, index) {
|
|
handleConfirm(list, index) {
|
|
@@ -1021,12 +1040,18 @@
|
|
|
},
|
|
},
|
|
|
// 批量处置
|
|
// 批量处置
|
|
|
batchDispose() {
|
|
batchDispose() {
|
|
|
- this.$refs.disposeRef.openDispose(
|
|
|
|
|
- null,
|
|
|
|
|
- null,
|
|
|
|
|
- 'dispose',
|
|
|
|
|
- this.qualityType
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ if (this.sampleList && this.sampleList.length) {
|
|
|
|
|
+ this.sampleDisposeVisble = true;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$message('当前没有样品清单可以处置');
|
|
|
|
|
+
|
|
|
|
|
+ // this.$refs.disposeRef.openDispose(
|
|
|
|
|
+ // null,
|
|
|
|
|
+ // null,
|
|
|
|
|
+ // 'dispose',
|
|
|
|
|
+ // this.qualityType
|
|
|
|
|
+ // );
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
//全检,检验标准改变时,重新获取样品列表
|
|
//全检,检验标准改变时,重新获取样品列表
|
|
@@ -1319,6 +1344,11 @@
|
|
|
qualificationRate,
|
|
qualificationRate,
|
|
|
noQualificationRate
|
|
noQualificationRate
|
|
|
);
|
|
);
|
|
|
|
|
+ },
|
|
|
|
|
+ closeDispose() {
|
|
|
|
|
+ this.rowData = null;
|
|
|
|
|
+ this.sampleDisposeVisble = false;
|
|
|
|
|
+ // this.rowData = null;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|