yusheng 1 год назад
Родитель
Сommit
f87db56345

+ 3 - 2
src/BIZComponents/cBom-list.vue

@@ -131,7 +131,8 @@
         loading: false,
         where: {
           name: '',
-          code: ''
+          code: '',
+          specification:''
         }
       };
     },
@@ -224,7 +225,7 @@
         this.datasource = await getCBomAPI({
           categoryId: this.currentRow?.id,
           bomType: 1,
-          produceType: 2
+          // produceType: 2
         });
         this.oldDatasource = this.datasource;
         this.loading = false;

+ 140 - 0
src/BIZComponents/homogeneityInspect/currentDetailDialog.vue

@@ -0,0 +1,140 @@
+<template>
+  <ele-modal
+    width="80vw"
+    :visible.sync="visible"
+    :close-on-click-modal="false"
+    row-key="code"
+    custom-class="ele-dialog-form"
+    :title="'在途详情'"
+    :maxable="true"
+  >
+    <div class="form-wrapper">
+      <el-form ref="form" :model="form" :rules="rules">
+        <ele-pro-table
+          ref="table"
+          :needPage="true"
+          :columns="columns"
+          :datasource="datasource"
+          :init-load="false"
+        >
+          <template v-slot:action="{ $index }">
+            <el-link type="primary" :underline="false" icon="el-icon-view">
+              库存
+            </el-link>
+            <el-link type="primary" :underline="false" icon="el-icon-view">
+              在途
+            </el-link>
+          </template>
+        </ele-pro-table>
+      </el-form>
+    </div>
+    <div slot="footer">
+      <el-button plain @click="cancel">返回</el-button>
+    </div>
+  </ele-modal>
+</template>
+
+<script>
+  import { getCurrentList } from '@/api/aps/index.js';
+  export default {
+    components: {},
+    data() {
+      return {
+        visible: false,
+
+        form: {
+          currentList: []
+        },
+
+        rules: {},
+
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'orderNo',
+            label: '订单号',
+            align: 'center',
+            minWidth: 100,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'productCode',
+            label: '产品编码',
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'productName',
+            label: '产品名称',
+            align: 'center',
+            minWidth: 100,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'totalCount',
+            label: '采购数量',
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'receiveNo',
+            label: '发货单号',
+            align: 'center',
+            minWidth: 80
+          },
+          {
+            prop: 'ztNumber',
+            label: '在途数量',
+            align: 'center',
+            minWidth: 80
+          },
+          {
+            prop: 'deliveryDeadline',
+            label: '预计交期时间',
+            align: 'center',
+            minWidth: 80
+          }
+        ]
+      };
+    },
+    methods: {
+      reload(where) {
+        this.$nextTick(() => {
+          this.$refs.table.reload({ page: 1, where });
+        });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where }) {
+        return getCurrentList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+      open(row) {
+        this.visible = true;
+        this.reload({ code: row.bomCode });
+      },
+      cancel() {
+        this.visible = false;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .mt20 {
+    margin-top: 20px;
+  }
+
+  .el-form-item {
+    margin-bottom: 0 !important;
+  }
+</style>

+ 596 - 0
src/BIZComponents/homogeneityInspect/orderHomogeneityInspectDialog.vue

@@ -0,0 +1,596 @@
+<template>
+  <div>
+    <ele-modal
+      width="80vw"
+      :visible.sync="visible"
+      :close-on-click-modal="false"
+      row-key="code"
+      custom-class="ele-dialog-form"
+      :title="'齐套性检查'"
+      :maxable="true"
+    >
+      <div v-loading="loading">
+        <el-form label-width="80px" :model="dataObj" class="order_form">
+          <el-row :gutter="20" type="flex" style="flex-wrap: wrap">
+            <el-col :span="8">
+              <el-form-item label="单据编号:">
+                <el-input readonly v-model="dataObj.code"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="编号:">
+                <el-input readonly v-model="dataObj.productCode"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="名称:">
+                <el-input readonly v-model="dataObj.productName"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="规格:">
+                <el-input readonly v-model="dataObj.specification"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="型号:">
+                <el-input readonly v-model="dataObj.model"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="数量:">
+                <el-input readonly v-model="dataObj.totalCount"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <div class="form-wrapper">
+          <div
+            class="left_tree"
+            v-show="leftShow"
+            :style="{ width: leftWidth }"
+          >
+            <el-tree
+              ref="treeRef"
+              :expand-on-click-node="false"
+              :data="cardList"
+              :props="treeProps"
+              node-key="id"
+              highlight-current
+              @node-click="handleNodeClick"
+            ></el-tree>
+          </div>
+          <div :style="{ width: rightWidth }">
+            <div>
+              <ele-pro-table
+                ref="table"
+                :needPage="false"
+                :columns="columns"
+                key="checkTable"
+                :init-load="false"
+                :datasource="datasourceList"
+              >
+                <template v-slot:toolkit>
+                  <el-form
+                    :inline="true"
+                    :model="formInline"
+                    class="demo-form-inline"
+                  >
+                    <el-form-item label="BOM类型">
+                      <el-select
+                        size="mini"
+                        v-model="formInline.bomType"
+                        placeholder="BOM类型"
+                        class="select-type"
+                        @change="bomTypeChange"
+                      >
+                        <el-option
+                          v-for="item in bomListType"
+                          :key="item.id"
+                          :label="item.bomName"
+                          :value="item.id"
+                        >
+                        </el-option>
+                      </el-select>
+                    </el-form-item>
+                    <el-form-item label="BOM版本">
+                      <el-select
+                        class="select-type"
+                        size="mini"
+                        v-model="formInline.bomId"
+                        placeholder="BOM版本"
+                        @change="bomVChange"
+                      >
+                        <el-option
+                          v-for="item in bomListV"
+                          :key="item.bomId"
+                          :label="item.versions"
+                          :value="item.bomId"
+                        >
+                        </el-option>
+                      </el-select>
+                    </el-form-item>
+                    <el-form-item label="最终状态">
+                      <el-select
+                        class="select-type"
+                        size="mini"
+                        v-model="formInline.finalState"
+                        placeholder="最终状态"
+                        @change="finalChange"
+                      >
+                        <el-option
+                          v-for="item in finalStateList"
+                          :key="item.value"
+                          :label="item.label"
+                          :value="item.value"
+                        >
+                        </el-option>
+                      </el-select>
+                    </el-form-item>
+                  </el-form>
+                </template>
+                <template v-slot:inventoryQuantity="{ row }">
+                  <el-link
+                    type="primary"
+                    :underline="false"
+                    @click="stockDetail(row)"
+                  >
+                    {{ row.inventoryQuantity }}
+                  </el-link>
+                </template>
+                <template v-slot:inTransitNum="{ row }">
+                  <el-link
+                    type="primary"
+                    :underline="false"
+                    @click="currentDetail(row)"
+                  >
+                    {{ row.inTransitNum }}
+                  </el-link>
+                </template>
+                <template v-slot:inventoryStatusText="{ row }">
+                  <div
+                    :class="
+                      row.inventoryStatusText == '缺料'
+                        ? 'statusRed'
+                        : 'statusGreen'
+                    "
+                  >
+                    {{ row.inventoryStatusText }}
+                  </div>
+                </template>
+                <template v-slot:inTransitStatusText="{ row }">
+                  <div
+                    :class="
+                      row.inTransitStatusText == '缺料'
+                        ? 'statusRed'
+                        : 'statusGreen'
+                    "
+                  >
+                    {{ row.inTransitStatusText }}
+                  </div>
+                </template>
+                <template v-slot:finalStateText="{ row }">
+                  <div
+                    :class="
+                      row.finalStateText == '缺料' ? 'statusRed' : 'statusGreen'
+                    "
+                  >
+                    {{ row.finalStateText }}
+                  </div>
+                </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>
+      <div slot="footer">
+        <el-button plain @click="cancel">取消</el-button>
+        <!-- <el-button type="primary" @click="confirm">确定</el-button> -->
+      </div>
+    </ele-modal>
+
+    <stockDetailDialog ref="stockDetailDialog" />
+
+    <currentDetailDialog ref="currentDetailDialog" />
+  </div>
+</template>
+
+<script>
+  import {
+    findBomSalesorderCategoryId,
+    getMaterialInfo
+  } from '@/api/aps/index.js';
+  import stockDetailDialog from './stockDetailDialog.vue';
+  import currentDetailDialog from './currentDetailDialog.vue';
+  
+  export default {
+    components: {
+      stockDetailDialog,
+      currentDetailDialog
+    },
+    data() {
+      return {
+        visible: false,
+        formInline: {
+          finalState: 0
+        },
+        finalStateList: [
+          {
+            label: '全部',
+            value: 0
+          },
+          {
+            label: '齐套',
+            value: 1
+          },
+          {
+            label: '缺料',
+            value: 2
+          }
+        ],
+        loading: false,
+        datasourceAllList: [], // 表格物料全部数据
+        datasourceList: [], // 表格物料数据
+        bomListV: [], // BOM版本
+        bomListType: [], // BOM 类型
+        form: {
+          homogeneityInspect: []
+        },
+
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            slot: 'selection',
+            fixed: 'left'
+          },
+          {
+            prop: 'batchNo',
+            label: '批次号',
+            align: 'center',
+            minWidth: 100,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'productCode',
+            label: '编码',
+            align: 'center',
+            minWidth: 100,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'code',
+            label: '物料编码',
+            align: 'center',
+            minWidth: 100,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'name',
+            label: '物料名称',
+            align: 'center',
+            minWidth: 100,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'demandQuantity',
+            label: '定额数量',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            prop: 'inventoryQuantity',
+            slot: 'inventoryQuantity',
+            label: '库存数量',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            prop: 'secureInventory',
+            label: '安全库存',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            prop: 'lockQuantity',
+            label: '锁库数量',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            slot: 'inventoryStatusText',
+            prop: 'inventoryStatusText',
+            label: '库存状态',
+            align: 'center',
+            minWidth: 80
+          },
+          {
+            slot: 'inTransitNum',
+            prop: 'inTransitNum',
+            label: '在途数量',
+            align: 'center',
+            minWidth: 80
+          },
+          {
+            prop: 'inTransitOrdersNum',
+            label: '在途已关联数量	',
+            align: 'center',
+            minWidth: 120
+          },
+          {
+            slot: 'inTransitStatusText',
+            prop: 'inTransitStatusText',
+            label: '在途状态',
+            align: 'center',
+            minWidth: 80
+          },
+          {
+            label: '最终可用数量',
+            prop: 'finalAvailableQuantity',
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            label: '最终缺料数量',
+            prop: 'finalShortageQuantity',
+            align: 'center',
+            minWidth: 120
+          },
+          {
+            slot: 'finalStateText',
+            prop: 'finalStateText',
+            label: '最终状态',
+            align: 'center',
+            minWidth: 80
+          }
+          // {
+          //   columnKey: 'action',
+          //   label: '操作',
+          //   width: 120,
+          //   align: 'center',
+          //   resizable: false,
+          //   fixed: 'right',
+          //   slot: 'action'
+          // }
+        ],
+        ids: [],
+        leftShow: false,
+        leftWidth: '0%',
+        rightWidth: '100%',
+        cardList: [],
+        treeProps: {
+          label: 'productName',
+          children: 'children'
+        },
+        dataObj: {
+          code: '',
+          productCode: '',
+          productName: '',
+          totalCount: '',
+          specification: '',
+          model: ''
+        },
+      };
+    },
+    watch: {
+      leftShow(newVal, oldVal) {
+        if (newVal) {
+          this.leftWidth = '250px';
+          this.rightWidth = 'calc(100% - 260px)';
+        } else {
+          this.leftWidth = '0';
+          this.rightWidth = '100%';
+        }
+      }
+    },
+    methods: {
+      reload(where) {
+        this.$nextTick(() => {
+          this.$refs.table.reload({ page: 1, where });
+        });
+      },
+      // 定额数量
+      stockDetail(row) {
+        this.$refs.stockDetailDialog.open({ bomCode: row.code });
+      },
+      // 在途
+      currentDetail(row) {
+        this.$refs.currentDetailDialog.open({ bomCode: row.code });
+      },
+      open(dataList) {
+        this.visible = true;
+        this.cardList = dataList;
+
+        if (dataList.length === 1) {
+          this.leftShow = false;
+        } else {
+          this.leftShow = true;
+          this.$nextTick(() => {
+            this.$refs.treeRef.setCurrentKey(dataList[0].id);
+          });
+        }
+        this.handleNodeClick(this.cardList[0]);
+      },
+      cancel() {
+        this.clearData();
+        this.visible = false;
+      },
+
+      confirm() {
+        this.visible = false;
+      },
+
+      handleNodeClick(data) {
+        this.clearData();
+        this.dataObj = data;
+        this.getBomData();
+      },
+      // 获取bom 数据
+      async getBomData() {
+        this.loading = true;
+        try {
+          const res = await findBomSalesorderCategoryId( this.dataObj.productId);
+          if (!res || res.length == 0) {
+            this.loading = false;
+            this.datasourceList = [];
+            return;
+          }
+          let obj = {};
+          let bomMap = {
+            1: 'PBOM',
+            2: 'MBOM',
+            3: 'ABOM',
+            4: 'EBOM'
+          };
+          res.map((el) => {
+            el.bomName = bomMap[el.bomType];
+            let OBMINFO = {
+              bomId: el.bomId,
+              bomType: el.type,
+              versions: `V${el.versions}.0`,
+              code: el.code
+            };
+            if (obj[el.bomType]) {
+              obj[el.bomType].bomList.unshift(OBMINFO);
+            } else {
+              obj[el.bomType] = { ...el, bomList: [OBMINFO] };
+            }
+          });
+          let list = Object.values(obj);
+          this.bomListType = list;
+          await this.bomTypeChange(list[0].id);
+          this.loading = false;
+        } catch (err) {
+          this.$message.error(err.message);
+          this.loading = false;
+        }
+      },
+      // 选择BOM类型
+      async bomTypeChange(e) {
+        this.formInline.bomType = e;
+        let data = this.bomListType.find((el) => el.id === e);
+        if (!data) return;
+        this.bomListV = data.bomList;
+        await this.bomVChange(data.bomList[0].bomId);
+      },
+      // 选择BOM版本
+      async bomVChange(e) {
+        this.formInline.bomId = e;
+        let data = this.bomListV.find((el) => el.bomId === e);
+        if (!data) return;
+        await this.getMaterialData(data);
+      },
+      // 获取物料数据信息
+      async getMaterialData(data) {
+        const result = await getMaterialInfo({
+          categoryId: this.dataObj.productId,
+          bomVersionId: data.bomId,
+          requiredFormingNum: this.dataObj.totalCount
+        });
+        result.map((item) => {
+          item.batchNo = this.dataObj.batchNo;
+          item.productCode = this.dataObj.productCode;
+          item.finalState =
+            item.finalStateText == '齐套'
+              ? 1
+              : item.finalStateText == '缺料'
+              ? 2
+              : '';
+        });
+        this.datasourceAllList = result;
+        this.finalChange(0);
+      },
+      // 选择状态
+      finalChange(e) {
+        if (e === 0 || !e) {
+          this.datasourceList = this.datasourceAllList;
+          return;
+        }
+        this.datasourceList = this.datasourceAllList.filter(
+          (item) => item.finalState === e
+        );
+      },
+      clearData() {
+        this.formInline = {
+          finalState: 0
+        };
+        this.bomListV = [];
+        this.bomListType = [];
+        this.datasourceList = [];
+        this.datasourceAllList = [];
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .mt20 {
+    margin-top: 20px;
+  }
+
+  .el-form-item {
+    margin-bottom: 0 !important;
+  }
+  .planInfo {
+    display: flex;
+    font-size: 16px;
+  }
+
+  .form-wrapper {
+    display: flex;
+  }
+
+  .order_form {
+    .el-col {
+      margin-bottom: 16px;
+    }
+  }
+
+  .statusRed {
+    color: red;
+  }
+
+  .statusGreen {
+    color: green;
+  }
+
+  .left_tree {
+    width: 250px;
+    max-height: 600px;
+    min-height: 300px;
+    overflow: auto;
+    border: 1px solid #ccc;
+    margin-right: 10px;
+  }
+</style>

+ 140 - 0
src/BIZComponents/homogeneityInspect/stockDetailDialog.vue

@@ -0,0 +1,140 @@
+<template>
+  <ele-modal
+    width="80vw"
+    :visible.sync="visible"
+    :close-on-click-modal="false"
+    row-key="code"
+    custom-class="ele-dialog-form"
+    :title="'库存详情'"
+    :maxable="true"
+  >
+    <div class="form-wrapper">
+      <el-form ref="form" :model="form" :rules="rules">
+        <ele-pro-table
+          ref="table"
+          :needPage="true"
+          :columns="columns"
+          :datasource="datasource"
+          :init-load="false"
+        >
+          <template v-slot:action="{ $index }">
+            <el-link type="primary" :underline="false" icon="el-icon-view">
+              库存
+            </el-link>
+            <el-link type="primary" :underline="false" icon="el-icon-view">
+              在途
+            </el-link>
+          </template>
+        </ele-pro-table>
+      </el-form>
+    </div>
+    <div slot="footer">
+      <el-button plain @click="cancel">返回</el-button>
+    </div>
+  </ele-modal>
+</template>
+
+<script>
+  import { getStockList } from '@/api/aps/index.js';
+  export default {
+    components: {},
+    data() {
+      return {
+        visible: false,
+
+        form: {
+          stockList: []
+        },
+
+        rules: {},
+
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'categoryCode',
+            label: '物品编码',
+            align: 'center',
+            minWidth: 100,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'categoryName',
+            label: '物品名称',
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'modelType',
+            label: '型号',
+            align: 'center',
+            minWidth: 100,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'level',
+            label: '级别',
+            align: 'center',
+            minWidth: 100
+          },
+          {
+            prop: 'measureQuantity',
+            label: '计量数量',
+            align: 'center',
+            minWidth: 100
+          }
+        ],
+        activeName: 'first',
+        selection: [],
+        request: {
+          categoryCode: ''
+        }
+      };
+    },
+    methods: {
+      reload(where) {
+        this.$nextTick(() => {
+          this.$refs.table.reload({ page: 1, where });
+        });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where }) {
+        return getStockList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+
+      open(row) {
+        this.visible = true;
+        this.reload({ categoryCode: row.bomCode });
+      },
+      cancel() {
+        this.visible = false;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .mt20 {
+    margin-top: 20px;
+  }
+
+  .el-form-item {
+    margin-bottom: 0 !important;
+  }
+</style>

+ 10 - 8
src/BIZComponents/processSubmitDialog/processSubmitDialog.vue

@@ -239,7 +239,7 @@
         fininvoiceapplyStatusAPI,
         logistictrakplanStatusAPI,
         active: 0,
-        loading:false,
+        loading: false,
         bpmnXML: null,
         LCFLList: [],
         processList: [],
@@ -452,13 +452,15 @@
         if (code != 0) {
           return;
         }
-        this.loading=true
-
-        await processInstanceCreateAPI(this.form);
-        this.loading=false
-        this.$message('提交审核成功');
-        this.$emit('reload');
-        this.cancel();
+        this.loading = true;
+        try {
+          await processInstanceCreateAPI(this.form);
+          this.loading = false;
+          this.$message('提交审核成功');
+          this.$emit('reload');
+          this.cancel();
+        } catch (error) {}
+        this.loading = false;
       },
       async submit1() {
         let params = {

+ 64 - 0
src/api/aps/index.js

@@ -44,3 +44,67 @@ export async function producetask(params) {
     return res.data.data;
   }
 }
+
+// 根据产品查询BOM分类
+export async function findBomSalesorderCategoryId(categoryId) {
+  const res = await request.get(
+    `/aps/salesorder/findBomCategoryByCategoryId/${categoryId}`
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 根据计划id查询物料信息
+export async function findMaterialInfoSalesorder(params) {
+  const res = await request.get(
+    '/aps/salesorder/findMaterialInfoBySalesOrderId',
+    {
+      params
+    }
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 根据产品ID查询物料信息
+export async function findMaterialInfoByCategory(params) {
+  const res = await request.get(
+    '/aps/salesorder/findMaterialInfoByCategoryId',
+    {
+      params
+    }
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 根据产品ID查询物料信息
+export async function getMaterialInfo(params) {
+  const res = await request.get('/eom/common/getMaterialInfo', {
+    params
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+export async function getStockList(params) {
+  const res = await request.get('/wms/outindetailtwo/page', { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function getCurrentList(data) {
+  const res = await request.post('/eom/purchaseorder/getZtDetail', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 1 - 1
src/views/financialManage/payableManage/index.vue

@@ -19,7 +19,7 @@
         <template v-slot:action="{ row }">
           <el-link
             type="primary"
-            v-if="[2].includes(row.approvalStatus) && !row.invoiceCode"
+            v-if="[2].includes(row.approvalStatus) && !row.invoiceId"
             :underline="false"
             icon="el-icon-plus"
             @click="handleDetail(row, 'view')"

+ 1 - 1
src/views/financialManage/receivableManage/index.vue

@@ -19,7 +19,7 @@
         <template v-slot:action="{ row }">
           <el-link
             type="primary"
-            v-if="[2].includes(row.approvalStatus)"
+            v-if="[2].includes(row.approvalStatus)&&!row.invoiceId"
             :underline="false"
             icon="el-icon-plus"
             @click="handleDetail(row, 'view')"

+ 37 - 9
src/views/purchasingManage/purchaseOrder/index.vue

@@ -71,13 +71,13 @@
               </template>
 
               <!-- 查看详情列 -->
-              <template v-slot:contractNo="{ row }">
+              <template v-slot:relationName="{ row }">
                 <el-link
                   type="primary"
                   :underline="false"
                   @click="opencontractDetail(row)"
                 >
-                  {{ row.contractNo }}
+                  {{ row.relationName }}
                 </el-link>
               </template>
               <template v-slot:orderNo="{ row }">
@@ -209,6 +209,10 @@
     ></add-return-goods-dialog>
     <contractr-detail ref="contractDetailRef"></contractr-detail>
     <detail-dialog ref="contactDetailDialogRef"></detail-dialog>
+    <purchasingDetail ref="purchasingDetailRef"></purchasingDetail>
+    <purchasePlanDetail ref="purchasePlanDetailRef"></purchasePlanDetail>
+    <inquiryDetail ref="inquiryDetailRef"></inquiryDetail>
+    
     <addOutSourceSend
       ref="addOrEditDialogRef"
       :add-or-edit-dialog-flag.sync="addOrEditDialogFlag"
@@ -251,6 +255,9 @@
   import invoiceConfirm from './invoiceConfirm/index.vue';
   import detailDialog from './components/detailDialog.vue';
   import contractrDetail from '@/views/contractManage/contractBook/components/detailDialog.vue';
+  import purchasingDetail from '@/views/purchasingManage/purchaseNeedManage/components/detailDialog.vue';
+  import purchasePlanDetail from '@/views/purchasingManage/purchasePlanManage/components/detailDialog.vue';
+  import inquiryDetail from '@/views/purchasingManage/inquiryManage/components/detailDialog.vue';
   import addInvoiceDialog from '@/views/purchasingManage/purchaseOrder/invoice/components/addInvoiceDialog';
   import addReturnGoodsDialog from '@/views/purchasingManage/purchaseOrder/returnGoods/components/addReturnGoodsDialog';
   import addOutSourceSend from '@/views/purchasingManage/purchaseOrder/outSourceSend/components/addOrEditDialog';
@@ -262,13 +269,11 @@
   import {
     getTableList,
     deleteInformation,
-    submit
   } from '@/api/purchasingManage/purchaseOrder';
   import dictMixins from '@/mixins/dictMixins';
   import {
     purchaseOrderProgressStatusEnum,
     reviewStatus,
-    saleOrderProgressStatusEnum
   } from '@/enum/dict';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import tabMixins from '@/mixins/tableColumnsMixin';
@@ -276,6 +281,7 @@
   import exportButton from '@/components/upload/exportButton.vue';
   import { parameterGetByCode } from '@/api/main/index.js';
   import exceptionList from '@/views/saleManage/saleOrder/exceptionManagement/exceptionList/index.vue';
+  
   export default {
     mixins: [dictMixins, tabMixins],
     components: {
@@ -296,7 +302,7 @@
       addInvoiceManage,
       importDialog,
       invoiceConfirm,
-      exceptionList
+      exceptionList,purchasingDetail,purchasePlanDetail,inquiryDetail
     },
     data() {
       return {
@@ -365,11 +371,22 @@
             },
             minWidth: 120
           },
+          
           {
-            prop: 'contractNo',
+            prop: 'relationType',
+            label: '来源单据类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150,
+            formatter: (_row, _column, cellValue) => {
+              return _row.relationType==1?'采购需求单':_row.relationType==2?'采购计划单':_row.relationType==3?'采购核价单':_row.relationType==4?'采购合同':""
+            },
+          },
+          {
+            prop: 'relationName',
             label: '来源单据',
             align: 'center',
-            slot: 'contractNo',
+            slot: 'relationName',
             showOverflowTooltip: true,
             minWidth: 250
           },
@@ -622,9 +639,20 @@
       //查看合同详情
       opencontractDetail(row) {
         let data = {
-          id: row.contractId
+          id: row.relationId
         };
-        this.$refs.contractDetailRef.open(data);
+        if (row.relationType == 1) {
+          this.$refs.purchasingDetailRef.open(data);
+        }
+        if (row.relationType == 2) {
+          this.$refs.purchasePlanDetailRef.open(data);
+        }
+        if (row.relationType == 3) {
+          this.$refs.inquiryDetailRef.open(data);
+        }
+        if (row.relationType == 4) {
+          this.$refs.contractDetailRef.open(data);
+        }
       }
     }
   };

+ 40 - 9
src/views/purchasingManage/purchasePlanManage/index.vue

@@ -12,6 +12,7 @@
         full-height="calc(100vh - 116px)"
         tool-class="ele-toolbar-form"
         default-expand-all
+        :selection.sync="selection"
         row-key="id"
         :tree-props="{
           children: 'sonPurchasePlanList',
@@ -48,6 +49,13 @@
           >
             生成采购计划
           </el-button>
+          <el-button
+            size="small"
+            type="primary"
+            @click="orderHomogeneityInspectOpen"
+          >
+            齐套性检查
+          </el-button>
           <exportButton
             fileName="采购计划"
             apiUrl="/eom/purchaseplan/export"
@@ -103,7 +111,9 @@
               (!row.parentId || row.parentId == 0) &&
               [0].includes(row.progress) &&
               !orderSourceType.includes(row.sourceType) &&
-              row.acceptUnpack == 1&&row.isGenerateOrder!=1&&row.isGenerateContract!=1
+              row.acceptUnpack == 1 &&
+              row.isGenerateOrder != 1 &&
+              row.isGenerateContract != 1
             "
             @click="handleSplit(row)"
           >
@@ -164,9 +174,7 @@
     ></add-dialog>
     <detail-dialog ref="contactDetailDialogRef"></detail-dialog>
     <!-- 多选删除弹窗 -->
-    <pop-modal
-      content="是否确定删除?"
-    />
+    <pop-modal content="是否确定删除?" />
     <detailNeedDialog ref="DetailNeedDialogRef"></detailNeedDialog>
     <split-dialog
       ref="splitDialogRef"
@@ -185,6 +193,9 @@
       ref="processSubmitDialogRef"
       @reload="reload"
     ></process-submit-dialog>
+    <orderHomogeneityInspectDialog
+      ref="orderHomogeneityInspectRef"
+    ></orderHomogeneityInspectDialog>
   </div>
 </template>
 
@@ -206,6 +217,7 @@
   import { purchasePlanProgressStatusEnum } from '@/enum/dict';
   import autogenerateDialog from '@/BIZComponents/autogenerateDialog.vue';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import orderHomogeneityInspectDialog from '@/BIZComponents/homogeneityInspect/orderHomogeneityInspectDialog.vue';
   import { parameterGetByCode } from '@/api/main/index.js';
   import { orderSourceType } from '@/enum/dict';
   import exportButton from '@/components/upload/exportButton.vue';
@@ -214,7 +226,7 @@
   import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins,tabMixins],
+    mixins: [dictMixins, tabMixins],
     components: {
       processSubmitDialog,
       searchQuotation,
@@ -225,7 +237,9 @@
       addInquiryDialog,
       splitDialog,
       autogenerateDialog,
-      exportButton
+      exportButton,
+      orderHomogeneityInspectDialog,
+      getplanDetail
     },
     data() {
       return {
@@ -236,8 +250,7 @@
         orderSourceType,
         params: {},
         cacheKeyUrl: 'eos-c2e9664a-purchasingManage-purchasePlanManage',
-        columnsVersion:1
-
+        columnsVersion: 1
       };
     },
     //客户管理数据
@@ -251,8 +264,14 @@
     },
     computed: {
       columns() {
-        let columnsVersion=this.columnsVersion
+        let columnsVersion = this.columnsVersion;
         return [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center'
+          },
           {
             columnKey: 'index',
             label: '序号',
@@ -393,6 +412,18 @@
       });
     },
     methods: {
+      async orderHomogeneityInspectOpen() {
+        if (this.selection?.length != 1) {
+          return this.$message.warning('请选择一条单据!');
+        }
+
+        let data = await getplanDetail(this.selection[0].id);
+        data.detailList = data.detailList.map((item) => {
+          item['code'] = data.planCode;
+          return item;
+        });
+        this.$refs.orderHomogeneityInspectRef.open(data.detailList);
+      },
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
         if (this.saleOrderData.id) {