huang_an пре 2 година
родитељ
комит
a84a77089f

+ 9 - 7
src/api/classifyManage/itemInformation.js

@@ -1,14 +1,16 @@
 import request from '@/utils/request';
 // 物品信息列表
-export async function getList (data) {
-  const res = await request.post('/main/category/getList', data);
+export async function getList(data) {
+  const res = await request.get(
+    `/main/category/getList?searchKey=${data.searchKey}&pageNum=${data.pageNum}&size=${data.size}`
+  );
   if (res.data.code == 0) {
     return res.data.data;
   }
   return Promise.reject(new Error(res.data.message));
 }
 // 物品信息保存
-export async function informationAdd (data) {
+export async function informationAdd(data) {
   const res = await request.post('/main/category/add', data);
   if (res.data.code == 0) {
     return res.data.data;
@@ -17,7 +19,7 @@ export async function informationAdd (data) {
 }
 
 // 物品信息编辑
-export async function informationEdit (data) {
+export async function informationEdit(data) {
   const res = await request.post('/main/category/edit', data);
   if (res.data.code == 0) {
     return res.data.data;
@@ -26,7 +28,7 @@ export async function informationEdit (data) {
 }
 
 // 物品信息详情
-export async function getDetails (id) {
+export async function getDetails(id) {
   const res = await request.get(`/main/category/info/${id}`);
   if (res.data.code == 0) {
     return res.data.data;
@@ -35,7 +37,7 @@ export async function getDetails (id) {
 }
 
 // 物品信息删除
-export async function removeItem (id) {
+export async function removeItem(id) {
   const res = await request.get(`/main/category/remove/${id}`, {});
   if (res.data.code == 0) {
     return res.data.data;
@@ -44,7 +46,7 @@ export async function removeItem (id) {
 }
 
 // 物品信息获取编码
-export async function getOrderNo (prefix) {
+export async function getOrderNo(prefix) {
   const res = await request.get(`/main/category/createOrderNo/${prefix}`, {});
   if (res.data.code == 0) {
     return res.data.data;

+ 13 - 13
src/components/upload/fileUpload.vue

@@ -101,7 +101,7 @@
         default: 10
       }
     },
-    data () {
+    data() {
       return {
         documentVisible: false,
         selectItem: null,
@@ -147,7 +147,7 @@
     },
     computed: {
       fileList: {
-        set (val) {
+        set(val) {
           // console.log(val);
           this.$emit(
             'input',
@@ -157,7 +157,7 @@
             }))
           );
         },
-        get () {
+        get() {
           // console.log(this.value, 2);
           const arr =
             (this.value &&
@@ -172,33 +172,33 @@
     },
 
     methods: {
-      delFileList () {
+      delFileList() {
         this.$emit('input', []);
       },
-      handleOpenLib () {
+      handleOpenLib() {
         this.documentVisible = true;
         this.$nextTick(() => {
-          this.reload();
+          // this.reload();
         });
       },
       //图文档勾选
-      submitDocument () {
+      submitDocument() {
         this.$emit('input', [
           { url: this.selectItem.storePath, ...this.selectItem }
         ]);
         this.documentVisible = false;
       },
-      datasource ({ page, limit }) {
+      datasource({ page, limit }) {
         return getFileList({
           ...this.documentForm,
           pageNum: page,
           size: limit
         });
       },
-      reload () {
+      reload() {
         this.$refs.table.reload();
       },
-      beforeRemove (file) {
+      beforeRemove(file) {
         if (file.id) {
           return removeFile({
             fileId: file.id
@@ -209,10 +209,10 @@
           return true;
         }
       },
-      handleRemove (file, fileList) {
+      handleRemove(file, fileList) {
         this.fileList = fileList;
       },
-      beforeUpload (file) {
+      beforeUpload(file) {
         if (file.size / 1024 / 1024 > this.size) {
           this.$message.error(`大小不能超过 ${this.size}MB`);
           return false;
@@ -235,7 +235,7 @@
           return res.data;
         });
       },
-      handlRequest () {
+      handlRequest() {
         return Promise.resolve();
       }
     }

+ 40 - 26
src/views/ledgerAssets/boat/components/baseInfo.vue

@@ -24,12 +24,12 @@
         <template slot="label"> 分类 </template>
         {{ information.categoryLevelPath }}
       </el-descriptions-item>
-      <el-descriptions-item>
+      <!-- <el-descriptions-item>
         <template slot="label"> 长/宽/高(mm) </template>
        {{ information.extendField.palletLen }}/{{
           information.extendField.wilde
         }}/{{ information.extendField.hight }}
-      </el-descriptions-item>
+      </el-descriptions-item> -->
       <el-descriptions-item>
         <template slot="label"> 计量单位</template>
         {{ information.measuringUnit }}
@@ -58,7 +58,9 @@
         >
         </el-tab-pane>
         <el-tab-pane
-          :label="`消耗(${countInfo.consumeCount ? countInfo.consumeCount : '0'})`"
+          :label="`消耗(${
+            countInfo.consumeCount ? countInfo.consumeCount : '0'
+          })`"
           name="hasConsume"
         >
         </el-tab-pane>
@@ -115,7 +117,7 @@
 </template>
 
 <script>
-  import { getPageSingle , getCount } from '@/api/ledgerAssets';
+  import { getPageSingle, getCount } from '@/api/ledgerAssets';
   import { getDetails } from '@/api/classifyManage/itemInformation.js';
   export default {
     props: {
@@ -124,7 +126,7 @@
         default: ''
       }
     },
-    data () {
+    data() {
       return {
         information: {
           extendField: {}
@@ -143,25 +145,21 @@
         countInfo: {}
       };
     },
-    created () {
+    created() {
       this.getDetilInfo();
       this.handleList();
-      this.getCountNum()
+      this.getCountNum();
     },
     methods: {
-      getDetilInfo () {
+      getDetilInfo() {
         getDetails(this.rowId).then((res) => {
           this.information = res.category;
-          if ( typeof res.categoryPallet != 'string') {
-             this.$set(
-               this.information,
-               'extendField',
-                res.categoryPallet
-             );
+          if (typeof res.categoryPallet != 'string') {
+            this.$set(this.information, 'extendField', res.categoryPallet);
           }
         });
       },
-      tabClick (val) {
+      tabClick(val) {
         switch (this.activeName) {
           case 'inUse': {
             this.searchForm.positionType = 1;
@@ -181,17 +179,17 @@
         this.handleList();
       },
 
-      handleCurrent (page) {
+      handleCurrent(page) {
         this.pagination.pageNum = page;
         this.handleList();
       },
-      handleSize (size) {
+      handleSize(size) {
         this.pagination.pageNum = 1;
         this.pagination.size = size;
         this.handleList();
       },
 
-      handleList () {
+      handleList() {
         const params = {
           ...this.searchForm,
           ...this.pagination
@@ -202,15 +200,31 @@
         });
       },
 
-      getCountNum () {
-        const params = {
-          categoryId:  this.rowId
+      async getCountNum() {
+        let arr = [1, 2, 3];
+        let newArr = [];
+        for (const key in arr) {
+          let obj = await getPageSingle({
+            ...this.searchForm,
+            ...this.pagination,
+            positionType: arr[key]
+          });
+          newArr.push({ count: obj.count });
+        }
+        this.countInfo = {
+          useCount: newArr[0].count,
+          libraryCount: newArr[1].count,
+          consumeCount: newArr[2].count
         };
-        getCount(params).then((res) => {
-          if (res) {
-            this.countInfo = res;
-          }
-        });
+        // const params = {
+        //   categoryId: this.rowId
+        // };
+        // getCount(params).then((res) => {
+        //   if (res) {
+        //     console.log('=======', res);
+        //     this.countInfo = res;
+        //   }
+        // });
       }
     },
 

+ 37 - 35
src/views/ledgerAssets/boat/components/boat-list.vue

@@ -1,10 +1,6 @@
 <template>
   <div>
-    <boat-search 
-      @search="reload"
-      ref="searchRef"
-    >
-    </boat-search>
+    <boat-search @search="reload" ref="searchRef"> </boat-search>
     <!-- 数据表格 -->
     <ele-pro-table
       ref="table"
@@ -39,7 +35,7 @@
 
 <script>
   import BoatSearch from './boat-search.vue';
-  import { getBoatList , downloadCategory } from '@/api/ledgerAssets';
+  import { getBoatList, downloadCategory } from '@/api/ledgerAssets';
   // import { downloadAction } from '@/api/flowable/manage';
   import dictMixins from '@/mixins/dictMixins';
   export default {
@@ -48,7 +44,7 @@
     props: {
       // 类别id
       categoryId: [Number, String],
-      rootId: [Number, String],
+      rootId: [Number, String]
     },
     data() {
       return {
@@ -68,7 +64,7 @@
             label: '类别编码',
             showOverflowTooltip: true,
             minWidth: 110,
-            slot: 'code',
+            slot: 'code'
           },
           {
             prop: 'name',
@@ -88,24 +84,30 @@
             showOverflowTooltip: true,
             minWidth: 110
           },
-          {
-            prop: 'angle',
-            label: '角度',
-            showOverflowTooltip: true,
-            minWidth: 110,
-            formatter: (row) => {
-              return this.getDictValue('角度', row.detail.angle);
-            }
-          },
-          {
-            prop: 'width',
-            label: '长*宽*高',
-            showOverflowTooltip: true,
-            minWidth: 200,
-            formatter: (row) => {
-              return row.detail.palletLen + ' * ' + row.detail.wilde + ' * ' + row.detail.hight
-            }
-          },
+          // {
+          //   prop: 'angle',
+          //   label: '角度',
+          //   showOverflowTooltip: true,
+          //   minWidth: 110,
+          //   formatter: (row) => {
+          //     return this.getDictValue('角度', row.detail.angle);
+          //   }
+          // },
+          // {
+          //   prop: 'width',
+          //   label: '长*宽*高',
+          //   showOverflowTooltip: true,
+          //   minWidth: 200,
+          //   formatter: (row) => {
+          //     return (
+          //       row.detail.palletLen +
+          //       ' * ' +
+          //       row.detail.wilde +
+          //       ' * ' +
+          //       row.detail.hight
+          //     );
+          //   }
+          // },
           {
             prop: 'categoryLevelPath',
             label: '分类',
@@ -135,12 +137,12 @@
             label: '总数量',
             showOverflowTooltip: true,
             minWidth: 110
-          },
+          }
         ]
       };
     },
-    created () {
-       this.requestDict('角度');
+    created() {
+      this.requestDict('角度');
     },
     methods: {
       /* 表格数据源 */
@@ -160,25 +162,25 @@
       },
 
       // 跳转到详情页
-      details ({ id }) {
+      details({ id }) {
         this.$router.push({
           path: '/ledgerAssets/boat/detail',
           query: {
             id
           }
-        })
+        });
       },
 
       // 导出
       btnExport() {
         let params = {
           ...this.$refs.searchRef.where,
-          exportType:1,
+          exportType: 1,
           categoryLevelId: this.categoryId,
-          rootCategoryLevelId:this.rootId
-        }
+          rootCategoryLevelId: this.rootId
+        };
         downloadCategory(params, '舟皿台账导出数据');
-      },
+      }
     },
     watch: {
       // 监听类别id变化

+ 12 - 6
src/views/ledgerAssets/boat/components/boat-search.vue

@@ -17,14 +17,18 @@
           <el-input clearable v-model="where.name" placeholder="请输入" />
         </el-form-item>
       </el-col>
-     <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="型号:">
           <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="规格:">
-          <el-input clearable v-model="where.space" placeholder="请输入" />
+          <el-input
+            clearable
+            v-model="where.specification"
+            placeholder="请输入"
+          />
         </el-form-item>
       </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
@@ -38,11 +42,13 @@
           >
             查询
           </el-button>
-          <el-button @click="reset"
+          <el-button
+            @click="reset"
             icon="el-icon-refresh-left"
             size="small"
             type="primary"
-          >重置</el-button>
+            >重置</el-button
+          >
         </el-form-item>
       </el-col>
     </el-row>
@@ -58,8 +64,8 @@
         name: '',
         code: '',
         // angle:'',
-        module:'',
-        space:''
+        module: '',
+        specification: ''
       };
       return {
         // 表单数据

+ 18 - 21
src/views/ledgerAssets/equipment/components/DialogGoods.vue

@@ -65,10 +65,7 @@
               </el-row>
             </template>
             <template v-slot:action="{ row }">
-              <el-radio
-                class="radio"
-                v-model="radio"
-                :label="row.id"
+              <el-radio class="radio" v-model="radio" :label="row.id"
                 ><i></i
               ></el-radio>
             </template>
@@ -108,7 +105,7 @@
     components: {
       AssetTree
     },
-    data () {
+    data() {
       return {
         visibleSync: false,
         title: '选择物品编码',
@@ -117,12 +114,12 @@
           categoryLevelId: ''
         },
         current: {},
-        radio:null
+        radio: null
       };
     },
     computed: {
       // 表格列配置
-      columns () {
+      columns() {
         return [
           {
             columnKey: 'index',
@@ -162,32 +159,32 @@
           {
             prop: 'categoryLevelPath',
             label: '分类',
-            showOverflowTooltip: true,
+            showOverflowTooltip: true
           },
           {
             columnKey: 'action',
             slot: 'action',
             align: 'center',
             fixed: 'right',
-            width:50
+            width: 50
           }
         ];
       }
     },
-    created () {
+    created() {
       this.requestDict('类型用途');
     },
     methods: {
       /* 表格数据源 */
-      datasource ({ page, limit, where }) {
+      datasource({ page, limit, where }) {
         return getList({
           ...where,
           pageNum: page,
           size: limit
         });
       },
-      reload () {
-        this.radio = null
+      reload() {
+        this.radio = null;
         this.$nextTick(() => {
           this.$refs.table.reload({
             pageNum: 1,
@@ -197,25 +194,25 @@
           });
         });
       },
-      open () {
+      open() {
         this.visibleSync = true;
       },
-      close () {
+      close() {
         this.visibleSync = false;
       },
-      rest () {
+      rest() {
         this.searchForm.searchKey = '';
         this.reload();
       },
-      handleNodeClick (info) {
+      handleNodeClick(info) {
         this.searchForm.categoryLevelId = info.id;
         this.reload();
       },
-      chooseRow(row){
-          this.current = row
-          this.radio = row.id
+      chooseRow(row) {
+        this.current = row;
+        this.radio = row.id;
       },
-      submit () {
+      submit() {
         if (!this.current) {
           return this.$message.error('请选择物品编码');
         }

+ 15 - 15
src/views/ledgerAssets/equipment/components/equipment-list.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <equipment-search @search="reload" ref="search"/>
+    <equipment-search @search="reload" ref="search" />
     <!-- 数据表格 -->
     <ele-pro-table
       ref="table"
@@ -55,7 +55,7 @@
 
 <script>
   import EquipmentSearch from './equipment-search.vue';
-  import { getAssetList , downloadAsset } from '@/api/ledgerAssets';
+  import { getAssetList, downloadAsset } from '@/api/ledgerAssets';
   import dictMixins from '@/mixins/dictMixins';
 
   export default {
@@ -66,7 +66,7 @@
       categoryId: [Number, String],
       rootId: [Number, String]
     },
-    data () {
+    data() {
       return {
         // 表格列配置
         columns: [
@@ -118,7 +118,7 @@
             minWidth: 110
           },
           {
-            prop: 'location',
+            prop: 'detailLocation',
             label: '位置',
             showOverflowTooltip: true,
             minWidth: 110
@@ -146,12 +146,12 @@
         ]
       };
     },
-    created () {
+    created() {
       this.requestDict('网络状态');
     },
     methods: {
       /* 表格数据源 */
-      datasource ({ page, limit, where, order }) {
+      datasource({ page, limit, where, order }) {
         return getAssetList({
           ...where,
           ...order,
@@ -162,12 +162,12 @@
         });
       },
       /* 刷新表格 */
-      reload (where) {
+      reload(where) {
         this.$refs.table.reload({ pageNum: 1, where: where });
       },
 
       // 跳转到详情页
-      handleView ({ id }) {
+      handleView({ id }) {
         this.$router.push({
           path: '/ledgerAssets/equipment/detail',
           query: {
@@ -176,7 +176,7 @@
         });
       },
       // 跳转到编辑
-      handEdit ({ id }) {
+      handEdit({ id }) {
         this.$router.push({
           path: '/ledgerAssets/equipment/edit',
           query: {
@@ -185,25 +185,25 @@
         });
       },
       // 跳转到详情页
-      add () {
+      add() {
         this.$router.push({
           path: '/ledgerAssets/equipment/edit'
         });
       },
 
-      exportFile(){
+      exportFile() {
         let params = {
           ...this.$refs.search.where,
-          exportType:1,
+          exportType: 1,
           categoryLevelId: this.categoryId,
-          rootCategoryLevelId:this.rootId
-        }
+          rootCategoryLevelId: this.rootId
+        };
         downloadAsset(params, '设备台账导出数据');
       }
     },
     watch: {
       // 监听类别id变化
-      categoryId () {
+      categoryId() {
         this.reload();
       }
     }

+ 31 - 38
src/views/ledgerAssets/mould/components/mould-list.vue

@@ -1,10 +1,6 @@
 <template>
   <div>
-    <mould-search 
-      ref="searchRef"
-      @search="reload"
-      :isConsumer="isConsumer"
-    >
+    <mould-search ref="searchRef" @search="reload" :isConsumer="isConsumer">
     </mould-search>
     <!-- 数据表格 -->
     <ele-pro-table
@@ -18,16 +14,16 @@
     >
       <!-- 表头工具栏 -->
       <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>
+        <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>
 
       <!-- 编码列 -->
@@ -54,6 +50,7 @@
           {{ row.category.categoryLevelPath }}
         </div>
       </template>
+
       <!-- 操作列 -->
       <template v-slot:action="{ row }">
         <el-link
@@ -71,10 +68,7 @@
 
 <script>
   import MouldSearch from './mould-search.vue';
-  import {
-    getAssetList,
-    downloadAsset
-  } from '@/api/ledgerAssets';
+  import { getAssetList, downloadAsset } from '@/api/ledgerAssets';
   import dictMixins from '@/mixins/dictMixins';
   export default {
     components: { MouldSearch },
@@ -82,7 +76,7 @@
     props: {
       // 类别id
       categoryId: [Number, String],
-      rootId: [Number, String],
+      rootId: [Number, String]
     },
     data() {
       return {
@@ -129,14 +123,14 @@
             label: '牌号',
             showOverflowTooltip: true,
             minWidth: 110,
-            slot:'brandNum'
+            slot: 'brandNum'
           },
           {
             prop: 'modelType',
             label: '型号',
             showOverflowTooltip: true,
             minWidth: 110,
-            slot:'modelType'
+            slot: 'modelType'
           },
           {
             prop: 'categoryLevelPath',
@@ -157,7 +151,7 @@
             showOverflowTooltip: true,
             minWidth: 110,
             formatter: (_row, _column, cellValue) => {
-              return this.getDictValue('生命周期',  _row.position[0].type)
+              return this.getDictValue('生命周期', _row.position[0].type);
             }
           },
           {
@@ -171,10 +165,10 @@
             fixed: 'right'
           }
         ],
-        isConsumer:false
+        isConsumer: false
       };
     },
-    created () {
+    created() {
       this.requestDict('生命周期');
     },
     methods: {
@@ -195,35 +189,34 @@
       },
 
       // 跳转到详情页
-      details ({ id }) {
+      details({ id }) {
         this.$router.push({
           path: '/ledgerAssets/mould/detail',
           query: {
             id
           }
-        })
+        });
       },
       // 跳转到编辑页
-      goEdit ({ id }) {
+      goEdit({ id }) {
         this.$router.push({
           path: '/ledgerAssets/mould/edit',
           query: {
             id
           }
-        })
+        });
       },
-      
+
       // 导出
       btnExport() {
         let params = {
           ...this.$refs.searchRef.where,
-          exportType:3,
+          exportType: 3,
           categoryLevelId: this.categoryId,
-          rootCategoryLevelId:this.rootId
-        }
+          rootCategoryLevelId: this.rootId
+        };
         downloadAsset(params, '模具台账导出数据');
-      },
-
+      }
     },
     watch: {
       // 监听类别id变化
@@ -234,7 +227,7 @@
   };
 </script>
 <style lang="scss" scoped>
-   .ele-btn-icon{
-     margin-left: 20px;
-   }
+  .ele-btn-icon {
+    margin-left: 20px;
+  }
 </style>

+ 40 - 39
src/views/ledgerAssets/mould/components/mould-search.vue

@@ -20,14 +20,14 @@
           <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"
+          <ele-tree-select
+            clearable
+            :data="treeData"
+            v-model="where.ownershipGroupId"
+            placeholder="请选择"
+            default-expand-all
+            labelKey="name"
+            valueKey="id"
           />
         </el-form-item>
       </el-col>
@@ -45,17 +45,19 @@
           >
             查询
           </el-button>
-           <el-button @click="reset"
-             icon="el-icon-refresh-left"
-             size="small"
-             type="primary"
-           >重置</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-form-item label="牌号:" label-width="50px">
+          <el-input clearable v-model="where.brand" placeholder="请输入" />
+        </el-form-item>
       </el-col>
     </el-row>
   </el-form>
@@ -63,34 +65,32 @@
 
 <script>
   import { login } from '@/api/login';
-  import {
-    listOrganizations
-  } from '@/api/system/organization';
+  import { listOrganizations } from '@/api/system/organization';
   export default {
     props: {
-      isConsumer: Boolean,
+      isConsumer: Boolean
     },
     data() {
       // 默认表单数据
       const defaultWhere = {
         name: '',
         code: '',
-        fixCode:'',
-        module:'',
-        brandNum:'',
-        ownershipGroupId:''
+        fixCode: '',
+        module: '',
+        brand: '',
+        ownershipGroupId: ''
       };
       return {
         // 表单数据
         where: { ...defaultWhere },
-        treeData:[]
+        treeData: []
       };
     },
-    watch:{
-       isConsumer() {
-         this.where.isConsumer = this.isConsumer
-         this.search()
-       }
+    watch: {
+      isConsumer() {
+        this.where.isConsumer = this.isConsumer;
+        this.search();
+      }
     },
     computed: {
       // 是否开启响应式布局
@@ -98,17 +98,21 @@
         return this.$store.state.theme.styleResponsive;
       }
     },
-    created(){
-       this.query()
+    created() {
+      this.query();
     },
     methods: {
       /* 搜索 */
       search() {
-        this.$emit('search', this.where);
+        const obj = {
+          ...this.where,
+          ownershipGroupId: this.where.ownershipGroupId || ''
+        };
+        this.$emit('search', obj);
       },
       /*  重置 */
       reset() {
-        this.where = { ...this.defaultWhere  , isConsumer:this.isConsumer };
+        this.where = { ...this.defaultWhere, isConsumer: this.isConsumer };
         this.search();
       },
 
@@ -121,11 +125,8 @@
               parentIdField: 'parentId'
             });
           })
-          .catch((e) => {
-          });
-      },
-
-
+          .catch((e) => {});
+      }
     }
   };
 </script>

+ 406 - 377
src/views/ledgerAssets/mould/edit.vue

@@ -1,247 +1,273 @@
 <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>
+    <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.procurementTime }}
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"> 过保日期 </template>
+                {{ info.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>
+            <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 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 { 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:[]
-      },
+  export default {
+    components: {
+      WithView,
+      fileUpload,
+      imgUpload
+    },
+    data() {
+      return {
+        formData: {},
+        info: {
+          baseInfo: {},
+          extraInfo: {}
+        },
+        customRule: {},
+        itemForm: {
+          addList: []
+        },
         // 图片
         imageUrl: null,
         // 文档信息
@@ -275,97 +301,96 @@ export default {
             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) => {
-        });
+        treeData: [],
+        btnLoading: false
+      };
     },
-
-    setImgs(type, sort, info) {
-      if (info[0]) {
-        this.attUrl[type] = info[0];
-        this.attUrl[type].sort = sort;
-      } else {
-        this.attUrl[type] = null;
-      }
+    created() {
+      let id = this.$route.query.id;
+      this.getDetilInfo(id);
+      this.query();
     },
-    // 处理文档信息
-    setWd() {
-      let attUrl = [];
-      Object.entries(this.attUrl).forEach(([key, value], index) => {
-        if (value) {
-          attUrl.push(value);
+    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 {
-          attUrl.push({ sort: index + 1 });
+          this.attUrl[type] = null;
         }
-      });
-      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]]) || [];
-           });
-         }
+      },
+      // 处理文档信息
+      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|| {};
-      }
-    },
+          // 设备图片
+          this.imageUrl = data.imageUrl || {};
+        }
+      },
 
-    // 选择图片回调
-    cbUploadImg(data) {
-      if (data.length > 0) {
-        this.imageUrl = data[0];
-      } else {
-        this.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条')
-      }
-    },
+      // 删除自定义参数
+      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 () {
+      toSave() {
         let extendField = this.itemForm.addList;
         let params = {
           id: this.info.id,
@@ -373,89 +398,93 @@ export default {
           fixCode: this.info.fixCode,
           extInfoSelf: extendField,
           ownershipGroupId: this.info.ownershipGroupId,
-          rootCategoryLevelId:this.info.rootCategoryLevelId,
-          categoryId:this.info.categoryId,
+          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],
+          position:
+            typeof this.info.positionList == 'string'
+              ? {}
+              : this.info.positionList[0],
           // 文档信息
           attUrl: this.setWd() || [],
           // // 设备图片
-          imageUrl: this.imageUrl || {},
+          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;
-            });
+            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
-      }));
-    },
-  }
-}
+      // 处理文档信息
+      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;
+  .equipment-container {
+    background-color: #fff;
+    padding: 20px;
+    .content {
+      padding: 0 20px;
     }
-  }
-  .upload-container {
-    display: flex;
-    .file-list {
-      margin-left: 50px;
-      flex: 1;
+    .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;
+    .row-form {
+      width: 100%;
+      .add-col {
+        display: flex;
+        align-items: center;
+        margin-left: 20px;
+        .col-input {
+          margin-right: 5px;
+        }
       }
     }
+    .qsbm .el-select {
+      width: 100%;
+    }
   }
-  .qsbm .el-select{
-    width:100%
-  }
-}
 </style>

+ 3 - 3
src/views/ledgerAssets/mould/index.vue

@@ -37,7 +37,7 @@
       AssetTree,
       MouldList
     },
-    data () {
+    data() {
       return {
         // 加载状态
         loading: false,
@@ -49,11 +49,11 @@
     },
     computed: {},
     methods: {
-      handleNodeClick (info) {
+      handleNodeClick(info) {
         this.current = info;
       },
       // 获取根节点id
-      setRootId (id) {
+      setRootId(id) {
         this.rootId = id;
       }
     }

+ 45 - 39
src/views/ledgerAssets/turnoverCar/components/turnovercar-search.vue

@@ -20,14 +20,14 @@
           <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"
+          <ele-tree-select
+            clearable
+            :data="treeData"
+            v-model="where.ownershipGroupId"
+            placeholder="请选择"
+            default-expand-all
+            labelKey="name"
+            valueKey="id"
           />
         </el-form-item>
       </el-col>
@@ -36,7 +36,11 @@
           <el-input clearable v-model="where.fixCode" placeholder="请输入" />
         </el-form-item>
         <el-form-item label="生命周期:">
-          <DictSelection dictName="生命周期" clearable v-model="where.positionType">
+          <DictSelection
+            dictName="生命周期"
+            clearable
+            v-model="where.positionType"
+          >
           </DictSelection>
         </el-form-item>
       </el-col>
@@ -54,11 +58,13 @@
           >
             查询
           </el-button>
-           <el-button @click="reset"
-             icon="el-icon-refresh-left"
-             size="small"
-             type="primary"
-           >重置</el-button>
+          <el-button
+            @click="reset"
+            icon="el-icon-refresh-left"
+            size="small"
+            type="primary"
+            >重置</el-button
+          >
         </div>
       </el-col>
     </el-row>
@@ -67,26 +73,24 @@
 
 <script>
   import { login } from '@/api/login';
-  import {
-    listOrganizations
-  } from '@/api/system/organization';
+  import { listOrganizations } from '@/api/system/organization';
   export default {
     props: {
-      isConsumer: Boolean,
+      isConsumer: Boolean
     },
     data() {
       // 默认表单数据
       const defaultWhere = {
         name: '',
         code: '',
-        fixCode:'',
-        ownershipGroupId:'',
-        positionType:''
+        fixCode: '',
+        ownershipGroupId: '',
+        positionType: ''
       };
       return {
         // 表单数据
         where: { ...defaultWhere },
-        treeData:[]
+        treeData: []
       };
     },
     computed: {
@@ -95,27 +99,32 @@
         return this.$store.state.theme.styleResponsive;
       }
     },
-    watch:{
-       isConsumer() {
-         this.where.isConsumer = this.isConsumer
-         this.search()
-       }
+    watch: {
+      isConsumer() {
+        this.where.isConsumer = this.isConsumer;
+        this.search();
+      }
     },
-    created(){
-       this.query()
+    created() {
+      this.query();
     },
     methods: {
       /* 搜索 */
       search() {
-        this.$emit('search', this.where);
+        this.$emit('search', {
+          ...this.where,
+          ownershipGroupId:
+            this.where.ownershipGroupId != null
+              ? this.where.ownershipGroupId
+              : ''
+        });
       },
       /*  重置 */
       reset() {
-        this.where = { ...this.defaultWhere , isConsumer:this.isConsumer};
+        this.where = { ...this.defaultWhere, isConsumer: this.isConsumer };
         this.search();
       },
 
-
       query() {
         listOrganizations()
           .then((list) => {
@@ -125,15 +134,12 @@
               parentIdField: 'parentId'
             });
           })
-          .catch((e) => {
-          });
+          .catch((e) => {});
       },
-      
-      getForm(){
-         return this.where
-      }
-
 
+      getForm() {
+        return this.where;
+      }
     }
   };
 </script>

+ 5 - 5
vue.config.js

@@ -3,7 +3,7 @@ const { transformElementScss } = require('ele-admin/lib/utils/dynamic-theme');
 const path = require('path');
 const { name } = require('./package.json');
 
-function resolve (dir) {
+function resolve(dir) {
   return path.join(__dirname, dir);
 }
 
@@ -32,9 +32,9 @@ module.exports = {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
         // target: 'http://192.168.3.51:18086', // 测试环境
-        // target: 'http://124.71.68.31:50001',
-        target: 'http://192.168.1.139:18086', // 粟
-
+        target: 'http://124.71.68.31:50001',
+        // target: 'http://192.168.1.139:18086', // 粟
+        // target: 'http://192.168.1.132:18086', // 许
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''
@@ -42,7 +42,7 @@ module.exports = {
       }
     }
   },
-  chainWebpack (config) {
+  chainWebpack(config) {
     config.plugins.delete('prefetch');
     // set svg-sprite-loader
     // config.module.rule('svg').exclude.add(resolve('./src/icons')).end();