添加无形资产清单
This commit is contained in:
parent
93a25ec424
commit
07791509f0
|
@ -15,7 +15,7 @@
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
||||||
<chart-card title="仪器总数" :total="this.InstrumentCount">
|
<chart-card title="仪器总数" :total="this.InstrumentCount">
|
||||||
<template slot="footer">资产总数:<span>{{ this.ChartDataSum }}</span></template>
|
<template slot="footer">资产总数:<span>{{ this.InstrumentCount+ this.FurnitureCount}}</span></template>
|
||||||
</chart-card>
|
</chart-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
||||||
<chart-card title="家具总数" :total="this.FurnitureCount">
|
<chart-card title="家具总数" :total="this.FurnitureCount">
|
||||||
<template slot="footer">资产总数:<span>{{ this.ChartDataSum }}</span></template>
|
<template slot="footer">资产总数:<span>{{ this.InstrumentCount+ this.FurnitureCount }}</span></template>
|
||||||
</chart-card>
|
</chart-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
||||||
|
@ -55,24 +55,6 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
cardCount: {
|
|
||||||
sll: 100,
|
|
||||||
bjl: 87,
|
|
||||||
isll: 15,
|
|
||||||
ibjl: 9
|
|
||||||
},
|
|
||||||
|
|
||||||
todaySll: 60,
|
|
||||||
todayBjl: 54,
|
|
||||||
todayISll: 13,
|
|
||||||
todayIBjl: 7,
|
|
||||||
|
|
||||||
chartData: {
|
|
||||||
sll: [],
|
|
||||||
bjl: [],
|
|
||||||
isll: [],
|
|
||||||
ibjl: []
|
|
||||||
},
|
|
||||||
PieChartData: [],
|
PieChartData: [],
|
||||||
ChartData: [],
|
ChartData: [],
|
||||||
ChartDataSum: 0,
|
ChartDataSum: 0,
|
||||||
|
@ -116,20 +98,10 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getSum() {
|
|
||||||
for (let i = 0; i < this.ChartData.length; i++) {
|
|
||||||
this.ChartDataSum += this.ChartData[i];
|
|
||||||
}
|
|
||||||
console.log(this.ChartDataSum);
|
|
||||||
},
|
|
||||||
drawChart() {
|
drawChart() {
|
||||||
// 基于准备好的dom,初始化echarts实例 这个和上面的main对应
|
// 基于准备好的dom,初始化echarts实例 这个和上面的main对应
|
||||||
let myChart = this.$echarts.init(document.getElementById("main"));
|
let myChart = this.$echarts.init(document.getElementById("main"));
|
||||||
// 计算资产总数
|
|
||||||
for (let i = 0; i < this.ChartData.length; i++) {
|
|
||||||
this.ChartDataSum += this.ChartData[i];
|
|
||||||
}
|
|
||||||
console.log(this.ChartDataSum);
|
|
||||||
// 指定图表的配置项和数据
|
// 指定图表的配置项和数据
|
||||||
let option = {
|
let option = {
|
||||||
title: {
|
title: {
|
||||||
|
@ -216,7 +188,7 @@ export default {
|
||||||
this.getFurnitureCount();
|
this.getFurnitureCount();
|
||||||
this.getInstrumentAmount();
|
this.getInstrumentAmount();
|
||||||
this.getFurnitureAmount();
|
this.getFurnitureAmount();
|
||||||
this.getSum(); // 调用 getSum 方法
|
// this.getSum();
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,23 +3,17 @@
|
||||||
|
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="5">
|
<a-col :span="5">
|
||||||
<locationaTree ref="locationaTree" :height="600" @onSelect="onSelect"></locationaTree>
|
<locationaTree ref="locationaTree" :height="600" @onSelect="onSelectTree"></locationaTree>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="19">
|
<a-col :span="19">
|
||||||
<!-- 查询区域 -->
|
<!-- 查询区域 -->
|
||||||
<div class="table-page-search-wrapper">
|
<div class="table-page-search-wrapper">
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :xl="7" :lg="7" :md="8" :sm="24">
|
<a-col :xl="5" :lg="7" :md="8" :sm="24">
|
||||||
<a-form-item label="领用人">
|
<a-auto-complete v-model="queryParam.recipient" :dataSource="UserdataSource" style="width: 200px"
|
||||||
<j-select-user-by-dep placeholder="请选择领用人" v-model="queryParam.recipient" />
|
placeholder="请选择领用人" @select="onSelect" @search="onSearch" @change="onChange" />
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
||||||
<a-form-item label="存放地址">
|
|
||||||
<j-select-user-by-dep placeholder="请选择领用人" v-model="queryParam.recipient" />
|
|
||||||
</a-form-item>
|
|
||||||
</a-col> -->
|
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<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="searchQuery" icon="search">查询</a-button>
|
||||||
|
@ -34,11 +28,9 @@
|
||||||
<!-- 操作按钮区域 -->
|
<!-- 操作按钮区域 -->
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||||
<a-button @click="addData()" type="primary" icon="plus">导数据</a-button>
|
|
||||||
|
|
||||||
<a-button type="primary" icon="download" @click="handleExportXls('家具信息表')">导出</a-button>
|
<a-button type="primary" icon="download" @click="handleExportXls('家具信息表')">导出</a-button>
|
||||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader"
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
|
||||||
:action="importExcelUrl" @change="handleImportExcel">
|
@change="handleImportExcel">
|
||||||
<a-button type="primary" icon="import">导入</a-button>
|
<a-button type="primary" icon="import">导入</a-button>
|
||||||
</a-upload>
|
</a-upload>
|
||||||
<!-- 高级查询区域 -->
|
<!-- 高级查询区域 -->
|
||||||
|
@ -65,8 +57,8 @@
|
||||||
|
|
||||||
<a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns"
|
<a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns"
|
||||||
:dataSource="dataSource" :pagination="ipagination" :loading="loading"
|
:dataSource="dataSource" :pagination="ipagination" :loading="loading"
|
||||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap"
|
||||||
class="j-table-force-nowrap" @change="handleTableChange">
|
@change="handleTableChange">
|
||||||
|
|
||||||
<template slot="usageYears" slot-scope="text">
|
<template slot="usageYears" slot-scope="text">
|
||||||
{{ text + '年' }}
|
{{ text + '年' }}
|
||||||
|
@ -101,8 +93,7 @@ import '@/assets/less/TableExpand.less'
|
||||||
import { mixinDevice } from '@/utils/mixin'
|
import { mixinDevice } from '@/utils/mixin'
|
||||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||||
import RmsFurnitureModal from './modules/RmsFurnitureModal'
|
import RmsFurnitureModal from './modules/RmsFurnitureModal'
|
||||||
import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
|
import { getAction } from '../../../api/manage'
|
||||||
import { postAction } from '../../../api/manage'
|
|
||||||
import RmsLocationModal from '../LocationList/modules/RmsLocationModal'
|
import RmsLocationModal from '../LocationList/modules/RmsLocationModal'
|
||||||
import locationaTree from '../components/locationaTree'
|
import locationaTree from '../components/locationaTree'
|
||||||
|
|
||||||
|
@ -116,7 +107,9 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
description: '家具信息表管理页面',
|
value: '',
|
||||||
|
dataSource: [],
|
||||||
|
UserdataSource: [],
|
||||||
// 表头
|
// 表头
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
@ -245,14 +238,14 @@ export default {
|
||||||
deleteBatch: "/rms/rmsFurniture/deleteBatch",
|
deleteBatch: "/rms/rmsFurniture/deleteBatch",
|
||||||
exportXlsUrl: "/rms/rmsFurniture/exportXls",
|
exportXlsUrl: "/rms/rmsFurniture/exportXls",
|
||||||
importExcelUrl: "rms/rmsFurniture/importExcel",
|
importExcelUrl: "rms/rmsFurniture/importExcel",
|
||||||
|
userUrl: "/sys/user/queryUserComponentData?column=createTime&order=desc&field=id,,username,realname,sex,phone,orgCodeTxt&pageNo=1&pageSize=100",
|
||||||
|
|
||||||
},
|
},
|
||||||
dictOptions: {},
|
UserList: {},
|
||||||
superFieldList: [],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getSuperFieldList();
|
this.getUserInfo();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
importExcelUrl: function () {
|
importExcelUrl: function () {
|
||||||
|
@ -260,43 +253,27 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addData() {
|
//获取用户信息
|
||||||
postAction("http://localhost:8088/jeecg-boot/rms/rmsInstrument/addData", {}).then(res => {
|
getUserInfo() {
|
||||||
this.loadData()
|
getAction(this.url.userUrl).then(res => {
|
||||||
|
this.UserList = res.result.records;
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
onSelect(selectedRowKeys) {
|
onSearch(query) {
|
||||||
|
this.UserdataSource = this.UserList.filter(user =>
|
||||||
|
user.username.includes(query) || user.realname.includes(query)
|
||||||
|
).map(user => ({
|
||||||
|
value: user.username,
|
||||||
|
text: user.realname
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
onSelectTree(selectedRowKeys) {
|
||||||
//将其切分为字符串
|
//将其切分为字符串
|
||||||
selectedRowKeys = selectedRowKeys.join(',')
|
selectedRowKeys = selectedRowKeys.join(',')
|
||||||
console.log(selectedRowKeys)
|
console.log(selectedRowKeys)
|
||||||
this.queryParam.locationId = selectedRowKeys
|
this.queryParam.locationId = selectedRowKeys
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
},
|
},
|
||||||
initDictConfig() {
|
|
||||||
},
|
|
||||||
getSuperFieldList() {
|
|
||||||
let fieldList = [];
|
|
||||||
fieldList.push({ type: 'sel_depart', value: 'collectingUnitNumber', text: '领用单位号' })
|
|
||||||
fieldList.push({ type: 'string', value: 'furnitureNumber', text: '家具编号', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'furnitureName', text: '家具名称', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'categoryId', text: '分类号', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'model', text: '型号', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'specifications', text: '规格', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'number', text: '数量', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'unitPrice', text: '单价', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'amount', text: '金额', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'manufactuer', text: '厂家', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'date', value: 'purchaseDate', text: '购置日期' })
|
|
||||||
fieldList.push({ type: 'sel_user', value: 'recipient', text: '领用人' })
|
|
||||||
fieldList.push({ type: 'string', value: 'documentNumber', text: '单据号', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'locationId', text: '存放地id', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'note', text: '备注', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'approvalStatus', text: '审核状态', dictCode: 'approval_status' })
|
|
||||||
fieldList.push({ type: 'string', value: 'initialAudit', text: '初审状态', dictCode: 'initial_audit' })
|
|
||||||
fieldList.push({ type: 'string', value: 'usageYears', text: '使用年限', dictCode: '' })
|
|
||||||
this.superFieldList = fieldList
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -2,17 +2,16 @@
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="5">
|
<a-col :span="5">
|
||||||
<locationaTree ref="locationaTree" :height="640" @onSelect="onSelect"></locationaTree>
|
<locationaTree ref="locationaTree" :height="640" @onSelect="onSelectTree"></locationaTree>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="19">
|
<a-col :span="19">
|
||||||
<!-- 查询区域 -->
|
<!-- 查询区域 -->
|
||||||
<div class="table-page-search-wrapper">
|
<div class="table-page-search-wrapper">
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :xl="7" :lg="7" :md="8" :sm="24">
|
<a-col :xl="5" :lg="7" :md="8" :sm="24">
|
||||||
<a-form-item label="领用人">
|
<a-auto-complete v-model="queryParam.recipient" :dataSource="UserdataSource" style="width: 200px"
|
||||||
<j-select-user-by-dep placeholder="请选择领用人" v-model="queryParam.recipient" />
|
placeholder="请选择领用人" @select="onSelect" @search="onSearch" @change="onChange" />
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
|
@ -23,8 +22,6 @@
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<!-- 查询区域-END -->
|
|
||||||
|
|
||||||
<!-- 操作按钮区域 -->
|
<!-- 操作按钮区域 -->
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||||
|
@ -33,9 +30,6 @@
|
||||||
@change="handleImportExcel">
|
@change="handleImportExcel">
|
||||||
<a-button type="primary" icon="import">导入</a-button>
|
<a-button type="primary" icon="import">导入</a-button>
|
||||||
</a-upload>
|
</a-upload>
|
||||||
<!-- 高级查询区域 -->
|
|
||||||
<j-super-query :fieldList="superFieldList" ref="superQueryModal"
|
|
||||||
@handleSuperQuery="handleSuperQuery"></j-super-query>
|
|
||||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
<a-menu slot="overlay">
|
<a-menu slot="overlay">
|
||||||
<a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
|
<a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
|
||||||
|
@ -43,7 +37,6 @@
|
||||||
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
|
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- table区域-begin -->
|
<!-- table区域-begin -->
|
||||||
<div>
|
<div>
|
||||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
||||||
|
@ -57,21 +50,6 @@
|
||||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap"
|
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
|
|
||||||
<template slot="htmlSlot" slot-scope="text">
|
|
||||||
<div v-html="text"></div>
|
|
||||||
</template>
|
|
||||||
<template slot="imgSlot" slot-scope="text,record">
|
|
||||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
|
||||||
<img v-else :src="getImgView(text)" :preview="record.id" 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="downloadFile(text)">
|
|
||||||
下载
|
|
||||||
</a-button>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="handleEdit(record)">编辑</a>
|
<a @click="handleEdit(record)">编辑</a>
|
||||||
|
|
||||||
|
@ -85,7 +63,6 @@
|
||||||
|
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<rms-instrument-modal ref="modalForm" @ok="modalFormOk"></rms-instrument-modal>
|
<rms-instrument-modal ref="modalForm" @ok="modalFormOk"></rms-instrument-modal>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
@ -93,12 +70,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getAction } from '@/api/manage'
|
||||||
import '@/assets/less/TableExpand.less'
|
import '@/assets/less/TableExpand.less'
|
||||||
import { mixinDevice } from '@/utils/mixin'
|
import { mixinDevice } from '@/utils/mixin'
|
||||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||||
import RmsInstrumentModal from './modules/RmsInstrumentModal'
|
import RmsInstrumentModal from './modules/RmsInstrumentModal'
|
||||||
import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
|
|
||||||
import RmsLocationModal from '../LocationList/modules/RmsLocationModal'
|
import RmsLocationModal from '../LocationList/modules/RmsLocationModal'
|
||||||
import locationaTree from '../components/locationaTree'
|
import locationaTree from '../components/locationaTree'
|
||||||
export default {
|
export default {
|
||||||
|
@ -111,7 +87,9 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
description: '仪器信息表管理页面',
|
value: '',
|
||||||
|
dataSource: [],
|
||||||
|
UserdataSource: [],
|
||||||
// 表头
|
// 表头
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
@ -232,14 +210,13 @@ export default {
|
||||||
deleteBatch: "/rms/rmsInstrument/deleteBatch",
|
deleteBatch: "/rms/rmsInstrument/deleteBatch",
|
||||||
exportXlsUrl: "/rms/rmsInstrument/exportXls",
|
exportXlsUrl: "/rms/rmsInstrument/exportXls",
|
||||||
importExcelUrl: "rms/rmsInstrument/importExcel",
|
importExcelUrl: "rms/rmsInstrument/importExcel",
|
||||||
|
userUrl: "/sys/user/queryUserComponentData?column=createTime&order=desc&field=id,,username,realname,sex,phone,orgCodeTxt&pageNo=1&pageSize=100",
|
||||||
},
|
},
|
||||||
dictOptions: {},
|
UserList: {},
|
||||||
superFieldList: [],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getSuperFieldList();
|
this.getUserInfo();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
importExcelUrl: function () {
|
importExcelUrl: function () {
|
||||||
|
@ -247,36 +224,27 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSelect(selectedRowKeys) {
|
//获取用户信息
|
||||||
|
getUserInfo() {
|
||||||
|
getAction(this.url.userUrl).then(res => {
|
||||||
|
this.UserList = res.result.records;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onSearch(query) {
|
||||||
|
this.UserdataSource = this.UserList.filter(user =>
|
||||||
|
user.username.includes(query) || user.realname.includes(query)
|
||||||
|
).map(user => ({
|
||||||
|
value: user.username,
|
||||||
|
text: user.realname
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
onSelectTree(selectedRowKeys) {
|
||||||
//将其切分为字符串
|
//将其切分为字符串
|
||||||
selectedRowKeys = selectedRowKeys.join(',')
|
selectedRowKeys = selectedRowKeys.join(',')
|
||||||
console.log(selectedRowKeys)
|
console.log(selectedRowKeys)
|
||||||
this.queryParam.locationId = selectedRowKeys
|
this.queryParam.locationId = selectedRowKeys
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
},
|
},
|
||||||
initDictConfig() {
|
|
||||||
},
|
|
||||||
getSuperFieldList() {
|
|
||||||
let fieldList = [];
|
|
||||||
fieldList.push({ type: 'sel_depart', value: 'collectingUnitNumber', text: '领用单位号' })
|
|
||||||
fieldList.push({ type: 'string', value: 'instrumentNumber', text: '仪器编号', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'instrumentName', text: '仪器名称', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'categoryId', text: '分类号', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'model', text: '型号', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'specifications', text: '规格', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'unitPrice', text: '单价', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'manufactuer', text: '厂家', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'date', value: 'purchaseDate', text: '购置日期' })
|
|
||||||
fieldList.push({ type: 'sel_user', value: 'recipient', text: '领用人' })
|
|
||||||
fieldList.push({ type: 'date', value: 'entryDate', text: '入库时间' })
|
|
||||||
fieldList.push({ type: 'string', value: 'documentNumber', text: '单据号', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'locationId', text: '存放地id', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'note', text: '备注', dictCode: '' })
|
|
||||||
fieldList.push({ type: 'string', value: 'approvalStatus', text: '审核状态', dictCode: 'approval_status' })
|
|
||||||
fieldList.push({ type: 'string', value: 'initialAudit', text: '初审状态', dictCode: 'initial_audit' })
|
|
||||||
fieldList.push({ type: 'string', value: 'instrumentId', text: 'ID', dictCode: '' })
|
|
||||||
this.superFieldList = fieldList
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -0,0 +1,327 @@
|
||||||
|
<template>
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="5">
|
||||||
|
<locationaTree ref="locationaTree" :height="640" @onSelect="onSelectTree"></locationaTree>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="19">
|
||||||
|
<!-- 查询区域 -->
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :xl="5" :lg="7" :md="8" :sm="24">
|
||||||
|
<a-auto-complete v-model="queryParam.recipient" :dataSource="UserdataSource" style="width: 200px"
|
||||||
|
placeholder="请选择领用人" @select="onSelect" @search="onSearch" @change="onChange" />
|
||||||
|
</a-col>
|
||||||
|
<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>
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<!-- 查询区域-END -->
|
||||||
|
|
||||||
|
<!-- 操作按钮区域 -->
|
||||||
|
<div class="table-operator">
|
||||||
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||||
|
<!-- <a-button @click="AddData()" type="primary" icon="plus">导数据</a-button> -->
|
||||||
|
|
||||||
|
<a-button type="primary" icon="download" @click="handleExportXls('无形资产')">导出</a-button>
|
||||||
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
|
||||||
|
@change="handleImportExcel">
|
||||||
|
<a-button type="primary" icon="import">导入</a-button>
|
||||||
|
</a-upload>
|
||||||
|
<!-- 高级查询区域 -->
|
||||||
|
<j-super-query :fieldList="superFieldList" ref="superQueryModal"
|
||||||
|
@handleSuperQuery="handleSuperQuery"></j-super-query>
|
||||||
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
|
<a-menu slot="overlay">
|
||||||
|
<a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
|
||||||
|
</a-dropdown>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- table区域-begin -->
|
||||||
|
<div>
|
||||||
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
||||||
|
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{
|
||||||
|
selectedRowKeys.length }}</a>项
|
||||||
|
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns"
|
||||||
|
:dataSource="dataSource" :pagination="ipagination" :loading="loading"
|
||||||
|
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" class="j-table-force-nowrap"
|
||||||
|
@change="handleTableChange">
|
||||||
|
|
||||||
|
<template slot="htmlSlot" slot-scope="text">
|
||||||
|
<div v-html="text"></div>
|
||||||
|
</template>
|
||||||
|
<template slot="imgSlot" slot-scope="text,record">
|
||||||
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
||||||
|
<img v-else :src="getImgView(text)" :preview="record.id" 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="downloadFile(text)">
|
||||||
|
下载
|
||||||
|
</a-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<span slot="action" slot-scope="text, record">
|
||||||
|
<a @click="handleEdit(record)">编辑</a>
|
||||||
|
|
||||||
|
<a-divider type="vertical" />
|
||||||
|
<a-dropdown>
|
||||||
|
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
|
||||||
|
<a-menu slot="overlay">
|
||||||
|
<a-menu-item>
|
||||||
|
<a @click="handleDetail(record)">详情</a>
|
||||||
|
</a-menu-item>
|
||||||
|
<a-menu-item>
|
||||||
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||||
|
<a>删除</a>
|
||||||
|
</a-popconfirm>
|
||||||
|
</a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
</a-dropdown>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<rms-intangible-modal ref="modalForm" @ok="modalFormOk"></rms-intangible-modal>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import '@/assets/less/TableExpand.less'
|
||||||
|
import { mixinDevice } from '@/utils/mixin'
|
||||||
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||||
|
import RmsIntangibleModal from './modules/RmsIntangibleModal.vue'
|
||||||
|
import { getAction } from '../../../api/manage'
|
||||||
|
import RmsLocationModal from '../LocationList/modules/RmsLocationModal'
|
||||||
|
import locationaTree from '../components/locationaTree'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'RmsIntangibleList',
|
||||||
|
mixins: [JeecgListMixin, mixinDevice],
|
||||||
|
components: {
|
||||||
|
RmsIntangibleModal,
|
||||||
|
RmsLocationModal,
|
||||||
|
locationaTree
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
value: '',
|
||||||
|
dataSource: [],
|
||||||
|
UserdataSource: [],
|
||||||
|
// 表头
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '资产编号',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'intangibleNumber',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '资产名称',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'intangibleName',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '领用单位号',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'collectingUnitNumber_dictText',
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '分类号',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'categoryId',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '单价',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'unitPrice',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '购置日期',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'purchaseDate',
|
||||||
|
customRender: function (text) {
|
||||||
|
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
|
||||||
|
},
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '专利申请号',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'patentApplicationNumber',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '发明人',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'inventor',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '发明名称',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'inventionName',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '注册日期',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'registrationDate',
|
||||||
|
customRender: function (text) {
|
||||||
|
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
|
||||||
|
},
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '注册机关',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'registrationAuthority',
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '授权公告日',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'authorizationAnnouncement',
|
||||||
|
customRender: function (text) {
|
||||||
|
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
|
||||||
|
},
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '批准文号',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'approvalNumber',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '领用人',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'recipient_dictText',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '入库时间',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'entryDate',
|
||||||
|
customRender: function (text) {
|
||||||
|
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
|
||||||
|
},
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '单据号',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'documentNumber',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '存放地址',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'locationName',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '备注',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'note',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '审核状态',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'approvalStatus_dictText',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '初审状态',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'initialAudit_dictText',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
align: "center",
|
||||||
|
fixed: "right",
|
||||||
|
width: 147,
|
||||||
|
scopedSlots: { customRender: 'action' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
url: {
|
||||||
|
list: "/rms/rmsIntangible/list",
|
||||||
|
delete: "/rms/rmsIntangible/delete",
|
||||||
|
deleteBatch: "/rms/rmsIntangible/deleteBatch",
|
||||||
|
exportXlsUrl: "/rms/rmsIntangible/exportXls",
|
||||||
|
importExcelUrl: "rms/rmsIntangible/importExcel",
|
||||||
|
userUrl: "/sys/user/queryUserComponentData?column=createTime&order=desc&field=id,,username,realname,sex,phone,orgCodeTxt&pageNo=1&pageSize=100",
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
UserList: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getUserInfo();
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
importExcelUrl: function () {
|
||||||
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// AddData(){
|
||||||
|
// getAction("/rms/rmsIntangible/addData").then(res => {
|
||||||
|
// console.log(res)
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
//获取用户信息
|
||||||
|
getUserInfo() {
|
||||||
|
getAction(this.url.userUrl).then(res => {
|
||||||
|
this.UserList = res.result.records;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onSearch(query) {
|
||||||
|
this.UserdataSource = this.UserList.filter(user =>
|
||||||
|
user.username.includes(query) || user.realname.includes(query)
|
||||||
|
).map(user => ({
|
||||||
|
value: user.username,
|
||||||
|
text: user.realname
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
onSelectTree(selectedRowKeys) {
|
||||||
|
//将其切分为字符串
|
||||||
|
selectedRowKeys = selectedRowKeys.join(',')
|
||||||
|
console.log(selectedRowKeys)
|
||||||
|
this.queryParam.locationId = selectedRowKeys
|
||||||
|
this.loadData(1)
|
||||||
|
},
|
||||||
|
initDictConfig() {
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
@import '~@assets/less/common.less';
|
||||||
|
</style>
|
|
@ -0,0 +1,268 @@
|
||||||
|
<template>
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<j-form-container :disabled="formDisabled">
|
||||||
|
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="领用单位号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="collectingUnitNumber">
|
||||||
|
<j-select-depart v-model="model.collectingUnitNumber" placeholder="请输入领用单位号"
|
||||||
|
:multi="false"></j-select-depart>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="资产编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="intangibleNumber">
|
||||||
|
<a-input v-model="model.intangibleNumber" placeholder="请输入资产编号"></a-input>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="资产名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="intangibleName">
|
||||||
|
<a-input v-model="model.intangibleName" placeholder="请输入资产名称"></a-input>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="分类号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId">
|
||||||
|
<a-input v-model="model.categoryId" placeholder="请输入分类号"></a-input>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unitPrice">
|
||||||
|
<a-input v-model="model.unitPrice" placeholder="请输入单价"></a-input>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="购置日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purchaseDate">
|
||||||
|
<j-date placeholder="请选择购置日期" v-model="model.purchaseDate" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="专利申请号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="patentApplicationNumber">
|
||||||
|
<a-input v-model="model.patentApplicationNumber" placeholder="请输入专利申请号"></a-input>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="发明人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventor">
|
||||||
|
<a-input v-model="model.inventor" placeholder="请输入发明人"></a-input>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="发明名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventionName">
|
||||||
|
<a-input v-model="model.inventionName" placeholder="请输入发明名称"></a-input>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="注册日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="registrationDate">
|
||||||
|
<j-date placeholder="请选择注册日期" v-model="model.registrationDate" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="注册机关" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="registrationAuthority">
|
||||||
|
<a-input v-model="model.registrationAuthority" placeholder="请输入注册机关"></a-input>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="授权公告日" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||||
|
prop="authorizationAnnouncement">
|
||||||
|
<j-date placeholder="请选择授权公告日" v-model="model.authorizationAnnouncement" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="批准文号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalNumber">
|
||||||
|
<a-input v-model="model.approvalNumber" placeholder="请输入批准文号"></a-input>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="领用人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="recipient">
|
||||||
|
<j-select-user-by-dep v-model="model.recipient" :multi="false" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="入库时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="entryDate">
|
||||||
|
<j-date placeholder="请选择入库时间" v-model="model.entryDate" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="单据号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="documentNumber">
|
||||||
|
<a-input v-model="model.documentNumber" placeholder="请输入单据号"></a-input>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="存放地地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationId">
|
||||||
|
<a-cascader :options="treeData" placeholder="请选择父级存放地址" @change="onChange"></a-cascader>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="note">
|
||||||
|
<a-input v-model="model.note" placeholder="请输入备注"></a-input>
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalStatus">
|
||||||
|
<j-dict-select-tag type="radio" v-model="model.approvalStatus" dictCode="approval_status"
|
||||||
|
placeholder="请选择审核状态" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-model-item label="初审状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAudit">
|
||||||
|
<j-dict-select-tag type="radio" v-model="model.initialAudit" dictCode="initial_audit"
|
||||||
|
placeholder="请选择初审状态" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</j-form-container>
|
||||||
|
</a-spin>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import { httpAction, getAction } from '@/api/manage'
|
||||||
|
import { validateDuplicateValue } from '@/utils/util'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'RmsIntangibleForm',
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
//表单禁用
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
required: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
model: {
|
||||||
|
},
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 5 },
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 16 },
|
||||||
|
},
|
||||||
|
confirmLoading: false,
|
||||||
|
validatorRules: {
|
||||||
|
approvalStatus: [
|
||||||
|
{ required: true, message: '请选择审核状态', trigger: 'change' },
|
||||||
|
],
|
||||||
|
initialAudit: [
|
||||||
|
{ required: true, message: '请选择初审状态', trigger: 'change' },
|
||||||
|
],
|
||||||
|
collectingUnitNumber: [
|
||||||
|
{ required: true, message: '请选择领用单位号', trigger: 'change' },
|
||||||
|
],
|
||||||
|
intangibleNumber: [
|
||||||
|
{ required: true, message: '请输入资产编号', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
intangibleName: [
|
||||||
|
{ required: true, message: '请输入资产名称', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
categoryId: [
|
||||||
|
{ required: true, message: '请输入分类号', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
unitPrice: [
|
||||||
|
{ required: true, message: '请输入单价', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
purchaseDate: [
|
||||||
|
{ required: true, message: '请选择购置日期', trigger: 'change' },
|
||||||
|
],
|
||||||
|
inventionName: [
|
||||||
|
{ required: true, message: '请输入发明名称', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
registrationDate: [
|
||||||
|
{ required: true, message: '请选择注册日期', trigger: 'change' },
|
||||||
|
],
|
||||||
|
registrationAuthority: [
|
||||||
|
{ required: true, message: '请输入注册机关', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
authorizationAnnouncement: [
|
||||||
|
{ required: true, message: '请选择授权公告日', trigger: 'change' },
|
||||||
|
],
|
||||||
|
approvalNumber: [
|
||||||
|
{ required: true, message: '请输入批准文号', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
recipient: [
|
||||||
|
{ required: true, message: '请选择领用人', trigger: 'change' },
|
||||||
|
],
|
||||||
|
entryDate: [
|
||||||
|
{ required: true, message: '请选择入库时间', trigger: 'change' },
|
||||||
|
],
|
||||||
|
documentNumber: [
|
||||||
|
{ required: true, message: '请输入单据号', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
locationId: [
|
||||||
|
{ required: true, message: '请选择存放地地址', trigger: 'change' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
add: "/rms/rmsIntangible/add",
|
||||||
|
edit: "/rms/rmsIntangible/edit",
|
||||||
|
queryById: "/rms/rmsIntangible/queryById"
|
||||||
|
},
|
||||||
|
treeData: [],
|
||||||
|
getTreeUrl: '/rms/rmsLocation/getCascader?type=1'
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
formDisabled() {
|
||||||
|
return this.disabled
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
//备份model原始值
|
||||||
|
this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
||||||
|
this.getTreeData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getTreeData() {
|
||||||
|
getAction(this.getTreeUrl, {}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.treeData = res.result;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onChange(value) {
|
||||||
|
this.model.locationId = value[value.length - 1];
|
||||||
|
},
|
||||||
|
add() {
|
||||||
|
this.edit(this.modelDefault);
|
||||||
|
},
|
||||||
|
edit(record) {
|
||||||
|
this.model = Object.assign({}, record);
|
||||||
|
this.visible = true;
|
||||||
|
},
|
||||||
|
submitForm() {
|
||||||
|
const that = this;
|
||||||
|
// 触发表单验证
|
||||||
|
this.$refs.form.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
that.confirmLoading = true;
|
||||||
|
let httpurl = '';
|
||||||
|
let method = '';
|
||||||
|
if (!this.model.id) {
|
||||||
|
httpurl += this.url.add;
|
||||||
|
method = 'post';
|
||||||
|
} else {
|
||||||
|
httpurl += this.url.edit;
|
||||||
|
method = 'put';
|
||||||
|
}
|
||||||
|
httpAction(httpurl, this.model, method).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
that.$message.success(res.message);
|
||||||
|
that.$emit('ok');
|
||||||
|
} else {
|
||||||
|
that.$message.warning(res.message);
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
that.confirmLoading = false;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -0,0 +1,84 @@
|
||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
placement="right"
|
||||||
|
:closable="false"
|
||||||
|
@close="close"
|
||||||
|
destroyOnClose
|
||||||
|
:visible="visible">
|
||||||
|
<rms-intangible-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></rms-intangible-form>
|
||||||
|
<div class="drawer-footer">
|
||||||
|
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||||
|
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import RmsIntangibleForm from './RmsIntangibleForm.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'RmsIntangibleModal',
|
||||||
|
components: {
|
||||||
|
RmsIntangibleForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:"操作",
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/** Button按钮间距 */
|
||||||
|
.ant-btn {
|
||||||
|
margin-left: 30px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.drawer-footer{
|
||||||
|
position: absolute;
|
||||||
|
bottom: -8px;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,60 @@
|
||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<rms-intangible-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rms-intangible-form>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import RmsIntangibleForm from './RmsIntangibleForm.vue'
|
||||||
|
export default {
|
||||||
|
name: 'RmsIntangibleModal',
|
||||||
|
components: {
|
||||||
|
RmsIntangibleForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:'',
|
||||||
|
width:1000,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in New Issue