diff --git a/jnpf-java-boot/jnpf-web/src/views/recyclebucket/form.vue b/jnpf-java-boot/jnpf-web/src/views/recyclebucket/form.vue index 4167768..2b98095 100644 --- a/jnpf-java-boot/jnpf-web/src/views/recyclebucket/form.vue +++ b/jnpf-java-boot/jnpf-web/src/views/recyclebucket/form.vue @@ -602,20 +602,20 @@ export default { trigger: "change" } ], - price: [ - { - required: true, - message: "数字文本", - trigger: ["blur", "change"] - } - ], - fullSet: [ - { - required: true, - message: "不能为空", - trigger: "change" - } - ], + // price: [ + // { + // required: true, + // message: "数字文本", + // trigger: ["blur", "change"] + // } + // ], + // fullSet: [ + // { + // required: true, + // message: "不能为空", + // trigger: "change" + // } + // ], fullStatus: [ { required: true, @@ -630,13 +630,13 @@ export default { trigger: "blur" } ], - smogSet: [ - { - required: true, - message: "请至少选择一个", - trigger: "change" - } - ], + // smogSet: [ + // { + // required: true, + // message: "请至少选择一个", + // trigger: "change" + // } + // ], smogStatus: [ { required: true, @@ -651,20 +651,20 @@ export default { trigger: "blur" } ], - warningWeight: [ - { - required: true, - message: "请输入", - trigger: "blur" - } - ], - closeDelay: [ - { - required: true, - message: "请输入", - trigger: "blur" - } - ], + // warningWeight: [ + // { + // required: true, + // message: "请输入", + // trigger: "blur" + // } + // ], + // closeDelay: [ + // { + // required: true, + // message: "请输入", + // trigger: "blur" + // } + // ], bagNo: [ { required: true, @@ -1055,21 +1055,41 @@ export default { initDefaultData() {}, // 表单提交 dataFormSubmit(type) { + if (this.dataForm.price == null && !this.useUnifiedConfig) { + this.$message.error('请选择配置或输入回收单价'); + return; + } if (this.useUnifiedConfig) { this.dataForm.price = null; } + if (this.dataForm.fullSet == null && !this.usefullSetConfig) { + this.$message.error('请选择配置或选择满溢报警'); + return; + } if (this.usefullSetConfig) { this.dataForm.fullSet = "-1"; } + if (this.dataForm.smogSet == null && !this.useSmogSetConfig) { + this.$message.error('请选择配置或选择烟雾报警'); + return; + } if (this.useSmogSetConfig) { this.dataForm.smogSet = "-1"; } - if (this.closeDelayConfig) { - this.dataForm.closeDelay = "-1"; + if (this.dataForm.warningWeight == null && !this.warningWeightConfig) { + this.$message.error('请选择配置或输入重量上限'); + return; } if (this.warningWeightConfig) { this.dataForm.warningWeight = null; } + if (this.dataForm.closeDelay == null && !this.closeDelayConfig) { + this.$message.error('请选择配置或输入关门延时'); + return; + } + if (this.closeDelayConfig) { + this.dataForm.closeDelay = "-1"; + } this.dataFormSubmitType = type ? type : 0; this.$refs["formRef"].validate(valid => { if (valid) {