liuyi 1 vuosi sitten
vanhempi
commit
a5d7463512

+ 15 - 0
src/api/productionPlan/index.js

@@ -182,6 +182,14 @@ export async function pbomHomogeneityInspect(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
+export async function orderPbomHomogeneityInspect(data) {
+  const res = await request.post(`/aps/productionplan/orderPbomHomogeneityInspect`,  data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
 export async function getPlanStatistics(params){
   const res = await request.get('/aps/productionplan/getPlanStatistics', {params});
   if (res.data.code == 0) {
@@ -189,3 +197,10 @@ export async function getPlanStatistics(params){
   }
   return Promise.reject(new Error(res.data.message));
 }
+export async function getOrderBomRoot(data) {
+  const res = await request.post(`/aps/productionplan/getOrderBomRoot`,  data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 17 - 4
src/views/saleOrder/components/create-order.vue

@@ -368,6 +368,8 @@
 
   </ele-modal>
     <orderHomogeneityInspectDialog ref="orderHomogeneityInspectDialog"></orderHomogeneityInspectDialog>
+    <orderHomogeneityInspectInstallDialog ref="orderHomogeneityInspectInstallDialog"></orderHomogeneityInspectInstallDialog>
+
   </div>
 </template>
 
@@ -375,6 +377,7 @@
 import { getCode } from '@/api/codeManagement';
 import EquipmentDialog from '../components/EquipmentDialog.vue';
 import orderHomogeneityInspectDialog from "./orderHomogeneityInspectDialog";
+import orderHomogeneityInspectInstallDialog from "./orderHomogeneityInspectInstallDialog";
 import { createOrUpdate, getOrderDetail , bomListByPlan, bomRoutingList, getFactoryList} from '@/api/saleOrder';
 
 import dayjs from 'dayjs';
@@ -382,7 +385,8 @@ import { multiply } from '@/utils/math';
 export default {
   components: {
     EquipmentDialog,
-    orderHomogeneityInspectDialog
+    orderHomogeneityInspectDialog,
+    orderHomogeneityInspectInstallDialog
   },
   data() {
     return {
@@ -755,9 +759,18 @@ export default {
         this.$message.warning('请选择BOM版本');
         return;
       }
-      let data = [];
-      data.push({bomId: row.bomCategoryId, planNum: row.contractNum});
-      this.$refs.orderHomogeneityInspectDialog.open(data);
+      if(row.productType == 2){
+        let data = [];
+        data.push(row);
+        this.$refs.orderHomogeneityInspectDialog.open(data, this.form);
+      } else if(row.productType == 3){
+        this.$refs.orderHomogeneityInspectInstallDialog.open([row.id]);
+      } else {
+        this.$message.warning('请确认加工方式!');
+      }
+
+
+
 
     },
 

+ 143 - 162
src/views/saleOrder/components/orderHomogeneityInspectDialog.vue

@@ -9,156 +9,80 @@
     :title="'齐套性检查'"
   >
     <div class="form-wrapper">
-<!--      <el-form :model="requestData" label-width="0" :show-message="false">-->
-<!--        <el-descriptions title="" :column="2" border>-->
-<!--          <el-descriptions-item label="计划编号">-->
-<!--            {{ formData.code }}</el-descriptions-item-->
-<!--          >-->
-
-<!--          <el-descriptions-item label="产品编码">{{-->
-<!--            formData.productCode-->
-<!--            }}</el-descriptions-item>-->
-
-<!--          <el-descriptions-item label="产品名称">{{-->
-<!--            formData.productName-->
-<!--            }}</el-descriptions-item>-->
-
-<!--          <el-descriptions-item label="牌号|型号">-->
-<!--            {{ formData.brandNo }}|{{ formData.model }}</el-descriptions-item-->
-<!--          >-->
-
-<!--          <el-descriptions-item label="批次号">{{-->
-<!--            formData.batchNo-->
-<!--            }}</el-descriptions-item>-->
-
-<!--          <el-descriptions-item label="工艺路线">{{-->
-<!--            formData.produceRoutingName-->
-<!--            }}</el-descriptions-item>-->
-
-<!--          <el-descriptions-item label="要求生产数量">{{-->
-<!--            formData.requiredFormingNum-->
-<!--            }}</el-descriptions-item>-->
-<!--          <el-descriptions-item label="要求完成日期">{{-->
-<!--            formData.reqMoldTime-->
-<!--            }}</el-descriptions-item>-->
-<!--        </el-descriptions>-->
-<!--      </el-form>-->
-
-<!--      <headerTitle title="剩余拆批" class="mt20"> </headerTitle>-->
-      <el-tabs v-model="activeName" @tab-click="tabClick()" type="card" size="mini">
-        <el-tab-pane label="自制件" name="first"></el-tab-pane>
-        <el-tab-pane label="装配件" name="second"></el-tab-pane>
-      </el-tabs>
-      <el-form ref="form" :model="form" :rules="rules">
-<!--        <ele-pro-table-->
-<!--          ref="table"-->
-<!--          :needPage="false"-->
-<!--          :columns="columns"-->
-<!--          :datasource="form.surplusUnpack"-->
-<!--        >-->
-<!--          <template v-slot:toolbar>-->
-<!--            <el-button-->
-<!--              size="small"-->
-<!--              type="primary"-->
-<!--              icon="el-icon-plus"-->
-<!--              class="ele-btn-icon"-->
-<!--              :disabled="requiredFormingNum == 0 ? true : false"-->
-<!--              @click="openUnpack"-->
-<!--            >-->
-<!--              拆批-->
-<!--            </el-button>-->
-<!--          </template>-->
-
-<!--          <template v-slot:requiredFormingNum="scope">-->
-<!--            <el-form-item-->
-<!--              v-if="requiredFormingNum != 0"-->
-<!--              :prop="'surplusUnpack.' + scope.$index + '.requiredFormingNum'"-->
-<!--              :rules="[-->
-<!--                {-->
-<!--                  required: true,-->
-<!--                  message: '请输入要求生产数量',-->
-<!--                  trigger: 'change'-->
-<!--                },-->
-<!--                {-->
-<!--                  pattern: /^\d+(\.{0,1}\d+){0,1}$/,-->
-<!--                  message: '拆批数超过生产数量',-->
-<!--                  trigger: ['blur', 'change']-->
-<!--                }-->
-<!--              ]"-->
-<!--            >-->
-<!--              <el-input-->
-<!--                disabled-->
-<!--                v-model="requiredFormingNum"-->
-<!--                placeholder="请输入"-->
-<!--              ></el-input>-->
-<!--            </el-form-item>-->
-
-<!--            <el-form-item v-else> 工单已全部拆完 </el-form-item>-->
-<!--          </template>-->
-
-<!--          <template v-slot:splitResidue="scope">-->
-<!--            {{ formData.splitResidue }}-->
-<!--          </template>-->
-
-<!--        </ele-pro-table>-->
-
-<!--        <headerTitle title="拆批" class="mt20"> </headerTitle>-->
-
-        <ele-pro-table
-          ref="table"
-          :needPage="false"
-          :columns="columns"
-          :datasource="datasource"
-          :init-load="false"
-        >
-          <template v-slot:stockCount="{ row }">
-            <el-link type="primary" :underline="false" @click="stockDetail(row)">
-              {{ row.stockCount }}
-            </el-link>
-          </template>
-          <template v-slot:currentCount="{ row }">
-            <el-link type="primary" :underline="false" @click="currentDetail(row)">
-              {{ row.currentCount }}
-            </el-link>
-          </template>
-<!--          <template v-slot:requiredFormingNum="scope">-->
-<!--            <el-form-item-->
-<!--              :prop="'unpackList.' + scope.$index + '.requiredFormingNum'"-->
-<!--              :rules="{-->
-<!--                required: true,-->
-<!--                message: '请输入要求生产数量',-->
-<!--                trigger: 'change'-->
-<!--              }"-->
-<!--            >-->
-<!--              <el-input-number-->
-<!--                type="number"-->
-<!--                @change="changeNum(scope.$index)"-->
-<!--                :min="0"-->
-<!--                v-model="scope.row.requiredFormingNum"-->
-<!--                placeholder="请输入"-->
-<!--              ></el-input-number>-->
-<!--            </el-form-item>-->
-<!--          </template>-->
-
-<!--          <template v-slot:reqMoldTime="scope">-->
-<!--            <el-form-item-->
-<!--              :prop="'unpackList.' + scope.$index + '.reqMoldTime'"-->
-<!--              :rules="{-->
-<!--                required: true,-->
-<!--                message: '请选择开始计划时间',-->
-<!--                trigger: 'change'-->
-<!--              }"-->
-<!--            >-->
-<!--              <el-date-picker-->
-<!--                class="w100"-->
-<!--                v-model="scope.row.reqMoldTime"-->
-<!--                type="date"-->
-<!--                value-format="yyyy-MM-dd"-->
-<!--              ></el-date-picker>-->
-<!--            </el-form-item>-->
-<!--          </template>-->
-        </ele-pro-table>
-      </el-form>
+      <div v-if="leftShow" :style="{width: leftWidth}">
+        <el-tree :expand-on-click-node="false" :data="cardList" :props="treeProps" @node-click="handleNodeClick"></el-tree>
+      </div>
+      <div :style="{width: rightWidth}">
+        <div v-if="!leftShow" class="planInfo">
+          <el-row style="width: 100%;">
+<!--            <el-col :span="planInfo.salesCode ? 6 : planInfo.salesCode.length * 6">-->
+<!--              <div style="color: blue; display: flex;">-->
+<!--                <div>销售单号:</div><div v-if="planInfo.salesCode"><span v-for="item in planInfo.salesCode"> {{item}}</span></div>-->
+<!--              </div>-->
+<!--            </el-col>-->
+            <el-col :span="6">
+              销售单号:{{orderInfo.code}}
+            </el-col>
+            <el-col :span="6">
+              编号:{{orderInfo.productCode}}
+            </el-col>
+            <el-col :span="6">
+              名称:{{orderInfo.productName}}
+            </el-col>
+            <el-col :span="6">
+              规格:{{orderInfo.specification}}
+            </el-col>
+            <el-col :span="6">
+              型号:{{orderInfo.model}}
+            </el-col>
+            <el-col :span="6">
+              合同数量:{{orderInfo.contractNum}}
+            </el-col>
+          </el-row>
+        </div>
+        <div>
+          <ele-pro-table
+            ref="table"
+            :needPage="false"
+            :columns="columns"
+            key="checkTable"
+            :init-load="false"
+            :datasource="datasource"
+          >
+            <template v-slot:stockCount="{ row }">
+              <el-link type="primary" :underline="false" @click="stockDetail(row)">
+                {{ row.stockCount }}
+              </el-link>
+            </template>
+            <template v-slot:currentCount="{ row }">
+              <el-link type="primary" :underline="false" @click="currentDetail(row)">
+                {{ row.currentCount }}
+              </el-link>
+            </template>
+            <template v-slot:stockColor="{ row }">
+              <div :class="{'statusRed' : row.stockStatus == '缺料'}">
+                {{row.stockStatus}}
+              </div>
+            </template>
+            <template v-slot:currentColor="{ row }">
+              <div :class="{'statusRed' : row.currentStatus == '缺料'}">
+                {{row.currentStatus}}
+              </div>
+            </template>
+            <template v-slot:finishColor="{ row }">
+              <div :class="{'statusRed' : row.finishStatus == '缺料'}">
+                {{row.finishStatus}}
+              </div>
+            </template>
+            <template v-slot:finishCount="{ row }">
+              <div>
+                <div v-if="row.finishCount > 0">{{row.finishCount}}</div>
+                <div v-else>-</div>
+              </div>
+            </template>
+          </ele-pro-table>
+        </div>
+      </div>
     </div>
     <div slot="footer">
       <el-button plain @click="cancel">取消</el-button>
@@ -184,7 +108,7 @@
     data() {
       return {
         visible: false,
-        activeName: 'first',
+
         bomIdList: [],
         formData: {},
         requestData: {
@@ -241,6 +165,7 @@
             minWidth: 80
           },
           {
+            slot: 'stockColor',
             prop: 'stockStatus',
             label: '库存状态',
             align: 'center',
@@ -254,12 +179,21 @@
             minWidth: 80
           },
           {
+            slot: 'currentColor',
             prop: 'currentStatus',
             label: '在途状态',
             align: 'center',
             minWidth: 80
           },
           {
+            slot: 'finishCount',
+            prop: 'finishCount',
+            label: '最终缺料数量',
+            align: 'center',
+            minWidth: 80
+          },
+          {
+            slot: 'finishColor',
             prop: 'finishStatus',
             label: '最终状态',
             align: 'center',
@@ -267,17 +201,39 @@
           },
         ],
         ids: [],
+        leftShow: false,
+        leftWidth: '0%',
+        rightWidth: '100%',
+        cardList: [],
+        treeProps: {
+          label: 'code',
+          children: 'children',
+        },
+        planInfo: {
+          salesCode: '',
+        },
+        orderInfo: {
+          code: '',
+          productCode: '',
+          productName: '',
+          contractNum: '',
+          specification: '',
+          model: '',
+        }
       };
     },
-    methods: {
-      tabClick(){
-        if(this.activeName == 'first'){
-          this.reload({bomIdList: this.bomIdList, productType: 1});
-        }
-        if(this.activeName == 'second'){
-          this.reload({bomIdList: this.bomIdList, productType: 2});
+    watch: {
+      leftShow(newVal, oldVal){
+        if(newVal){
+          this.leftWidth = '15%';
+          this.rightWidth = '85%';
+        } else {
+          this.leftWidth = '0%';
+          this.rightWidth = '100%';
         }
-      },
+      }
+    },
+    methods: {
         reload(where) {
           this.$nextTick(() => {
             this.$refs.table.reload({ page: 1, where });
@@ -297,10 +253,26 @@
        currentDetail(row) {
          this.$refs.currentDetailDialog.open(row);
        },
-      open(data) {
+      open(data, order) {
          this.visible = true;
-         this.bomIdList = data;
-         this.reload({bomIdList: data});
+         this.bomIdList = [];
+         if(data){
+           if(data.length == 1){
+             this.orderInfo = data[0];
+             this.orderInfo.code = order.code;
+             console.log(this.orderInfo);
+             this.leftShow = false;
+           } else {
+             this.leftShow = true;
+           }
+           let list = [];
+           for(let item of data){
+             list.push({bomId: item.bomCategoryId, planNum: item.contractNum});
+           }
+           this.bomIdList = list;
+           this.reload({bomIdList: this.bomIdList});
+         }
+
       },
       cancel() {
         this.formData = {};
@@ -310,6 +282,11 @@
       confirm() {
         this.visible = false;
       },
+
+      handleNodeClick(data){
+          console.log(data);
+        // this.reload({planIds: [data.id]});
+      },
     }
   };
 </script>
@@ -322,4 +299,8 @@
   .el-form-item {
     margin-bottom: 0 !important;
   }
+  .planInfo{
+    display: flex;
+    font-size: 16px;
+  }
 </style>

+ 416 - 0
src/views/saleOrder/components/orderHomogeneityInspectInstallDialog.vue

@@ -0,0 +1,416 @@
+<template>
+  <div>
+    <el-drawer
+      title="齐套性检查"
+      :visible.sync="visible"
+      direction="rtl"
+      :append-to-body="true"
+      size="100%"
+    >
+      <div class="form-wrapper">
+        <div style="width: 20%">
+          <el-card class="box-card">
+            <div class="ele-border-lighter sys-organization-list">
+              <el-radio-group
+                size="small"
+                v-model="currentNodeData.bomType"
+                @change="bomChange"
+              >
+                <el-radio-button :label="1">PBOM </el-radio-button>
+                <el-radio-button :label="3">ABOM </el-radio-button>
+              </el-radio-group>
+
+              <el-tree
+                class="treeData"
+                :data="treeList"
+                :expand-on-click-node="false"
+                :props="defaultProps"
+                ref="treeRef"
+                :default-expanded-keys="
+                  current && current.id ? [current.id] : []
+                "
+                :highlight-current="true"
+                node-key="id"
+                @node-click="handleNodeClick"
+              >
+                <span class="custom-tree-node" slot-scope="{ node, data }">
+                  {{ node.label }} / {{ data.code }}
+                </span>
+              </el-tree>
+            </div>
+          </el-card>
+        </div>
+        <div style="width: 80%">
+          <el-card class="box-card">
+            <ele-pro-table
+              ref="table"
+              :needPage="false"
+              :columns="columns"
+              :init-load="false"
+              :datasource="datasource"
+            >
+              <template v-slot:stockCount="{ row }">
+                <el-link
+                  type="primary"
+                  :underline="false"
+                  @click="stockDetail(row)"
+                >
+                  {{ row.stockCount }}
+                </el-link>
+              </template>
+              <template v-slot:currentCount="{ row }">
+                <el-link
+                  type="primary"
+                  :underline="false"
+                  @click="currentDetail(row)"
+                >
+                  {{ row.currentCount }}
+                </el-link>
+              </template>
+              <template v-slot:stockColor="{ row }">
+                <div :class="{ statusRed: row.stockStatus == '缺料' }">
+                  {{ row.stockStatus }}
+                </div>
+              </template>
+              <template v-slot:currentColor="{ row }">
+                <div :class="{ statusRed: row.currentStatus == '缺料' }">
+                  {{ row.currentStatus }}
+                </div>
+              </template>
+              <template v-slot:finishColor="{ row }">
+                <div :class="{ statusRed: row.finishStatus == '缺料' }">
+                  {{ row.finishStatus }}
+                </div>
+              </template>
+              <template v-slot:finishCount="{ row }">
+                <div>
+                  <div v-if="row.finishCount > 0">{{ row.finishCount }}</div>
+                  <div v-else>-</div>
+                </div>
+              </template>
+            </ele-pro-table>
+          </el-card>
+        </div>
+      </div>
+      <div slot="footer">
+        <el-button plain @click="cancel">取消</el-button>
+        <el-button type="primary" @click="confirm">确定</el-button>
+      </div>
+    </el-drawer>
+
+    <stockDetailDialog ref="stockDetailDialog" />
+
+    <currentDetailDialog ref="currentDetailDialog" />
+  </div>
+</template>
+
+<script>
+import {
+  pbomHomogeneityInspect,
+  getOrderBomRoot, orderPbomHomogeneityInspect
+} from '@/api/productionPlan/index.js';
+  import stockDetailDialog from '../../productionPlan/components/stockDetailDialog.vue';
+  import currentDetailDialog from '../../productionPlan/components/currentDetailDialog.vue';
+  export default {
+    components: {
+      stockDetailDialog,
+      currentDetailDialog
+    },
+    data() {
+      return {
+        visible: false,
+
+        isFullscreen: true,
+        formData: {},
+        requestData: {
+          deviceCode: '',
+          deviceName: '',
+          deviceId: ''
+        },
+        requiredFormingNum: 0,
+
+        // form: {
+        //   homogeneityInspect: []
+        // },
+
+        rules: {},
+
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'opCode',
+            label: '工序编码',
+            align: 'center',
+            minWidth: 100,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'opName',
+            label: '工序名称',
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'bomCode',
+            label: '物料编码',
+            align: 'center',
+            minWidth: 100,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'bomName',
+            label: '物料名称',
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'count',
+            label: '定额数量',
+            align: 'center',
+            minWidth: 80
+          },
+          {
+            slot: 'stockCount',
+            prop: 'stockCount',
+            label: '库存数量',
+            align: 'center',
+            minWidth: 80
+          },
+          {
+            slot: 'stockColor',
+            prop: 'stockStatus',
+            label: '库存状态',
+            align: 'center',
+            minWidth: 80
+          },
+          {
+            slot: 'currentCount',
+            prop: 'currentCount',
+            label: '在途数量',
+            align: 'center',
+            minWidth: 80
+          },
+          {
+            slot: 'currentColor',
+            prop: 'currentStatus',
+            label: '在途状态',
+            align: 'center',
+            minWidth: 80
+          },
+          {
+            slot: 'finishCount',
+            prop: 'finishCount',
+            label: '最终缺料数量',
+            align: 'center',
+            minWidth: 80
+          },
+          {
+            slot: 'finishColor',
+            prop: 'finishStatus',
+            label: '最终状态',
+            align: 'center',
+            minWidth: 80
+          }
+        ],
+        ids: [],
+        leftShow: true,
+        leftWidth: '0%',
+        rightWidth: '100%',
+
+        versList: [],
+        searchObj: {
+          versions: '',
+          categoryId: '',
+          isProduct: false,
+          isTemp: 0
+        },
+        current: {},
+        currentNodeData: {
+          bomType: 1,
+          children: []
+        },
+
+        treeId: '',
+        treeList: [],
+        defaultProps: {
+          children: 'children',
+          label: 'name'
+        },
+        orderIds: [],
+      };
+    },
+    watch: {
+      leftShow(newVal, oldVal) {
+        if (newVal) {
+          this.leftWidth = '30%';
+          this.rightWidth = '70%';
+        }
+      }
+    },
+    mounted() {},
+    methods: {
+      reload(where) {
+        this.$nextTick(() => {
+          this.$refs.table.reload({ page: 1, where });
+        });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where }) {
+        return orderPbomHomogeneityInspect({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+
+      stockDetail(row) {
+        this.$refs.stockDetailDialog.open(row);
+      },
+      currentDetail(row) {
+        this.$refs.currentDetailDialog.open(row);
+      },
+      async open(data) {
+        console.log(data);
+        this.visible = true;
+        this.orderIds = [];
+        this.orderIds = data;
+        this.treeList = [];
+        this.treeList = await getOrderBomRoot({orderIds: this.orderIds, bomType: this.currentNodeData.bomType});
+        if(this.treeList && this.treeList.length > 0){
+          let bomIds = [];
+          this.getTreeIds(this.treeList[0], bomIds)
+          this.reload({bomIds: bomIds, orderId: this.treeList[0].orderId});
+        }
+
+      },
+      handleClose() {
+        this.searchObj = {
+          versions: '',
+          categoryId: '',
+          isProduct: false,
+          isTemp: 0
+        };
+        this.activeName = '属性';
+        this.drawer = false;
+      },
+
+      handleFull() {
+        this.isFullscreen = !this.isFullscreen;
+        this.$forceUpdate();
+      },
+      async bomChange(e) {
+        console.log(e, 'e');
+        this.searchObj.versions = '';
+        this.currentNodeData.bomType = e;
+        this.treeList = [];
+        this.treeList = await getOrderBomRoot({orderIds: this.orderIds, bomType: this.currentNodeData.bomType});
+        if(this.treeList && this.treeList.length > 0){
+          let bomIds = [];
+          this.getTreeIds(this.treeList[0], bomIds)
+          this.reload({bomIds: bomIds, orderId: this.treeList[0].orderId});
+        }
+      },
+      handleNodeClick(data) {
+        this.treeId = data.id;
+        let bomIds = [];
+        this.getTreeIds(data, bomIds);
+        this.reload({bomIds: bomIds, orderId: data.orderId})
+      },
+      cancel() {
+        this.formData = {};
+        this.visible = false;
+      },
+
+      confirm() {
+        this.visible = false;
+      },
+      getTreeIds(tree, list){
+        if(tree){
+          if(tree.id){
+            list.push(tree.id);
+          }
+          if(tree.children && tree.children.length > 0){
+            for(let item of tree.children){
+              this.getTreeIds(item, list);
+            }
+          }
+        }
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .mt20 {
+    margin-top: 20px;
+  }
+
+  .el-form-item {
+    margin-bottom: 0 !important;
+  }
+  .optionButton {
+    display: flex;
+    justify-content: flex-end;
+    padding-bottom: 3px;
+  }
+  .statusRed {
+    color: red;
+  }
+  .form-wrapper {
+    display: flex;
+  }
+  /* 自定义全屏样式 */
+  ::v-deep .is-fullscreen {
+    width: 100vw !important;
+    height: 100vh !important;
+    overflow: hidden !important; /* 隐藏滚动条 */
+  }
+  ::v-deep .not-fullscreen {
+    width: calc(100vw - 260px) !important;
+    height: 100vh !important;
+    overflow: hidden !important; /* 隐藏滚动条 */
+  }
+
+  .custom-drawer-header {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 4px 15px;
+    background-color: #f5f7fa; /* 自定义背景色 */
+    border-bottom: 1px solid #ebeef5; /* 自定义边框,与抽屉内容分隔 */
+  }
+
+  .drawer_content {
+    margin: 10px 20px;
+    box-sizing: border-box;
+  }
+  .sys-organization-list {
+    height: calc(100vh - 100px);
+    box-sizing: border-box;
+    border-width: 1px;
+    border-style: solid;
+    overflow: auto;
+    padding: 10px;
+    box-sizing: border-box;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+
+    .treeData {
+      height: 0 1 auto;
+      overflow-y: auto;
+      height: calc(100vh - 125px);
+    }
+  }
+
+  .tab-box {
+    margin-top: 12px;
+  }
+</style>

+ 34 - 8
src/views/saleOrder/index.vue

@@ -103,6 +103,7 @@
     <create-order ref="createDialog" @refresh="reload"> </create-order>
 
     <orderHomogeneityInspectDialog ref="orderHomogeneityInspectDialog"></orderHomogeneityInspectDialog>
+    <orderHomogeneityInspectInstallDialog ref="orderHomogeneityInspectInstallDialog"></orderHomogeneityInspectInstallDialog>
   </div>
 </template>
 
@@ -111,6 +112,7 @@
   import OrderDetail from './components/order-detail.vue';
   import CreateOrder from './components/create-order.vue';
   import orderHomogeneityInspectDialog from './components/orderHomogeneityInspectDialog';
+  import orderHomogeneityInspectInstallDialog from './components/orderHomogeneityInspectInstallDialog';
   import PlanStatistics from '@/components/statistics/PlanStatistics.vue'
 
   import {
@@ -131,7 +133,8 @@
       OrderDetail,
       CreateOrder,
       orderHomogeneityInspectDialog,
-      PlanStatistics
+      PlanStatistics,
+      orderHomogeneityInspectInstallDialog
     },
     data() {
       return {
@@ -381,34 +384,57 @@
           let res = await getByCodeList(codeList)
           console.log(res);
           let flag = true;
+          let type = 0;
           let data = [];
+          let data2 = [];
+          let first = null;
+          let firstFlag = true;
           if(res){
             for(let ele of res){
               let list = ele.productInfoList;
+              if(firstFlag){
+                first = ele;
+                firstFlag = false;
+              }
               if(list){
+                let pre = null;
                 for(let item of list){
                   if(!item.productType){
                     flag = false;
                     this.$message.warning('产品(' + item.productCode + ')未选择加工方式');
-                    break;
+                    return;
                   }
+                  type = item.productType;
                   if(!item.bomCategoryId){
                     flag = false;
                     this.$message.warning('产品(' + item.productCode + ')未选择BOM版本');
-                    break;
+                    return;
+                  }
+                  if(pre){
+                    if(pre.productType != item.productType){
+                      flag = false;
+                      this.$message.warning('请选择加工方式相同的订单');
+                      return;
+                    }
                   }
+                  pre = item;
                   // JSON.parse(JSON.stringify({}))
-                  data.push({bomId: item.bomCategoryId, planNum: item.contractNum})
+                  data.push(item.id);
+                  data2.push(item);
                 }
               }
-              if(!flag){
-                break;
-              }
+
             }
           }
           if(flag){
             // 齐料
-            this.$refs.orderHomogeneityInspectDialog.open(data);
+            if(type == 2){
+              this.$refs.orderHomogeneityInspectDialog.open(data2, first);
+            } else if(type == 3){
+              this.$refs.orderHomogeneityInspectInstallDialog.open(data);
+            } else {
+              this.$message.warning('请确认加工方式!');
+            }
           }
         } else {
           this.$message.warning('请至少选择一条计划!');