新增学院资产清单

This commit is contained in:
xbx 2023-12-03 13:19:57 +08:00
parent 58757f7943
commit a7440715fb
18 changed files with 2217 additions and 16 deletions

BIN
src/assets/collegelogo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
src/assets/schoollogo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

View File

@ -0,0 +1,328 @@
<template>
<a-card :bordered="false" style="height: 770px;">
<a-row>
<a-col :span="5">
<locationaTree ref="locationaTree" :height="600" @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" 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-col :xl="2" >
<img style="height: 55px;" src="@/assets/collegelogo.jpg" alt="image">
</a-col>
<a-col :xl="4">
<p style="font-size: 20px; padding-top: 10px;">学院资产信息</p>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" 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>
<a-button type="primary" icon="zoom-in" @click="showHistoryModal">历史数据</a-button>
<a-modal v-model="historyModalVisible" title="历史数据" @ok="closeHistoryModal">
<div class="modal-content">
<!-- 在这里显示历史数据 -->
<div v-for="TimestampData in historyData" :key="TimestampData.id" class="container">
<div class="left">
<p style="font-size: 17px;">{{ TimestampData }}</p>
</div>
<div class="right">
<a-button type="primary" icon="download" @click="ExportData('家具信息表(学院)', TimestampData)">导出</a-button>
</div>
</div>
</div>
</a-modal>
<!-- 高级查询区域 -->
<!-- <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-row>
<!-- <a-col :span=""> -->
<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="usageYears" slot-scope="text">
{{ text + '年' }}
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
</span>
</a-table>
<!-- </a-col> -->
</a-row>
</div>
<rms-furniture-college-modal ref="modalForm" @ok="modalFormOk"></rms-furniture-college-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 RmsFurnitureCollegeModal from './modules/RmsFurnitureCollegeModal.vue'
import { getAction } from '../../../api/manage'
import RmsLocationModal from '../LocationList/modules/RmsLocationModal'
import locationaTree from '../components/locationaTree'
export default {
name: 'RmsFurnitureCollegeList',
mixins: [JeecgListMixin, mixinDevice],
components: {
RmsFurnitureCollegeModal,
RmsLocationModal,
locationaTree
},
data() {
return {
value: '',
dataSource: [],
UserdataSource: [],
//
columns: [
{
title: '家具编号',
align: "center",
dataIndex: 'furnitureNumber',
width: 120,
},
{
title: '家具名称',
align: "center",
dataIndex: 'furnitureName',
width: 120,
},
{
title: '领用单位号',
align: "center",
dataIndex: 'collectingUnitNumber_dictText',
width: 200
},
{
title: '分类号',
align: "center",
dataIndex: 'categoryId',
width: 120,
},
{
title: '型号',
align: "center",
dataIndex: 'model',
width: 120
},
{
title: '规格',
align: "center",
dataIndex: 'specifications',
width: 150
},
{
title: '数量',
align: "center",
dataIndex: 'number',
width: 80
},
{
title: '单价',
align: "center",
dataIndex: 'unitPrice',
width: 80
},
{
title: '金额',
align: "center",
dataIndex: 'amount',
width: 80
},
{
title: '厂家',
align: "center",
dataIndex: 'manufactuer',
width: 200
},
{
title: '购置日期',
align: "center",
dataIndex: 'purchaseDate',
customRender: function (text) {
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
},
width: 120
},
{
title: '领用人',
align: "center",
dataIndex: 'recipient_dictText',
width: 80
},
{
title: '单据号',
align: "center",
dataIndex: 'documentNumber',
width: 80
},
{
title: '存放地址',
align: "center",
dataIndex: 'locationName',
width: 120
},
{
title: '备注',
align: "center",
dataIndex: 'note',
width: 180
},
{
title: '审核状态',
align: "center",
dataIndex: 'approvalStatus_dictText',
width: 120
},
{
title: '初审状态',
align: "center",
dataIndex: 'initialAudit_dictText',
width: 120
},
{
title: '使用年限',
align: "center",
dataIndex: 'usageYears',
scopedSlots: { customRender: 'usageYears' }
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 160,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/rms/rmsFurnitureCollege/list",
delete: "/rms/rmsFurnitureCollege/delete",
deleteBatch: "/rms/rmsFurnitureCollege/deleteBatch",
exportXlsUrl: "/rms/rmsFurnitureCollege/exportXls",
importExcelUrl: "rms/rmsFurnitureCollege/importExcel",
userUrl: "/sys/user/queryUserComponentData?column=createTime&order=desc&field=id,,username,realname,sex,phone,orgCodeTxt&pageNo=1&pageSize=100",
timestampUrl: "/rms/rmsFurnitureCollege/getTimestamp",
},
UserList: {},
historyModalVisible: false, //
historyData: [] //
}
},
created() {
this.getUserInfo();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
showHistoryModal() {
getAction(this.url.timestampUrl).then(res => {
console.log(res)
this.historyData = res;
})
this.historyModalVisible = true; //
},
closeHistoryModal() {
this.historyModalVisible = false; //
},
//
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)
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.modal-content {
max-height: 400px; /* 设置最大高度,根据需要进行调整 */
overflow-y: auto; /* 添加垂直滚动条 */
}
.container {
display: flex;
align-items: center;
}
.left {
flex: 1;
}
.right {
margin-left: 10px;
}
</style>

View File

@ -0,0 +1,249 @@
<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" :multi="false" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="家具编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="furnitureNumber">
<a-input v-model="model.furnitureNumber" placeholder="请输入家具编号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="家具名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="furnitureName">
<a-input v-model="model.furnitureName" 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="model">
<a-input v-model="model.model" placeholder="请输入型号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
<a-input v-model="model.specifications" placeholder="请输入规格"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="number">
<a-input v-model="model.number" 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="amount">
<a-input v-model="model.amount" placeholder="请输入金额"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="厂家" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manufactuer">
<a-input v-model="model.manufactuer" 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="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="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-col :span="12">
<a-form-model-item label="使用年限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="usageYears">
<a-input v-model="model.usageYears" placeholder="请输入使用年限"></a-input>
</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: 'RmsFurnitureCollegeForm',
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' },
],
furnitureNumber: [
{ required: true, message: '请输入家具编号', trigger: 'blur' },
],
furnitureName: [
{ required: true, message: '请输入家具名称', trigger: 'blur' },
],
categoryId: [
{ required: true, message: '请输入分类号', trigger: 'blur' },
],
number: [
{ required: true, message: '请输入数量', trigger: 'blur' },
],
unitPrice: [
{ required: true, message: '请输入单价', trigger: 'blur' },
],
amount: [
{ required: true, message: '请输入金额', trigger: 'blur' },
],
manufactuer: [
{ required: true, message: '请输入厂家', trigger: 'blur' },
],
purchaseDate: [
{ required: true, message: '请选择购置日期', trigger: 'change' },
],
recipient: [
{ required: true, message: '请选择领用人', trigger: 'change' },
],
documentNumber: [
{ required: true, message: '请输入单据号', trigger: 'blur' },
],
locationId: [
{ required: true, message: '请选择存放地地址', trigger: 'change' },
],
usageYears: [
{ required: true, message: '请输入使用年限', trigger: 'blur' },
]
},
url: {
add: "/rms/rmsFurnitureCollege/add",
edit: "/rms/rmsFurnitureCollege/edit",
queryById: "/rms/rmsFurnitureCollege/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>

View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<rms-furniture-college-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></rms-furniture-college-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 RmsFurnitureCollegeForm from './RmsFurnitureCollegeForm.vue'
export default {
name: 'RmsFurnitureCollegeModal',
components: {
RmsFurnitureCollegeForm
},
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>

View File

@ -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-furniture-college-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rms-furniture-college-form>
</j-modal>
</template>
<script>
import RmsFurnitureCollegeForm from './RmsFurnitureCollegeForm.vue'
export default {
name: 'RmsFurnitureCollegeModal',
components: {
RmsFurnitureCollegeForm
},
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>

View File

@ -1,6 +1,5 @@
<template>
<a-card :bordered="false" style="height: 770px;">
<a-row>
<a-col :span="5">
<locationaTree ref="locationaTree" :height="600" @onSelect="onSelectTree"></locationaTree>
@ -20,6 +19,12 @@
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
<a-col :xl="2" :lg="7" :md="8" :sm="24">
<img style="height: 55px;" src="@/assets/schoollogo.jpg" alt="image">
</a-col>
<a-col :xl="4" :lg="7" :md="8" :sm="24">
<p style="font-size: 20px; padding-top: 10px;">学校资产信息</p>
</a-col>
</a-row>
</a-form>
</div>

View File

@ -0,0 +1,310 @@
<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" 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-col :xl="2" >
<img style="height: 55px;" src="@/assets/collegelogo.jpg" alt="image">
</a-col>
<a-col :xl="4">
<p style="font-size: 20px; padding-top: 10px;">学院资产信息</p>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" 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>
<a-button type="primary" icon="zoom-in" @click="showHistoryModal">历史数据</a-button>
<a-modal v-model="historyModalVisible" title="历史数据" @ok="closeHistoryModal">
<div class="modal-content">
<!-- 在这里显示历史数据 -->
<div v-for="TimestampData in historyData" :key="TimestampData.id" class="container">
<div class="left">
<p style="font-size: 17px;">{{ TimestampData }}</p>
</div>
<div class="right">
<a-button type="primary" icon="download"
@click="ExportData('家具信息表', TimestampData)">导出</a-button>
</div>
</div>
</div>
</a-modal>
<!-- 高级查询区域 -->
<!-- <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 -->
<!-- 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">
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
</span>
</a-table>
</div>
<rms-instrument-college-modal ref="modalForm" @ok="modalFormOk"></rms-instrument-college-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 RmsInstrumentCollegeModal from './modules/RmsInstrumentCollegeModal.vue'
import { getAction } from '@/api/manage'
import RmsLocationModal from '../LocationList/modules/RmsLocationModal'
import locationaTree from '../components/locationaTree'
export default {
name: 'RmsInstrumentCollegeList',
mixins: [JeecgListMixin, mixinDevice],
components: {
RmsInstrumentCollegeModal,
RmsLocationModal,
locationaTree
},
data() {
return {
value: '',
dataSource: [],
UserdataSource: [],
//
columns: [
{
title: '仪器编号',
align: "center",
dataIndex: 'instrumentNumber',
width: 120
},
{
title: '仪器名称',
align: "center",
dataIndex: 'instrumentName',
width: 120
},
{
title: '领用单位号',
align: "center",
dataIndex: 'collectingUnitNumber_dictText',
width: 200
},
{
title: '分类号',
align: "center",
dataIndex: 'categoryId',
width: 120
},
{
title: '型号',
align: "center",
dataIndex: 'model',
width: 120
},
{
title: '规格',
align: "center",
dataIndex: 'specifications',
width: 120
},
{
title: '单价',
align: "center",
dataIndex: 'unitPrice',
width: 120
},
{
title: '厂家',
align: "center",
dataIndex: 'manufactuer',
width: 200
},
{
title: '购置日期',
align: "center",
dataIndex: 'purchaseDate',
customRender: function (text) {
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
},
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: 80
},
{
title: '单据号',
align: "center",
dataIndex: 'documentNumber'
},
{
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: 160,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/rms/rmsInstrumentCollege/list",
delete: "/rms/rmsInstrumentCollege/delete",
deleteBatch: "/rms/rmsInstrumentCollege/deleteBatch",
exportXlsUrl: "/rms/rmsInstrumentCollege/exportXls",
importExcelUrl: "rms/rmsInstrumentCollege/importExcel",
userUrl: "/sys/user/queryUserComponentData?column=createTime&order=desc&field=id,,username,realname,sex,phone,orgCodeTxt&pageNo=1&pageSize=100",
timestampUrl: "/rms/rmsInstrumentCollege/getTimestamp",
},
UserList: {},
historyModalVisible: false, //
historyData: [] //
}
},
created() {
this.getUserInfo();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
showHistoryModal() {
getAction(this.url.timestampUrl).then(res => {
console.log(res)
this.historyData = res;
})
this.historyModalVisible = true; //
},
closeHistoryModal() {
this.historyModalVisible = false; //
},
//
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)
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.modal-content {
max-height: 400px; /* 设置最大高度,根据需要进行调整 */
overflow-y: auto; /* 添加垂直滚动条 */
}
.container {
display: flex;
align-items: center;
}
.left {
flex: 1;
}
.right {
margin-left: 10px;
}
</style>

View File

@ -0,0 +1,233 @@
<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" :multi="false" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="仪器编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentNumber">
<a-input v-model="model.instrumentNumber" placeholder="请输入仪器编号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="仪器名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentName">
<a-input v-model="model.instrumentName" 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="model">
<a-input v-model="model.model" placeholder="请输入型号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specifications">
<a-input v-model="model.specifications" 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="manufactuer">
<a-input v-model="model.manufactuer" 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="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: 'RmsInstrumentCollegeForm',
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' },
],
instrumentNumber: [
{ required: true, message: '请输入家具编号', trigger: 'blur' },
],
instrumentName: [
{ required: true, message: '请输入家具名称', trigger: 'blur' },
],
categoryId: [
{ required: true, message: '请输入分类号', trigger: 'blur' },
],
unitPrice: [
{ required: true, message: '请输入单价', trigger: 'blur' },
],
manufactuer: [
{ required: true, message: '请输入厂家', trigger: 'blur' },
],
purchaseDate: [
{ required: true, message: '请选择购置日期', trigger: 'change' },
],
recipient: [
{ required: true, message: '请选择领用人', trigger: 'change' },
],
entryDate: [
{ required: true, message: '请选择入库时间', trigger: 'change' },
],
documentNumber: [
{ required: true, message: '请输入单据号', trigger: 'blur' },
],
locationId: [
{ required: true, message: '请选择存放地地址', trigger: 'blur' },
],
},
url: {
add: "/rms/rmsInstrumentCollege/add",
edit: "/rms/rmsInstrumentCollege/edit",
queryById: "/rms/rmsInstrumentCollege/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>

View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<rms-instrument-college-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></rms-instrument-college-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 RmsInstrumentCollegeForm from './RmsInstrumentCollegeForm.vue'
export default {
name: 'RmsInstrumentCollegeModal',
components: {
RmsInstrumentCollegeForm
},
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>

View File

@ -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-instrument-college-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rms-instrument-college-form>
</j-modal>
</template>
<script>
import RmsInstrumentCollegeForm from './RmsInstrumentCollegeForm.vue'
export default {
name: 'RmsInstrumentCollegeModal',
components: {
RmsInstrumentCollegeForm
},
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>

View File

@ -5,13 +5,14 @@
<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"
placeholder="请选择领用人" @select="onSelect" @search="onSearch" @change="onChange" />
<a-auto-complete v-model="queryParam.recipient" :dataSource="UserdataSource" 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">
@ -19,14 +20,19 @@
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
<a-col :xl="2" :lg="7" :md="8" :sm="24">
<img style="height: 55px;" src="@/assets/schoollogo.jpg" alt="image">
</a-col>
<a-col :xl="4" :lg="7" :md="8" :sm="24">
<p style="font-size: 20px; padding-top: 10px;">学校资产信息</p>
</a-col>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!-- <a-button @click="AddDataInstrument()" 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" :action="importExcelUrl"
@change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
@ -40,8 +46,7 @@
<p style="font-size: 17px;">{{ TimestampData }}</p>
</div>
<div class="right">
<a-button type="primary" icon="download"
@click="ExportData('仪器信息表', TimestampData)">导出</a-button>
<a-button type="primary" icon="download" @click="ExportData('家具信息表', TimestampData)">导出</a-button>
</div>
</div>
</div>
@ -79,7 +84,6 @@
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
</span>
</a-table>
</div>
<rms-instrument-modal ref="modalForm" @ok="modalFormOk"></rms-instrument-modal>
@ -319,10 +323,14 @@ export default {
</script>
<style scoped>
@import '~@assets/less/common.less';
.modal-content {
max-height: 400px; /* 设置最大高度,根据需要进行调整 */
overflow-y: auto; /* 添加垂直滚动条 */
max-height: 400px;
/* 设置最大高度,根据需要进行调整 */
overflow-y: auto;
/* 添加垂直滚动条 */
}
.container {
display: flex;
align-items: center;

View File

@ -0,0 +1,363 @@
<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" 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-col :xl="2" >
<img style="height: 55px;" src="@/assets/collegelogo.jpg" alt="image">
</a-col>
<a-col :xl="4">
<p style="font-size: 20px; padding-top: 10px;">学院资产信息</p>
</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>
<a-button type="primary" icon="zoom-in" @click="showHistoryModal">历史数据</a-button>
<a-modal v-model="historyModalVisible" title="历史数据" @ok="closeHistoryModal">
<div class="modal-content">
<!-- 在这里显示历史数据 -->
<div v-for="TimestampData in historyData" :key="TimestampData.id" class="container">
<div class="left">
<p style="font-size: 17px;">{{ TimestampData }}</p>
</div>
<div class="right">
<a-button type="primary" icon="download" @click="ExportData('无形资产信息表(学院)', TimestampData)">导出</a-button>
</div>
</div>
</div>
</a-modal>
<!-- 高级查询区域 -->
<!-- <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-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
</span>
</a-table>
</div>
<rms-intangible-college-modal ref="modalForm" @ok="modalFormOk"></rms-intangible-college-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 RmsIntangibleCollegeModal from './modules/RmsIntangibleCollegeModal.vue'
import { getAction } from '@/api/manage'
import RmsLocationModal from '../LocationList/modules/RmsLocationModal'
import locationaTree from '../components/locationaTree'
export default {
name: 'RmsIntangibleCollegeList',
mixins: [JeecgListMixin, mixinDevice],
components: {
RmsIntangibleCollegeModal,
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/rmsIntangibleCollege/list",
delete: "/rms/rmsIntangibleCollege/delete",
deleteBatch: "/rms/rmsIntangibleCollege/deleteBatch",
exportXlsUrl: "/rms/rmsIntangibleCollege/exportXls",
importExcelUrl: "rms/rmsIntangibleCollege/importExcel",
userUrl: "/sys/user/queryUserComponentData?column=createTime&order=desc&field=id,,username,realname,sex,phone,orgCodeTxt&pageNo=1&pageSize=100",
timestampUrl: "/rms/rmsInstrumentCollege/getTimestamp",
},
UserList: {},
historyModalVisible: false, //
historyData: [] //
}
},
created() {
this.getUserInfo();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
showHistoryModal() {
getAction(this.url.timestampUrl).then(res => {
console.log(res)
this.historyData = res;
})
this.historyModalVisible = true; //
},
closeHistoryModal() {
this.historyModalVisible = false; //
},
//
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
}));
console.log(this.UserdataSource)
},
onSelectTree(selectedRowKeys) {
//
selectedRowKeys = selectedRowKeys.join(',')
console.log(selectedRowKeys)
this.queryParam.locationId = selectedRowKeys
this.loadData(1)
},
initDictConfig() {
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.modal-content {
max-height: 400px;
/* 设置最大高度,根据需要进行调整 */
overflow-y: auto;
/* 添加垂直滚动条 */
}
.container {
display: flex;
align-items: center;
}
.left {
flex: 1;
}
.right {
margin-left: 10px;
}
</style>

View File

@ -0,0 +1,266 @@
<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: 'RmsIntangibleCollegeForm',
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/rmsIntangibleCollege/add",
edit: "/rms/rmsIntangibleCollege/edit",
queryById: "/rms/rmsIntangibleCollege/queryById"
},
treeData: [],
getTreeUrl: '/rms/rmsLocation/getCascader?type=1'
}
},
computed: {
formDisabled() {
return this.disabled
},
},
created() {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
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>

View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<rms-intangible-college-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></rms-intangible-college-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 RmsIntangibleCollegeForm from './RmsIntangibleCollegeForm.vue'
export default {
name: 'RmsIntangibleCollegeModal',
components: {
RmsIntangibleCollegeForm
},
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>

View File

@ -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-college-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rms-intangible-college-form>
</j-modal>
</template>
<script>
import RmsIntangibleCollegeForm from './RmsIntangibleCollegeForm.vue'
export default {
name: 'RmsIntangibleCollegeModal',
components: {
RmsIntangibleCollegeForm
},
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>

View File

@ -19,6 +19,12 @@
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
<a-col :xl="2" :lg="7" :md="8" :sm="24">
<img style="height: 55px;" src="@/assets/schoollogo.jpg" alt="image">
</a-col>
<a-col :xl="4" :lg="7" :md="8" :sm="24">
<p style="font-size: 20px; padding-top: 10px;">学校资产信息</p>
</a-col>
</a-row>
</a-form>
</div>
@ -362,4 +368,5 @@ export default {
.right {
margin-left: 10px;
}</style>
}
</style>

View File

@ -2,7 +2,7 @@
<div>
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item required prop="username">
<a-input v-model="model.username" size="large" placeholder="请输入帐户名 / admin">
<a-input v-model="model.username" size="large" placeholder="请输入帐户名 / rmstest">
<a-icon slot="prefix" type="user" :style="{ color: 'rgba(0,0,0,.25)' }" />
</a-input>
</a-form-model-item>
@ -12,7 +12,7 @@
size="large"
type="password"
autocomplete="false"
placeholder="请输入密码 / 123456"
placeholder="请输入密码 / Rms123456."
>
<a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }" />
</a-input>
@ -35,8 +35,8 @@ export default {
currdatetime: '',
loginType: 0,
model: {
username: 'admin',
password: '123456'
username: 'rmstest',
password: 'Rms123456.'
},
validatorRules: {
username: [{ required: true, message: '请输入用户名!' }, { validator: this.handleUsernameOrEmail }],