From 03bb7a267ef4daa31ee435b4e540df385053d198 Mon Sep 17 00:00:00 2001
From: 懒羊羊 <15939171744@163.com>
Date: 星期四, 14 十二月 2023 15:40:49 +0800
Subject: [PATCH] 工单

---
 jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/service/IBsTechnologyRouteInfoService.java         |    2 
 jcdm-main/src/main/resources/mapper/bs/technologyRouteChild/BsTechnologyRouteChildInfoMapper.xml            |   39 +++++++++
 jcdm-main/src/main/java/com/jcdm/main/bs/technologyRouteChild/mapper/BsTechnologyRouteChildInfoMapper.java  |    3 
 jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/service/impl/BsTechnologyRouteInfoServiceImpl.java |   18 ++++
 jcdm-ui/src/views/main/om/productionOrde/index.vue                                                          |  113 +++-------------------------
 jcdm-ui/src/views/main/bs/technologyRoute/index.vue                                                         |    9 +-
 jcdm-ui/src/api/main/bs/technologyRoute/technologyRoute.js                                                  |    8 ++
 jcdm-ui/src/views/main/bs/technologyRouteChild/index.vue                                                    |   11 +-
 jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/controller/BsTechnologyRouteInfoController.java    |   11 ++
 jcdm-main/src/main/java/com/jcdm/main/bs/technologyRouteChild/domain/BsTechnologyRouteChildInfo.java        |   11 ++
 10 files changed, 114 insertions(+), 111 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/controller/BsTechnologyRouteInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/controller/BsTechnologyRouteInfoController.java
index 9234bf6..391441d 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/controller/BsTechnologyRouteInfoController.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/controller/BsTechnologyRouteInfoController.java
@@ -93,6 +93,17 @@
     }
 
     /**
+     * 淇敼宸ヨ壓娴佺▼浠ュ強瀛愬伐鑹�
+     */
+    @PreAuthorize("@ss.hasPermi('bs:technologyRouteAndChild:edit')")
+    @Log(title = "宸ヨ壓娴佺▼And瀛愪俊鎭�", businessType = BusinessType.UPDATE)
+    @PutMapping("/technologyRouteAndChild")
+    public AjaxResult technologyRouteAndChild(@RequestBody BsTechnologyRouteInfo bsTechnologyRouteInfo)
+    {
+        return toAjax(bsTechnologyRouteInfoService.updateBsTechnologyRouteAndChildInfo(bsTechnologyRouteInfo));
+    }
+
+    /**
      * 鍒犻櫎宸ヨ壓娴佺▼
      */
     @PreAuthorize("@ss.hasPermi('bs:technologyRoute:remove')")
diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/service/IBsTechnologyRouteInfoService.java b/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/service/IBsTechnologyRouteInfoService.java
index 58533d4..763724c 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/service/IBsTechnologyRouteInfoService.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/service/IBsTechnologyRouteInfoService.java
@@ -59,4 +59,6 @@
      * @return 缁撴灉
      */
     public int deleteBsTechnologyRouteInfoById(Long id);
+
+    public int updateBsTechnologyRouteAndChildInfo(BsTechnologyRouteInfo bsTechnologyRouteInfo);
 }
diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/service/impl/BsTechnologyRouteInfoServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/service/impl/BsTechnologyRouteInfoServiceImpl.java
index ccddb07..8dc5452 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/service/impl/BsTechnologyRouteInfoServiceImpl.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRoute/service/impl/BsTechnologyRouteInfoServiceImpl.java
@@ -2,6 +2,7 @@
 
 import java.util.List;
 import com.jcdm.common.utils.DateUtils;
+import com.jcdm.main.bs.domain.BsTechnologyRouteChildInfo;
 import com.jcdm.main.bs.technologyRoute.domain.BsTechnologyRouteInfo;
 import com.jcdm.main.bs.technologyRoute.mapper.BsTechnologyRouteInfoMapper;
 import com.jcdm.main.bs.technologyRoute.service.IBsTechnologyRouteInfoService;
@@ -21,6 +22,10 @@
 {
     @Autowired
     private BsTechnologyRouteInfoMapper bsTechnologyRouteInfoMapper;
+
+
+    @Autowired
+    private com.jcdm.main.bs.mapper.BsTechnologyRouteChildInfoMapper bsTechnologyRouteChildInfoMapper;
 
     /**
      * 鏌ヨ宸ヨ壓娴佺▼
@@ -97,4 +102,17 @@
     {
         return bsTechnologyRouteInfoMapper.deleteBsTechnologyRouteInfoById(id);
     }
+
+    @Override
+    public int updateBsTechnologyRouteAndChildInfo(BsTechnologyRouteInfo bsTechnologyRouteInfo) {
+        int i = this.updateBsTechnologyRouteInfo(bsTechnologyRouteInfo);
+        com.jcdm.main.bs.domain.BsTechnologyRouteChildInfo  bsTechnologyRouteChildInfo = new com.jcdm.main.bs.domain.BsTechnologyRouteChildInfo();
+        bsTechnologyRouteChildInfo.setRouteCode(bsTechnologyRouteInfo.getRouteCode());
+        List<BsTechnologyRouteChildInfo> bsTechnologyRouteChildInfos = bsTechnologyRouteChildInfoMapper.selectBsTechnologyRouteChildInfoList(bsTechnologyRouteChildInfo);
+        for (com.jcdm.main.bs.domain.BsTechnologyRouteChildInfo technologyRouteChildInfo : bsTechnologyRouteChildInfos) {
+            technologyRouteChildInfo.setSpareField4(bsTechnologyRouteInfo.getRouteName());
+            int i1 = bsTechnologyRouteChildInfoMapper.updateBsTechnologyRouteChildByCodeInfo(technologyRouteChildInfo);
+        }
+        return i;
+    }
 }
diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRouteChild/domain/BsTechnologyRouteChildInfo.java b/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRouteChild/domain/BsTechnologyRouteChildInfo.java
index 691a48b..e6f67ec 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRouteChild/domain/BsTechnologyRouteChildInfo.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRouteChild/domain/BsTechnologyRouteChildInfo.java
@@ -74,6 +74,9 @@
     /** 棰勭暀瀛楁4 */
     private String spareField4;
 
+    /** 宸ヨ壓娴佺▼ID */
+    private String routeId;
+
     public void setId(Long id) 
     {
         this.id = id;
@@ -219,6 +222,14 @@
         return spareField4;
     }
 
+    public String getRouteId() {
+        return routeId;
+    }
+
+    public void setRouteId(String routeId) {
+        this.routeId = routeId;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRouteChild/mapper/BsTechnologyRouteChildInfoMapper.java b/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRouteChild/mapper/BsTechnologyRouteChildInfoMapper.java
index 8cdd81b..fc09dd9 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRouteChild/mapper/BsTechnologyRouteChildInfoMapper.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/technologyRouteChild/mapper/BsTechnologyRouteChildInfoMapper.java
@@ -43,6 +43,9 @@
      */
     public int updateBsTechnologyRouteChildInfo(BsTechnologyRouteChildInfo bsTechnologyRouteChildInfo);
 
+    public int updateBsTechnologyRouteChildByCodeInfo(BsTechnologyRouteChildInfo bsTechnologyRouteChildInfo);
+
+
     /**
      * 鍒犻櫎宸ヨ壓璺嚎瀛愪俊鎭�
      * 
diff --git a/jcdm-main/src/main/resources/mapper/bs/technologyRouteChild/BsTechnologyRouteChildInfoMapper.xml b/jcdm-main/src/main/resources/mapper/bs/technologyRouteChild/BsTechnologyRouteChildInfoMapper.xml
index 3d15ab8..f419c15 100644
--- a/jcdm-main/src/main/resources/mapper/bs/technologyRouteChild/BsTechnologyRouteChildInfoMapper.xml
+++ b/jcdm-main/src/main/resources/mapper/bs/technologyRouteChild/BsTechnologyRouteChildInfoMapper.xml
@@ -24,10 +24,12 @@
         <result property="spareField2"    column="spare_field_2"    />
         <result property="spareField3"    column="spare_field_3"    />
         <result property="spareField4"    column="spare_field_4"    />
+        <result property="routeId"    column="route_id"    />
+
     </resultMap>
 
     <sql id="selectBsTechnologyRouteChildInfoVo">
-        select id, processes_code, processes_name, step_no, next_process, next_process_bond, key_processes_flag, preparation_time, wait_time, create_user, create_time, update_user, update_time, remark, route_code, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from bs_technology_route_child_info
+        select route_id, id, processes_code, processes_name, step_no, next_process, next_process_bond, key_processes_flag, preparation_time, wait_time, create_user, create_time, update_user, update_time, remark, route_code, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from bs_technology_route_child_info
     </sql>
 
     <select id="selectBsTechnologyRouteChildInfoList" parameterType="BsTechnologyRouteChildInfo" resultMap="BsTechnologyRouteChildInfoResult">
@@ -68,7 +70,8 @@
             <if test="spareField2 != null">spare_field_2,</if>
             <if test="spareField3 != null">spare_field_3,</if>
             <if test="spareField4 != null">spare_field_4,</if>
-         </trim>
+            <if test="routeId != null">route_id,</if>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
             <if test="processesCode != null and processesCode != ''">#{processesCode},</if>
@@ -89,7 +92,8 @@
             <if test="spareField2 != null">#{spareField2},</if>
             <if test="spareField3 != null">#{spareField3},</if>
             <if test="spareField4 != null">#{spareField4},</if>
-         </trim>
+            <if test="routeId != null">#{routeId},</if>
+        </trim>
     </insert>
 
     <update id="updateBsTechnologyRouteChildInfo" parameterType="BsTechnologyRouteChildInfo">
@@ -113,10 +117,39 @@
             <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
             <if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
             <if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
+            <if test="routeId != null">route_id = #{routeId},</if>
+
         </trim>
         where id = #{id}
     </update>
 
+    <update id="updateBsTechnologyRouteChildByCodeInfo" parameterType="BsTechnologyRouteChildInfo">
+        update bs_technology_route_child_info
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="processesCode != null and processesCode != ''">processes_code = #{processesCode},</if>
+            <if test="processesName != null">processes_name = #{processesName},</if>
+            <if test="stepNo != null">step_no = #{stepNo},</if>
+            <if test="nextProcess != null">next_process = #{nextProcess},</if>
+            <if test="nextProcessBond != null">next_process_bond = #{nextProcessBond},</if>
+            <if test="keyProcessesFlag != null">key_processes_flag = #{keyProcessesFlag},</if>
+            <if test="preparationTime != null">preparation_time = #{preparationTime},</if>
+            <if test="waitTime != null">wait_time = #{waitTime},</if>
+            <if test="createUser != null">create_user = #{createUser},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateUser != null">update_user = #{updateUser},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="routeCode != null">route_code = #{routeCode},</if>
+            <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
+            <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
+            <if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
+            <if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
+            <if test="routeId != null">route_id = #{routeId},</if>
+
+        </trim>
+        where route_code = #{routeCode}
+    </update>
+
     <delete id="deleteBsTechnologyRouteChildInfoById" parameterType="Long">
         delete from bs_technology_route_child_info where id = #{id}
     </delete>
diff --git a/jcdm-ui/src/api/main/bs/technologyRoute/technologyRoute.js b/jcdm-ui/src/api/main/bs/technologyRoute/technologyRoute.js
index 517a93c..9a104dd 100644
--- a/jcdm-ui/src/api/main/bs/technologyRoute/technologyRoute.js
+++ b/jcdm-ui/src/api/main/bs/technologyRoute/technologyRoute.js
@@ -35,6 +35,14 @@
   })
 }
 
+export function updateTechnologyRouteAndChild(data) {
+  return request({
+    url: '/bs/technologyRoute/technologyRouteAndChild',
+    method: 'put',
+    data: data
+  })
+}
+
 // 鍒犻櫎宸ヨ壓娴佺▼
 export function delTechnologyRoute(id) {
   return request({
diff --git a/jcdm-ui/src/views/main/bs/technologyRoute/index.vue b/jcdm-ui/src/views/main/bs/technologyRoute/index.vue
index da565df..8870a8c 100644
--- a/jcdm-ui/src/views/main/bs/technologyRoute/index.vue
+++ b/jcdm-ui/src/views/main/bs/technologyRoute/index.vue
@@ -110,7 +110,7 @@
         <el-table-column type="selection" width="55" align="center" />
         <el-table-column label="宸ヨ壓娴佺▼缂栫爜" width="130" align="center">
           <template slot-scope="scope">
-            <router-link :to="{path: '/main/route-data/index/', query: {routeCode: scope.row.routeCode} }" class="link-type">
+            <router-link :to="{path: '/main/route-data/index/', query: {routeCode: scope.row.routeCode,routeId: scope.row.id} }" class="link-type">
               <span>{{ scope.row.routeCode }}</span>
             </router-link>
           </template>
@@ -140,7 +140,7 @@
         </el-table-column>
         <el-table-column label="鏇存敼鏃堕棿" width="160" align="center" prop="updateTime">
         </el-table-column>
-        <el-table-column label="鎿嶄綔" width="130" align="center" class-name="small-padding fixed-width">
+        <el-table-column fixed="right" label="鎿嶄綔" width="200" align="center" class-name="small-padding fixed-width">
           <template slot-scope="scope">
             <el-button
               size="mini"
@@ -220,7 +220,7 @@
 </template>
 
 <script>
-import { listTechnologyRoute, getTechnologyRoute, delTechnologyRoute, addTechnologyRoute, updateTechnologyRoute } from "@/api/main/bs/technologyRoute/technologyRoute";
+import { updateTechnologyRouteAndChild, listTechnologyRoute, getTechnologyRoute, delTechnologyRoute, addTechnologyRoute, updateTechnologyRoute } from "@/api/main/bs/technologyRoute/technologyRoute";
 
 export default {
   name: "TechnologyRoute",
@@ -354,7 +354,8 @@
       this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.form.id != null) {
-            updateTechnologyRoute(this.form).then(response => {
+            // updateTechnologyRoute(this.form).then(response => {
+            updateTechnologyRouteAndChild(this.form).then(response => {
               this.$modal.msgSuccess("淇敼鎴愬姛");
               this.open = false;
               this.getList();
diff --git a/jcdm-ui/src/views/main/bs/technologyRouteChild/index.vue b/jcdm-ui/src/views/main/bs/technologyRouteChild/index.vue
index 215940b..bed0577 100644
--- a/jcdm-ui/src/views/main/bs/technologyRouteChild/index.vue
+++ b/jcdm-ui/src/views/main/bs/technologyRouteChild/index.vue
@@ -144,7 +144,7 @@
         </el-table-column>
         <el-table-column width="130" :show-overflow-tooltip='true' label="宸ヨ壓娴佺▼缂栫爜" align="center" prop="routeCode">
         </el-table-column>
-        <el-table-column width="100" label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+        <el-table-column width="200" label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
           <template slot-scope="scope">
             <el-button
               size="mini"
@@ -284,6 +284,7 @@
       // 寮瑰嚭灞傛爣棰�
       title: "",
       queryRouteCode: "",
+      queryRouteId: "",
       // 鏄惁鏄剧ず寮瑰嚭灞�
       open: false,
       // 鏌ヨ鍙傛暟
@@ -308,9 +309,6 @@
         id: [
           { required: true, message: "涓婚敭id涓嶈兘涓虹┖", trigger: "blur" }
         ],
-        processesName: [
-          { required: true, message: "宸ュ簭鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
-        ],
         stepNo: [
           { required: true, message: "鍔犲伐宸ュ簭涓嶈兘涓虹┖", trigger: "blur" }
         ],
@@ -319,8 +317,11 @@
   },
   created() {
     let routeCode = this.$route.query.routeCode;
+    let routeId = this.$route.query.routeId;
+    alert(routeId)
     this.queryParams.routeCode = routeCode
     this.queryRouteCode = routeCode
+    this.queryRouteId = routeId
     this.getList();
     this.headerInformation();
     this.getProcesses();
@@ -373,6 +374,7 @@
         updateUser: null,
         updateTime: null,
         remark: null,
+        routeId: null,
         routeCode: null,
         spareField1: null,
         spareField2: null,
@@ -416,6 +418,7 @@
     /** 鎻愪氦鎸夐挳 */
     submitForm() {
       this.form.routeCode = this.queryRouteCode;
+      this.form.routeId =  this.queryRouteId;
       this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.form.id != null) {
diff --git a/jcdm-ui/src/views/main/om/productionOrde/index.vue b/jcdm-ui/src/views/main/om/productionOrde/index.vue
index 2b6a6a0..e5dcb54 100644
--- a/jcdm-ui/src/views/main/om/productionOrde/index.vue
+++ b/jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -142,7 +142,7 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-      <el-table border @row-click="handleRowClick" v-loading="loading" :data="productionOrdeList" @selection-change="handleSelectionChange">
+      <el-table border v-loading="loading" :data="productionOrdeList" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" align="center" />
         <el-table-column label="鐢熶骇宸ュ崟鍙�" width="160" align="center">
           <template slot-scope="scope">
@@ -205,60 +205,32 @@
         <el-table-column fixed="right" width="500" label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
           <template slot-scope="scope">
             <!--  宸ュ崟鐘舵�侊紙1鍒涘缓銆�2宸插彂甯冦��3鐢熶骇涓��4宸插喕缁撱��5宸插畬宸ャ��6宸插叧闂級 -->
-            <el-button type="success"  style="width: 72px" plain @click="handleCommand('3',scope.row.id)" v-if="scope.row.orderStatus === '1'" size="mini">寮�濮�</el-button>
-            <el-button style="width: 72px"  plain @click="handleCommand('4',scope.row.id)" v-if="scope.row.orderStatus === '2'|| scope.row.orderStatus === '3'" type="warning" size="mini">鍐荤粨</el-button>
-            <el-button style="width: 72px" plain @click="handleCommand('3',scope.row.id)" v-if="scope.row.orderStatus === '4'" type="warning" size="mini">瑙e喕</el-button>
-            <el-button style="width: 72px" plain @click="handleCommand('6',scope.row.id)" v-if="scope.row.orderStatus === '1'" type="danger" size="mini">鍏抽棴</el-button>
-            <el-button style="width: 72px" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini">鍚敤</el-button>
-            <el-button style="width: 72px" @click="handleCommand('5',scope.row.id)" v-if="scope.row.orderStatus === '3' || scope.row.orderStatus === '1'" type="success" size="mini">瀹屾垚</el-button>
-            <el-button style="width: 72px" v-if="scope.row.orderStatus === '5'" type="success" size="mini">宸插畬宸�</el-button>
+            <el-button type="success" :disabled="scope.row.orderStatus !== '1'"  style="width: 72px" plain @click="handleCommand('3',scope.row.id)" size="mini">寮�濮�</el-button>
+            <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '2' && scope.row.orderStatus !== '3'" v-if="scope.row.orderStatus !== '2'&&  scope.row.orderStatus !== '4'" plain @click="handleCommand('4',scope.row.id)" type="warning" size="mini">鍐荤粨</el-button>
+            <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '4'" v-if="scope.row.orderStatus === '4'" plain @click="handleCommand('3',scope.row.id)" type="warning" size="mini">瑙e喕</el-button>
+            <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '1'" plain @click="handleCommand('6',scope.row.id)" v-if="scope.row.orderStatus === '1'||scope.row.orderStatus === '3'||scope.row.orderStatus === '4'||scope.row.orderStatus === '5'" type="danger" size="mini">鍏抽棴</el-button>
+            <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '6'" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini">鍚敤</el-button>
 
             <el-button
+              :disabled="scope.row.orderStatus !== '1'"
               size="mini"
               type="success"
               style="width: 72px"
-              v-if="scope.row.orderStatus === '1'"
               icon="el-icon-edit"
               @click="handleUpdate(scope.row)"
               v-hasPermi="['om:productionOrde:edit']"
             >淇敼</el-button>
             <el-button
+              :disabled="scope.row.orderStatus !== '1'"
               size="mini"
               type="warning"
               style="width: 72px"
-              v-if="scope.row.orderStatus === '1'"
               icon="el-icon-delete"
               @click="handleDelete(scope.row)"
               v-hasPermi="['om:productionOrde:remove']"
             >鍒犻櫎</el-button>
-            <!--  宸ュ崟鐘舵�侊紙1鍒涘缓銆�2宸插彂甯冦��3鐢熶骇涓��4宸插喕缁撱��5宸插畬宸ャ��6宸插叧闂級 -->
-<!--            <el-button type="success" :disabled="isDisabled1" style="width: 72px" plain @click="handleCommandStart('3',scope.row.id)" size="mini">寮�濮�</el-button>-->
-<!--            <el-button style="width: 72px" :disabled="isDisabled2" plain @click="handleCommandDonejie('4',scope.row.id)" v-if="scope.row.orderStatus === '1'|| scope.row.orderStatus === '3'|| scope.row.orderStatus === '5'" type="warning" size="mini">鍐荤粨</el-button>-->
-<!--            <el-button style="width: 72px" :disabled="isDisabled3" plain @click="handleCommandJieDong('3',scope.row.id)" v-if="scope.row.orderStatus === '4'" type="warning" size="mini">瑙e喕</el-button>-->
-<!--            <el-button style="width: 72px" :disabled="isDisabled4" plain @click="handleCommand('6',scope.row.id)" v-if="scope.row.orderStatus === '3' || scope.row.orderStatus === '1'|| scope.row.orderStatus === '4'|| scope.row.orderStatus === '5'" type="danger" size="mini">鍏抽棴</el-button>-->
-<!--            <el-button style="width: 72px" :disabled="isDisabled5" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini">鍚敤</el-button>-->
-<!--            <el-button-->
-<!--              size="mini"-->
-<!--              type="success"-->
-<!--              :disabled="isDisabled8"-->
-<!--              style="width: 72px"-->
-<!--              v-if="scope.row.orderStatus === '3' || scope.row.orderStatus === '1'|| scope.row.orderStatus === '4'|| scope.row.orderStatus === '5'"-->
-<!--              icon="el-icon-edit"-->
-<!--              @click="handleUpdate(scope.row)"-->
-<!--              v-hasPermi="['om:productionOrde:edit']"-->
-<!--            >淇敼</el-button>-->
-<!--            <el-button-->
-<!--              size="mini"-->
-<!--              type="warning"-->
-<!--              :disabled="isDisabled9"-->
-<!--              style="width: 72px"-->
-<!--              v-if="scope.row.orderStatus === '3'|| scope.row.orderStatus === '1'|| scope.row.orderStatus === '4'|| scope.row.orderStatus === '5'"-->
-<!--              icon="el-icon-delete"-->
-<!--              @click="handleDelete(scope.row)"-->
-<!--              v-hasPermi="['om:productionOrde:remove']"-->
-<!--            >鍒犻櫎</el-button>-->
-<!--            <el-button style="width: 72px" :disabled="isDisabled6" v-if="scope.row.orderStatus === '1'|| scope.row.orderStatus === '3'|| scope.row.orderStatus === '4'" @click="handleCommandFinish('5',scope.row.id)"  type="success" size="mini">瀹屾垚</el-button>-->
-<!--            <el-button style="width: 72px" :disabled="isDisabled7" v-if="scope.row.orderStatus === '5'" type="success" size="mini">宸插畬宸�</el-button>-->
+            <el-button style="width: 72px" :disabled="scope.row.orderStatus === '4'||scope.row.orderStatus === '6'" v-if="scope.row.orderStatus !== '5'" @click="handleCommand('5',scope.row.id)" type="success" size="mini">瀹屾垚</el-button>
+            <el-button style="width: 72px" :disabled="scope.row.orderStatus === '5'" v-if="scope.row.orderStatus === '5'" type="success" size="mini">宸插畬宸�</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -296,7 +268,7 @@
           <el-input v-model="form.productName" disabled placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�" />
         </el-form-item>
         <el-form-item label="杞﹂棿缂栧彿" prop="workshopCode">
-          <el-select style="width: 93%" @change="handleSelectChange(form.processesCode)" v-model="form.processesCode" placeholder="璇烽�夋嫨杞﹂棿缂栧彿">
+          <el-select style="width: 93%" @change="handleSelectChange(form.processesCode)" v-model="form.workshopCode" placeholder="璇烽�夋嫨杞﹂棿缂栧彿">
             <el-option
               v-for="item in options"
               :key="item.workshopCode"
@@ -398,17 +370,6 @@
   data() {
     return {
       titleName: '',
-
-      isDisabled1: false,
-      isDisabled2: false,
-      isDisabled3: false,
-      isDisabled4: false,
-      isDisabled5: false,
-      isDisabled6: false,
-      isDisabled7: false,
-      isDisabled8: false,
-      isDisabled9: false,
-
       options: [],
       lineOptions: [],
       showFlag:false,
@@ -472,47 +433,6 @@
     this.initWorkshop();
   },
   methods: {
-    //瀹屾垚
-    handleCommandFinish(status,id){
-      this.updateOrderState(status,id)
-      this.isDisabled1 = true;
-      this.isDisabled4 = true;
-      this.isDisabled8 = true;
-      this.isDisabled9 = true;
-      this.isDisabled6 = true;
-      this.isDisabled7 = true;
-      this.isDisabled2 = true;
-    },
-    //瑙e喕
-    handleCommandJieDong(status,id){
-      this.updateOrderState(status,id)
-      this.isDisabled1 = true;
-      this.isDisabled4 = true;
-      this.isDisabled8 = true;
-      this.isDisabled9 = true;
-      this.isDisabled6 = false;
-      this.isDisabled2 = false;
-    },
-    //鍐荤粨
-    handleCommandDonejie(status,id){
-      this.updateOrderState(status,id)
-      this.isDisabled1 = true;
-      this.isDisabled4 = true;
-      this.isDisabled8 = true;
-      this.isDisabled9 = true;
-      this.isDisabled6 = true;
-      this.isDisabled2 = true;
-
-    },
-    //寮�濮�
-    handleCommandStart(status,id){
-      this.updateOrderState(status,id)
-      this.isDisabled1 = true;
-      this.isDisabled4 = true;
-      this.isDisabled8 = true;
-      this.isDisabled9 = true;
-      this.isDisabled2 = false;
-    },
     initWorkshop(){
       listWorkshop(this.queryParams).then(response => {
         this.options = response.rows;
@@ -547,15 +467,7 @@
       this.advancedShowSearch = (this.advancedShowSearch) ? this.advancedShowSearch = false : this.advancedShowSearch = true;
     },
     handleCommand(status,id) {
-      this.updateStatusParameter.id = id;
-      this.updateStatusParameter.orderStatus = status;
-      updateProductionOrde(this.updateStatusParameter).then(response => {
-        this.$modal.msgSuccess("淇敼鎴愬姛");
-        this.open = false;
-        this.getList();
-      });
-    },
-    updateOrderState(status,id){
+      console.log(status)
       this.updateStatusParameter.id = id;
       this.updateStatusParameter.orderStatus = status;
       updateProductionOrde(this.updateStatusParameter).then(response => {
@@ -649,6 +561,7 @@
       this.reset();
       const id = row.id || this.ids
       getProductionOrde(id).then(response => {
+        console.log(response.data)
         this.form = response.data;
         this.open = true;
         this.titleName = "淇敼鐢熶骇宸ュ崟";

--
Gitblit v1.9.3