Browse Source

2025-11-06

oqc优化
master
fengyuan_yang 2 months ago
parent
commit
f02cb0b1ac
  1. 81
      src/views/modules/qc/OQCResultEntry.vue

81
src/views/modules/qc/OQCResultEntry.vue

@ -606,12 +606,36 @@
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值" width="200">
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="200">
<template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150">
<template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `d`" v-model="templateTableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150">
<template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `e`" v-model="templateTableData[row.xh-1].subDetailValueC" @keyup.enter.native="nextFocus5(row.xh-1)" placeholder="请输入实测值C"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150">
<template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `f`" v-model="templateTableData[row.xh-1].subDetailValueD" @keyup.enter.native="nextFocus6(row.xh-1)" placeholder="请输入实测值D"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150">
<template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `g`" v-model="templateTableData[row.xh-1].subDetailValueE" @keyup.enter.native="nextFocus7(row.xh-1)" placeholder="请输入实测值E"></el-input>
</template>
</el-table-column>
</el-table>
<!-- 分页-->
<el-pagination
@ -2777,14 +2801,18 @@
handleAddBtn (td) {
checkFQASIsSubmit(td).then(({data}) => {
if (data.flag !== 1) {
let obj = {}
obj.subDetailValue = ""
obj.samplingLocation = ""
let obj = {
subDetailValue: '',
samplingLocation: '',
samplingLocationB: '',
subDetailValueB: '',
subDetailValueC: '',
subDetailValueD: '',
subDetailValueE: '',
}
this.tableData.push(obj)
} else {
this.$alert("记录已提交!", '错误', {
confirmButtonText: '确定'
})
this.$message.error('记录已提交')
}
})
},
@ -2805,10 +2833,15 @@
//
batchHandleAddModal () {
for (let i = 0; i < this.batchAddData.samplingNumber; i++) {
let obj = {}
obj.samplingLocation = this.batchAddData.samplingLocation
obj.samplingLocationB = this.batchAddData.samplingLocationB
obj.subDetailValue = ""
let obj = {
samplingLocation: this.batchAddData.samplingLocation,
samplingLocationB: this.batchAddData.samplingLocationB,
subDetailValue: '',
subDetailValueB: '',
subDetailValueC: '',
subDetailValueD: '',
subDetailValueE: '',
}
this.tableData.push(obj)
}
this.batchHandleAddModalFlag = false
@ -2821,20 +2854,42 @@
this.$refs[a1].focus()
})
},
nextFocus2 (index) {
let a2 = `${index + 1}` + `b`
this.$nextTick(() => {
this.$refs[a2].focus()
})
},
nextFocus3 (index) {
let a3 = `${index + 1}` + `c`
this.$nextTick(() => {
this.$refs[a3].focus()
})
},
nextFocus4 (index) {
let a = `${index + 1}` + `d`
this.$nextTick(() => {
this.$refs[a].focus()
})
},
nextFocus5 (index) {
let a = `${index + 1}` + `e`
this.$nextTick(() => {
this.$refs[a].focus()
})
},
nextFocus6 (index) {
let a = `${index + 1}` + `f`
this.$nextTick(() => {
this.$refs[a].focus()
})
},
nextFocus7 (index) {
let a = `${index + 1}` + `g`
this.$nextTick(() => {
this.$refs[a].focus()
})
},
focusNextInput (index, type) {
let aaa = ''

Loading…
Cancel
Save