Kaynağa Gözat

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend into dengfei

695593266@qq.com 10 ay önce
ebeveyn
işleme
25d522f72d

+ 5 - 5
src/views/factoryModel/qualificationManagement/components/vendorDialog.vue

@@ -177,14 +177,14 @@
           },
           {
             prop: 'code',
-            label: '供应商编码',
+            label: '编码',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 140
           },
           {
             prop: 'name',
-            label: '供应商名称',
+            label: '名称',
             align: 'center',
             slot: 'name',
             showOverflowTooltip: true,
@@ -192,14 +192,14 @@
           },
           {
             prop: 'serialNo',
-            label: '供应商代号',
+            label: '代号',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 140
           },
           {
             prop: 'phone',
-            label: '供应商电话',
+            label: '电话',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 120
@@ -287,7 +287,7 @@
         return getVendorPageList({
           pageNum: page,
           size: limit,
-          type:this.title=='选择供应商'?2:3,
+          type:this.title=='选择供应商'?2:this.title=='选择客户'?1:3,
           ...where
         });
       },

+ 7 - 3
src/views/material/product/components/QualityInfo.vue

@@ -12,7 +12,11 @@
         <el-col :span="4">
           <el-form-item
             :label="
-              form.dataType == 1 ? '是否采购来料检验' : '是否委外来料检验'
+              form.dataType == 1
+                ? '是否采购来料检验'
+                : form.dataType == 2
+                ? '是否委外来料检验'
+                : '是否受托来料检验'
             "
             prop="isComeCheck"
           >
@@ -189,11 +193,11 @@
       },
       getQualityTemplateList() {
         getQualityTemplate({
-          type: this.form.dataType == 1 ? 1 : 6,
+          type: this.form.dataType == 1 ? 1 : this.form.dataType == 2 ? 6 : 5,
           status: 1,
           size: 999
         }).then((res) => {
-          console.log(res,'res')
+          console.log(res, 'res');
           this.qualityTemplateList = res.list;
         });
       }

+ 33 - 0
src/views/material/product/components/index-data.vue

@@ -570,6 +570,36 @@
               )?.label;
             }
           },
+          {
+            prop: 'modelKey',
+            label: '机型',
+            align: 'center',
+            minWidth: 150,
+            showOverflowTooltip: true,
+            formatter: (row, column) => {
+              return row.modelKey
+                ? row.modelKey
+                    .split(',')
+                    ?.map((item) => this.getDictValue('物品机型', item))
+                    .toString()
+                : '';
+            }
+          },
+          {
+            prop: 'colorKey',
+            label: '颜色',
+            align: 'center',
+            minWidth: 150,
+            showOverflowTooltip: true,
+            formatter: (row, column) => {
+              return row.colorKey
+                ? row.colorKey
+                    .split(',')
+                    ?.map((item) => this.getDictValue('物品颜色', item))
+                    .toString()
+                : '';
+            }
+          },
           {
             prop: 'isEnabled',
             align: 'center',
@@ -628,6 +658,9 @@
         }
       });
       // this.requestDict('生产类型');
+      this.requestDict('物品机型');
+      this.requestDict('物品颜色');
+
       this.getFieldModel();
     },
 

+ 60 - 29
src/views/material/product/components/link-msg.vue

@@ -13,10 +13,18 @@
       <el-tab-pane label="工艺路线">
         <ele-pro-table :columns="pathColumn" :datasource="pathData">
           <template v-slot:bomCategoryType="{ row }">
-            {{ row.bomCategoryType == 2 ? 'MBOM' : row.bomCategoryType == 1 ? 'PBOM' : row.bomCategoryType == 3 ? 'ABom' : '' }}
+            {{
+              row.bomCategoryType == 2
+                ? 'MBOM'
+                : row.bomCategoryType == 1
+                ? 'PBOM'
+                : row.bomCategoryType == 3
+                ? 'ABom'
+                : ''
+            }}
           </template>
-        </ele-pro-table
-      ></el-tab-pane>
+        </ele-pro-table></el-tab-pane
+      >
       <!-- <el-tab-pane label="质量标准"></el-tab-pane> -->
       <!-- <el-tab-pane label="文件">
         <ele-pro-table :columns="fileColumn" :datasource="[]"> </ele-pro-table
@@ -79,20 +87,29 @@
               添加生产厂家
             </el-button>
           </template>
-          <!-- 操作列 -->
-          <!-- <template v-slot:action="{ row }">
-            <el-popconfirm
-              class="ele-action"
-              title="确定要删除此供应商吗?"
-              @confirm="deleteSupplie(row)"
+
+        </ele-pro-table>
+      </el-tab-pane>
+         <el-tab-pane label="客户">
+        <ele-pro-table
+          :columns="supplierColumn"
+          :datasource="contactData"
+          :need-page="false"
+          ref="supplierRef"
+        >
+          <template v-slot:toolbar>
+            <el-button
+              size="small"
+              type="primary"
+              icon="el-icon-plus"
+              class="ele-btn-icon"
+              @click="handParent()"
+              v-if="id"
             >
-              <template v-slot:reference>
-                <el-link type="danger" :underline="false" icon="el-icon-delete">
-                  删除
-                </el-link>
-              </template>
-            </el-popconfirm>
-          </template> -->
+              添加客户
+            </el-button>
+          </template>
+
         </ele-pro-table>
       </el-tab-pane>
     </el-tabs>
@@ -107,7 +124,10 @@
 </template>
 
 <script>
-  import { getBomRoutingList, getBomAssociationList } from '@/api/material/list.js';
+  import {
+    getBomRoutingList,
+    getBomAssociationList
+  } from '@/api/material/list.js';
   import { saveSupplier, deleteSupplie } from '@/api/material/BOM.js';
   import { getRelatesInformationList } from '@/api/material/product.js';
   import dictMixins from '@/mixins/dictMixins';
@@ -368,6 +388,7 @@
         pathData: [],
         supplierData: [], //供应商
         manufacturerData: [], //生产厂家
+        contactData: [], //客户
         ids: '',
         title: ''
       };
@@ -378,6 +399,7 @@
           if (val) {
             this.getBomData();
             this.getRoutingData();
+            this.contactQueryByCategoryIdsAPI(1);
             this.contactQueryByCategoryIdsAPI(2);
             this.contactQueryByCategoryIdsAPI(3);
           }
@@ -401,16 +423,16 @@
       //BOM列表
       async getBomData() {
         const data = await getBomAssociationList({
-            categoryId: this.id,
-            versions: '',
-            bomType: 1,
-            isTemp: 0
+          categoryId: this.id,
+          versions: '',
+          bomType: 1,
+          isTemp: 0
         });
         this.bomData = data || [];
       },
       //工艺路线
-      async getRoutingData(){
-        const data =await getBomRoutingList(this.id);
+      async getRoutingData() {
+        const data = await getBomRoutingList(this.id);
         this.pathData = data || [];
       },
       // 关联设备
@@ -439,6 +461,9 @@
           categoryIds: [this.id],
           type
         });
+        if (type == 1) {
+          this.contactData = data[this.id] || [];
+        }
         if (type == 2) {
           this.supplierData = data[this.id] || [];
         }
@@ -447,7 +472,6 @@
         }
       },
       handParent() {
-        console.log(this.activeTab,'his.activeTab')
         if (this.activeTab == '4') {
           this.ids = '19';
           this.title = '选择供应商';
@@ -455,12 +479,17 @@
         if (this.activeTab == '5') {
           this.ids = '20250317001';
           this.title = '选择生产厂家';
-
+        }
+        if (this.activeTab == '6') {
+          this.ids = '17';
+          this.title = '选择客户';
         }
         this.$refs.vendorDialogRef.open(
           this.activeTab == '4'
             ? this.supplierData.map((item) => item.id)
-            : this.manufacturerData.map((item) => item.id)
+            : this.activeTab == '5'
+            ? this.manufacturerData.map((item) => item.id)
+            : this.contactData.map((item) => item.id)
         );
       },
 
@@ -471,8 +500,10 @@
         }).then((res) => {
           if (this.activeTab == '4') {
             this.contactQueryByCategoryIdsAPI(2);
-          } else {
+          } else if (this.activeTab == '5') {
             this.contactQueryByCategoryIdsAPI(3);
+          } else {
+            this.contactQueryByCategoryIdsAPI(1);
           }
         });
       },
@@ -481,7 +512,7 @@
           productId: this.id,
           supplierId: row.id
         }).then((res) => {
-          this.contactQueryByCategoryIdsAPI();
+          this.contactQueryByCategoryIdsAPI(2);
         });
       }
     }
@@ -493,4 +524,4 @@
 
     padding: 1px 17px;
   }
-</style>
+</style>

+ 31 - 3
src/views/material/product/detail.vue

@@ -461,6 +461,22 @@
       netWeight: null,
       qualityTemplateIds: [],
       dataType: 2
+    },
+    {
+      categoryId: '',
+      checkDepart: null,
+      checkFormula: null,
+      checkPerson: null,
+      checkProportion: null,
+      createTime: '',
+      createUserId: '',
+      inspectionStandards: null,
+      isComeCheck: 0,
+      // level: '',
+      levelItem: null,
+      netWeight: null,
+      qualityTemplateIds: [],
+      dataType: 3
     }
   ];
 
@@ -799,7 +815,6 @@
         'categoryLevelId',
         this.$route.query.categoryLevelId
       );
-
       this.$set(this.form, 'isUpdate', this.$route.query.isUpdate);
 
       this.isUpdate = this.$route.query.isUpdate;
@@ -985,6 +1000,8 @@
       },
       async _getDetails() {
         const data = await getDetails(this.$route.query.id);
+        this.isUpdate = this.$route.query.isUpdate;
+        this.$set(this.form, 'isUpdate', this.$route.query.isUpdate);
 
         const info = deepClone(data);
         info.category.produceType = info.category.produceType[0];
@@ -1054,9 +1071,20 @@
         }
         if (!info.categoryQms || !info.categoryQms?.length) {
           this.categoryQms = [...copyObj(defCategoryQms)];
-        } else if (info.categoryQms.length == 1) {
+        } else if (info.categoryQms.length < defCategoryQms.length) {
           //历史数据处理
-          this.categoryQms = [info.categoryQms[0], copyObj(defCategoryQms[1])];
+          // let num= defCategoryQms.length-info.categoryQms.length
+
+          // info.categoryQms.push();
+          this.categoryQms = [
+            ...info.categoryQms,
+            ...copyObj(
+              defCategoryQms.slice(
+                info.categoryQms.length,
+                defCategoryQms.length
+              )
+            )
+          ];
         } else {
           this.categoryQms = info.categoryQms;
         }