Commit 0f4e2ab2 authored by 李苏's avatar 李苏 💬

电网部分

parent 7afc0229
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/budgetms/sgwlpz/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/budgetms/sgwlpz/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/budgetms/sgwlpz/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/budgetms/sgwlpz/delete',
method: 'post',
data: query||{}
})
}
/* 关闭 */
export function closeGcxm(query) {
return request({
url: '/budgetms/sgwlpz/closeGcxm',
method: 'post',
data: query||{}
})
}
export function cancelCloseGcxm(query) {
return request({
url: '/budgetms/sgwlpz/cancelCloseGcxm',
method: 'post',
data: query||{}
})
}
/* 取关 */
export function doDbsz(query) {
return request({
url: '/budgetms/sgwlpz/doDbsz',
method: 'post',
data: query||{}
})
}
/* 导入 */
export function excelimport(query) {
return request({
'Content-type' : 'multipart/form-data',
url: '/budgetms/sgwlpz/excel/importpz',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/budgetms/yshy/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/budgetms/yshy/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/budgetms/yshy/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/budgetms/yshy/delete',
method: 'post',
data: query||{}
})
}
/* 导入 */
export function excelimport(query) {
return request({
'Content-type' : 'multipart/form-data',
url: '/budgetms/yshy/excel/importyshy',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/budgetms/yssqsp/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/budgetms/yssqsp/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/budgetms/yssqsp/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/budgetms/yssqsp/delete',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/budgetms/ysfl/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/budgetms/ysfl/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/budgetms/ysfl/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/budgetms/ysfl/delete',
method: 'post',
data: query||{}
})
}
/* 导入 */
export function qt(query) {
return request({
url: 'budgetms/ysfl/record/qt',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/budgetms/yssq/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/budgetms/yssq/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/budgetms/yssq/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/budgetms/yssq/delete',
method: 'post',
data: query||{}
})
}
/* 导入 */
export function qt(query) {
return request({
url: 'budgetms/yssq/record/qt',
method: 'post',
data: query||{}
})
}
export function yssqmx(query) {
return request({
url: 'budgetms/yssqmx/query',
method: 'post',
data: query||{}
})
}
export function queryroot(query) {
return request({
url: 'budgetms/xmfl/queryroot',
method: 'post',
data: query||{}
})
}
export function query(query) {
return request({
url: 'budgetms/fysx/query',
method: 'post',
data: query||{}
})
}
export function submit(query) {
return request({
url: 'budgetms/yssq/submit',
method: 'post',
data: query||{}
})
}
...@@ -139,7 +139,7 @@ export const powerRoutes=[ ...@@ -139,7 +139,7 @@ export const powerRoutes=[
path:"xmmxcx" path:"xmmxcx"
}, },
{ {
component:'erpxmmxzgl/xmmxcx/index', component:'erpxmmxzgl/erpxmmxz/index',
hidden:false, hidden:false,
meta:{ meta:{
"title": "ERP项目明细账(定期导入)", "title": "ERP项目明细账(定期导入)",
...@@ -152,7 +152,7 @@ export const powerRoutes=[ ...@@ -152,7 +152,7 @@ export const powerRoutes=[
path:"erpxmmxz" path:"erpxmmxz"
}, },
{ {
component:'erpxmmxzgl/xmmxcx/index', component:'erpxmmxzgl/xhzl/index',
hidden:false, hidden:false,
meta:{ meta:{
"title": "消耗总览(定期导入)", "title": "消耗总览(定期导入)",
...@@ -167,6 +167,57 @@ export const powerRoutes=[ ...@@ -167,6 +167,57 @@ export const powerRoutes=[
] ]
}, },
/* 预算申报及审批*/
{
path: '/sbysjsp',
component: 'Layout',
hidden: false,
alwaysShow:true,
redirect: 'yssbkfsz',
meta: {title: "预算申报及审批", icon: "fa-cog", noCache: false, link: null,mkid:901030000},
children: [
{
component:'sbysjsp/yssbkfsz/index',
hidden:false,
meta:{
"title": "预算申报开放设置",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901030300,
},
name:'yssbkfsz',
path:"yssbkfsz"
},
{
component:'sbysjsp/yssq/index',
hidden:false,
meta:{
"title": "预算申请(需求部门提报)",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901030100,
},
name:'yssq',
path:"yssq"
},
{
component:'sbysjsp/mxsx/index',
hidden:false,
meta:{
"title": "明细事项",
"icon": "",
"noCache": false,
"link": null,
"mkid": 901030200,
},
name:'mxsx',
path:"mxsx"
}
]
},
] ]
// 公共路由 // 公共路由
...@@ -209,7 +260,7 @@ export const constantRoutes = [ ...@@ -209,7 +260,7 @@ export const constantRoutes = [
children: [ children: [
{ {
path: 'index', path: 'index',
component: () => import('@/views/index'), component: () => import('@/views/erpxmmxzgl/xmmxcx/index'),
name: 'Index', name: 'Index',
// redirect: '/user/profile', // redirect: '/user/profile',
meta: { title: '首页', icon: 'dashboard', affix: true } meta: { title: '首页', icon: 'dashboard', affix: true }
......
<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 style="width: 100%;" src='budgetms/lrzx/query' filterable clearable
:match="{value:'id',label:'jc'}" v-model='queryParams.lrzxid'></RelSelect>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">开始日期:</span>
<el-date-picker value-format="timestamp" v-model='queryParams.beginDate' ></el-date-picker>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">结束日期:</span>
<el-date-picker value-format="timestamp" v-model='queryParams.endDate' ></el-date-picker>
</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/query' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.xmid'></RelSelect>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="search-row-1">
<el-col :span="4" class="search-col">
<div class="search-item">
<span class="search-span">项目包:</span>
<RelSelect style="width: 100%;" src='budgetms/xmgl/query' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.xmbid'></RelSelect>
</div>
</el-col>
<el-col :span="4" class="search-col">
<div class="search-item">
<span class="search-span">资本/成本:</span>
<RelSelect style="width: 100%;" src='budgetms/sgwlpz/init/zblx' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.zblx'></RelSelect>
</div>
</el-col>
<el-col :span="4" class="search-col">
<div class="search-item">
<span class="search-span">物资/服务:</span>
<RelSelect style="width: 100%;" src='budgetms/sgwlpz/init/wzbz' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.wzbz'></RelSelect>
</div>
</el-col>
<el-col :span="4" class="search-col">
<div class="search-item">
<span class="search-span">物料描述:</span>
<el-input v-model='queryParams.wlinfo' />
<!-- <RelSelect style="width: 100%;" src='budgetms/xmgl/query' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.wlinfo'></RelSelect> -->
</div>
</el-col>
<el-col :span="4" class="search-col">
<div class="search-item">
<span class="search-span">物料性质:</span>
<RelSelect style="width: 100%;" src='budgetms/wlxx/init/wlxz' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.wlxz'></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' :editButton='false'
@getRow='getRow'>
</TablePager>
</div>
</div>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete,
excelimport
} from '@/api/erpxmmxzgl/erpxmmxz.js';
import {
download
} from 'common/src/utils/request.js'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'erpxmmxz',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'budgetms/sgwlpz',
/* 查询参数*/
queryParams: {
beginDate:new Date().getTime()-1000*60*60*24*30,
endDate: new Date().getTime(),
lrzxid: '',
xmbid:'',
xmid:'',
wlxz:'',
zblx:'',
wzbz:'',
wlinfo:''
},
/* 表格标题对应参数*/
tableTitle: [
{title: "项目包编码", field: "xmbcode", fieldType: "ftString",width:100},
{title: "项目包名称", field: "xmbmc", fieldType: "ftString",width:192},
{title: "管理部门", field: "glbmname", width:140},
{title: "一级包分类", field: "xmflName", width:120},
{title: "二级包分类", field: "ejxmflName", width:120},
{title: "项目编码", field: "xmcode", fieldType: "ftString",width:192},
{title: "项目描述", field: "xmdesc", fieldType: "ftString",width:300},
{title: "基金中心", field: "xmbmcode", fieldType: "ftString",width:192},
{title: "项目实施部门", field: "xmbmname", fieldType: "ftString",width:192},
{title: "预算金额", field: "xmysje", fieldType: "float",props:"decimal:6"},
{title: "立项日期", field: "xmlxrq", fieldType: "ftDate"},
{title: "状态", field: "xmzt", fieldType: "ftString",align:"center",width:150,
transform: {
url: 'budgetms/sggcxm/init/zt',
label: 'name',
value: 'id'
}
},
{title: "年度", field: "year", fieldType: "int"},
{title: "月份", field: "month", fieldType: "int",},
{title: "日期", field: "day", fieldType: "int"},
{title: "上下旬", field: "sxx", fieldType: "ftString",width:150},
{title: "凭证编码", field: "pzcode", fieldType: "ftString",width:120},
{title: "利润中心", field: "jc", fieldType: "ftString",width:192},
{title: "过账日期", field: "gzrq", fieldType: "ftDate"},
{title: "归档凭证类型", field: "gdpzlx",width:150},
{title: "归档凭证编码", field: "gdpzcode",width:150},
{title: "凭证抬头文本", field: "pzwb", fieldType: "ftString",width:300},
{title: "挂接WBS编码", field: "gjwbs", fieldType: "ftString",width:150},
{title: "WBS编码", field: "wbs", fieldType: "ftString",width:150},
{title: "费用明细", field: "fymxname", fieldType: "ftString",width:120},
{title: "往来款项性质ID", field: "wlxzid", fieldType: "ftString",width:150},
{title: "往来款项性质名称", field: "wlxzname", fieldType: "ftString",width:150},
{title: "科目编码", field: "mkmid", fieldType: "ftString",width:192},
{title: "科目", field: "kmname", fieldType: "ftString",width:120},
{title: "借贷标志", field: "jdbz", fieldType: "ftString",align:"center",width:150, formatter: function (a, b, value) {
var map = {"Y": "借", "N": "贷"};
var text = map[value];
if(text){
if(value=="Y"){
return text ;
}else if(value=='N'){
return text ;
}else{
return text || "";
}
}else{
return text || "";
}
}
},
{title: "物资标志", field: "wzbz", fieldType: "ftString",align:"center",width:150,formatter: function (a, b, value) {
var map = {"Y": "物资", "N": "服务"};
var text = map[value];
return text || "";
}
},
{title: "领/退", field: "ltbz", fieldType: "ftString",align:"center",width:150, formatter: function (a, b, value) {
var map = {"Y": "领", "N": "退"};
var text = map[value];
return text || "";
}
},
{title: "金额", field: "xmje", fieldType: "float",props:"decimal:6"},
{title: "数量", field: "sl", fieldType: "float"},
{title: "批次", field: "ph", fieldType: "ftString",width:240},
{title: "物料编码", field: "wlid", fieldType: "ftString",width:192},
{title: "物料描述", field: "wldes", fieldType: "ftString",width:300},
{title: "资本性物料标识", field: "wlxz", fieldType: "ftString",align:"center",width:150},
{title: "计量单位", field: "jldw", fieldType: "ftString",width:150},
{title: "进项税额", field: "jxse", fieldType: "float"},
{title: "转出进项税额", field: "zcjxse" ,width:150},
{title: "转出凭证编码", field: "zcpzcode",width:120},
{title: "转出凭证过账日期", field: "zcgzrq", fieldType: "ftDate"},
{title: "供应商编码", field: "gyscode", fieldType: "ftString",width:150},
{title: "供应商", field: "gysname", fieldType: "ftString",width:192},
{title: "维护人", field: "whr", fieldType: "ftString"},
{title: "维护时间", field: "whsj", fieldType: "ftDateTime"},
]
}
},
methods: {
dcmb() {
download('budgetms/sgwlpz/excel/model/export', {}, 'ERP项目明细账模板.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: {
}
}
</script>
<style scoped>
</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-row>
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<el-popover placement="right" width="400" trigger="manual" v-model="visible">
<div style="width: 100%;height: 100px;position: relative;">
<div class="">
<span class="search-span">年度:</span>
<el-date-picker value-format='yyyy' type="year" v-model="year" />
</div>
<el-button style="position: absolute;bottom: 10px;right: 80px;" size='mini' @click="cancel"
type="info">取消</el-button>
<el-button style="position: absolute;bottom: 10px;right: 10px;" size='mini' @click="ok"
type="primary">确定</el-button>
</div>
<el-button slot="reference" size='mini' @click="visible=true" type="primary">导入</el-button>
</el-popover>
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem' :operateButtons='false'
@getRow='getRow'>
</TablePager>
</div>
</div>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete,
excelimport
} from '@/api/erpxmmxzgl/xhzl.js';
/* edit页面*/
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'xhzl',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
visible:false,
year:'',
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'budgetms/yshy',
/* 查询参数*/
queryParams: {
year:''
},
/* 表格标题对应参数*/
tableTitle: [
{title: "利润中心", field: "gsname", fieldType: "ftString",width:192},
{title: "部门", field: "bmjc", fieldType: "ftString",width:192},
{title: "年度", field: "year", fieldType: "int"},
{title: "耗用描述", field: "hydesc", fieldType: "ftString",width:300},
{title: "费用项目", field: "showname", fieldType: "ftString",width:192},
{title: "可消费预算", field: "kxfys", fieldType: "float", props:{decimal:4,shape:"-"}},
{title: "消耗预算", field: "xhys", fieldType: "float", props:{decimal:4,shape:"-"}},
{title: "可用金额", field: "kyje", fieldType: "float", props:{decimal:4,shape:"-"}},
{title: "备注", field: "bz", fieldType: "ftString",width:300},
{title: "维护人", field: "whr", fieldType: "ftString"},
{title: "维护时间", field: "whsj", fieldType: "ftDateTime"},
]
}
},
methods: {
cancel(){
this.visible=false
},
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)
formData.append('year', this.year)
excelimport(formData).then(res => {
try {
document.body.removeChild(input)
} catch (e) {
console.log(e)
}
if (res.success) {
that.$success('导入成功')
this.visible=false
that.app.$refs.TablePager.pageQuery()
}
})
}
}
input.click()
},
ok(){
if(this.year){
this.dr()
}else{
this.$warning('请选择导入年度')
}
},
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
init() {
}
},
}
</script>
<style scoped>
</style>
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
<div style="width: 100%;height: 100px;position: relative;"> <div style="width: 100%;height: 100px;position: relative;">
<RelSelect style="width: 100%;" src='budgetms/sggcxm/init/dbbz' filterable clearable <RelSelect style="width: 100%;" src='budgetms/sggcxm/init/dbbz' filterable clearable
:match="{value:'id',label:'name'}" v-model='dbbz'></RelSelect> :match="{value:'id',label:'name'}" v-model='dbbz'></RelSelect>
<el-button style="position: absolute;bottom: 10px;right: 80px;" size='mini' @click="cancel"
type="info">取消</el-button>
<el-button style="position: absolute;bottom: 10px;right: 10px;" size='mini' @click="getDbbz" <el-button style="position: absolute;bottom: 10px;right: 10px;" size='mini' @click="getDbbz"
type="primary">确定</el-button> type="primary">确定</el-button>
</div> </div>
...@@ -289,6 +291,9 @@ ...@@ -289,6 +291,9 @@
} }
input.click() input.click()
}, },
cancel(){
this.visible = false
},
getDbbz() { getDbbz() {
let params = { let params = {
dbbz: this.dbbz, dbbz: this.dbbz,
......
<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 style="width: 100%;" src='budgetms/common/wfstate' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.operatype'></RelSelect>
</div>
</el-col>
<el-col :span="6" 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="6" class="search-col">
<div class="search-item">
<span class="search-span">申请公司:</span>
<RelSelect style="width: 100%;" src='budgetms/common/bm/query' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.sjbmids'></RelSelect>
</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/common/sjbm/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>
<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>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete
} from '@/api/sbysjsp/mxsx.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'mxsx',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: '请填写',
/* 查询参数*/
queryParams: {
operatype:'',
djid:'',
sjbmids:'',
chooseBmids:''
},
/* 表格标题对应参数*/
tableTitle: [
{title: "预算任务", field: "ysflName", fieldType: "ftString",width:200,hidden:true},
{title: "申请单号", field: "djid", fieldType: "ftString",width:120},
{title: "单位编码", field: "gscode", fieldType: "ftString",width:120},
{title: "单位名称", field: "gsname", fieldType: "ftString",width:120},
{title: "部门编码", field: "bmcode", fieldType: "ftString",width:120},
{title: "部门名称", field: "bmjc", fieldType: "ftString",width:120},
{title: "状态", field: "wfpname", fieldType: "ftString",width:80},
{title: "状态", field: "zt", fieldType: "ftString",width:6,hidden:true},
{title: "项目分类", field: "flname", fieldType: "ftString",width:160},
{title: "成本预算科目", field: "showname", fieldType: "ftString",width:160},
{title: "需求事项", field: "fysxdesc", fieldType: "ftString",width:200},
{title: "测算依据", field: "csyj", fieldType: "ftString",width:300},
{title: "实施责任人", field: "zrr", fieldType: "ftString",width:120},
{title: "含税金额(万元)", field: "xqje", fieldType: "float"},
{title: "不含税金额(万元)", field: "wsxqje", fieldType: "float"},
{title: "税率(%)", field: "sl", fieldType: "float"},
// {title: "2021年实际支出(万元)", field: "bnsjzc", fieldType: "float"},
// {title: "预计采购方式", field: "yjcgfs", fieldType: "ftString",width:110,formatter: function (value, index, row) {
// return $cgfsMap[value] || value;
// }
// },
{title: "预计完成时间", field: "yjwcsj", fieldType: "ftString"},
{title: "审定成本预算科目", field: "sdshowname", fieldType: "ftString",width:192},
{title: "审定需求事项", field: "sdsxdesc", fieldType: "ftString",width:200},
{title: "审定含税金额(万元)", field: "sdxqje", fieldType: "float"},
{title: "审定不含税金额(万元)", field: "wssdxqje", fieldType: "float"},
{title: "项目编码", field: "sdxmid", fieldType: "ftString",width:200,hidden:true},
{title: "审定项目编码", field: "sdxmcode", fieldType: "ftString",width:120},
{title: "项目名称", field: "xmmc", fieldType: "ftString",width:300},
// {title: "审定描述", field: "sdms", fieldType: "ftString",width:200},
// {title: "中标方式", field: "jsfsName", fieldType: "ftString",width:120},
{title: "中标不含税金额", field: "sdextra1", fieldType: "ftString",props:{decimal:2},width:200},
{title: "审定描述", field: "sdextra2", fieldType: "ftString",width:200},
// {title: "审定说明3", field: "sdextra3", fieldType: "ftString",width:200},
{title: "附件数", field: "attachcount", fieldType: "ftInt",width:80,align:'center'},
// {title: "审核人", field: "shr", fieldType: "ftString",width:180},
// {title: "审核日期", field: "shrq", fieldType: "ftDateTime"},
{title: "维护人", field: "whr", fieldType: "ftString"},
{title: "维护时间", field: "whsj", fieldType: "ftDateTime"},
{title: "备注", field: "bz", fieldType: "ftString",width:300},
]
}
},
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
<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="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 label="序号" ref="xh" prop="xh">
<el-input :readonly="readonly" v-model="form.xh"></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: {
xh: '',
bz: '',
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>
<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/sbysjsp/yssbkfsz.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'yssbkfsz',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'budgetms/ysfl',
/* 查询参数*/
queryParams: {
name:''
},
/* 表格标题对应参数*/
tableTitle: [
{title: "名称", field: "name", fieldType: "ftString",width:300},
{title: "序号", field: "xh", fieldType: "int"},
{title: "状态", field: "tybz", fieldType: "ftString",width:80,formatter:(a,b,v)=>{
let text = '正常'
if(v=='Y'){
text='停用'
}
return text
}},
{title: "停用日期", field: "tyrq", fieldType: "ftDate"},
{title: "备注", field: "bz", fieldType: "ftString",width:300},
{title: "维护人", field: "whr", fieldType: "ftString"},
{title: "维护时间", field: "whsj", fieldType: "ftDateTime"}
]
}
},
methods: {
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 || '操作失败')
}
})
})
},
tybz(a) {
let nTy = false
nTy = (a.row.tybz == 'N' ? true : false)
return nTy
},
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
init() {
}
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
<template>
<RelDialog width='70%' :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="80px" :rules="rules">
<XzsxList :app='this' v-if='showDialog' />
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="申请公司" ref="sjbmid" prop="sjbmid" v-rule="{
required:true,
rules:rules,
}" >
<RelSelect :readonly="readonly" filterable style="width: 100%;" src='budgetms/common/sjbm/query' :match="{value:'id',label:'bmmc'}" v-model='form.sjbmid' ></RelSelect>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="申请部门" ref="bmid" prop="bmid" v-rule="{
required:true,
rules:rules,
}" >
<RelSelect linkage :linkParams="{pid:form.sjbmid}" :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="8">
<el-form-item label="填报日期" ref="tbrq" prop="tbrq" v-rule="{
required:true,
rules:rules,
}" >
<el-date-picker :readonly="readonly" style="width: 100%;" value-format="timestamp" v-model='form.tbrq' ></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="填报人" ref="tbr" prop="tbr" v-rule="{
required:true,
rules:rules,
}" >
<el-input :readonly="readonly" v-model="form.tbr"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="手机号" ref="lxfs1" prop="lxfs1">
<el-input :readonly="readonly" v-model="form.lxfs1"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="内部短号" ref="lxfs2" prop="lxfs2">
<el-input :readonly="readonly" v-model="form.lxfs2"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="预算任务" ref="ysflid" prop="ysflid" v-rule="{
required:true,
rules:rules,
}" >
<RelSelect :params="{
tybz:'N'
}" :readonly="readonly" filterable style="width: 100%;" src='budgetms/ysfl/query' :match="{value:'id',label:'name'}" v-model='form.ysflid' ></RelSelect>
</el-form-item>
</el-col>
</el-row>
<!-- 可编辑从表-->
<div class="">
<div style="display: flex;transform: translateY(-10px);">
<el-button v-show="this.type!='view'" @click="xzwl" size='mini' type="primary">选择事项</el-button>
<!-- <el-button size='mini' type="primary">复制</el-button>
<el-button size='mini' type="primary">删除</el-button> -->
<EditFieldButton :app='this' :editApp='this' ></EditFieldButton>
</div>
<div class="edit_table">
<EditTable :spanMethod='spanMethod' ref="editTable" :editTableData='newFormDetail' :app='this' :delButton='type!="view" ' ></EditTable>
</div>
<span class="jehj">金额合计:{{jehj}}</span>
<!-- 可编辑表格组件 -->
</div>
<!-- 底部信息-->
</el-form>
</RelDialog>
</template>
<script>
/* 映入额外弹框 */
import {editMixin} from 'common'
import XzsxList from './xzsxList.vue';
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
},
computed:{
jehj(){
let hj=0
this.formDetail.forEach(item=>{
hj=hj+ Number(item.xqje||0)
})
return hj
},
newFormDetail(){
/* 进行分类统计*/
let flArr=[]
this.formDetail.forEach(item=>{
flArr.push(item.sdfyxmid)
})
/* 去重*/
flArr=[...new Set(flArr)]
console.log(flArr,'flarr')
/* 顺序构建数据组*/
/* 获取总金额*/
let jeobj={}
let sxList=[]
flArr.forEach(item=>{
jeobj[item]=0
this.formDetail.forEach(fitem=>{
if(fitem.sdfyxmid==item){
jeobj[item]+=Number(fitem.xqje||0)
sxList.push(fitem)
}
})
})
/* 赋值总金额*/
sxList.forEach(item=>{
item.lxzje= item.showname+"合计:"+jeobj[item.sdfyxmid]
})
/* 构建redata*/
let redata=sxList.map(item=>{
return item.sdfyxmid
})
/* 重置spanArr*/
this.spanArr=[]
let pos=0
redata.reduce((old, cur, i) => {
// old 上一个元素 cur 当前元素 i 索引
if (i === 0) {
// 第一次判断先增加一个 1 占位 ,索引为0
this.spanArr.push(1)
pos = 0
} else {
if (cur === old) {
this.spanArr[pos] += 1
this.spanArr.push(0)
} else {
this.spanArr.push(1)
pos = i
}
}
return cur
}, {})
/* reduce开始控制row col*/
console.log('触发computed')
this.formDetail=sxList
return this.formDetail
}
},
watch:{
formDetail:{
deep:true,
handler:function(val){
/* 开始计算count */
this.formDetail.forEach(item=>{
item.wsxqje=item.xqje*(1-item.sl*0.01).toFixed(2)
})
}
}
},
/* 组件名称*/
name: "dutyEdit",
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
/* */
spanArr:[],
baseUrl:'budgetms/yssq/edit',
/* 弹框管理 */
/* 额外初始化,根据需求*/
showDialog:false,
DialogName:'wlList',
DialogTitle: '物料列表',
DialogWidth:'70%',
/* editTableData: [{}], */
editTableTitle: [
/* */
// {label: "序号", prop: "xh",width:50,align:"center"},
{label:"成本预算科目编码",prop:"sdfyxmid",fieldType:"ftString",show:false,width:100},
{label: "类型合计金额", prop: "lxzje", fieldType: "ftString",width:250},
{label: "成本预算科目", prop: "showname", fieldType: "ftString",width:192},
{label: "需求事项", prop: "fysx", fieldType: "ftString",width:300,show:false},
{label: "需求事项", prop: "fysxdesc", fieldType: "ftString",width:300},
{label: "测算依据", prop: "csyj", fieldType: "ftString",width:192, type:"inputText",allowEdit: true},
{label: "含税需求(万元)", prop:"xqje",width:80,align:'right',type:"inputNumber", allowEdit: true},
{label: "税率(%)", prop: "sl", fieldType: "zzsl",width:80,type:"inputNumber", allowEdit: true},
{label: "不含税需求(万元)", prop:"wsxqje",width:120,align:'right',
fieldType:"float", allowEdit: false, formatter:function (value) {
if(value){
var text =parseFloat(value).toFixed(2);
return text;
}else{
return 0;
}
}
},
{label: "实施责任人", prop: "zrr", fieldType: "ftString",width:192,type:"inputText",allowEdit:true},
{label: "项目名称", prop: "xmmc", fieldType: "ftString",width:300,type:"inputText",allowEdit:true},
{label: "备注", prop: "bz", fieldType: "ftString",width:300,type:"inputText",allowEdit:true},
],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
table:"YSSQMX",
sjbmid:'',
bmid:'',
tbrq:'',
tbr:'',
lxfs1:'',
lxfs2:'',
ysflid:''
},
/* form提交时的规则,具体规则参考官网*/
}
},
created(){
/* tag遍历 */
if(this.type!='edit'&&this.type!='add'){
this.editTableTitle.forEach((item)=>{
if(item.allowEdit!==undefined){
item.allowEdit=false
}
})
}
},
methods: {
xzwl(){
this.showDialog=true
},
spanMethod({ row, column, rowIndex, columnIndex }) {
if (column.property=='lxzje'||column.property=='showname') {
const _row = this.spanArr[rowIndex]
const _col = _row > 0 ? 1 : 0
return {
rowspan: _row,
colspan: _col
}
}}
},
components:{
XzsxList
}
}
</script>
<style scoped lang="scss">
.jehj{
line-height: 30px;
font-size: 14px;
}
.edit_table{
height: 300px;
overflow: auto;
}
</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="timestamp" v-model='queryParams.start' ></el-date-picker>
</div>
</el-col>
<el-col :span="6" 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>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">预算任务:</span>
<RelSelect style="width: 100%;" src='budgetms/ysfl/query' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.flid'></RelSelect>
</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/yssq/init/zt' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.zt'></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">申请订单:</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='budgetms/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 collapse-tags multiple style="width: 100%;" src='budgetms/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>
<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="yssqsp()" type="primary">预算申请审批</el-button>
<!-- <AttachFileButton :app='app' ></AttachFileButton> -->
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<!-- 多选数组转 -->
<TablePager :multipleTrans="[
'sjbmids','chooseBmids'
]"@getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
</div>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete,
yssqmx,
submit
} from '@/api/sbysjsp/yssq.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'yssq',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'budgetms/yssq',
/* 查询参数*/
queryParams: {
start:new Date().getTime()-1000*60*60*24*30,
end: new Date().getTime(),
flid:'',
zt:'',
djid:'',
sjbmids:[],
chooseBmids:[]
},
/* 表格标题对应参数*/
tableTitle: [
{title: "预算任务", field: "ysflName", fieldType: "ftString",width:200},
{title: "状态", field: "zt", fieldType: "ftString", align:'center', width: 70, transform: {
url: 'budgetms/yssq/init/zt',
label: 'name',
value: 'id'
}},
{title: "申请单号", field: "djid", fieldType: "ftString", width: 100},
{title: "公司编码", field: "sjbmcode", fieldType: "ftString",width:140},
{title: "公司名称", field: "sjbmName", fieldType: "ftString",width:140},
{title: "部门编码", field: "bmcode", fieldType: "ftString",width:140},
{title: "部门名称", field: "bmName", fieldType: "ftString",width:140},
{title: "填报日期", field: "tbrq", fieldType: "ftDate"},
// {title: "填报人编码", field: "tbrid", fieldType: "ftString",width:192},
{title: "填报人", field: "tbr", fieldType: "ftString",width:180},
{title: "申请金额", field: "sqje", fieldType: "float"},
{title: "联系电话", field: "lxfs1", fieldType: "ftString",width:200},
{title: "内部短号", field: "lxfs2", fieldType: "ftString",width:120}
]
}
},
methods: {
yssqsp(){
if (this.app.selectOne || this.app.clickOne) {
submit(this.singleItem).then(res=>{
if(res.success){
this.$success('操作成功');
this.$refs['TablePager'].pageQuery()
}
})
} else {
this.$warning('请选中一行操作');
}
},
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
queryDetail:yssqmx
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 500px;padding-left: 35px;">
<!-- 开始 -->
<div style="display: flex;height: 500px;width: 100%;">
<!-- <Power :app='app' v-if="(showDialog&&DialogName=='doPower')"></Power>
<SetRole :app='app' v-if="(showDialog&&DialogName=='SetRole')"></SetRole>
<CopyPower :app='app' v-if="(showDialog&&DialogName=='copyPower')" ></CopyPower> -->
<div class="min_full" style="width: 200px;border-right: 0px;overflow: hidden;height: 500px;">
<TreeBase style="height: 500px;" :dgtype='3' :app='this' @selected='selectedTree'></TreeBase>
</div>
<div class="min_full" style="width: calc(100% - 200px);height: 500px;">
<!-- 查询条件-->
<div class="search">
<SearchButton :app='this'></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.condition" size="small" class="search-input"></el-input>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<!-- 权限-->
<!-- <el-button size='mini' @click.native="setLogin" class="margin-right-10" type="primary">切换登录状态</el-button>
<el-button size='mini' @click.native="resetPassWord" style="margin-left: 0px;" type="primary">重置密码</el-button>
<el-button size='mini' @click.native="setRole" style="margin-left: 10px;" type="primary">分配角色</el-button> -->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager showSelection @getData='getData' :ref="'TablePager'" :app='this' :query='query'
@selectItem='selectItem' @getRow='getRow'>
</TablePager>
</div>
</div>
</div>
</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>
import {
queryroot,
query
} from '@/api/sbysjsp/yssq.js';
import {
tableMixin_noapp
} from 'common'
export default {
mixins: [tableMixin_noapp],
props: {
app: {
type: Object,
default: () => {
return {}
}
}
},
async mounted() {
},
name: 'wlList',
data() {
return {
treeTitle: '选择事项',
treeDefaultProps: {
children: 'children',
label: 'name'
},
queryParams: {
flbm: '',
condition:''
},
treeQueryParams: {
},
/* 表格标题对应参数*/
tableTitle: [{
label: "成本预算科目",
prop: "showname",
fieldType: "ftString",
width: 140
},
{
label: "需求事项",
prop: "xqsx",
fieldType: "ftString",
width: 140
},
{
label: "税率(%)",
prop: "sl",
fieldType: "ftString",
width: 140
},
{
label: "实施责任人",
prop: "zrr",
fieldType: "ftString",
width: 140
},
{
label: "备注",
prop: "bz",
fieldType: "ftString",
width: 140
},
{
label: "需求事项",
prop: "xqsx",
fieldType: "ftString",
width: 140
},
{
label: "维护人",
prop: "whr"
},
{
label: "维护时间",
prop: "whsj",
fieldType: "ftDateTime"
}
]
}
},
watch: {
},
methods: {
apiTreeQuery: queryroot,
// /* 基础查询*/
query: query,
// /* 基础增*/
// apiAdd: AddUser,
// /* 基础更新*/
// apiUpdate: UpdateUser,
// /* 删除操作*/
// apiDelete: DeleteUser,
selectedTree(e) {
this.queryParams.flbm = e.id
this.$refs['TablePager'].pageQuery()
},
save() {
/* 保存操作 */
const {
length
} = this.selectList
if (length == 0) {
this.$warning('请至少选中一条进行保存')
} else {
/* 删除id */
let selectList = this.selectList.map(item => {
item.fysx = item.id
item.sdfyxmid= item.fyxmid
delete item.id
item.fysxdesc=item.xqsx
return item
})
this.app.formDetail = [...this.app.formDetail, ...selectList]
this.app.showDialog = false
}
}
}
}
</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