695593266@qq.com 10 ay önce
ebeveyn
işleme
516bcd5cae

+ 2 - 2
src/views/InTheSystem/components/search.vue

@@ -94,7 +94,7 @@
           </el-select>
         </el-form-item>
       </el-col>
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+      <!-- <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="组织机构:">
           <auth-selection
             data-type="Array"
@@ -102,7 +102,7 @@
             style="width: 100%"
           ></auth-selection>
         </el-form-item>
-      </el-col>
+      </el-col> -->
 
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label-width="0px">

+ 4 - 4
src/views/outsourcing/index.vue

@@ -85,17 +85,17 @@
         </template>
 
         <template v-slot:action="{ row }">
-          <!-- <el-link
+          <el-link
             type="primary"
             :underline="false"
             @click="handleDetails(row)"
           >
             详情
-          </el-link> -->
+          </el-link>
 
           <el-link
             type="primary"
-            v-if="row.status == 1"
+            v-if="row.status == 1 && row.status == 2"
             :underline="false"
             @click="handleFlow(row)"
           >
@@ -104,7 +104,7 @@
 
           <el-link
             type="primary"
-            v-if="row.status == 1"
+            v-if="row.status == 0"
             :underline="false"
             @click="handleRelease(row)"
           >

+ 12 - 0
src/views/produce/components/feeding/details.vue

@@ -17,6 +17,18 @@
           </div>
         </div>
 
+        <div class="rx-bc">
+          <div class="item_box rx-bc">
+            <div
+              class="time"
+              v-if="item.executorList && item.executorList.length != 0"
+              >执行人:<span v-for="it in item.executorList"
+                >【{{ item.name }}】</span
+              >
+            </div>
+          </div>
+        </div>
+
         <div v-for="(it, idx) in item.orderInfoList" :key="idx">
           <workOrderBom :item="it" :isDetails="true"></workOrderBom>
 

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

@@ -347,7 +347,8 @@
         teamAllList: [],
         teamUserList: [],
         executorIdList: [],
-        teamId: ''
+        teamId: '',
+        isDefaultExecutor: false
       };
     },
     mounted() {
@@ -496,6 +497,12 @@
         }).then((res) => {
           this.isDisposal = res.value == '1' ? true : false;
         });
+
+        await parameterGetByCode({
+          code: 'default_executor'
+        }).then((res) => {
+          this.isDefaultExecutor = res.value == '1' ? true : false;
+        });
       },
 
       checkTeamList(id) {
@@ -518,6 +525,34 @@
             this.teamAllList.push(res.userVOList);
           });
         });
+        // const ids = id.split(',');
+        // this.teamList = [];
+        // this.teamUserList = [];
+        // const list = ids.map((item) => getTeam(item));
+
+        // const dataList = await Promise.all(list);
+
+        // dataList.forEach((item) => {
+        //   this.teamList.push({
+        //     name: item.name,
+        //     id: item.id
+        //   });
+
+        //   this.teamAllList.push(item.userVOList);
+        // });
+
+        // if (this.isDefaultExecutor) {
+        // if (this.teamList.length != 0) {
+        // this.teamId = this.teamList[0].id;
+        // const index = this.teamList.findIndex((item) => item.id == id);
+        // this.teamUserList = this.teamAllList[index];
+        // console.log(
+        //   this.teamAllList,
+        //   this.$store.state.user.info,
+        //   '22323232323'
+        // );
+        // }
+        // }
       },
 
       outboundOrder(id, item) {

+ 25 - 6
src/views/produce/components/jobBooking/components/batchPackagingGrouping.vue

@@ -1,5 +1,5 @@
 <template>
-  <div v-if="objData.isUnpack == '1'">
+  <div v-if="!objData.isUnpack || objData.isUnpack == '1'">
     <div class="col userInp" style="display: flex; align-items: center">
       <div class="label lable150 rx-cc" style="width: 100px !important"
         >规格选择:</div
@@ -99,7 +99,26 @@
                 class="time-form"
                 max-height="400"
                 row-key="index"
-              ></ele-pro-table>
+              >
+                <template v-slot:newWeight="{ row, $index }">
+                  <span
+                    >{{ row.extInfo.newWeight
+                    }}{{ row.extInfo.weightUnit }}</span
+                  >
+                </template>
+
+                <template v-slot:reportWeight="{ row, $index }">
+                  <span
+                    >{{ row.extInfo.reportWeight
+                    }}{{ row.extInfo.weightUnit }}</span
+                  >
+                </template>
+              </ele-pro-table>
+
+              <!-- <template v-slot:newWeight="{ row, $index }">
+                <span>{{ row.extInfo.newWeight }}</span
+                >{{ row.extInfo.weightUnit }}
+              </template> -->
               <!-- <el-table :data="item.splitList" style="width: 100%">
               <el-table-column prop="computeSize" label="序号" width="65">
                 <template v-slot="{ row, $index }">
@@ -275,7 +294,7 @@
             this.formedNumLast = 0;
           }
           console.log(newVal);
-          if (newVal.isUnpack && newVal.isUnpack == '1') {
+          if (!newVal.isUnpack || newVal.isUnpack == '1') {
             this.packageDispositionFn();
           }
         },
@@ -424,14 +443,14 @@
           },
           {
             width: 180,
-            prop: 'weight',
+            prop: 'extInfo.newWeight',
             label: '上道工序重量',
-            slot: 'weight',
+            slot: 'newWeight',
             align: 'center'
           },
           {
             width: 150,
-            prop: 'reportWeight',
+            prop: 'extInfo.reportWeight',
             label: '报工重量',
             slot: 'reportWeight',
             align: 'center'

+ 36 - 7
src/views/produce/components/jobBooking/components/packingTgBom.vue

@@ -3,7 +3,7 @@
     <div class="title_box rx-bc mt6">
       <div class="name"
         >打包信息 ({{
-          isWarehousing ? list.length : item.pickOutInList.length || 0
+          isWarehousing ? list.length : item.semiProductList.length || 0
         }})个
       </div>
 
@@ -14,7 +14,7 @@
       ref="oneJobQualityBom"
       class="table_content"
       :max-height="600"
-      :data="isWarehousing ? list : item.pickOutInList"
+      :data="isWarehousing ? list : item.semiProductList"
       tooltip-effect="dark"
       style="width: 100%"
       stripe
@@ -187,7 +187,7 @@
               size="mini"
               class="content_num"
               v-model="row.feedQuantity"
-              :disabled="isDetails"
+              disabled
             />
           </div>
 
@@ -197,9 +197,23 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="处置" prop="" v-if="item.singleReport == 1">
+      <el-table-column label="处置" prop="">
         <template slot-scope="{ row, $index }">
-          <span>入库 </span>
+          <el-select
+            size="mini"
+            class="content_num"
+            filterable
+            v-model="row.extInfo.batchReportInfo.taskId"
+            placeholder="请选择"
+          >
+            <el-option
+              v-for="item in stepsList"
+              :label="item.taskTypeName"
+              :value="item.taskId"
+              :key="item.taskId"
+            >
+            </el-option>
+          </el-select>
         </template>
       </el-table-column>
 
@@ -224,6 +238,7 @@
 </template>
 
 <script>
+  import { getTaskInstanceList } from '@/api/produce/job';
   export default {
     props: {
       item: {
@@ -247,7 +262,13 @@
     },
 
     data() {
-      return {};
+      return {
+        stepsList: []
+      };
+    },
+
+    mounted() {
+      this.getTaskFn();
     },
 
     computed: {
@@ -257,7 +278,15 @@
     },
 
     components: {},
-    methods: {}
+    methods: {
+      getTaskFn() {
+        getTaskInstanceList(this.item.workOrderId).then((res) => {
+          this.stepsList = res.filter((item) => {
+            return item.taskId != -2;
+          });
+        });
+      }
+    }
   };
 </script>
 

+ 5 - 5
src/views/produce/components/jobBooking/components/semiProductJobBomPL.vue

@@ -633,23 +633,23 @@
 
         notTypeList: [
           {
-            code: '1',
+            code: 1,
             name: '返工'
           },
           {
-            code: '2',
+            code: 2,
             name: '返修'
           },
           {
-            code: '3',
+            code: 3,
             name: '报废'
           },
           {
-            code: '4',
+            code: 4,
             name: '降级使用'
           },
           {
-            code: '5',
+            code: 5,
             name: '让步接收'
           },
           {

+ 15 - 0
src/views/produce/components/jobBooking/details.vue

@@ -36,6 +36,21 @@
           </div>
         </div>
 
+        <div class="rx-bc">
+          <div class="item_box rx-bc">
+            <div
+              class="time"
+              v-if="
+                objData.workReportInfo.executorList &&
+                objData.workReportInfo.executorList.length != 0
+              "
+              >执行人:<span v-for="item in objData.workReportInfo.executorList"
+                >【{{ item.name }}】</span
+              >
+            </div>
+          </div>
+        </div>
+
         <paramBom
           v-if="objData.paramDetailList.length != 0"
           :list="objData.paramDetailList"

+ 57 - 20
src/views/produce/components/jobBooking/index.vue

@@ -323,13 +323,18 @@
           ></semiProductJobBom>
         </div> -->
 
-        <div
+        <packingTgBom
           v-if="
-            item &&
-            item.currentTaskDiagram.type == 4 &&
-            clientEnvironmentId != 3
+            item.semiProductList &&
+            item.semiProductList.length != 0 &&
+            taskObj.type == 4 &&
+            clientEnvironmentId == 3
           "
-        >
+          :list="item.semiProductList"
+          :item="item"
+        ></packingTgBom>
+
+        <div v-if="item && item.currentTaskDiagram.type == 4">
           <!-- <packagingGrouping
             ref="packagingGroupingRef"
             :objData="item"
@@ -368,12 +373,12 @@
 
         <!-- <packingTgBom
           v-if="
-            item.pickOutInList &&
-            item.pickOutInList.length != 0 &&
+            item.semiProductList &&
+            item.semiProductList.length != 0 &&
             taskObj.type == 4 &&
             clientEnvironmentId == 3
           "
-          :list="item.pickOutInList"
+          :list="item.semiProductList"
           :item="item"
         ></packingTgBom> -->
         <semiProductJobBom
@@ -437,7 +442,7 @@
   import turnoverBom from './components/turnoverBom.vue';
   import aridRegion from '../feeding/components/aridRegion.vue';
   import packingBom from './components/packingBom.vue';
-  import packingTgBom from './components/packingTgBom';
+  import packingTgBom from './components/packingTgBom.vue';
   import { timestampToDateTime } from '@/utils/index.js';
   import { parameterGetByCode } from '@/api/system/dictionary-data';
   import { getTeam } from '@/api/produce/job.js';
@@ -716,10 +721,37 @@
                   this.taskObj.type != 6
                 ) {
                   obj.semiProductList.map((a) => {
+                    let feedQuantity = 0;
+                    let reportWeight = 0;
+                    let unFeedQuantity = 0;
+                    let unReportWeight = 0;
+                    if (
+                      a.extInfo &&
+                      a.extInfo.batchReportInfo &&
+                      a.extInfo.batchReportInfo.length != 0
+                    ) {
+                      a.extInfo.batchReportInfo.forEach((it) => {
+                        console.log(it, '1111111111');
+                        feedQuantity += Number(it.allFeedQuantity);
+                        reportWeight += Number(it.allReportWeight);
+                      });
+                    }
+
+                    if (
+                      a.extInfo &&
+                      a.extInfo.notBatchReportInfo &&
+                      a.extInfo.notBatchReportInfo.length != 0
+                    ) {
+                      a.extInfo.notBatchReportInfo.forEach((it) => {
+                        unFeedQuantity += Number(it.allFeedQuantity);
+                        unReportWeight += Number(it.allReportWeight);
+                      });
+                    }
+
                     a.extInfo.batchReportInfo = [
                       {
-                        allFeedQuantity: '',
-                        allReportWeight: '',
+                        allFeedQuantity: feedQuantity,
+                        allReportWeight: reportWeight,
                         taskId: '',
                         taskName: ''
                       }
@@ -727,7 +759,8 @@
 
                     a.extInfo.notBatchReportInfo = [
                       {
-                        allFeedQuantity: '',
+                        allFeedQuantity: unFeedQuantity,
+                        allReportWeight: unReportWeight,
                         notType: '',
                         taskId: '',
                         taskName: '',
@@ -827,12 +860,6 @@
                   obj.workReportInfo.notFormedNum = notFormedNum;
                 }
 
-                // if(this.clientEnvironmentId == 3) {
-                //   if(obj.semiProductList && obj.semiProductList.length != 0) {
-
-                //   }
-                // }
-
                 obj.workReportInfo.formingNum = obj.formingNum;
                 obj.workReportInfo.formingWeight = obj.formingWeight;
                 obj.workReportInfo.unit = obj.unit;
@@ -862,6 +889,16 @@
                   ...obj
                 };
               });
+              if (this.clientEnvironmentId == 3) {
+                this.List.forEach((item, index) => {
+                  if (
+                    item.semiProductList.length != 0 &&
+                    item.singleReport == 0
+                  ) {
+                    this.countNumPl(item.semiProductList, index);
+                  }
+                });
+              }
             })
             .finally(() => {
               this.isLoad = true;
@@ -967,7 +1004,7 @@
         });
 
         this.List = this.List.map((item) => {
-          item.executorList = executorList;
+          item.workReportInfo.executorList = executorList;
           return item;
         });
 
@@ -1174,7 +1211,7 @@
         }
 
         console.log(this.item, '9999999999');
-        if (this.taskObj.type == 4 && this.clientEnvironmentId != 3) {
+        if (this.taskObj.type == 4) {
           this.checkPack();
 
           // if (!isPack) {

+ 17 - 23
src/views/produce/components/warehousing/index.vue

@@ -85,13 +85,7 @@
           ></jobDdBom>
         </div>
 
-        <div
-          v-if="
-            clientEnvironmentId == 3 &&
-            item.toWarehouseList &&
-            item.toWarehouseList.length > 0
-          "
-        >
+        <div v-if="clientEnvironmentId == 3">
           <div class="item">
             <div>
               <div class="text">仓库</div>
@@ -154,22 +148,22 @@
             </el-select>
           </div> -->
 
-          <div v-for="(it, idx) in item.toWarehouseList" :key="idx">
-            <packingTgBom
-              :list="it.extInfo.pickOutInList"
-              :isWarehousing="true"
-              :item="it"
-            ></packingTgBom>
-          </div>
+          <!-- <div v-for="(it, idx) in item.toWarehouseList" :key="idx"> -->
+          <batchSemiProductJobBom
+            :list="item.semiProductList"
+            :item="item"
+            :singleReport="item.singleReport"
+            :storeType="storeType"
+            :equipmentList="item.equipmentList"
+            :isChoose="isChoose"
+            :isEngrave="isEngrave"
+            :isDisposal="isDisposal"
+          >
+          </batchSemiProductJobBom>
+          <!-- </div> -->
         </div>
 
-        <div
-          v-else-if="
-            clientEnvironmentId == 3 &&
-            !item.toWarehouseList &&
-            item.singleReport == 1
-          "
-        >
+        <!-- <div v-else-if="clientEnvironmentId == 3 && item.singleReport == 1">
           <div class="item">
             <div>
               <div class="text">仓库</div>
@@ -226,7 +220,7 @@
             :isDisposal="isDisposal"
           >
           </batchSemiProductJobBom>
-        </div>
+        </div> -->
 
         <!-- 单独报工 -->
         <div
@@ -877,7 +871,7 @@
         });
 
         this.List = this.List.map((item) => {
-          item.executorList = executorList;
+          item.workReportInfo.executorList = executorList;
           return item;
         });
 

+ 7 - 7
src/views/produce/components/workPlan/index.vue

@@ -498,13 +498,13 @@
       },
 
       async openEdit(type, row) {
-        // if (type == 'edit') {
-        //   const code = await verificationQualityInspector(row.id);
-        //   if (code == '-1') {
-        //     console.log('不是报工人');
-        //     return;
-        //   }
-        // }
+        if (type == 'edit') {
+          const code = await verificationQualityInspector(row.id);
+          if (code == '-1') {
+            console.log('不是报工人');
+            return;
+          }
+        }
 
         const req = {
           workOrderId: row.id,

+ 54 - 8
src/views/taskList/index.vue

@@ -4,6 +4,17 @@
       <task-search @search="reload"></task-search>
       <!-- <taskDialog-search></taskDialog-search> -->
       <el-tabs v-model="tabValue" type="card" @tab-click="handleTabClick">
+        <!-- <el-tab-pane
+          label="我的任务"
+          name="1"
+          v-if="$hasPermission('mes:taskreport:myorder')"
+        ></el-tab-pane>
+        <el-tab-pane
+          label="全部任务"
+          name="2"
+          v-if="$hasPermission('mes:taskreport:allorder')"
+        ></el-tab-pane> -->
+
         <el-tab-pane label="我的任务" name="1"></el-tab-pane>
         <el-tab-pane label="全部任务" name="2"></el-tab-pane>
       </el-tabs>
@@ -328,7 +339,37 @@
       }
     },
     created() {},
-    mounted() {},
+    mounted() {
+      console.log(
+        this.$hasPermission('mes:taskreport:myorder'),
+        this.$hasPermission('mes:taskreport:allorder')
+      );
+
+      // if (this.$hasPermission('mes:taskreport:myorder')) {
+      //   this.tabValue = '1';
+      // }
+
+      // if (this.$hasPermission('mes:taskreport:allorder')) {
+      //   this.tabValue = '2';
+      // }
+
+      // if (
+      //   !this.$hasPermission('mes:taskreport:myorder') &&
+      //   !this.$hasPermission('mes:taskreport:allorder')
+      // ) {
+      //   this.tabValue = '';
+      // }
+
+      // console.log(this.tabValue);
+      // console.log(
+      //   this.$hasPermission('mes:taskreport:myorder'),
+      //   'mes:taskreport:myorder'
+      // );
+      // console.log(
+      //   this.$hasPermission('mes:taskreport:allorder'),
+      //   'mes:taskreport:allorder'
+      // );
+    },
     methods: {
       handleTabClick(e) {
         this.tabValue = e.name;
@@ -336,13 +377,18 @@
       },
       /* 表格数据源 */
       datasource({ page, limit, where }) {
-        let api =
-          this.tabValue === '1' ? pageByCurrentUser : pageByCurrentUserLeader;
-        return api({
-          ...where,
-          pageNum: page,
-          size: limit
-        });
+        // console.log(this.tabValue, 'this.tabValue');
+        // if (this.tabValue && this.tabValue != 0) {
+          let api =
+            this.tabValue === '1' ? pageByCurrentUser : pageByCurrentUserLeader;
+          return api({
+            ...where,
+            pageNum: page,
+            size: limit
+          });
+        // } else {
+        //   return [];
+        // }
       },
       reload(where) {
         this.$refs.table.reload({ page: 1, where });

+ 2 - 2
vue.config.js

@@ -33,9 +33,9 @@ module.exports = {
       '/api': {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.116:18086',
-        target: 'http://192.168.1.251:18086',
+        // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.103:18086',192.168.1.116
-        // target: 'http://192.168.1.125:18086',
+        target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.30:18086',