ysy před 1 rokem
rodič
revize
26ac1d3a62

+ 16 - 0
src/api/produce/workOrder.js

@@ -11,6 +11,7 @@ export async function getCode(code) {
   return Promise.reject(new Error(res.data.message));
 }
 
+
 // 工单列表
 export async function workorderPage(data) {
   const res = await request.post('/pda/mes/workorder/page', data);
@@ -22,6 +23,21 @@ export async function workorderPage(data) {
 
 
 
+// 工单列表 ()
+export async function workorderPage2(data) {
+  const res = await request.post('/mes/workorder/taskReportPage', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+
+
+
+
+
 // 查询库存台账首页列表
 
 export async function pageeLedgerMain(data) {

+ 232 - 0
src/views/pick/pickApply/index.vue

@@ -0,0 +1,232 @@
+<template>
+  <div class="index_box">
+    <div class="content_box">
+      <Search></Search>
+
+      <ele-split-layout
+        space="0px"
+        width="45%"
+        :resizable="true"
+        :min-size="200"
+        :max-size="-200"
+        :left-style="{
+          background: 'rgba(185, 182, 229, .4)',
+          overflow: 'hidden',
+          width: '100%'
+        }"
+        :right-style="{ overflow: 'hidden' }"
+        :responsive="false"
+        style="height: calc(100vh - 70px - 50px - 40px)"
+      >
+        <div class="left_main">
+          <produceOrder
+            @workSelect="workSelect"
+            @rowClick="rowClick"
+          ></produceOrder>
+        </div>
+
+        <template v-slot:content>
+          <div class="right_main">
+            <pickDetails ref="pickListRef"></pickDetails>
+          </div>
+        </template>
+      </ele-split-layout>
+    </div>
+
+    <!--领料弹框 -->
+    <picking
+      v-if="pickingShow"
+      @close="pickingClose"
+      :workListIds="workListIds"
+    ></picking>
+  </div>
+</template>
+
+<script>
+  import Search from '@/views/produce/components/search.vue';
+
+  import produceOrder from '@/views/produce/components/produceOrder.vue';
+
+
+  import picking from '@/views/produce/components/picking/index.vue';
+  import pickDetails from '@/views/produce/components/picking/details.vue';
+
+
+
+
+  export default {
+    components: {
+      Search,
+      produceOrder,
+
+
+      picking,
+      pickDetails,
+
+
+    },
+    data() {
+      return {
+        loading: false,
+        operationType: null,
+        workListIds: [],
+
+        pickingShow: false,
+
+      };
+    },
+
+    computed: {
+      taskObj() {
+        return this.$store.state.user.taskObj;
+      }
+    },
+
+    created() {
+      this.operationType = null;
+      this.workListIds = [];
+    },
+    methods: {
+      workSelect(data) {
+        this.workListIds = data;
+      },
+
+      footBtn(t) {
+        this.operationType = t;
+
+        if (
+          Object.keys(this.$store.state.user.taskObj).length === 0 &&
+          this.$store.state.user.taskObj.constructor === Object
+        ) {
+          this.$message.warning('请选择工序');
+          return false;
+        }
+        if (['pick', 'feed', 'job'].includes(t)) {
+          if (this.workListIds.length == 0) {
+            this.$message.warning('请选择工单列表');
+            return false;
+          }
+        }
+
+        if (t == 'pick') {
+          this.$nextTick(() => {
+            this.$refs.pickListRef.getList(this.workListIds);
+          });
+
+          this.pickingShow = true;
+        }
+
+        if (t == 'feed') {
+        }
+      },
+
+      pickingClose(val) {
+        if (val) {
+          this.$nextTick(() => {
+            this.$refs.pickListRef.getList(this.workListIds);
+          });
+        }
+        this.pickingShow = false;
+      }
+    },
+
+    mounted() {},
+
+    destroyed() {}
+  };
+</script>
+
+<style>
+  .new-ele-admin-tabs {
+    display: none !important;
+  }
+
+  .c_title {
+    color: #157a2c;
+    font-size: 18px;
+    font-weight: bold;
+  }
+
+  .tableZ_box {
+    border: 1px solid #e3e5e5;
+    margin: 6px 0;
+
+    &:last-child {
+      border-bottom: none;
+    }
+
+    .row {
+      width: 100%;
+      display: flex;
+    }
+
+    .col {
+      width: calc(100% / 5);
+      display: flex;
+      align-items: center;
+      min-width: 200px;
+      min-height: 32px;
+      border-bottom: 1px solid #e3e5e5;
+      border-right: 1px solid #e3e5e5;
+
+      &:last-child {
+        border-right: none;
+      }
+
+      .name {
+        display: flex;
+        align-items: center;
+        padding: 4px;
+        width: 80px;
+        height: 100%;
+        background-color: #d0e4d5;
+        color: #000;
+      }
+
+      .content {
+        padding: 4px 6px;
+        color: #000;
+      }
+    }
+
+    .pd6 {
+      padding: 0 6px;
+    }
+  }
+</style>
+<style lang="scss" scoped>
+  .index_box {
+    padding: 8px;
+    padding-bottom: 0px;
+    width: 100%;
+
+    min-width: 1280px !important;
+    height: calc(100vh - 100px);
+    overflow-x: auto;
+    /* 当内容超出宽度时,允许水平滚动 */
+    white-space: nowrap;
+    /* 防止内部文本换行,确保所有内容都在一行显示 */
+    scrollbar-width: thin;
+    /* 设置滚动条宽度(浏览器兼容性可能有所不同) */
+    scrollbar-color: #40a9ff transparent;
+    /* 设置滚动条颜色和轨道颜色(同样,浏览器兼容性) */
+  }
+
+
+  .left_main {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-around;
+    min-width: 640px;
+    height: calc((100vh - 70px - 50px - 40px - 12px));
+  }
+
+  .right_main {
+    min-width: 640px;
+    height: calc((100vh - 70px - 50px - 40px - 12px));
+    margin-top: 6px;
+    background: #f0f3f3;
+  }
+</style>

+ 2 - 2
src/views/produce/components/produceOrder.vue

@@ -43,7 +43,7 @@
 </template>
 
 <script>
-  import { workorderPage } from '@/api/produce/workOrder.js';
+  import { workorderPage2 } from '@/api/produce/workOrder.js';
   import routings from './routings.vue';
   import { isFullscreen } from 'ele-admin';
   export default {
@@ -221,7 +221,7 @@
     methods: {
       /* 表格数据源 */
       datasource({ page, where }) {
-        return workorderPage({
+        return workorderPage2({
           pageNum: page,
           size: 200,
           taskId: this.taskObj && this.taskObj.id,

+ 2 - 0
src/views/produce/index.vue

@@ -1,3 +1,5 @@
+
+
 <template>
   <div class="index_box">
     <div class="content_box">