ysy 2 tahun lalu
induk
melakukan
dd92c4271f
4 mengubah file dengan 21 tambahan dan 12 penghapusan
  1. TEMPAT SAMPAH
      dist.rar
  2. TEMPAT SAMPAH
      dist.zip
  3. 10 1
      src/api/materialPlan/index.js
  4. 11 11
      src/views/materialPlan/components/produce-edit-dialog.vue

TEMPAT SAMPAH
dist.rar


TEMPAT SAMPAH
dist.zip


+ 10 - 1
src/api/materialPlan/index.js

@@ -80,7 +80,6 @@ export async function getMaterialList(data) {
 
 
 
 
 // 批量根据生产计划计算bom列表信息
 // 批量根据生产计划计算bom列表信息
-
 export async function listBomBySalesOrderIds(data) {
 export async function listBomBySalesOrderIds(data) {
   const res = await request.post(`/aps/batchingplandetail/listBomBySalesOrderIds`,data);
   const res = await request.post(`/aps/batchingplandetail/listBomBySalesOrderIds`,data);
   if (res.data.code == 0) {
   if (res.data.code == 0) {
@@ -108,3 +107,13 @@ export async function submit(data) {
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
 }
 }
 
 
+
+
+
+export async function listBomByWorkOrderIds(data) {
+  const res = await request.post(`/aps/batchingplandetail/listBomByWorkOrderIds`,data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 11 - 11
src/views/materialPlan/components/produce-edit-dialog.vue

@@ -137,7 +137,7 @@
 
 
 import workOrderPop from './workOrderPop.vue'
 import workOrderPop from './workOrderPop.vue'
 import ProductModal from './ProductModal.vue'
 import ProductModal from './ProductModal.vue'
-import { listBomBySalesOrderIds, listBomBySalesOrderId, save, getById } from '@/api/materialPlan/index';
+import {listBomByWorkOrderIds, save, getById } from '@/api/materialPlan/index';
 import ProductionVersion from '@/components/CreatePlan/ProductionVersion2.vue';
 import ProductionVersion from '@/components/CreatePlan/ProductionVersion2.vue';
 export default {
 export default {
   components: {
   components: {
@@ -242,7 +242,7 @@ export default {
 
 
         {
         {
           prop: 'productionPlanId',
           prop: 'productionPlanId',
-          label: '工艺路线物料',
+          label: '工',
           slot: 'productionPlanId',
           slot: 'productionPlanId',
 
 
           align: 'center',
           align: 'center',
@@ -427,24 +427,24 @@ export default {
     },
     },
 
 
     chooseOrder(list) {
     chooseOrder(list) {
-      let salesOrderIds = []
+      let workOrderList = []
       list.map((m => {
       list.map((m => {
-        salesOrderIds.push(m.id)
+        workOrderList.push(m.id)
         return {
         return {
           ...m,
           ...m,
         }
         }
       }))
       }))
-      this.$refs.table.setData([...this.tableData, ...list]);
+      // this.$refs.table.setData([...this.tableData, ...list]);
     
     
 
 
 
 
-      // if (salesOrderIds.length > 0) {
-      //   listBomBySalesOrderIds({ salesOrderIds: salesOrderIds }).then((res) => {
-      //     this.$refs.table.setData([...this.tableData, ...res]);
+      if (workOrderList.length > 0) {
+        listBomByWorkOrderIds({ workOrderList: workOrderList }).then((res) => {
+          this.$refs.table.setData([...this.tableData, ...res]);
 
 
-      //     this.$refs.table.toggleRowExpansionAll()
-      //   })
-      // }
+          this.$refs.table.toggleRowExpansionAll()
+        })
+      }
     },
     },
 
 
     remove(row, index) {
     remove(row, index) {