Kaynağa Gözat

fix(productionPlan): 修正齐套数据查询与生产准备逻辑

- 修正江南产品齐套数据接口注释
- 根据参数配置判断生产准备数据筛选
- 修复需求计划详情分页数据源返回格式
yusheng 1 hafta önce
ebeveyn
işleme
2822473194

+ 1 - 1
src/api/productionPlan/index.js

@@ -380,7 +380,7 @@ export async function getProductKitting(params) {
   return Promise.reject(new Error(res.data.message));
 }
 
-// 根据生产计划ID查询金牛产品齐套数据
+// 根据生产计划ID查询江南产品齐套数据
 export async function getJNProductKitting(params) {
   const res = await request.get('/aps/productionplan/getJNProductKitting', {
     params

+ 11 - 1
src/views/productionPlan/components/checkProductionPreparations.vue

@@ -338,6 +338,7 @@
   import kittingCompleteClient9 from './kittingCompleteClient9.vue';
   import auxiliaryMaterial from './auxiliaryMaterial.vue';
   import { setFileUrl } from '@/components/addDoc/util.js';
+  import { parameterGetByCode } from '@/api/mainData/index';
 
   export default {
     components: {
@@ -495,6 +496,7 @@
         ],
         groupList: [],
         leaderList: [],
+        production_readiness: '',
         form: {
           executeGroupName: '',
           executeGroupId: '',
@@ -529,6 +531,11 @@
 
     created() {
       this.getGs();
+      parameterGetByCode({
+        code: 'production_readiness'
+      }).then((res) => {
+        this.production_readiness = res.value;
+      });
     },
 
     computed: {
@@ -540,6 +547,9 @@
         if (this.type == 'plan') {
           return this.preReleaseList.filter((item) => item.preType != 6);
         }
+        if (this.type == 'order') {
+          return this.preReleaseList.filter((item) => item.preType != 7);
+        }
         return this.preReleaseList;
       },
       columns() {
@@ -861,7 +871,7 @@
           this.itemData.productionPlanId =
             this.itemData.productionPlanId || this.itemData.id;
           const list = [this.itemData];
-          if (this.clientEnvironmentId == 9) {
+          if (this.production_readiness == 2) {
             this.$refs.kittingCompleteClient9Ref.open(
               list,
               undefined,

+ 2 - 2
src/views/requirementListPlan/details.vue

@@ -470,13 +470,13 @@
 
       async datasource({ page, limit, where }) {
         this.searchWhere = where || {};
-        const res = await getRequirementListPlanDetailPage({
+        return await getRequirementListPlanDetailPage({
           ...where,
           pageNum: page,
           size: limit,
           materialRequirementsId: this.$route.query.id
         });
-        return res?.list || [];
+        // return res?.list || [];
       },
 
       async pickOrder(type) {