帮扶申报

This commit is contained in:
liuye
2022-05-19 15:33:51 +08:00
parent 5f853d5ac3
commit 63286e3f48
2 changed files with 181 additions and 193 deletions

View File

@@ -4,16 +4,8 @@
<template #title> <template #title>
<ai-title title="帮扶申请详情" isShowBottomBorder isShowBack @onBackClick="cancel(true)"> <ai-title title="帮扶申请详情" isShowBottomBorder isShowBack @onBackClick="cancel(true)">
<template #rightBtn> <template #rightBtn>
<!-- <ai-wechat-selecter :instance="instance" v-model="addUser" :isMultiple="form.readType == '0' ? false : true" @change="onChange" v-if="form.status === '2' && form.readType == '0'"> <el-button type="primary" @click="changeStatus('转交事件')" size="small" v-if="$permissions('app_apphelpdeclarationinfo_forward') && form.status != 2 && form.status != 3">转交事件</el-button>
<el-button <el-button type="primary" @click="changeStatus('审核处理')" size="small" v-if="$permissions('app_apphelpdeclarationinfo_audit') && form.status != 2 && form.status != 3"> 审核处理</el-button>
size="small"
type="primary"
icon="iconfont iconResetting">
再次流转
</el-button>
</ai-wechat-selecter> -->
<el-button type="primary" @click="changeStatus('转交事件')" size="small"> 转交事件</el-button>
<el-button type="primary" @click="changeStatus('审核处理')" size="small"> 审核处理</el-button>
</template> </template>
</ai-title> </ai-title>
@@ -23,42 +15,40 @@
<ai-card title="申请信息" style="flex:2;margin-right:32px;"> <ai-card title="申请信息" style="flex:2;margin-right:32px;">
<template slot="content"> <template slot="content">
<ai-wrapper class="mar-t16" label-width="100px" :columnsNumber="2"> <ai-wrapper class="mar-t16" label-width="100px" :columnsNumber="2">
<ai-info-item label="申请人姓名:"><span>{{form.documentCode || '-'}}</span></ai-info-item> <ai-info-item label="申请人姓名:"><span>{{form.name || '-'}}</span></ai-info-item>
<ai-info-item label="身份证号:"><span>{{$dict.getLabel("officialDocumentName", form.documentType) || '-'}}</span></ai-info-item> <ai-info-item label="身份证号:"><span>{{form.idNumber || '-'}}</span></ai-info-item>
<ai-info-item label="联系方式:"><span>{{$dict.getLabel("officialDocumentConfidentialityLevel", form.confidentialityLevel) || '-'}}</span></ai-info-item> <ai-info-item label="联系方式:"><span>{{form.phone || '-'}}</span></ai-info-item>
<ai-info-item label="申报方式:"><span>{{form.documentCode || '-'}}</span></ai-info-item> <ai-info-item label="申报方式:"><span>{{$dict.getLabel("helpDeclarationType", form.declareType) || '-'}}</span></ai-info-item>
<ai-info-item label="家庭人口数:"><span>{{form.documentCode || '-'}}</span></ai-info-item> <ai-info-item label="家庭人口数:"><span>{{form.householdNumber || '-'}}</span></ai-info-item>
<ai-info-item label="排查人员:"><span>{{form.documentCode || '-'}}</span></ai-info-item> <ai-info-item label="排查人员:"><span>{{form.createUserName || '-'}}</span></ai-info-item>
<ai-info-item label="申请帮扶原因:"><span>{{form.documentCode || '-'}}</span></ai-info-item> <ai-info-item label="申请帮扶原因:"><span>{{form.reason || '-'}}</span></ai-info-item>
<ai-info-item label="上报时间:"><span>{{form.documentCode || '-'}}</span></ai-info-item> <ai-info-item label="上报时间:"><span>{{form.declareTime || '-'}}</span></ai-info-item>
<ai-info-item label="所在地区:"><span>{{form.areaName || '-'}}</span></ai-info-item>
</ai-wrapper> </ai-wrapper>
<ai-wrapper label-width="100px" :columnsNumber="1"> <ai-wrapper label-width="100px" :columnsNumber="1">
<ai-info-item label="风险说明:"><span>{{$dict.getLabel("officialDocumentReadType", form.readType) || '-'}}</span></ai-info-item> <ai-info-item label="风险说明:"><span>{{form.riskDescription || '-'}}</span></ai-info-item>
</ai-wrapper> </ai-wrapper>
<ai-file-list v-if="form.files && form.files.length" <ai-uploader :instance="instance" disabled v-model="form.files"></ai-uploader>
:fileList="form.files"
:fileOps="{ name: 'name', size: 'fileSizeStr' }"
></ai-file-list>
</template> </template>
</ai-card> </ai-card>
<ai-card title="办理进度" style="flex:1;"> <ai-card title="办理进度" style="flex:1;">
<template #right> <template #right>
<p style="color:#666;font-size:14px;">当前状态待处理</p> <p style="color:#666;font-size:14px;">当前状态<span :class="'color'+form.status">{{$dict.getLabel("helpDeclarationStatus", form.status) || '-'}}</span></p>
</template> </template>
<template #content> <template #content>
<div class="ai-steps"> <div class="ai-steps">
<div class="ai-steps__item" v-for="(item, index) in form.flowUsers" :key="index"> <div class="ai-steps__item" v-for="(item, index) in form.processList" :key="index">
<div class="ai-steps__item--left"> <div class="ai-steps__item--left">
<div class="ai-steps__item--index">1</div> <div class="ai-steps__item--index">{{index+1}}</div>
</div> </div>
<div class="ai-steps__item--right"> <div class="ai-steps__item--right">
<div class="ai-steps__item__avatar"> <div class="ai-steps__item__avatar">
<img :src="item.avatar" v-if="item.avatar"> <img :src="item.avatar" v-if="item.avatar">
<h2 v-else>{{ formatName(item.flowUserName) }}</h2> <h2 v-else>{{ formatName(item.doUsername) }}</h2>
</div> </div>
<div class="ai-steps__item--content"> <div class="ai-steps__item--content">
<h2>李四发起排查上报等待处理</h2> <h2>{{item.description}}</h2>
<p>{{ item.flowTime }}</p> <p>{{ item.doTime }}</p>
</div> </div>
</div> </div>
</div> </div>
@@ -66,11 +56,33 @@
</template> </template>
</ai-card> </ai-card>
</div> </div>
<ai-dialog :title="dialogTitie" :visible.sync="showDialog" @onConfirm="queMeeting('writeInfo')" @onCancel="showDialog=false;" @close="$refs.dialogInfo.resetFields()" width="520px"> <ai-dialog :title="dialogTitle" :visible.sync="showDialog" @onConfirm="statusConfirm()" @onCancel="showDialog=false;" @close="$refs.dialogInfo.resetFields()" width="520px">
<div class="addother_main" style="width:400px;margin:auto;"> <div class="addother_main" style="width:400px;margin:auto;">
<el-form :model="dialogInfo" status-icon ref="writeInfo" label-width="100px" class="demo-ruleForm"> <el-form :model="dialogInfo" status-icon ref="dialogInfo" label-width="100px" class="demo-ruleForm">
<el-form-item label="请假原因:" prop="reason" autocomplete="off" :rules="{ required: true, message: '请假原因不能为空', trigger: 'blur' }"> <el-form-item label="转交" prop="name" style="width: 100%;" autocomplete="off" :rules="[{ required: true, message: '请选择转交人员', trigger: 'blur' }]" v-if="dialogTitle == '转交事件'">
<el-input v-model.trim="dialogInfo.reason" autocomplete="off" size="mini" placeholder="请输入..." type="textarea" :rows="4" :maxlength="100" show-word-limit></el-input> <el-input disabled size="small" v-model="dialogInfo.name" placeholder="请选择转交人员">
<template slot="append">
<ai-wechat-selecter :instance="instance" v-model="addUser" :isMultiple="true" @change="onChange" v-if="dialogTitle == '转交事件'">
<el-button size="small" type="primary">选择</el-button>
</ai-wechat-selecter>
</template>
</el-input>
</el-form-item>
<el-form-item label="处理结果:" required v-else>
<el-radio-group v-model="dialogInfo.auditStatus">
<el-radio label="1">通过审核</el-radio>
<el-radio label="0">驳回申请</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="办理意见:" prop="description" autocomplete="off" :rules="{ required: true, message: '办理意见不能为空', trigger: 'blur' }">
<el-input v-model="dialogInfo.description" autocomplete="off" size="mini" placeholder="请输入..." type="textarea" :rows="4" :maxlength="100" show-word-limit></el-input>
</el-form-item>
<el-form-item label="图片" style="width: 100%;" >
<ai-uploader
:instance="instance"
v-model="dialogInfo.files"
:limit="9">
</ai-uploader>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@@ -94,14 +106,15 @@ export default {
form: {}, form: {},
showDialog: false, showDialog: false,
dialogTitle: '', dialogTitle: '',
dialogInfo: {} dialogInfo: {auditStatus: '1', description: '', files: [], name: ''},
addUser: [],
}; };
}, },
computed: { computed: {
}, },
created() { created() {
this.dict.load('issuingUnit','officialDocumentEmergencyLevel', 'officialDocumentReadType', 'officialDocumentConfidentialityLevel', 'officialDocumentName', 'documentFlowStatus', 'readingStatus'); this.dict.load('helpDeclarationType', 'helpDeclarationStatus', 'helpDeclarationReason');
}, },
mounted() { mounted() {
this.form = this.params this.form = this.params
@@ -114,62 +127,11 @@ export default {
} }
return name.substr(name.length - 2, name.length > 2 ? (name.length - 1) : name.length) return name.substr(name.length - 2, name.length > 2 ? (name.length - 1) : name.length)
}, },
onChange() {
if (!this.addUser.length) {
return this.$message.error('请选择流转人员')
}
if (this.form.readType === '0' && this.form.status === '0') {
// 开始流转
let data = this.form
const flowUsers = [...this.addUser].map(item => {
return {
flowUserId: item.id,
flowUserName: item.name,
avatar: item.avatar
}
})
const fileIds = data.files.length ? data.files.map(item => item.id) : []
delete data.files
this.instance.post(`/app/appofficialdocumentinfo/addOrUpdate`, {
id: this.form.id,
...data,
status: '1',
flowUsers: flowUsers,
fileIds
}).then(res => {
if (res.code == 0) {
this.$message.success('流转成功')
this.getDetail()
}
})
} else {
// 再次流转
this.instance.post(`/app/appofficialdocumentinfo/flowById`, null, {
params: {
flag: '1',
flowUserId: this.addUser[0].id,
flowUserName: this.addUser[0].name,
avatar: this.addUser[0].avatar,
id: this.form.id
}
}).then(res => {
if (res.code == 0) {
this.$message.success('添加成功')
this.getDetail(this.id)
}
})
}
},
getDetail() { getDetail() {
this.instance.post(`/app/appofficialdocumentinfo/queryDetailById?id=${this.params.id}&flag=0`, null).then((res) => { this.instance.post(`/app/apphelpdeclarationinfo/queryDetailById?id=${this.params.id}`).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.form = {...res.data} this.form = {...res.data}
this.form.files = this.form.files || [] this.form.files = this.form.files || []
if (res.data.readType === '1') {
this.tableData = res.data.flowUsers
this.total = res.data.flowUsers.length
}
} }
}); });
}, },
@@ -182,6 +144,33 @@ export default {
changeStatus(title) { changeStatus(title) {
this.dialogTitle = title this.dialogTitle = title
this.showDialog = true this.showDialog = true
},
onChange() {
if (!this.addUser.length) {
return this.$message.error('请选择转交人员')
}
this.dialogInfo.name = this.addUser[0].name
this.dialogInfo.wxUserId = this.addUser[0].id
},
statusConfirm() {
this.$refs["dialogInfo"].validate((valid) => {
if (valid) {
var url = '/app/apphelpdeclarationinfo/forward' //转交人员
if(this.dialogTitle == '审核处理') {
url = '/app/apphelpdeclarationinfo/audit'
}
this.dialogInfo.declarationId = this.form.id
this.instance.post(url, {
...this.dialogInfo,
}).then(res => {
if (res.code == 0) {
this.showDialog = false
this.$message.success("操作成功")
this.getDetail()
}
});
}
})
} }
}, },
}; };
@@ -216,87 +205,102 @@ export default {
cursor: pointer; cursor: pointer;
padding-left: 8px; padding-left: 8px;
} }
.color0 {
color: #f82;
}
.color1 {
color: #26f;
}
.color2 {
color: #f46;
}
.color3 {
color: #2EA222;
}
} }
.ai-steps { .ai-steps {
padding-bottom: 40px; padding-bottom: 40px;
.ai-steps__item { .ai-steps__item {
display: flex; display: flex;
position: relative; position: relative;
padding-bottom: 44px; padding-bottom: 44px;
&:after {
position: absolute;
left: 12px;
top: 26px;
width: 1px;
height: calc(100% - 30px);
background: #DDDDDD;
content: " ";
}
&:last-child {
padding-bottom: 0;
&:after { &:after {
position: absolute; display: none;
left: 12px;
top: 26px;
width: 1px;
height: calc(100% - 30px);
background: #DDDDDD;
content: " ";
} }
}
&:last-child { .ai-steps__item--left {
padding-bottom: 0; position: relative;
margin-right: 16px;
.ai-steps__item--index{
width: 24px;
height: 24px;
line-height: 24px;
border-radius: 50%;
border: 1px solid #ddd;
text-align: center;
color: #ddd;
font-size: 12px;
}
}
&:after { .ai-steps__item--right {
display: none; flex-shrink: 0;
color: #666;
font-size: 14px;
display: flex;
.ai-steps__item--content {
span {
color: #333;
font-size: 16px;
}
h2 {
color: #666666;
font-size: 14px;
}
p {
margin-top: 8px;
color: #666666;
font-size: 14px;
} }
} }
.ai-steps__item--left { .ai-steps__item__avatar {
position: relative; width: 40px;
margin-right: 16px; height: 40px;
.ai-steps__item--index{ margin-right: 8px;
width: 24px;
height: 24px;
line-height: 24px;
border-radius: 50%;
border: 1px solid #ddd;
text-align: center;
color: #ddd;
font-size: 12px;
}
}
.ai-steps__item--right { img, h2 {
flex-shrink: 0;
color: #666;
font-size: 14px;
display: flex;
.ai-steps__item--content {
span {
color: #333;
font-size: 16px;
}
h2 {
color: #666666;
font-size: 14px;
}
p {
margin-top: 8px;
color: #666666;
font-size: 14px;
}
}
.ai-steps__item__avatar {
width: 40px; width: 40px;
height: 40px; height: 40px;
margin-right: 8px; line-height: 40px;
text-align: center;
img, h2 { color: #fff;
width: 40px; font-size: 14px;
height: 40px; background: #2266FF;
line-height: 40px;
text-align: center;
color: #fff;
font-size: 14px;
background: #2266FF;
}
} }
} }
} }
} }
}
</style> </style>

View File

@@ -7,25 +7,25 @@
<ai-search-bar> <ai-search-bar>
<template slot="left"> <template slot="left">
<ai-select <ai-select
v-model="searchObj.documentType" v-model="searchObj.declareReason"
placeholder="申请帮扶原因" placeholder="申请帮扶原因"
clearable clearable
@change="(page.current = 1), getList()" @change="(page.current = 1), getList()"
:selectList="dict.getDict('officialDocumentName')" :selectList="dict.getDict('helpDeclarationReason')"
></ai-select> ></ai-select>
<ai-select <ai-select
v-model="searchObj.confidentialityLevel" v-model="searchObj.declareType"
placeholder="申报方式" placeholder="申报方式"
clearable clearable
@change="(page.current = 1), getList()" @change="(page.current = 1), getList()"
:selectList="dict.getDict('officialDocumentConfidentialityLevel')" :selectList="dict.getDict('helpDeclarationType')"
></ai-select> ></ai-select>
<ai-select <ai-select
v-model="searchObj.confidentialityLevel" v-model="searchObj.status"
placeholder="状态" placeholder="状态"
clearable clearable
@change="(page.current = 1), getList()" @change="(page.current = 1), getList()"
:selectList="dict.getDict('officialDocumentConfidentialityLevel')" :selectList="dict.getDict('helpDeclarationStatus')"
></ai-select> ></ai-select>
</template> </template>
<template slot="right"> <template slot="right">
@@ -49,7 +49,7 @@
:size.sync="page.size" :size.sync="page.size"
@getList="getList" @getList="getList"
> >
<el-table-column slot="options" label="操作" align="center" width="200"> <el-table-column slot="options" label="操作" align="center" width="120">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" @click="goDetail(row)">详情</el-button> <el-button type="text" @click="goDetail(row)">详情</el-button>
</template> </template>
@@ -71,11 +71,9 @@ export default {
data() { data() {
return { return {
searchObj: { searchObj: {
documentType: '', declareReason: '',
confidentialityLevel: '', declareType: null,
readType: '', status: null,
createTimeStart: null,
createTimeEnd: null,
name: '', name: '',
}, },
page: { page: {
@@ -92,45 +90,41 @@ export default {
colConfigs() { colConfigs() {
return [ return [
{ {
prop: "documentCode", prop: "reason",
label: "申请帮扶原因", label: "申请帮扶原因"
}, },
{ {
prop: "documentName", prop: "riskDescription",
label: "返贫致贫风险说明", label: "返贫致贫风险说明",
}, },
{ {
prop: "documentType", prop: "areaName",
label: "所在地区", label: "所在地区",
width: 120, width: 120,
align: "center", align: "center",
formart: (documentType) =>
this.$dict.getLabel("officialDocumentName", documentType),
}, },
{ {
prop: "readType", prop: "name",
label: "申请人姓名", label: "申请人姓名",
width: 120, width: 120,
align: "center", align: "center",
formart: (readType) =>
this.$dict.getLabel("officialDocumentReadType", readType),
}, },
{ {
prop: "confidentialityLevel", prop: "phone",
label: "联系方式", label: "联系方式",
width: 120, width: 120,
align: "center", align: "center",
formart: (confidentialityLevel) =>
this.$dict.getLabel("officialDocumentConfidentialityLevel", confidentialityLevel),
}, },
{ {
prop: "flowUserName", prop: "declareType",
label: "申报方式", label: "申报方式",
width: 120, width: 120,
align: "center", align: "center",
formart: (declareType) =>
this.$dict.getLabel("helpDeclarationType", declareType),
}, },
{ {
prop: "createTime", prop: "declareTime",
label: "申报时间", label: "申报时间",
width: 120, width: 120,
align: "center", align: "center",
@@ -141,7 +135,7 @@ export default {
width: 120, width: 120,
align: "center", align: "center",
render: (h, {row}) => { render: (h, {row}) => {
return h('span', {style: {color: this.dict.getColor('documentStatus', row.status)}}, this.dict.getLabel('documentStatus', row.status)) return h('span', {style: {color: this.dict.getColor('helpDeclarationStatus', row.status)}}, this.dict.getLabel('helpDeclarationStatus', row.status))
}, },
}, },
{slot: "options", label: "操作"}, {slot: "options", label: "操作"},
@@ -149,17 +143,13 @@ export default {
}, },
}, },
created() { created() {
this.dict.load('officialDocumentName', 'officialDocumentConfidentialityLevel', 'officialDocumentReadType', 'documentStatus').then(() => { this.dict.load('helpDeclarationType', 'helpDeclarationStatus', 'helpDeclarationReason').then(() => {
this.$nextTick(() => this.getList()) this.$nextTick(() => this.getList())
}) })
}, },
methods: { methods: {
changeTime() {
this.page.current = 1
this.getList()
},
getList() { getList() {
this.instance.post(`/app/appofficialdocumentinfo/list`, null, { this.instance.post(`/app/apphelpdeclarationinfo/list`, null, {
params: { params: {
...this.searchObj, ...this.searchObj,
...this.page ...this.page
@@ -186,12 +176,6 @@ export default {
this.searchObj.createTimeEnd = null; this.searchObj.createTimeEnd = null;
this.getList(); this.getList();
}, },
toAdd(params) {
this.$emit('change', {
type: 'add',
params: params
})
},
goDetail(row) { goDetail(row) {
this.$emit('change', { this.$emit('change', {
type: 'detail', type: 'detail',