huang_an 2 anos atrás
pai
commit
8070e9a80a

+ 2 - 2
src/api/factoryModel/index.js

@@ -1,7 +1,7 @@
 import request from '@/utils/request';
 
 // 获取工厂下的所有车间
-export async function listWorkshopByParentId (params) {
+export async function listWorkshopByParentId(params) {
   const res = await request.get(
     `/main/factoryarea/listWorkshopByParentId/${params}`,
     {}
@@ -13,7 +13,7 @@ export async function listWorkshopByParentId (params) {
 }
 
 // 查询工厂列表-分页
-export async function getFactoryarea (params) {
+export async function getFactoryarea(params) {
   const res = await request.get(`/main/factoryarea/page`, {
     params
   });

+ 99 - 0
src/api/material/list.js

@@ -0,0 +1,99 @@
+import request from '@/utils/request';
+
+// 获取列表
+export async function getGroupPage(data) {
+  const res = await request.get('/main/categorylevelgroup/page', {
+    params: data
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+//  ==========  删除物料管理, 用到得相关接口,移到这     =============/
+
+// 根据分类组编码查询分类树信息
+export async function getTreeByPid(pid) {
+  const res = await request.get(`/main/categoryLevel/getTreeByPid/${pid}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 新增物料
+export async function addMaterial(data) {
+  const res = await request.post(`/main/category/add`, data);
+  if (res.data.code == 0) {
+    return res.data.message;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 编辑物料
+export async function editMaterial(data) {
+  const res = await request.post(`/main/category/edit`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取列表
+export async function getMaterialList(data) {
+  const res = await request.get(`/main/category/getList`, {
+    params: data
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取详情
+export async function getDetailInfo(id) {
+  const res = await request.get(`/main/category/info/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+//删除
+export async function removeMaterial(id) {
+  const res = await request.get(`/main/category/remove/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+//根据产品ID获取bom列表、工艺路线列表【产品管理】
+export async function getBomRoutingList(categoryId) {
+  const res = await request.get(`/main/category/getSourceList/${categoryId}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 产品工序与模具关联
+export async function categoryTaskPallet(data) {
+  const res = await request.post(`/main/category/categoryTaskPallet`, data);
+  if (res.data.code == 0) {
+    return res.data.message;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取产品工序与模具关联
+export async function getCategoryTaskPallet(categoryId) {
+  const res = await request.get(
+    `/main/category/getCategoryTaskPallet/${categoryId}`
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 38 - 0
src/api/material/product.js

@@ -0,0 +1,38 @@
+import request from '@/utils/request';
+
+// 产品关联物料
+export async function productTieUpMaterial(data) {
+  const res = await request.post(`/main/category/productTieUpMaterial`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 查询产品已关联物料信息
+export async function getRelatesInformationList(data) {
+  const res = await request.post(
+    `/main/category/getRelatesInformationList`,
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 查询未关联产品物料信息
+export async function unassociated(data) {
+  const res = await request.post(`/main/category/unassociated`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取产品bom信息
+export async function getCategoryBom(categoryId) {
+  const res = await request.get(`/main/category/getCategoryBom/${categoryId}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 19 - 0
src/api/sys/index.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request';
+/**
+ * 查询字典列表
+ * @param params 查询条件
+ */
+export async function listDictionaries(params) {
+  const res = await request.get('/system/dict/getPage', { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function pageDictionaryData(id) {
+  const res = await request.get(`/system/dict/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 10 - 7
src/components/CommomSelect/factory-area-select.vue

@@ -3,7 +3,6 @@
   <el-select
     v-model="selectVal"
     filterable
-    style="width: 100%"
     v-bind="$attrs"
     v-on="$listeners"
     clearable
@@ -32,16 +31,20 @@
       init: {
         type: Boolean,
         default: true
+      },
+      augr: {
+        type: Number,
+        default: 1
       }
     },
-    data () {
+    data() {
       return {
         dictList: []
       };
     },
     computed: {
       selectVal: {
-        set (val) {
+        set(val) {
           this.$emit('updateVal', val);
           this.$emit(
             'selfChange',
@@ -49,22 +52,22 @@
             this.dictList.find((i) => i.id === val)
           );
         },
-        get () {
+        get() {
           return this.value;
         }
       }
     },
-    created () {
+    created() {
       if (this.init) {
         this.getList();
       }
     },
     methods: {
-      async getList () {
+      async getList() {
         const res = await getFactoryarea({
           pageNum: -1,
           size: -1,
-          type: 2
+          type: this.augr
         });
         this.dictList = res.list;
       }

+ 5 - 0
src/enum/dict.js

@@ -5,14 +5,19 @@ export default {
   任务类型: 'taskCategory',
   流程分类: 'processCategory',
   角度: 'angle',
+  提前期单位: 'leadtime_unit',
+  检验方案: 'inspection_scheme',
   生命周期: 'life_cycle',
   网络状态: 'network_status',
   金额单位: 'money_unit',
   时间单位: 'time_unit',
   规则类型: 'rule_type',
+  排程类型: 'schedule_type',
   规则状态: 'rule_status',
   规则周期: 'rule_cycle',
   运维计划状态: 'plan_status',
+  质保预警参考: 'quality_assurance',
+  保质期单位: 'date_unit',
   紧急程度: 'urgent_type',
   委外单状态: 'extrinsic_state',
   报修来源: 'repair_origin',

+ 34 - 0
src/utils/sys.js

@@ -0,0 +1,34 @@
+import { listDictionaries, pageDictionaryData } from '@/api/sys';
+import dict from '@/enum/dict';
+
+export async function sysDict(name, value) {
+  const code = dict[name];
+  let names = '';
+
+  try {
+    const res = await listDictionaries({ pageNum: 1, size: 10, code: code });
+    const id = res.list[0].id;
+
+    const rep = await pageDictionaryData(id);
+    const list = rep.data.dictStaticVOList;
+
+    for (const key in list) {
+      if (list[key].code == value) {
+        names = list[key].name;
+        break;
+      }
+    }
+  } catch (error) {
+    console.error('Error fetching dictionary data:', error);
+  }
+
+  return names;
+}
+
+export function isExit(value, obj) {
+  console.log(value);
+  if (value != '') {
+    return value == '0' ? obj.isFalse : obj.isTrue;
+  }
+  return null;
+}

+ 1 - 0
src/views/ledgerAssets/equipment/components/DialogGoods.vue

@@ -36,6 +36,7 @@
               @handleNodeClick="handleNodeClick"
               ref="AssetTree"
               :paramsType="'type'"
+              id="4"
             />
           </div>
         </div>

+ 29 - 24
src/views/ledgerAssets/equipment/components/baseInfo.vue

@@ -26,7 +26,7 @@
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 采购日期 </template>
-        {{ info.productTime}}
+        {{ info.productTime }}
       </el-descriptions-item>
       <!-- <el-descriptions-item>
         <template slot="label"> 生产日期 </template>
@@ -53,12 +53,18 @@
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 网络状态</template>
-        {{ basicInfo.networkStatus === 1 ? '在线' : ( basicInfo.networkStatus === 0 ?'离线':'') }}
+        {{
+          basicInfo.networkStatus === 1
+            ? '在线'
+            : basicInfo.networkStatus === 0
+            ? '离线'
+            : ''
+        }}
       </el-descriptions-item>
     </el-descriptions>
 
     <div class="basic-details-title border-none">
-      <span class="border-span">投产信息</span>
+      <span class="border-span">产信息</span>
     </div>
 
     <el-descriptions title="" :column="4" size="medium" border>
@@ -87,11 +93,7 @@
     </div>
     <div class="upload-container">
       <div class="img-box">
-        <img
-          src="~@/assets/upload-placeholder.svg"
-          alt=""
-          v-if="!imageUrl"
-        />
+        <img src="~@/assets/upload-placeholder.svg" alt="" v-if="!imageUrl" />
         <img v-else :src="imageUrl" alt="设备图片" />
       </div>
       <div class="file-list">
@@ -171,7 +173,7 @@
     components: {
       // DetailsDialog
     },
-    data () {
+    data() {
       return {
         prodOpt: [
           { label: '固资编码', key: 'fixCode', value: '' },
@@ -221,55 +223,58 @@
         info: {}
       };
     },
-    created () {
+    created() {
       this.getInfo();
     },
     methods: {
       // 获取设备详情
-      getInfo () {
+      getInfo() {
         getAssetInfo(this.id).then((data) => {
           this.info = data;
           this.basicInfo = data.category.category;
           if (data.attUrl && data.attUrl.length > 0) {
             // 文档信息
             data.attUrl.forEach((item, index) => {
-              Object.assign(this.fileList[item.sort - 1], item)
-            })
+              Object.assign(this.fileList[item.sort - 1], item);
+            });
           }
           // 资产信息
           for (const item of this.prodOpt) {
             // 地址
             if (item.key == 'detailLocation') {
-              item.value = data.positionList[0]?.pathName +'/'+ data.positionList[0]?.detailPosition
-                // ?.map((i) => i.name)
-                // .join(',');
+              item.value =
+                data.positionList[0]?.pathName +
+                '/' +
+                data.positionList[0]?.detailPosition;
+              // ?.map((i) => i.name)
+              // .join(',');
             } else {
               item.value = data[item.key] || this.basicInfo[item.key];
             }
           }
           // 设备图片
-          if(data.imageUrl.storePath ){
-             this.imageUrl  = getImageUrl(data.imageUrl.storePath)
-          }else{
-            this.imageUrl = null
+          if (data.imageUrl.storePath) {
+            this.imageUrl = getImageUrl(data.imageUrl.storePath);
+          } else {
+            this.imageUrl = null;
           }
         });
       },
       // 设置标准产能
-      setbzcn (val) {
+      setbzcn(val) {
         if (!val) {
           return '';
         }
         let item = JSON.parse(val);
         return item.standardCapacity || '';
       },
-      openfile (row) {
+      openfile(row) {
         if (row.storePath) {
           getFile({ objectName: row.storePath }, row.name);
         }
       },
       // 打开详情弹窗
-      jumpDetails () {
+      jumpDetails() {
         if (!this.info.warehouseDetail) {
           return;
         }
@@ -279,7 +284,7 @@
         );
       },
       // 设备位置
-      initDetailLocation (val) {
+      initDetailLocation(val) {
         // console.log(val);
         let list = String(val)
           .split(',')

+ 223 - 0
src/views/ledgerAssets/equipment/components/link-msg.vue

@@ -0,0 +1,223 @@
+<template>
+  <div class="link-msg">
+    <el-tabs v-model="activeTab">
+      <el-tab-pane label="可用模具">
+        <ele-pro-table :columns="moduleColumn" :datasource="moduleData">
+        </ele-pro-table>
+      </el-tab-pane>
+      <el-tab-pane label="BOM">
+        <ele-pro-table :columns="BOMColumn" :datasource="bomData">
+        </ele-pro-table
+      ></el-tab-pane>
+      <el-tab-pane label="工艺路线">
+        <ele-pro-table :columns="pathColumn" :datasource="pathData">
+        </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
+      ></el-tab-pane> -->
+      <el-tab-pane label="关联设备">
+        <ele-pro-table :columns="equiColumn" :datasource="eqData">
+        </ele-pro-table
+      ></el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+
+<script>
+  import { getBomRoutingList } from '@/api/material/list.js';
+  import { getRelatesInformationList } from '@/api/material/product.js';
+  import dictMixins from '@/mixins/dictMixins';
+  export default {
+    mixins: [dictMixins],
+    props: {
+      id: [Number, String],
+      categoryLevelId: [Number, String],
+      categoryLevelGroupId: [Number, String]
+    },
+    data() {
+      return {
+        activeTab: '0',
+        moduleColumn: [
+          {
+            type: 'index',
+            label: '序号',
+            width: '55px',
+            align: 'center'
+          },
+          {
+            label: '编码',
+            prop: 'code'
+          },
+          {
+            label: '名称',
+            prop: 'name'
+          },
+          {
+            label: '牌号',
+            prop: 'brandNum'
+          },
+          {
+            label: '型号',
+            prop: 'modelType'
+          },
+          {
+            label: '收缩系数',
+            prop: 'extendInfo.shrinkEffictive'
+          },
+          {
+            label: '大模体型号',
+            prop: 'extendInfo.maxMoldType'
+          },
+          // {
+          //   label: '物品类型',
+          //   prop: ''
+          // },
+          {
+            label: '分类',
+            prop: 'categoryLevelGroupName'
+          }
+        ],
+        BOMColumn: [
+          {
+            label: 'BOM编码',
+            prop: 'code'
+          },
+          {
+            label: 'BOM名称',
+            prop: 'name'
+          },
+          {
+            label: '版本号',
+            prop: 'version'
+          },
+          {
+            label: '基本数量',
+            prop: 'baseCount'
+          },
+          {
+            label: '单位',
+            prop: 'baseCountUnit'
+          }
+        ],
+        pathColumn: [
+          {
+            label: '工艺路线组编码',
+            prop: 'code'
+          },
+          {
+            label: '工艺路线名称',
+            prop: 'name'
+          },
+          {
+            label: '生产版本',
+            prop: 'produceVersionName'
+          },
+          {
+            label: '工艺路线版本',
+            prop: 'version'
+          }
+        ],
+        fileColumn: [
+          {
+            label: '文件编码'
+          },
+          {
+            label: '文件名称'
+          }
+        ],
+        equiColumn: [
+          // {
+          //   type: 'selection'
+          // },
+          {
+            label: '设备分类',
+            prop: 'categoryLevelGroupName'
+          },
+          {
+            label: '设备编码',
+            prop: 'code'
+          },
+          {
+            label: '设备名称',
+            prop: 'name'
+          },
+          {
+            label: '产能',
+            formatter: (row) => {
+              return (
+                row.quantity &&
+                `${row.quantity}/${this.getDictValue(
+                  '重量单位',
+                  row.quantityUnitId
+                )}`
+              );
+            }
+          }
+        ],
+        moduleData: [],
+        eqData: [],
+        bomData: [],
+        pathData: []
+      };
+    },
+    watch: {
+      id: {
+        handler(val) {
+          if (val) {
+            this.getData();
+          }
+        },
+        immediate: true
+      },
+      categoryLevelId: {
+        handler(val) {
+          if (val) {
+            this.getModuleData();
+            this.getEqData();
+          }
+        },
+        immediate: true
+      }
+    },
+    created() {
+      this.requestDict('重量单位');
+    },
+    methods: {
+      async getData() {
+        const data = await getBomRoutingList(this.id);
+
+        this.bomData = data?.bomList || [];
+        this.pathData = data?.routingList || [];
+      },
+      // 关联设备
+      async getEqData() {
+        const data = await getRelatesInformationList({
+          mainCategoryId: this.categoryLevelId,
+          categoryLevelRootId: 4, //设备
+          categoryLevelGroupId: this.categoryLevelGroupId
+        });
+
+        this.eqData = data;
+      },
+      // 关联舟皿
+      async getModuleData() {
+        const data = await getRelatesInformationList({
+          mainCategoryId: this.categoryLevelId,
+          categoryLevelRootId: 5, //模具
+          categoryLevelGroupId: this.categoryLevelGroupId
+        });
+
+        this.moduleData = data;
+      }
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  .link-msg {
+    background: #fff;
+
+    padding: 1px 17px;
+  }
+</style>

+ 356 - 54
src/views/ledgerAssets/equipment/edit.vue

@@ -62,6 +62,10 @@
               </el-form-item>
               <span v-if="pageType == 'edit'">{{ form.name }}</span>
             </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 牌号</template>
+              {{ assetInfo.brandNum }}
+            </el-descriptions-item>
             <el-descriptions-item>
               <template slot="label"> 型号</template>
               {{ assetInfo.modelType }}
@@ -92,14 +96,14 @@
               </el-form-item>
               <span v-if="pageType == 'edit'">{{ form.productTime }}</span>
             </el-descriptions-item>
-<!--            <el-descriptions-item>
+            <!--            <el-descriptions-item>
               <template slot="label"> 过保日期 </template>
               <span v-if="pageType == 'add'">{{ expirationTime }}</span>
               <span v-if="pageType == 'edit'">{{ cbexpirationTime }}</span>
             </el-descriptions-item> -->
             <el-descriptions-item>
               <template slot="label"> 计量单位 </template>
-              {{ basicInfo.category&&basicInfo.category.measuringUnit }}
+              {{ basicInfo.measuringUnit }}
             </el-descriptions-item>
             <el-descriptions-item>
               <template slot="label"> 标准产能 </template>
@@ -115,7 +119,44 @@
             </el-descriptions-item>
             <el-descriptions-item v-if="pageType == 'edit'">
               <template slot="label"> 网络状态</template>
-              {{ networkStatus === 1 ? '在线' : ( networkStatus === 0 ?'离线':'') }}
+              {{
+                networkStatus === 1 ? '在线' : networkStatus === 0 ? '离线' : ''
+              }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 重量单位 </template>
+              {{ basicInfo.weightUnit }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 包装单位 </template>
+              {{ basicInfo.packingUnit }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 体积 </template>
+              {{ basicInfo.volume ? basicInfo.volume + '/' : null
+              }}{{ basicInfo.volumeUnit }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 毛重 </template>
+              {{ basicInfo.roughWeight }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 净重 </template>
+              {{ basicInfo.netWeight }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 所属部门 </template>
+              {{ basicInfo.groupName }}
+              <!-- <personSelect
+                ref="directorRef"
+                v-model="basicInfo.deptId"
+                :init="false"
+              /> -->
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 负责人 </template>
+              <!-- {{ basicInfo.packingUnit }} -->
+              {{ basicInfo.name }}
             </el-descriptions-item>
           </el-descriptions>
 
@@ -189,7 +230,7 @@
                 <el-input v-model="zcInfo.purpose" class="input"></el-input>
               </el-form-item>
             </el-col>
-<!--            <el-col :span="8">
+            <!--            <el-col :span="8">
               <el-form-item label="所属工序">
                 <WorkingProcedureSelect
                   v-model="zcInfo.roteId"
@@ -198,7 +239,8 @@
             </el-col> -->
             <el-col :span="8">
               <el-form-item label="品牌">
-                <el-select v-model="zcInfo.brand" placeholder="请选择">
+                <el-input v-model="zcInfo.brand" class="input"></el-input>
+                <!-- <el-select v-model="zcInfo.brand" placeholder="请选择">
                   <el-option
                     v-for="item in options.brand"
                     :key="item.id"
@@ -206,7 +248,7 @@
                     :value="item.id"
                   >
                   </el-option>
-                </el-select>
+                </el-select> -->
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -222,26 +264,64 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="8">
-              <el-form-item label="所属厂房">
-                <FactoryAreaSelect v-model="zcInfo.factoryRoomId" />
-                <!-- <el-select
-                  v-model="zcInfo.factoryPlantCode"
-                  placeholder="请选择"
-                >
-                  <el-option
-                    v-for="item in options.factoryPlantCode"
-                    :key="item.code"
-                    :label="item.name"
-                    :value="item.code"
-                  >
-                  </el-option>
-                </el-select> -->
-              </el-form-item>
+            <el-col :span="24">
+              <el-row>
+                <el-col :span="5">
+                  <el-form-item label="所属厂房">
+                    <FactoryAreaSelect
+                      v-model="zcInfo.factoryRoomId1"
+                      :augr="1"
+                    />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="3">
+                  <el-form-item label-width="10px">
+                    <FactoryAreaSelect
+                      v-model="zcInfo.factoryRoomId2"
+                      :augr="2"
+                    />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="3">
+                  <el-form-item label-width="10px">
+                    <FactoryAreaSelect
+                      v-model="zcInfo.factoryRoomId3"
+                      :augr="3"
+                    />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="3">
+                  <el-form-item label-width="10px">
+                    <FactoryAreaSelect
+                      v-model="zcInfo.factoryRoomId4"
+                      :augr="4"
+                    />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="3">
+                  <el-form-item label-width="10px">
+                    <el-input
+                      placeholder="请输入"
+                      v-model="zcInfo.factoryRoomId5"
+                    ></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="设备位置" required>
-                <div class="sbwz">
+              <el-row>
+                <el-col :span="6">
+                  <!-- prop="location" -->
+                  <el-form-item label="设备位置">
+                    <div class="location-warp">
+                      <el-cascader
+                        clearable
+                        style="width: 100%"
+                        v-model="form.location"
+                        :options="options.cityDataLabel"
+                      ></el-cascader>
+                    </div>
+                    <!-- <div class="sbwz">
                   <el-row :gutter="12">
                     <el-col :span="3">
                       <el-form-item
@@ -310,10 +390,151 @@
                       ></el-input
                     ></el-col>
                   </el-row>
-                </div>
-              </el-form-item>
+                </div> -->
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item label-width="10px">
+                    <el-input
+                      class="detail"
+                      clearable
+                      :maxlength="20"
+                      v-model="form.locationDetail"
+                      placeholder="请输入详细地址"
+                    />
+                  </el-form-item>
+                </el-col>
+              </el-row>
             </el-col>
           </el-row>
+
+          <div class="basic-details-title border-none">
+            <span class="border-span">仓储配置</span>
+          </div>
+          <el-descriptions title="" :column="4" size="medium" border>
+            <el-descriptions-item>
+              <template slot="label"> 启用库存预警</template>
+              {{ dictType[categoryWms.isWarn] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">允许拆包</template>
+              {{ dictType[categoryWms.isUnpack] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">安全库存</template>
+              {{ categoryWms.secureInventory }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">最小库存</template>
+              {{ categoryWms.minInventory }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label"> 最大库存</template>
+              {{ categoryWms.maxInventory }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">盘点模式</template>
+              {{ dictPd[categoryWms.inventoryMode] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">质保预警参考</template>
+              <!-- <DictSelection
+                dictName="质保预警参考"
+                clearable
+                v-model="categoryWms.warrantyWarnRefer"
+              >
+              </DictSelection> -->
+              {{ categoryWms.warrantyWarnRefer }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">保质期</template>
+              {{
+                categoryWms.warrantyPeriod
+                  ? categoryWms.warrantyPeriod + '/'
+                  : null
+              }}{{ categoryWms.warrantyPeriodUnit }}
+            </el-descriptions-item>
+          </el-descriptions>
+
+          <div class="basic-details-title border-none">
+            <span class="border-span">生产信息</span>
+          </div>
+          <el-descriptions title="" :column="4" size="medium" border>
+            <el-descriptions-item>
+              <template slot="label"> 是否齐套件</template>
+              {{ dictType[categoryMes.isCompleteSet] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">消耗波动</template>
+              {{ categoryMes.consumWave ? categoryMes.consumWave + '%' : null }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">变动损耗率</template>
+              {{
+                categoryMes.changeLossRate
+                  ? categoryMes.changeLossRate + '%'
+                  : null
+              }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">固定损耗数</template>
+              {{ categoryMes.fixLossNum }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">排程类型</template>
+              {{ categoryMes.apsType }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">允许改型</template>
+              {{ dictType[categoryMes.isModify] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">允许返工返修</template>
+              {{ dictType[categoryMes.isRework] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">是否返回料</template>
+              {{ dictType[categoryMes.isRematerial] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">是否副产品</template>
+              {{ dictType[categoryMes.isByProduct] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">是否废品</template>
+              {{ dictType[categoryMes.isWaste] }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">是否不良品</template>
+              {{ dictType[categoryMes.isDefective] }}
+            </el-descriptions-item>
+          </el-descriptions>
+
+          <div class="basic-details-title border-none">
+            <span class="border-span">备注信息</span>
+          </div>
+          <el-descriptions title="" :column="4" size="medium" border>
+            <el-descriptions-item>
+              <template slot="label">附件信息</template>
+              {{ categoryObj.fileName }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">备注</template>
+              {{ categoryObj.remark }}
+            </el-descriptions-item>
+          </el-descriptions>
+
+          <div class="basic-details-title border-none">
+            <span class="border-span">关联信息</span>
+          </div>
+          <linkMsg
+            v-if="isLink"
+            ref="linkMsgRef"
+            :id="categoryObj.id"
+            :categoryLevelId="categoryObj.categoryLevelId"
+            :categoryLevelGroupId="categoryObj.categoryLevelGroupId"
+          />
+
           <div class="basic-details-title border-none">
             <span class="border-span">文档信息</span>
           </div>
@@ -479,6 +700,11 @@
   import fileUpload from '@/components/upload/fileUpload';
   import WithView from '@/components/upload/WithView';
   import imgUpload from '@/components/upload/imgUpload';
+  import { cityDataLabel } from 'ele-admin/packages/utils/regions';
+  import personSelect from '@/components/CommomSelect/person-select.vue';
+  import { getDetails } from '@/api/classifyManage/itemInformation';
+  import { sysDict, isExit } from '@/utils/sys';
+  import linkMsg from './components/link-msg.vue';
   // import selectUpload from "@/components/selectUpload";
   // import UploadImg from "@/components/uploadImg/WithView.vue";
   import DialogGoods from './components/DialogGoods';
@@ -503,6 +729,7 @@
   import { getUserPage } from '@/api/system/organization';
   export default {
     components: {
+      linkMsg,
       //selectUpload,
       //UploadImg,
       FactoryLineSelect,
@@ -514,10 +741,30 @@
       imgUpload,
       factorySelect,
       DialogGoods,
-      DeptSelect
+      DeptSelect,
+      personSelect
     },
-    data () {
+    data() {
       return {
+        isLink: true,
+        categoryObj: {},
+        dictType: {
+          1: '是',
+          0: '否'
+        },
+        dictPd: {
+          1: '逐个盘点',
+          2: '批量盘点'
+        },
+        categoryMes: {
+          isModify: '',
+          isRework: '',
+          isRematerial: '',
+          isByProduct: '',
+          isWaste: '',
+          isDefective: ''
+        },
+        categoryWms: {}, //仓储
         title: '新建设备信息',
         pageType: 'add',
         btnLoading: false,
@@ -534,11 +781,14 @@
           name: [
             { required: true, message: '请输入设备名称', trigger: 'blur' }
           ],
+          location: [
+            { required: true, message: '请输入设备位置', trigger: 'change' }
+          ],
           code: [{ required: true, message: '请输入设备编码', trigger: 'blur' }]
         },
         // 基本信息
         basicInfo: {},
-        assetInfo:{},
+        assetInfo: {},
         // 资产信息
         zcInfo: {
           // 	固定资产编码
@@ -627,14 +877,16 @@
           repairUserId: [],
           ownershipUserId: [],
           supplierId: [],
-          brand: []
-        }
+          brand: [],
+          cityDataLabel
+        },
+        depList: []
       };
     },
     watch: {},
     computed: {
       // 过保时间
-      expirationTime () {
+      expirationTime() {
         if (this.form.productTime && this.basicInfo.expirationDate) {
           return this.setGbTime(
             this.form.productTime,
@@ -646,7 +898,7 @@
         }
       }
     },
-    created () {
+    async created() {
       if (this.$route.query.id) {
         this.pageType = 'edit';
         this.id = this.$route.query.id;
@@ -655,23 +907,63 @@
       }
     },
     methods: {
-      handlwpbm () {
+      isExit,
+      handlwpbm() {
         this.$refs.DialogGoods.open();
       },
-      async cbDialogGoods (data) {
+      async cbDialogGoods(data) {
+        await this.searchDeptNodeClick(data.deptLeaderId, data);
+        await this.seachDetail(data.id);
+        console.log(data);
         this.basicInfo = data;
-        this.assetInfo = data
-        this.form.rootCategoryLevelId = this.basicInfo.categoryLevelPathId.split(',')[0];
+        this.assetInfo = data;
+        this.form.rootCategoryLevelId =
+          this.basicInfo.categoryLevelPathId.split(',')[0];
         this.form.categoryId = this.basicInfo.id;
         this.form.name = this.basicInfo.name;
         // let res = await getAssetNum({
         //   assetCode: this.basicInfo.code,
         //   num: 1
         // });
-        this.form.code = Date.now(); //res.data[0].onlyCode;
+        this.form.code = data.code; //Date.now(); //res.data[0].onlyCode;
+        for (const key in this.depList) {
+          if (this.depList[key].id == data.deptId) {
+            this.basicInfo.name = this.depList[key].name;
+            this.basicInfo.groupName = this.depList[key].groupName;
+            return;
+          }
+        }
+      },
+      async seachDetail(id) {
+        this.isLink = false;
+        const res = await getDetails(id);
+        console.log('res==', res);
+        this.categoryWms = {
+          ...res.categoryWms,
+          warrantyWarnRefer: await sysDict(
+            '质保预警参考',
+            res.categoryWms.warrantyWarnRefer
+          ),
+          warrantyPeriodUnit: await sysDict(
+            '保质期单位',
+            res.categoryWms.warrantyPeriodUnit
+          )
+        };
+        this.categoryMes = {
+          ...res.categoryMes,
+          apsType: await sysDict('排程类型', res.categoryMes.apsType)
+        };
+        this.categoryObj = {
+          ...res.category,
+          fileName: res.category.remarkAttach
+            .map((item) => item.name)
+            .join(', ')
+        };
+        console.log(this.categoryObj);
+        this.isLink = true;
       },
       // 计算过保时间
-      setGbTime (basic, value, type) {
+      setGbTime(basic, value, type) {
         basic = Date.parse(basic);
         let time;
         switch (type) {
@@ -697,7 +989,7 @@
         let num = basic + time;
         return parseTime(num);
       },
-      async getwhbm () {
+      async getwhbm() {
         if (!this.zcInfo.repairGroupId) return;
         let data = await getUserPage({
           pageNum: 1,
@@ -706,7 +998,7 @@
         });
         this.options.repairUserId = data.list;
       },
-      async getqsbm () {
+      async getqsbm() {
         if (!this.zcInfo.ownershipGroupId) return;
         let data = await getUserPage({
           pageNum: 1,
@@ -716,13 +1008,13 @@
         this.options.ownershipUserId = data.list;
       },
       // 树形结构数据
-      getTreeList () {
+      getTreeList() {
         org.tree().then((res) => {
           this.options.deptList = res.data;
         });
       },
       // 获取供应商、工序列表
-      async getgys () {
+      async getgys() {
         let muster = await getSupplier({
           size: 999
         });
@@ -730,7 +1022,7 @@
       },
 
       // 添加自定义参数
-      addItem () {
+      addItem() {
         if (this.form.extInfoSelf.length < 10) {
           let item = { key: '', value: '' };
           this.form.extInfoSelf.push(item);
@@ -739,11 +1031,11 @@
         }
       },
       // 删除自定义参数
-      delt (item, index) {
+      delt(item, index) {
         this.form.extInfoSelf.splice(index, 1);
       },
       // 提交
-      submit () {
+      submit() {
         if (!this.basicInfo && this.pageType == 'add') {
           return this.$message.error('请选择物品编码');
         }
@@ -797,22 +1089,32 @@
         });
       },
       // 处理扩展字段
-      setKz () {
+      setKz() {
         return this.form.extInfoSelf || [];
       },
       // 处理文档信息
-      setWd () {
+      setWd() {
         return Object.values(this.attUrl).map((item) => ({
           ...(item.value[0] || {}),
           sort: item.sort
         }));
       },
+      // 选择所属部门
+      async searchDeptNodeClick(id, ids) {
+        // 根据部门获取人员
+        const res = await getUserPage({
+          pageNum: 1,
+          size: -1,
+          executeGroupId: id
+        });
+        this.depList = res.list;
+      },
       // 获取设备详情
-      async getInfo () {
+      async getInfo() {
         const data = await getAssetInfo(this.id);
         data.extInfoSelf = data.extInfoSelf || [];
-
         this.form = data;
+
         this.basicInfo = data.category;
         this.assetInfo = data.category.category;
         this.cbexpirationTime = data.expirationTime;
@@ -860,14 +1162,14 @@
         this.iotId = data.iotId;
       },
       // 设置标准产能
-      setbzcn (val) {
+      setbzcn(val) {
         if (!val) {
           return '';
         }
         let item = JSON.parse(val);
         return item.standardCapacity || '';
       },
-      hanldFactoryCode (val, item) {
+      hanldFactoryCode(val, item) {
         this.positionInfo.factoryName = item?.name;
         // 重置
         this.zcInfo.workshopCode = '';
@@ -879,7 +1181,7 @@
           this.$refs.WorkshopSelectRef.getList();
         });
       },
-      hanldWorkshopCode (val, item) {
+      hanldWorkshopCode(val, item) {
         this.positionInfo.workshopName = item?.name;
         // 重置
         this.options.workshopCode = [];
@@ -889,7 +1191,7 @@
           this.$refs.FactoryLineSelectRef.getList();
         });
       },
-      hanldlineCodeCode (val, item) {
+      hanldlineCodeCode(val, item) {
         this.positionInfo.lineName = item?.name;
       }
     }

+ 456 - 147
src/views/ledgerAssets/mould/components/baseInfo.vue

@@ -4,116 +4,337 @@
       <span class="border-span">基本信息</span>
     </div>
     <el-descriptions title="" :column="4" size="medium" border>
+      <el-descriptions-item>
+        <template slot="label"> 分类 </template>
+        {{ categoryObj.categoryLevelName }}
+      </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 编码 </template>
-        {{ info.code }}
+        {{ categoryObj.code }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 名称 </template>
-        {{ info.name }}
+        {{ categoryObj.name }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 牌号</template>
-        {{ info.baseInfo.brandNum }}
+        {{ categoryObj.brandNum }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 型号 </template>
-        {{ info.baseInfo.modelType }}
+        {{ categoryObj.modelType }}
       </el-descriptions-item>
       <el-descriptions-item>
-        <template slot="label"> 大模体型号 </template>
-        {{info.extraInfo.dieBodyModel}}
+        <template slot="label"> 规格 </template>
+        {{ categoryObj.specification }}
       </el-descriptions-item>
       <el-descriptions-item>
-        <template slot="label"> 芯杆数量 </template>
-       {{info.extraInfo.mandrelNum}}
+        <template slot="label"> 计量单位 </template>
+        {{ categoryObj.measuringUnit }}
       </el-descriptions-item>
       <el-descriptions-item>
-        <template slot="label"> 模孔数量</template>
-        {{info.extraInfo.dieHoleNum}}
+        <template slot="label"> 重量单位 </template>
+        {{ categoryObj.weightUnit }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 包装单位 </template>
+        {{ categoryObj.packingUnit }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 体积 </template>
+        {{ categoryObj.volume }}{{ '/' + categoryObj.volumeUnit }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 毛重 </template>
+        {{ categoryObj.roughWeight }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">净重 </template>
+        {{ categoryObj.netWeight }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">所属部门 </template>
+        {{ depInfo.groupName }}
       </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">负责人 </template>
+        {{ depInfo.name }}
+      </el-descriptions-item>
+    </el-descriptions>
+    <div class="basic-details-title border-none">
+      <span class="border-span">模具信息</span>
+    </div>
+    <el-descriptions title="" :column="4" size="medium" border>
       <el-descriptions-item>
         <template slot="label"> 收缩系数</template>
-        {{info.extraInfo.shrinkageCoefficient}}
+        {{
+          categoryMold.shrinkEffictive
+            ? categoryMold.shrinkEffictive + '%'
+            : null
+        }}
       </el-descriptions-item>
       <el-descriptions-item>
-        <template slot="label"> 下冲头数量 </template>
-        {{info.extraInfo.lowerPunchNum}}
+        <template slot="label"> 芯杆数量 </template>
+        {{ categoryMold.coreBarNum }}
       </el-descriptions-item>
       <el-descriptions-item>
-        <template slot="label"> 上冲头数量 </template>
-        {{info.extraInfo.upperPunchNum}}
+        <template slot="label"> 模孔数量</template>
+        {{ categoryMold.dieHoleNum }}
       </el-descriptions-item>
       <el-descriptions-item>
-        <template slot="label"> 最大冲压次数</template>
-        {{info.extraInfo.maximumStampingTimes}}
+        <template slot="label"> 上冲头数量</template>
+        {{ categoryMold.upperPunchNum }}
       </el-descriptions-item>
       <el-descriptions-item>
-        <template slot="label" :span="2"> 分类 </template>
-        {{info.baseInfo.categoryLevelPath}}
+        <template slot="label"> 下冲头数量</template>
+        {{ categoryMold.downPunchNum }}
       </el-descriptions-item>
-      <el-descriptions-item >
-        <template slot="label"> 采购日期 </template>
-        <!-- {{info.warehouseDetail.procurementTime}} -->
+
+      <el-descriptions-item>
+        <template slot="label"> 最大冲压次数</template>
+        {{ categoryMold.maxCyTimes }}
       </el-descriptions-item>
       <el-descriptions-item>
-        <template slot="label"> 过保日期 </template>
-       <!-- {{info.warehouseDetail.expirationTime}} -->
+        <template slot="label"> 大模体型号 </template>
+        {{ categoryMold.maxMoldType }}
       </el-descriptions-item>
+
       <el-descriptions-item>
-        <template slot="label"> 计量单位</template>
-        {{info.baseInfo.measuringUnit}}
+        <template slot="label"> 芯棒直径 </template>
+        {{ categoryMold.mandrelDiameter }}
       </el-descriptions-item>
     </el-descriptions>
 
     <div class="basic-details-title border-none">
-      <span class="border-span">产信息</span>
+      <span class="border-span">产信息</span>
     </div>
     <el-descriptions title="" :column="4" size="medium" border>
       <el-descriptions-item>
         <template slot="label"> 固资编码 </template>
-        {{info.fixCode}}
+        {{ info.fixCode }}
       </el-descriptions-item>
       <el-descriptions-item>
-        <template slot="label"> 出库时间</template>
-        <!-- {{info.warehouseDetail.createTime}} -->
+        <template slot="label"> 模具编号 </template>
+        {{ info.fixCode }}
       </el-descriptions-item>
-      <el-descriptions-item :span="2">
-        <template slot="label">  {{sourceType==1?'入库单号':'出库单号'}}  </template>
-        <!-- <el-link style="color: #70B603" @click="jumpDetails">{{info.warehouseDetail.bizNum}}</el-link> -->
+      <el-descriptions-item>
+        <template slot="label"> 冲压次数</template>
+        <!-- {{ info.processName }} -->
       </el-descriptions-item>
+
       <el-descriptions-item>
         <template slot="label"> 所属工序</template>
-        {{info.processName}}
+        {{ info.processName }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 权属部门 </template>
-        {{info.ownershipDeptName}}
+        {{ info.ownershipDeptName }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 品牌 </template>
-        {{info.brand}}
+        {{ info.brand }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 供应商</template>
-        {{info.supplierName}}
+        {{ info.supplierName }}
       </el-descriptions-item>
       <el-descriptions-item>
         <template slot="label"> 供应商电话 </template>
-        {{info.supplierMobile}}
+        {{ info.supplierMobile }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 采购日期 </template>
+        <!-- {{info.warehouseDetail.procurementTime}} -->
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 过保日期 </template>
+        <!-- {{info.warehouseDetail.expirationTime}} -->
+      </el-descriptions-item>
+    </el-descriptions>
+
+    <div class="basic-details-title border-none">
+      <span class="border-span">仓储配置</span>
+    </div>
+    <el-descriptions title="" :column="4" size="medium" border>
+      <el-descriptions-item>
+        <template slot="label"> 启用库存预警</template>
+        {{ dictType[categoryWms.isWarn] }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">允许拆包</template>
+        {{ dictType[categoryWms.isUnpack] }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">安全库存</template>
+        {{ categoryWms.secureInventory }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">最小库存</template>
+        {{ categoryWms.minInventory }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 最大库存</template>
+        {{ categoryWms.maxInventory }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">盘点模式</template>
+        {{ dictPd[categoryWms.inventoryMode] }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">质保预警参考</template>
+        <!-- <DictSelection
+                dictName="质保预警参考"
+                clearable
+                v-model="categoryWms.warrantyWarnRefer"
+              >
+              </DictSelection> -->
+        {{ categoryWms.warrantyWarnRefer }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">保质期</template>
+        {{ categoryWms.warrantyPeriod ? categoryWms.warrantyPeriod + '/' : null
+        }}{{ categoryWms.warrantyPeriodUnit }}
+      </el-descriptions-item>
+    </el-descriptions>
+
+    <div class="basic-details-title border-none">
+      <span class="border-span">生产信息</span>
+    </div>
+    <el-descriptions title="" :column="4" size="medium" border>
+      <el-descriptions-item>
+        <template slot="label"> 是否齐套件</template>
+        {{ dictType[categoryMes.isCompleteSet] }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">消耗波动</template>
+        {{ categoryMes.consumWave ? categoryMes.consumWave + '%' : null }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">变动损耗率</template>
+        {{
+          categoryMes.changeLossRate ? categoryMes.changeLossRate + '%' : null
+        }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">固定损耗数</template>
+        {{ categoryMes.fixLossNum }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">排程类型</template>
+        {{ categoryMes.apsType }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">允许改型</template>
+        {{ dictType[categoryMes.isModify] }}
       </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">允许返工返修</template>
+        {{ dictType[categoryMes.isRework] }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">是否返回料</template>
+        {{ dictType[categoryMes.isRematerial] }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">是否副产品</template>
+        {{ dictType[categoryMes.isByProduct] }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">是否废品</template>
+        {{ dictType[categoryMes.isWaste] }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">是否不良品</template>
+        {{ dictType[categoryMes.isDefective] }}
+      </el-descriptions-item>
+    </el-descriptions>
+
+    <div class="basic-details-title border-none">
+      <span class="border-span">计划</span>
+    </div>
+    <el-descriptions title="" :column="4" size="medium" border>
+      <el-descriptions-item>
+        <template slot="label">固定提前期</template>
+        {{ categoryAps.fixLeadTime }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">变动提前期</template>
+        {{ categoryAps.changeLeadTime }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">检验提前期</template>
+        {{ categoryAps.checkLeadTime }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">累计提前期</template>
+        {{ categoryAps.cumLeadTime }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">提前期单位</template>
+        {{ categoryAps.unit }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">订货间隔期</template>
+        {{
+          categoryAps.orderIntervalTime
+            ? categoryAps.orderIntervalTime + '/'
+            : null
+        }}{{ categoryAps.orderIntervalUnit }}
+      </el-descriptions-item>
+    </el-descriptions>
 
+    <div class="basic-details-title border-none">
+      <span class="border-span">质量配置</span>
+    </div>
+    <el-descriptions title="" :column="4" size="medium" border>
+      <el-descriptions-item>
+        <template slot="label">是否来料检验</template>
+        {{ dictType[categoryQms.isComeCheck] }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">检验方案</template>
+        {{ categoryQms.checkFormula }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">采购组织</template>
+        {{ cgInfo.groupName }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">采购员</template>
+        {{ cgInfo.name }}
+      </el-descriptions-item>
     </el-descriptions>
+
+    <div class="basic-details-title border-none">
+      <span class="border-span">备注信息</span>
+    </div>
+    <el-descriptions title="" :column="4" size="medium" border>
+      <el-descriptions-item>
+        <template slot="label">附件信息</template>
+        {{ categoryObj.fileName }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">备注</template>
+        {{ categoryObj.remark }}
+      </el-descriptions-item>
+    </el-descriptions>
+
+    <div class="basic-details-title border-none">
+      <span class="border-span">关联信息</span>
+    </div>
+    <linkMsg
+      ref="linkMsgRef"
+      :id="categoryObj.id"
+      :categoryLevelId="categoryObj.categoryLevelId"
+      :categoryLevelGroupId="categoryObj.categoryLevelGroupId"
+    />
+
     <div class="basic-details-title border-none">
       <span class="border-span">文档信息</span>
     </div>
     <div class="upload-container">
       <div class="img-box">
-        <img
-          src="~@/assets/upload-placeholder.svg"
-          alt=""
-          v-if="!imageUrl"
-        />
+        <img src="~@/assets/upload-placeholder.svg" alt="" v-if="!imageUrl" />
         <img v-else :src="imageUrl" alt="设备图片" />
       </div>
       <div class="file-list">
@@ -139,11 +360,11 @@
         :span="1"
       >
         <template slot="label"> {{ item.key }} </template>
-        <div>{{item.value}}</div>
+        <div>{{ item.value }}</div>
       </el-descriptions-item>
     </el-descriptions>
 
-<!--    <DetailsDialog
+    <!--    <DetailsDialog
       ref="detailsDialogRef"
     /> -->
   </div>
@@ -154,125 +375,213 @@
   import { getFile } from '@/api/system/file/index.js';
   import { getAssetInfo } from '@/api/ledgerAssets';
   import { getDetails } from '@/api/classifyManage/itemInformation';
-export default {
-  props: {
-    rowId:{
-      type:String ,
-      default:''
+  import { getDetailInfo } from '@/api/material/list';
+  import { getUserPage } from '@/api/system/organization';
+  import { sysDict } from '@/utils/sys';
+  import linkMsg from '../../equipment/components/link-msg.vue';
+  export default {
+    props: {
+      rowId: {
+        type: String,
+        default: ''
+      }
     },
-  },
-  // components: { DetailsDialog },
-  data () {
-    return {
-      fileList: [
-        { t_name: '使用说明书' },
-        { t_name: '生产许可证书' },
-        { t_name: '防爆合格证书' },
-        { t_name: '检验报告' },
-        { t_name: '检验周期说明' },
-        { t_name: '图纸资料' },
-        { t_name: '产品合格证' }
-      ],
-      info:{
-        baseInfo:{},
-        extInfoSelf:[],
-        extraInfo:{}
-      },
-      // 设备图片
-      imageUrl: '',
-      sourceType:null
-    }
-  },
-  created () {
-     this.getDetilInfo()
-  },
-  methods:{
-     async getDetilInfo(){
-       const data = await getAssetInfo(this.rowId)
-       if (data){
-         this.info = data;
-         this.$set(this.info, 'baseInfo', data.category.category)
-         this.$set(this.info, 'extraInfo', data.category.categoryMold)
-          this.sourceType = data.positionList[0].type
+    components: { linkMsg },
+    data() {
+      return {
+        categoryMold: {},
+        cgInfo: {},
+        categoryQms: {},
+        categoryAps: {},
+        categoryMes: {},
+        categoryWms: {},
+        dictType: {
+          1: '是',
+          0: '否'
+        },
+        dictPd: {
+          1: '逐个盘点',
+          2: '批量盘点'
+        },
+        categoryObj: {},
+        fileList: [
+          { t_name: '使用说明书' },
+          { t_name: '生产许可证书' },
+          { t_name: '防爆合格证书' },
+          { t_name: '检验报告' },
+          { t_name: '检验周期说明' },
+          { t_name: '图纸资料' },
+          { t_name: '产品合格证' }
+        ],
+        info: {
+          baseInfo: {},
+          extInfoSelf: [],
+          extraInfo: {}
+        },
+        // 设备图片
+        imageUrl: '',
+        sourceType: null,
+        depList: [],
+        depInfo: {}
+      };
+    },
+    created() {
+      this.getDetilInfo();
+    },
+    methods: {
+      async getDetilInfo() {
+        const data = await getAssetInfo(this.rowId);
+        if (data) {
+          this.info = data;
+          this.$set(this.info, 'baseInfo', data.category.category);
+          this.$set(this.info, 'extraInfo', data.category.categoryMold);
+          this.sourceType = data.positionList[0].type;
           // 设备图片
-          if(typeof data.imageUrl !='string' ){
-             this.imageUrl  = getImageUrl(data.imageUrl.storePath)
+          if (typeof data.imageUrl != 'string') {
+            this.imageUrl = getImageUrl(data.imageUrl.storePath);
           }
           if (data.attUrl && data.attUrl.length > 0) {
             // 文档信息
             data.attUrl.forEach((item, index) => {
-              Object.assign(this.fileList[item.sort - 1], item)
-            })
+              Object.assign(this.fileList[item.sort - 1], item);
+            });
           }
-       }
-     },
+          this.searchMoudol(data.category.category.id);
+        }
+      },
+      async searchMoudol(id) {
+        const res = await getDetailInfo(id);
+        console.log(res);
 
-     // 打开详情弹窗
-     jumpDetails(){
-       if(!this.info.warehouseDetail){
-         return
-       }
-        this.$refs.detailsDialogRef.init(this.info.warehouseDetail,this.sourceType)
-     },
+        await this.searchDeptNodeClick(res.category.deptLeaderId);
+        for (const key in this.depList) {
+          if (this.depList[key].id == res.category.deptId) {
+            this.depInfo = this.depList[key];
+            break;
+          }
+        }
+        for (const key in this.depList) {
+          if (this.depList[key].id == res.categoryQms.checkPerson) {
+            console.log('++', this.depList[key]);
+            this.cgInfo = this.depList[key];
+            break;
+          }
+        }
+        this.categoryObj = {
+          ...res.category,
+          // deptId:
+          fileName: res.category.remarkAttach
+            .map((item) => item.name)
+            .join(', ')
+        };
+        this.categoryWms = {
+          ...res.categoryWms,
+          warrantyPeriodUnit: await sysDict(
+            '保质期单位',
+            res.categoryWms.warrantyPeriodUnit
+          ),
+          warrantyWarnRefer: await sysDict(
+            '质保预警参考',
+            res.categoryWms.warrantyWarnRefer
+          )
+        };
+        this.categoryMes = {
+          ...res.categoryMes,
+          apsType: await sysDict('排程类型', res.categoryMes.apsType)
+        };
+        this.categoryAps = {
+          ...res.categoryAps,
+          orderIntervalUnit: await sysDict(
+            '提前期单位',
+            res.categoryAps.orderIntervalUnit
+          ),
+          unit: await sysDict('提前期单位', res.categoryAps.unit)
+        };
+        this.categoryQms = {
+          ...res.categoryQms,
+          checkFormula: await sysDict('检验方案', res.categoryQms.checkFormula)
+        };
+        this.categoryMold = { ...res.categoryMold };
+      },
+      // 选择所属部门
+      async searchDeptNodeClick(id, ids) {
+        // 根据部门获取人员
+        const res = await getUserPage({
+          pageNum: 1,
+          size: -1,
+          executeGroupId: id
+        });
+        this.depList = res.list;
+      },
 
-     openfile(row) {
-       if (row.accessUrl) {
-         fileSystemDownload(row)
-       }
-     }
+      // 打开详情弹窗
+      jumpDetails() {
+        if (!this.info.warehouseDetail) {
+          return;
+        }
+        this.$refs.detailsDialogRef.init(
+          this.info.warehouseDetail,
+          this.sourceType
+        );
+      },
 
-  }
-}
+      openfile(row) {
+        if (row.accessUrl) {
+          fileSystemDownload(row);
+        }
+      }
+    }
+  };
 </script>
 
 <style lang="scss" scoped>
-.baseinfo-container {
-  background-color: #fff;
-  padding: 0px 20px 20px;
-  .content {
-    padding: 0 20px;
-  }
-  .basic-details-title{
-    font-size: 16px;
-    margin: 15px 0;
-  }
-  .upload-container {
-    display: flex;
-    .img-box {
-      width: 280px;
-      height: 342px;
-      border: 1px solid rgba(215, 215, 215, 1);
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      img {
-        max-width: 100%;
-      }
+  .baseinfo-container {
+    background-color: #fff;
+    padding: 0px 20px 20px;
+    .content {
+      padding: 0 20px;
     }
-    .file-list {
-      margin-left: 50px;
-      flex: 1;
+    .basic-details-title {
+      font-size: 16px;
+      margin: 15px 0;
+    }
+    .upload-container {
       display: flex;
-      justify-content: space-between;
-      flex-wrap: wrap;
-      justify-items: baseline;
-      align-content: flex-start;
-      .file-box {
-        width: 30%;
-        margin-bottom: 20px;
-        height: 57px;
-        text-align: center;
-        line-height: 55px;
-        border: 1px solid #1890ff;
-        color: #1890ff;
-        cursor: pointer;
-        &.disabled {
-          cursor: not-allowed;
-          border-color: rgba(215, 215, 215, 1);
-          color: rgba(215, 215, 215, 1);
+      .img-box {
+        width: 280px;
+        height: 342px;
+        border: 1px solid rgba(215, 215, 215, 1);
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        img {
+          max-width: 100%;
+        }
+      }
+      .file-list {
+        margin-left: 50px;
+        flex: 1;
+        display: flex;
+        justify-content: space-between;
+        flex-wrap: wrap;
+        justify-items: baseline;
+        align-content: flex-start;
+        .file-box {
+          width: 30%;
+          margin-bottom: 20px;
+          height: 57px;
+          text-align: center;
+          line-height: 55px;
+          border: 1px solid #1890ff;
+          color: #1890ff;
+          cursor: pointer;
+          &.disabled {
+            cursor: not-allowed;
+            border-color: rgba(215, 215, 215, 1);
+            color: rgba(215, 215, 215, 1);
+          }
         }
       }
     }
   }
-}
 </style>