Commit 39644a74 authored by 李苏's avatar 李苏 💬

1.组件,2.稽核双击,3.预算展示列,4.导出。5保系统名

parent fb2dd784
......@@ -61,7 +61,7 @@ const permission = {
// 向后端请求路由数据
getRouters({}).then(res => {
let appName=res.data.appName||''
let appName=res.data.appName||'国网淮安供电公司财务展示系统'
commit('SET_APPNAME', appName)
localStorage.setItem('appName',appName)
......
......@@ -138,7 +138,7 @@ export default {
// this.getCode();
this.getCookie();
systeminfo({}).then(res=>{
this.appName=res.data.records.appName||''
this.appName=res.data.records.appName||'网淮安供电公司财务展示系统'
document.title=this.appName
})
},
......
......@@ -2,7 +2,7 @@
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<div class="full">
<EditTable :allowEdit='false' :spanMethod='spanMethod' ref="editTable" :editTableData='newFormDetail'
<EditTable @initTableTitle='initTableTitle' :allowEdit='false' :spanMethod='spanMethod' ref="editTable" :editTableData='newFormDetail'
:app='this'></EditTable>
</div>
</div>
......@@ -28,6 +28,7 @@
}
},
async mounted() {
},
......@@ -126,6 +127,26 @@
}
},
methods: {
initTableTitle(){
const list = this.$refs.editTable.tableTitle
const showList = [
'pje', 'mje', 'tzhje'
]
if(this.app.queryParams.xsystz=='Y'){
list.forEach(item => {
if (item && item.prop && showList.includes(item.prop)) {
item.show = true
}
})
}else{
list.forEach(item => {
if (item && item.prop && showList.includes(item.prop)) {
item.show = false
}
})
}
},
spanMethod({
row,
column,
......
<template>
<div class="min_full">
<Detail ref="detail" :app='this' v-if="showDialog" />
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<div class="min_full">
<Detail ref="detail" :app='this' v-if="showDialog" />
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="5" class="search-col">
<div class="search-item">
<span class="search-span">开始日期:</span>
<el-date-picker value-format="timestamp" v-model='queryParams.start' ></el-date-picker>
</div>
<div class="search-item">
<span class="search-span">开始日期:</span>
<el-date-picker value-format="timestamp" v-model='queryParams.start'></el-date-picker>
</div>
</el-col>
<el-col :span="5" class="search-col">
<div class="search-item">
<span class="search-span">截止日期:</span>
<el-date-picker value-format="timestamp" v-model='queryParams.end' ></el-date-picker>
</div>
<div class="search-item">
<span class="search-span">截止日期:</span>
<el-date-picker value-format="timestamp" v-model='queryParams.end'></el-date-picker>
</div>
</el-col>
<el-col :span="5" class="search-col">
<div class="search-item">
<span class="search-span">预算任务:</span>
<RelSelect style="width: 100%;" src='hafms/ysfl/query' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.flid'></RelSelect>
</div>
<div class="search-item">
<span class="search-span">预算任务:</span>
<RelSelect style="width: 100%;" src='hafms/ysfl/query' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.flid'></RelSelect>
</div>
</el-col>
<el-col :span="5" class="search-col">
<div class="search-item">
<span class="search-span">状态:</span>
<RelSelect style="width: 100%;" src='hafms/yssq/init/zt' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.zt'></RelSelect>
</div>
<div class="search-item">
<span class="search-span">状态:</span>
<RelSelect style="width: 100%;" src='hafms/yssq/init/zt' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.zt'></RelSelect>
</div>
</el-col>
<el-col :span="4" class="search-col">
<el-checkbox @change="$refs['TablePager'].pageQuery()" true-label='Y' false-label='N' v-model="queryParams.xsystz">显示调整信息</el-checkbox>
<el-checkbox @change="tzxx" true-label='Y' false-label='N' v-model="queryParams.xsystz">显示调整信息</el-checkbox>
</el-col>
</el-row>
</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">申请订单:</span>
<el-input v-model="queryParams.djid"></el-input>
</div>
</el-col>
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">申请公司:</span>
<RelSelect collapse-tags multiple style="width: 100%;" src='hafms/common/sjbm/query' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.sjbmids'></RelSelect>
</div>
</el-col>
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">申请部门:</span>
<RelSelect linkage :linkParams="{sjbmids:queryParams.sjbmids}" :params="{
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">申请订单:</span>
<el-input v-model="queryParams.djid"></el-input>
</div>
</el-col>
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">申请公司:</span>
<RelSelect collapse-tags multiple style="width: 100%;" src='hafms/common/sjbm/query' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.sjbmids'></RelSelect>
</div>
</el-col>
<el-col :span="8" class="search-col">
<div class="search-item">
<span class="search-span">申请部门:</span>
<RelSelect linkage :linkParams="{sjbmids:queryParams.sjbmids}" :params="{
pids:queryParams.sjbmids.join()
}" collapse-tags multiple style="width: 100%;" src='hafms/common/bm/query' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.chooseBmids'></RelSelect>
</div>
</el-col>
}" collapse-tags multiple style="width: 100%;" src='hafms/common/bm/query' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.chooseBmids'></RelSelect>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<ToolButton :app='app'></ToolButton>
</el-row>
<!-- 表格-->
<div class="tablePagers">
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<ToolButton :app='app'></ToolButton>
</el-row>
<!-- 表格-->
<div class="tablePagers">
<!-- 多选数组转 -->
<TablePager
fePage
:operateButtons="false"
@tpDbClick="tpDbClick"
:multipleTrans="[
<TablePager fePage :operateButtons="false" @tpDbClick="tpDbClick" :multipleTrans="[
'sjbmids','chooseBmids'
]"@getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
</div>
]" @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem' @getRow='getRow'>
</TablePager>
</div>
</div>
</template>
<script>
import {
doQuery,
import {
doQuery,
queryDetail
} from '@/api/sbysjsp/yshz.js';
/* edit页面*/
import Edit from './edit'
} from '@/api/sbysjsp/yshz.js';
/* edit页面*/
import Edit from './edit'
import Detail from './detail.vue'
import {
tableMixin
} from 'common'
import {
tableMixin
} from 'common'
import cycle from 'common/src/mixin/cycle.js'
export default {
mixins: [tableMixin,cycle],
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
export default {
mixins: [tableMixin, cycle],
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'hafms/ystz',
/* 查询参数*/
queryParams: {
xsystz: 'Y',
start: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
end: new Date().getTime(),
flid: '',
zt: '',
djid: '',
sjbmids: [],
chooseBmids: []
},
/* 表格标题对应参数*/
tableTitle: [{
title: "年度",
field: "year",
fieldType: "ftString",
width: 120
},
{
title: "事项",
field: "flname",
fieldType: "ftString",
width: 300
},
{
title: "需求金额",
field: "xqje",
fieldType: "money",
width: 229
},
{
title: "调增金额",
field: "pje",
fieldType: "money",
width: 220
},
{
title: "调减金额",
field: "mje",
fieldType: "money",
width: 220
},
{
title: "调整后金额",
field: "tzhje",
fieldType: "money"
},
]
}
},
methods: {
tzxx(e) {
const list = this.$refs.TablePager.newGridList
const showList = [
'pje', 'mje', 'tzhje'
]
/* Y 显示 N隐藏*/
if (e == 'Y') {
list.forEach(item => {
if (item && item.prop && showList.includes(item.prop)) {
item.show = true
}
})
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'hafms/ystz',
/* 查询参数*/
queryParams: {
xsystz:'N',
start:new Date().getTime()-1000*60*60*24*30,
end: new Date().getTime(),
flid:'',
zt:'',
djid:'',
sjbmids:[],
chooseBmids:[]
},
/* 表格标题对应参数*/
tableTitle: [
{title: "年度", field: "year", fieldType: "ftString",width:120},
{title: "事项", field: "flname", fieldType: "ftString",width:300},
{title: "需求金额", field: "xqje", fieldType: "money",width:229},
{title: "调增金额", field: "pje", fieldType: "money",width:220},
{title: "调减金额", field: "mje", fieldType: "money",width:220},
{title: "调整后金额", field: "tzhje", fieldType: "money"},
]
}
},
methods: {
tpDbClick(row){
queryDetail({
year:row.year,
flid:row.flid,
xsystz:this.queryParams.xsystz
}).then(res=>{
if(res.success){
const {records} = res.data
if(records.length>0){
this.DialogTitle="查看详情"
this.DialogWidth="70vw"
this.showDialog=true
this.$nextTick(()=>{
this.$refs.detail.formDetail=records||[]
})
}else{
this.$warning('暂无数据')
}
}
} else {
list.forEach(item => {
if (item && item.prop && showList.includes(item.prop)) {
item.show = false
}
})
}
this.$refs['TablePager'].pageQuery()
},
tpDbClick(row) {
queryDetail({
year: row.year,
flid: row.flid,
xsystz: this.queryParams.xsystz
}).then(res => {
if (res.success) {
const {
records
} = res.data
if (records.length > 0) {
this.DialogTitle = "查看详情"
this.DialogWidth = "70vw"
this.showDialog = true
this.$nextTick(() => {
this.$refs.detail.formDetail = records || []
})
} else {
this.$warning('暂无数据')
}
}
})
})
},
yssqsp(){
yssqsp() {
if (this.app.selectOne || this.app.clickOne) {
submit(this.singleItem).then(res=>{
if(res.success){
submit(this.singleItem).then(res => {
if (res.success) {
this.$success('操作成功');
this.$refs['TablePager'].pageQuery()
}
......@@ -166,20 +213,19 @@
this.$warning('请选中一行操作');
}
},
/* 基础查询*/
query: doQuery,
queryDetail:queryDetail
},
components: {
Edit,
/* 基础查询*/
query: doQuery,
queryDetail: queryDetail
},
components: {
Edit,
Detail
}
}
}
}
</script>
<style scoped>
.search-col{
.search-col {
max-width: 350px;
}
</style>
......@@ -65,6 +65,7 @@
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<AttachFileButton :app='this' />
<el-button size='mini' @click="dcmb()" type="primary">导出模板</el-button>
<!-- <el-button size='mini' @click="yssqsp()" type="primary">预算申请审批</el-button> -->
<!-- <AttachFileButton :app='app' ></AttachFileButton> -->
<!-- 额外按钮-->
......@@ -83,6 +84,9 @@
</div>
</template>
<script>
import {
download
} from 'common/src/utils/request.js'
import {
doQuery,
doAdd,
......@@ -147,6 +151,9 @@
}
},
methods: {
dcmb() {
download('hafms/yssq/ystz/model/export', {}, '预算申请导出.xlsx')
},
yssqsp(){
if (this.app.selectOne || this.app.clickOne) {
submit(this.singleItem).then(res=>{
......
......@@ -90,7 +90,7 @@
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
<TablePager @dblclick.native="xq()" @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
:operateButtons='false' :multipleTrans="[
'wtlxids','chooseLrzxids'
]" @getRow='getRow'>
......
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