Pārlūkot izejas kodu

修改入库信息不显示的bug

695593266@qq.com 11 mēneši atpakaļ
vecāks
revīzija
997ac38910

+ 27 - 10
src/views/produce/components/feeding/components/batchProductsBom.vue

@@ -123,7 +123,7 @@
         },
         itemData: {},
         itemIndex: '',
-        columnsVersion:0
+        columnsVersion: 0
       };
     },
 
@@ -144,7 +144,11 @@
     computed: {
       columns() {
         let action = {};
-        let columnsVersion=this.columnsVersion;
+        let columnsVersion = this.columnsVersion;
+
+        let selection = {
+          show: false
+        };
 
         if (!this.isEdit) {
           action = {
@@ -160,15 +164,28 @@
           };
         }
 
-        return [
-          {
-            width: 55,
-            type: 'index',
-            columnKey: 'index',
+        if (!this.isEdit) {
+          selection = {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
             align: 'center',
-            label: '序号',
-            fixed: 'left'
-          },
+            fixed: 'left',
+            reserveSelection: true,
+            show: true
+          };
+        }
+
+        return [
+          selection,
+          // {
+          //   width: 55,
+          //   type: 'index',
+          //   columnKey: 'index',
+          //   align: 'center',
+          //   label: '序号',
+          //   fixed: 'left'
+          // },
           {
             minWidth: 120,
             slot: 'batchNo',

+ 2 - 2
src/views/produce/components/feeding/components/semiProductBom.vue

@@ -191,7 +191,7 @@
                   ? '半成品'
                   : row.rootCategoryLevelId == 9
                   ? '产品'
-                  : item.rootCategoryLevelId == 28
+                  : row.rootCategoryLevelId == 28
                   ? '废品'
                   : '';
               }
@@ -326,7 +326,7 @@
       return {
         deviceList: [],
         cacheKeyUrl: 'mes_produce_feeding_semiProductBom',
-        columnsVersion:0
+        columnsVersion: 0
       };
     },
 

+ 7 - 5
src/views/produce/components/inspection/components/semiProductJobBom.vue

@@ -46,7 +46,7 @@
               ? '半成品'
               : row.rootCategoryLevelId == 9
               ? '产品'
-              : item.rootCategoryLevelId == 28
+              : row.rootCategoryLevelId == 28
               ? '废品'
               : ''
           }}
@@ -220,10 +220,12 @@
             v-model="row.extInfo.isQualified"
             filterable
             placeholder="请选择"
-            :disabled="isDetails ||
-            taskObj.type == 2 ||
-            taskObj.type == 3 ||
-            taskObj.type == 6"
+            :disabled="
+              isDetails ||
+              taskObj.type == 2 ||
+              taskObj.type == 3 ||
+              taskObj.type == 6
+            "
           >
             <el-option
               v-for="item in isQualifiedList"

+ 1 - 1
src/views/produce/components/inspection/components/semiProductJobBomPL.vue

@@ -244,7 +244,7 @@
               ? '半成品'
               : row.rootCategoryLevelId == 9
               ? '产品'
-              : item.rootCategoryLevelId == 28
+              : row.rootCategoryLevelId == 28
               ? '废品'
               : ''
           }}

+ 3 - 3
src/views/produce/components/inspection/components/workInProgress.vue

@@ -113,7 +113,7 @@
       },
       columns() {
         // let materielCode = this.workInfo.singleReport == 0 && ;
-        let columnsVersion=this.columnsVersion
+        let columnsVersion = this.columnsVersion;
 
         return [
           ...[
@@ -168,7 +168,7 @@
                   ? '半成品'
                   : row.rootCategoryLevelId == 9
                   ? '产品'
-                  : item.rootCategoryLevelId == 28
+                  : row.rootCategoryLevelId == 28
                   ? '废品'
                   : '';
               }
@@ -299,7 +299,7 @@
       return {
         deviceList: [],
         cacheKeyUrl: 'mes_produce_feeding_semiProductBom',
-        columnsVersion:0
+        columnsVersion: 0
       };
     },
 

+ 22 - 11
src/views/produce/components/jobBooking/components/batchSemiProductJobBom.vue

@@ -746,26 +746,37 @@
           };
         }
 
-        if (!this.isChoose) {
+        // if (!this.isChoose) {
+        //   selection = {
+        //     width: 45,
+        //     type: 'selection',
+        //     columnKey: 'selection',
+        //     align: 'center',
+        //     fixed: 'left',
+        //     reserveSelection: true
+        //   };
+        // }
+        if (!this.isDetails) {
           selection = {
             width: 45,
             type: 'selection',
             columnKey: 'selection',
             align: 'center',
             fixed: 'left',
-            reserveSelection: true
+            reserveSelection: true,
+            show: true
           };
         }
         return [
-          // selection,
-          {
-            width: 45,
-            type: 'selection',
-            columnKey: 'selection',
-            align: 'center',
-            fixed: 'left',
-            reserveSelection: true
-          },
+          selection,
+          // {
+          //   width: 45,
+          //   type: 'selection',
+          //   columnKey: 'selection',
+          //   align: 'center',
+          //   fixed: 'left',
+          //   reserveSelection: true
+          // },
           {
             width: 55,
             type: 'index',

+ 1 - 1
src/views/produce/components/jobBooking/components/detailPackagingGrouping.vue

@@ -325,7 +325,7 @@
                 ? '半成品'
                 : row.rootCategoryLevelId == 9
                 ? '产品'
-                : item.rootCategoryLevelId == 28
+                : row.rootCategoryLevelId == 28
                 ? '废品'
                 : '';
             }

+ 3 - 3
src/views/produce/components/jobBooking/components/newSemiProductJobBom.vue

@@ -550,7 +550,7 @@
         stepsList: [],
         selection: [],
         cacheKeyUrl: 'mes_produce_jobBooking_semiProductJobBom',
-        columnsVersion:0,
+        columnsVersion: 0,
         weight: 0,
         reportWeight: 0,
 
@@ -657,7 +657,7 @@
         return this.$store.state.user.taskObj;
       },
       columns() {
-        let columnsVersion=this.columnsVersion
+        let columnsVersion = this.columnsVersion;
         let areaCodeColumns = {
           width: 55,
           show: false
@@ -743,7 +743,7 @@
                 ? '半成品'
                 : row.rootCategoryLevelId == 9
                 ? '产品'
-                : item.rootCategoryLevelId == 28
+                : row.rootCategoryLevelId == 28
                 ? '废品'
                 : '';
             }

+ 60 - 32
src/views/produce/components/jobBooking/components/semiProductBom.vue

@@ -29,7 +29,13 @@
       </el-table-column>
       <el-table-column label="批次号" type="code" minWidth="110">
         <template slot-scope="{ row, $index }">
-          <el-input v-model="row.batchNo" size="mini" class="content_num" :disabled="isDetails" style="width: 100%"></el-input>
+          <el-input
+            v-model="row.batchNo"
+            size="mini"
+            class="content_num"
+            :disabled="isDetails"
+            style="width: 100%"
+          ></el-input>
         </template>
       </el-table-column>
       <el-table-column label="序列号" type="productSequence" minWidth="110">
@@ -42,19 +48,23 @@
           {{ row.name }}
         </template>
       </el-table-column>
-      <el-table-column label="物品分类" type="rootCategoryLevelId" minWidth="110">
+      <el-table-column
+        label="物品分类"
+        type="rootCategoryLevelId"
+        minWidth="110"
+      >
         <template slot-scope="{ row, $index }">
-            {{
-              row.rootCategoryLevelId == 2
-                ? '在制品'
-                : row.rootCategoryLevelId == 23
-                ? '半成品'
-                : row.rootCategoryLevelId == 9
-                ? '产品'
-                : item.rootCategoryLevelId == 28
-                ? '废品'
-                : ''
-            }}
+          {{
+            row.rootCategoryLevelId == 2
+              ? '在制品'
+              : row.rootCategoryLevelId == 23
+              ? '半成品'
+              : row.rootCategoryLevelId == 9
+              ? '产品'
+              : row.rootCategoryLevelId == 28
+              ? '废品'
+              : ''
+          }}
         </template>
       </el-table-column>
 
@@ -83,8 +93,10 @@
       </el-table-column> -->
 
       <el-table-column
-         v-if="clientEnvironmentId == 3 && workInfo.singleReport == 1"
-        :label="currentTaskDiagram.isFirstTask == 1 ? '物料重量' : '上道工序重量'"
+        v-if="clientEnvironmentId == 3 && workInfo.singleReport == 1"
+        :label="
+          currentTaskDiagram.isFirstTask == 1 ? '物料重量' : '上道工序重量'
+        "
         type="weightUnit"
         width="120"
       >
@@ -99,16 +111,18 @@
         </template>
       </el-table-column>
 
-      <el-table-column 
+      <el-table-column
         v-if="workInfo.singleReport == 1"
-       label="刻码" type="engrave">
+        label="刻码"
+        type="engrave"
+      >
         <template slot-scope="{ row, $index }">
           {{ row.extInfo.engrave }}
         </template>
       </el-table-column>
 
       <el-table-column
-       v-if="workInfo.singleReport == 1"
+        v-if="workInfo.singleReport == 1"
         label="物料代号"
         type="materielCode"
       >
@@ -159,14 +173,15 @@
         </template>
       </el-table-column>
 
-      <el-table-column
-      
-        label="数量"
-        width="90"
-        type="feedQuantity"
-      >
+      <el-table-column label="数量" width="90" type="feedQuantity">
         <template slot-scope="{ row, $index }">
-          <el-input size="mini"  class="content_num" v-model="row.feedQuantity" placeholder="数量" :disabled="isDetails"/>
+          <el-input
+            size="mini"
+            class="content_num"
+            v-model="row.feedQuantity"
+            placeholder="数量"
+            :disabled="isDetails"
+          />
         </template>
       </el-table-column>
 
@@ -183,13 +198,18 @@
       </el-table-column>
 
       <el-table-column
-        v-if="clientEnvironmentId == 3 && workInfo.singleReport ==1"
+        v-if="clientEnvironmentId == 3 && workInfo.singleReport == 1"
         label="位置"
         width="110"
         type="feedQuantity"
       >
         <template slot-scope="{ row, $index }">
-          <el-input size="mini" v-model="row.extInfo.position" placeholder="位置" :disabled="isDetails"/>
+          <el-input
+            size="mini"
+            v-model="row.extInfo.position"
+            placeholder="位置"
+            :disabled="isDetails"
+          />
         </template>
       </el-table-column>
 
@@ -277,10 +297,10 @@
       },
 
       changeHeatNumber() {
-        console.log(this.deviceList,'aahashasoshaiuhuigwsiu');
+        console.log(this.deviceList, 'aahashasoshaiuhuigwsiu');
 
         this.deviceList.forEach((f) => {
-          this.list.forEach((o,index) => {
+          this.list.forEach((o, index) => {
             if (
               o.deviceId &&
               f.id == o.deviceId &&
@@ -288,14 +308,22 @@
             ) {
               // o.extInfo.heatNumber = f.extInfo.heatNumber;
               o['workstationName'] = f.workstationName;
-              this.$set(this.list[index].extInfo,'heatNumber',f.extInfo.heatNumber)
+              this.$set(
+                this.list[index].extInfo,
+                'heatNumber',
+                f.extInfo.heatNumber
+              );
               this.$forceUpdate();
             } else if (this.deviceList.length == 1) {
               o['deviceName'] = this.deviceList[0].name;
               o['deviceId'] = this.deviceList[0].id;
               o['workstationName'] = this.deviceList[0].workstationName;
               // o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber;
-              this.$set(this.list[index].extInfo,'heatNumber',this.deviceList[0].extInfo.heatNumber)
+              this.$set(
+                this.list[index].extInfo,
+                'heatNumber',
+                this.deviceList[0].extInfo.heatNumber
+              );
               this.$forceUpdate();
             }
           });
@@ -310,7 +338,7 @@
     margin-bottom: 4px;
   }
 
-  .content_num{
+  .content_num {
     --input-background-color: #f0f8f2;
   }
 </style>

+ 23 - 11
src/views/produce/components/jobBooking/components/semiProductJobBom.vue

@@ -697,26 +697,38 @@
           };
         }
 
-        if (!this.isChoose) {
+        // if (!this.isChoose) {
+        //   selection = {
+        //     width: 45,
+        //     type: 'selection',
+        //     columnKey: 'selection',
+        //     align: 'center',
+        //     fixed: 'left',
+        //     reserveSelection: true
+        //   };
+        // }
+
+        if (!this.isDetails) {
           selection = {
             width: 45,
             type: 'selection',
             columnKey: 'selection',
             align: 'center',
             fixed: 'left',
-            reserveSelection: true
+            reserveSelection: true,
+            show: true
           };
         }
         return [
-          // selection,
-          {
-            width: 45,
-            type: 'selection',
-            columnKey: 'selection',
-            align: 'center',
-            fixed: 'left',
-            reserveSelection: true
-          },
+          selection,
+          // {
+          //   width: 45,
+          //   type: 'selection',
+          //   columnKey: 'selection',
+          //   align: 'center',
+          //   fixed: 'left',
+          //   reserveSelection: true
+          // },
           {
             width: 55,
             type: 'index',

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

@@ -378,7 +378,7 @@
               ? '半成品'
               : row.rootCategoryLevelId == 9
               ? '产品'
-              : item.rootCategoryLevelId == 28
+              : row.rootCategoryLevelId == 28
               ? '废品'
               : ''
           }}

+ 9 - 3
src/views/produce/components/picking/index.vue

@@ -52,10 +52,10 @@
               <div class="name">产品名称</div>
               <div class="content">{{ item.productName }}</div>
             </div>
-            <div class="col">
+            <!-- <div class="col">
               <div class="name">批次号</div>
               <div class="content">{{ item.batchNo }}</div>
-            </div>
+            </div> -->
             <div class="col pd6" v-if="clientEnvironmentId != 21">
               <el-button
                 type="primary"
@@ -80,7 +80,7 @@
           >
             <el-table-column label="序号" type="index" width="60">
               <template slot-scope="{ row, $index }">
-                {{ $index }}
+                {{ $index + 1 }}
               </template>
             </el-table-column>
 
@@ -223,6 +223,12 @@
               </template>
             </el-table-column>
 
+            <!-- <el-table-column
+              label="所选领料仓库的库存数量"
+              prop="availableCountBase"
+            >
+            </el-table-column> -->
+
             <el-table-column label="操作" fixed="right" width="100px">
               <template slot-scope="{ $index, row }">
                 <el-link type="danger" @click="removeItem(idx, $index)"

+ 1 - 1
src/views/produce/components/warehousing/components/detailsBom.vue

@@ -400,7 +400,7 @@
                 ? '半成品'
                 : row.rootCategoryLevelId == 9
                 ? '产品'
-                : item.rootCategoryLevelId == 28
+                : row.rootCategoryLevelId == 28
                 ? '废品'
                 : '';
             }

+ 18 - 14
src/views/taskList/components/Ddtails.vue

@@ -205,32 +205,36 @@
               trigger: 'blur'
             }
           ],
-          qualifiedWeight: [
-            {
-              required: true,
-              message: '请输入合格重量',
-              trigger: 'blur'
-            }
-          ],
+          // qualifiedWeight: [
+          //   {
+          //     required: true,
+          //     message: '请输入合格重量',
+          //     trigger: 'blur'
+          //   }
+          // ],
           unqualifiedQuantity: [
             {
               required: true,
               message: '请输入不合格数量',
               trigger: 'blur'
             }
-          ],
-          unqualifiedWeight: [
-            {
-              required: true,
-              message: '请输入不合格重量',
-              trigger: 'blur'
-            }
           ]
+          // unqualifiedWeight: [
+          //   {
+          //     required: true,
+          //     message: '请输入不合格重量',
+          //     trigger: 'blur'
+          //   }
+          // ]
         },
         current: {},
         detailsVisible: false,
         fieldMap: {
           orderList: [
+            { label: '计划批次号:', prop: 'batchNo' },
+            { label: '产品编码', prop: 'productCode' },
+            { label: '名称', prop: 'productName' },
+            { label: '规格', prop: 'specification' },
             { label: '生产订单编码:', prop: 'workOrderCode' },
             { label: '计划编号:', prop: 'productionPlanCode' },
             { label: '工艺路线:', prop: 'produceRoutingName' },

+ 101 - 33
src/views/taskList/index.vue

@@ -4,7 +4,7 @@
       <task-search @search="reload"></task-search>
       <!-- <taskDialog-search></taskDialog-search> -->
       <el-tabs v-model="tabValue" type="card" @tab-click="handleTabClick">
-        <!-- <el-tab-pane
+        <el-tab-pane
           label="我的任务"
           name="1"
           v-if="$hasPermission('mes:taskreport:myorder')"
@@ -13,10 +13,10 @@
           label="全部任务"
           name="2"
           v-if="$hasPermission('mes:taskreport:allorder')"
-        ></el-tab-pane> -->
+        ></el-tab-pane>
 
-        <el-tab-pane label="我的任务" name="1"></el-tab-pane>
-        <el-tab-pane label="全部任务" name="2"></el-tab-pane>
+        <!-- <el-tab-pane label="我的任务" name="1"></el-tab-pane>
+        <el-tab-pane label="全部任务" name="2"></el-tab-pane> -->
       </el-tabs>
     </el-card>
     <ele-pro-table
@@ -45,6 +45,13 @@
         </el-link>
       </template>
       <template v-slot:action="{ row }">
+        <!-- <el-link
+          v-if="tabValue == '2'"
+          :underline="false"
+          type="primary"
+          @click="reassignTask(row)"
+          >转派
+        </el-link> -->
         <el-link
           :underline="false"
           type="primary"
@@ -58,6 +65,37 @@
     </ele-pro-table>
     <modifyDialog ref="modifyRef" />
     <Ddtails ref="detailsRef" @success="reload" />
+
+    <el-dialog
+      title="选择人员"
+      :visible.sync="dialogFormVisible"
+      width="30%"
+      center
+    >
+      <el-form :model="form">
+        <el-form-item label="人员">
+          <el-select
+            size="mini"
+            class="content_num"
+            filterable
+            v-model="form.userId"
+            placeholder="请选择任务人员"
+          >
+            <el-option
+              v-for="item in teamList"
+              :label="item.name"
+              :value="item.id"
+              :key="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button type="primary" @click="chooseUser">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -65,6 +103,7 @@
   import TaskSearch from './components/task-search.vue';
   import Ddtails from './components/Ddtails.vue';
   import modifyDialog from '@/views/taskList/components/modifyDialog.vue';
+  import { getteampage } from '@/api/produceWord/index.js';
   import {
     pageByCurrentUser,
     pageByCurrentUserLeader,
@@ -81,7 +120,12 @@
           { label: '待生产', value: 4 },
           { label: '生产中', value: 5 },
           { label: '待下达', value: 8 }
-        ]
+        ],
+        form: {
+          userId: ''
+        },
+        dialogFormVisible: false,
+        teamList: []
       };
     },
     computed: {
@@ -329,7 +373,7 @@
           {
             columnKey: 'action',
             label: '操作',
-            width: 150,
+            width: 200,
             align: 'center',
             resizable: false,
             fixed: 'right',
@@ -340,25 +384,25 @@
     },
     created() {},
     mounted() {
-      console.log(
-        this.$hasPermission('mes:taskreport:myorder'),
-        this.$hasPermission('mes:taskreport:allorder')
-      );
+      // 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:myorder')) {
+        this.tabValue = '1';
+      }
 
-      // if (this.$hasPermission('mes:taskreport:allorder')) {
-      //   this.tabValue = '2';
-      // }
+      if (this.$hasPermission('mes:taskreport:allorder')) {
+        this.tabValue = '2';
+      }
 
-      // if (
-      //   !this.$hasPermission('mes:taskreport:myorder') &&
-      //   !this.$hasPermission('mes:taskreport:allorder')
-      // ) {
-      //   this.tabValue = '';
-      // }
+      if (
+        !this.$hasPermission('mes:taskreport:myorder') &&
+        !this.$hasPermission('mes:taskreport:allorder')
+      ) {
+        this.tabValue = '';
+      }
 
       // console.log(this.tabValue);
       // console.log(
@@ -378,18 +422,38 @@
       /* 表格数据源 */
       datasource({ page, limit, where }) {
         // 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
+        if (this.tabValue && this.tabValue != 0) {
+          let api =
+            this.tabValue === '1' ? pageByCurrentUser : pageByCurrentUserLeader;
+          return api({
+            ...where,
+            pageNum: page,
+            size: limit
+          });
+        } else {
+          return [];
+        }
+      },
+
+      chooseUser() {
+        if (!this.form.userId) {
+          return this.$message.warning('请选择转派人员');
+        }
+
+        this.dialogFormVisible = false;
+
+        this.reload();
+      },
+
+      async reassignTask(item) {
+        this.form.userId = '';
+        await getteampage({ name: item.assignTeamName }).then((res) => {
+          this.teamList = res.list[0].userVOList;
         });
-        // } else {
-        //   return [];
-        // }
+
+        this.dialogFormVisible = true;
       },
+
       reload(where) {
         this.$refs.table.reload({ page: 1, where });
       },
@@ -414,7 +478,11 @@
           weight: row.weight,
           quantity: row.quantity,
           durationText: row.durationText,
-          apsAssigneeId: row.id
+          apsAssigneeId: row.id,
+          batchNo: row.batchNo,
+          productCode: row.productCode,
+          productName: row.productName,
+          specification: row.specification
         };
         let form = {
           realEndTime: row.realEndTime,

+ 1 - 1
vue.config.js

@@ -34,7 +34,7 @@ module.exports = {
         // 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.103:18086',192.168.1.116
+        // target: 'http://192.168.1.103:18086',192.168.1.116
         target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.144:18086',