123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- <template>
- <a-card :bordered="false">
- <!-- 查询区域 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="资产编号">
- <a-input placeholder="请输入资产编号" v-model="queryParam.assetNumber"></a-input>
- </a-form-item>
- </a-col>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="资产名称">
- <a-input placeholder="请输入资产名称" v-model="queryParam.assetName"></a-input>
- </a-form-item>
- </a-col>
- <template v-if="toggleSearchStatus">
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="资产类别">
- <a-input placeholder="请输入资产类别" v-model="queryParam.assetsCategory"></a-input>
- </a-form-item>
- </a-col>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="品牌">
- <a-input placeholder="请输入品牌" v-model="queryParam.brand"></a-input>
- </a-form-item>
- </a-col>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="单位名称">
- <a-input placeholder="请输入单位名称" v-model="queryParam.unitName"></a-input>
- </a-form-item>
- </a-col>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="规格型号">
- <a-input placeholder="请输入规格型号" v-model="queryParam.model"></a-input>
- </a-form-item>
- </a-col>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="使用人">
- <a-input placeholder="请输入使用人" v-model="queryParam.user"></a-input>
- </a-form-item>
- </a-col>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="使用部门">
- <a-input placeholder="请输入使用部门" v-model="queryParam.userDept"></a-input>
- </a-form-item>
- </a-col>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <a-form-item label="资产状态">
- <a-input placeholder="请输入资产状态" v-model="queryParam.state"></a-input>
- </a-form-item>
- </a-col>
- </template>
- <a-col :xl="6" :lg="7" :md="8" :sm="24">
- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
- <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
- <a @click="handleToggleSearch" style="margin-left: 8px">
- {{ toggleSearchStatus ? '收起' : '展开' }}
- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
- </a>
- </span>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- 查询区域-END -->
-
- <!-- table区域-begin -->
- <div>
- <a-table
- ref="table"
- size="middle"
- bordered
- rowKey="id"
- :columns="columns"
- :dataSource="dataSource"
- :pagination="ipagination"
- :loading="loading"
- rowselection="false"
-
- @change="handleTableChange">
- <template slot="htmlSlot" slot-scope="text">
- <div v-html="text"></div>
- </template>
- <template slot="imgSlot" slot-scope="text">
- <span v-if="!text" style="font-size: 12px;font-style: italic;">无此图片</span>
- <img v-else :src="getImgView(text)" height="25px" alt="图片不存在" style="max-width:80px;font-size: 12px;font-style: italic;"/>
- </template>
- <template slot="fileSlot" slot-scope="text">
- <span v-if="!text" style="font-size: 12px;font-style: italic;">无此文件</span>
- <a-button
- v-else
- :ghost="true"
- type="primary"
- icon="download"
- size="small"
- @click="uploadFile(text)">
- 下载
- </a-button>
- </template>
- <span slot="action" slot-scope="text, record">
- <a @click="handleEdit(record)">编辑</a>
- </span>
- </a-table>
- </div>
- <asset-modal ref="modalForm" @ok="modalFormOk"></asset-modal>
- </a-card>
- </template>
- <script>
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import AssetModal from './modules/AssetModal'
- import JDate from '@/components/jeecg/JDate.vue'
- export default {
- name: "AssetList",
- mixins:[JeecgListMixin],
- components: {
- JDate,
- AssetModal
- },
- data () {
- return {
- description: '固定资产管理页面',
- // 表头
- columns: [
- {
- title: '#',
- dataIndex: '',
- key:'rowIndex',
- width:60,
- align:"center",
- customRender:function (t,r,index) {
- return parseInt(index)+1;
- }
- },
- {
- title:'资产编号',
- align:"center",
- dataIndex: 'assetNumber'
- },
- {
- title:'资产名称',
- align:"center",
- dataIndex: 'assetName'
- },
- {
- title:'资产类别',
- align:"center",
- dataIndex: 'assetsCategory'
- },
- {
- title:'品牌',
- align:"center",
- dataIndex: 'brand'
- },
- {
- title:'单位名称',
- align:"center",
- dataIndex: 'unitName'
- },
- {
- title:'规格型号',
- align:"center",
- dataIndex: 'model'
- },
- {
- title:'计量单位',
- align:"center",
- dataIndex: 'unit'
- },
- {
- title:'数量',
- align:"center",
- dataIndex: 'quantity'
- },
- {
- title:'金额',
- align:"center",
- dataIndex: 'amount'
- },
- {
- title:'使用年限',
- align:"center",
- dataIndex: 'exp'
- },
- {
- title:'购置日期',
- align:"center",
- dataIndex: 'purhcaseDate',
- customRender:function (text) {
- return !text?"":(text.length>10?text.substr(0,10):text)
- }
- },
- {
- title:'入库日期',
- align:"center",
- dataIndex: 'inDate',
- customRender:function (text) {
- return !text?"":(text.length>10?text.substr(0,10):text)
- }
- },
- {
- title:'存放地点',
- align:"center",
- dataIndex: 'place'
- },
- {
- title:'使用人',
- align:"center",
- dataIndex: 'user'
- },
- {
- title:'使用部门',
- align:"center",
- dataIndex: 'userDept'
- },
- {
- title:'资产状态',
- align:"center",
- dataIndex: 'state'
- },
- {
- title: '操作',
- dataIndex: 'action',
- align:"center",
- scopedSlots: { customRender: 'action' }
- }
- ],
- url: {
- list: "/oa/asset/list",
- delete: "/oa/asset/delete",
- deleteBatch: "/oa/asset/deleteBatch",
- exportXlsUrl: "/oa/asset/exportXls",
- importExcelUrl: "oa/asset/importExcel",
- },
- dictOptions:{},
- }
- },
- computed: {
- importExcelUrl: function(){
- return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
- }
- },
- methods: {
- initDictConfig(){
- }
- }
- }
- </script>
- <style scoped>
- @import '~@assets/less/common.less';
- </style>
|