From 3457909638c660c0cfcb521b6104ab64c679b914 Mon Sep 17 00:00:00 2001
From: zenglf <18502938215@163.com>
Date: 星期二, 19 九月 2023 16:23:16 +0800
Subject: [PATCH] 修改页面左右展示比例

---
 src/views/eam/modules/equipmentNew/EquipmentModal.vue |  173 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 156 insertions(+), 17 deletions(-)

diff --git a/src/views/eam/modules/equipmentNew/EquipmentModal.vue b/src/views/eam/modules/equipmentNew/EquipmentModal.vue
index 5f15ffd..a9b5db4 100644
--- a/src/views/eam/modules/equipmentNew/EquipmentModal.vue
+++ b/src/views/eam/modules/equipmentNew/EquipmentModal.vue
@@ -79,6 +79,8 @@
               ></a-input>
             </a-form-model-item>
           </a-col>
+        </a-row>
+        <a-row>
           <a-col :span="6">
             <a-form-model-item
               label="瑙勬牸"
@@ -120,6 +122,8 @@
               ></j-image-upload>
             </a-form-model-item>
           </a-col>
+        </a-row>
+        <a-row>
           <a-divider
             orientation="center"
             style="font-size: large;font-style: italic;color: #66aeed;"
@@ -179,6 +183,42 @@
           </a-col>
           <a-col :span="6">
             <a-form-model-item
+              label="杞﹂棿"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="factoryModelId"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="formDisabled"
+                placeholder="璇烽�夋嫨璧勮溅闂�"
+                :triggerChange="true"
+                dictCode="mom_base_factory_model,name,id,del_flag!='1'"
+                v-model="model.factoryModelId"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="6">
+            <a-form-model-item
+              label="浜х嚎"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="workCenterId"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="formDisabled"
+                placeholder="璇烽�夋嫨浜х嚎"
+                :triggerChange="true"
+                dictCode="mom_base_work_center,name,id,del_flag!='1'"
+                v-model="model.workCenterId"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
               label="璧勪骇鍒堕�犲晢"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
@@ -194,27 +234,12 @@
               />
             </a-form-model-item>
           </a-col>
+        </a-row>
+        <a-row>
           <a-divider
             orientation="center"
             style="font-size: large;font-style: italic;color: #66aeed;"
           >鐘舵�佸強鏍囪瘑</a-divider>
-          <a-col :span="6">
-            <a-form-model-item
-              label="鍏抽敭璁惧鏍囪瘑"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="specificEquipment"
-            >
-              <j-dict-select-tag
-                allow-clear
-                placeholder="璇烽�夋嫨鍏抽敭璁惧鏍囪瘑"
-                :disabled="formDisabled"
-                :triggerChange="true"
-                dictCode="specific_equipment"
-                v-model="model.specificEquipment"
-              />
-            </a-form-model-item>
-          </a-col>
           <a-col :span="6">
             <a-form-model-item
               label="璁惧鐘舵��"
@@ -249,6 +274,51 @@
               />
             </a-form-model-item>
           </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璧勪骇鐘舵��"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="propertyStatus"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ヨ祫浜х姸鎬�"
+                :triggerChange="true"
+                dictCode="property_status"
+                v-model="model.propertyStatus"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row v-if="model.propertyStatus=='warranty'">
+          <a-divider
+            orientation="center"
+            style="font-size: large;font-style: italic;color: #66aeed;"
+          >璐ㄤ繚鏃ユ湡</a-divider>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璐ㄤ繚寮�濮嬫棩鏈�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="warrantyStart"
+            >
+            <j-date  :disabled="formDisabled" style="width: 100%;" placeholder="璇烽�夋嫨寮�濮嬫棩鏈�" class="query-group-cust" v-model="model.warrantyStart"></j-date>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璐ㄤ繚缁撴潫鏃ユ湡"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="warrantyEnd"
+            >
+            <j-date  :disabled="formDisabled" style="width: 100%;" placeholder="璇烽�夋嫨缁撴潫鏃ユ湡" class="query-group-cust" v-model="model.warrantyEnd"></j-date>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
           <a-divider
             orientation="center"
             style="font-size: large;font-style: italic;color: #66aeed;"
@@ -282,6 +352,7 @@
               />
             </a-form-model-item>
           </a-col>
+       
           <a-col :span="6">
             <a-form-model-item
               label="楠屾敹鏃ユ湡"
@@ -311,6 +382,8 @@
               ></a-input>
             </a-form-model-item>
           </a-col>
+        </a-row>
+        <a-row>
           <a-col :span="6">
             <a-form-model-item
               label="宸ュ尯"
@@ -339,6 +412,7 @@
               ></a-input>
             </a-form-model-item>
           </a-col>
+      
           <a-col :span="6">
             <a-form-model-item
               label="閲嶉噺璁¢噺鍗曚綅"
@@ -367,6 +441,8 @@
               ></a-input>
             </a-form-model-item>
           </a-col>
+        </a-row>
+        <a-row>
           <a-col :span="6">
             <a-form-model-item
               label="鍔熻兘浣嶇疆"
@@ -395,6 +471,7 @@
               ></a-input>
             </a-form-model-item>
           </a-col>
+      
           <a-col :span="6">
             <a-form-model-item
               label="璧勪骇鏉ユ簮鍥藉"
@@ -479,6 +556,8 @@
               ></a-input>
             </a-form-model-item>
           </a-col>
+        </a-row>
+        <a-row>
           <a-col :span="6">
             <a-form-model-item
               label="绯荤粺"
@@ -540,6 +619,8 @@
             orientation="center"
             style="font-size: large;font-style: italic;color: #66aeed;"
           >ABC鏍囪瘑</a-divider>
+        </a-row>
+        <a-row>
           <a-col :span="6">
             <a-form-model-item
               label="骞冲潎浣跨敤鐜�"
@@ -612,6 +693,8 @@
               />
             </a-form-model-item>
           </a-col>
+        </a-row>
+        <a-row>
           <a-col :span="6">
             <a-form-model-item
               label="鏁呴殰棰戠巼"
@@ -661,10 +744,30 @@
                 placeholder="璇烽�夋嫨ABC鏍囪瘑"
                 :triggerChange="true"
                 dictCode="ABC-standard-result"
+                @change="changeNeedSpecific"
                 v-model="model.equipmentImportanceId"
               />
             </a-form-model-item>
           </a-col>
+          <a-col :span="6" v-if="needSpecific">
+            <a-form-model-item
+              label="鍏抽敭璁惧鏍囪瘑"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="specificEquipment"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨鍏抽敭璁惧鏍囪瘑"
+                :disabled="formDisabled"
+                :triggerChange="true"
+                dictCode="specific_equipment"
+                v-model="model.specificEquipment"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
           <a-divider
             orientation="center"
             style="font-size: large;font-style: italic;color: #66aeed;"
@@ -847,6 +950,21 @@
         technologyStatus:[
         { required: true, message: '璇烽�夋嫨璁惧鐘舵��!' },
         ],
+        workCenterId:[
+        { required: true, message: '璇烽�夋嫨璁惧浜х嚎!' },
+        ],
+        factoryModelId:[
+        { required: true, message: '璇烽�夋嫨璁惧杞﹂棿!' },
+        ],
+        warrantyStart:[
+        { required: true, message: '璇烽�夋嫨寮�濮嬫棩鏈�!' },
+        ],
+        warrantyEnd:[
+        { required: true, message: '璇烽�夋嫨缁撴潫鏃ユ湡!' },
+        ],
+        propertyStatus:[
+        { required: true, message: '璇烽�夋嫨璧勪骇鐘舵��!' },
+        ],
       },
       url: {
         add: "/eam/equipment/add",
@@ -854,6 +972,7 @@
         loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
       },
       treeData: [],
+      needSpecific:false,
 
     }
   },
@@ -864,6 +983,7 @@
   },
   methods: {
     add() {
+      this
       this.edit(this.modelDefault);
     },
     edit(record) {
@@ -1044,6 +1164,25 @@
       }
       this.model = Object.assign({}, this.model);
 
+    },
+    changeNeedSpecific(val){
+       if(val=='A'){
+          this.needSpecific=true;
+       }else{
+        let that = this;
+        this.$confirm({
+            title: '鎻愮ず',
+            content: '闈濧绫昏澶囷紝鏄惁瑕佹坊鍔犲叧閿澶囨爣璇嗭紒',
+            okText: '纭',
+            cancelText: '鍙栨秷',
+            onOk() {
+              that.needSpecific = true;
+            },
+            onCancel(){
+              that.needSpecific = false;
+            }
+        })
+       }
     }
   },
   computed: {

--
Gitblit v1.9.3