695593266@qq.com 7 mesiacov pred
rodič
commit
9934b5b078

+ 2 - 1
src/views/beEntrusted/components/create-order.vue

@@ -2,7 +2,8 @@
   <div>
     <ele-modal
       :visible.sync="visible"
-      :title="title"
+      v-if="visible"
+      title="受托转生产订单"
       width="80vw"
       append-to-body
       :maxable="true"

+ 9 - 2
src/views/beEntrusted/index.vue

@@ -105,6 +105,8 @@
         <el-button type="primary" @click="warehouseEntry"> 确定 </el-button>
       </template>
     </ele-modal>
+
+    <create-order ref="createOrderRef"></create-order>
   </div>
 </template>
 
@@ -113,7 +115,7 @@
   import dictMixins from '@/mixins/dictMixins';
   import Create from './components/create';
   import SalesToProduction from './components/salesToProduction.vue';
-
+  import createOrder from './components/create-order.vue';
   import { getList, warehouseEntry, update } from '@/api/beEntrusted/index';
   import {
     getWarehouseList
@@ -124,7 +126,8 @@
     components: {
       OrderSearch,
       Create,
-      SalesToProduction
+      SalesToProduction,
+      createOrder
     },
     mixins: [dictMixins],
     data() {
@@ -414,6 +417,10 @@
           return this.$message.warning('只能选择一条数据');
         }
 
+        if (type == 1) {
+          this.$refs.createOrderRef.open();
+        }
+
         // if (type == 1) {
         //   this.$refs.productionPlanRef.open();
         // }

+ 15 - 7
src/views/entrust/components/create.vue

@@ -8,7 +8,7 @@
     @close="cancel"
     :maxable="true"
   >
-    <div class="switch" v-if="type == 'detail'">
+    <!-- <div class="switch" v-if="type == 'detail'">
       <div class="switch_left">
         <ul>
           <li
@@ -21,7 +21,7 @@
           </li>
         </ul>
       </div>
-    </div>
+    </div> -->
     <el-form
       ref="form"
       :model="form"
@@ -144,6 +144,7 @@
         icon="el-icon-plus"
         class="ele-btn-icon"
         @click="addOder"
+        v-if="type == 'add'"
         style="margin-bottom: 10px"
       >
         新建
@@ -155,6 +156,7 @@
         icon="el-icon-delete"
         class="ele-btn-icon"
         @click="removeOder"
+        v-if="type == 'add'"
         plain
         style="margin-bottom: 10px"
       >
@@ -172,11 +174,13 @@
         height="40vh"
       >
         <template v-slot:totalCount="{ row }">
-          <el-input v-model="row.totalCount"> </el-input>
+          <el-input v-model="row.totalCount" :disabled="type == 'detail'">
+          </el-input>
         </template>
 
         <template v-slot:describes="{ row }">
-          <el-input v-model="row.describes"> </el-input>
+          <el-input v-model="row.describes" :disabled="type == 'detail'">
+          </el-input>
         </template>
 
         <template v-slot:taskId="{ row, $index }">
@@ -187,6 +191,7 @@
             v-model="row.taskId"
             placeholder="请选择"
             @change="taskListChange(row, $index)"
+            :disabled="type == 'detail'"
           >
             <el-option
               v-for="item in row.taskList"
@@ -205,21 +210,22 @@
             placeholder="选择日期时间"
             format="yyyy-MM-dd HH:mm:ss"
             value-format="yyyy-MM-dd HH:mm:ss"
+            :disabled="type == 'detail'"
           >
           </el-date-picker>
         </template>
       </ele-pro-table>
     </el-form>
 
-    <template v-slot:footer>
+    <template v-slot:footer v-if="type != 'detail'">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="save(1)"> 保存 </el-button>
       <el-button type="primary" @click="save(2)"> 提交 </el-button>
     </template>
-    <detail
+    <!-- <detail
       v-if="activeComp === 'bpm' && form.processInstanceId"
       :id="form.processInstanceId"
-    ></detail>
+    ></detail> -->
 
     <produceOrder ref="produceOrderRef" @choose="choose" />
   </ele-modal>
@@ -560,6 +566,8 @@
           this.getDetail(row.id);
         }
 
+        this.type = type;
+
         this.title = type == 'add' ? '新增' : type == 'edit' ? '修改' : '详情';
       },
 

+ 19 - 0
src/views/entrust/index.vue

@@ -117,6 +117,15 @@
             提交
           </el-link>
 
+          <el-link
+            type="primary"
+            :underline="false"
+            @click="sendGoods(row)"
+            v-if="row.approvalStatus == 2"
+          >
+            发货
+          </el-link>
+
           <el-link
             type="primary"
             :underline="false"
@@ -519,6 +528,16 @@
         });
       },
 
+      sendGoods() {
+        this.$confirm('是否进行发货?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(() => {})
+          .catch(() => {});
+      },
+
       fullscreenChange(fullscreen) {
         if (fullscreen) {
           this.tableHeight = 'calc(100vh - 120px)';

+ 6 - 1
src/views/produce/components/feeding/index.vue

@@ -629,7 +629,12 @@
       },
 
       openPicking(id, item) {
-        this.$refs.pickingListRef.open(id, item, '选择设备列表');
+        this.$refs.pickingListRef.open(
+          id,
+          item,
+          '选择设备列表',
+          this.taskObj.id
+        );
       },
 
       chooseData(listData) {

+ 6 - 1
src/views/produce/components/jobBooking/index.vue

@@ -1223,7 +1223,12 @@
       },
 
       openPicking(id, item) {
-        this.$refs.pickingListRef.open(id, item, '选择设备列表');
+        this.$refs.pickingListRef.open(
+          id,
+          item,
+          '选择设备列表',
+          this.taskObj.id
+        );
       },
 
       allSelection(id, selectList) {

+ 11 - 3
src/views/produce/components/picking/pickingList.vue

@@ -188,7 +188,8 @@
         selection: [],
 
         allSelection: [],
-        temporaryList: []
+        temporaryList: [],
+        taskObj: ''
         // cloumsAll: [
         //   {
         //     width: 45,
@@ -837,8 +838,12 @@
           URL = getOutindetailtwo;
         } else if (this.isType == 'feed') {
           if ([4, 7, 14].includes(Number(this.rootCategoryLevelId))) {
+            console.log('55');
+            param.taskId = this.taskId;
+            console.log(param);
             URL = assetPage;
           } else if (this.rootCategoryLevelId == 2) {
+            console.log('66');
             param.workOrderId = this.id;
             delete param.taskId;
             delete param.categoryLevelId;
@@ -846,6 +851,9 @@
           } else if (
             ![2, 4, 7, 14].includes(Number(this.rootCategoryLevelId))
           ) {
+            console.log('77');
+            param.taskId = this.taskId;
+            console.log(param);
             URL = assetPage;
           }
         } else if (this.isType == 'job') {
@@ -940,8 +948,8 @@
           });
         });
       },
-      open(id, item, t) {
-        console.log(item, id, t, this.isType, '1234');
+      open(id, item, t, taskId) {
+        this.taskId = taskId;
         this.id = id;
 
         if (t) {

+ 26 - 6
src/views/produceOrder/components/releaseDialog/index.vue

@@ -344,7 +344,8 @@
         dispatchType: 1,
         time_calc_code: '0', // 是否进行时间赋值 0 否 1 是
         validDate,
-        userTeamList: []
+        userTeamList: [],
+        isTask: true
       };
     },
     computed: {
@@ -725,6 +726,8 @@
           item.workCenterIds.includes(e)
         );
 
+        this.changeDispatch();
+
         this.teamList = data || [];
         if (this.teamList.length != 0) {
           this.form.teamId = this.teamList[0].teamId;
@@ -770,11 +773,26 @@
         this.productionList = res || [];
       },
       // 查询工位数据
-      FirstTaskIdFn() {
-        listByFirstTaskId(this.current.taskInstanceId)
+      async FirstTaskIdFn(id) {
+        // if (id) {
+        //   listByFirstTaskId(id)
+        //     .then((res) => {
+        //       this.stationList = res;
+        //       if (this.isTask) {
+        //         this.changeDispatch();
+        //       }
+        //     })
+        //     .catch((err) => {
+        //       this.stationList = [];
+        //       this.$message.error(err.message);
+        //     });
+        // }
+        await listByFirstTaskId(id ? id : this.current.taskInstanceId)
           .then((res) => {
             this.stationList = res;
-            this.changeDispatch();
+            if (this.isTask) {
+              this.changeDispatch();
+            }
           })
           .catch((err) => {
             this.stationList = [];
@@ -897,8 +915,6 @@
             mesWorkOrderCode: this.current.code,
             assignees
           };
-
-          console.log(data, '数据999');
         }
         const api =
           type == 1 ? taskAssignment : type == 2 ? taskRevoked : taskSave;
@@ -935,6 +951,8 @@
       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);
       },
@@ -959,6 +977,8 @@
       async getAssignData(index, arr) {
         let list = JSON.parse(JSON.stringify(arr));
         let dataRow = this.processList[index];
+
+        // return;
         // 不存在 班组数据的话 就不调用这个方法
         if (!this.form.teamId) {
           return;