Commit c2aba1a3 authored by Hagsn3's avatar Hagsn3

Merge remote-tracking branch 'origin/project9-8' into project9-8

# Conflicts:
#	src/views/template/templateFirst.vue
parents 2c4b4f46 410e7f02
...@@ -2319,24 +2319,24 @@ export default { ...@@ -2319,24 +2319,24 @@ export default {
rejectLoading: false, rejectLoading: false,
ThirdFromRules: { ThirdFromRules: {
wgKx: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }], wgKx: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }],
wgLlw: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }], wgLlw: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }],
wgWlw: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }], wgWlw: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }],
wgJbwq: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }], wgJbwq: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }],
wgZk: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }], wgZk: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }],
wgSh: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }], wgSh: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }],
wgBm: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }], wgBm: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }],
wgTc: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }], wgTc: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }],
wgQg: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }], wgQg: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }],
wgCq: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }], wgCq: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }],
wgFf: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }], wgFf: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }],
wgTf: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }] wgTf: [{ pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }]
}, },
// 第一部分限制表单账单 // 第一部分限制表单账单
IRMAXLENGTHONE: 11, IRMAXLENGTHONE: 11,
IRMAXLENGTHTWO: 11, IRMAXLENGTHTWO: 11,
IRMAXLENGTHTHREE: 11, IRMAXLENGTHTHREE: 11,
IRMAXLENGTHTHREEFOUR: 20, IRMAXLENGTHTHREEFOUR: 20,
LIMITNGHOURS: 6, LIMITNGHOURS: 4,
/** 上方表格的厂家*/ /** 上方表格的厂家*/
manufacturer: [{ manufacturer: [{
value: '1', value: '1',
...@@ -2390,39 +2390,39 @@ export default { ...@@ -2390,39 +2390,39 @@ export default {
}], }],
standardOne: [ standardOne: [
{ 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,4})?$/, message: '请输入有效的数字', trigger: 'change' }
], ],
standonePlus: [ standonePlus: [
{ 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,4})?$/, message: '请输入有效的数字', trigger: 'change' },
{ validator: this.validateMethod3, trigger: 'blur' } { validator: this.validateMethod3, trigger: 'blur' }
], ],
standoneCy: [{ required: true, message: '请输入差异', trigger: 'blur' }, standoneCy: [ { required: true, message: '请输入差异', trigger: 'blur' },
{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }], { pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, message: '请输入有效的数字', trigger: 'change' }],
standtwoCy: [{ required: true, message: '请输入差异', trigger: 'blur' }, standtwoCy: [{ required: true, message: '请输入差异', trigger: 'blur' },
{ pattern: /^(0|[1-9]\d*)(\.\d{0,6})?$/, message: '请输入有效的数字', trigger: 'change' }], { pattern: /^(0|[1-9]\d*)(\.\d{0,4})?$/, 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,4})?$/, message: '请输入有效的数字', trigger: 'change' }
], ],
standtwoPlus: [ standtwoPlus: [
{ 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,4})?$/, message: '请输入有效的数字', trigger: 'change' },
{ validator: this.validateMethod4, trigger: 'blur' } { validator: this.validateMethod4, trigger: 'blur' }
], ],
limitOne: [ limitOne: [
{ 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,4})?$/, message: '请输入有效的数字', trigger: 'change' },
{ validator: this.validateMethod1, trigger: 'blur' } { validator: this.validateMethod1, trigger: 'blur' }
], ],
limitTwo: [ limitTwo: [
{ 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,4})?$/, message: '请输入有效的数字', trigger: 'change' },
{ validator: this.validateMethod2, trigger: 'blur' } { validator: this.validateMethod2, trigger: 'blur' }
], ],
limitThree: [ limitThree: [
{ 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,4})?$/, message: '请输入有效的数字', trigger: 'change' }
], ],
recordData: [ recordData: [
{ required: true, message: '请输入检验数据', trigger: 'blur' } { required: true, message: '请输入检验数据', trigger: 'blur' }
...@@ -3119,7 +3119,7 @@ export default { ...@@ -3119,7 +3119,7 @@ export default {
const limitOne = parseFloat(this.inspectJbAl2o3List.limitOne) const limitOne = parseFloat(this.inspectJbAl2o3List.limitOne)
const limitTwo = parseFloat(this.inspectJbAl2o3List.limitTwo) const limitTwo = parseFloat(this.inspectJbAl2o3List.limitTwo)
const recordData3 = this.inspectJbAl2o3List.recode3[index].recordData const recordData3 = this.inspectJbAl2o3List.recode3[index].recordData
this.inspectJbAl2o3List.limitThree = Math.abs(limitOne - limitTwo) // this.inspectJbAl2o3List.limitThree = Math.abs(limitOne - limitTwo)
if (recordData3 !== '') { if (recordData3 !== '') {
const num = parseFloat(recordData3) const num = parseFloat(recordData3)
if (num >= limitOne && num <= limitTwo) { if (num >= limitOne && num <= limitTwo) {
...@@ -3129,9 +3129,9 @@ export default { ...@@ -3129,9 +3129,9 @@ export default {
} }
} }
} }
if (this.inspectJbAl2o3List.limitOne === '' || this.inspectJbAl2o3List.limitTwo === '') { // if (this.inspectJbAl2o3List.limitOne === '' || this.inspectJbAl2o3List.limitTwo === '') {
this.inspectJbAl2o3List.limitThree = '' // this.inspectJbAl2o3List.limitThree = ''
} // }
if (this.inspectJbAl2o3List.recode3[index].recordData === '' || this.inspectJbAl2o3List.limitOne === '' || this.inspectJbAl2o3List.limitTwo === '') { if (this.inspectJbAl2o3List.recode3[index].recordData === '' || this.inspectJbAl2o3List.limitOne === '' || this.inspectJbAl2o3List.limitTwo === '') {
this.inspectJbAl2o3List.recode3[index].differenceValue = '' this.inspectJbAl2o3List.recode3[index].differenceValue = ''
} }
...@@ -3150,11 +3150,11 @@ export default { ...@@ -3150,11 +3150,11 @@ export default {
this.handleData3Input(i) this.handleData3Input(i)
} }
if (this.inspectJbAl2o3List.limitOne && this.inspectJbAl2o3List.limitOne !== '' && this.inspectJbAl2o3List.limitOne !== undefined && this.inspectJbAl2o3List.limitTwo && this.inspectJbAl2o3List.limitTwo !== '' && this.inspectJbAl2o3List.limitTwo !== undefined) { if (this.inspectJbAl2o3List.limitOne && this.inspectJbAl2o3List.limitOne !== '' && this.inspectJbAl2o3List.limitOne !== undefined && this.inspectJbAl2o3List.limitTwo && this.inspectJbAl2o3List.limitTwo !== '' && this.inspectJbAl2o3List.limitTwo !== undefined) {
const limitOne = parseFloat(this.inspectJbAl2o3List.limitOne) const limitOne = Math.floor(Number(this.inspectJbAl2o3List.limitOne) * 10000); // 将浮点数转换为整数并保留整数部分
const limitTwo = parseFloat(this.inspectJbAl2o3List.limitTwo) const limitTwo = Math.floor(Number(this.inspectJbAl2o3List.limitTwo) * 10000);
this.inspectJbAl2o3List.limitThree = Math.abs(limitOne - limitTwo) this.inspectJbAl2o3List.limitThree = Math.abs(limitOne - limitTwo) / 10000; // 将结果转换回浮点数
} else { } else {
this.inspectJbAl2o3List.limitThree = '' this.inspectJbAl2o3List.limitThree = '';
} }
}, },
// 计算标签一的校验标准1 和 检验标准2 之间的差值 // 计算标签一的校验标准1 和 检验标准2 之间的差值
......
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