|
|
@@ -1,243 +1,100 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <div class="grid-container">
|
|
|
- <div class="grid-item-row1-column1">
|
|
|
- <div class="btn-group m-panel" role="group">
|
|
|
- <button
|
|
|
- type="button"
|
|
|
- class="btn btn-success"
|
|
|
- @click="getAssetInstance"
|
|
|
+ <div class="container">
|
|
|
+ <!-- 操作按钮组 -->
|
|
|
+ <a-space>
|
|
|
+ <a-button type="primary" @click="goFirstPage">
|
|
|
+ {{ $t("lang.AssetInventorySearch.query") }}
|
|
|
+ </a-button>
|
|
|
+
|
|
|
+ <a-button @click="generateAssetInventoryLine">
|
|
|
+ {{ $t("lang.AssetInventorySearch.generateAssetCountDetails") }}
|
|
|
+ </a-button>
|
|
|
+
|
|
|
+ <a-button danger @click="clearFilter">
|
|
|
+ {{ $t("lang.AssetInventorySearch.empty") }}
|
|
|
+ </a-button>
|
|
|
+ </a-space>
|
|
|
+
|
|
|
+ <div class="main-layout">
|
|
|
+ <!-- 左侧筛选面板 -->
|
|
|
+ <div class="filter-panel">
|
|
|
+ <a-collapse v-model:activeKey="activePanels" accordion>
|
|
|
+ <!-- 所属部门 -->
|
|
|
+ <a-collapse-panel
|
|
|
+ key="1"
|
|
|
+ :show-arrow="false"
|
|
|
+ :force-render="true"
|
|
|
+ :header="$t('lang.AssetInventorySearch.ownerDepartment')"
|
|
|
>
|
|
|
- {{ $t("lang.AssetInventorySearch.query") }}
|
|
|
- </button>
|
|
|
-
|
|
|
- <button
|
|
|
- type="button"
|
|
|
- class="btn btn-info"
|
|
|
- @click="generateAssetInventoryLine"
|
|
|
+ <ClientOrganizationTree
|
|
|
+ ref="organization"
|
|
|
+ :ids="assetInventoryOrganizationIds"
|
|
|
+ @select-changed="selectChanged"
|
|
|
+ />
|
|
|
+ </a-collapse-panel>
|
|
|
+
|
|
|
+ <!-- 使用部门 -->
|
|
|
+ <a-collapse-panel
|
|
|
+ key="3"
|
|
|
+ :show-arrow="false"
|
|
|
+ :force-render="true"
|
|
|
+ :header="$t('lang.AssetInventorySearch.useDepartment')"
|
|
|
>
|
|
|
- {{ $t("lang.AssetInventorySearch.generateAssetCountDetails") }}
|
|
|
- </button>
|
|
|
-
|
|
|
- <button type="button" class="btn btn-danger" @click="clearFilter">
|
|
|
- {{ $t("lang.AssetInventorySearch.empty") }}
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="grid-item-row2-column1">
|
|
|
- <div>
|
|
|
- <div class="panel panel-default m-panel">
|
|
|
- <div
|
|
|
- class="panel-heading"
|
|
|
- @click="type == 1 ? (type = 0) : (type = 1)"
|
|
|
- >
|
|
|
- {{ $t("lang.AssetInventorySearch.ownerDepartment") }}
|
|
|
- </div>
|
|
|
- <div v-show="type == 1" class="panel-body">
|
|
|
- <ClientOrganizationTree
|
|
|
- ref="organization"
|
|
|
- :ids="assetInventoryOrganizationIds"
|
|
|
- @select-changed="selectChanged"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="panel panel-default m-panel">
|
|
|
- <div
|
|
|
- class="panel-heading"
|
|
|
- @click="type == 3 ? (type = 0) : (type = 3)"
|
|
|
- >
|
|
|
- {{ $t("lang.AssetInventorySearch.useDepartment") }}
|
|
|
- </div>
|
|
|
- <div v-show="type == 3" class="panel-body">
|
|
|
- <ClientOrganizationTree
|
|
|
- ref="responseOrganization"
|
|
|
- :ids="assetInventoryResponseOrganizationIds"
|
|
|
- @select-changed="selectChanged"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="panel panel-default m-panel">
|
|
|
- <div
|
|
|
- class="panel-heading"
|
|
|
- @click="type == 2 ? (type = 0) : (type = 2)"
|
|
|
- >
|
|
|
- {{ $t("lang.AssetInventorySearch.category") }}
|
|
|
- </div>
|
|
|
- <div v-show="type == 2" class="panel-body">
|
|
|
- <div>
|
|
|
- <AssetCategoryTree
|
|
|
- ref="assetCategory"
|
|
|
- :ids="assetInventoryCategoryIds"
|
|
|
- @select-changed="selectChanged"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="panel panel-default m-panel">
|
|
|
- <div
|
|
|
- class="panel-heading"
|
|
|
- @click="type == 4 ? (type = 0) : (type = 4)"
|
|
|
- >
|
|
|
- {{ $t("lang.AssetInventorySearch.project") }}
|
|
|
- </div>
|
|
|
- <div v-show="type == 4" class="panel-body">
|
|
|
- <div>
|
|
|
- <ProjectItemTree
|
|
|
- ref="projectItem"
|
|
|
- :ids="assetInventoryProjectItemIds"
|
|
|
- @select-changed="selectChanged"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="grid-item-row2-column2">
|
|
|
- <table class="fixed-table table-striped table-bordered">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th style="width: 130px">
|
|
|
- {{ $t("lang.AssetInventorySearch.ownerClient") }}
|
|
|
- </th>
|
|
|
- <th style="width: 130px">
|
|
|
- {{ $t("lang.AssetInventorySearch.ownerDepartment") }}
|
|
|
- </th>
|
|
|
- <th style="width: 130px">
|
|
|
- {{ $t("lang.AssetInventorySearch.useClient") }}
|
|
|
- </th>
|
|
|
- <th style="width: 130px">
|
|
|
- {{ $t("lang.AssetInventorySearch.useDepartment") }}
|
|
|
- </th>
|
|
|
- <th style="width: 130px">
|
|
|
- {{ $t("lang.AssetInventorySearch.assetName") }}
|
|
|
- </th>
|
|
|
- <th style="width: 130px">
|
|
|
- {{ $t("lang.AssetInventorySearch.assetNumber") }}
|
|
|
- </th>
|
|
|
- <th style="width: 130px">
|
|
|
- {{ $t("lang.AssetInventorySearch.cardNumber") }}
|
|
|
- </th>
|
|
|
- <th style="width: 130px">
|
|
|
- {{ $t("lang.AssetInventorySearch.type") }}
|
|
|
- </th>
|
|
|
- <th style="width: 130px">
|
|
|
- {{ $t("lang.AssetInventorySearch.assetClassification") }}
|
|
|
- </th>
|
|
|
- <th style="width: 130px">
|
|
|
- {{ $t("lang.AssetInventorySearch.subordinateToTheProject") }}
|
|
|
- </th>
|
|
|
- <th style="width: 90px">
|
|
|
- {{ $t("lang.AssetInventorySearch.originalValue") }}
|
|
|
- </th>
|
|
|
- <th style="width: 100px">
|
|
|
- {{ $t("lang.AssetInventorySearch.placeOfPlacement") }}
|
|
|
- </th>
|
|
|
- <th style="width: 100px">
|
|
|
- {{ $t("lang.AssetInventorySearch.placementLocation") }}
|
|
|
- </th>
|
|
|
- <th style="width: 100px">
|
|
|
- {{ $t("lang.AssetInventorySearch.unitOfMeasurement") }}
|
|
|
- </th>
|
|
|
- <th style="width: 100px">
|
|
|
- {{ $t("lang.AssetInventorySearch.user") }}
|
|
|
- </th>
|
|
|
- <th style="width: 100px">
|
|
|
- {{ $t("lang.AssetInventorySearch.usageStatus") }}
|
|
|
- </th>
|
|
|
- <th style="width: 100px">
|
|
|
- {{ $t("lang.AssetInventorySearch.userInput") }}
|
|
|
- </th>
|
|
|
- <th style="width: 130px">
|
|
|
- {{ $t("lang.AssetInventorySearch.licensePlate") }}
|
|
|
- </th>
|
|
|
- <th style="width: 130px">
|
|
|
- {{ $t("lang.AssetInventorySearch.selfNumbering") }}
|
|
|
- </th>
|
|
|
- <th style="width: 130px">
|
|
|
- {{ $t("lang.AssetInventorySearch.startUseDate") }}
|
|
|
- </th>
|
|
|
- <th style="width: 130px">
|
|
|
- {{ $t("lang.AssetInventorySearch.remarks") }}
|
|
|
- </th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- <tr
|
|
|
- v-for="assetInstance in assetInstances"
|
|
|
- :key="assetInstance.id"
|
|
|
- @dblclick="openCurdWindow(assetInstance)"
|
|
|
- >
|
|
|
- <td>{{ assetInstance.clientName }}</td>
|
|
|
- <td>{{ assetInstance.organizationName }}</td>
|
|
|
- <td>{{ assetInstance.responseClientName }}</td>
|
|
|
- <td>{{ assetInstance.responseOrganizationName }}</td>
|
|
|
- <td>{{ assetInstance.name }}</td>
|
|
|
- <td>{{ assetInstance.assetNo }}</td>
|
|
|
- <td>{{ assetInstance.no }}</td>
|
|
|
- <td>{{ assetInstance.type }}</td>
|
|
|
- <td>{{ assetInstance.categoryName }}</td>
|
|
|
- <td>{{ assetInstance.projectItemName }}</td>
|
|
|
- <td>{{ assetInstance.orginalValue }}</td>
|
|
|
- <td>{{ assetInstance.savePosition }}</td>
|
|
|
- <td>{{ assetInstance.locationName }}</td>
|
|
|
- <td>{{ assetInstance.computationUnitName }}</td>
|
|
|
- <td>{{ assetInstance.useUserName }}</td>
|
|
|
- <td>{{ assetInstance.useStatusName }}</td>
|
|
|
- <td>{{ assetInstance.useUserNameInput }}</td>
|
|
|
- <td>{{ assetInstance.vehicleNo }}</td>
|
|
|
- <td>{{ assetInstance.selfNo }}</td>
|
|
|
- <td>{{ assetInstance.depreciationStartDate }}</td>
|
|
|
- <td>{{ assetInstance.description }}</td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- <div class="grid-item-row3-column2">
|
|
|
- <div>
|
|
|
- <p class="bg-success m-grid-footer">
|
|
|
- {{ $t("lang.AssetInventorySearch.totalOfOriginalValue") }}:{{
|
|
|
- orginalValueTotal
|
|
|
- }}
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="grid-item-row4-column2">
|
|
|
- <div>
|
|
|
- <div class="pull-left">
|
|
|
- <span>{{ $t("lang.AssetInventorySearch.the")
|
|
|
- }}{{ (pagination.current_page - 1) * pagination.per_page + 1 }}-{{
|
|
|
- pagination.current_page * pagination.per_page
|
|
|
- }}{{ $t("lang.AssetInventorySearch.strip") }},{{
|
|
|
- $t("lang.AssetInventorySearch.inTotal")
|
|
|
- }}{{ pagination.total
|
|
|
- }}{{ $t("lang.AssetInventorySearch.strip") }},{{
|
|
|
- $t("lang.AssetInventorySearch.eachPage")
|
|
|
- }}</span>
|
|
|
- <PageSizeSelect @page-size-changed="pageSizeChanged" />
|
|
|
- <span>{{ $t("lang.AssetInventorySearch.strip") }}</span>
|
|
|
- </div>
|
|
|
- <div class="pull-right">
|
|
|
- <VueBootstrapPagination :pagination="pagination" :callback="pageStartChanged" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <ClientOrganizationTree
|
|
|
+ ref="responseOrganization"
|
|
|
+ :ids="assetInventoryResponseOrganizationIds"
|
|
|
+ @select-changed="selectChanged"
|
|
|
+ />
|
|
|
+ </a-collapse-panel>
|
|
|
+
|
|
|
+ <!-- 资产分类 -->
|
|
|
+ <a-collapse-panel
|
|
|
+ key="2"
|
|
|
+ :show-arrow="false"
|
|
|
+ :force-render="true"
|
|
|
+ :header="$t('lang.AssetInventorySearch.category')"
|
|
|
+ >
|
|
|
+ <AssetCategoryTree
|
|
|
+ ref="assetCategory"
|
|
|
+ :ids="assetInventoryCategoryIds"
|
|
|
+ @select-changed="selectChanged"
|
|
|
+ />
|
|
|
+ </a-collapse-panel>
|
|
|
+
|
|
|
+ <!-- 项目选择 -->
|
|
|
+ <a-collapse-panel
|
|
|
+ key="5"
|
|
|
+ :show-arrow="false"
|
|
|
+ :force-render="true"
|
|
|
+ :header="$t('lang.AssetInventorySearch.project')"
|
|
|
+ >
|
|
|
+ <ProjectItemTree
|
|
|
+ ref="projectItem"
|
|
|
+ :ids="assetInventoryProjectItemIds"
|
|
|
+ @select-changed="selectChanged"
|
|
|
+ />
|
|
|
+ </a-collapse-panel>
|
|
|
+ </a-collapse>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="flex-container-1">
|
|
|
- <div class="flex-content-1">
|
|
|
- <div class="flex-main-1">
|
|
|
- <div>
|
|
|
- <div class="flex-container-2">
|
|
|
- <div class="flex-header-2">
|
|
|
- <div class="m-row" />
|
|
|
- </div>
|
|
|
- <div class="flex-content-2">
|
|
|
- <div class="flex-main-2" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <!-- 右侧表格区域 -->
|
|
|
+ <div class="table-container">
|
|
|
+ <CommonTable
|
|
|
+ ref="table"
|
|
|
+ :columns="columns"
|
|
|
+ :data-source="assetInstances"
|
|
|
+ :total="totalCount"
|
|
|
+ :extra-height="150"
|
|
|
+ :is-custom-row-click="true"
|
|
|
+ @custom-row-click="openCurdWindow"
|
|
|
+ @get-pager="getPageParams"
|
|
|
+ />
|
|
|
+
|
|
|
+ <!-- 底部统计信息 -->
|
|
|
+ <div class="footer-info">
|
|
|
+ {{ $t("lang.AssetInventorySearch.totalOfOriginalValue") }}:{{
|
|
|
+ orginalValueTotal
|
|
|
+ }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -252,53 +109,52 @@ import Common from '../../common/Common.js';
|
|
|
import AssetInstanceResource from '../../api/asset/AssetInstanceResource.js';
|
|
|
import AssetInventoryResource from '../../api/asset/AssetInventoryResource.js';
|
|
|
|
|
|
-
|
|
|
-import ClientOrganizationTree from '../../widget/ClientOrganizationTree.vue';
|
|
|
+import AssetInventoryLineResource from '../../api/asset/AssetInventoryLineResource.js';
|
|
|
+import ClientOrganizationTree from '../../widget/ClientOrganizationTree.vue';
|
|
|
import ProjectItemTree from '../../widget/ProjectItemTree.vue';
|
|
|
import AssetCategoryTree from '../../widget/AssetCategoryTree.vue';
|
|
|
-import { Notify, Uuid } from 'pc-component-v3';
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+import { Notify, Uuid, SqlApi } from 'pc-component-v3';
|
|
|
+import { message } from 'ant-design-vue';
|
|
|
+import CommonTable from '../../common/CommonTable.vue';
|
|
|
|
|
|
+import dayjs from 'dayjs';
|
|
|
|
|
|
+import { Date } from 'pc-component-v3';
|
|
|
|
|
|
export default {
|
|
|
-
|
|
|
- components: {
|
|
|
+ components: {
|
|
|
+ Date,
|
|
|
+ CommonTable,
|
|
|
ProjectItemTree,
|
|
|
AssetCategoryTree,
|
|
|
ClientOrganizationTree,
|
|
|
},
|
|
|
|
|
|
-
|
|
|
props: {
|
|
|
assetInventoryId: {
|
|
|
type: Number,
|
|
|
default: null,
|
|
|
},
|
|
|
},
|
|
|
-
|
|
|
+ // 定义抛出的事件名称
|
|
|
+ emits: ['previous', 'next'],
|
|
|
data: function () {
|
|
|
return {
|
|
|
assetInventory: {}, // 资产盘点
|
|
|
+ visible: false, //模态框状态
|
|
|
clientOrganizations: [], // 所属部门
|
|
|
responseClientOrganizations: [], // 使用部门
|
|
|
categories: [], // 资产类别
|
|
|
projectItems: [], // 项目类别
|
|
|
- useStatus: [], //使用状态
|
|
|
type: null, //全盘搜索条件
|
|
|
assetInstances: [],
|
|
|
-
|
|
|
+ filter: {},
|
|
|
+ locationData: [],
|
|
|
additionalHql: '',
|
|
|
pagination: {
|
|
|
- total: 0,
|
|
|
per_page: Common.pageSize, // required
|
|
|
current_page: 1, // required
|
|
|
- last_page: 1, // required
|
|
|
},
|
|
|
- filter: {},
|
|
|
totalCount: 0,
|
|
|
orginalValueTotal: 0,
|
|
|
totalAmountOfImpairmentTotal: 0,
|
|
|
@@ -308,30 +164,211 @@ export default {
|
|
|
assetInventoryResponseOrganizationIds: [], // 盘点单中已经选中的所属部门
|
|
|
assetInventoryCategoryIds: [], // 盘点单中已经选中的资产类别
|
|
|
assetInventoryProjectItemIds: [], // 盘点单中已经选择的项目
|
|
|
+ locationWindowNo: '109494',
|
|
|
+ locationField: {
|
|
|
+ name: '',
|
|
|
+ listDisplayFieldName: 'ar.name',
|
|
|
+ },
|
|
|
+ locationFieldValue: {
|
|
|
+ id: null,
|
|
|
+ displayValue: [''],
|
|
|
+ fieldType: 'Key',
|
|
|
+ },
|
|
|
+ whereClauseSource: {
|
|
|
+ customerDataDimensions: [
|
|
|
+ {
|
|
|
+ fieldName: 'ar.client.id',
|
|
|
+ dataDimensionTypeNo: '202201191757',
|
|
|
+ defaultDataDimensionTypeValueNo: '1',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ userWindowNo: '050408',
|
|
|
+ userField: {
|
|
|
+ name: '',
|
|
|
+ listDisplayFieldName: 'name',
|
|
|
+ },
|
|
|
+ userFieldValue: {
|
|
|
+ id: null,
|
|
|
+ displayValue: [''],
|
|
|
+ fieldType: 'Key',
|
|
|
+ },
|
|
|
+ custodianNameField: {
|
|
|
+ name: '',
|
|
|
+ listDisplayFieldName: 'name',
|
|
|
+ },
|
|
|
+ custodianNameFieldValue: {
|
|
|
+ id: null,
|
|
|
+ displayValue: [''],
|
|
|
+ fieldType: 'Key',
|
|
|
+ },
|
|
|
+ userIdWhereClauseSource: {
|
|
|
+ customerDataDimensions: [
|
|
|
+ {
|
|
|
+ fieldName: 'client.id',
|
|
|
+ dataDimensionTypeNo: '202201191757',
|
|
|
+ defaultDataDimensionTypeValueNo: '4',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ custodianIdWhereClauseSource: {
|
|
|
+ customerDataDimensions: [
|
|
|
+ {
|
|
|
+ fieldName: 'client.id',
|
|
|
+ dataDimensionTypeNo: '202201191757',
|
|
|
+ defaultDataDimensionTypeValueNo: '4',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ checkedIds: [],
|
|
|
loading: false,
|
|
|
+ inventorySheetName: undefined, //盘点单名称
|
|
|
+
|
|
|
+ accountDate: dayjs().format('YYYY-MM-DD'), //账面日期
|
|
|
+ plannedStartDate: null, //计划开始时间
|
|
|
+ plannedEndDate: null, //计划结束时间
|
|
|
+
|
|
|
+ assetInstancesTempory: [], //盘点清单展示
|
|
|
+ fileList: [],
|
|
|
+ activePanels: [],
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.ownerClient'),
|
|
|
+ dataIndex: 'clientName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.ownerDepartment'),
|
|
|
+ dataIndex: 'organizationName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.useClient'),
|
|
|
+ dataIndex: 'responseClientName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.useDepartment'),
|
|
|
+ dataIndex: 'responseOrganizationName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.assetName'),
|
|
|
+ dataIndex: 'name',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.assetNumber'),
|
|
|
+ dataIndex: 'assetNo',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.cardNumber'),
|
|
|
+ dataIndex: 'no',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.type'),
|
|
|
+ dataIndex: 'type',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.assetClassification'),
|
|
|
+ dataIndex: 'categoryName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.subordinateToTheProject'),
|
|
|
+ dataIndex: 'projectItemName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.originalValue'),
|
|
|
+ dataIndex: 'orginalValue',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.placeOfPlacement'),
|
|
|
+ dataIndex: 'savePosition',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.placementLocation'),
|
|
|
+ dataIndex: 'locationName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.unitOfMeasurement'),
|
|
|
+ dataIndex: 'computationUnitName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.user'),
|
|
|
+ dataIndex: 'useUserName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.custodianName'),
|
|
|
+ dataIndex: 'custodianName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.depositoryUserName'),
|
|
|
+ dataIndex: 'depositoryUserName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.usageStatus'),
|
|
|
+ dataIndex: 'useStatusName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.userInput'),
|
|
|
+ dataIndex: 'useUserNameInput',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.licensePlate'),
|
|
|
+ dataIndex: 'vehicleNo',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.selfNumbering'),
|
|
|
+ dataIndex: 'selfNo',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.startUseDate'),
|
|
|
+ dataIndex: 'depreciationStartDate',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.remarks'),
|
|
|
+ dataIndex: 'description',
|
|
|
+ },
|
|
|
+ ].map(item => ({
|
|
|
+ ...item,
|
|
|
+ key: item.dataIndex,
|
|
|
+ align: 'center',
|
|
|
+ ellipsis: true,
|
|
|
+ width: 200,
|
|
|
+ resizable: true,
|
|
|
+ })),
|
|
|
+ detailColumns: [
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.assetName'),
|
|
|
+ dataIndex: 'name',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.assetNumber'),
|
|
|
+ dataIndex: 'assetNo',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.cardNumber'),
|
|
|
+ dataIndex: 'no',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.assetClassification'),
|
|
|
+ dataIndex: 'categoryName',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: this.$t('lang.AssetInventorySearch.operation'),
|
|
|
+ dataIndex: 'operation',
|
|
|
+ },
|
|
|
+ ],
|
|
|
};
|
|
|
},
|
|
|
|
|
|
+ computed: {},
|
|
|
+
|
|
|
mounted: function () {
|
|
|
var _self = this;
|
|
|
|
|
|
- _self.$nextTick(function () {
|
|
|
+ _self.$nextTick(() => {
|
|
|
_self.getAssetInventory();
|
|
|
- // 固定行
|
|
|
- _self.fixedTableHeader();
|
|
|
- });
|
|
|
-
|
|
|
- // 可调整表格列宽
|
|
|
- _self.$nextTick(function () {
|
|
|
- $('.fixed-table').resizableColumns();
|
|
|
+ _self.getAssetInstance();
|
|
|
});
|
|
|
},
|
|
|
- methods: {
|
|
|
- selectChanged: function () {
|
|
|
- var _self = this;
|
|
|
- _self.getAssetInstance();
|
|
|
- },
|
|
|
|
|
|
+ methods: {
|
|
|
/**
|
|
|
* 查询盘点单DTO,
|
|
|
* 主要是获取资产盘点中的所属部门集合、使用部门集合、资产类别结合。
|
|
|
@@ -344,15 +381,18 @@ export default {
|
|
|
_self.assetInventoryId,
|
|
|
).then(
|
|
|
baseObjectResponse => {
|
|
|
- if(baseObjectResponse.errorCode == 0){
|
|
|
- _self.assetInventoryOrganizationIds = baseObjectResponse.data.organizationIds;
|
|
|
+ if (baseObjectResponse.errorCode == 0) {
|
|
|
+ _self.assetInventoryOrganizationIds =
|
|
|
+ baseObjectResponse.data.organizationIds;
|
|
|
|
|
|
_self.assetInventoryResponseOrganizationIds =
|
|
|
- baseObjectResponse.data.responseOrganizationIds;
|
|
|
+ baseObjectResponse.data.responseOrganizationIds;
|
|
|
|
|
|
- _self.assetInventoryCategoryIds = baseObjectResponse.data.categoryIds;
|
|
|
+ _self.assetInventoryCategoryIds =
|
|
|
+ baseObjectResponse.data.categoryIds;
|
|
|
|
|
|
- _self.assetInventoryProjectItemIds = baseObjectResponse.data.projectIds;
|
|
|
+ _self.assetInventoryProjectItemIds =
|
|
|
+ baseObjectResponse.data.projectIds;
|
|
|
|
|
|
_self.assetInventory = baseObjectResponse.data;
|
|
|
|
|
|
@@ -372,7 +412,7 @@ export default {
|
|
|
});
|
|
|
// 查询资产卡片的数据
|
|
|
_self.getAssetInstance();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Notify.error('提示', baseObjectResponse.errorMessage, false);
|
|
|
}
|
|
|
},
|
|
|
@@ -382,30 +422,29 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
|
|
|
+ selectChanged: function () {
|
|
|
+ var _self = this;
|
|
|
+ _self.$refs.table.backFirstPage();
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* 根据界面选中的所属部门、使用部门、资产类别、项目查询资产清单
|
|
|
* @author yangzhijie 20200806
|
|
|
*/
|
|
|
- getAssetInstance: function (isPageChange) {
|
|
|
+ getAssetInstance: function () {
|
|
|
var _self = this;
|
|
|
|
|
|
- if (!isPageChange) {
|
|
|
- _self.pagination.current_page = 1;
|
|
|
- }
|
|
|
+ // 盘点状态
|
|
|
var projectItemIds = _self.$refs.projectItem.getSelectedIds();
|
|
|
var organizationIds = _self.$refs.organization.getSelectedIds();
|
|
|
var responseOrganizationIds =
|
|
|
_self.$refs.responseOrganization.getSelectedIds();
|
|
|
var categoryIds = _self.$refs.assetCategory.getSelectedIds();
|
|
|
|
|
|
- _self.clearPageData();
|
|
|
-
|
|
|
- _self.loading=true;
|
|
|
-
|
|
|
_self.filter.assetDecrease = 0;
|
|
|
-
|
|
|
- // 账套时间
|
|
|
- _self.filter.depreciationStartDate2 = `${_self.assetInventory.accountDate} 00:00:00`;
|
|
|
+ _self.filter.depreciationStartDate2 = _self.assetInventory.accountDate
|
|
|
+ ? `${_self.assetInventory.accountDate} 00:00:00`
|
|
|
+ : null;
|
|
|
|
|
|
var obj = {
|
|
|
organizationIds: organizationIds,
|
|
|
@@ -420,22 +459,36 @@ export default {
|
|
|
},
|
|
|
inventoryStatus: 'OVERALL',
|
|
|
};
|
|
|
+ _self.loading = true;
|
|
|
|
|
|
AssetInstanceResource.getByOrganizationAndCategory(obj).then(
|
|
|
- baseObjectResponse => {
|
|
|
- _self.loading=false;
|
|
|
- if(baseObjectResponse.errorCode != 0) {
|
|
|
- Notify.error('提示', baseObjectResponse.errorMessage, false);
|
|
|
- return;
|
|
|
+ data => {
|
|
|
+ if (data.errorCode == 0) {
|
|
|
+ _self.redrawAssetInstance(data.data);
|
|
|
+ _self.loading = false;
|
|
|
+ } else {
|
|
|
+ Notify.error('提示', data.errorMessage, false);
|
|
|
}
|
|
|
- _self.redrawAssetInstance(baseObjectResponse.data);
|
|
|
+ _self.loading = false;
|
|
|
},
|
|
|
xmlHttpRequest => {
|
|
|
+ _self.loading = false;
|
|
|
Common.processException(xmlHttpRequest);
|
|
|
},
|
|
|
);
|
|
|
},
|
|
|
|
|
|
+ /**
|
|
|
+ * 重新绘制资产卡片
|
|
|
+ * @author YangZhiJie 20200806
|
|
|
+ */
|
|
|
+ redrawAssetInstance: function (data) {
|
|
|
+ var _self = this;
|
|
|
+ _self.assetInstances = data.dataList;
|
|
|
+ _self.totalCount = data.totalSize;
|
|
|
+ _self.orginalValueTotal = data.totalOrginalValue;
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* 生成资产盘点明细
|
|
|
* @author YangZhiJie 20200806
|
|
|
@@ -449,7 +502,7 @@ export default {
|
|
|
var categoryIds = _self.$refs.assetCategory.getSelectedIds();
|
|
|
var projectItemIds = _self.$refs.projectItem.getSelectedIds();
|
|
|
|
|
|
- _self.loading=true;
|
|
|
+ _self.loading = true;
|
|
|
var obj = {
|
|
|
assetInventoryId: _self.assetInventoryId,
|
|
|
organizationIds: organizationIds,
|
|
|
@@ -461,57 +514,24 @@ export default {
|
|
|
obj,
|
|
|
).then(
|
|
|
baseObjectResponse => {
|
|
|
- if(baseObjectResponse.errorCode == 0){
|
|
|
- Common.showDialog('提示', baseObjectResponse.errorMessage, 'success');
|
|
|
+ if (baseObjectResponse.errorCode == 0) {
|
|
|
+ Common.showDialog(
|
|
|
+ '提示',
|
|
|
+ baseObjectResponse.errorMessage,
|
|
|
+ 'success',
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ Notify.error('提示', baseObjectResponse.errorMessage, false);
|
|
|
}
|
|
|
- _self.loading=false;
|
|
|
+ _self.loading = false;
|
|
|
},
|
|
|
xmlHttpRequest => {
|
|
|
- _self.loading=false;
|
|
|
+ _self.loading = false;
|
|
|
Common.processException(xmlHttpRequest);
|
|
|
},
|
|
|
);
|
|
|
},
|
|
|
|
|
|
- /**
|
|
|
- * 重新绘制资产卡片
|
|
|
- * @author YangZhiJie 20200806
|
|
|
- */
|
|
|
- redrawAssetInstance: function (data) {
|
|
|
- var _self = this;
|
|
|
- console.log(data);
|
|
|
- _self.assetInstances = data.dataList;
|
|
|
- _self.pagination.total = data.totalSize;
|
|
|
- _self.pagination.last_page = Math.ceil(
|
|
|
- data.totalSize / data.range.length,
|
|
|
- );
|
|
|
- _self.totalCount = data.totalSize;
|
|
|
- _self.orginalValueTotal = data.totalOrginalValue;
|
|
|
- _self.totalAmountOfImpairmentTotal = data.totalAmountOfImpairment;
|
|
|
- _self.netSalvageTotal = data.totalNetSalvage;
|
|
|
-
|
|
|
- _self.fixedTableHeader();
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 清空分页数据
|
|
|
- * @author YangZhiJie 20200806
|
|
|
- */
|
|
|
- clearPageData: function () {
|
|
|
- var data = {
|
|
|
- dataList: [],
|
|
|
- totalSize: 0,
|
|
|
- range: {
|
|
|
- start: 0,
|
|
|
- length: this.pagination.per_page,
|
|
|
- },
|
|
|
- totalOrginalValue: 0,
|
|
|
- totalAmountOfImpairment: 0,
|
|
|
- totalNetSalvage: 0,
|
|
|
- };
|
|
|
- this.redrawAssetInstance(data);
|
|
|
- },
|
|
|
-
|
|
|
/**
|
|
|
* 清空界面的搜索条件
|
|
|
* @author YangZhiJie 20200806
|
|
|
@@ -519,10 +539,12 @@ export default {
|
|
|
*/
|
|
|
clearFilter: function () {
|
|
|
this.filter.assetDecrease = 0;
|
|
|
- // 账套时间
|
|
|
- this.filter.depreciationStartDate2 = `${this.assetInventory.accountDate} 00:00:00`;
|
|
|
+
|
|
|
this.initTreeData();
|
|
|
- this.getAssetInstance();
|
|
|
+ this.filter.depreciationStartDate2 = this.assetInventory.accountDate
|
|
|
+ ? `${this.assetInventory.accountDate} 00:00:00`
|
|
|
+ : null;
|
|
|
+ this.$refs.table.backFirstPage();
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
@@ -538,46 +560,27 @@ export default {
|
|
|
_self.$refs.assetCategory.initAssetCategory1();
|
|
|
},
|
|
|
|
|
|
- /**
|
|
|
- * 表格显示行数发生改变
|
|
|
- * @author YangZhiJie 20200806
|
|
|
- */
|
|
|
- pageSizeChanged: function (newPageSize) {
|
|
|
- this.pagination.per_page = newPageSize;
|
|
|
- this.pagination.current_page = 1;
|
|
|
- this.getAssetInstance();
|
|
|
+ goFirstPage: function () {
|
|
|
+ this.$refs.table.backFirstPage();
|
|
|
},
|
|
|
|
|
|
- /**
|
|
|
- * 页数发生变化
|
|
|
- * @author YangZhiJie 20200806
|
|
|
- */
|
|
|
- pageStartChanged: function () {
|
|
|
- this.getAssetInstance(true);
|
|
|
+ getPageParams: function (page, pageSize) {
|
|
|
+ this.pagination.current_page = page;
|
|
|
+ this.pagination.per_page = pageSize;
|
|
|
+ this.getAssetInstance();
|
|
|
},
|
|
|
-
|
|
|
- /**
|
|
|
- * 冻结表头
|
|
|
- */
|
|
|
- fixedTableHeader: function () {
|
|
|
- var _self = this;
|
|
|
- _self.$nextTick(function () {
|
|
|
- $('.fixed-table').tableFixer({
|
|
|
- head: true,
|
|
|
- });
|
|
|
- });
|
|
|
-
|
|
|
- // 给table的外面的div设置固定的高度,如果不设置固定高度,无法固定表格的表头
|
|
|
- // let height = $(".flex-content").outerHeight(true) - 20;
|
|
|
- // $(".table-fixed-out").css("height", height);
|
|
|
+ getSelectedData: function (selectedData) {
|
|
|
+ this.checkedIds = selectedData.selectedRowKeys;
|
|
|
+ this.assetInstancesTempory = selectedData.selectedRows;
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 打开资产卡片的CURD窗口
|
|
|
*/
|
|
|
openCurdWindow: function (assetInstance) {
|
|
|
+ console.log(assetInstance);
|
|
|
let url = Common.getRedirectUrl(
|
|
|
- '#/desktop/window/window-read/view/040701/0/' +
|
|
|
+ '#/desktop/window1/window-read/view/040701/0/' +
|
|
|
assetInstance.id +
|
|
|
'?currPage=1&currIndex=1&totalCount=1&uuid=' +
|
|
|
Uuid.createUUID(),
|
|
|
@@ -589,79 +592,73 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-.grid-container {
|
|
|
- margin-top: 10px;
|
|
|
- display: grid;
|
|
|
- grid-template-columns: 300px auto;
|
|
|
- grid-template-rows: 35px 1fr 40px 40px;
|
|
|
- gap: 10px;
|
|
|
- justify-items: stretch;
|
|
|
- align-items: stretch;
|
|
|
- height: calc(100vh - 170px);
|
|
|
- overflow: auto;
|
|
|
+.container {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
}
|
|
|
|
|
|
-.grid-item-row1-column1 {
|
|
|
- grid-row-start: 1;
|
|
|
- grid-row-end: 2;
|
|
|
- grid-column-start: 1;
|
|
|
- grid-column-end: 3;
|
|
|
+.main-layout {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ gap: 24px;
|
|
|
+ overflow: hidden;
|
|
|
+ /* margin-top: 8px; */
|
|
|
}
|
|
|
|
|
|
-.grid-item-row2-column1 {
|
|
|
- grid-row-start: 2;
|
|
|
- grid-row-end: 5;
|
|
|
- grid-column-start: 1;
|
|
|
- grid-column-end: 2;
|
|
|
- overflow: auto;
|
|
|
+.filter-panel {
|
|
|
+ width: 300px;
|
|
|
+ overflow-y: auto;
|
|
|
+ margin-top: 8px;
|
|
|
}
|
|
|
|
|
|
-.grid-item-row2-column2 {
|
|
|
- grid-row-start: 2;
|
|
|
- grid-row-end: 3;
|
|
|
- grid-column-start: 2;
|
|
|
- grid-column-end: 3;
|
|
|
- overflow: auto;
|
|
|
+.table-container {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
|
|
|
-.grid-item-row3-column2 {
|
|
|
- grid-row-start: 3;
|
|
|
- grid-row-end: 4;
|
|
|
- grid-column-start: 2;
|
|
|
- grid-column-end: 3;
|
|
|
+.footer-info {
|
|
|
+ padding: 12px;
|
|
|
+ background: #fafafa;
|
|
|
+ border: 1px solid #e8e8e8;
|
|
|
+ font-size: 14px;
|
|
|
+ background: #dff0d8;
|
|
|
}
|
|
|
|
|
|
-.grid-item-row4-column2 {
|
|
|
- grid-row-start: 4;
|
|
|
- grid-row-end: 5;
|
|
|
- grid-column-start: 2;
|
|
|
- grid-column-end: 3;
|
|
|
+.range-symbol {
|
|
|
+ margin: 0 8px;
|
|
|
+ color: rgba(0, 0, 0, 0.45);
|
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
-<style scoped>
|
|
|
-.m-grid-footer {
|
|
|
- padding: 10px;
|
|
|
+.pagination-row {
|
|
|
+ margin: 8px;
|
|
|
}
|
|
|
|
|
|
-.m-panel {
|
|
|
- margin-bottom: 0px;
|
|
|
+:deep(.ant-collapse) {
|
|
|
+ margin-bottom: 16px;
|
|
|
+ background: #fff;
|
|
|
}
|
|
|
|
|
|
-.fixed-table {
|
|
|
- table-layout: fixed;
|
|
|
- width: 800px !important;
|
|
|
- min-width: 800px !important;
|
|
|
+:deep(.ant-collapse-header) {
|
|
|
+ background: #efefef;
|
|
|
}
|
|
|
|
|
|
-table.fixed-table tr {
|
|
|
- height: 40px;
|
|
|
+:deep(.ant-collapse-content) {
|
|
|
+ background: #fff;
|
|
|
}
|
|
|
|
|
|
-table.fixed-table th,
|
|
|
-table.fixed-table td {
|
|
|
- overflow: hidden;
|
|
|
- white-space: nowrap;
|
|
|
- text-overflow: ellipsis;
|
|
|
+:deep(.ant-collapse-content-box) {
|
|
|
+ max-height: 440px;
|
|
|
+ overflow: auto;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.ant-form-item) {
|
|
|
+ margin-bottom: 4px !important;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.ant-form-item-label > label) {
|
|
|
+ font-size: 14px !important;
|
|
|
+ font-weight: 500 !important;
|
|
|
}
|
|
|
</style>
|