|
|
@@ -10,7 +10,7 @@
|
|
|
</div>
|
|
|
<!-- 表格 -->
|
|
|
<template v-slot:content>
|
|
|
- <ele-pro-table ref="table" :columns="columns" :datasource="datasource" row-key="id" height="calc(100vh - 350px)"
|
|
|
+ <ele-pro-table ref="table" :columns="isLedger ? columns2 : columns" :datasource="datasource" row-key="id" height="calc(100vh - 350px)"
|
|
|
class="dict-table" @cell-click="cellClick">
|
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:action="{ row }">
|
|
|
@@ -31,8 +31,15 @@
|
|
|
import AssetTree from '@/components/AssetTree';
|
|
|
import ProductSearch from './product-search.vue'
|
|
|
import { getMaterialList } from '@/api/material/list.js';
|
|
|
+import { getAssetList } from '@/api/ledgerAssets/index'
|
|
|
export default {
|
|
|
components: { AssetTree, ProductSearch },
|
|
|
+ props: {
|
|
|
+ isLedger: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
visible: false,
|
|
|
@@ -121,6 +128,75 @@ export default {
|
|
|
label: '选择'
|
|
|
}
|
|
|
],
|
|
|
+
|
|
|
+ columns2: [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ type: 'index',
|
|
|
+ label: '序号',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'fixCode',
|
|
|
+ label: '固资编码',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ label: '编码'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: '名称',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'codeNumber',
|
|
|
+ label: '编号',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'category.modelType',
|
|
|
+ label: '型号',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'category.specification',
|
|
|
+ label: '规格',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'pathName',
|
|
|
+ label: '位置',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110,
|
|
|
+ formatter: (_row) => {
|
|
|
+ return _row.position[0].pathName;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'source',
|
|
|
+ label: '生命周期',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ action: 'action',
|
|
|
+ slot: 'action',
|
|
|
+ align: 'center',
|
|
|
+ label: '选择'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+
|
|
|
title: null,
|
|
|
categoryLevelId: null,
|
|
|
radio: null,
|
|
|
@@ -136,7 +212,8 @@ export default {
|
|
|
methods: {
|
|
|
/* 表格数据源 */
|
|
|
datasource({ page, where, limit }) {
|
|
|
- return getMaterialList({
|
|
|
+ let URL = this.isLedger ? getAssetList : getMaterialList
|
|
|
+ return URL({
|
|
|
...where,
|
|
|
pageNum: page,
|
|
|
size: limit,
|