From 102c7d7dc9f5af873f19c86a0d17d5d6addcbc32 Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期二, 19 九月 2023 17:39:28 +0800
Subject: [PATCH] 项目优化

---
 src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalEdit.vue |   82 +++++++++++++++++++++++------------------
 1 files changed, 46 insertions(+), 36 deletions(-)

diff --git a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalEdit.vue b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalEdit.vue
index 39c77fd..683850e 100644
--- a/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalEdit.vue
+++ b/src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModalEdit.vue
@@ -21,7 +21,7 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="鎵煩鍊�" :labelCol="labelCol" :wrapperCol="wrapperCol">
-              <a-input :disabled="disableSubmit" placeholder="璇疯緭鍏ユ壄鐭╁��"
+              <a-input-number :min="0" :disabled="disableSubmit" placeholder="璇疯緭鍏ユ壄鐭╁��"
                        v-decorator="['torqueValue', validatorRules.torqueValue]"/>
             </a-form-item>
           </a-col>
@@ -32,6 +32,11 @@
                        v-decorator="['equipmentId',validatorRules.equipmentId]"/>
             </a-form-item>
           </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-form-item label="澶囨敞" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
+            <a-textarea :maxLength="20" :disabled="disableSubmit"  v-decorator="['notes', validatorRules.notes]" placeholder="璇疯緭鍏ュ娉�"  ></a-textarea>
+          </a-form-item>
         </a-row>
       </a-form>
     </a-spin>
@@ -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,46 @@
             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.$notification.success({
+                  message:'娑堟伅',
+                  description:"淇敼鎴愬姛"
+                });
+                // that.$message.success(res.message)
+                that.$emit('ok', res.result)
+              } else {
+                // that.$message.warning(res.message)
+                that.$notification.warning({
+                  message:'娑堟伅',
+                  description: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]
       },
@@ -309,7 +316,7 @@
   }
 </script>
 
-<style scoped>
+<style scoped lang="less">
   .ant-btn {
     padding: 0 10px;
     margin-left: 3px;
@@ -328,4 +335,7 @@
   .ant-tabs-content .ant-form-item {
     margin-bottom: 0px;
   }
+  /deep/ .ant-input-number{
+    width: 100%!important;
+  }
 </style>

--
Gitblit v1.9.3