来料检测任务,测量值修改

master
shaoyong 6 months ago
parent 4a185e96db
commit f374672092

@ -174,3 +174,9 @@ export function getCkeckProjectXJList(query) {
params: query
});
}
export function getWeightValue(recordId) {
return request({
url: '/quality/qcIncome/getWeightValue/' + recordId,
method: 'get'
})
}

@ -139,7 +139,7 @@
</el-dialog>
<!--测量值弹窗-->
<el-dialog title="测量值" :visible.sync="valueOpen" width="600px" append-to-body>
<el-form :model="dynamicValidateForm" ref="dynamicValidateForm" label-width="100px" class="demo-dynamic">
<el-form :model="dynamicValidateForm" v-loading="dyloading" ref="dynamicValidateForm" label-width="100px" class="demo-dynamic">
<el-form-item
v-for="(domain, index) in dynamicValidateForm.domains"
:label="'测量值' + index"
@ -156,7 +156,7 @@
<el-button type="primary" @click="submitForm('dynamicValidateForm')"></el-button>
<el-button @click="addDomain"></el-button>
<el-button v-if="this.weight === '1'" type="primary" icon="el-icon-refresh" @click="handleWeightValue"></el-button>
<el-button @click="resetForm('dynamicValidateForm')"></el-button>
<el-button @click="handleResetForm()"></el-button>
</el-form-item>
</el-form>
</el-dialog>
@ -192,7 +192,8 @@ export default {
data() {
return {
viewStatus : '0',
showFlag : false,
showFlag: false,
dyloading: false,
//
selectedRows: {},
//
@ -389,6 +390,12 @@ export default {
this.showFlag = false;
this.reset();
},
// 使nextTick
handleResetForm() {
this.$nextTick(() => {
this.dynamicValidateForm.domains = [{ value: ''}];
});
},
// /YN
/* handleStatusChange(row) {
@ -409,12 +416,13 @@ export default {
this.recordId = row.recordId;
this.weight = row.weight;
const actualValue = row.actualValue;
if(actualValue !== null || actualValue !== ''){
console.log(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 +531,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 +546,7 @@ export default {
});
});
}
console.log(this.dynamicValidateForm.domains);
this.dyloading = false;
}else {
this.$modal.msgError(response.msg);
}

Loading…
Cancel
Save