From 5cbba170e270e6f1c99a91e27dbb7951a27d596a Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期五, 24 十一月 2023 16:41:32 +0800
Subject: [PATCH] 故障报修验收

---
 src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue |   98 +++++++++++++++++++++++++++++++++----------------
 1 files changed, 66 insertions(+), 32 deletions(-)

diff --git a/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue b/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue
index 355f36c..6126aad 100644
--- a/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue
+++ b/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue
@@ -31,25 +31,34 @@
           </a-col>
           <a-col :span="12">
             <a-form-item
-              label="瀵硅薄閮ㄩ棬"
+              label="浣跨敤閮ㄩ棬"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
             >
-              <!-- <j-dict-select-tag
-                allow-clear
+              <!-- <a-input-search
                 :disabled="disableSubmit"
-                :placeholder="disableSubmit?'':'璇烽�夋嫨瀵硅薄閮ㄩ棬'"
-                :triggerChange="true"
-                dictCode="mom_eam_equipment,use_id,id,status!='0' and del_flag!='1' and use_id!='null'"
-                v-decorator="['useId', validatorRules.useId]"
-              /> -->
-              <a-input-search
-                :disabled="disableSubmit"
-                placeholder="璇烽�夋嫨瀵硅薄閮ㄩ棬"
+                placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬"
                 enter-button
                 @search="onDepartList()"
                 :read-only="true"
                 v-decorator="['useDepartName', validatorRules.useDepartName]"
+              /> 
+              <a-tree-select
+                style="width: 100%"
+                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+                :tree-data="treeData"
+                placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬"
+                tree-default-expand-all
+                v-decorator="['useId', validatorRules.useId ]"
+              />-->
+
+              <j-dict-select-tag
+                allow-clear
+                :disabled="disableSubmit"
+                :placeholder="disableSubmit?'':'璇烽�夋嫨浣跨敤閮ㄩ棬'"
+                :triggerChange="true"
+                dictCode="sys_depart,depart_name,id,del_flag!='1'"
+                v-decorator="['useId', {}]"
               />
             </a-form-item>
           </a-col>
@@ -99,25 +108,25 @@
               <a-input
                 allow-clear
                 :disabled="true"
-                :placeholder="disableSubmit?'':'璇疯緭鍏ヨ澶囩紪鐮�/鍚嶇О/鍨嬪彿'"
+                :placeholder="disableSubmit?'':'璇疯緭鍏ョ粺涓�缂栫爜/鍚嶇О/鍨嬪彿'"
                 v-decorator="['equipmentId', validatorRules.equipmentId ]"
               />
             </a-form-item>
           </a-col>
-          <a-col :span="12">
+          <!-- <a-col :span="12">
             <a-form-item
-              label="瀵硅薄閮ㄩ棬Id"
+              label="浣跨敤閮ㄩ棬Id"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
             >
               <a-input
                 allow-clear
                 :disabled="true"
-                :placeholder="disableSubmit?'':'璇疯緭鍏ュ璞¢儴闂╥d'"
+                :placeholder="disableSubmit?'':'璇疯緭鍏ヤ娇鐢ㄩ儴闂╥d'"
                 v-decorator="['useId', validatorRules.useId ]"
               />
             </a-form-item>
-          </a-col>
+          </a-col> -->
         </a-row>
         <a-row :gutter="24">
           <a-col :span="12">
@@ -201,6 +210,7 @@
       rowKey='id'
       :columns="columns"
       :dataSource="dataSource"
+      :pagination="false"
     >
       <template
         v-for="col in columns"
@@ -320,21 +330,21 @@
           align: 'center',
           dataIndex: 'detectionStandard'
         },
-        {
-          title: '鍚堟牸鑼冨洿',
-          align: 'center',
-          dataIndex: 'acceptabilityLimit'
-        },
-        {
-          title: '鏂规硶',
-          align: 'center',
-          dataIndex: 'inspectionMethodName'
-        },
-        {
-          title: '宸ュ叿',
-          align: 'center',
-          dataIndex: 'inspectionTool'
-        },
+        // {
+        //   title: '鍚堟牸鑼冨洿',
+        //   align: 'center',
+        //   dataIndex: 'acceptabilityLimit'
+        // },
+        // {
+        //   title: '鏂规硶',
+        //   align: 'center',
+        //   dataIndex: 'inspectionMethodName'
+        // },
+        // {
+        //   title: '宸ュ叿',
+        //   align: 'center',
+        //   dataIndex: 'inspectionTool'
+        // },
         {
           title: '鍛ㄦ湡',
           align: 'center',
@@ -372,6 +382,7 @@
       isRevise: false,
       model: {},
       inspectionCycles: {},
+      treeData: [],
       labelCol: {
         xs: { span: 24 },
         sm: { span: 6 },
@@ -416,6 +427,8 @@
         getInspectionCycle: "/eam/inspectionStandardDetail/getInspectionCycle",
         revise: '/eam/inspectionStandard/revise',
         getReviseVersion: "/eam/inspectionStandard/getReviseVersion",
+        loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
+        getNum: '/eam/sysIdentity/getNumNew'
       },
 
       dataSource: [],
@@ -456,11 +469,13 @@
 
     add() {
       this.edit({ dailyInspectionStandardDetaillist: [] })
+      this.getSeq()
     },
 
     edit(record) {
       let that = this;
       that.getInspectionCycle()
+      // that.initOptions();
       that.dataSource = [];
       that.form.resetFields();
       that.model = Object.assign({}, record);
@@ -491,6 +506,23 @@
       }
     },
 
+    getSeq() {
+      getAction(this.url.getNum, { type: 'DailylnspectionStandard', length: 4 }).then(res => {
+        if (res.success) {
+          this.form.setFieldsValue({ "num": res.result })
+        }
+      })
+    },
+
+    initOptions() {
+      getAction(this.url.loadOptions).then(res => {
+        if (res.success) {
+          this.treeData = res.result
+        } else {
+          this.$message.warning(res.message)
+        }
+      })
+    },
     onEquipmentList() {
       let data = this.form.getFieldsValue(['useId']);
       this.$refs.EquipmentList.list(data.useId);
@@ -504,7 +536,7 @@
 
     onDepartList() {
       this.$refs.DepartList.list();
-      this.$refs.DepartList.title = "閫夋嫨瀵硅薄閮ㄩ棬";
+      this.$refs.DepartList.title = "閫夋嫨浣跨敤閮ㄩ棬";
     },
     sendDepartRecord(data) {
       this.dataSource = [];
@@ -531,10 +563,12 @@
           let obj;
           if (!this.model.id) {
             formData.versionStatus = '1'
+            formData.approvalStatus = '1'
             obj = postAction(this.url.add, formData);
           } else {
             if (this.isRevise) {
               formData.versionStatus = '1'
+              formData.approvalStatus = '1'
               obj = postAction(this.url.revise, formData);
             } else {
               obj = requestPut(this.url.edit, formData, { id: this.model.id });

--
Gitblit v1.9.3