Commit a75f4aa4 authored by 李苏's avatar 李苏 💬

ERP项目明细汇总

parent ec328461
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/budgetms/sgwlpzhz/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/budgetms/sgwlpzhz/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/budgetms/sgwlpzhz/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/budgetms/sgwlpzhz/delete',
method: 'post',
data: query||{}
})
}
\ No newline at end of file
......@@ -218,6 +218,30 @@ export const powerRoutes=[
]
},
/* 汇总查询报表*/
{
path: '/hzcxbb',
component: 'Layout',
hidden: false,
alwaysShow:true,
redirect: 'erpxmmxz',
meta: {title: "汇总查询报表", icon: "fa-cog", noCache: false, link: null,mkid:901040000},
children: [
{
component:'hzcxbb/erpxmmxz/index',
hidden:false,
meta:{
"title": "ERP项目明细账汇总查询",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901020200,
},
name:'erpxmmxz',
path:"erpxmmxz"
}
]
},
]
// 公共路由
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
DialogTitle:'新增',
showDialog:false,
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
},
data() {
return {
}
},
methods: {
}
}
</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="name" prop="name">
<el-input :readonly="readonly" v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="设备分类" ref="flid" prop="flid">
<!-- <el-input :readonly="readonly" v-model="form.name" ></el-input> -->
<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: {
flid:'',
id:'',
name:''
}
}
},
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>
<RelSelect collapse-tags multiple style="width: 100%;" src='budgetms/sgwlpzhz/init/hzfs' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.hzfs'></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>
<!-- <AttachFileButton :app='app' ></AttachFileButton> -->
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager :multipleTrans="[
'hzfs'
]" @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem' :operateButtons='false'
@getRow='getRow'>
</TablePager>
</div>
</div>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete
} from '@/api/hzcxbb/erpxmmxz.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'erpxmmxz',
/* 初始额外赋值*/
async mounted() {
/* 解决多选异步冲突*/
setTimeout(()=>{
this.$refs['TablePager'].pageQuery()
},400)
},
watch: {
hzfs:{
deep:true,
immediate:true,
handler:function(val){
/* 控制菜单栏*/
this.$nextTick(()=>{
if(this.$refs.TablePager&&this.$refs.TablePager.newGridList&&this.$refs.TablePager.newGridList.length>0){
this.$refs.TablePager.newGridList.forEach(item=>{
if(item.showKey){
if(val.indexOf(item.showKey)!=-1){
item.show=true
}else{
item.show=false
}
}
})
console.log( this.$refs.TablePager.newGridList)
}
})
}
}
},
computed:{
hzfs(){
let hzfs=this.queryParams.hzfs
return hzfs
}
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'budgetms/sgwlpzhz',
/* 查询参数*/
queryParams: {
hzfs: ['LRZX'],
},
/* 表格标题对应参数*/
tableTitle: [
{title: "利润中心", field: "jc", fieldType: "ftString",width:192,showKey:"LRZX"},
{title: "部门编码", field: "xmbmcode", fieldType: "ftString",width:120,showKey:"BM",show:false},
{title: "部门", field: "xmbmname", fieldType: "ftString",width:120,showKey:"BM",show:false},
{title: "项目", field: "xmcode", fieldType: "ftString",width:60,showKey:"XM",show:false},
{title: "项目描述", field: "xmdesc", fieldType: "ftString",width:192,showKey:"XM",show:false},
{title: "科目编码", field: "mkmid", fieldType: "ftString",width:100,showKey:"KM",show:false},
{title: "科目", field: "kmname", fieldType: "ftString",width:120,showKey:"KM",show:false},
{title: "项目包", field: "xmbmc", fieldType: "ftString",width:192,showKey:"XMB",show:false},
{title: "年度", field: "year", fieldType: "int",align:"center",width:80,showKey:"YEAR",show:false},
{title: "月份", field: "month", fieldType: "int",align:"center",width:80,showKey:"MONTH",show:false},
{title: "一级项目分类", field: "yjxmname", fieldType: "ftString",width:120,showKey:"YJXMFL",show:false},
{title: "二级项目分类", field: "xmflName", fieldType: "ftString",width:120,showKey:"XMFL",show:false},
{title: "供应商编码", field: "gyscode", fieldType: "ftString",width:120,showKey:"GYS",show:false},
{title: "供应商", field: "gysname", fieldType: "ftString",width:192,showKey:"GYS",show:false},
{title: "物资/服务", field: "wzbz", fieldType: "ftString",width:120,showKey:"WZ", formatter: function (a,b,value) {
var map = {"Y": "物资", "N": "服务"};
var text = map[value];
return text || "";
},show:false
},
{title: "资本/成本", field: "zblx", fieldType: "ftString",width:120,showKey:"ZB",show:false},
{title: "项目金额", field: "xmje", fieldType: "float", fieldType: "float",props:"decimal:6"},
]
}
},
methods: {
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
init() {
}
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
<template>
<div style="display: flex;">
<div class="min_full" style="width: 200px;border-right: 0px;">
<TreeBase :dgtype='5' :app='app' @selected='selectedTree'></TreeBase>
</div>
<div class="min_full" style="width: calc(100% - 200px)">
<!-- 查询条件-->
<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.info"></el-input>
</div>
</el-col>
<el-col :span="4" class="search-col">
<div class="search-item">
<span class="search-span">选择:</span>
<RelSelect style="width: 100%;" src='jcsj/common/bm/queryGs' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.gsid'></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>
<!-- <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>
</div>
</template>
<script>
import {
apiTreeQuery
// doQuery,
// doAdd,
// doUpdate,
// doDelete
} from 'common/src/api/documentManagement/folder.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: '功能名称',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/* 树的标题 */
treeTitle: '文件管理',
treeDefaultProps: {
/* 构建递归的children */
children: 'children',
/* 展示的参数 */
label: 'name',
/* 父id */
fatherId: 'pid',
/* 子id */
sonId: 'id',
/* 无父节点构建root 的属性 type=5生效 */
rootName: "根节点",
rootId:'root'
},
treeQueryParams: {
},
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: '请填写',
/* 查询参数*/
queryParams: {
info: '',
gsid: ''
},
/* 表格标题对应参数*/
tableTitle: [{
label: "备注",
prop: "bz",
fieldType: "ftString",
width: 300
}]
}
},
methods: {
selectedTree(e) {
console.log(e)
// this.queryParams.bmid=e.id||'root'
this.$refs['TablePager'].pageQuery()
},
// /* 基础查询*/
query: apiTreeQuery,
// /* 基础增*/
// apiAdd: doAdd,
// /* 基础更新*/
// apiUpdate: doUpdate,
// /* 删除操作*/
// apiDelete: doDelete,
apiTreeQuery: apiTreeQuery,
/* 初始化赋值操作*/
init() {
}
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
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