695593266@qq.com пре 7 месеци
родитељ
комит
4b13b16fca

+ 6 - 1
src/views/byProduct/index.vue

@@ -85,6 +85,7 @@
   import { getPage } from '@/api/byProduct/index';
   import byProductSearch from './components/byProduct-search.vue';
   import addByProduct from './components/addByProduct.vue';
+  import { getWarehouseList } from '@/api/mes';
 
   export default {
     components: {
@@ -196,7 +197,11 @@
         ];
       }
     },
-    created() {},
+    created() {
+      getWarehouseList().then((res) => {
+        this.warehouseList = res;
+      });
+    },
     methods: {
       /* 表格数据源 */
       async datasource({ page, limit, where }) {

+ 2 - 0
src/views/outsourcing/components/details.vue

@@ -193,6 +193,7 @@
           },
 
           {
+            prop: 'totalCount',
             slot: 'totalCount',
             label: '数量',
             align: 'center',
@@ -282,6 +283,7 @@
           },
 
           {
+            prop: 'totalCount',
             slot: 'totalCount',
             label: '数量',
             align: 'center',

+ 32 - 1
src/views/pick/pickApply/components/selfBuildPick.vue

@@ -26,6 +26,7 @@
 
           <el-col :span="6">
             <el-button type="primary" @click="openPicking">添加物料</el-button>
+            <el-button type="primary" @click="batchDelete">批量删除</el-button>
           </el-col>
         </el-row>
       </el-form>
@@ -40,7 +41,10 @@
           style="width: 100%"
           stripe
           border
+          @selection-change="handleSelectionChange"
         >
+          <el-table-column type="selection" width="55" align="center">
+          </el-table-column>
           <el-table-column label="序号" type="index" width="60">
             <template slot-scope="{ row, $index }">
               {{ $index + 1 }}
@@ -199,7 +203,8 @@
         },
         objPick: {
           pickList: []
-        }
+        },
+        selectionData: []
       };
     },
     created() {
@@ -259,6 +264,32 @@
         }, result);
       },
 
+      batchDelete() {
+        if (this.selectionData.length == 0) {
+          return this.$message.warning('请选择需要删除的领料数据!');
+        }
+
+        this.$confirm('此操作将删除领料数据, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(() => {
+            for (let item of this.selectionData) {
+              const findIndex = this.objPick.pickList.findIndex(
+                (it) => item.id == it.id
+              );
+
+              this.objPick.pickList.splice(findIndex, 1);
+            }
+          })
+          .catch(() => {});
+      },
+
+      handleSelectionChange(val) {
+        this.selectionData = val;
+      },
+
       removeItem(index) {
         this.objPick.pickList.splice(index, 1);
       },

+ 7 - 0
src/views/pick/pickApply/components/selfDetailed.vue

@@ -25,6 +25,13 @@
             <div class="name">领料人</div>
             <div class="content">{{ dataObj.executorName }}</div>
           </div>
+
+          <div class="col">
+            <div class="name">类型</div>
+            <div class="content" v-if="dataObj.type == 1">自建领料</div>
+            <div class="content" v-if="dataObj.type == 2">工单领料</div>
+            <div class="content" v-if="dataObj.type == 3">委外领料</div>
+          </div>
         </div>
       </div>
 

+ 13 - 1
src/views/pick/pickApply/index.vue

@@ -40,6 +40,12 @@
           <div v-else>{{ row.joinWorkOrderCode }}</div>
         </template>
 
+        <template v-slot:type="{ row }">
+          <el-tag type="warning" v-if="row.type == 1">自建领料</el-tag>
+          <el-tag type="success" v-if="row.type == 2">工单领料</el-tag>
+          <el-tag type="info" v-if="row.type == 3">委外领料</el-tag>
+        </template>
+
         <template v-slot:status="{ row }">
           <el-tag
             :type="['info', 'success', 'warning', 'danger'][row.status]"
@@ -50,7 +56,7 @@
 
         <template v-slot:action="{ row }">
           <el-button type="text" size="mini" @click="handDetailed(row)"
-            >详情</el-button
+            >详情</el-button  
           >
         </template>
       </ele-pro-table>
@@ -167,6 +173,12 @@
             label: '领料时间',
             align: 'center'
           },
+          {
+            prop: 'type',
+            slot: 'type',
+            label: '类型',
+            align: 'center'
+          },
           {
             prop: 'status',
             slot: 'status',

+ 25 - 3
src/views/produce/components/picking/detailed.vue

@@ -39,6 +39,13 @@
             <div class="name">领料人</div>
             <div class="content">{{ dataObj.executorName }}</div>
           </div>
+
+          <div class="col">
+            <div class="name">类型</div>
+            <div class="content" v-if="dataObj.type == 1">自建领料</div>
+            <div class="content" v-if="dataObj.type == 2">工单领料</div>
+            <div class="content" v-if="dataObj.type == 3">委外领料</div>
+          </div>
         </div>
       </div>
 
@@ -111,13 +118,17 @@
           @fullscreen-change="fullscreenChangeOut"
         >
           <template v-slot:empty>
-            <div class="empty">暂无领料数据</div>
+            <div class="empty">暂无出库数据</div>
           </template>
 
           <template v-slot:index="{ row, $index }">
             {{ $index + 1 }}
           </template>
 
+          <template v-slot:rootCategoryLevelId="{ row, $index }">
+            {{ typeName[Number(row.rootCategoryLevelId)] }}
+          </template>
+
           <template v-slot:status="{ row }">
             <el-tag>已出库</el-tag>
           </template>
@@ -141,6 +152,7 @@
 <script>
   import outboundDetail from './outboundDetail.vue';
   import { getOutboundDetail } from '@/api/produce/picking.js';
+  import { typeName } from '@/views/produce/components/common.js';
 
   export default {
     components: { outboundDetail },
@@ -155,7 +167,8 @@
         isFullscreen: false,
         tabalHeight: 300,
         tableHeightPick: '320px',
-        tableHeightOut: '320px'
+        tableHeightOut: '320px',
+        typeName
       };
     },
 
@@ -291,7 +304,16 @@
               prop: 'batchNo',
               label: '批次号',
               slot: 'batchNo',
-              align: 'center'
+              align: 'center',
+              showOverflowTooltip: true
+            },
+            {
+              width: 100,
+              prop: 'rootCategoryLevelId',
+              label: '领料类型',
+              slot: 'rootCategoryLevelId',
+              align: 'center',
+              showOverflowTooltip: true
             },
             {
               minWidth: 140,

+ 14 - 78
src/views/produceOrder/components/releaseDialog/index.vue

@@ -76,83 +76,6 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <!--        <el-row>-->
-        <!--          <el-form-item label="报工类型:" required>-->
-        <!--            <el-radio-group v-model="form.singleReport">-->
-        <!--              &lt;!&ndash; v-if="clientEnvironmentId != 2" &ndash;&gt;-->
-        <!--              <el-radio :label="1">单件报工</el-radio>-->
-        <!--              <el-radio :label="0">批量报工</el-radio>-->
-        <!--            </el-radio-group>-->
-        <!--          </el-form-item>-->
-        <!--        </el-row>-->
-        <!--        <el-row>-->
-        <!--          <el-form-item label="派单方式:" prop="taskAss">-->
-        <!--            <el-radio-group v-model="form.taskAss">-->
-        <!--              <el-radio :label="1">生产订单派单</el-radio>-->
-        <!--              <el-radio :disabled="procTaskDis" :label="0"-->
-        <!--              >工序任务派单-->
-        <!--              </el-radio-->
-        <!--              >-->
-        <!--            </el-radio-group>-->
-        <!--          </el-form-item>-->
-        <!--        </el-row>-->
-        <!--        <el-row v-if="form.taskAss == 1">-->
-        <!--          <el-col :span="24">-->
-        <!--            <el-form-item label="指派:" prop="assignType">-->
-        <!--              <el-radio-group-->
-        <!--                v-model="form.assignType"-->
-        <!--                size="mini"-->
-        <!--                @change="assignRadio"-->
-        <!--              >-->
-        <!--                <el-radio-button :label="1">工位</el-radio-button>-->
-        <!--                <el-radio-button :label="2">人员</el-radio-button>-->
-        <!--                &lt;!&ndash; <el-radio-button :label="3">产线</el-radio-button> &ndash;&gt;-->
-        <!--              </el-radio-group>-->
-        <!--            </el-form-item>-->
-        <!--          </el-col>-->
-        <!--          <el-form-item v-if="form.assignType == 1" label="工位:" required>-->
-        <!--            <el-select-->
-        <!--              v-model="form.workstationIds"-->
-        <!--              class="ele-block"-->
-        <!--              filterable-->
-        <!--              multiple-->
-        <!--              placeholder="请选择工位"-->
-        <!--              size="mini"-->
-        <!--            >-->
-        <!--              <el-option-->
-        <!--                v-for="item in stationList"-->
-        <!--                :key="item.id"-->
-        <!--                :label="item.name + '(' + item.code + ')'"-->
-        <!--                :value="item.id"-->
-        <!--              >-->
-        <!--              </el-option>-->
-        <!--            </el-select>-->
-        <!--          </el-form-item>-->
-
-        <!--          <el-form-item-->
-        <!--            v-if="form.assignType == 2"-->
-        <!--            label="人员:"-->
-        <!--            prop="crewIds"-->
-        <!--          >-->
-        <!--            <el-select-->
-        <!--              v-model="form.crewIds"-->
-        <!--              class="ele-block"-->
-        <!--              filterable-->
-        <!--              multiple-->
-        <!--              placeholder="请选择人员"-->
-        <!--              size="mini"-->
-        <!--            >-->
-        <!--              <el-option-->
-        <!--                v-for="item in crewList"-->
-        <!--                :key="item.id"-->
-        <!--                :label="item.name"-->
-        <!--                :value="item.id"-->
-        <!--              >-->
-        <!--              </el-option>-->
-        <!--            </el-select>-->
-        <!--          </el-form-item>-->
-        <!--        </el-row>-->
-        <!-- v-show="form.taskAss == 0" -->
         <el-tabs
           v-model="processId"
           v-loading="tabsLoading"
@@ -167,6 +90,11 @@
             :label="item.name"
             :name="item.id"
           >
+            <span style="color: green">
+              工序编码:{{ item.code }},所属工作中心:{{
+                item.workCenterName
+              }}</span
+            >
             <ele-pro-table
               :ref="`tableRef${index}`"
               v-loading="tabLoading"
@@ -184,6 +112,7 @@
                     :loading="toolbarLoading"
                     type="primary"
                     @click="dispatch(item, 1)"
+                    :disabled="!item.isDisable"
                   >
                     派单
                   </el-button>
@@ -191,6 +120,7 @@
                     :loading="toolbarLoading"
                     type="primary"
                     @click="dispatch(item, 2)"
+                    :disabled="!item.isDisable"
                   >
                     撤回
                   </el-button>
@@ -198,6 +128,7 @@
                     :loading="toolbarLoading"
                     type="primary"
                     @click="dispatch(item, 3)"
+                    :disabled="!item.isDisable"
                   >
                     保存
                   </el-button>
@@ -681,12 +612,17 @@
                 staffDis: false, // 人员按钮
                 lineDis: false // 产线按钮
               },
+              isDisable:
+                this.form.workCenterId == item.workCenterId ? true : false,
               startDate: '', // 开始日期 (当前工序中最早的计划开始时间)
-              endDate: '' // 结束日期 (当前工序中最晚的计划结束时间)
+              endDate: '', // 结束日期 (当前工序中最晚的计划结束时间)
+              workCenterId: item.workCenterId,
+              workCenterName: item.workCenterName
             };
             list.push(obj);
           });
           this.processList = list;
+          console.log(this.processList, '所有的工序数据集合');
           this.processId = res[0].sourceTaskId;
           // this.handleClick({ name: res[0].sourceTaskId });
           this.initializeQuery();

+ 9 - 1
src/views/produceOrder/index.vue

@@ -318,7 +318,8 @@
         columnsVersion: 0,
         dispatchVisible: false,
         dispatchRow: {},
-        tableHeight: 'calc(100vh - 340px)'
+        tableHeight: 'calc(100vh - 340px)',
+        workDataList: []
       };
     },
     computed: {
@@ -914,9 +915,16 @@
           ...this.sort
         });
         // res['list'] = this.flattenArray(res.list)
+        // this.getWorkData();
         return res;
       },
 
+      getWorkData() {
+        if(this.$refs.table.getData().length != 0) {
+          // const data = this.deep()
+        }
+      },
+
       onSortChange(e) {
         let sort = {
           orderBy: e.order,

+ 2 - 2
vue.config.js

@@ -36,9 +36,9 @@ module.exports = {
         // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.251:18086',
-        // 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.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.144:18086',
         // target: 'http://192.168.1.30:18086',