695593266@qq.com 7 месяцев назад
Родитель
Сommit
b5237e6c1e

+ 9 - 9
src/api/materialPlan/index.js

@@ -10,16 +10,16 @@ export async function getList(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
-/**
- * 保存
- */
-export async function save(data) {
-  const res = await request.post('/aps/batchingplan/save', data);
-  if (res.data.code == 0) {
-    return res.data.data;
+  /**
+   * 保存
+   */
+  export async function save(data) {
+    const res = await request.post('/aps/batchingplan/save', data);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
   }
-  return Promise.reject(new Error(res.data.message));
-}
 
 /**
  * 保存并提交

+ 6 - 3
src/views/productionPlan/index.vue

@@ -287,7 +287,7 @@
               row.splitBatch != 1 &&
               row.approvalStatus != 1 &&
               row.approvalStatus != 2 &&
-              $hasPermission('aps:productionplan:info')
+              $hasPermission('aps:productionplan:release')
             "
             @click="handleOrderPublish(1, row)"
           >
@@ -295,7 +295,9 @@
           </el-link>
           <el-link
             type="primary"
-            v-if="row.status == 3 && $hasPermission('aps:productionplan:info')"
+            v-if="
+              row.status == 3 && $hasPermission('aps:productionplan:release')
+            "
             :underline="false"
             @click="handleOrderPublish(2, row)"
           >
@@ -350,7 +352,8 @@
               clientEnvironmentId != 4 &&
               activeName == 'first' &&
               row.splitBatch != 2 &&
-              !row.joinPlanCode
+              !row.joinPlanCode &&
+              $hasPermission('aps:productionplan:dismantlingbatch')
             "
             type="primary"
             :underline="false"

+ 2 - 1
src/views/workOrder/components/releaseDialog.vue

@@ -434,7 +434,8 @@
         singleDis: false, // 单个报工
         batchDis: false, // 批量报工
         isDispatchRow: {}, // 查询是否派单数据
-        time_calc_code: '0' // 是否进行时间赋值 0 否 1 是
+        time_calc_code: '0', // 是否进行时间赋值 0 否 1 是
+        isTask: true
       };
     },
     computed: {

+ 9 - 3
src/views/workOrder/mixins/release.js

@@ -310,7 +310,7 @@ export default {
         });
     },
     // 查询工位数据
-    FirstTaskIdFn() {
+    async FirstTaskIdFn(taskId) {
       console.log(this.current, 'this.current 查询工位数据');
       // let id = this.current.taskId || this.current.firstTaskId;
       let id = '';
@@ -320,7 +320,7 @@ export default {
         id = this.current.taskId;
       }
       console.log(id, 'id 查询工位数据');
-      listByFirstTaskId(id)
+      await listByFirstTaskId(taskId ? taskId : id)
         .then((res) => {
           this.stationList = res;
 
@@ -341,7 +341,10 @@ export default {
               );
             }
           });
-          this.changeDispatch();
+          console.log(this.stationList, '5522200');
+          if (this.isTask) {
+            this.changeDispatch();
+          }
         })
         .catch((err) => {
           this.stationList = [];
@@ -660,6 +663,8 @@ export default {
     async handleClick(tab) {
       let id = tab.name;
       this.processId = id;
+      this.isTask = false;
+      await this.FirstTaskIdFn(id);
       let data = this.processList.find((item) => item.id == this.processId);
       await this.changeRadio(data.assignType, data.index);
     },
@@ -684,6 +689,7 @@ export default {
     async getAssignData(index, arr) {
       let list = JSON.parse(JSON.stringify(arr));
       let dataRow = this.processList[index];
+
       // 不存在 班组数据的话 就不调用这个方法
       if (!this.form.teamId) {
         return;