695593266@qq.com 11 miesięcy temu
rodzic
commit
1b7151b629

+ 9 - 0
src/api/produce/feeding.js

@@ -53,3 +53,12 @@ export async function splitBatch(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// pda出库单-用于投料
+export async function feedOutInOrder(params) {
+  const res = await request.post(`/pda/mes/feed/feedOutInOrder`, params, true);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 266 - 233
src/views/outsourcing/index.vue

@@ -4,17 +4,32 @@
       <search @search="reload" ref="searchRef"> </search>
 
       <!-- 数据表格 -->
-      <ele-pro-table ref="table" :columns="columns" :datasource="datasource" cache-key="workOrderTable">
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        cache-key="workOrderTable"
+      >
         <template v-slot:code="{ row }">
-          <el-link type="primary" :underline="false" @click="handleDetails(row)">{{ row.code }}</el-link>
+          <el-link
+            type="primary"
+            :underline="false"
+            @click="handleDetails(row)"
+            >{{ row.code }}</el-link
+          >
         </template>
         <template v-slot:requireDeliveryTime="{ row }">
           <span v-if="row.deliveryMethod == 1">{{
             row.requireDeliveryTime
           }}</span>
 
-          <el-link v-if="row.deliveryMethod == 2" type="primary" :underline="false"
-            @click.native="handleMethod(row)">分批时间</el-link>
+          <el-link
+            v-if="row.deliveryMethod == 2"
+            type="primary"
+            :underline="false"
+            @click.native="handleMethod(row)"
+            >分批时间</el-link
+          >
         </template>
 
         <template v-slot:type="{ row }">
@@ -29,26 +44,35 @@
           <el-tag>{{ row.status == 1 ? '已发布' : '未发布' }}</el-tag>
         </template>
 
-
         <template v-slot:outsourceScene="{ row }">
-
           <span>{{ row.outsourceScene | outsourceSceneText }}</span>
         </template>
 
-
         <template v-slot:technicalDrawings="{ row }">
           <div v-if="row.technicalDrawings && row.technicalDrawings?.length">
-            <el-link v-for="link in row.technicalDrawings" :key="link.id" type="primary" :underline="false"
-              @click="downloadFile(link)">
-              {{ link.name }}</el-link>
+            <el-link
+              v-for="link in row.technicalDrawings"
+              :key="link.id"
+              type="primary"
+              :underline="false"
+              @click="downloadFile(link)"
+            >
+              {{ link.name }}</el-link
+            >
           </div>
         </template>
 
         <template v-slot:files="{ row }">
           <div v-if="row.files && row.files?.length">
-            <el-link v-for="link in row.files" :key="link.id" type="primary" :underline="false"
-              @click="downloadFile(link)">
-              {{ link.name }}</el-link>
+            <el-link
+              v-for="link in row.files"
+              :key="link.id"
+              type="primary"
+              :underline="false"
+              @click="downloadFile(link)"
+            >
+              {{ link.name }}</el-link
+            >
           </div>
         </template>
 
@@ -61,11 +85,21 @@
             详情
           </el-link> -->
 
-          <el-link type="primary" v-if="row.status == 1" :underline="false" @click="handleFlow(row)">
+          <el-link
+            type="primary"
+            v-if="row.status == 1"
+            :underline="false"
+            @click="handleFlow(row)"
+          >
             流程
           </el-link>
 
-          <el-link type="primary" v-if="row.status != 1" :underline="false" @click="handleRelease(row)">
+          <el-link
+            type="primary"
+            v-if="row.status != 1"
+            :underline="false"
+            @click="handleRelease(row)"
+          >
             发布
           </el-link>
         </template>
@@ -81,230 +115,229 @@
 </template>
 
 <script>
-import { getList } from '@/api/outsourcing/index.js';
-import flow from './components/flow.vue';
-import search from './components/search.vue';
-import release from './components/release.vue';
-import Detail from './components/details.vue';
-import timeDialog from './components/timeDialog.vue';
-import { getFile } from '@/api/system/file';
-export default {
-  components: {
-    search,
-    flow,
-    release,
-    Detail,
-    timeDialog
-  },
-  data() {
-    return {
-      loading: false
-    };
-  },
-  filters: {
-    outsourceSceneText(text) {
-      switch (text) {
-        case 1:
-          return '首工序委外'
-        case 2:
-          return '单工序'
-        case 3:
-          return '多工序'
-        case 4:
-          return '首工序及多工序'
-        default : 
-          return ''
-      }
-    }
-  },
-  computed: {
-    // 表格列配置
-    columns() {
-      return [
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          showOverflowTooltip: true,
-          fixed: 'left'
-        },
-
-        {
-          prop: 'batchNo',
-          label: '批次号',
-          align: 'center',
-          minWidth: 100
-        },
-        {
-          slot: 'code',
-          prop: 'code',
-          label: '委外单编码',
-          align: 'center'
-        },
-        {
-          prop: 'name',
-          label: '委外单名称',
-          align: 'center'
-        },
-
-        {
-
-          prop: 'workOrderCode',
-          label: '工单编码',
-          align: 'center'
-        },
-
-        {
-          prop: 'taskName',
-          label: '工序',
-          align: 'center'
-        },
-
-        {
-          prop: 'totalCount',
-          label: '委外数量',
-          align: 'center'
-        },
-
-        {
-          prop: 'totalWeight',
-          label: '委外重量',
-          align: 'center'
-        },
-
-        {
-          slot: 'type',
-          label: '委外类型',
-          align: 'center'
-        },
-        {
-          prop: 'outsourceScene',
-          slot: 'outsourceScene',
-          label: '委外场景',
-          align: 'center'
-        },
-        {
-          prop: 'remark',
-          label: '备注',
-          align: 'center'
-        },
-
-        {
-          slot: 'requireDeliveryTime',
-          label: '预计到货日期',
-          align: 'center',
-          width: 100
-        },
-
-        {
-          prop: 'produceRoutingName',
-          label: '工艺路线',
-          align: 'center'
-        },
-
-        {
-          prop: 'warehouseName',
-          label: '仓库',
-          align: 'center'
-        },
-
-        {
-          prop: 'createTime',
-          label: '创建时间',
-          align: 'center',
-          width: 100
-        },
-
-        {
-          slot: 'status',
-          label: '状态',
-          align: 'center'
-        },
-
-        {
-          label: '图片附件',
-          slot: 'technicalDrawings',
-          action: 'technicalDrawings',
-          minWidth: 100
-        },
-
-        {
-          label: '附件',
-          slot: 'files',
-          action: 'files',
-          minWidth: 100
-        },
-
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 140,
-          align: 'center',
-          resizable: false,
-          fixed: 'right',
-          slot: 'action',
-          showOverflowTooltip: true
-        }
-      ];
+  import { getList } from '@/api/outsourcing/index.js';
+  import flow from './components/flow.vue';
+  import search from './components/search.vue';
+  import release from './components/release.vue';
+  import Detail from './components/details.vue';
+  import timeDialog from './components/timeDialog.vue';
+  import { getFile } from '@/api/system/file';
+  export default {
+    components: {
+      search,
+      flow,
+      release,
+      Detail,
+      timeDialog
     },
-
-    clientEnvironmentId() {
-      return this.$store.state.user.info.clientEnvironmentId;
-    }
-  },
-  created() { },
-
-  methods: {
-    statusFormatter(status) {
-      const obj = this.statusOpt.find((i) => i.value == status);
-      return obj && obj.label;
-    },
-    /* 表格数据源 */
-    datasource({ page, limit, where }) {
-      return getList({
-        pageNum: page,
-        size: limit,
-        ...where
-      });
-    },
-
-    downloadFile(file) {
-      getFile({ objectName: file.storePath }, file.name);
+    data() {
+      return {
+        loading: false
+      };
     },
-
-    handleFlow(row) {
-      if (!row.processInstanceId) {
-        return this.$message.warning('暂无流程图')
+    filters: {
+      outsourceSceneText(text) {
+        switch (text) {
+          case 1:
+            return '首工序委外';
+          case 2:
+            return '单工序';
+          case 3:
+            return '多工序';
+          case 4:
+            return '首工序及多工序';
+          default:
+            return '';
+        }
       }
-      this.$refs.flowRef.open(row.processInstanceId);
-    },
-
-    handleDetails(row) {
-      this.$refs.detailsRef.open(row);
     },
-
-    handleMethod(row) {
-      this.$refs.timeDialogRef.open(row, 'details');
-    },
-
-    handleRelease(row) {
-      this.$refs.releaseRef.open(row);
-    },
-
-    /* 刷新表格 */
-    reload(where) {
-      this.$nextTick(() => {
-        this.$refs.table.reload({ page: 1, where });
-      });
+    computed: {
+      // 表格列配置
+      columns() {
+        return [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+
+          {
+            prop: 'batchNo',
+            label: '批次号',
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            slot: 'code',
+            prop: 'code',
+            label: '委外单编码',
+            align: 'center'
+          },
+          {
+            prop: 'name',
+            label: '委外单名称',
+            align: 'center'
+          },
+
+          {
+            prop: 'workOrderCode',
+            label: '工单编码',
+            align: 'center'
+          },
+
+          {
+            prop: 'taskName',
+            label: '工序',
+            align: 'center'
+          },
+
+          {
+            prop: 'totalCount',
+            label: '委外数量',
+            align: 'center'
+          },
+
+          {
+            prop: 'totalWeight',
+            label: '委外重量',
+            align: 'center'
+          },
+
+          {
+            slot: 'type',
+            label: '委外类型',
+            align: 'center'
+          },
+          {
+            prop: 'outsourceScene',
+            slot: 'outsourceScene',
+            label: '委外场景',
+            align: 'center'
+          },
+          {
+            prop: 'remark',
+            label: '备注',
+            align: 'center'
+          },
+
+          {
+            slot: 'requireDeliveryTime',
+            label: '预计到货日期',
+            align: 'center',
+            width: 100
+          },
+
+          // {
+          //   prop: 'produceRoutingName',
+          //   label: '工艺路线',
+          //   align: 'center'
+          // },
+
+          {
+            prop: 'warehouseName',
+            label: '仓库',
+            align: 'center'
+          },
+
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            width: 100
+          },
+
+          {
+            slot: 'status',
+            label: '状态',
+            align: 'center'
+          },
+
+          {
+            label: '图片附件',
+            slot: 'technicalDrawings',
+            action: 'technicalDrawings',
+            minWidth: 100
+          },
+
+          {
+            label: '附件',
+            slot: 'files',
+            action: 'files',
+            minWidth: 100
+          },
+
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 140,
+            align: 'center',
+            resizable: false,
+            fixed: 'right',
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ];
+      },
+
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
+      }
     },
-
-    releaseRefresh() {
-      this.$refs.table.reload();
+    created() {},
+
+    methods: {
+      statusFormatter(status) {
+        const obj = this.statusOpt.find((i) => i.value == status);
+        return obj && obj.label;
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where }) {
+        return getList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+
+      downloadFile(file) {
+        getFile({ objectName: file.storePath }, file.name);
+      },
+
+      handleFlow(row) {
+        if (!row.processInstanceId) {
+          return this.$message.warning('暂无流程图');
+        }
+        this.$refs.flowRef.open(row.processInstanceId);
+      },
+
+      handleDetails(row) {
+        this.$refs.detailsRef.open(row);
+      },
+
+      handleMethod(row) {
+        this.$refs.timeDialogRef.open(row, 'details');
+      },
+
+      handleRelease(row) {
+        this.$refs.releaseRef.open(row);
+      },
+
+      /* 刷新表格 */
+      reload(where) {
+        this.$nextTick(() => {
+          this.$refs.table.reload({ page: 1, where });
+        });
+      },
+
+      releaseRefresh() {
+        this.$refs.table.reload();
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped></style>

+ 13 - 0
src/views/produce/components/feeding/components/outboundOrderDialog.vue

@@ -0,0 +1,13 @@
+<template>
+  
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style>
+
+</style>

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

@@ -39,7 +39,7 @@
             <div class="name">工单信息 </div>
 
             <div class="rx-bc">
-              <el-button type="text" size="mini">出库单</el-button>
+              <el-button type="text" size="mini" @click="outboundOrder()">出库单</el-button>
               <el-button
                 type="text"
                 size="mini"
@@ -417,6 +417,10 @@
         });
       },
 
+      outboundOrder() {
+        
+      },
+
       openPicking(id, item) {
         this.$refs.pickingListRef.open(id, item, '选择列表');
       },

+ 1 - 1
src/views/produce/components/footBtn.vue

@@ -283,7 +283,7 @@
 
   .btn {
     height: 70px;
-    width: calc(100% / 10);
+    width: calc(100% / 11);
     margin: 0 10px;
     color: #fff;
     font-weight: 800;

+ 0 - 1
src/views/produce/components/jobBooking/components/batchSemiProductJobBom.vue

@@ -44,7 +44,6 @@
       @columns-change="handleColumnChange"
       :cache-key="cacheKeyUrl"
       :selection.sync="selection"
-      @selection-change="handleSelectionChange"
       row-key="id"
     >
       <template v-slot:engrave="{ row, $index }">

+ 2 - 3
src/views/produce/components/jobBooking/components/semiProductJobBom.vue

@@ -54,7 +54,6 @@
       @columns-change="handleColumnChange"
       :cache-key="cacheKeyUrl"
       :selection.sync="selection"
-      @selection-change="handleSelectionChange"
       row-key="id"
     >
       <template v-slot:engrave="{ row, $index }">
@@ -977,8 +976,8 @@
 
       handleSelectionChange(data) {
         // this.chooseData = data;
-        console.log(data, '选择的数据');
-        this.$emit('chooseData', data);
+        // console.log(data, '选择的数据');
+        // this.$emit('chooseData', data);
         // if (data.length > 0) {
         //   console.log(data, 'data');
         //   data.forEach((item) => {

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

@@ -668,7 +668,7 @@
                     : acc;
                 }, 0);
 
-                objworkReportInfo.formedNum = number;
+                obj.workReportInfo.formedNum = number;
               }
 
               obj.workReportInfo.formingNum = obj.formingNum;

+ 32 - 1
src/views/produce/components/warehousing/index.vue

@@ -183,6 +183,9 @@
               :singleReport="item.singleReport"
               :storeType="storeType"
               :equipmentList="item.equipmentList"
+              :isChoose="isChoose"
+              :isEngrave="isEngrave"
+              :isDisposal="isDisposal"
             >
             </batchSemiProductJobBom>
           </div>
@@ -315,6 +318,9 @@
               :singleReport="item.singleReport"
               :storeType="storeType"
               :equipmentList="item.equipmentList"
+              :isChoose="isChoose"
+              :isEngrave="isEngrave"
+              :isDisposal="isDisposal"
             >
             </batchSemiProductJobBom>
           </div>
@@ -393,6 +399,7 @@
   import { jobSave } from '@/api/produce/workOrder';
   // import jobDdBom from './components/jobDdBom.vue';
   import jobDdBom from './components/newJobDdBom.vue';
+  import { parameterGetByCode } from '@/api/system/dictionary-data';
 
   export default {
     components: {
@@ -439,7 +446,10 @@
         ],
         storeType: 'store',
         warehouseId: null,
-        inWarehouseType: null
+        inWarehouseType: null,
+        isChoose: false,
+        isEngrave: false,
+        isDisposal: false
       };
     },
 
@@ -465,6 +475,7 @@
 
     created() {
       this.getWarehouseListFn();
+      this.getChooseEngrave();
     },
 
     methods: {
@@ -520,6 +531,26 @@
           });
       },
 
+      async getChooseEngrave() {
+        await parameterGetByCode({
+          code: 'choose_engrave'
+        }).then((res) => {
+          this.isChoose = res.value == '1' ? true : false;
+        });
+
+        await parameterGetByCode({
+          code: 'batch_update_engrave'
+        }).then((res) => {
+          this.isEngrave = res.value == '1' ? true : false;
+        });
+
+        await parameterGetByCode({
+          code: 'batch_disposal'
+        }).then((res) => {
+          this.isDisposal = res.value == '1' ? true : false;
+        });
+      },
+
       getTgWarehouse() {
         const param = {
           workOrderIds: this.idsList,

+ 1 - 0
src/views/produce/components/workPlan/edit.vue

@@ -4,6 +4,7 @@
     :before-close="handleClose"
     :close-on-click-modal="true"
     :close-on-press-escape="false"
+    :maxable="true"
     append-to-body
     width="90%"
   >

+ 1 - 0
src/views/produce/components/workPlan/index.vue

@@ -4,6 +4,7 @@
     :before-close="handleClose"
     :close-on-click-modal="true"
     :close-on-press-escape="false"
+    :maxable="true"
     append-to-body
     width="90%"
     title="质检记录表"