From b496da6315314d9bd048ac2214d8bc95d2f1df02 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 13 十一月 2024 08:59:18 +0800
Subject: [PATCH] 优化

---
 company/src/components/enterprise/confirmJobType.vue |   26 +++++++++++++++++++++-----
 1 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/company/src/components/enterprise/confirmJobType.vue b/company/src/components/enterprise/confirmJobType.vue
index 638a430..5425aec 100644
--- a/company/src/components/enterprise/confirmJobType.vue
+++ b/company/src/components/enterprise/confirmJobType.vue
@@ -7,7 +7,7 @@
         @confirm="confirm"
     >
         <el-form class="demo-form-inline">
-            <el-form-item label="娲鹃仯鍗曚綅" required>
+            <el-form-item label="娲鹃仯鍗曚綅" required v-if="type !== 2">
                 <el-select v-model="dw" @change="selectChange" placeholder="璇烽�夋嫨">
                     <el-option
                         v-for="item in dispatching"
@@ -45,6 +45,7 @@
                 form: {
                     solutionId: ''
                 },
+                type: null,
                 data: [],
                 dw: [],
                 gz: [],
@@ -59,9 +60,17 @@
                 this.gz = ''
                 this.form.solutionId = arr.solutionId
                 this.data = arr.seleData
+                this.type = arr.type
                 this.visible = true
                 this.options=[]
-                this.getFindListByDTO()
+                if (arr.type === 2) {
+                  worktype({ id: arr.solutionId, queryType: 0 })
+                    .then(res => {
+                      this.options = res
+                    })
+                } else {
+                  this.getFindListByDTO()
+                }
             },
             getFindListByDTO () {
                 findListByDTO({
@@ -85,9 +94,16 @@
                     })
             },
             confirm() {
-              if(!this.dw || !this.gz){
-                this.$message.error("璇峰厛閫夋嫨娲鹃仯鍗曚綅鍜屽伐绉嶏紒")
-                return;
+              if (this.type === 2) {
+                if(!this.gz){
+                  this.$message.error("璇峰厛閫夋嫨宸ョ锛�")
+                  return;
+                }
+              } else {
+                if(!this.dw || !this.gz){
+                  this.$message.error("璇峰厛閫夋嫨娲鹃仯鍗曚綅鍜屽伐绉嶏紒")
+                  return;
+                }
               }
                 let obj = {
                     workTypeName: '',

--
Gitblit v1.9.3