资源管理1.1

This commit is contained in:
xbx 2023-11-19 20:32:19 +08:00
parent 00dc394dfc
commit 8291e41fd3
7 changed files with 608 additions and 637 deletions

View File

@ -6,7 +6,7 @@
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="领用人">
<j-select-user-by-dep placeholder="请选择领用人" v-model="queryParam.recipient"/>
<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">
@ -24,14 +24,16 @@
<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-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>
<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-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>
@ -40,22 +42,14 @@
<!-- 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>
<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"
<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">
@ -63,17 +57,12 @@
</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;"/>
<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 v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
下载
</a-button>
</template>
@ -106,200 +95,189 @@
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import RmsFurnitureModal from './modules/RmsFurnitureModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import RmsFurnitureModal from './modules/RmsFurnitureModal'
import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
export default {
name: 'RmsFurnitureList',
mixins:[JeecgListMixin, mixinDevice],
components: {
RmsFurnitureModal
},
data () {
return {
description: '家具信息表管理页面',
//
columns: [
// {
// title: '#',
// dataIndex: '',
// key:'rowIndex',
// width:60,
// align:"center",
// customRender:function (t,r,index) {
// return parseInt(index)+1;
// }
// },
{
title:'家具编号',
align:"center",
dataIndex: '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:80
},
{
title:'规格',
align:"center",
dataIndex: 'specifications',
width:80
},
{
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:120
},
{
title:'购置日期',
align:"center",
dataIndex: 'purchaseDate',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'领用人',
align:"center",
dataIndex: 'recipient_dictText',
width:80
},
{
title:'单据号',
align:"center",
dataIndex: 'documentNumber',
width:80
},
{
title:'存放地id',
align:"center",
dataIndex: 'locationId',
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:'使用年限',
align:"center",
dataIndex: 'usageYears'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/rms/rmsFurniture/list",
delete: "/rms/rmsFurniture/delete",
deleteBatch: "/rms/rmsFurniture/deleteBatch",
exportXlsUrl: "/rms/rmsFurniture/exportXls",
importExcelUrl: "rms/rmsFurniture/importExcel",
export default {
name: 'RmsFurnitureList',
mixins: [JeecgListMixin, mixinDevice],
components: {
RmsFurnitureModal
},
data() {
return {
description: '家具信息表管理页面',
//
columns: [
{
title: '家具编号',
align: "center",
dataIndex: 'furnitureNumber',
width: 120,
},
dictOptions:{},
superFieldList:[],
}
},
created() {
{
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: 80
},
{
title: '规格',
align: "center",
dataIndex: 'specifications',
width: 80
},
{
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: 120
},
{
title: '购置日期',
align: "center",
dataIndex: 'purchaseDate',
customRender: function (text) {
return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
}
},
{
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: 120
},
{
title: '审核状态',
align: "center",
dataIndex: 'approvalStatus_dictText',
width: 120
},
{
title: '初审状态',
align: "center",
dataIndex: 'initialAudit_dictText',
width: 120
},
{
title: '使用年限',
align: "center",
dataIndex: 'usageYears'
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/rms/rmsFurniture/list",
delete: "/rms/rmsFurniture/delete",
deleteBatch: "/rms/rmsFurniture/deleteBatch",
exportXlsUrl: "/rms/rmsFurniture/exportXls",
importExcelUrl: "rms/rmsFurniture/importExcel",
},
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig() {
},
methods: {
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
}
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>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>

View File

@ -5,57 +5,57 @@
<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="true" />
<j-select-depart v-model="model.collectingUnitNumber" :multi="true" />
</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-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-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-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-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-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-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-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-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-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%" />
<j-date placeholder="请选择购置日期" v-model="model.purchaseDate" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -65,32 +65,34 @@
</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-input v-model="model.documentNumber" placeholder="请输入单据号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="存放地id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationId">
<a-input v-model="model.locationId" placeholder="请输入存放地id" ></a-input>
<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-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="请选择审核状态" />
<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="请选择初审状态" />
<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-input v-model="model.usageYears" placeholder="请输入使用年限"></a-input>
</a-form-model-item>
</a-col>
</a-row>
@ -101,89 +103,102 @@
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'RmsFurnitureForm',
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: {
},
url: {
add: "/rms/rmsFurniture/add",
edit: "/rms/rmsFurniture/edit",
queryById: "/rms/rmsFurniture/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
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;
})
}
})
},
export default {
name: 'RmsFurnitureForm',
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: {
},
url: {
add: "/rms/rmsFurniture/add",
edit: "/rms/rmsFurniture/edit",
queryById: "/rms/rmsFurniture/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

@ -6,7 +6,7 @@
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="领用人">
<j-select-user-by-dep placeholder="请选择领用人" v-model="queryParam.recipient"/>
<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">
@ -24,14 +24,16 @@
<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-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>
<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-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>
@ -40,22 +42,14 @@
<!-- 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>
<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"
<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">
@ -63,17 +57,12 @@
</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;"/>
<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 v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
下载
</a-button>
</template>
@ -106,198 +95,182 @@
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import RmsInstrumentModal from './modules/RmsInstrumentModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import RmsInstrumentModal from './modules/RmsInstrumentModal'
import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
export default {
name: 'RmsInstrumentList',
mixins:[JeecgListMixin, mixinDevice],
components: {
RmsInstrumentModal
},
data () {
return {
description: '仪器信息表管理页面',
//
columns: [
// {
// title: '#',
// dataIndex: '',
// key:'rowIndex',
// width:60,
// align:"center",
// customRender:function (t,r,index) {
// return parseInt(index)+1;
// }
// },
{
title:'ID',
align:"center",
dataIndex: 'instrumentId',
width:80
},
{
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:'存放地id',
align:"center",
dataIndex: 'locationId',
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/rmsInstrument/list",
delete: "/rms/rmsInstrument/delete",
deleteBatch: "/rms/rmsInstrument/deleteBatch",
exportXlsUrl: "/rms/rmsInstrument/exportXls",
importExcelUrl: "rms/rmsInstrument/importExcel",
export default {
name: 'RmsInstrumentList',
mixins: [JeecgListMixin, mixinDevice],
components: {
RmsInstrumentModal
},
data() {
return {
description: '仪器信息表管理页面',
//
columns: [
{
title: '仪器编号',
align: "center",
dataIndex: 'instrumentNumber',
width: 120
},
dictOptions:{},
superFieldList:[],
}
},
created() {
{
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: 147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/rms/rmsInstrument/list",
delete: "/rms/rmsInstrument/delete",
deleteBatch: "/rms/rmsInstrument/deleteBatch",
exportXlsUrl: "/rms/rmsInstrument/exportXls",
importExcelUrl: "rms/rmsInstrument/importExcel",
},
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig() {
},
methods: {
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
}
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>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>

View File

@ -5,47 +5,47 @@
<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="true" />
<j-select-depart v-model="model.collectingUnitNumber" :multi="true" />
</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-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-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-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-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-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-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-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%" />
<j-date placeholder="请选择购置日期" v-model="model.purchasedate" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -55,37 +55,34 @@
</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%" />
<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-input v-model="model.documentNumber" placeholder="请输入单据号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="存放地id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationId">
<a-input v-model="model.locationId" placeholder="请输入存放地id" ></a-input>
<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-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="请选择审核状态" />
<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="ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="instrumentId">
<a-input v-model="model.instrumentId" placeholder="请输入ID" ></a-input>
<j-dict-select-tag type="radio" v-model="model.initialAudit" dictCode="initial_audit"
placeholder="请选择初审状态" />
</a-form-model-item>
</a-col>
</a-row>
@ -96,89 +93,102 @@
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'RmsInstrumentForm',
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: {
},
url: {
add: "/rms/rmsInstrument/add",
edit: "/rms/rmsInstrument/edit",
queryById: "/rms/rmsInstrument/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
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;
})
}
})
},
export default {
name: 'RmsInstrumentForm',
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: {
},
url: {
add: "/rms/rmsInstrument/add",
edit: "/rms/rmsInstrument/edit",
queryById: "/rms/rmsInstrument/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

@ -72,11 +72,6 @@ export default {
align: "center",
dataIndex: 'sortNumber'
},
{
title: '父级存放地址',
align: "center",
dataIndex: 'parentLocationId'
},
{
title: '操作',
dataIndex: 'action',
@ -109,7 +104,7 @@ export default {
selectedRowKeys = selectedRowKeys.join(',')
console.log(selectedRowKeys)
this.queryParam.id = selectedRowKeys
this.loadData()
this.loadData(1)
},
modalFormOk() {
this.$refs.locationaTree.getTreeData()

View File

@ -63,7 +63,7 @@ export default {
queryById: "/rms/rmsLocation/queryById"
},
treeData: [],
getTreeUrl: '/rms/rmsLocation/getCascader'
getTreeUrl: '/rms/rmsLocation/getCascader?type=0'
}
},
computed: {

View File

@ -69,16 +69,16 @@ export default {
//
this.$emit('onSelect', childKeys);
},
//key
collectChildKeys(node, keys = []) {
if (!node) {
return keys;
}
// children
if (node.children && node.children.length > 0) {
node.children.forEach(child => {
// childrenkey
if (node.children) {
for (let child of node.children) {
keys.push(child.key);
this.collectChildKeys(child, keys);
});
}
}
return keys;
},