whj hace 1 año
padre
commit
ffbc9b9514
Se han modificado 1 ficheros con 10 adiciones y 2 borrados
  1. 10 2
      src/views/idle-assets/modules/AuditForm.vue

+ 10 - 2
src/views/idle-assets/modules/AuditForm.vue

@@ -20,7 +20,7 @@
             :labelCol="BaseTool.Constant.labelCol2"
             :wrapperCol="BaseTool.Constant.wrapperCol2"
           >
-            <a-radio-group v-decorator="['status', {initialValue: status, rules: [{required: true, message: '审核人不能为空'}]}]">
+            <a-radio-group @change="changeOpinion" v-decorator="['status', {initialValue: status, rules: [{required: true, message: '审核人不能为空'}]}]">
               <a-radio-button :value="status">
                 通过
               </a-radio-button>
@@ -38,7 +38,8 @@
           >
             <a-textarea
               :rows="4"
-              v-decorator="['advice']"/>
+              v-model="advice"
+            />
           </a-form-item>
         </row-item>
       </row-list>
@@ -62,6 +63,7 @@ export default {
       form: this.$form.createForm(this),
       visible: false,
       status: 0,
+      advice: '同意',
       // 下拉框map
       model: null
     }
@@ -88,6 +90,10 @@ export default {
         ])))
       })
     },
+    changeOpinion (e) {
+      const val = e.target.value
+      this.advice = val === this.status ? '同意' : '拒绝'
+    },
     save () {
       const { form: { validateFieldsAndScroll } } = this
       this.confirmLoading = true
@@ -97,6 +103,7 @@ export default {
           return
         }
         // 日期处理
+        values.advice = this.advice
         checkSbUnused(values)
           .then(() => {
             this.handleCancel(values)
@@ -110,6 +117,7 @@ export default {
       this.confirmLoading = false
       this.status = 0
       this.model = null
+      this.advice = '同意'
       this.form.resetFields()
       if (this.BaseTool.Object.isNotBlank(values)) {
         this.$emit('ok')