Commit 968a71cb authored by 高宇's avatar 高宇

删除按钮

parent 216c3e2f
...@@ -129,7 +129,13 @@ ...@@ -129,7 +129,13 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="差异:" class="inspectionStandardLabel" prop="standoneCy"> <el-form-item label="差异:" class="inspectionStandardLabel" prop="standoneCy">
<span>{{inspectJbAl2o3List.standoneCy}}</span> <el-input
v-model="inspectJbAl2o3List.standoneCy"
class="inspectionStandardsInput"
:maxlength="IRMAXLENGTHONE"
:disabled="firstFromDisabled"
@input="getCalculateDifference"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -680,7 +686,14 @@ ...@@ -680,7 +686,14 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="差异:" class="inspectionStandardLabel" label-width="80" prop="standtwoCy"> <el-form-item label="差异:" class="inspectionStandardLabel" label-width="80" prop="standtwoCy">
<span>{{inspectJbAl2o3List.standtwoCy}}</span> <el-input
v-model="inspectJbAl2o3List.standtwoCy"
:maxlength="IRMAXLENGTHTWO"
:disabled="firstFromDisabled"
class="inspectionStandardsInput"
@blur="getInspect"
@input="getCalculateDifferences"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -2385,7 +2398,10 @@ export default { ...@@ -2385,7 +2398,10 @@ export default {
{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }, { pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' },
{ validator: this.validateMethod3, trigger: 'blur' } { validator: this.validateMethod3, trigger: 'blur' }
], ],
standoneCy: [ { required: true, message: '请输入差异', trigger: 'blur' },
{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }],
standtwoCy: [{ required: true, message: '请输入差异', trigger: 'blur' },
{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }]
standardTwo: [ standardTwo: [
{ required: true, message: '请输入检验标准', trigger: 'blur' }, { required: true, message: '请输入检验标准', trigger: 'blur' },
{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' } { pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }
...@@ -2904,7 +2920,7 @@ export default { ...@@ -2904,7 +2920,7 @@ export default {
this.calculate(this.removeEmptyValues(this.SumList), 1) this.calculate(this.removeEmptyValues(this.SumList), 1)
} }
this.calculateStandardTagOne(index,this.inspectJbAl2o3List.standardOne,this.inspectJbAl2o3List.standonePlus) this.calculateStandardTagOne(index,this.inspectJbAl2o3List.standardOne,this.inspectJbAl2o3List.standonePlus,this.inspectJbAl2o3List.standoneCy)
// console.log('11111', this.SumList) // console.log('11111', this.SumList)
}, },
/** /**
...@@ -3029,18 +3045,20 @@ export default { ...@@ -3029,18 +3045,20 @@ export default {
this.calculate(this.removeEmptyValues(this.SumList1), 2) this.calculate(this.removeEmptyValues(this.SumList1), 2)
} }
this.calculateStandardTagTwo(index,this.inspectJbAl2o3List.standardTwo,this.inspectJbAl2o3List.standtwoPlus) this.calculateStandardTagTwo(index,this.inspectJbAl2o3List.standardTwo,this.inspectJbAl2o3List.standtwoPlus,this.inspectJbAl2o3List.standtwoCy)
}, },
calculateStandardTagOne(index,standardOne,standardTwo) { calculateStandardTagOne(index,standardOne,standardTwo,difference) {
if (standardOne && standardOne !== null && standardTwo && standardTwo !== null) {
if (standardOne && standardOne !== null && standardTwo && standardTwo !== null && difference && difference !== null) {
const limitOne = parseFloat(standardOne) const limitOne = parseFloat(standardOne)
const limitTwo = parseFloat(standardTwo) const limitTwo = parseFloat(standardTwo)
const difference1 = parseFloat(difference)
const recordData = this.inspectJbAl2o3List.recode1[index].recordData const recordData = this.inspectJbAl2o3List.recode1[index].recordData
if (recordData !== '') { if (recordData !== '') {
const num = parseFloat(recordData) const num = parseFloat(recordData)
if (num >= limitOne && num <= limitTwo) { if (num >= (limitOne - difference1) && num <= (limitTwo + difference1 ) ) {
this.inspectJbAl2o3List.recode1[index].differenceValue2 = '合格' this.inspectJbAl2o3List.recode1[index].differenceValue2 = '合格'
} else { } else {
this.inspectJbAl2o3List.recode1[index].differenceValue2 = '不合格' this.inspectJbAl2o3List.recode1[index].differenceValue2 = '不合格'
...@@ -3048,14 +3066,15 @@ export default { ...@@ -3048,14 +3066,15 @@ export default {
} }
} }
}, },
calculateStandardTagTwo(index,standardOne,standardTwo) { calculateStandardTagTwo(index,standardOne,standardTwo,difference) {
if (standardOne && standardOne !== null && standardTwo && standardTwo !== null) { if (standardOne && standardOne !== null && standardTwo && standardTwo !== null && difference && difference !== null) {
const limitOne = parseFloat(standardOne) const limitOne = parseFloat(standardOne)
const limitTwo = parseFloat(standardTwo) const limitTwo = parseFloat(standardTwo)
const difference1 = parseFloat(difference)
const recordData = this.inspectJbAl2o3List.recode2[index].recordData const recordData = this.inspectJbAl2o3List.recode2[index].recordData
if (recordData !== '') { if (recordData !== '') {
const num = parseFloat(recordData) const num = parseFloat(recordData)
if (num >= limitOne && num <= limitTwo) { if (num >= (limitOne - difference1) && num <= (limitTwo + difference1)) {
this.inspectJbAl2o3List.recode2[index].differenceValue2 = '合格' this.inspectJbAl2o3List.recode2[index].differenceValue2 = '合格'
} else { } else {
this.inspectJbAl2o3List.recode2[index].differenceValue2 = '不合格' this.inspectJbAl2o3List.recode2[index].differenceValue2 = '不合格'
...@@ -3110,29 +3129,29 @@ export default { ...@@ -3110,29 +3129,29 @@ export default {
}, },
// 计算标签一的校验标准1 和 检验标准2 之间的差值 // 计算标签一的校验标准1 和 检验标准2 之间的差值
getCalculateDifference() { getCalculateDifference() {
if (this.inspectJbAl2o3List.standardOne && this.inspectJbAl2o3List.standardOne !== '' && this.inspectJbAl2o3List.standonePlus && this.inspectJbAl2o3List.standonePlus != '' ) { // if (this.inspectJbAl2o3List.standardOne && this.inspectJbAl2o3List.standardOne !== '' && this.inspectJbAl2o3List.standonePlus && this.inspectJbAl2o3List.standonePlus != '' ) {
const limitOne = parseFloat(this.inspectJbAl2o3List.standardOne ) // const limitOne = parseFloat(this.inspectJbAl2o3List.standardOne )
const limitTwo = parseFloat(this.inspectJbAl2o3List.standonePlus) // const limitTwo = parseFloat(this.inspectJbAl2o3List.standonePlus)
this.inspectJbAl2o3List.standoneCy = Math.abs(limitOne - limitTwo) // this.inspectJbAl2o3List.standoneCy = Math.abs(limitOne - limitTwo)
} else { // } else {
this.inspectJbAl2o3List.standoneCy = '' // this.inspectJbAl2o3List.standoneCy = ''
} // }
for (var i=0; i<10; i++) { for (var i=0; i<10; i++) {
this.calculateStandardTagOne(i,this.inspectJbAl2o3List.standardOne,this.inspectJbAl2o3List.standonePlus) this.calculateStandardTagOne(i,this.inspectJbAl2o3List.standardOne,this.inspectJbAl2o3List.standonePlus,this.inspectJbAl2o3List.standoneCy)
} }
}, },
// 计算标签一的校验标准1 和 检验标准2 之间的差值 // 计算标签一的校验标准1 和 检验标准2 之间的差值
getCalculateDifferences() { getCalculateDifferences() {
if (this.inspectJbAl2o3List.standardTwo && this.inspectJbAl2o3List.standardTwo !== '' && this.inspectJbAl2o3List.standtwoPlus && this.inspectJbAl2o3List.standtwoPlus != '' ) { // if (this.inspectJbAl2o3List.standardTwo && this.inspectJbAl2o3List.standardTwo !== '' && this.inspectJbAl2o3List.standtwoPlus && this.inspectJbAl2o3List.standtwoPlus != '' ) {
const limitOne = parseFloat(this.inspectJbAl2o3List.standardTwo ) // const limitOne = parseFloat(this.inspectJbAl2o3List.standardTwo )
const limitTwo = parseFloat(this.inspectJbAl2o3List.standtwoPlus) // const limitTwo = parseFloat(this.inspectJbAl2o3List.standtwoPlus)
this.inspectJbAl2o3List.standtwoCy = Math.abs(limitOne - limitTwo) // this.inspectJbAl2o3List.standtwoCy = Math.abs(limitOne - limitTwo)
} else { // } else {
this.inspectJbAl2o3List.standtwoPlus = '' // this.inspectJbAl2o3List.standtwoPlus = ''
} // }
for (var i=0; i<10; i++) { for (var i=0; i<10; i++) {
this.calculateStandardTagTwo(i,this.inspectJbAl2o3List.standardTwo,this.inspectJbAl2o3List.standtwoPlus) this.calculateStandardTagTwo(i,this.inspectJbAl2o3List.standardTwo,this.inspectJbAl2o3List.standtwoPlus,this.inspectJbAl2o3List.standtwoCy)
} }
}, },
......
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