From a751e547d67c4f8e2c6fddf958c1559f792515bd Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期五, 27 六月 2025 16:11:50 +0800
Subject: [PATCH] 添加工作流

---
 src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue |   89 ++++++++++++++++++++++++++++++++++++--------
 1 files changed, 73 insertions(+), 16 deletions(-)

diff --git a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue
index 5473197..1c9ed22 100644
--- a/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue
+++ b/src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue
@@ -3,14 +3,14 @@
            :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
-        <a-row :gutter="24">
-          <a-col :span="24">
-            <a-form-item label="璁惧缁�" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
-              <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]"
-                              @search="deviceSearch" enter-button/>
-            </a-form-item>
-          </a-col>
-        </a-row>
+        <!--<a-row :gutter="24">-->
+          <!--<a-col :span="24">-->
+            <!--<a-form-item label="璁惧缁�" :labelCol="labelColLong" :wrapperCol="wrapperColLong">-->
+              <!--<a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]"-->
+                              <!--@search="deviceSearch" enter-button placeholder="璇烽�夋嫨璁惧"/>-->
+            <!--</a-form-item>-->
+          <!--</a-col>-->
+        <!--</a-row>-->
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="闆朵欢鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -44,7 +44,7 @@
         </a-row>
       </a-form>
     </a-spin>
-    <mdc-standard-process-duration-modal-list  ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></mdc-standard-process-duration-modal-list>
+    <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'閫夋嫨璁惧'"/>
 
   </a-modal>
 </template>
@@ -52,7 +52,6 @@
 <script>
   import moment from 'moment'
   import pick from 'lodash.pick'
-  import MdcStandardProcessDurationModalList from './MdcStandardProcessDurationModalList'
   // import JDate from './JDate'
   import {
     getAction,
@@ -62,10 +61,11 @@
   import {
     duplicateCheck
   } from '@/api/api'
+  import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer'
 
   export default {
     name: 'MdcStandardProcessDurationModal',
-    components: {MdcStandardProcessDurationModalList},
+    components: { SelectDeviceDrawer },
     props: {},
     data() {
       return {
@@ -118,6 +118,38 @@
               {
                 required:true,
                 message: "璇烽�夋嫨璁惧"
+              },
+            ],
+          },
+          partsCode:{
+            rules:[
+              {
+                required:true,
+                message: "璇疯緭鍏ラ浂浠跺彿"
+              },
+            ],
+          },
+          batchCode:{
+            rules:[
+              {
+                required:true,
+                message: "璇疯緭鍏ユ壒娆″彿"
+              },
+            ],
+          },
+          sequenceNumber:{
+            rules:[
+              {
+                required:true,
+                message: "璇疯緭鍏ョ▼搴忓彿"
+              },
+            ],
+          },
+          duration:{
+            rules:[
+              {
+                required:true,
+                message: "璇疯緭鍏ユ椂闀�"
               },
             ],
           },
@@ -178,9 +210,10 @@
         // })
       },
       deviceSearch() {
-        this.$refs.deviceRepairListModel.openPage()
-        this.$refs.deviceRepairListModel.title = '閫夋嫨璁惧'
-        this.$refs.deviceRepairListModel.disableSubmit = false
+        this.$refs.selectDeviceDrawer.visible = true
+        this.$refs.selectDeviceDrawer.selectedRowKeys = []
+        this.$refs.selectDeviceDrawer.selectedRows = []
+        this.$refs.selectDeviceDrawer.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : []
       },
       //绾ц仈妗唎nChange浜嬩欢
       // onChange(value) {
@@ -256,11 +289,19 @@
                 }
                 obj.then((res) => {
                   if (res.success) {
-                    that.$message.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.$message.warning(res.message)
+                    that.$notification.warning({
+                      message:'娑堟伅',
+                      description:res.message
+                    });
                   }
                 }).finally(() => {
                   that.confirmLoading = false
@@ -308,6 +349,22 @@
       },
       checkboxChange(e) {
         this.checked = e.target.checked
+      },
+
+      /**
+       * 閫夋嫨宸叉湁璁惧鍚庣偣鍑荤‘瀹氭椂瑙﹀彂
+       * @param data 宸查�夋嫨鐨勮澶�
+       */
+      selectOK(data) {
+        // let params = {}
+        // params.equipmentIdList = []
+        // for (var a = 0; a < data.length; a++) {
+        //   params.equipmentIdList.push(data[a])
+        // }
+        console.log('data=', data)
+        this.form.setFieldsValue({
+          equipmentIds: data.join(',')
+        })
       }
     }
   }

--
Gitblit v1.9.3