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' }
], ],
}; };
}, },
......
...@@ -19,20 +19,16 @@ ...@@ -19,20 +19,16 @@
<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"
size="small"
type="primary"
@click="onSeainf"
icon="el-icon-info"/>
</template> </template>
</c-fullbox> </c-fullbox>
</el-form-item> </el-form-item>
</c-col> </c-col>
<c-col :span="24"> <c-col :span="24">
<el-form-item label="是否完成标志" prop="donflg"> <el-form-item label="是否完成标志" prop="donflg">
<c-select style="width: 100%" v-model="model.donflg" placeholder="请选择是否完成标志" :code="getCodesByKey('dia_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>
...@@ -66,13 +62,8 @@ ...@@ -66,13 +62,8 @@
<c-fullbox> <c-fullbox>
<c-input :disabled="true" v-model="model.usr" placeholder="请输入创建/修改人" style="width: 100%"></c-input> <c-input :disabled="true" v-model="model.usr" 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="onSeainf" icon="el-icon-info" />
style="margin-left: 10px; padding: 0 12px"
size="small"
type="primary"
@click="onSeainf"
icon="el-icon-info"/>
</template> </template>
</c-fullbox> </c-fullbox>
</el-form-item> </el-form-item>
...@@ -85,77 +76,32 @@ ...@@ -85,77 +76,32 @@
</c-col> </c-col>
<c-col :span="12" style="text-align: right"> <c-col :span="12" style="text-align: right">
<el-button size="small" @click="handleReset">重置</el-button> <el-button size="small" @click="handleReset">重置</el-button>
<el-button <el-button type="primary" icon="el-icon-search" size="small" @click="onSearch()">查询
type="primary"
icon="el-icon-search"
size="small"
@click="onSearch()"
>查询
</el-button> </el-button>
</c-col> </c-col>
</c-col> </c-col>
<c-col :span="24"> <c-col :span="24">
<c-paging-table <c-paging-table :data="diaData" :columns="diaColumns" :pageNumber="model.pageNum" :pageSize="model.pageSize"
:data="diaData" :total="model.total" v-on:queryFunc="queryFunc" :border="true">
: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"> <c-table-column fixed="right" prop="op" label="操作" width="240px">
<template slot-scope="{ scope }"> <template slot-scope="{ scope }">
<c-button <c-button style="margin-left: 0" size="small" @click="diaInfo(scope.$index, scope.row)">详情</c-button>
style="margin-left: 0" <c-button style="margin-left: 5px" size="small" type="primary"
size="small" @click="diaEdit(scope.$index, scope.row)">修改</c-button>
@click="diaInfo(scope.$index, scope.row)" <c-button size="small" style="margin-left: 5px" @click="diaDelete(scope.$index, scope.row)">删除</c-button>
>详情</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-table-column>
</c-paging-table> </c-paging-table>
</c-col> </c-col>
</div> </div>
</template> </template>
<script> <script>
import { format } from "path";
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"],
...@@ -172,15 +118,24 @@ import codes from "~/config/CodeTable"; ...@@ -172,15 +118,24 @@ import codes from "~/config/CodeTable";
{ label: '经办用户组', prop: 'ownusg', width: 'auto' }, { label: '经办用户组', prop: 'ownusg', width: 'auto' },
{ label: '是否完成', prop: 'donflgCn', width: 'auto' }, { label: '是否完成', prop: 'donflgCn', width: 'auto' },
], ],
dialogFormVisible: false,
}; };
}, },
computed: { computed: {
}, },
activated() { activated() {
this.$forceUpdate()
// 填充ownusr查询条件
const { extkey } = this.$route.params
if (extkey != undefined && extkey != null) {
this.model.ownusr = extkey
}
// 查询数据
const { update } = this.$route.params const { update } = this.$route.params
if (update) { if (update) {
this.onInfdiaSearch() this.onInfdiaSearch()
} }
}, },
methods: { methods: {
getCodesByKey(key) { getCodesByKey(key) {
...@@ -196,12 +151,6 @@ import codes from "~/config/CodeTable"; ...@@ -196,12 +151,6 @@ import codes from "~/config/CodeTable";
}, },
onInfdiaSearch() { onInfdiaSearch() {
queryByPage(this.model).then(res => { queryByPage(this.model).then(res => {
/**
* pageNumber: 0
* pageSize: 0
* total: 69
* totalPage: 0
*/
const list = res.list const list = res.list
Object.keys(list).forEach((item) => { Object.keys(list).forEach((item) => {
let obj = list[item] let obj = list[item]
...@@ -243,20 +192,36 @@ import codes from "~/config/CodeTable"; ...@@ -243,20 +192,36 @@ import codes from "~/config/CodeTable";
diaDelete(index, row) { diaDelete(index, row) {
this.$router.push(`/statics/dbddia/${row.inr}`) this.$router.push(`/statics/dbddia/${row.inr}`)
}, },
queryOwnusr() {
this.$router.push({
name: 'StaticsInfusr',
params: {
from: "StaticsInfdia"
}
})
}, },
}; // 通过user页面的返回信息填充查询条件
</script> fillOwnusrByRoute() {
const { extkey } = this.$route.params
if (extkey != undefined && extkey != null) {
this.model.ownusr = extkey
}
},
},
};
</script>
<style scoped> <style scoped>
.table-button-item-list { .table-button-item-list {
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
.table-button-item-list li {
.table-button-item-list li {
list-style: none; list-style: none;
padding: 5px 0; padding: 5px 0;
text-align: center; text-align: center;
color: #606266; color: #606266;
cursor: pointer; cursor: pointer;
}</style> }
</style>
\ No newline at end of file
...@@ -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