ysy 2 tahun lalu
induk
melakukan
4ee506f873

+ 278 - 0
src/views/ledgerAssets/meter/components/baseInfo.vue

@@ -0,0 +1,278 @@
+<template>
+  <div class="baseinfo-container">
+    <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.code }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 名称 </template>
+        {{ info.name }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 牌号</template>
+        {{ info.baseInfo.brandNum }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 型号 </template>
+        {{ info.baseInfo.modelType }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 大模体型号 </template>
+        {{info.extraInfo.dieBodyModel}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 芯杆数量 </template>
+       {{info.extraInfo.mandrelNum}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 模孔数量</template>
+        {{info.extraInfo.dieHoleNum}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 收缩系数</template>
+        {{info.extraInfo.shrinkageCoefficient}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 下冲头数量 </template>
+        {{info.extraInfo.lowerPunchNum}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 上冲头数量 </template>
+        {{info.extraInfo.upperPunchNum}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 最大冲压次数</template>
+        {{info.extraInfo.maximumStampingTimes}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label" :span="2"> 分类 </template>
+        {{info.baseInfo.categoryLevelPath}}
+      </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-item>
+        <template slot="label"> 计量单位</template>
+        {{info.baseInfo.measuringUnit}}
+      </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.fixCode}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 出库时间</template>
+        <!-- {{info.warehouseDetail.createTime}} -->
+      </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>
+      <el-descriptions-item>
+        <template slot="label"> 所属工序</template>
+        {{info.processName}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 权属部门 </template>
+        {{info.ownershipDeptName}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 品牌 </template>
+        {{info.brand}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 供应商</template>
+        {{info.supplierName}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 供应商电话 </template>
+        {{info.supplierMobile}}
+      </el-descriptions-item>
+
+    </el-descriptions>
+    <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 v-else :src="imageUrl" alt="设备图片" />
+      </div>
+      <div class="file-list">
+        <div
+          :class="{ disabled: !item.storePath }"
+          @click="openfile(item)"
+          v-for="(item, index) in fileList"
+          :key="index"
+          class="file-box"
+        >
+          {{ item.t_name }}
+        </div>
+      </div>
+    </div>
+
+    <div class="basic-details-title border-none">
+      <span class="border-span">扩展信息</span>
+    </div>
+    <el-descriptions title="" :column="4" size="medium" border>
+      <el-descriptions-item
+        v-for="(item, index) in info.extInfoSelf"
+        :key="index"
+        :span="1"
+      >
+        <template slot="label"> {{ item.key }} </template>
+        <div>{{item.value}}</div>
+      </el-descriptions-item>
+    </el-descriptions>
+
+<!--    <DetailsDialog
+      ref="detailsDialogRef"
+    /> -->
+  </div>
+</template>
+
+<script>
+  import { getImageUrl } from '@/utils/file.js';
+  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:''
+    },
+  },
+  // 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
+          // 设备图片
+          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)
+            })
+          }
+       }
+     },
+
+     // 打开详情弹窗
+     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%;
+      }
+    }
+    .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>

+ 240 - 0
src/views/ledgerAssets/meter/components/data-list.vue

@@ -0,0 +1,240 @@
+<template>
+  <div>
+    <user-search 
+      ref="searchRef"
+      @search="reload"
+      :isConsumer="isConsumer"
+    >
+    </user-search>
+    <!-- 数据表格 -->
+    <ele-pro-table
+      ref="table"
+      :columns="columns"
+      :datasource="datasource"
+      height="calc(100vh - 265px)"
+      full-height="calc(100vh - 116px)"
+      tool-class="ele-toolbar-form"
+      cache-key="systemOrgUserTable"
+    >
+      <!-- 表头工具栏 -->
+      <template v-slot:toolbar>
+          <el-checkbox v-model="isConsumer">显示已消耗</el-checkbox>
+          <el-button
+           size="small"
+           type="primary"
+           icon="el-icon-download"
+           class="ele-btn-icon"
+           @click="btnExport"
+         >
+           导出
+         </el-button>
+      </template>
+
+      <!-- 编码列 -->
+      <template v-slot:code="{ row }">
+        <el-link type="primary" :underline="false" @click="details(row)">
+          {{ row.code }}
+        </el-link>
+      </template>
+      <!-- 牌号列 -->
+      <template v-slot:brandNum="{ row }">
+        <div>
+          {{ row.category.brandNum }}
+        </div>
+      </template>
+      <!-- 型号列 -->
+      <template v-slot:modelType="{ row }">
+        <div>
+          {{ row.category.modelType }}
+        </div>
+      </template>
+      <!-- 分类列 -->
+      <template v-slot:categoryLevelPath="{ row }">
+        <div>
+          {{ row.category.categoryLevelPath }}
+        </div>
+      </template>
+      <!-- 操作列 -->
+      <template v-slot:action="{ row }">
+        <el-link
+          type="primary"
+          :underline="false"
+          icon="el-icon-edit"
+          @click="goEdit(row)"
+        >
+          编辑
+        </el-link>
+      </template>
+    </ele-pro-table>
+  </div>
+</template>
+
+<script>
+  import UserSearch from './user-search.vue';
+  import {
+    getAssetList,
+    downloadAsset
+  } from '@/api/ledgerAssets';
+  import dictMixins from '@/mixins/dictMixins';
+  export default {
+    components: { UserSearch },
+    mixins: [dictMixins],
+    props: {
+      // 类别id
+      categoryId: [Number, String],
+      rootId: [Number, String],
+    },
+    data() {
+      return {
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            columnKey: 'index',
+            type: 'index',
+            label: '序号',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'code',
+            label: '编码',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            slot: 'code',
+            fixed: 'left'
+          },
+          {
+            prop: 'name',
+            label: '名称',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'fixCode',
+            label: '固资编码',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'brandNum',
+            label: '牌号',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            slot:'brandNum'
+          },
+          {
+            prop: 'modelType',
+            label: '型号',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            slot:'modelType'
+          },
+          {
+            prop: 'categoryLevelPath',
+            label: '分类',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            slot: 'categoryLevelPath'
+          },
+          {
+            prop: 'ownershipGroupName',
+            label: '所在部门',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'totalSum',
+            label: '生命周期',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (_row, _column, cellValue) => {
+              return this.getDictValue('生命周期',  _row.position[0].type)
+            }
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 100,
+            align: 'left',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true,
+            fixed: 'right'
+          }
+        ],
+        isConsumer:false
+      };
+    },
+    created () {
+      this.requestDict('生命周期');
+    },
+    methods: {
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        return getAssetList({
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit,
+          categoryLevelId: this.categoryId,
+          rootCategoryLevelId: this.rootId
+        });
+      },
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ pageNum: 1, where: where });
+      },
+
+      // 跳转到详情页
+      details ({ id }) {
+        this.$router.push({
+          path: '/ledgerAssets/mould/detail',
+          query: {
+            id
+          }
+        })
+      },
+      // 跳转到编辑页
+      goEdit ({ id }) {
+        this.$router.push({
+          path: '/ledgerAssets/mould/edit',
+          query: {
+            id
+          }
+        })
+      },
+      
+      // 导出
+      btnExport() {
+        let params = {
+          ...this.$refs.searchRef.where,
+          exportType:3,
+          categoryLevelId: this.categoryId,
+          rootCategoryLevelId:this.rootId
+        }
+        downloadAsset(params, '模具台账导出数据');
+      },
+
+    },
+    watch: {
+      // 监听类别id变化
+      categoryId() {
+        this.reload();
+      }
+    }
+  };
+</script>
+<style lang="scss" scoped>
+   .ele-btn-icon{
+     margin-left: 20px;
+   }
+</style>

+ 131 - 0
src/views/ledgerAssets/meter/components/user-search.vue

@@ -0,0 +1,131 @@
+<!-- 搜索表单 -->
+<template>
+  <el-form
+    label-width="77px"
+    class="ele-form-search"
+    @keyup.enter.native="search"
+    @submit.native.prevent
+  >
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="编码:" label-width="50px">
+          <el-input clearable v-model="where.code" placeholder="请输入" />
+        </el-form-item>
+        <el-form-item label="型号:" label-width="50px">
+          <el-input clearable v-model="where.module" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="名称:" label-width="50px">
+          <el-input clearable v-model="where.name" placeholder="请输入" />
+        </el-form-item>
+        <el-form-item label="所在部门:">
+           <ele-tree-select
+              clearable
+              :data="treeData"
+              v-model="where.ownershipGroupId"
+              placeholder="请选择"
+              default-expand-all
+              labelKey="name"
+              valueKey="id"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="固定资产编码:" label-width="100px">
+          <el-input clearable v-model="where.fixCode" placeholder="请输入" />
+        </el-form-item>
+        <div class="ele-form-actions">
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            class="ele-btn-icon"
+            @click="search"
+            size="small"
+          >
+            查询
+          </el-button>
+           <el-button @click="reset"
+             icon="el-icon-refresh-left"
+             size="small"
+             type="primary"
+           >重置</el-button>
+        </div>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+         <el-form-item label="牌号:" label-width="50px">
+           <el-input clearable v-model="where.brandNum" placeholder="请输入" />
+         </el-form-item>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+  import { login } from '@/api/login';
+  import {
+    listOrganizations
+  } from '@/api/system/organization';
+  export default {
+    props: {
+      isConsumer: Boolean,
+    },
+    data() {
+      // 默认表单数据
+      const defaultWhere = {
+        name: '',
+        code: '',
+        fixCode:'',
+        module:'',
+        brandNum:'',
+        ownershipGroupId:''
+      };
+      return {
+        // 表单数据
+        where: { ...defaultWhere },
+        treeData:[]
+      };
+    },
+    watch:{
+       isConsumer() {
+         this.where.isConsumer = this.isConsumer
+         this.search()
+       }
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
+    },
+    created(){
+       this.query()
+    },
+    methods: {
+      /* 搜索 */
+      search() {
+        this.$emit('search', this.where);
+      },
+      /*  重置 */
+      reset() {
+        this.where = { ...this.defaultWhere  , isConsumer:this.isConsumer };
+        this.search();
+      },
+
+      query() {
+        listOrganizations()
+          .then((list) => {
+            this.treeData = this.$util.toTreeData({
+              data: list,
+              idField: 'id',
+              parentIdField: 'parentId'
+            });
+          })
+          .catch((e) => {
+          });
+      },
+
+
+    }
+  };
+</script>

+ 48 - 0
src/views/ledgerAssets/meter/detail.vue

@@ -0,0 +1,48 @@
+<template>
+  <div class="ele-body">
+    <!-- tab切换 -->
+    <el-card :body-style="{ padding: 0 }">
+       <div class="page-title">
+         <el-page-header @back="$router.go(-1)">
+           <div slot="content" class="pageContent">
+             <div>模具信息详情</div>
+           </div>
+         </el-page-header>
+       </div>
+       <div class="content-wrapper">
+         <component :is="activeComp" :rowId="rowId"></component>
+       </div>
+    </el-card>
+  </div>
+</template>
+
+<script>
+import baseInfo from './components/baseInfo.vue'
+export default {
+  components: {
+    baseInfo,
+  },
+  data () {
+    return {
+      activeComp: 'baseInfo',
+      tabOptions: [
+        { key: 'baseInfo', name: '基本信息' }
+      ],
+      rowId:null
+    }
+  },
+
+  created () {
+     this.rowId = this.$route.query.id
+  },
+
+}
+</script>
+
+<style lang="scss" scoped>
+   .page-title{
+     background: #fff;
+     padding:26px 10px 15px;
+     border-bottom:1px solid #eaeefb;
+   }
+</style>

+ 461 - 0
src/views/ledgerAssets/meter/edit.vue

@@ -0,0 +1,461 @@
+<template>
+  <div class="ele-body">
+     <el-card :body-style="{ padding: 0 }">
+         <div class="page-container equipment-container">
+           <div class="page-title basic-details-title">
+             <el-page-header @back="$router.go(-1)">
+               <div slot="content" class="pageContent">
+                 <div>编辑模具信息</div>
+               </div>
+             </el-page-header>
+             <div>
+               <el-button size="small" @click="$router.go(-1)">取消</el-button>
+               <el-button
+                 size="small"
+                 type="primary"
+                  @click="toSave"
+                 v-loading="btnLoading"
+                 >确定</el-button
+               >
+             </div>
+           </div>
+           <div class="content">
+             <el-form label-width="100px">
+               <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.code}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 模具名称 </template>
+                   {{info.name}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 牌号 </template>
+                   {{info.baseInfo.brandNum}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 型号 </template>
+                   {{info.baseInfo.modelType}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 大模体型号 </template>
+                   {{info.extraInfo.maxMoldType}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 芯杆数量 </template>
+                   {{info.extraInfo.coreBarNum}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 模孔数量 </template>
+                   {{info.extraInfo.dieHoleNum}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 收缩系数 </template>
+                   {{info.extraInfo.shrinkEffictive}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 下冲头数量 </template>
+                   {{info.extraInfo.downPunchNum}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 上冲头数量 </template>
+                   {{info.extraInfo.upperPunchNum}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 最大冲压次数 </template>
+                   {{info.extraInfo.maxCyTimes}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 计量单位 </template>
+                   {{info.baseInfo.measuringUnit}}
+                 </el-descriptions-item>
+                 <el-descriptions-item :span="2">
+                   <template slot="label"> 分类 </template>
+                   {{info.baseInfo.categoryLevelPath}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 采购日期 </template>
+                   <!-- {{info.category.procurementTime}} -->
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 过保日期 </template>
+                   <!-- {{info.category.expirationTime}} -->
+                 </el-descriptions-item>
+               </el-descriptions>
+
+               <div class="basic-details-title border-none">
+                 <span class="border-span">资产信息</span>
+               </div>
+               <el-row>
+                 <el-col :md="8" :xs="8" :sm="8">
+                   <el-form-item label="固资编码">
+                     <el-input size="small" v-model="info.fixCode"></el-input>
+                   </el-form-item>
+                 </el-col>
+                 <el-col :md="8" :xs="8" :sm="8">
+                   <el-form-item label="权属部门" prop="ownershipGroupId" class="qsbm">
+                      <ele-tree-select
+                          clearable
+                          :data="treeData"
+                          v-model="info.ownershipGroupId"
+                          placeholder="请选择"
+                          default-expand-all
+                          labelKey="name"
+                          valueKey="id"
+                      />
+                   </el-form-item>
+                 </el-col>
+               </el-row>
+
+
+               <div class="basic-details-title border-none">
+                 <span class="border-span">文档信息</span>
+               </div>
+                 <div class="basic-details-title border-none">
+                   <span class="border-span">文档信息</span>
+                 </div>
+                 <div class="upload-container">
+                   <WithView v-model="imageUrl" :limit="1" :assetName="`模具`"/>
+                   <div class="file-list">
+                     <div>
+                       <el-form-item prop="image" label="使用说明书">
+                         <fileUpload
+                           v-model="attUrl.operatingManual.value"
+                           module="main"
+                           :showLib="true"
+                         />
+                       </el-form-item>
+                     </div>
+                     <div>
+                       <el-form-item prop="image" label="生产许可证书">
+                         <fileUpload
+                           v-model="attUrl.productionLicence.value"
+                           module="main"
+                           :showLib="true"
+                         />
+                       </el-form-item>
+                     </div>
+                     <div>
+                       <el-form-item prop="image" label="防爆合格证书">
+                         <fileUpload
+                           v-model="attUrl.explosionProofCertificate.value"
+                           module="main"
+                           :showLib="true"
+                         />
+                       </el-form-item>
+                     </div>
+                     <div>
+                       <el-form-item prop="image" label="检验报告">
+                         <fileUpload
+                           v-model="attUrl.surveyReport.value"
+                           module="main"
+                           :showLib="true"
+                         />
+                       </el-form-item>
+                     </div>
+                     <div>
+                       <el-form-item prop="image" label="检验周期说明">
+                         <fileUpload
+                           v-model="attUrl.inspectionCycleManual.value"
+                           module="main"
+                           :showLib="true"
+                         />
+                       </el-form-item>
+                     </div>
+                     <div>
+                       <el-form-item prop="image" label="图纸资料">
+                         <fileUpload
+                           v-model="attUrl.informationDrawing.value"
+                           module="main"
+                           :showLib="true"
+                         />
+                       </el-form-item>
+                     </div>
+                     <div>
+                       <el-form-item prop="image" label="产品合格证">
+                         <fileUpload
+                           v-model="attUrl.productCertificate.value"
+                           module="main"
+                           :showLib="true"
+                         />
+                       </el-form-item>
+                     </div>
+                   </div>
+                 </div>
+             </el-form>
+               <div class="basic-details-title border-none">
+                 <span class="border-span">扩展信息</span>
+               </div>
+               <el-row>
+                  <el-form :model="itemForm" :rules="customRule" ref="formCustom" class="row-form">
+                       <el-col :span="8" v-for="(item,index) in itemForm.addList" :key="index">
+                            <el-form-item
+                               :prop="'addList.' + index + '.key'"
+                               :rules="{
+                                  required: true, message: '自定义参数名称不能为空', trigger: 'blur'
+                              }"
+                            >
+                              <div  class="add-col">
+                                  <el-input class="col-input" v-model="item.key" placeholder="参数名称"></el-input>
+                                  <el-input class="col-input" v-model="item.value" placeholder="参数值"></el-input>
+                                  <el-button type="text" @click="delt(item,index)"> 删除 </el-button>
+                              </div>
+                            </el-form-item>
+                       </el-col>
+                       <el-col :span="8" v-if="itemForm.addList.length<10">
+                           <el-form-item label-width="20px">
+                                <el-button type="primary" @click="addItem">增加自定义参数</el-button>
+                           </el-form-item>
+                       </el-col>
+                  </el-form>
+               </el-row>
+             </div>
+         </div>
+     </el-card>
+  </div>
+</template>
+
+<script>
+  import { getAssetInfo , saveOrEdit } from '@/api/ledgerAssets';
+  import { listOrganizations } from '@/api/system/organization';
+  import fileUpload from '@/components/upload/fileUpload';
+  import WithView from '@/components/upload/WithView';
+  import imgUpload from '@/components/upload/imgUpload';
+export default {
+  components: {
+    WithView,
+    fileUpload,
+    imgUpload,
+  },
+  data () {
+    return {
+      formData: {},
+      info:{
+        baseInfo:{},
+        extraInfo:{}
+      },
+      customRule:{},
+      itemForm:{
+        addList:[]
+      },
+        // 图片
+        imageUrl: null,
+        // 文档信息
+        attUrl: {
+          operatingManual: {
+            value: [],
+            sort: 1
+          },
+          productionLicence: {
+            value: [],
+            sort: 2
+          },
+          explosionProofCertificate: {
+            value: [],
+            sort: 3
+          },
+          surveyReport: {
+            value: [],
+            sort: 4
+          },
+          inspectionCycleManual: {
+            value: [],
+            sort: 5
+          },
+          informationDrawing: {
+            value: [],
+            sort: 6
+          },
+          productCertificate: {
+            value: [],
+            sort: 7
+          }
+        },
+      treeData:[],
+      btnLoading:false
+    }
+  },
+  created(){
+    let id = this.$route.query.id;
+    this.getDetilInfo(id);
+    this.query();
+  },
+  methods: {
+    // 树形结构数据
+    query() {
+      listOrganizations()
+        .then((list) => {
+          this.treeData = this.$util.toTreeData({
+            data: list,
+            idField: 'id',
+            parentIdField: 'parentId'
+          });
+        })
+        .catch((e) => {
+        });
+    },
+
+    setImgs(type, sort, info) {
+      if (info[0]) {
+        this.attUrl[type] = info[0];
+        this.attUrl[type].sort = sort;
+      } else {
+        this.attUrl[type] = null;
+      }
+    },
+    // 处理文档信息
+    setWd() {
+      let attUrl = [];
+      Object.entries(this.attUrl).forEach(([key, value], index) => {
+        if (value) {
+          attUrl.push(value);
+        } else {
+          attUrl.push({ sort: index + 1 });
+        }
+      });
+      return attUrl;
+    },
+    async getDetilInfo(id){
+      const data = await getAssetInfo(id)
+      if (data){
+         this.info = data
+         this.$set(this.info, 'baseInfo', data.category.category)
+         this.$set(this.info, 'extraInfo', data.category.categoryMold)
+         this.itemForm.addList =  this.info.extInfoSelf
+          ?  this.info.extInfoSelf
+          : [];
+         if (data.attUrl && data.attUrl.length > 0) {
+           // 文档信息
+           Object.keys(this.attUrl).forEach((n, index) => {
+             this.attUrl[n].value =
+               (data.attUrl[index]?.storePath && [data.attUrl[index]]) || [];
+           });
+         }
+
+         // 设备图片
+         this.imageUrl = data.imageUrl|| {};
+      }
+    },
+
+    // 选择图片回调
+    cbUploadImg(data) {
+      if (data.length > 0) {
+        this.imageUrl = data[0];
+      } else {
+        this.imageUrl = "";
+      }
+    },
+
+    // 删除自定义参数
+    delt(item,index){
+        this.itemForm.addList.splice(index,1)
+    },
+    // 添加自定义参数
+    addItem(){
+      if(this.itemForm.addList.length<10){
+        let item = {key:'',value:''}
+         this.itemForm.addList.push(item)
+      }else{
+        this.$message.warning('自定义参数最多添加10条')
+      }
+    },
+
+      // 点击确定保存
+      toSave () {
+        let extendField = this.itemForm.addList;
+        let params = {
+          id: this.info.id,
+          code: this.info.code,
+          fixCode: this.info.fixCode,
+          extInfoSelf: extendField,
+          ownershipGroupId: this.info.ownershipGroupId,
+          rootCategoryLevelId:this.info.rootCategoryLevelId,
+          categoryId:this.info.categoryId,
+          // positionIds: JSON.parse(this.info.category.categoryLevelPathId).join(','),
+          position: typeof this.info.positionList == 'string'?{}:this.info.positionList[0],
+          // 文档信息
+          attUrl: this.setWd() || [],
+          // // 设备图片
+          imageUrl: this.imageUrl || {},
+        };
+        this.btnLoading = true;
+        this.$refs['formCustom'].validate((valid) => {
+          if (valid) {
+            saveOrEdit(params).then((res) => {
+              if (res) {
+                this.$message.success('模具编辑成功');
+                this.$router.go(-1);
+              }
+            })
+            .finally(() => {
+              this.btnLoading = false;
+            });
+          } else {
+            return false;
+          }
+        });
+      },
+    // 处理文档信息
+    setWd () {
+      return Object.values(this.attUrl).map((item) => ({
+        ...(item.value[0] || {}),
+        sort: item.sort
+      }));
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.equipment-container {
+  background-color: #fff;
+  padding: 20px;
+  .content {
+    padding: 0 20px;
+  }
+  .page-title{
+    width:100%;
+    padding-bottom: 10px;
+    border-bottom:1px solid #ccc;
+  }
+  .basic-details-title {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    margin: 15px 0px;
+    font-size: 16px;
+  }
+  .label-none {
+    .el-form-item__content {
+      margin-left: 0 !important;
+    }
+  }
+  .upload-container {
+    display: flex;
+    .file-list {
+      margin-left: 50px;
+      flex: 1;
+    }
+  }
+
+  .row-form{
+    width:100%;
+    .add-col{
+      display:flex;
+      align-items:center;
+      margin-left: 20px;
+      .col-input{
+        margin-right:5px;
+      }
+    }
+  }
+  .qsbm .el-select{
+    width:100%
+  }
+}
+</style>

+ 77 - 0
src/views/ledgerAssets/meter/index.vue

@@ -0,0 +1,77 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never" v-loading="loading">
+      <ele-split-layout
+        width="266px"
+        allow-collapse
+        :right-style="{ overflow: 'hidden' }"
+      >
+        <div>
+          <div class="ele-border-lighter sys-organization-list">
+            <AssetTree
+              @handleNodeClick="handleNodeClick"
+              @setRootId="setRootId"
+              id="1738160749383847938"
+              ref="treeList"
+            />
+          </div>
+        </div>
+        <template v-slot:content>
+          <data-list
+            v-if="current"
+            :category-id="current.id"
+            :root-id="rootId"
+          />
+        </template>
+      </ele-split-layout>
+    </el-card>
+  </div>
+</template>
+
+<script>
+  import AssetTree from '@/components/AssetTree';
+  import DataList from './components/data-list.vue';
+
+  export default {
+    components: {
+      AssetTree,
+      DataList
+    },
+    data () {
+      return {
+        // 加载状态
+        loading: false,
+        // 表格选中数据
+        selection: [],
+        current: null,
+        rootId: null
+      };
+    },
+    computed: {},
+    methods: {
+      handleNodeClick (info) {
+        this.current = info;
+      },
+      // 获取根节点id
+      setRootId (id) {
+        this.rootId = id;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .sys-organization-list {
+    height: calc(100vh - 264px);
+    box-sizing: border-box;
+    border-width: 1px;
+    border-style: solid;
+    overflow: auto;
+  }
+  .sys-organization-list :deep(.el-tree-node__content) {
+    height: 40px;
+    & > .el-tree-node__expand-icon {
+      margin-left: 10px;
+    }
+  }
+</style>

+ 278 - 0
src/views/ledgerAssets/office/components/baseInfo.vue

@@ -0,0 +1,278 @@
+<template>
+  <div class="baseinfo-container">
+    <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.code }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 名称 </template>
+        {{ info.name }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 牌号</template>
+        {{ info.baseInfo.brandNum }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 型号 </template>
+        {{ info.baseInfo.modelType }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 大模体型号 </template>
+        {{info.extraInfo.dieBodyModel}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 芯杆数量 </template>
+       {{info.extraInfo.mandrelNum}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 模孔数量</template>
+        {{info.extraInfo.dieHoleNum}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 收缩系数</template>
+        {{info.extraInfo.shrinkageCoefficient}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 下冲头数量 </template>
+        {{info.extraInfo.lowerPunchNum}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 上冲头数量 </template>
+        {{info.extraInfo.upperPunchNum}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 最大冲压次数</template>
+        {{info.extraInfo.maximumStampingTimes}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label" :span="2"> 分类 </template>
+        {{info.baseInfo.categoryLevelPath}}
+      </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-item>
+        <template slot="label"> 计量单位</template>
+        {{info.baseInfo.measuringUnit}}
+      </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.fixCode}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 出库时间</template>
+        <!-- {{info.warehouseDetail.createTime}} -->
+      </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>
+      <el-descriptions-item>
+        <template slot="label"> 所属工序</template>
+        {{info.processName}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 权属部门 </template>
+        {{info.ownershipDeptName}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 品牌 </template>
+        {{info.brand}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 供应商</template>
+        {{info.supplierName}}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label"> 供应商电话 </template>
+        {{info.supplierMobile}}
+      </el-descriptions-item>
+
+    </el-descriptions>
+    <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 v-else :src="imageUrl" alt="设备图片" />
+      </div>
+      <div class="file-list">
+        <div
+          :class="{ disabled: !item.storePath }"
+          @click="openfile(item)"
+          v-for="(item, index) in fileList"
+          :key="index"
+          class="file-box"
+        >
+          {{ item.t_name }}
+        </div>
+      </div>
+    </div>
+
+    <div class="basic-details-title border-none">
+      <span class="border-span">扩展信息</span>
+    </div>
+    <el-descriptions title="" :column="4" size="medium" border>
+      <el-descriptions-item
+        v-for="(item, index) in info.extInfoSelf"
+        :key="index"
+        :span="1"
+      >
+        <template slot="label"> {{ item.key }} </template>
+        <div>{{item.value}}</div>
+      </el-descriptions-item>
+    </el-descriptions>
+
+<!--    <DetailsDialog
+      ref="detailsDialogRef"
+    /> -->
+  </div>
+</template>
+
+<script>
+  import { getImageUrl } from '@/utils/file.js';
+  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:''
+    },
+  },
+  // 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
+          // 设备图片
+          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)
+            })
+          }
+       }
+     },
+
+     // 打开详情弹窗
+     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%;
+      }
+    }
+    .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>

+ 240 - 0
src/views/ledgerAssets/office/components/data-list.vue

@@ -0,0 +1,240 @@
+<template>
+  <div>
+    <user-search 
+      ref="searchRef"
+      @search="reload"
+      :isConsumer="isConsumer"
+    >
+    </user-search>
+    <!-- 数据表格 -->
+    <ele-pro-table
+      ref="table"
+      :columns="columns"
+      :datasource="datasource"
+      height="calc(100vh - 265px)"
+      full-height="calc(100vh - 116px)"
+      tool-class="ele-toolbar-form"
+      cache-key="systemOrgUserTable"
+    >
+      <!-- 表头工具栏 -->
+      <template v-slot:toolbar>
+          <el-checkbox v-model="isConsumer">显示已消耗</el-checkbox>
+          <el-button
+           size="small"
+           type="primary"
+           icon="el-icon-download"
+           class="ele-btn-icon"
+           @click="btnExport"
+         >
+           导出
+         </el-button>
+      </template>
+
+      <!-- 编码列 -->
+      <template v-slot:code="{ row }">
+        <el-link type="primary" :underline="false" @click="details(row)">
+          {{ row.code }}
+        </el-link>
+      </template>
+      <!-- 牌号列 -->
+      <template v-slot:brandNum="{ row }">
+        <div>
+          {{ row.category.brandNum }}
+        </div>
+      </template>
+      <!-- 型号列 -->
+      <template v-slot:modelType="{ row }">
+        <div>
+          {{ row.category.modelType }}
+        </div>
+      </template>
+      <!-- 分类列 -->
+      <template v-slot:categoryLevelPath="{ row }">
+        <div>
+          {{ row.category.categoryLevelPath }}
+        </div>
+      </template>
+      <!-- 操作列 -->
+      <template v-slot:action="{ row }">
+        <el-link
+          type="primary"
+          :underline="false"
+          icon="el-icon-edit"
+          @click="goEdit(row)"
+        >
+          编辑
+        </el-link>
+      </template>
+    </ele-pro-table>
+  </div>
+</template>
+
+<script>
+  import UserSearch from './user-search.vue';
+  import {
+    getAssetList,
+    downloadAsset
+  } from '@/api/ledgerAssets';
+  import dictMixins from '@/mixins/dictMixins';
+  export default {
+    components: { UserSearch },
+    mixins: [dictMixins],
+    props: {
+      // 类别id
+      categoryId: [Number, String],
+      rootId: [Number, String],
+    },
+    data() {
+      return {
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            columnKey: 'index',
+            type: 'index',
+            label: '序号',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'code',
+            label: '编码',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            slot: 'code',
+            fixed: 'left'
+          },
+          {
+            prop: 'name',
+            label: '名称',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'fixCode',
+            label: '固资编码',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'brandNum',
+            label: '牌号',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            slot:'brandNum'
+          },
+          {
+            prop: 'modelType',
+            label: '型号',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            slot:'modelType'
+          },
+          {
+            prop: 'categoryLevelPath',
+            label: '分类',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            slot: 'categoryLevelPath'
+          },
+          {
+            prop: 'ownershipGroupName',
+            label: '所在部门',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'totalSum',
+            label: '生命周期',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            formatter: (_row, _column, cellValue) => {
+              return this.getDictValue('生命周期',  _row.position[0].type)
+            }
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 100,
+            align: 'left',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true,
+            fixed: 'right'
+          }
+        ],
+        isConsumer:false
+      };
+    },
+    created () {
+      this.requestDict('生命周期');
+    },
+    methods: {
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        return getAssetList({
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit,
+          categoryLevelId: this.categoryId,
+          rootCategoryLevelId: this.rootId
+        });
+      },
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ pageNum: 1, where: where });
+      },
+
+      // 跳转到详情页
+      details ({ id }) {
+        this.$router.push({
+          path: '/ledgerAssets/mould/detail',
+          query: {
+            id
+          }
+        })
+      },
+      // 跳转到编辑页
+      goEdit ({ id }) {
+        this.$router.push({
+          path: '/ledgerAssets/mould/edit',
+          query: {
+            id
+          }
+        })
+      },
+      
+      // 导出
+      btnExport() {
+        let params = {
+          ...this.$refs.searchRef.where,
+          exportType:3,
+          categoryLevelId: this.categoryId,
+          rootCategoryLevelId:this.rootId
+        }
+        downloadAsset(params, '模具台账导出数据');
+      },
+
+    },
+    watch: {
+      // 监听类别id变化
+      categoryId() {
+        this.reload();
+      }
+    }
+  };
+</script>
+<style lang="scss" scoped>
+   .ele-btn-icon{
+     margin-left: 20px;
+   }
+</style>

+ 131 - 0
src/views/ledgerAssets/office/components/user-search.vue

@@ -0,0 +1,131 @@
+<!-- 搜索表单 -->
+<template>
+  <el-form
+    label-width="77px"
+    class="ele-form-search"
+    @keyup.enter.native="search"
+    @submit.native.prevent
+  >
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="编码:" label-width="50px">
+          <el-input clearable v-model="where.code" placeholder="请输入" />
+        </el-form-item>
+        <el-form-item label="型号:" label-width="50px">
+          <el-input clearable v-model="where.module" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="名称:" label-width="50px">
+          <el-input clearable v-model="where.name" placeholder="请输入" />
+        </el-form-item>
+        <el-form-item label="所在部门:">
+           <ele-tree-select
+              clearable
+              :data="treeData"
+              v-model="where.ownershipGroupId"
+              placeholder="请选择"
+              default-expand-all
+              labelKey="name"
+              valueKey="id"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="固定资产编码:" label-width="100px">
+          <el-input clearable v-model="where.fixCode" placeholder="请输入" />
+        </el-form-item>
+        <div class="ele-form-actions">
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            class="ele-btn-icon"
+            @click="search"
+            size="small"
+          >
+            查询
+          </el-button>
+           <el-button @click="reset"
+             icon="el-icon-refresh-left"
+             size="small"
+             type="primary"
+           >重置</el-button>
+        </div>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+         <el-form-item label="牌号:" label-width="50px">
+           <el-input clearable v-model="where.brandNum" placeholder="请输入" />
+         </el-form-item>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+  import { login } from '@/api/login';
+  import {
+    listOrganizations
+  } from '@/api/system/organization';
+  export default {
+    props: {
+      isConsumer: Boolean,
+    },
+    data() {
+      // 默认表单数据
+      const defaultWhere = {
+        name: '',
+        code: '',
+        fixCode:'',
+        module:'',
+        brandNum:'',
+        ownershipGroupId:''
+      };
+      return {
+        // 表单数据
+        where: { ...defaultWhere },
+        treeData:[]
+      };
+    },
+    watch:{
+       isConsumer() {
+         this.where.isConsumer = this.isConsumer
+         this.search()
+       }
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
+    },
+    created(){
+       this.query()
+    },
+    methods: {
+      /* 搜索 */
+      search() {
+        this.$emit('search', this.where);
+      },
+      /*  重置 */
+      reset() {
+        this.where = { ...this.defaultWhere  , isConsumer:this.isConsumer };
+        this.search();
+      },
+
+      query() {
+        listOrganizations()
+          .then((list) => {
+            this.treeData = this.$util.toTreeData({
+              data: list,
+              idField: 'id',
+              parentIdField: 'parentId'
+            });
+          })
+          .catch((e) => {
+          });
+      },
+
+
+    }
+  };
+</script>

+ 48 - 0
src/views/ledgerAssets/office/detail.vue

@@ -0,0 +1,48 @@
+<template>
+  <div class="ele-body">
+    <!-- tab切换 -->
+    <el-card :body-style="{ padding: 0 }">
+       <div class="page-title">
+         <el-page-header @back="$router.go(-1)">
+           <div slot="content" class="pageContent">
+             <div>模具信息详情</div>
+           </div>
+         </el-page-header>
+       </div>
+       <div class="content-wrapper">
+         <component :is="activeComp" :rowId="rowId"></component>
+       </div>
+    </el-card>
+  </div>
+</template>
+
+<script>
+import baseInfo from './components/baseInfo.vue'
+export default {
+  components: {
+    baseInfo,
+  },
+  data () {
+    return {
+      activeComp: 'baseInfo',
+      tabOptions: [
+        { key: 'baseInfo', name: '基本信息' }
+      ],
+      rowId:null
+    }
+  },
+
+  created () {
+     this.rowId = this.$route.query.id
+  },
+
+}
+</script>
+
+<style lang="scss" scoped>
+   .page-title{
+     background: #fff;
+     padding:26px 10px 15px;
+     border-bottom:1px solid #eaeefb;
+   }
+</style>

+ 461 - 0
src/views/ledgerAssets/office/edit.vue

@@ -0,0 +1,461 @@
+<template>
+  <div class="ele-body">
+     <el-card :body-style="{ padding: 0 }">
+         <div class="page-container equipment-container">
+           <div class="page-title basic-details-title">
+             <el-page-header @back="$router.go(-1)">
+               <div slot="content" class="pageContent">
+                 <div>编辑模具信息</div>
+               </div>
+             </el-page-header>
+             <div>
+               <el-button size="small" @click="$router.go(-1)">取消</el-button>
+               <el-button
+                 size="small"
+                 type="primary"
+                  @click="toSave"
+                 v-loading="btnLoading"
+                 >确定</el-button
+               >
+             </div>
+           </div>
+           <div class="content">
+             <el-form label-width="100px">
+               <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.code}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 模具名称 </template>
+                   {{info.name}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 牌号 </template>
+                   {{info.baseInfo.brandNum}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 型号 </template>
+                   {{info.baseInfo.modelType}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 大模体型号 </template>
+                   {{info.extraInfo.maxMoldType}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 芯杆数量 </template>
+                   {{info.extraInfo.coreBarNum}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 模孔数量 </template>
+                   {{info.extraInfo.dieHoleNum}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 收缩系数 </template>
+                   {{info.extraInfo.shrinkEffictive}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 下冲头数量 </template>
+                   {{info.extraInfo.downPunchNum}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 上冲头数量 </template>
+                   {{info.extraInfo.upperPunchNum}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 最大冲压次数 </template>
+                   {{info.extraInfo.maxCyTimes}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 计量单位 </template>
+                   {{info.baseInfo.measuringUnit}}
+                 </el-descriptions-item>
+                 <el-descriptions-item :span="2">
+                   <template slot="label"> 分类 </template>
+                   {{info.baseInfo.categoryLevelPath}}
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 采购日期 </template>
+                   <!-- {{info.category.procurementTime}} -->
+                 </el-descriptions-item>
+                 <el-descriptions-item>
+                   <template slot="label"> 过保日期 </template>
+                   <!-- {{info.category.expirationTime}} -->
+                 </el-descriptions-item>
+               </el-descriptions>
+
+               <div class="basic-details-title border-none">
+                 <span class="border-span">资产信息</span>
+               </div>
+               <el-row>
+                 <el-col :md="8" :xs="8" :sm="8">
+                   <el-form-item label="固资编码">
+                     <el-input size="small" v-model="info.fixCode"></el-input>
+                   </el-form-item>
+                 </el-col>
+                 <el-col :md="8" :xs="8" :sm="8">
+                   <el-form-item label="权属部门" prop="ownershipGroupId" class="qsbm">
+                      <ele-tree-select
+                          clearable
+                          :data="treeData"
+                          v-model="info.ownershipGroupId"
+                          placeholder="请选择"
+                          default-expand-all
+                          labelKey="name"
+                          valueKey="id"
+                      />
+                   </el-form-item>
+                 </el-col>
+               </el-row>
+
+
+               <div class="basic-details-title border-none">
+                 <span class="border-span">文档信息</span>
+               </div>
+                 <div class="basic-details-title border-none">
+                   <span class="border-span">文档信息</span>
+                 </div>
+                 <div class="upload-container">
+                   <WithView v-model="imageUrl" :limit="1" :assetName="`模具`"/>
+                   <div class="file-list">
+                     <div>
+                       <el-form-item prop="image" label="使用说明书">
+                         <fileUpload
+                           v-model="attUrl.operatingManual.value"
+                           module="main"
+                           :showLib="true"
+                         />
+                       </el-form-item>
+                     </div>
+                     <div>
+                       <el-form-item prop="image" label="生产许可证书">
+                         <fileUpload
+                           v-model="attUrl.productionLicence.value"
+                           module="main"
+                           :showLib="true"
+                         />
+                       </el-form-item>
+                     </div>
+                     <div>
+                       <el-form-item prop="image" label="防爆合格证书">
+                         <fileUpload
+                           v-model="attUrl.explosionProofCertificate.value"
+                           module="main"
+                           :showLib="true"
+                         />
+                       </el-form-item>
+                     </div>
+                     <div>
+                       <el-form-item prop="image" label="检验报告">
+                         <fileUpload
+                           v-model="attUrl.surveyReport.value"
+                           module="main"
+                           :showLib="true"
+                         />
+                       </el-form-item>
+                     </div>
+                     <div>
+                       <el-form-item prop="image" label="检验周期说明">
+                         <fileUpload
+                           v-model="attUrl.inspectionCycleManual.value"
+                           module="main"
+                           :showLib="true"
+                         />
+                       </el-form-item>
+                     </div>
+                     <div>
+                       <el-form-item prop="image" label="图纸资料">
+                         <fileUpload
+                           v-model="attUrl.informationDrawing.value"
+                           module="main"
+                           :showLib="true"
+                         />
+                       </el-form-item>
+                     </div>
+                     <div>
+                       <el-form-item prop="image" label="产品合格证">
+                         <fileUpload
+                           v-model="attUrl.productCertificate.value"
+                           module="main"
+                           :showLib="true"
+                         />
+                       </el-form-item>
+                     </div>
+                   </div>
+                 </div>
+             </el-form>
+               <div class="basic-details-title border-none">
+                 <span class="border-span">扩展信息</span>
+               </div>
+               <el-row>
+                  <el-form :model="itemForm" :rules="customRule" ref="formCustom" class="row-form">
+                       <el-col :span="8" v-for="(item,index) in itemForm.addList" :key="index">
+                            <el-form-item
+                               :prop="'addList.' + index + '.key'"
+                               :rules="{
+                                  required: true, message: '自定义参数名称不能为空', trigger: 'blur'
+                              }"
+                            >
+                              <div  class="add-col">
+                                  <el-input class="col-input" v-model="item.key" placeholder="参数名称"></el-input>
+                                  <el-input class="col-input" v-model="item.value" placeholder="参数值"></el-input>
+                                  <el-button type="text" @click="delt(item,index)"> 删除 </el-button>
+                              </div>
+                            </el-form-item>
+                       </el-col>
+                       <el-col :span="8" v-if="itemForm.addList.length<10">
+                           <el-form-item label-width="20px">
+                                <el-button type="primary" @click="addItem">增加自定义参数</el-button>
+                           </el-form-item>
+                       </el-col>
+                  </el-form>
+               </el-row>
+             </div>
+         </div>
+     </el-card>
+  </div>
+</template>
+
+<script>
+  import { getAssetInfo , saveOrEdit } from '@/api/ledgerAssets';
+  import { listOrganizations } from '@/api/system/organization';
+  import fileUpload from '@/components/upload/fileUpload';
+  import WithView from '@/components/upload/WithView';
+  import imgUpload from '@/components/upload/imgUpload';
+export default {
+  components: {
+    WithView,
+    fileUpload,
+    imgUpload,
+  },
+  data () {
+    return {
+      formData: {},
+      info:{
+        baseInfo:{},
+        extraInfo:{}
+      },
+      customRule:{},
+      itemForm:{
+        addList:[]
+      },
+        // 图片
+        imageUrl: null,
+        // 文档信息
+        attUrl: {
+          operatingManual: {
+            value: [],
+            sort: 1
+          },
+          productionLicence: {
+            value: [],
+            sort: 2
+          },
+          explosionProofCertificate: {
+            value: [],
+            sort: 3
+          },
+          surveyReport: {
+            value: [],
+            sort: 4
+          },
+          inspectionCycleManual: {
+            value: [],
+            sort: 5
+          },
+          informationDrawing: {
+            value: [],
+            sort: 6
+          },
+          productCertificate: {
+            value: [],
+            sort: 7
+          }
+        },
+      treeData:[],
+      btnLoading:false
+    }
+  },
+  created(){
+    let id = this.$route.query.id;
+    this.getDetilInfo(id);
+    this.query();
+  },
+  methods: {
+    // 树形结构数据
+    query() {
+      listOrganizations()
+        .then((list) => {
+          this.treeData = this.$util.toTreeData({
+            data: list,
+            idField: 'id',
+            parentIdField: 'parentId'
+          });
+        })
+        .catch((e) => {
+        });
+    },
+
+    setImgs(type, sort, info) {
+      if (info[0]) {
+        this.attUrl[type] = info[0];
+        this.attUrl[type].sort = sort;
+      } else {
+        this.attUrl[type] = null;
+      }
+    },
+    // 处理文档信息
+    setWd() {
+      let attUrl = [];
+      Object.entries(this.attUrl).forEach(([key, value], index) => {
+        if (value) {
+          attUrl.push(value);
+        } else {
+          attUrl.push({ sort: index + 1 });
+        }
+      });
+      return attUrl;
+    },
+    async getDetilInfo(id){
+      const data = await getAssetInfo(id)
+      if (data){
+         this.info = data
+         this.$set(this.info, 'baseInfo', data.category.category)
+         this.$set(this.info, 'extraInfo', data.category.categoryMold)
+         this.itemForm.addList =  this.info.extInfoSelf
+          ?  this.info.extInfoSelf
+          : [];
+         if (data.attUrl && data.attUrl.length > 0) {
+           // 文档信息
+           Object.keys(this.attUrl).forEach((n, index) => {
+             this.attUrl[n].value =
+               (data.attUrl[index]?.storePath && [data.attUrl[index]]) || [];
+           });
+         }
+
+         // 设备图片
+         this.imageUrl = data.imageUrl|| {};
+      }
+    },
+
+    // 选择图片回调
+    cbUploadImg(data) {
+      if (data.length > 0) {
+        this.imageUrl = data[0];
+      } else {
+        this.imageUrl = "";
+      }
+    },
+
+    // 删除自定义参数
+    delt(item,index){
+        this.itemForm.addList.splice(index,1)
+    },
+    // 添加自定义参数
+    addItem(){
+      if(this.itemForm.addList.length<10){
+        let item = {key:'',value:''}
+         this.itemForm.addList.push(item)
+      }else{
+        this.$message.warning('自定义参数最多添加10条')
+      }
+    },
+
+      // 点击确定保存
+      toSave () {
+        let extendField = this.itemForm.addList;
+        let params = {
+          id: this.info.id,
+          code: this.info.code,
+          fixCode: this.info.fixCode,
+          extInfoSelf: extendField,
+          ownershipGroupId: this.info.ownershipGroupId,
+          rootCategoryLevelId:this.info.rootCategoryLevelId,
+          categoryId:this.info.categoryId,
+          // positionIds: JSON.parse(this.info.category.categoryLevelPathId).join(','),
+          position: typeof this.info.positionList == 'string'?{}:this.info.positionList[0],
+          // 文档信息
+          attUrl: this.setWd() || [],
+          // // 设备图片
+          imageUrl: this.imageUrl || {},
+        };
+        this.btnLoading = true;
+        this.$refs['formCustom'].validate((valid) => {
+          if (valid) {
+            saveOrEdit(params).then((res) => {
+              if (res) {
+                this.$message.success('模具编辑成功');
+                this.$router.go(-1);
+              }
+            })
+            .finally(() => {
+              this.btnLoading = false;
+            });
+          } else {
+            return false;
+          }
+        });
+      },
+    // 处理文档信息
+    setWd () {
+      return Object.values(this.attUrl).map((item) => ({
+        ...(item.value[0] || {}),
+        sort: item.sort
+      }));
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.equipment-container {
+  background-color: #fff;
+  padding: 20px;
+  .content {
+    padding: 0 20px;
+  }
+  .page-title{
+    width:100%;
+    padding-bottom: 10px;
+    border-bottom:1px solid #ccc;
+  }
+  .basic-details-title {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    margin: 15px 0px;
+    font-size: 16px;
+  }
+  .label-none {
+    .el-form-item__content {
+      margin-left: 0 !important;
+    }
+  }
+  .upload-container {
+    display: flex;
+    .file-list {
+      margin-left: 50px;
+      flex: 1;
+    }
+  }
+
+  .row-form{
+    width:100%;
+    .add-col{
+      display:flex;
+      align-items:center;
+      margin-left: 20px;
+      .col-input{
+        margin-right:5px;
+      }
+    }
+  }
+  .qsbm .el-select{
+    width:100%
+  }
+}
+</style>

+ 77 - 0
src/views/ledgerAssets/office/index.vue

@@ -0,0 +1,77 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never" v-loading="loading">
+      <ele-split-layout
+        width="266px"
+        allow-collapse
+        :right-style="{ overflow: 'hidden' }"
+      >
+        <div>
+          <div class="ele-border-lighter sys-organization-list">
+            <AssetTree
+              @handleNodeClick="handleNodeClick"
+              @setRootId="setRootId"
+              id="1738398598494519297"
+              ref="treeList"
+            />
+          </div>
+        </div>
+        <template v-slot:content>
+          <data-list
+            v-if="current"
+            :category-id="current.id"
+            :root-id="rootId"
+          />
+        </template>
+      </ele-split-layout>
+    </el-card>
+  </div>
+</template>
+
+<script>
+  import AssetTree from '@/components/AssetTree';
+  import DataList from './components/data-list.vue';
+
+  export default {
+    components: {
+      AssetTree,
+      DataList
+    },
+    data () {
+      return {
+        // 加载状态
+        loading: false,
+        // 表格选中数据
+        selection: [],
+        current: null,
+        rootId: null
+      };
+    },
+    computed: {},
+    methods: {
+      handleNodeClick (info) {
+        this.current = info;
+      },
+      // 获取根节点id
+      setRootId (id) {
+        this.rootId = id;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .sys-organization-list {
+    height: calc(100vh - 264px);
+    box-sizing: border-box;
+    border-width: 1px;
+    border-style: solid;
+    overflow: auto;
+  }
+  .sys-organization-list :deep(.el-tree-node__content) {
+    height: 40px;
+    & > .el-tree-node__expand-icon {
+      margin-left: 10px;
+    }
+  }
+</style>