Commit 79816d2b authored by dingyoujian's avatar dingyoujian

调整

# Conflicts:
#	src/views/sbysjsp/yssq/index.vue
#	src/views/sbysjsp/yssqtz/index.vue
parent b090a141
...@@ -4,35 +4,52 @@ import request from 'common/src/utils/request' ...@@ -4,35 +4,52 @@ import request from 'common/src/utils/request'
/* query */ /* query */
export function doQuery(query) { export function doQuery(query) {
return request({ return request({
url: '/hafms/pzfyxm/query', url: '/hafms/fyxm/query',
method: 'post', method: 'post',
data: query||{} data: query||{}
}) })
} }
export function doAdd(query) { export function doAdd(query) {
return request({ return request({
url: '/hafms/pzfyxm/add', url: '/hafms/fyxm/add',
method: 'post', method: 'post',
data: query||{} data: query||{}
}) })
} }
export function doUpdate(query) { export function doUpdate(query) {
return request({ return request({
url: '/hafms/pzfyxm/update', url: '/hafms/fyxm/update',
method: 'post', method: 'post',
data: query||{} data: query||{}
}) })
} }
export function doDelete(query) { export function doDelete(query) {
return request({ return request({
url: '/hafms/pzfyxm/delete', url: '/hafms/fyxm/delete',
method: 'post', method: 'post',
data: query||{} data: query||{}
}) })
} }
export function qt(query) { export function qt(query) {
return request({ return request({
url: '/hafms/pzfyxm/record/qt', url: '/hafms/fyxm/record/qt',
method: 'post',
data: query||{}
})
}
/* 上移,下移 */
export function moveup(query) {
return request({
url: '/hafms/fyxm/moveup',
method: 'post',
data: query||{}
})
}
export function movedown(query) {
return request({
url: '/hafms/fyxm/movedown',
method: 'post', method: 'post',
data: query||{} data: query||{}
}) })
......
<template> <template>
<RelDialog :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'> <RelDialog :type='type' :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="100px" :rules="rules">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="费用编码" ref="code" prop="code"> <el-form-item label="费用编码" ref="code" prop="code">
...@@ -9,15 +9,19 @@ ...@@ -9,15 +9,19 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="费用名称" ref="name" prop="name"> <el-form-item label="费用名称" v-rule="{
<el-input :readonly="readonly" v-model="form.name"></el-input> required:true,
rules:rules,
}" ref="name" prop="name">
<el-input :readonly="readonly" v-model="form.name" ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注" ref="bz" prop="bz"> <el-form-item label="备注" ref="bz" prop="bz">
<el-input :readonly="readonly" v-model="form.bz"></el-input> <el-input :readonly="readonly" v-model="form.bz" ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
</RelDialog> </RelDialog>
...@@ -36,9 +40,10 @@ ...@@ -36,9 +40,10 @@
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/ /* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: { form: {
code:'', code:'',
id:'',
name:'', name:'',
bz:'' bz:'',
cbysbz:'',
xhqsfs:''
} }
} }
}, },
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
<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>
<el-button size='mini' @click="addxjfl()" type="primary">添加下级分类</el-button>
<!-- <el-button size='mini' @click="sy()" type="primary">上移</el-button>
<el-button size='mini' @click="xy()" type="primary">下移</el-button> -->
<ReloadButton :app='app'></ReloadButton> <ReloadButton :app='app'></ReloadButton>
<!-- <AttachFileButton :app='app' ></AttachFileButton> --> <!-- <AttachFileButton :app='app' ></AttachFileButton> -->
<!-- 额外按钮--> <!-- 额外按钮-->
...@@ -16,8 +19,8 @@ ...@@ -16,8 +19,8 @@
</el-row> </el-row>
<!-- 表格--> <!-- 表格-->
<div class="tablePagers"> <div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem' <TablePager :operateButtons='true' @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'> type='treeTable' @getRow='getRow' :getTreeMethod='getTreeMethod' >
<template slot="tabCustom"> <template slot="tabCustom">
<el-table-column label="启用/停用" width="90" header-align="center" fixed="right" > <el-table-column label="启用/停用" width="90" header-align="center" fixed="right" >
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -37,6 +40,8 @@ ...@@ -37,6 +40,8 @@
doAdd, doAdd,
doUpdate, doUpdate,
doDelete, doDelete,
moveup,
movedown,
qt qt
} from '@/api/jccspz/fymxwd.js'; } from '@/api/jccspz/fymxwd.js';
/* edit页面*/ /* edit页面*/
...@@ -49,37 +54,62 @@ ...@@ -49,37 +54,62 @@
name: 'fymxwd', name: 'fymxwd',
/* 初始额外赋值*/ /* 初始额外赋值*/
async mounted() { async mounted() {
/* 初始化条件*/
/* */
this.$refs['TablePager'].pageQuery() this.$refs['TablePager'].pageQuery()
}, },
data() { data() {
return { return {
/* 控制树表格渲染正确 */
rowKey:'id',
/*需要的额外参数 */ /*需要的额外参数 */
showDialog: false, showDialog: false,
DialogName: '', DialogName: '',
type: '', type: '',
DialogTitle: '', DialogTitle: '',
/* 基础url*/ /* 基础url*/
baseUrl: 'hafms/pzfyxm', baseUrl: 'hafms/fyxm',
/* 查询参数*/ /* 查询参数*/
queryParams: { queryParams: {
}, },
/* 表格标题对应参数*/ /* 表格标题对应参数*/
tableTitle: [ tableTitle: [{
{title: "项目编码", field: "code", width: 140,hidden:true}, title: "名称",
{title: "项目名称", field: "name", width: 160,hidden:true}, field: "name",
{title: "费用明细", field: "showname", width: 180}, width: 300
{title: "状态", field: "tybz", width: 80,formatter:(a,b,value)=>{ },
let label='正常' {
if(value!='N'){ title: "编码",
label='停用' field: "code",
width: 120
},
{
title: "状态",
field: "tybz",
fieldType: "tybz"
},
{
title: "停用日期",
field: "tyrq",
fieldType: "ftDate"
},
{
title: "备注",
field: "bz"
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
} }
return label
}},
{title: "停用日期", field: "tyrq", fieldType: "ftDate"},
{title: "备注", field: "bz", width: 200},
{title: "维护人", field: "whr"},
{title: "维护时间", field: "whsj", fieldType: "ftDateTime"}
] ]
} }
}, },
...@@ -88,6 +118,93 @@ ...@@ -88,6 +118,93 @@
let nTy = false let nTy = false
nTy = (a.row.tybz == 'N' ? true : false) nTy = (a.row.tybz == 'N' ? true : false)
return nTy return nTy
},
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
getTreeMethod(that,tdata){
let treeData=tdata
treeData.forEach((e, index) => {
treeData[index].rowKey = e.id
})
let newTreeData = that.dgData(treeData, 'root')
that.tableData=newTreeData
that.expandKeys = ['rowKey']
if(this.singleItem.id){
let querys=(item,id)=>{
if(item.id==id){
/* 表格数据变更需要重构建Dom需要nextTick*/
this.$nextTick(()=>{
this.$refs.TablePager.setCurrent(item)
})
return item
}else{
/* 展开 */
// this.$refs.TablePager.expandKeys.push(item.rowKey)
item.children.forEach(e=>{
querys(e,id)
})
}
}
querys({
children:newTreeData,
id:false
},this.singleItem.id)
}
},
addxjfl(){
if (this.app.selectOne || this.app.clickOne) {
/* 打开add*/
this.$refs.add.add()
/* 添加pid */
this.$nextTick(()=>{
this.$refs.add.$children[1].form.pid=this.singleItem.id
})
} else {
this.$warning('请选中一行操作');
}
},
sy(){
if (this.app.selectOne || this.app.clickOne) {
moveup({
id:this.singleItem.id
}).then(res=>{
if(res.success){
this.$refs.TablePager.pageQuery({
loading:false
})
}
})
} else {
this.$warning('请选中一行操作');
}
},
xy(){
if (this.app.selectOne || this.app.clickOne) {
movedown({
id:this.singleItem.id
}).then(res=>{
if(res.success){
this.$refs.TablePager.pageQuery({
loading:false
})
}
})
} else {
this.$warning('请选中一行操作');
}
}, },
setEnable(id) { setEnable(id) {
this.$confirm('是否启用/停用, 是否继续?', '提示', { this.$confirm('是否启用/停用, 是否继续?', '提示', {
...@@ -109,14 +226,6 @@ ...@@ -109,14 +226,6 @@
}) })
}, },
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/ /* 初始化赋值操作*/
init() { init() {
......
...@@ -7,39 +7,38 @@ ...@@ -7,39 +7,38 @@
<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>
<el-date-picker value-format="timestamp" v-model='queryParams.start'></el-date-picker> <el-date-picker value-format="timestamp" v-model='queryParams.start' ></el-date-picker>
</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>
<el-date-picker value-format="timestamp" v-model='queryParams.end'></el-date-picker> <el-date-picker value-format="timestamp" v-model='queryParams.end' ></el-date-picker>
</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='hafms/ysfl/query' filterable clearable <RelSelect style="width: 100%;" src='hafms/ysfl/query' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.flid'></RelSelect> :match="{value:'id',label:'name'}" v-model='queryParams.flid'></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">-->
<!-- <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-row>
<el-row :gutter="20" class="search-row-1">
<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>
<el-input v-model="queryParams.djid"></el-input> <el-input v-model="queryParams.djid"></el-input>
</div> </div>
</el-col> </el-col>
<!-- <el-col :span="6" 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>
</el-col> -->
</el-row>
<el-row :gutter="20" class="search-row-1">
<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>
...@@ -65,7 +64,7 @@ ...@@ -65,7 +64,7 @@
<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>
<!-- <el-button size='mini' @click="yssqsp()" type="primary">预算申请审批</el-button>--> <!-- <el-button size='mini' @click="yssqsp()" type="primary">预算申请审批</el-button>-->
<!--<PageDetail @created='created' :page='page' style="margin-left: 10px;" />--> <!--<PageDetail @created='created' :page='page' style="margin-left: 10px;" />-->
<!-- <AttachFileButton :app='app' ></AttachFileButton> --> <!-- <AttachFileButton :app='app' ></AttachFileButton> -->
<!-- 额外按钮--> <!-- 额外按钮-->
...@@ -77,7 +76,8 @@ ...@@ -77,7 +76,8 @@
<!-- 多选数组转 --> <!-- 多选数组转 -->
<TablePager :multipleTrans="[ <TablePager :multipleTrans="[
'sjbmids','chooseBmids' 'sjbmids','chooseBmids'
]" @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem' @getRow='getRow'> ]"@getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager> </TablePager>
</div> </div>
</div> </div>
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
}, },
data() { data() {
return { return {
page: yssqtz, page:yssqtz,
/*需要的额外参数 */ /*需要的额外参数 */
showDialog: false, showDialog: false,
DialogName: '', DialogName: '',
...@@ -117,100 +117,44 @@ ...@@ -117,100 +117,44 @@
baseUrl: 'hafms/yssq', baseUrl: 'hafms/yssq',
/* 查询参数*/ /* 查询参数*/
queryParams: { queryParams: {
start: new Date().getTime() - 1000 * 60 * 60 * 24 * 30, start:new Date().getTime()-1000*60*60*24*30,
end: new Date().getTime(), end: new Date().getTime(),
flid: '', flid:'',
zt: '', zt:'',
djid: '', djid:'',
sjbmids: [], sjbmids:[],
chooseBmids: [] chooseBmids:[]
}, },
/* 表格标题对应参数*/ /* 表格标题对应参数*/
tableTitle: [ tableTitle: [
// {title: "预算任务", field: "ysflName", fieldType: "ftString",width:200}, // {title: "预算任务", field: "ysflName", fieldType: "ftString",width:200},
{ // {title: "状态", field: "zt", fieldType: "ftString", align:'center', width: 70, transform: {
title: "状态", // url: 'hafms/yssq/init/zt',
field: "zt", // label: 'name',
fieldType: "ftString", // value: 'id'
align: 'center', // }},
width: 70, {title: "申请单号", field: "djid", fieldType: "ftString", width: 100},
transform: { // {title: "公司编码", field: "sjbmcode", fieldType: "ftString",width:140},
url: 'hafms/yssq/init/zt', {title: "公司名称", field: "sjbmName", fieldType: "ftString",width:140},
label: 'name', // {title: "部门编码", field: "bmcode", fieldType: "ftString",width:140},
value: 'id' {title: "部门名称", field: "bmName", fieldType: "ftString",width:140},
} {title: "填报日期", field: "tbrq", fieldType: "ftDate"},
},
{
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: "tbrid", fieldType: "ftString",width:192},
{ {title: "填报人", field: "tbr", fieldType: "ftString",width:180},
title: "填报人", // {title: "申请金额", field: "sqje", fieldType: "float"},
field: "tbr", // {title: "联系电话", field: "lxfs1", fieldType: "ftString",width:200},
fieldType: "ftString", // {title: "内部短号", field: "lxfs2", fieldType: "ftString",width:120}
width: 180
},
{
title: "申请金额(万元)",
field: "sqje",
fieldType: "float",
width: 150
},
{
title: "联系电话",
field: "lxfs1",
fieldType: "ftString",
width: 200
},
{
title: "内部短号",
field: "lxfs2",
fieldType: "ftString",
width: 120
}
] ]
} }
}, },
methods: { methods: {
created(vdom) { created(vdom){
vdom.queryParams.djid = 123 vdom.queryParams.djid=123
}, },
yssqsp() { yssqsp(){
if (this.app.selectOne || this.app.clickOne) { if (this.app.selectOne || this.app.clickOne) {
submit(this.singleItem).then(res => { submit(this.singleItem).then(res=>{
if (res.success) { if(res.success){
this.$success('操作成功'); this.$success('操作成功');
this.$refs['TablePager'].pageQuery() this.$refs['TablePager'].pageQuery()
} }
...@@ -229,7 +173,7 @@ ...@@ -229,7 +173,7 @@
/* 删除操作*/ /* 删除操作*/
apiDelete: doDelete, apiDelete: doDelete,
/* 初始化赋值操作*/ /* 初始化赋值操作*/
queryDetail: yssqmx queryDetail:yssqmx
}, },
components: { components: {
Edit, Edit,
...@@ -238,7 +182,8 @@ ...@@ -238,7 +182,8 @@
</script> </script>
<style scoped> <style scoped>
.search-col { .search-col{
max-width: 350px; max-width: 350px;
} }
</style> </style>
...@@ -16,30 +16,29 @@ ...@@ -16,30 +16,29 @@
<el-date-picker value-format="timestamp" v-model='queryParams.end' ></el-date-picker> <el-date-picker value-format="timestamp" v-model='queryParams.end' ></el-date-picker>
</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='hafms/ysfl/query' filterable clearable <RelSelect style="width: 100%;" src='hafms/ysfl/query' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.flid'></RelSelect> :match="{value:'id',label:'name'}" v-model='queryParams.flid'></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">-->
<!-- <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-row>
<el-row :gutter="20" class="search-row-1">
<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>
<el-input v-model="queryParams.djid"></el-input> <el-input v-model="queryParams.djid"></el-input>
</div> </div>
</el-col> </el-col>
<!-- <el-col :span="6" 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>
</el-col> -->
</el-row>
<el-row :gutter="20" class="search-row-1">
<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>
...@@ -132,22 +131,22 @@ ...@@ -132,22 +131,22 @@
/* 表格标题对应参数*/ /* 表格标题对应参数*/
tableTitle: [ tableTitle: [
// {title: "预算任务", field: "ysflName", fieldType: "ftString",width:200}, // {title: "预算任务", field: "ysflName", fieldType: "ftString",width:200},
{title: "状态", field: "zt", fieldType: "ftString", align:'center', width: 70, transform: { // {title: "状态", field: "zt", fieldType: "ftString", align:'center', width: 70, transform: {
url: 'hafms/yssq/init/zt', // url: 'hafms/yssq/init/zt',
label: 'name', // label: 'name',
value: 'id' // value: 'id'
}}, // }},
{title: "申请单号", field: "djid", fieldType: "ftString", width: 100}, {title: "申请单号", field: "djid", fieldType: "ftString", width: 100},
{title: "公司编码", field: "sjbmcode", fieldType: "ftString",width:140}, // {title: "公司编码", field: "sjbmcode", fieldType: "ftString",width:140},
{title: "公司名称", field: "sjbmName", fieldType: "ftString",width:140}, {title: "公司名称", field: "sjbmName", fieldType: "ftString",width:140},
{title: "部门编码", field: "bmcode", fieldType: "ftString",width:140}, // {title: "部门编码", field: "bmcode", fieldType: "ftString",width:140},
{title: "部门名称", field: "bmName", fieldType: "ftString",width:140}, {title: "部门名称", field: "bmName", fieldType: "ftString",width:140},
{title: "填报日期", field: "tbrq", fieldType: "ftDate"}, {title: "填报日期", field: "tbrq", fieldType: "ftDate"},
// {title: "填报人编码", field: "tbrid", fieldType: "ftString",width:192}, // {title: "填报人编码", field: "tbrid", fieldType: "ftString",width:192},
{title: "填报人", field: "tbr", fieldType: "ftString",width:180}, {title: "填报人", field: "tbr", fieldType: "ftString",width:180},
{title: "申请金额(万元)", field: "sqje", fieldType: "float",width:150}, // {title: "申请金额", field: "sqje", fieldType: "float"},
{title: "联系电话", field: "lxfs1", fieldType: "ftString",width:200}, // {title: "联系电话", field: "lxfs1", fieldType: "ftString",width:200},
{title: "内部短号", field: "lxfs2", fieldType: "ftString",width:120} // {title: "内部短号", field: "lxfs2", fieldType: "ftString",width:120}
] ]
} }
}, },
......
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