Commit 7afc0229 authored by 李苏's avatar 李苏 💬

基础参数配置大菜单完成

parent 4fb25156
# 页面标题 # 页面标题
VUE_APP_TITLE = gavel-budgetms-vue VUE_APP_TITLE = 国网徐州公司预算管理
# 开发环境配置 # 开发环境配置
ENV = 'http://demo.ruoyi.vip/' ENV = 'http://demo.ruoyi.vip/'
......
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/budgetms/sggcxm/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/budgetms/sggcxm/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/budgetms/sggcxm/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/budgetms/sggcxm/delete',
method: 'post',
data: query||{}
})
}
/* 关闭 */
export function closeGcxm(query) {
return request({
url: '/budgetms/sggcxm/closeGcxm',
method: 'post',
data: query||{}
})
}
export function cancelCloseGcxm(query) {
return request({
url: '/budgetms/sggcxm/cancelCloseGcxm',
method: 'post',
data: query||{}
})
}
/* 取关 */
export function doDbsz(query) {
return request({
url: '/budgetms/sggcxm/doDbsz',
method: 'post',
data: query||{}
})
}
/* 导入 */
export function excelimport(query) {
return request({
'Content-type' : 'multipart/form-data',
url: '/budgetms/sggcxm/excel/import',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/budgetms/pzfyxm/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/budgetms/pzfyxm/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/budgetms/pzfyxm/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/budgetms/pzfyxm/delete',
method: 'post',
data: query||{}
})
}
export function qt(query) {
return request({
url: '/budgetms/pzfyxm/record/qt',
method: 'post',
data: query||{}
})
}
\ No newline at end of file
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/budgetms/xmgl/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/budgetms/xmgl/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/budgetms/xmgl/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/budgetms/xmgl/delete',
method: 'post',
data: query||{}
})
}
/* 导入 */
export function excelimport(query) {
return request({
'Content-type' : 'multipart/form-data',
url: '/budgetms/xmgl/excel/import',
method: 'post',
data: query||{}
})
}
export function initZblx(query) {
return request({
url: '/budgetms/xmgl/init/zblx',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/budgetms/ysjsfs/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/budgetms/ysjsfs/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/budgetms/ysjsfs/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/budgetms/ysjsfs/delete',
method: 'post',
data: query||{}
})
}
export function qt(query) {
return request({
url: '/budgetms/ysjsfs/record/qt',
method: 'post',
data: query||{}
})
}
\ No newline at end of file
...@@ -74,7 +74,97 @@ export const powerRoutes=[ ...@@ -74,7 +74,97 @@ export const powerRoutes=[
}, },
name:'erpKjkm', name:'erpKjkm',
path:"erpKjkm" path:"erpKjkm"
},
{
component:'jccspz/fymxwd/index',
hidden:false,
meta:{
"title": "费用明细维度(关联用)",
"icon": "",
"noCache": false,
"link": null,
"mkid":901010700,
},
name:'fymxwd',
path:"fymxwd"
},
{
component:'jccspz/zbfs/index',
hidden:false,
meta:{
"title": "中标方式",
"icon": "",
"noCache": false,
"link": null,
"mkid":901030320,
},
name:'zbfs',
path:"zbfs"
},
{
component:'jccspz/xmbwh/index',
hidden:false,
meta:{
"title": "项目包维护",
"icon": "",
"noCache": false,
"link": null,
"mkid":901010300,
},
name:'xmbwh',
path:"xmbwh"
}
]
},
/* ERP项目明细账管理*/
{
path: '/erpxmmxzgl',
component: 'Layout',
hidden: false,
alwaysShow:true,
redirect: 'xmmxcx',
meta: {title: "ERP项目明细账管理", icon: "fa-cog", noCache: false, link: null,mkid:901020000},
children: [
{
component:'erpxmmxzgl/xmmxcx/index',
hidden:false,
meta:{
"title": "项目明细查询(定期导入)",
"icon": "",
"noCache": false,
"link": null,
"mkid":901010400,
},
name:'xmmxcx',
path:"xmmxcx"
},
{
component:'erpxmmxzgl/xmmxcx/index',
hidden:false,
meta:{
"title": "ERP项目明细账(定期导入)",
"icon": "",
"noCache": false,
"link": null,
"mkid":901020100,
},
name:'erpxmmxz',
path:"erpxmmxz"
},
{
component:'erpxmmxzgl/xmmxcx/index',
hidden:false,
meta:{
"title": "消耗总览(定期导入)",
"icon": "",
"noCache": false,
"link": null,
"mkid":901030340,
},
name:'xhzl',
path:"xhzl"
} }
] ]
}, },
......
<template>
<RelDialog :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="80px" :rules="rules">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="项目编码" ref="code" prop="code">
<el-input :readonly="readonly" v-model="form.code"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="项目名称" ref="name" prop="name">
<el-input :readonly="readonly" v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="项目包" ref="xmbid" prop="xmbid">
<RelSelect :readonly="readonly" filterable style="width: 100%;" src='/budgetms/xmgl/query'
:match="{value:'id',label:'name'}" v-model='form.xmbid'></RelSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="预算金额" ref="ysje" prop="ysje">
<el-input type="number" :readonly="readonly" v-model="form.ysje"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="部门" ref="bmid" prop="bmid">
<RelSelect :readonly="readonly" filterable style="width: 100%;" src='/budgetms/common//bm/query'
:match="{value:'id',label:'bmmc'}" v-model='form.bmid'></RelSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="立项日期" ref="lxrq" prop="lxrq">
<el-date-picker style="width: 100%;" :readonly="readonly" value-format="timestamp" v-model="form.lxrq"></el-date-picker>
</el-form-item>
</el-col>
<!-- <el-form-item label="设备分类" ref="flid" prop="flid">
<RelSelect :readonly="readonly" filterable style="width: 100%;" src='/aqgl/sbgl/sbfl/query'
:match="{value:'id',label:'name'}" v-model='form.flid'></RelSelect>
</el-form-item> -->
</el-col>
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {},
/* 组件名称*/
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
code: '',
id: '',
name: '',
xmbid: '',
bmid: '',
ysje: '',
lxrq:''
}
}
},
methods: {}
}
</script>
<style scoped lang="scss">
</style>
<template>
<div class="min_full">
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">年度:</span>
<el-date-picker value-format='yyyy' type="year" v-model="queryParams.year" />
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">项目编码:</span>
<el-input v-model="queryParams.code"></el-input>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">项目名称:</span>
<el-input v-model="queryParams.name"></el-input>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">打包/单体:</span>
<RelSelect style="width: 100%;" src='budgetms/sggcxm/init/dbbz' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.dbbz'></RelSelect>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<ToolButton :app='app'></ToolButton>
<ViewButton ref="view" :app='app'></ViewButton>
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<el-button size='mini' @click="dcmb()" type="primary">导出模板</el-button>
<el-button size='mini' @click="dr()" type="primary">导入</el-button>
<el-button size='mini' @click="closeGcxm()" type="primary">关闭</el-button>
<el-button size='mini' @click="cancelCloseGcxm()" type="primary">取消关闭</el-button>
<el-popover placement="right" width="400" trigger="manual" v-model="visible">
<div style="width: 100%;height: 100px;position: relative;">
<RelSelect style="width: 100%;" src='budgetms/sggcxm/init/dbbz' filterable clearable
:match="{value:'id',label:'name'}" v-model='dbbz'></RelSelect>
<el-button style="position: absolute;bottom: 10px;right: 10px;" size='mini' @click="getDbbz"
type="primary">确定</el-button>
</div>
<el-button slot="reference" style="margin-left: 10px;" size='mini' @click="setDbbz"
type="primary">打包/单体</el-button>
</el-popover>
<!-- <AttachFileButton :app='app' ></AttachFileButton> -->
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
</div>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete,
closeGcxm,
cancelCloseGcxm,
doDbsz,
excelimport
} from '@/api/erpxmmxzgl/xmmxcx.js';
import {
download
} from 'common/src/utils/request.js'
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'xmmxcx',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
visible: false,
dbbz: 'N',
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'budgetms/sggcxm',
/* 查询参数*/
queryParams: {
code: '',
year: '',
name: '',
dbbz: ''
},
/* 表格标题对应参数*/
tableTitle: [{
title: "编码",
field: "code",
width: 120
},
{
title: "名称",
field: "name",
width: 400
},
{
title: "项目包编码",
field: "xmbcode",
width: 100
},
{
title: "项目包名称",
field: "xmbmc",
width: 300
},
{
title: "管理部门",
field: "glbmname",
width: 140
},
{
title: "一级包分类",
field: "xmflName",
width: 120
},
{
title: "二级包分类",
field: "ejxmflName",
width: 120
},
{
title: "基金中心",
field: "xmbmcode",
width: 140
},
{
title: "项目实施部门",
field: "xmbmname",
width: 140
},
{
title: "承诺项",
field: "cnx",
width: 140
},
{
title: "打包/单体",
field: "dbbz",
width: 140,
transform: {
url: 'budgetms/sggcxm/init/dbbz',
label: 'name',
value: 'id'
}
},
{
title: "是否预安排项目",
field: "yapflag",
width: 140,
formatter: (a, b, value) => {
let rev = '是'
if (value == 'N') {
rev = '否'
}
return rev
}
},
{
title: "状态",
field: "zt",
fieldType: "ftString",
align: "center",
width: 80,
transform: {
url: 'budgetms/sggcxm/init/zt',
label: 'name',
value: 'id'
}
},
{
title: "总预算金额(万元)",
field: "ysje",
width: 200,
fieldType: "float",
props: "decimal:6"
},
{
title: "当年预算金额(万元)",
field: "dnysje",
width: 200,
fieldType: "float",
props: "decimal:6"
},
{
title: "当年支出金额(万元)",
field: "dnzcje",
width: 200,
fieldType: "float",
props: "decimal:6"
},
{
title: "完成值(含税)",
field: "wcje",
width: 200,
fieldType: "float",
props: "decimal:6"
},
{
title: "年度",
field: "year",
width: 80
},
{
title: "立项日期",
field: "lxrq",
width: 120,
fieldType: "ftDate"
},
{
title: "关闭日期",
field: "gbrq",
width: 120,
fieldType: "ftDate"
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
}
]
}
},
methods: {
dcmb() {
download('budgetms/sggcxm/excel/model/export', {}, '项目模板.xlsx')
},
dr() {
//budgetms/kjkm/excel/import
let that = this
let input = document.createElement('input');
input.type = 'file'
input.onchange = function() {
let file = input.files[0];
if (file) {
let name = file.name
let type = file.type
let formData = new FormData();
formData.append('file', file)
excelimport(formData).then(res => {
try {
document.body.removeChild(input)
} catch (e) {
console.log(e)
}
if (res.success) {
that.$success('导入成功')
that.app.$refs.TablePager.pageQuery()
}
})
}
}
input.click()
},
getDbbz() {
let params = {
dbbz: this.dbbz,
ids: [this.singleItem.id],
}
doDbsz(params).then(res => {
if (res && res.success) {
this.$success('操作成功')
this.visible = false
this.app.$refs['TablePager'].pageQuery()
}
})
},
setDbbz() {
if (this.app.selectOne || this.app.clickOne) {
this.dbbz = this.singleItem.dbbz
this.visible = true
} else {
this.$warning('请选中一行操作');
}
},
cancelCloseGcxm() {
if (this.app.selectOne || this.app.clickOne) {
cancelCloseGcxm({
id: this.singleItem.id
}).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.$refs['TablePager'].pageQuery()
}
})
} else {
this.$warning('请选中一行操作');
}
},
closeGcxm() {
if (this.app.selectOne || this.app.clickOne) {
closeGcxm({
id: this.singleItem.id
}).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.$refs['TablePager'].pageQuery()
}
})
} else {
this.$warning('请选中一行操作');
}
},
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
init() {
}
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
<template>
<RelDialog :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="80px" :rules="rules">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="费用编码" ref="code" prop="code">
<el-input :readonly="readonly" v-model="form.code"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="费用名称" ref="name" prop="name">
<el-input :readonly="readonly" v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" ref="bz" prop="bz">
<el-input :readonly="readonly" v-model="form.bz"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {editMixin} from 'common'
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
},
/* 组件名称*/
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
code:'',
id:'',
name:'',
bz:''
}
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<div class="min_full">
<!-- 查询条件-->
<!-- 按钮操作-->
<el-row class="tool-bar">
<ToolButton :app='app'></ToolButton>
<ViewButton ref="view" :app='app'></ViewButton>
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<ReloadButton :app='app'></ReloadButton>
<!-- <AttachFileButton :app='app' ></AttachFileButton> -->
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
<template slot="tabCustom">
<el-table-column label="启用/停用" width="90" header-align="center" fixed="right" >
<template slot-scope="scope">
<el-switch @click.native="setEnable(scope.row.id)" :value='tybz(scope)' style="width: 80px;justify-content: center;"
active-color="#13ce66" inactive-color="#eee">
</el-switch>
</template>
</el-table-column>
</template>
</TablePager>
</div>
</div>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete,
qt
} from '@/api/jccspz/fymxwd.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'fymxwd',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'budgetms/pzfyxm',
/* 查询参数*/
queryParams: {
},
/* 表格标题对应参数*/
tableTitle: [
{title: "项目编码", field: "code", width: 140,hidden:true},
{title: "项目名称", field: "name", width: 160,hidden:true},
{title: "费用明细", field: "showname", width: 180},
{title: "状态", field: "tybz", width: 80,formatter:(a,b,value)=>{
let label='正常'
if(value!='N'){
label='停用'
}
return label
}},
{title: "停用日期", field: "tyrq", fieldType: "ftDate"},
{title: "备注", field: "bz", width: 200},
{title: "维护人", field: "whr"},
{title: "维护时间", field: "whsj", fieldType: "ftDateTime"}
]
}
},
methods: {
tybz(a) {
let nTy = false
nTy = (a.row.tybz == 'N' ? true : false)
return nTy
},
setEnable(id) {
this.$confirm('是否启用/停用, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
id: id
}
qt(params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.$refs['TablePager'].reLoad()
} else {
this.$error(res.message || '操作失败')
}
})
})
},
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
init() {
}
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
<template>
<RelDialog :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码" ref="code" prop="code">
<el-input :readonly="readonly" v-model="form.code"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="名称" ref="name" prop="name">
<el-input :readonly="readonly" v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="年度" ref="year" prop="year">
<el-input :readonly="readonly" v-model="form.year"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="管理部门" ref="bmid" prop="bmid">
<RelSelect style="width: 100%;" src='/budgetms/common/bm/query' :match="{value:'id',label:'bmmc'}" v-model='form.bmid' ></RelSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="项目分类" ref="xmlx" prop="xmlx">
<RelSelect style="width: 100%;" src='/budgetms/xmfl/queryAllRoot' :match="{value:'id',label:'showname'}" v-model='form.xmlx' ></RelSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="二级包分类" ref="ejxmlx" prop="ejxmlx">
<RelSelect linkage :linkParams="{fyxmfl:form.xmlx}" :readonly="readonly" style="width: 100%;" src='budgetms/xmfl/queryAllMj' filterable clearable :match="{value:'id',label:'showname'}" v-model='form.ejxmlx' ></RelSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="资本类型" ref="zblx" prop="zblx">
<RelSelect :readonly="readonly" style="width: 100%;" src='/budgetms/xmgl/init/zblx' :match="{value:'id',label:'name'}" v-model='form.zblx' ></RelSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="立项日期" ref="lxrq" prop="lxrq">
<el-date-picker style="width: 100%;" :readonly="readonly" value-format="timestamp" v-model="form.lxrq"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {editMixin} from 'common'
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
},
/* 组件名称*/
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
code:'',
id:'',
name:'',
year:'',
bmid:'',
xmlx:'',
ejxmlx:'',
zblx:'',
lxrq:''
}
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<div class="min_full">
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span mw60">年度:</span>
<el-input type="number" v-model="queryParams.year"></el-input>
</div>
</el-col>
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span mw60" >名称:</span>
<el-input v-model="queryParams.name"></el-input>
</div>
</el-col>
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span mw60">管理部门:</span>
<RelSelect style="width: 100%;" src='budgetms/common/bm/query' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.bmid'></RelSelect>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="search-row-1">
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span mw60">资本类型:</span>
<RelSelect style="width: 100%;" src='budgetms/xmgl/init/zblx' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.zblx'></RelSelect>
</div>
</el-col>
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span mw60">项目类型:</span>
<RelSelect style="width: 100%;" src='budgetms/xmfl/query' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.xmlx'></RelSelect>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<ToolButton :app='app'></ToolButton>
<ViewButton ref="view" :app='app'></ViewButton>
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<el-button size='mini' @click="dcmb()" type="primary">导出模板</el-button>
<el-button size='mini' @click="dr()" type="primary">导入</el-button>
<!-- <AttachFileButton :app='app' ></AttachFileButton> -->
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
</div>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete,
initZblx,
excelimport
} from '@/api/jccspz/xmbwh.js';
import{
download
}from 'common/src/utils/request.js'
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'xmbwh',
/* 初始额外赋值*/
async mounted() {
this.map={}
initZblx({}).then(res=>{
res.data.records.forEach(item=>{
this.map[item.id]=item.name
})
})
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'budgetms/xmgl',
/* 查询参数*/
queryParams: {
year:'',
bmid:'',
zblx:'',
xmlx:'',
condition:''
},
/* 表格标题对应参数*/
tableTitle: [
{title: "年度", field: "year", fieldType: "ftString",width:70},
{title: "编码", field: "code", fieldType: "ftString",width:140},
{title: "名称", field: "name", fieldType: "ftString",width:240},
{title: "管理部门", field: "bmCode", fieldType: "ftString",width:120},
{title: "部门名称", field: "bmName", fieldType: "ftString",width:140},
{title: "一级包分类", field: "xmflName", fieldType: "ftString",width:110},
{title: "二级包分类", field: "ejxmflName", fieldType: "ftString",width:110},
{title: "资本类型", field: "zblx", fieldType: "ftString",width:110,formatter:(a,b,value)=>{
let values=this.map[value]||'未知'
return values
}
},
{title: "备注", field: "bz", fieldType: "ftString",width:200},
{title: "维护人", field: "whr", fieldType: "ftString"},
{title: "维护时间", field: "whsj", fieldType: "ftDateTime"}
]
}
},
methods: {
dcmb(){
download('budgetms/xmgl/excel/model/export',{},'项目包模板.xlsx')
},
dr(){
//budgetms/kjkm/excel/import
let that=this
let input = document.createElement('input');
input.type='file'
input.onchange=function(){
let file = input.files[0];
if(file){
let name = file.name
let type = file.type
let formData = new FormData();
formData.append('file', file)
excelimport(formData).then(res=>{
try{document.body.removeChild(input)}catch(e){
console.log(e)
}
if(res.success){
that.$success('导入成功')
that.app.$refs.TablePager.pageQuery()
}
})
}
}
input.click()
},
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
init() {
}
},
components: {
Edit,
}
}
</script>
<style scoped>
.mw60{
min-width: 60px
}
</style>
<template>
<RelDialog :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="80px" :rules="rules">
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="名称" ref="name" prop="name">
<el-input :readonly="readonly" v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" ref="bz" prop="bz">
<el-input :readonly="readonly" v-model="form.bz"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {},
/* 组件名称*/
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
bz: '',
id: '',
name: ''
}
}
},
methods: {}
}
</script>
<style scoped lang="scss">
</style>
\ No newline at end of file
<template>
<div class="min_full">
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">名称:</span>
<el-input v-model="queryParams.name"></el-input>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<ToolButton :app='app'></ToolButton>
<ViewButton ref="view" :app='app'></ViewButton>
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<!-- <AttachFileButton :app='app' ></AttachFileButton> -->
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
<template slot="tabCustom">
<el-table-column label="启用/停用" width="90" header-align="center" fixed="right" >
<template slot-scope="scope">
<el-switch @click.native="setEnable(scope.row.id)" :value='tybz(scope)' style="width: 80px;justify-content: center;"
active-color="#13ce66" inactive-color="#eee">
</el-switch>
</template>
</el-table-column>
</template>
</TablePager>
</div>
</div>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete,
qt
} from '@/api/jccspz/zbfs.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'zbfs',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'budgetms/ysjsfs',
/* 查询参数*/
queryParams: {
name:''
},
/* 表格标题对应参数*/
tableTitle: [
{title: "名称", field: "name", fieldType: "ftString",width:300},
{title: "状态", field: "tybz", fieldType: "ftString",width:80,formatter:(a,b,value)=>{
if(value=='N'){
return '正常'
}else{
return '停用'
}
}},
{title: "停用日期", field: "tyrq", fieldType: "ftDate"},
{title: "备注", field: "bz", fieldType: "ftString",width:300},
{title: "维护人", field: "whr", fieldType: "ftString"},
{title: "维护时间", field: "whsj", fieldType: "ftDateTime"},
]
}
},
methods: {
tybz(a) {
let nTy = false
nTy = (a.row.tybz == 'N' ? true : false)
return nTy
},
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
setEnable(id) {
this.$confirm('是否启用/停用, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
id: id
}
qt(params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.$refs['TablePager'].reLoad()
} else {
this.$error(res.message || '操作失败')
}
})
})
},
init() {
}
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment