Commit b3be8960 by lei wang

dia经办用户查询条件逻辑添加

parent 5397b72d
...@@ -145,11 +145,11 @@ ...@@ -145,11 +145,11 @@
return { return {
codData: [], codData: [],
codColumns: [ codColumns: [
{ label: '交易编码', prop: 'cod', width: '200' }, { label: '交易编码', prop: 'cod', width: 'auto' },
{ label: '方向', prop: 'dir', width: '100' }, { label: '方向', prop: 'dir', width: 'auto' },
{ label: '类型', prop: 'typ', width: '100' }, { label: '类型', prop: 'typ', width: 'auto' },
{ label: '名称', prop: 'txt', width: '200' }, { label: '名称', prop: 'txt', width: 'auto' },
{ label: '状态', prop: 'sta', width: '100' } { label: '状态', prop: 'sta', width: 'auto' }
], ],
}; };
}, },
......
<template> <template>
<div class="eibs-tab"> <div class="eibs-tab">
<c-col :span="12" class="col-left"> <c-col :span="12" class="col-left">
<c-col :span="24"> <c-col :span="24">
<el-form-item label="类型" prop="cod"> <el-form-item label="类型" prop="cod">
<c-select style="width: 100%" v-model="model.cod" placeholder="请选择类型" :code="getCodesByKey('diatxt')"> <c-select style="width: 100%" v-model="model.cod" placeholder="请选择类型" :code="getCodesByKey('diatxt')">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="24"> <c-col :span="24">
<el-form-item label="参考号" prop="objref"> <el-form-item label="参考号" prop="objref">
<c-input v-model="model.objref" placeholder="请输入参考号" style="width: 100%"> <c-input v-model="model.objref" placeholder="请输入参考号" style="width: 100%">
</c-input> </c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="24"> <c-col :span="24">
<el-form-item label="经办用户" prop="ownusr"> <el-form-item label="经办用户" prop="ownusr">
<c-fullbox> <c-fullbox>
<c-input :disabled="true" v-model="model.ownusr" placeholder="请输入经办用户" style="width: 100%"></c-input> <c-input :disabled="true" v-model="model.ownusr" placeholder="请输入经办用户" style="width: 100%"></c-input>
<template slot="footer"> <template slot="footer">
<c-button <c-button :disabled="type === 'edit'" style="margin-left: 10px; padding: 0 12px" size="small"
:disabled="type === 'edit'" type="primary" @click="queryOwnusr()" icon="el-icon-info" />
style="margin-left: 10px; padding: 0 12px" </template>
size="small" </c-fullbox>
type="primary" </el-form-item>
@click="onSeainf" </c-col>
icon="el-icon-info"/> <c-col :span="24">
</template> <el-form-item label="是否完成标志" prop="donflg">
</c-fullbox> <c-select style="width: 100%" v-model="model.donflg" placeholder="请选择是否完成标志"
</el-form-item> :code="getCodesByKey('dia_donflg')">
</c-col>
<c-col :span="24">
<el-form-item label="是否完成标志" prop="donflg">
<c-select style="width: 100%" v-model="model.donflg" placeholder="请选择是否完成标志" :code="getCodesByKey('dia_donflg')">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="经办用户组" prop="ownusg">
<c-select style="width: 100%" v-model="model.ownusg" placeholder="请选择经办用户组" :code="getCodesByKey('usgtxt')">
</c-select>
</el-form-item>
</c-col>
</c-col> </c-col>
<!------------- 右 ----------> <c-col :span="24">
<c-col :span="12" class="col-right"> <el-form-item label="经办用户组" prop="ownusg">
<c-col :span="24"> <c-select style="width: 100%" v-model="model.ownusg" placeholder="请选择经办用户组" :code="getCodesByKey('usgtxt')">
<el-form-item label="开始日期" prop="datFrom">
<c-date-picker type="date"  v-model="model.datFrom" style="width:100%"  placeholder="请选择开始日期"></c-date-picker>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="截止日期" prop="datTo">
<c-date-picker type="date"  v-model="model.datTo" style="width:100%"  placeholder="请选择截止日期"></c-date-picker>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="交易名" prop="frm">
<c-select style="width: 100%" v-model="model.frm" placeholder="请选择交易名" :code="getCodesByKey('atptxt')">
</c-select> </c-select>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="24"> </c-col>
<el-form-item label="创建/修改人" prop="usr"> <!------------- 右 ---------->
<c-fullbox> <c-col :span="12" class="col-right">
<c-input :disabled="true" v-model="model.usr" placeholder="请输入创建/修改人" style="width: 100%"></c-input> <c-col :span="24">
<template slot="footer"> <el-form-item label="开始日期" prop="datFrom">
<c-button <c-date-picker type="date"  v-model="model.datFrom" style="width:100%"  placeholder="请选择开始日期"></c-date-picker>
:disabled="type === 'edit'" </el-form-item>
style="margin-left: 10px; padding: 0 12px"
size="small"
type="primary"
@click="onSeainf"
icon="el-icon-info"/>
</template>
</c-fullbox>
</el-form-item>
</c-col>
</c-col> </c-col>
<c-col :span="24"> <c-col :span="24">
<c-col :span="12" style="text-align: left"> <el-form-item label="截止日期" prop="datTo">
<el-button type="primary" size="small" @click="diaAdd">新增</el-button> <c-date-picker type="date"  v-model="model.datTo" style="width:100%"  placeholder="请选择截止日期"></c-date-picker>
</c-col> </el-form-item>
<c-col :span="12" style="text-align: right"> </c-col>
<el-button size="small" @click="handleReset">重置</el-button> <c-col :span="24">
<el-button <el-form-item label="交易名" prop="frm">
type="primary" <c-select style="width: 100%" v-model="model.frm" placeholder="请选择交易名" :code="getCodesByKey('atptxt')">
icon="el-icon-search" </c-select>
size="small" </el-form-item>
@click="onSearch()"
>查询
</el-button>
</c-col>
</c-col> </c-col>
<c-col :span="24"> <c-col :span="24">
<c-paging-table <el-form-item label="创建/修改人" prop="usr">
:data="diaData" <c-fullbox>
:columns="diaColumns" <c-input :disabled="true" v-model="model.usr" placeholder="请输入创建/修改人" style="width: 100%"></c-input>
:pageNumber="model.pageNum" <template slot="footer">
:pageSize="model.pageSize" <c-button :disabled="type === 'edit'" style="margin-left: 10px; padding: 0 12px" size="small"
:total="model.total" type="primary" @click="onSeainf" icon="el-icon-info" />
v-on:queryFunc="queryFunc"
:border="true"
>
<c-table-column fixed="right" prop="op" label="操作" width="240px">
<template slot-scope="{ scope }">
<c-button
style="margin-left: 0"
size="small"
@click="diaInfo(scope.$index, scope.row)"
>详情</c-button
>
<c-button
style="margin-left: 5px"
size="small"
type="primary"
@click="diaEdit(scope.$index, scope.row)"
>修改</c-button
>
<c-button
size="small"
style="margin-left: 5px"
@click="diaDelete(scope.$index, scope.row)"
>删除</c-button
>
<el-popover placement="top-start" width="50" trigger="click">
<ul class="table-button-item-list">
<li>
<c-button size="small" style="margin-left: 0">指派</c-button>
</li>
<li>
<c-button size="small" style="margin-left: 0">删除</c-button>
</li>
</ul>
<a
slot="reference"
href="javascript:void(0)"
style="margin-left: 5px"
>
<i class="el-icon-more"></i>
</a>
</el-popover>
</template> </template>
</c-table-column> </c-fullbox>
</c-paging-table> </el-form-item>
</c-col> </c-col>
</div> </c-col>
</template>
<c-col :span="24">
<script> <c-col :span="12" style="text-align: left">
import { format } from "path"; <el-button type="primary" size="small" @click="diaAdd">新增</el-button>
</c-col>
<c-col :span="12" style="text-align: right">
<el-button size="small" @click="handleReset">重置</el-button>
<el-button type="primary" icon="el-icon-search" size="small" @click="onSearch()">查询
</el-button>
</c-col>
</c-col>
<c-col :span="24">
<c-paging-table :data="diaData" :columns="diaColumns" :pageNumber="model.pageNum" :pageSize="model.pageSize"
:total="model.total" v-on:queryFunc="queryFunc" :border="true">
<c-table-column fixed="right" prop="op" label="操作" width="240px">
<template slot-scope="{ scope }">
<c-button style="margin-left: 0" size="small" @click="diaInfo(scope.$index, scope.row)">详情</c-button>
<c-button style="margin-left: 5px" size="small" type="primary"
@click="diaEdit(scope.$index, scope.row)">修改</c-button>
<c-button size="small" style="margin-left: 5px" @click="diaDelete(scope.$index, scope.row)">删除</c-button>
</template>
</c-table-column>
</c-paging-table>
</c-col>
</div>
</template>
<script>
import codes from "~/config/CodeTable"; import codes from "~/config/CodeTable";
import { queryByPage } from "~/service/test/dia.js"; import { queryByPage } from "~/service/test/dia.js";
export default { export default {
name: "", name: "",
props: ["model"], props: ["model"],
inject: ["root"], inject: ["root"],
data() { data() {
return { return {
diaData: [], diaData: [],
diaColumns: [ diaColumns: [
{ label: '日期', prop: 'datStr', width: 'auto' }, { label: '日期', prop: 'datStr', width: 'auto' },
{ label: '类型', prop: 'codCn', width: 'auto' }, { label: '类型', prop: 'codCn', width: 'auto' },
{ label: '参考号', prop: 'objref', width: 'auto' }, { label: '参考号', prop: 'objref', width: 'auto' },
{ label: '备忘录名称', prop: 'nam', width: 'auto' }, { label: '备忘录名称', prop: 'nam', width: 'auto' },
{ label: '交易名', prop: 'frm', width: 'auto' }, { label: '交易名', prop: 'frm', width: 'auto' },
{ label: '经办用户', prop: 'ownusr', width: 'auto' }, { label: '经办用户', prop: 'ownusr', width: 'auto' },
{ label: '经办用户组', prop: 'ownusg', width: 'auto' }, { label: '经办用户组', prop: 'ownusg', width: 'auto' },
{ label: '是否完成', prop: 'donflgCn', width: 'auto' }, { label: '是否完成', prop: 'donflgCn', width: 'auto' },
], ],
}; dialogFormVisible: false,
};
},
computed: {
},
activated() {
this.$forceUpdate()
// 填充ownusr查询条件
const { extkey } = this.$route.params
if (extkey != undefined && extkey != null) {
this.model.ownusr = extkey
}
// 查询数据
const { update } = this.$route.params
if (update) {
this.onInfdiaSearch()
}
},
methods: {
getCodesByKey(key) {
return codes[key] ?? [];
}, },
computed: { handleReset() {
this.root.$refs.modelForm.resetFields();
}, },
activated() { onSearch() {
const { update } = this.$route.params this.model.pageSize = 5;
if (update) { this.model.pageNum = 1;
this.onInfdiaSearch() this.onInfdiaSearch();
}
}, },
methods: { onInfdiaSearch() {
getCodesByKey(key) { queryByPage(this.model).then(res => {
return codes[key] ?? []; const list = res.list
}, Object.keys(list).forEach((item) => {
handleReset() { let obj = list[item]
this.root.$refs.modelForm.resetFields(); let codArr = codes['diatxt'].filter((i) => {
}, return i.value == obj.cod
onSearch() { })
this.model.pageSize = 5; obj.codCn = codArr[0].label
this.model.pageNum = 1; let donflgArr = codes['dia_donflg'].filter((i) => {
this.onInfdiaSearch(); return i.value == obj.donflg
},
onInfdiaSearch() {
queryByPage(this.model).then(res => {
/**
* pageNumber: 0
* pageSize: 0
* total: 69
* totalPage: 0
*/
const list = res.list
Object.keys(list).forEach((item) => {
let obj = list[item]
let codArr = codes['diatxt'].filter((i) => {
return i.value == obj.cod
})
obj.codCn = codArr[0].label
let donflgArr = codes['dia_donflg'].filter((i) => {
return i.value == obj.donflg
})
obj.donflgCn = donflgArr[0].label
}) })
this.diaData = list obj.donflgCn = donflgArr[0].label
this.model.pageNum = res.pageNumber })
this.model.pageSize = res.pageSize this.diaData = list
this.model.total = res.total this.model.pageNum = res.pageNumber
}) this.model.pageSize = res.pageSize
}, this.model.total = res.total
queryFunc(pageNumber, pageSize) { })
this.model.pageNum = pageNumber },
this.model.pageSize = pageSize queryFunc(pageNumber, pageSize) {
this.onInfdiaSearch() this.model.pageNum = pageNumber
}, this.model.pageSize = pageSize
diatypeChange(val) { this.onInfdiaSearch()
this.model.fectyp = val; },
}, diatypeChange(val) {
diaCodesByKey(key) { this.model.fectyp = val;
return codes[key] ?? []; },
}, diaCodesByKey(key) {
diaAdd() { return codes[key] ?? [];
this.$router.push(`/statics/dbadia`) },
}, diaAdd() {
diaInfo(index, row) { this.$router.push(`/statics/dbadia`)
this.$router.push(`/statics/dbidia/${row.inr}`) },
}, diaInfo(index, row) {
diaEdit(index, row) { this.$router.push(`/statics/dbidia/${row.inr}`)
this.$router.push(`/statics/dbedia/${row.inr}`) },
}, diaEdit(index, row) {
diaDelete(index, row) { this.$router.push(`/statics/dbedia/${row.inr}`)
this.$router.push(`/statics/dbddia/${row.inr}`) },
}, diaDelete(index, row) {
this.$router.push(`/statics/dbddia/${row.inr}`)
},
queryOwnusr() {
this.$router.push({
name: 'StaticsInfusr',
params: {
from: "StaticsInfdia"
}
})
},
// 通过user页面的返回信息填充查询条件
fillOwnusrByRoute() {
const { extkey } = this.$route.params
if (extkey != undefined && extkey != null) {
this.model.ownusr = extkey
}
}, },
}; },
</script> };
</script>
<style scoped>
.table-button-item-list { <style scoped>
padding: 0; .table-button-item-list {
margin: 0; padding: 0;
} margin: 0;
.table-button-item-list li { }
list-style: none;
padding: 5px 0; .table-button-item-list li {
text-align: center; list-style: none;
color: #606266; padding: 5px 0;
cursor: pointer; text-align: center;
}</style> color: #606266;
cursor: pointer;
\ No newline at end of file }
</style>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
v-on:queryFunc="queryFunc" v-on:queryFunc="queryFunc"
:border="true" :border="true"
> >
<c-table-column fixed="right" prop="op" label="操作" width="240px"> <c-table-column fixed="right" prop="op" label="操作" width="320px">
<template slot-scope="{ scope }"> <template slot-scope="{ scope }">
<c-button <c-button
style="margin-left: 0" style="margin-left: 0"
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
@click="usrDelete(scope.$index, scope.row)" @click="usrDelete(scope.$index, scope.row)"
>删除</c-button >删除</c-button
> >
<c-button id="useButton" size="small" style="margin-left: 5px" :disabled="useButtonVisible" @click="use(scope.row)">使用</c-button>
<!-- <el-popover placement="top-start" width="50" trigger="click">--> <!-- <el-popover placement="top-start" width="50" trigger="click">-->
<!-- <ul class="table-button-item-list">--> <!-- <ul class="table-button-item-list">-->
<!-- <li>--> <!-- <li>-->
...@@ -135,6 +136,7 @@ export default { ...@@ -135,6 +136,7 @@ export default {
// { label: 'ubrList', prop: 'ubrList', width: 'auto' }, // { label: 'ubrList', prop: 'ubrList', width: 'auto' },
// { label: 'uclList', prop: 'uclList', width: 'auto' }, // { label: 'uclList', prop: 'uclList', width: 'auto' },
], ],
useButtonVisible: true
}; };
}, },
// activated:已进入页面便可触发 // activated:已进入页面便可触发
...@@ -144,7 +146,24 @@ export default { ...@@ -144,7 +146,24 @@ export default {
this.onInfusrSearch() this.onInfusrSearch()
} }
}, },
created() {
const { from } = this.$route.params
if (from != undefined && from != null) {
this.useButtonVisible = false
}
},
methods: { methods: {
use(row) {
const extkey = row.extkey
const { from } = this.$route.params
this.$store.dispatch("TagsView/delView", this.$route)
this.$router.push({
name: from,
params: {
extkey: extkey
}
})
},
handleReset() { handleReset() {
this.root.$refs.modelForm.resetFields(); this.root.$refs.modelForm.resetFields();
}, },
......
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