zenglf
2023-09-28 997835429a1d66643364091e8437ebbbeb8ff97a
src/views/mdc/base/modules/HolidayManagement/HolidayManagementModal.vue
@@ -20,15 +20,18 @@
          </a-col>
          <a-col :span="12">
            <a-form-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input :disabled="disableSubmit" placeholder="请输入类型"
                       v-decorator="['type', validatorRules.type]"/>
              <j-dict-select-tag :readOnly="disableSubmit" placeholder="请选择类型"
                                 :triggerChange="true" dictCode="vacation_type   "
                                 v-decorator="['vacationType', validatorRules.vacationType]" allow-clear/>
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
          <a-form-item label="备注" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
            <a-textarea   v-decorator="['notes', validatorRules.notes]" placeholder="请输入备注"  ></a-textarea>
            <a-textarea  :maxLength="20" v-decorator="['notes', validatorRules.notes]" placeholder="请输入备注"  ></a-textarea>
          </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </a-spin>
@@ -109,6 +112,22 @@
              },
            ],
          },
          vacationDate:{
            rules:[
              {
                required:true,
                message: "请选择休假时间"
              },
            ],
          },
          vacationType:{
            rules:[
              {
                required:true,
                message: "请选择假期类型"
              },
            ],
          },
        },
        url: {
@@ -123,7 +142,6 @@
    },
    created() {
    },
    methods: {
      // disabledDate(current){
      //   //Can not slect days before today and today
@@ -201,7 +219,7 @@
        this.model = Object.assign({}, record)
        this.visible = true
        this.$nextTick(() => {
          this.form.setFieldsValue(pick(this.model, 'equipmentId', 'equipmentName', 'vacationDate', 'type', 'notes',
          this.form.setFieldsValue(pick(this.model, 'equipmentId', 'equipmentName', 'vacationDate', 'vacationType', 'notes',
          ))
        })
      },
@@ -244,11 +262,19 @@
                }
                obj.then((res) => {
                  if (res.success) {
                    that.$message.success("添加成功")
                    // that.$message.success("添加成功")
                    that.$notification.success({
                      message:'消息',
                      description:"添加成功"
                    });
                    // that.$message.success(res.message)
                    that.$emit('ok', res.result)
                  } else {
                    that.$message.warning(res.message)
                    // that.$message.warning(res.message)
                    that.$notification.warning({
                      message:'消息',
                      description:res.message
                    });
                  }
                }).finally(() => {
                  that.confirmLoading = false