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

预算申请联动

明细事项部分 功能
parent 96116852
...@@ -8,26 +8,41 @@ export function doQuery(query) { ...@@ -8,26 +8,41 @@ export function doQuery(query) {
data: query||{} data: query||{}
}) })
} }
export function doQuery1(query) {
return request({
url: '/budgetms/yssq/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) { export function doAdd(query) {
return request({ return request({
url: '/budgetms/yssqsp/add', url: '/budgetms/yssq/add',
method: 'post', method: 'post',
data: query||{} data: query||{}
}) })
} }
export function doUpdate(query) { export function doUpdate(query) {
return request({ return request({
url: '/budgetms/yssqsp/update', url: '/budgetms/yssq/update',
method: 'post', method: 'post',
data: query||{} data: query||{}
}) })
} }
export function doDelete(query) { export function doDelete(query) {
return request({ return request({
url: '/budgetms/yssqsp/delete', url: '/budgetms/yssq/delete',
method: 'post', method: 'post',
data: query||{} data: query||{}
}) })
} }
export function mxsxmx(query) {
return request({
url: '/budgetms/yssqmx/query',
method: 'post',
data: query||{}
})
}
<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> <template>
<RelDialog :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'> <RelDialog width='70%' :type='type' :queryMatch="{
key:'id',
value:'mid',
mainMethod:mainMethod
}" :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写--> <!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="80px" :rules="rules"> <el-form slot="form" ref="form" :model="form" label-width="80px" :rules="rules">
<XzsxList :app='this' v-if='showDialog' />
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="8">
<el-form-item label="名称" ref="name" prop="name"> <el-form-item label="申请公司" ref="sjbmid" prop="sjbmid" v-rule="{
<el-input :readonly="readonly" v-model="form.name"></el-input> 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-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="设备分类" ref="flid" prop="flid"> <el-form-item label="内部短号" ref="lxfs2" prop="lxfs2">
<!-- <el-input :readonly="readonly" v-model="form.name" ></el-input> --> <el-input :readonly="readonly" v-model="form.lxfs2"></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-form-item>
</el-col> </el-col>
</el-row> </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> </el-form>
</RelDialog> </RelDialog>
</template> </template>
<script> <script>
/* 映入额外弹框 */
import {editMixin} from 'common' import {editMixin} from 'common'
import XzsxList from './xzsxList.vue';
import {
doQuery1,
} from '@/api/sbysjsp/mxsx.js';
export default { export default {
mixins: [editMixin], mixins: [editMixin],
/* 存放index页面传递的额外参数*/ /* 存放index页面传递的额外参数*/
mounted() { 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之间的组件通信*/ /* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() { data() {
return { return {
mainMethod:doQuery1,
/* */
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*/ /* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: { form: {
flid:'', table:"YSSQMX",
id:'', sjbmid:'',
name:'' 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: { 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> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.jehj{
line-height: 30px;
font-size: 14px;
}
.edit_table{
height: 300px;
overflow: auto;
}
</style> </style>
...@@ -20,18 +20,72 @@ ...@@ -20,18 +20,72 @@
<el-col :span="6" class="search-col"> <el-col :span="6" class="search-col">
<div class="search-item"> <div class="search-item">
<span class="search-span">申请公司:</span> <span class="search-span">申请公司:</span>
<RelSelect style="width: 100%;" src='budgetms/common/bm/query' filterable clearable <RelSelect collapse-tags multiple style="width: 100%;" src='budgetms/common/sjbm/query' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.sjbmids'></RelSelect> :match="{value:'id',label:'bmmc'}" v-model='queryParams.sjbmids'></RelSelect>
</div> </div>
</el-col> </el-col>
<el-col :span="6" class="search-col"> <el-col :span="6" class="search-col">
<div class="search-item"> <div class="search-item">
<span class="search-span">申请部门:</span> <span class="search-span">申请部门:</span>
<RelSelect style="width: 100%;" src='budgetms/common/sjbm/query' filterable clearable <RelSelect linkage :linkParams="{sjbmids:queryParams.sjbmids}" :params="{
pids:queryParams.sjbmids.join()
}" collapse-tags multiple style="width: 100%;" src='budgetms/common/bm/query' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.chooseBmids'></RelSelect> :match="{value:'id',label:'bmmc'}" v-model='queryParams.chooseBmids'></RelSelect>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<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/fyxmfl/query' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.fyxmfl'></RelSelect>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">预算科目:</span>
<RelSelect linkage :linkParams="{fyxmfl:queryParams.fyxmfl}" style="width: 100%;" src='budgetms/fyxm/query' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.fyxmid'></RelSelect>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">费用事项:</span>
<RelSelect linkage :linkParams="{flbm:queryParams.fyxmid}" style="width: 100%;" src='budgetms/fysx/query' filterable clearable
:match="{value:'id',label:'showname'}" v-model='queryParams.fysxid'></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/yssqsp/init/state' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.wfpid'></RelSelect>
</div>
</el-col>
</el-row>
<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/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/yssqsp/init/tbfs' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.tbfs'></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.xminfo"></el-input>
</div>
</el-col>
</el-row>
</div> </div>
<!-- 按钮操作--> <!-- 按钮操作-->
<el-row class="tool-bar"> <el-row class="tool-bar">
...@@ -40,6 +94,8 @@ ...@@ -40,6 +94,8 @@
<AddButton ref="add" :app='app'></AddButton> <AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton> <CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton> <EditButton ref="edit" :app='app'></EditButton>
<WorkFlowButton :app='app' />
<AttachFileShow :app='app' />
<!-- <AttachFileButton :app='app' ></AttachFileButton> --> <!-- <AttachFileButton :app='app' ></AttachFileButton> -->
<!-- 额外按钮--> <!-- 额外按钮-->
<!-- 表头设置 --> <!-- 表头设置 -->
...@@ -47,7 +103,9 @@ ...@@ -47,7 +103,9 @@
</el-row> </el-row>
<!-- 表格--> <!-- 表格-->
<div class="tablePagers"> <div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem' <TablePager :multipleTrans="[
'sjbmids','chooseBmids'
]" @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'> @getRow='getRow'>
</TablePager> </TablePager>
</div> </div>
...@@ -58,7 +116,8 @@ ...@@ -58,7 +116,8 @@
doQuery, doQuery,
doAdd, doAdd,
doUpdate, doUpdate,
doDelete doDelete,
mxsxmx
} from '@/api/sbysjsp/mxsx.js'; } from '@/api/sbysjsp/mxsx.js';
/* edit页面*/ /* edit页面*/
import Edit from './edit' import Edit from './edit'
...@@ -80,13 +139,22 @@ ...@@ -80,13 +139,22 @@
type: '', type: '',
DialogTitle: '', DialogTitle: '',
/* 基础url*/ /* 基础url*/
baseUrl: '请填写', baseUrl: 'budgetms/yssqsp',
/* 查询参数*/ /* 查询参数*/
queryParams: { queryParams: {
operatype:'', operatype:'',
djid:'', djid:'',
sjbmids:'', sjbmids:[],
chooseBmids:'' chooseBmids:[],
fyxmfl:'',
fyxmid:'',
fysxid:'',
wfpid:'',
flid:'',
xminfo:'',
tbfs:''
}, },
/* 表格标题对应参数*/ /* 表格标题对应参数*/
tableTitle: [ tableTitle: [
...@@ -143,9 +211,8 @@ ...@@ -143,9 +211,8 @@
/* 删除操作*/ /* 删除操作*/
apiDelete: doDelete, apiDelete: doDelete,
/* 初始化赋值操作*/ /* 初始化赋值操作*/
init() { /* 初始化赋值操作*/
queryDetail:mxsxmx,
}
}, },
components: { components: {
Edit, Edit,
......
<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>
<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>
...@@ -49,7 +49,9 @@ ...@@ -49,7 +49,9 @@
<el-col :span="8" class="search-col"> <el-col :span="8" class="search-col">
<div class="search-item"> <div class="search-item">
<span class="search-span">申请部门:</span> <span class="search-span">申请部门:</span>
<RelSelect collapse-tags multiple style="width: 100%;" src='budgetms/common/bm/query' filterable clearable <RelSelect linkage :linkParams="{sjbmids:queryParams.sjbmids}" :params="{
pids:queryParams.sjbmids.join()
}" collapse-tags multiple style="width: 100%;" src='budgetms/common/bm/query' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.chooseBmids'></RelSelect> :match="{value:'id',label:'bmmc'}" v-model='queryParams.chooseBmids'></RelSelect>
</div> </div>
</el-col> </el-col>
...@@ -99,6 +101,7 @@ ...@@ -99,6 +101,7 @@
/* 初始额外赋值*/ /* 初始额外赋值*/
async mounted() { async mounted() {
this.$refs['TablePager'].pageQuery() this.$refs['TablePager'].pageQuery()
}, },
data() { data() {
return { return {
...@@ -175,5 +178,8 @@ ...@@ -175,5 +178,8 @@
</script> </script>
<style scoped> <style scoped>
.search-col{
max-width: 350px;
}
</style> </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