zhuzhuanzhuan
2023-07-17 60d2e9bb9f9cd08fec6a5bf58dc698c9f204b716
src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalEdit.vue
@@ -33,6 +33,11 @@
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-form-item label="备注" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
            <a-textarea  :disabled="disableSubmit"  v-decorator="['notes', validatorRules.notes]" placeholder="请输入备注"  ></a-textarea>
          </a-form-item>
        </a-row>
      </a-form>
    </a-spin>
    <!--<device-repair-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></device-repair-list-model>-->
@@ -133,7 +138,7 @@
        url: {
          add: '/mdc/mdcEquipmentRepair/add',
          edit: '/mdc/mdcEquipmentRepair/edit'
          edit: '/mdc/MdcTorqueConfig/editMdcTorqueConfig'
        },
        disableSubmit: true,
@@ -223,7 +228,7 @@
        // this.editStart  = (this.model.startTime).replace(/:/g,'');
        this.visible = true
        this.$nextTick(() => {
          this.form.setFieldsValue(pick(this.model,'equipmentId', 'equipmentName','torqueDate', 'torqueValue',
          this.form.setFieldsValue(pick(this.model,'equipmentId', 'equipmentName','torqueDate', 'torqueValue','notes'
          ))
        })
      },
@@ -240,44 +245,38 @@
            that.confirmLoading = true
            let formData = Object.assign(this.model, values)
            let obj
                if (!this.model.id) {
                  obj = postAction(this.url.add, formData)
                } else {
                  obj = requestPut(this.url.edit, formData, {
                    id: this.model.id
                  })
                  let shijian = startOne
                }
                obj.then((res) => {
                  if (res.success) {
                    // that.$message.success("修改成功")
                    that.$message.success(res.message)
                    that.$emit('ok', res.result)
                  } else {
                    that.$message.warning(res.message)
                  }
                }).finally(() => {
                  that.confirmLoading = false
                  that.close()
                })
            if (!this.model.id) {
              obj = postAction(this.url.add, formData)
            } else {
              obj = requestPut(this.url.edit, formData, {
                id: this.model.id
              })
            }
            obj.then((res) => {
              if (res.success) {
                that.$message.success("修改成功")
                // that.$message.success(res.message)
                that.$emit('ok', res.result)
              } else {
                that.$message.warning(res.message)
              }
            // }
          // }
            }).finally(() => {
              that.confirmLoading = false
              that.close()
            })
          }
        })
      },
      handleCancel() {
        this.close()
      },
      loadCascade() {
        getAction(this.url.loadCascadeData).then((res) => {
          if (res.success) {
            this.partCategoryCascade = res.result
          }
        })
      },
      // loadCascade() {
      //   getAction(this.url.loadCascadeData).then((res) => {
      //     if (res.success) {
      //       this.partCategoryCascade = res.result
      //     }
      //   })
      // },
      onCascadeChange(value, selectedOptions) {
        this.cascadeDefaultValue = [...value]
      },