From 585fb0bbd4a7bc7f8f333ecba7c5fecd2ee5cbc2 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期四, 28 三月 2024 09:46:44 +0800
Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop

---
 src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue |  110 ++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 81 insertions(+), 29 deletions(-)

diff --git a/src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue b/src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue
index 3a7a7af..3c8955e 100644
--- a/src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue
+++ b/src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue
@@ -107,9 +107,9 @@
               </a-col>
             </a-row>
             <a-row :gutter="24">
-              <a-col :span="24">
+              <a-col :span="17">
                 <a-form-item
-                  label="闂鍙婂鐞嗘帾鏂芥弿杩�"
+                  label="闂/澶勭悊鎺柦"
                   :labelCol="{span:3}"
                   :wrapperCol="{span:18}"
                   class="hightColor"
@@ -117,8 +117,23 @@
                   <a-textarea
                     allowClear
                     :disabled="this.model.status!='4'"
-                    :placeholder="'璇疯緭鍏ラ棶棰樺強澶勭悊鎺柦鎻忚堪'"
+                    :placeholder="'璇风淮淇汉鍛樼瀛楀~鍐欙紒'"
                     v-model="model.description"
+                  />
+                </a-form-item>
+              </a-col>
+              <a-col :span="7">
+                <a-form-item
+                  label="淇濆吇浜�"
+                  :labelCol="{span:4}"
+                  :wrapperCol="{span:17}"
+                  class="hightColor"
+                >
+                  <a-input
+                    :disabled="this.model.status!='4'"
+                    allow-clear
+                    placeholder="璇疯緭鍏ヤ繚鍏讳汉"
+                    v-model="model.maintenanceUserId"
                   />
                 </a-form-item>
               </a-col>
@@ -155,7 +170,7 @@
                     slot-scope='text, record, index'
                   >
                     <div :key="col.dataIndex">
-                      <span
+                      <!-- <span
                         v-if=" col.dataIndex == 'photo' && !text"
                         style="font-size: 12px;font-style: italic;"
                       >鏃犲浘鐗�</span>
@@ -166,7 +181,7 @@
                         height="25px"
                         alt=""
                         style="max-width:80px;font-size: 12px;font-style: italic;"
-                      />
+                      /> -->
                       <!-- 绀烘剰鍥� 寮�濮� -->
                       <!-- <Tooltip
                         placement="top"
@@ -197,8 +212,9 @@
                         v-if="col.dataIndex == 'maintenanceOrderDetailUda1'"
                         @change="(e)=>handleChange(e, record.key, col, index)"
                         placeholder="璇疯緭鍏ヤ繚鍏讳汉"
-                        :disabled="record.disabled"
+                        :disabled="true"
                       />
+                      <!-- :disabled="record.disabled" -->
                       <!-- <a-input
                         :value="text"
                         v-if="col.dataIndex == 'maintenanceOrderDetailUda2'"
@@ -238,7 +254,7 @@
               </div>
             </a-tab-pane>
 
-            <a-tab-pane
+            <!-- <a-tab-pane
               tab='璁″垝鐢ㄦ枡'
               key="2"
             >
@@ -285,7 +301,7 @@
                   :equipmentId="this.model.equipmentId"
                 ></actual-material-edit-table>
               </div>
-            </a-tab-pane>
+            </a-tab-pane>-->
             <a-tab-pane
               tab='瀹為檯宸ユ椂'
               key="6"
@@ -417,11 +433,11 @@
           }
 
         },
-        {
-          title: '閮ㄤ綅',
-          align: 'center',
-          dataIndex: 'location',
-        },
+        // {
+        //   title: '閮ㄤ綅',
+        //   align: 'center',
+        //   dataIndex: 'location',
+        // },
         // class: "notshow"
         // {
         //   title: '绀烘剰鍥�',
@@ -431,15 +447,20 @@
         // },
         // class: "notshow"
         {
-          title: '淇濆吇椤圭洰',
+          title: '淇濆吇瑙掕壊',
+          align: 'center',
+          dataIndex: 'maintenanceRole',
+        },
+        {
+          title: '淇濆吇鍐呭',
           align: 'center',
           dataIndex: 'maintenanceProjectNum',
         },
-        {
-          title: '淇濆吇鏍囧噯',
-          align: 'center',
-          dataIndex: 'standard',
-        },
+        // {
+        //   title: '淇濆吇鏍囧噯',
+        //   align: 'center',
+        //   dataIndex: 'standard',
+        // },
         // {
         //   title: '鏂规硶',
         //   align: 'center',
@@ -460,11 +481,11 @@
         //   align: 'center',
         //   dataIndex: 'workingHourQuota',
         // },
-        {
-          title: '淇濆吇鍛ㄦ湡',
-          align: 'center',
-          dataIndex: 'maintenanceCycleName',
-        },
+        // {
+        //   title: '淇濆吇鍛ㄦ湡',
+        //   align: 'center',
+        //   dataIndex: 'maintenanceCycleName',
+        // },
         // {
         //   title: '缁翠繚涓撲笟',
         //   align: 'center',
@@ -599,13 +620,31 @@
     handleReport() {
       const that = this;
       that.confirmLoading = true;
+      for (let i = 0; i < that.dataSource.length; i++) {
+        let o = this.dataSource[i]
+        if (o.maintenanceOrderDetailUda2 == null || o.maintenanceOrderDetailUda2 == '') {
+          that.$message.warning("璇峰~鍐欑" + (i + 1) + "鎵ц鎯呭喌锛�");
+          that.confirmLoading = false;
+          return
+        }
+        // if (o.maintenanceOrderDetailUda1 == null || o.maintenanceOrderDetailUda1 == '') {
+        //   that.$message.warning("璇峰~鍐欑" + (i + 1) + "淇濆吇浜猴紒");
+        //   that.confirmLoading = false;
+        //   return
+        // }
+      }
+      if (that.model.maintenanceUserId == null || that.model.maintenanceUserId == "") {
+        that.$message.warning("璇峰~鍐欎繚鍏讳汉锛�");
+        that.confirmLoading = false;
+        return
+      }
       this.$confirm({
         title: '淇濆吇宸ュ崟鎶ュ伐',
         content: '鎻愮ず锛氭姤宸ュ悗淇濆吇瀹屽伐锛岃璋ㄦ厧鎿嶄綔锛�',
         okText: '纭',
         cancelText: '鍙栨秷',
         onOk() {
-          requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description }).then((res) => {
+          requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description, dailyMaintenanceOrderDetails: that.dataSource, maintenanceUserId: that.model.maintenanceUserId }).then((res) => {
             if (res.success) {
               that.model.status = '5'
               that.$message.success(res.message)
@@ -657,6 +696,19 @@
     handleOk() {
       const that = this
       this.loading = true;
+      for (let i = 0; i < that.dataSource.length; i++) {
+        let o = this.dataSource[i]
+        if (o.maintenanceOrderDetailUda2 == null || o.maintenanceOrderDetailUda2 == '') {
+          that.$message.warning("璇峰~鍐欑" + (i + 1) + "鎵ц鎯呭喌锛�");
+          that.loading = false;
+          return
+        }
+        // if (o.maintenanceOrderDetailUda1 == null || o.maintenanceOrderDetailUda1 == '') {
+        //   that.$message.warning("璇峰~鍐欑" + (i + 1) + "淇濆吇浜猴紒");
+        //   that.loading = false;
+        //   return
+        // }
+      }
       this.form.validateFields((err, values) => {
         if (!err) {
           that.confirmLoading = true
@@ -665,7 +717,7 @@
           let obj = obj = postAction(this.url.edit, formData)
           obj.then((res) => {
             if (res.success) {
-              that.$message.success(res.message)
+              that.$message.success("淇濆瓨鎴愬姛锛�")
               that.$emit('ok')
             } else {
               that.$message.warning(res.message)
@@ -686,9 +738,9 @@
       const target = temp[index];
       if (target) {
         target[column.dataIndex] = value;
-        if ('maintenanceOrderDetailUda1' == column.dataIndex) {
-          target['maintenanceOrderDetailUda1'] = value.target.value;
-        }
+        // if ('maintenanceOrderDetailUda1' == column.dataIndex) {
+        //   target['maintenanceOrderDetailUda1'] = value.target.value;
+        // }
         if ('maintenanceOrderDetailUda2' == column.dataIndex) {
           target['maintenanceOrderDetailUda2'] = value.target.value;
         }

--
Gitblit v1.9.3