Commit f2cbd534 authored by jingnan's avatar jingnan 👀

检验单不合格数量逻辑修改

parent 3cfe107b
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
clearable clearable
:min="0" :min="0"
placeholder="不合格数" placeholder="不合格数"
:disabled="form.isPass !== 'N'||allDisabled" :disabled="form.isPass === 'N'||allDisabled"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -317,6 +317,7 @@ export default { ...@@ -317,6 +317,7 @@ export default {
'form.isPass': { 'form.isPass': {
handler: function(v) { handler: function(v) {
if (v === 'N') { if (v === 'N') {
this.$set(this.form, 'noPassAmount', this.basicData.reqAmount)
this.$set(this.formRules, 'noPassAmount', [{ required: true, message: '请输入不合格数', trigger: 'change' }]) this.$set(this.formRules, 'noPassAmount', [{ required: true, message: '请输入不合格数', trigger: 'change' }])
} else { } else {
this.$delete(this.formRules, 'noPassAmount') this.$delete(this.formRules, 'noPassAmount')
......
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
clearable clearable
:min="0" :min="0"
placeholder="不合格数" placeholder="不合格数"
:disabled="form.isPass !== 'N'||allDisabled" :disabled="form.isPass === 'N'||allDisabled"
/> />
</el-form-item> </el-form-item>
</div> </div>
...@@ -789,6 +789,7 @@ export default { ...@@ -789,6 +789,7 @@ export default {
'form.isPass': { 'form.isPass': {
handler: function(v) { handler: function(v) {
if (v === 'N') { if (v === 'N') {
this.$set(this.form, 'noPassAmount', this.basicData.reqAmount)
this.$set(this.formRules, 'noPassAmount', [{ required: true, message: '请输入不合格数', trigger: 'change' }]) this.$set(this.formRules, 'noPassAmount', [{ required: true, message: '请输入不合格数', trigger: 'change' }])
} else { } else {
this.$delete(this.formRules, 'noPassAmount') this.$delete(this.formRules, 'noPassAmount')
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
clearable clearable
:min="0" :min="0"
placeholder="不合格数" placeholder="不合格数"
:disabled="form.isPass!=='N'||allDisabled" :disabled="form.isPass==='N'||allDisabled"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -287,6 +287,7 @@ export default { ...@@ -287,6 +287,7 @@ export default {
'form.isPass': { 'form.isPass': {
handler: function(v) { handler: function(v) {
if (v === 'N') { if (v === 'N') {
this.$set(this.form, 'noPassAmount', this.basicData.reqAmount)
this.$set(this.formRules, 'noPassAmount', [{ required: true, message: '请输入不合格数', trigger: 'change' }]) this.$set(this.formRules, 'noPassAmount', [{ required: true, message: '请输入不合格数', trigger: 'change' }])
} else { } else {
this.$delete(this.formRules, 'noPassAmount') this.$delete(this.formRules, 'noPassAmount')
......
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