<template>
|
<div class="shop_work">
|
<v-header
|
title="办事审核"
|
search
|
:bar="bar"
|
@on-search="onSearch"
|
></v-header>
|
|
<div class="tab">
|
<v-tool-table :trs="trs" :tds="tds">
|
<template v-slot:btn="item">
|
<div class="table_flex">
|
<span
|
v-if="item.scope.transactType == 0"
|
class="col_primary"
|
@click="onEdit(item.scope)"
|
>处理</span
|
>
|
<span class="col_primary" @click="onCheck(item.scope)">查看</span>
|
<span class="col_primary" @click="onDel(item.scope)">删除</span>
|
</div>
|
</template>
|
<template v-slot:bookTime="item">
|
{{ item.scope.interspaceTime }} {{ item.scope.subscribeTimeFrame }}
|
</template>
|
<template v-slot:transactType="item">
|
<p v-if="item.scope.transactType == 0">
|
待处理
|
</p>
|
<p v-if="item.scope.transactType == 1">
|
已通过
|
</p>
|
<p v-if="item.scope.transactType == 2">
|
未通过
|
</p>
|
</template>
|
</v-tool-table>
|
</div>
|
<v-tool-page :item="paged" @on-page="onPage"></v-tool-page>
|
<!---->
|
<el-dialog
|
:modal="false"
|
destroy-on-close
|
:close-on-click-modal="false"
|
:visible.sync="centerDialogVisible"
|
width="600px"
|
center
|
>
|
<div class="dialog-box">
|
<el-button
|
@click="pass(1)"
|
size="small"
|
:type="deal == 1 ? 'primary' : ''"
|
>通过</el-button
|
>
|
<el-button
|
@click="pass(2)"
|
size="small"
|
:type="deal == 2 ? 'primary' : ''"
|
>不通过</el-button
|
>
|
</div>
|
|
<div style="margin-top:20px" v-if="deal == 2">
|
<p class="label" data-require>不通过原因:</p>
|
<article>
|
<el-input
|
type="text"
|
class="m_inp"
|
placeholder="请输入不通过原因"
|
v-model="reply"
|
/>
|
</article>
|
</div>
|
|
<span slot="footer" class="dialog-footer">
|
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
<el-button type="primary" @click="sub()">确 定</el-button>
|
</span>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
import { mapState } from "vuex";
|
export default {
|
props: {},
|
components: {},
|
data() {
|
return {
|
bar: [
|
{
|
title: "姓名",
|
name: "userName"
|
},
|
{
|
title: "申请时间",
|
name: "creationTime",
|
type: "times"
|
},
|
{
|
title: "状态",
|
name: "transactType",
|
type: "select",
|
plac: "请选择",
|
// 状态(1待处理 2未通过 3已通过)
|
list: [
|
{
|
label: "待处理",
|
value: 0
|
},
|
{
|
label: "已通过",
|
value: 1
|
},
|
{
|
label: "未通过",
|
value: 2
|
}
|
]
|
}
|
],
|
trs: [
|
{ text: "序号", val: "index" },
|
{ text: "姓名", val: "userName" },
|
{ text: "电话", val: "phone" },
|
{ text: "身份证", val: "idCard" },
|
{ text: "办事事项", val: "questnaireName" },
|
{ text: "申请时间", val: "creationTime" },
|
{ text: "处理时间", val: "processingTime" },
|
{ text: "状态", val: "btn", slot: "transactType" },
|
{ text: "操作", val: "btn" }
|
],
|
tds: [],
|
paged: { page: 0, total: 0, r: 0, limit: 10 },
|
os: {},
|
search: {},
|
item: {},
|
centerDialogVisible: false,
|
deal: 0,
|
reply: ""
|
};
|
},
|
computed: {
|
...mapState({ vuex_page: "pageReset" })
|
},
|
inject: ["appPath"],
|
watch: {
|
vuex_page: {
|
handler(n) {
|
if (n.page === this.$route.path) {
|
this.paged.page = 1;
|
this.init();
|
}
|
},
|
deep: true
|
}
|
},
|
methods: {
|
pass(type) {
|
this.deal = type;
|
// Jinhui/applyFor/dispose
|
},
|
sub() {
|
if (this.deal == 0) {
|
demo.toast("请选择");
|
return;
|
}
|
if (this.deal == 2 && !this.reply.length) {
|
demo.toast("请输入原因");
|
return;
|
}
|
this.$api.get(
|
"Jinhui/answer/audit",
|
{ id: this.item.id, transactType: this.deal, reply: this.reply },
|
() => {
|
demo.toast("处理成功");
|
this.centerDialogVisible = false;
|
this.init();
|
}
|
);
|
},
|
onDel(e) {
|
this.$js.model("删除", "确认删除?", res => {
|
if (res) {
|
this.$api.del(
|
"Jinhui/answer/expurgateData?id=" + e.id,
|
{ id: e.id },
|
() => {
|
this.tds = this.tds.filter(r => {
|
return r.id !== e.id;
|
});
|
demo.toast("删除成功");
|
}
|
);
|
}
|
});
|
},
|
onCheck(e) {
|
this.appPath("jh_work_applyListDetail/" + e.id);
|
},
|
onEdit(e) {
|
this.item = e;
|
this.centerDialogVisible = true;
|
},
|
onSearch(v) {
|
this.search = demo.copy(v);
|
this.paged.page = 1;
|
this.init();
|
}, // 分页点击
|
onPage(v) {
|
if (v.page === this.paged.page && v.page && !v.reset) {
|
return 0;
|
}
|
this.paged.page = v.page;
|
this.paged.limit = v.limit;
|
this.init();
|
},
|
//获取所属分类
|
getStatus() {
|
this.$api.get(
|
"Jinhui/interspaceTypeGetList",
|
{
|
pageNum: 1,
|
pageSize: 50
|
},
|
e => {
|
this.bar[0].list = e.records.map(d => {
|
return {
|
value: d.id,
|
label: d.intendantName
|
};
|
});
|
}
|
);
|
},
|
// 获取数据
|
init() {
|
let v = demo.copy(
|
Object.assign(this.os, this.search, {
|
pageNum: this.paged.page,
|
pageSize: this.paged.limit
|
})
|
);
|
this.$api.get("Jinhui/answer/getList", v, e => {
|
this.paged.total = e.total;
|
this.paged.r++;
|
this.tds = e.records;
|
e.records.map((item, index) => {
|
item.index = (this.paged.page - 1) * this.paged.limit + index + 1;
|
});
|
});
|
}
|
},
|
mounted() {
|
this.getStatus();
|
}
|
};
|
</script>
|
<style lang="less" scoped>
|
.shop_work {
|
overflow-y: auto;
|
.add .m_btn {
|
min-width: 80px;
|
}
|
.add,
|
.tab {
|
margin-bottom: 10px;
|
}
|
}
|
</style>
|