diff --git a/src/api/quality/income.js b/src/api/quality/income.js
index 61c2c37..4311aa1 100644
--- a/src/api/quality/income.js
+++ b/src/api/quality/income.js
@@ -174,3 +174,9 @@ export function getCkeckProjectXJList(query) {
params: query
});
}
+ export function getWeightValue(recordId) {
+ return request({
+ url: '/quality/qcIncome/getWeightValue/' + recordId,
+ method: 'get'
+ })
+ }
diff --git a/src/views/quality/qcIncome/checkProjectType.vue b/src/views/quality/qcIncome/checkProjectType.vue
index f5a7c8a..9dfc5a9 100644
--- a/src/views/quality/qcIncome/checkProjectType.vue
+++ b/src/views/quality/qcIncome/checkProjectType.vue
@@ -13,22 +13,22 @@
- 合格
- 不合格
+ 合格
+ 不合格
- 是
- 否
+ 是
+ 否
-
-
+
+
-
-
+
+
-
+
@@ -139,7 +139,7 @@
-
+
提交
新增测量值
自动获取
- 重置
+ 重置
@@ -192,7 +192,8 @@ export default {
data() {
return {
viewStatus : '0',
- showFlag : false,
+ showFlag: false,
+ dyloading: false,
// 选中数组
selectedRows: {},
// 非单个禁用
@@ -222,8 +223,8 @@ export default {
},
data:{},
form:{
- checkResult: '1',
- startOA: 'N',
+ checkResult: 'Y',
+ startOA: '0',
},
dynamicValidateForm: {
domains: [{
@@ -333,8 +334,8 @@ export default {
projectType: null,
};
this.resetForm("form");
- this.form.checkResult = '1';
- this.form.startOA = 'N';
+ this.form.checkResult = 'Y';
+ this.form.startOA = '0';
},
/** 重置按钮操作 */
@@ -389,6 +390,10 @@ export default {
this.showFlag = false;
this.reset();
},
+ // 使用nextTick解决循环引用问题
+ handleResetForm() {
+ this.dynamicValidateForm.domains = [{ value: ''}];
+ },
// 数据状态修改/Y合格N不合格
/* handleStatusChange(row) {
@@ -405,16 +410,17 @@ export default {
//动态测量值
/** 检测结果钮操作 */
handleShowValue(row) {
+ this.handleResetForm();
this.valueOpen = true;
this.recordId = row.recordId;
this.weight = row.weight;
const actualValue = row.actualValue;
- if(actualValue !== null || actualValue !== ''){
+ if(actualValue !== null && actualValue !== '') {
this.dynamicValidateForm.domains = [];
let values = actualValue.split(",");
values.forEach((item,index) => {
this.dynamicValidateForm.domains.push({
- value: item,
+ value: item.toString(),
key: Date.now() + index
});
});
@@ -523,13 +529,14 @@ export default {
this.defectForm.defectItems.forEach(item => (item.noOkQuality = 0));
},
handleWeightValue() {
+ this.dyloading = true;
const recordId = this.recordId;
getWeightValue(recordId).then(response => {
if(response.code === 200) {
let value = response.msg;
- if(value !== null || value !== ''){
+ if(value !== null && value !== ''){
let arr = value.split(",");
- console.log(arr);
+ this.dynamicValidateForm.domains = [];
arr.forEach((item,index)=> {
this.dynamicValidateForm.domains.push({
value: item,
@@ -537,8 +544,7 @@ export default {
});
});
}
-
- console.log(this.dynamicValidateForm.domains);
+ this.dyloading = false;
}else {
this.$modal.msgError(response.msg);
}