Commit cb99fae1 authored by Hagsn3's avatar Hagsn3

修改代码

parent ce61be0a
<template> <template>
<div class="CheckBobyList" id="nbprint"> <div id="nbprint" class="CheckBobyList">
<!-- 检查表主体--> <!-- 检查表主体-->
<div class="checkList"> <div class="checkList">
<!-- 检查表第一部分 --> <!-- 检查表第一部分 -->
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
v-model="inspectInfoList.jcCj" v-model="inspectInfoList.jcCj"
:disabled="firstFromDisabled" :disabled="firstFromDisabled"
class="normalSelect" class="normalSelect"
@change="handleJcCjChange"
placeholder="请选择厂家" placeholder="请选择厂家"
@change="handleJcCjChange"
> >
<el-option <el-option
v-for="item in manufacturer" v-for="item in manufacturer"
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<el-form-item> <el-form-item>
<div class="scanAndPrint"> <div class="scanAndPrint">
<el-button class="scanCodeTop" type="primary" @click="scanCodes"><div class="scanTest">扫码</div></el-button> <el-button class="scanCodeTop" type="primary" @click="scanCodes"><div class="scanTest">扫码</div></el-button>
<el-button class="printCodeTop" type="primary" v-print="printOption"><div class="printTest">打印</div></el-button> <el-button v-print="printOption" class="printCodeTop" type="primary"><div class="printTest">打印</div></el-button>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="rank:" prop="jcRank"> <el-form-item label="rank:" prop="jcRank">
...@@ -1478,256 +1478,256 @@ ...@@ -1478,256 +1478,256 @@
/> />
</div> </div>
</div> </div>
<div class="Content"> <!-- <div class="Content">-->
<div class="oneDiv"> <!-- <div class="oneDiv">-->
<div class="number">26</div> <!-- <div class="number">26</div>-->
<div class="recordData"> <!-- <div class="recordData">-->
<el-form-item <!-- <el-form-item-->
:ref="'recode2.'+10+'.recordData'" <!-- :ref="'recode2.'+10+'.recordData'"-->
:prop="'recode2.'+10+'.recordData'" <!-- :prop="'recode2.'+10+'.recordData'"-->
:rules="[{required: !disableInput, validator: numTypeTwo, trigger: 'blur'}]" <!-- :rules="[{required: !disableInput, validator: numTypeTwo, trigger: 'blur'}]"-->
> <!-- >-->
<el-input <!-- <el-input-->
ref="input26" <!-- ref="input26"-->
v-model="inspectJbAl2o3List.recode2[10].recordData" <!-- v-model="inspectJbAl2o3List.recode2[10].recordData"-->
:maxlength="IRMAXLENGTHTWO" <!-- :maxlength="IRMAXLENGTHTWO"-->
:disabled="firstFromDisabled || disableInput" <!-- :disabled="firstFromDisabled || disableInput"-->
@input="handleData2Input(10)" <!-- @input="handleData2Input(10)"-->
@keyup.enter.native="handelTab(26,$event)" <!-- @keyup.enter.native="handelTab(26,$event)"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
</div> <!-- </div>-->
<div class="emptyButton"> <!-- <div class="emptyButton">-->
<i <!-- <i-->
v-show="!(firstFromDisabled)" <!-- v-show="!(firstFromDisabled)"-->
class="el-icon-circle-close" <!-- class="el-icon-circle-close"-->
style="color: #5cbce5" <!-- style="color: #5cbce5"-->
@click="clearInspectionFormTwo(10)" <!-- @click="clearInspectionFormTwo(10)"-->
/> <!-- />-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div :class="inspectJbAl2o3List.recode2[10].differenceValue3 === '合格' ? 'Value' : 'errValue'"> <!-- <div :class="inspectJbAl2o3List.recode2[10].differenceValue3 === '合格' ? 'Value' : 'errValue'">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[10].differenceValue3" <!-- :text="inspectJbAl2o3List.recode2[10].differenceValue3"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
<div class="averageValue"> <!-- <div class="averageValue">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[10].differenceValue1" <!-- :text="inspectJbAl2o3List.recode2[10].differenceValue1"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
<div :class="inspectJbAl2o3List.recode2[10].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'"> <!-- <div :class="inspectJbAl2o3List.recode2[10].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[10].differenceValue2" <!-- :text="inspectJbAl2o3List.recode2[10].differenceValue2"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="Content"> <!-- <div class="Content">-->
<div class="oneDiv"> <!-- <div class="oneDiv">-->
<div class="number">27</div> <!-- <div class="number">27</div>-->
<div class="recordData"> <!-- <div class="recordData">-->
<el-form-item <!-- <el-form-item-->
:ref="'recode2.'+11+'.recordData'" <!-- :ref="'recode2.'+11+'.recordData'"-->
:prop="'recode2.'+11+'.recordData'" <!-- :prop="'recode2.'+11+'.recordData'"-->
:rules="[{required: !disableInput, validator: numTypeTwo, trigger: 'blur'}]" <!-- :rules="[{required: !disableInput, validator: numTypeTwo, trigger: 'blur'}]"-->
> <!-- >-->
<el-input <!-- <el-input-->
ref="input27" <!-- ref="input27"-->
v-model="inspectJbAl2o3List.recode2[11].recordData" <!-- v-model="inspectJbAl2o3List.recode2[11].recordData"-->
:maxlength="IRMAXLENGTHTWO" <!-- :maxlength="IRMAXLENGTHTWO"-->
:disabled="firstFromDisabled || disableInput" <!-- :disabled="firstFromDisabled || disableInput"-->
@input="handleData2Input(11)" <!-- @input="handleData2Input(11)"-->
@keyup.enter.native="handelTab(27,$event)" <!-- @keyup.enter.native="handelTab(27,$event)"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
</div> <!-- </div>-->
<div class="emptyButton"> <!-- <div class="emptyButton">-->
<i <!-- <i-->
v-show="!(firstFromDisabled)" <!-- v-show="!(firstFromDisabled)"-->
class="el-icon-circle-close" <!-- class="el-icon-circle-close"-->
style="color: #5cbce5" <!-- style="color: #5cbce5"-->
@click="clearInspectionFormTwo(11)" <!-- @click="clearInspectionFormTwo(11)"-->
/> <!-- />-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div :class="inspectJbAl2o3List.recode2[11].differenceValue3 === '合格' ? 'Value' : 'errValue'"> <!-- <div :class="inspectJbAl2o3List.recode2[11].differenceValue3 === '合格' ? 'Value' : 'errValue'">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[11].differenceValue3" <!-- :text="inspectJbAl2o3List.recode2[11].differenceValue3"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
<div class="averageValue"> <!-- <div class="averageValue">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[11].differenceValue1" <!-- :text="inspectJbAl2o3List.recode2[11].differenceValue1"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
<div :class="inspectJbAl2o3List.recode2[11].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'"> <!-- <div :class="inspectJbAl2o3List.recode2[11].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[11].differenceValue2" <!-- :text="inspectJbAl2o3List.recode2[11].differenceValue2"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="Content"> <!-- <div class="Content">-->
<div class="oneDiv"> <!-- <div class="oneDiv">-->
<div class="number">28</div> <!-- <div class="number">28</div>-->
<div class="recordData"> <!-- <div class="recordData">-->
<el-form-item <!-- <el-form-item-->
:ref="'recode2.'+12+'.recordData'" <!-- :ref="'recode2.'+12+'.recordData'"-->
:prop="'recode2.'+12+'.recordData'" <!-- :prop="'recode2.'+12+'.recordData'"-->
:rules="[{required: !disableInput, validator: numTypeTwo, trigger: 'blur'}]" <!-- :rules="[{required: !disableInput, validator: numTypeTwo, trigger: 'blur'}]"-->
> <!-- >-->
<el-input <!-- <el-input-->
ref="input28" <!-- ref="input28"-->
v-model="inspectJbAl2o3List.recode2[12].recordData" <!-- v-model="inspectJbAl2o3List.recode2[12].recordData"-->
:maxlength="IRMAXLENGTHTWO" <!-- :maxlength="IRMAXLENGTHTWO"-->
:disabled="firstFromDisabled || disableInput" <!-- :disabled="firstFromDisabled || disableInput"-->
@input="handleData2Input(12)" <!-- @input="handleData2Input(12)"-->
@keyup.enter.native="handelTab(28,$event)" <!-- @keyup.enter.native="handelTab(28,$event)"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
</div> <!-- </div>-->
<div class="emptyButton"> <!-- <div class="emptyButton">-->
<i <!-- <i-->
v-show="!(firstFromDisabled)" <!-- v-show="!(firstFromDisabled)"-->
class="el-icon-circle-close" <!-- class="el-icon-circle-close"-->
style="color: #5cbce5" <!-- style="color: #5cbce5"-->
@click="clearInspectionFormTwo(12)" <!-- @click="clearInspectionFormTwo(12)"-->
/> <!-- />-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div :class="inspectJbAl2o3List.recode2[12].differenceValue3 === '合格' ? 'Value' : 'errValue'"> <!-- <div :class="inspectJbAl2o3List.recode2[12].differenceValue3 === '合格' ? 'Value' : 'errValue'">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[12].differenceValue3" <!-- :text="inspectJbAl2o3List.recode2[12].differenceValue3"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
<div class="averageValue"> <!-- <div class="averageValue">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[12].differenceValue1" <!-- :text="inspectJbAl2o3List.recode2[12].differenceValue1"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
<div :class="inspectJbAl2o3List.recode2[12].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'"> <!-- <div :class="inspectJbAl2o3List.recode2[12].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[12].differenceValue2" <!-- :text="inspectJbAl2o3List.recode2[12].differenceValue2"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="Content"> <!-- <div class="Content">-->
<div class="oneDiv"> <!-- <div class="oneDiv">-->
<div class="number">29</div> <!-- <div class="number">29</div>-->
<div class="recordData"> <!-- <div class="recordData">-->
<el-form-item <!-- <el-form-item-->
:ref="'recode2.'+13+'.recordData'" <!-- :ref="'recode2.'+13+'.recordData'"-->
:prop="'recode2.'+13+'.recordData'" <!-- :prop="'recode2.'+13+'.recordData'"-->
:rules="[{required: !disableInput, validator: numTypeTwo, trigger: 'blur'}]" <!-- :rules="[{required: !disableInput, validator: numTypeTwo, trigger: 'blur'}]"-->
> <!-- >-->
<el-input <!-- <el-input-->
ref="input29" <!-- ref="input29"-->
v-model="inspectJbAl2o3List.recode2[13].recordData" <!-- v-model="inspectJbAl2o3List.recode2[13].recordData"-->
:maxlength="IRMAXLENGTHTWO" <!-- :maxlength="IRMAXLENGTHTWO"-->
:disabled="firstFromDisabled || disableInput" <!-- :disabled="firstFromDisabled || disableInput"-->
@input="handleData2Input(13)" <!-- @input="handleData2Input(13)"-->
@keyup.enter.native="handelTab(29,$event)" <!-- @keyup.enter.native="handelTab(29,$event)"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
</div> <!-- </div>-->
<div class="emptyButton"> <!-- <div class="emptyButton">-->
<i <!-- <i-->
v-show="!(firstFromDisabled)" <!-- v-show="!(firstFromDisabled)"-->
class="el-icon-circle-close" <!-- class="el-icon-circle-close"-->
style="color: #5cbce5" <!-- style="color: #5cbce5"-->
@click="clearInspectionFormTwo(13)" <!-- @click="clearInspectionFormTwo(13)"-->
/> <!-- />-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div :class="inspectJbAl2o3List.recode2[13].differenceValue3 === '合格' ? 'Value' : 'errValue'"> <!-- <div :class="inspectJbAl2o3List.recode2[13].differenceValue3 === '合格' ? 'Value' : 'errValue'">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[13].differenceValue3" <!-- :text="inspectJbAl2o3List.recode2[13].differenceValue3"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
<div class="averageValue"> <!-- <div class="averageValue">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[13].differenceValue1" <!-- :text="inspectJbAl2o3List.recode2[13].differenceValue1"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
<div :class="inspectJbAl2o3List.recode2[13].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'"> <!-- <div :class="inspectJbAl2o3List.recode2[13].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[13].differenceValue2" <!-- :text="inspectJbAl2o3List.recode2[13].differenceValue2"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="Content"> <!-- <div class="Content">-->
<div class="oneDiv"> <!-- <div class="oneDiv">-->
<div class="number">30</div> <!-- <div class="number">30</div>-->
<div class="recordData"> <!-- <div class="recordData">-->
<el-form-item <!-- <el-form-item-->
:ref="'recode2.'+14+'.recordData'" <!-- :ref="'recode2.'+14+'.recordData'"-->
:prop="'recode2.'+14+'.recordData'" <!-- :prop="'recode2.'+14+'.recordData'"-->
:rules="[{required: !disableInput, validator: numTypeTwo, trigger: 'blur'}]" <!-- :rules="[{required: !disableInput, validator: numTypeTwo, trigger: 'blur'}]"-->
> <!-- >-->
<el-input <!-- <el-input-->
ref="input30" <!-- ref="input30"-->
v-model="inspectJbAl2o3List.recode2[14].recordData" <!-- v-model="inspectJbAl2o3List.recode2[14].recordData"-->
:maxlength="IRMAXLENGTHTWO" <!-- :maxlength="IRMAXLENGTHTWO"-->
:disabled="firstFromDisabled || disableInput" <!-- :disabled="firstFromDisabled || disableInput"-->
@input="handleData2Input(14)" <!-- @input="handleData2Input(14)"-->
@keyup.enter.native="handelTab(30,$event)" <!-- @keyup.enter.native="handelTab(30,$event)"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
</div> <!-- </div>-->
<div class="emptyButton"> <!-- <div class="emptyButton">-->
<i <!-- <i-->
v-show="!(firstFromDisabled)" <!-- v-show="!(firstFromDisabled)"-->
class="el-icon-circle-close" <!-- class="el-icon-circle-close"-->
style="color: #5cbce5" <!-- style="color: #5cbce5"-->
@click="clearInspectionFormTwo(14)" <!-- @click="clearInspectionFormTwo(14)"-->
/> <!-- />-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div :class="inspectJbAl2o3List.recode2[14].differenceValue3 === '合格' ? 'Value' : 'errValue'"> <!-- <div :class="inspectJbAl2o3List.recode2[14].differenceValue3 === '合格' ? 'Value' : 'errValue'">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[14].differenceValue3" <!-- :text="inspectJbAl2o3List.recode2[14].differenceValue3"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
<div class="averageValue"> <!-- <div class="averageValue">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[14].differenceValue1" <!-- :text="inspectJbAl2o3List.recode2[14].differenceValue1"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
<div :class="inspectJbAl2o3List.recode2[14].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'"> <!-- <div :class="inspectJbAl2o3List.recode2[14].differenceValue2 === '合格' ? 'compareValue' : 'errorCompareValue'">-->
<TextToolTip <!-- <TextToolTip-->
:text="inspectJbAl2o3List.recode2[14].differenceValue2" <!-- :text="inspectJbAl2o3List.recode2[14].differenceValue2"-->
:max-length="8" <!-- :max-length="8"-->
:disabled-show="false" <!-- :disabled-show="false"-->
/> <!-- />-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</el-form> </el-form>
</div> </div>
</div> </div>
...@@ -2934,11 +2934,11 @@ export default { ...@@ -2934,11 +2934,11 @@ export default {
{ required: true, message: '请输入检验标准', trigger: 'blur' }, { required: true, message: '请输入检验标准', trigger: 'blur' },
{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' } { pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }
], ],
standtwoPx:[ standtwoPx: [
{ required: true, message: '请输入px', trigger: 'blur' }, { required: true, message: '请输入px', trigger: 'blur' },
{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' } { pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }
], ],
standonePx:[ standonePx: [
{ required: true, message: '请输入PX:', trigger: 'blur' }, { required: true, message: '请输入PX:', trigger: 'blur' },
{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' } { pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }
], ],
...@@ -3227,12 +3227,12 @@ export default { ...@@ -3227,12 +3227,12 @@ export default {
methods: { methods: {
// 当px发生变化 // 当px发生变化
handleCompare() { handleCompare() {
for (var i=0;i<15;i++) { for (var i = 0; i < 15; i++) {
this.handleData1Input(i) this.handleData1Input(i)
} }
}, },
handleCompareTwo() { handleCompareTwo() {
for (var i=0;i<15;i++) { for (var i = 0; i < 10; i++) {
this.handleData2Input(i) this.handleData2Input(i)
} }
}, },
...@@ -3243,16 +3243,16 @@ export default { ...@@ -3243,16 +3243,16 @@ export default {
console.log('选中第一个厂家') console.log('选中第一个厂家')
this.disableInput = true this.disableInput = true
for (var i = 10; i < 15; i++) { for (var i = 10; i < 15; i++) {
this.inspectJbAl2o3List.recode1[i].recordData = ''; this.inspectJbAl2o3List.recode1[i].recordData = ''
this.inspectJbAl2o3List.recode1[i].differenceValue = ''; this.inspectJbAl2o3List.recode1[i].differenceValue = ''
this.inspectJbAl2o3List.recode1[i].differenceValue1 = ''; this.inspectJbAl2o3List.recode1[i].differenceValue1 = ''
this.inspectJbAl2o3List.recode1[i].differenceValue2 = ''; this.inspectJbAl2o3List.recode1[i].differenceValue2 = ''
this.inspectJbAl2o3List.recode2[i].recordData = ''; // this.inspectJbAl2o3List.recode2[i].recordData = '';
this.inspectJbAl2o3List.recode2[i].differenceValue = ''; // this.inspectJbAl2o3List.recode2[i].differenceValue = '';
this.inspectJbAl2o3List.recode2[i].differenceValue1 = ''; // this.inspectJbAl2o3List.recode2[i].differenceValue1 = '';
this.inspectJbAl2o3List.recode2[i].differenceValue2 = ''; // this.inspectJbAl2o3List.recode2[i].differenceValue2 = '';
this.$refs.inspectJbAl2o3ListOne.validateField(`recode1.${i}.recordData`); this.$refs.inspectJbAl2o3ListOne.validateField(`recode1.${i}.recordData`)
this.$refs.inspectJbAl2o3ListTwo.validateField(`recode2.${i}.recordData`); // this.$refs.inspectJbAl2o3ListTwo.validateField(`recode2.${i}.recordData`);
} }
} else { } else {
console.log('选择其他厂家') console.log('选择其他厂家')
...@@ -3265,29 +3265,28 @@ export default { ...@@ -3265,29 +3265,28 @@ export default {
return return
} }
if (that.disableInput) { if (that.disableInput) {
if ((i>=1 && i<10) || (i>=16 && i< 25)) { if ((i >= 1 && i < 10) || (i >= 16 && i < 25)) {
that.$nextTick(() => { that.$nextTick(() => {
e.target.blur() e.target.blur()
const index = i + 1 const index = i + 1
that.$refs['input' + index].focus() that.$refs['input' + index].focus()
}) })
} }
if ((i===10)) { if ((i === 10)) {
that.$nextTick(() => { that.$nextTick(() => {
e.target.blur() e.target.blur()
const index = i + 6 const index = i + 6
that.$refs['input' + index].focus() that.$refs['input' + index].focus()
}) })
} }
if ( i=== 25) { if (i === 25) {
that.$nextTick(() => { that.$nextTick(() => {
e.target.blur() e.target.blur()
that.$refs['inspect1'].focus() that.$refs['inspect1'].focus()
}) })
} }
} else { } else {
if (i < 30) { if (i < 25) {
that.$nextTick(() => { that.$nextTick(() => {
e.target.blur() e.target.blur()
const index = i + 1 const index = i + 1
...@@ -3300,7 +3299,6 @@ export default { ...@@ -3300,7 +3299,6 @@ export default {
}) })
} }
} }
}, },
tagTwohandelTab(i, e) { tagTwohandelTab(i, e) {
const that = this const that = this
...@@ -3491,8 +3489,8 @@ export default { ...@@ -3491,8 +3489,8 @@ export default {
this.inspectJbAl2o3List.recode1[index + 1].differenceValue = this.digitalFormat(Math.abs(num1 - num2).toFixed(this.LIMITNGHOURS)) this.inspectJbAl2o3List.recode1[index + 1].differenceValue = this.digitalFormat(Math.abs(num1 - num2).toFixed(this.LIMITNGHOURS))
this.inspectJbAl2o3List.recode1[index + 1].differenceValue1 = this.digitalFormat(((num1 + num2) / 2).toFixed(this.LIMITNGHOURS)) this.inspectJbAl2o3List.recode1[index + 1].differenceValue1 = this.digitalFormat(((num1 + num2) / 2).toFixed(this.LIMITNGHOURS))
if (this.inspectJbAl2o3List.standonePx && this.inspectJbAl2o3List.standonePx != '') { if (this.inspectJbAl2o3List.standonePx && this.inspectJbAl2o3List.standonePx != '') {
console.log('差值',Math.abs(this.inspectJbAl2o3List.recode1[index + 1].differenceValue )) console.log('差值', Math.abs(this.inspectJbAl2o3List.recode1[index + 1].differenceValue))
if (Math.abs(this.inspectJbAl2o3List.recode1[index + 1].differenceValue )> this.inspectJbAl2o3List.standonePx) { if (Math.abs(this.inspectJbAl2o3List.recode1[index + 1].differenceValue) > this.inspectJbAl2o3List.standonePx) {
this.inspectJbAl2o3List.recode1[index + 1].differenceValue3 = '不合格' this.inspectJbAl2o3List.recode1[index + 1].differenceValue3 = '不合格'
} else { } else {
this.inspectJbAl2o3List.recode1[index + 1].differenceValue3 = '合格' this.inspectJbAl2o3List.recode1[index + 1].differenceValue3 = '合格'
...@@ -3626,6 +3624,7 @@ export default { ...@@ -3626,6 +3624,7 @@ export default {
handleData2Input(index) { handleData2Input(index) {
// 两种情况 1.单数 2.双数 // 两种情况 1.单数 2.双数
if (index % 2 === 0) { if (index % 2 === 0) {
console.log('index', index)
/** /**
* 1.单数情况下计算 自身与自身加1 的差值和均值 * 1.单数情况下计算 自身与自身加1 的差值和均值
* *
...@@ -3633,9 +3632,13 @@ export default { ...@@ -3633,9 +3632,13 @@ export default {
if (this.inspectJbAl2o3List.recode2[index].recordData && this.inspectJbAl2o3List.recode2[index].recordData !== '' && this.inspectJbAl2o3List.recode2[index].recordData !== undefined && this.inspectJbAl2o3List.recode2[index + 1].recordData && this.inspectJbAl2o3List.recode2[index + 1].recordData !== '' && this.inspectJbAl2o3List.recode2[index + 1].recordData !== undefined) { if (this.inspectJbAl2o3List.recode2[index].recordData && this.inspectJbAl2o3List.recode2[index].recordData !== '' && this.inspectJbAl2o3List.recode2[index].recordData !== undefined && this.inspectJbAl2o3List.recode2[index + 1].recordData && this.inspectJbAl2o3List.recode2[index + 1].recordData !== '' && this.inspectJbAl2o3List.recode2[index + 1].recordData !== undefined) {
const num1 = parseFloat(this.inspectJbAl2o3List.recode2[index].recordData) const num1 = parseFloat(this.inspectJbAl2o3List.recode2[index].recordData)
const num2 = parseFloat(this.inspectJbAl2o3List.recode2[index + 1].recordData) const num2 = parseFloat(this.inspectJbAl2o3List.recode2[index + 1].recordData)
console.log('num1', num1)
console.log('num2', num2)
this.inspectJbAl2o3List.recode2[index + 1].differenceValue = this.digitalFormat(Math.abs(num1 - num2).toFixed(this.LIMITNGHOURS)) this.inspectJbAl2o3List.recode2[index + 1].differenceValue = this.digitalFormat(Math.abs(num1 - num2).toFixed(this.LIMITNGHOURS))
this.inspectJbAl2o3List.recode2[index + 1].differenceValue1 = this.digitalFormat(((num1 + num2) / 2).toFixed(this.LIMITNGHOURS)) this.inspectJbAl2o3List.recode2[index + 1].differenceValue1 = this.digitalFormat(((num1 + num2) / 2).toFixed(this.LIMITNGHOURS))
if (this.inspectJbAl2o3List.standtwoPx && this.inspectJbAl2o3List.standtwoPx !== '') { if (this.inspectJbAl2o3List.standtwoPx && this.inspectJbAl2o3List.standtwoPx !== '') {
console.log('this.inspectJbAl2o3List.recode2[index + 1].differenceValue', this.inspectJbAl2o3List.recode2[index + 1].differenceValue)
console.log('this.inspectJbAl2o3List.standtwoPx', this.inspectJbAl2o3List.standtwoPx)
if (this.inspectJbAl2o3List.recode2[index + 1].differenceValue > this.inspectJbAl2o3List.standtwoPx) { if (this.inspectJbAl2o3List.recode2[index + 1].differenceValue > this.inspectJbAl2o3List.standtwoPx) {
this.inspectJbAl2o3List.recode2[index + 1].differenceValue3 = '不合格' this.inspectJbAl2o3List.recode2[index + 1].differenceValue3 = '不合格'
} else { } else {
...@@ -3657,10 +3660,14 @@ export default { ...@@ -3657,10 +3660,14 @@ export default {
if (this.inspectJbAl2o3List.recode2[index].recordData && this.inspectJbAl2o3List.recode2[index].recordData !== '' && this.inspectJbAl2o3List.recode2[index - 1].recordData !== undefined && this.inspectJbAl2o3List.recode2[index - 1].recordData && this.inspectJbAl2o3List.recode2[index - 1].recordData !== '' && this.inspectJbAl2o3List.recode2[index - 1].recordData !== undefined) { if (this.inspectJbAl2o3List.recode2[index].recordData && this.inspectJbAl2o3List.recode2[index].recordData !== '' && this.inspectJbAl2o3List.recode2[index - 1].recordData !== undefined && this.inspectJbAl2o3List.recode2[index - 1].recordData && this.inspectJbAl2o3List.recode2[index - 1].recordData !== '' && this.inspectJbAl2o3List.recode2[index - 1].recordData !== undefined) {
const num1 = parseFloat(this.inspectJbAl2o3List.recode2[index].recordData) const num1 = parseFloat(this.inspectJbAl2o3List.recode2[index].recordData)
const num2 = parseFloat(this.inspectJbAl2o3List.recode2[index - 1].recordData) const num2 = parseFloat(this.inspectJbAl2o3List.recode2[index - 1].recordData)
console.log('num11', num1)
console.log('num21', num2)
this.inspectJbAl2o3List.recode2[index].differenceValue = this.digitalFormat(Math.abs(num1 - num2).toFixed(this.LIMITNGHOURS)) this.inspectJbAl2o3List.recode2[index].differenceValue = this.digitalFormat(Math.abs(num1 - num2).toFixed(this.LIMITNGHOURS))
this.inspectJbAl2o3List.recode2[index].differenceValue1 = this.digitalFormat(((num1 + num2) / 2).toFixed(this.LIMITNGHOURS)) this.inspectJbAl2o3List.recode2[index].differenceValue1 = this.digitalFormat(((num1 + num2) / 2).toFixed(this.LIMITNGHOURS))
console.log('this.inspectJbAl2o3List.recode2[index + 1].differenceValue1', this.inspectJbAl2o3List.recode2[index + 1].differenceValue)
console.log('this.inspectJbAl2o3List.standtwoPx1', this.inspectJbAl2o3List.standtwoPx)
if (this.inspectJbAl2o3List.standtwoPx && this.inspectJbAl2o3List.standtwoPx !== '') { if (this.inspectJbAl2o3List.standtwoPx && this.inspectJbAl2o3List.standtwoPx !== '') {
if (this.inspectJbAl2o3List.recode2[index].differenceValue > this.inspectJbAl2o3List.standtwoPx) { if (Math.abs(this.inspectJbAl2o3List.recode2[index].differenceValue) > this.inspectJbAl2o3List.standtwoPx) {
this.inspectJbAl2o3List.recode2[index].differenceValue3 = '不合格' this.inspectJbAl2o3List.recode2[index].differenceValue3 = '不合格'
} else { } else {
this.inspectJbAl2o3List.recode2[index].differenceValue3 = '合格' this.inspectJbAl2o3List.recode2[index].differenceValue3 = '合格'
...@@ -3776,48 +3783,48 @@ export default { ...@@ -3776,48 +3783,48 @@ export default {
reserve(value) { reserve(value) {
let s = '0' let s = '0'
if (value.lastIndexOf('.') === -1) { if (value.lastIndexOf('.') === -1) {
s = value + '.00'; s = value + '.00'
console.log('s', s); console.log('s', s)
} else { } else {
// 如果字符串中包含句点,则对字符串进行处理以保留两位小数并进行四舍五入 // 如果字符串中包含句点,则对字符串进行处理以保留两位小数并进行四舍五入
let decimalIndex = value.lastIndexOf('.'); const decimalIndex = value.lastIndexOf('.')
let integerValue = value.substring(0, decimalIndex); // 获取小数点前的整数部分 const integerValue = value.substring(0, decimalIndex) // 获取小数点前的整数部分
let decimalValue = value.substring(decimalIndex); // 获取小数点及其后面的部分 const decimalValue = value.substring(decimalIndex) // 获取小数点及其后面的部分
console.log('integerValue',integerValue) console.log('integerValue', integerValue)
console.log('decimalValue',decimalValue) console.log('decimalValue', decimalValue)
// 如果小数部分为1位小数添加一个0 // 如果小数部分为1位小数添加一个0
if (decimalValue.length === 1) { if (decimalValue.length === 1) {
s = value + '0' s = value + '0'
} }
if (decimalValue.length === 3) { if (decimalValue.length === 3) {
// 如果小数部分长度小于等于3,说明已经有两位小数或没有小数 // 如果小数部分长度小于等于3,说明已经有两位小数或没有小数
s = value; // 不需要进行四舍五入,保留原始值 s = value // 不需要进行四舍五入,保留原始值
} else { } else {
// 否则,对小数部分进行四舍五入 // 否则,对小数部分进行四舍五入
let roundedDecimal = parseFloat(decimalValue).toFixed(2); const roundedDecimal = parseFloat(decimalValue).toFixed(2)
console.log('roundedDecimal',roundedDecimal) console.log('roundedDecimal', roundedDecimal)
console.log('integerValue', integerValue + parseFloat(roundedDecimal)); // 这里需要将 roundedDecimal 转换成数字 console.log('integerValue', integerValue + parseFloat(roundedDecimal)) // 这里需要将 roundedDecimal 转换成数字
s = Number(integerValue) + parseFloat(roundedDecimal); // 将整数部分和四舍五入后的小数部分拼接起来 s = Number(integerValue) + parseFloat(roundedDecimal) // 将整数部分和四舍五入后的小数部分拼接起来
} }
} }
return String(s) return String(s)
}, },
// 对于整数添加两位小数 // 对于整数添加两位小数
reserve1(value) { reserve1(value) {
let s = '0'; let s = '0'
// 将 value 转换为字符串类型 // 将 value 转换为字符串类型
value = value.toString(); value = value.toString()
if (value.lastIndexOf('.') == -1) { if (value.lastIndexOf('.') == -1) {
s = value + '.00'; s = value + '.00'
console.log('s', s); console.log('s', s)
} else { } else {
s = value; s = value
} }
return s; return s
}, },
// 计算标签一的校验标准1 和 检验标准2 之间的差值 // 计算标签一的校验标准1 和 检验标准2 之间的差值
getCalculateDifferences() { getCalculateDifferences() {
for (var i = 0; i < 15; i++) { for (var i = 0; i < 10; i++) {
this.calculateStandardTagTwo(i, this.inspectJbAl2o3List.standardTwo, this.inspectJbAl2o3List.standtwoPlus, this.inspectJbAl2o3List.standtwoCy) this.calculateStandardTagTwo(i, this.inspectJbAl2o3List.standardTwo, this.inspectJbAl2o3List.standtwoPlus, this.inspectJbAl2o3List.standtwoCy)
} }
}, },
...@@ -3923,7 +3930,7 @@ export default { ...@@ -3923,7 +3930,7 @@ export default {
if (response.data.standardTwo) { if (response.data.standardTwo) {
this.inspectJbAl2o3List.standardTwo = this.reserve1(String(response.data.standardTwo)) this.inspectJbAl2o3List.standardTwo = this.reserve1(String(response.data.standardTwo))
} }
this.inspectJbAl2o3List.standonePx = response.data.standonePx this.inspectJbAl2o3List.standonePx = response.data.standonePx
this.inspectJbAl2o3List.standtwoPx = response.data.standtwoPx this.inspectJbAl2o3List.standtwoPx = response.data.standtwoPx
this.inspectJbAl2o3List.standardOneData = response.data.standardOneData this.inspectJbAl2o3List.standardOneData = response.data.standardOneData
this.inspectJbAl2o3List.standardTwoData = response.data.standardTwoData this.inspectJbAl2o3List.standardTwoData = response.data.standardTwoData
...@@ -3972,7 +3979,7 @@ export default { ...@@ -3972,7 +3979,7 @@ export default {
this.getRecordThreeList(this.inspectJbAl2o3List.limitData.split(',')) this.getRecordThreeList(this.inspectJbAl2o3List.limitData.split(','))
} }
// this.handleJcCjChange(this.inspectInfoList.jcCj) // this.handleJcCjChange(this.inspectInfoList.jcCj)
console.log('this.inspectInfoList.jcCj',this.inspectInfoList.jcCj) console.log('this.inspectInfoList.jcCj', this.inspectInfoList.jcCj)
if (this.inspectInfoList.jcCj === this.manufacturer[0].value) { if (this.inspectInfoList.jcCj === this.manufacturer[0].value) {
this.disableInput = true this.disableInput = true
} else { } else {
...@@ -3992,17 +3999,17 @@ export default { ...@@ -3992,17 +3999,17 @@ export default {
getRecordList(list1) { getRecordList(list1) {
for (let i = 0; i < list1.length; i++) { for (let i = 0; i < list1.length; i++) {
this.inspectJbAl2o3List.recode1[i].recordData = list1[i] this.inspectJbAl2o3List.recode1[i].recordData = list1[i]
if (i<list1.length - 1 ) { if (i < list1.length - 1) {
this.handleData1Input(i) this.handleData1Input(i)
} }
} }
}, },
// 数组2 // 数组2
getRecordTwoList(list1) { getRecordTwoList(list1) {
console.log('list1',list1) console.log('list1', list1)
for (let i = 0; i < list1.length; i++) { for (let i = 0; i < list1.length; i++) {
this.inspectJbAl2o3List.recode2[i].recordData = list1[i] this.inspectJbAl2o3List.recode2[i].recordData = list1[i]
if(i< list1.length-1) { if (i < list1.length - 1) {
this.handleData2Input(i) this.handleData2Input(i)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment