心愿管理页面联调

main
wanglei 2 years ago
parent dd3a14180f
commit 802e888648

@ -154,7 +154,6 @@
<el-table-column label="审核原因" align="center" prop="auditReason" min-width="120" show-overflow-tooltip/>
<el-table-column label="认领人" align="center" prop="rlName" min-width="120" show-overflow-tooltip/>
<el-table-column label="认领人电话" align="center" prop="rlPhone" min-width="120" show-overflow-tooltip/>
<el-table-column label="认领人居民id" align="center" prop="rlId" min-width="120" show-overflow-tooltip/>
<el-table-column label="备注" align="center" prop="remark" min-width="120" show-overflow-tooltip/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180">
<template slot-scope="scope">
@ -184,9 +183,16 @@
v-if="scope.row.wishStatus==='2'"
size="mini"
type="text"
@click="handleUpdate(scope.row)"
@click="handleRenLing(scope.row)"
v-hasPermi="['szxc:wish:edit']"
>认领</el-button>
<el-button
v-if="scope.row.wishStatus==='3'"
size="mini"
type="text"
@click="handleXiaJia(scope.row)"
v-hasPermi="['szxc:wish:edit']"
>下架</el-button>
</template>
</el-table-column>
</el-table>
@ -301,11 +307,80 @@
</div>
</el-dialog>
<!-- 认领 -->
<el-dialog title="认领" :visible.sync="rl_open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="认领人" prop="rlName">
<el-input readonly
placeholder="请选择认领人"
v-model="form.rlName">
<el-button slot="append" icon="el-icon-search" @click="ownerSelect"></el-button>
</el-input>
</el-form-item>
<el-form-item label="认领人电话" prop="rlPhone">
<el-input v-model="form.rlPhone" placeholder="请输入认领人电话" disabled/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog title="选择居民" :visible.sync="jmin.visible" width="1000px" append-to-body>
<el-form :model="jmin.queryParams" ref="queryForm" size="small" :inline="true" label-width="70px">
<el-form-item label="身份证号" prop="cardId">
<el-input
v-model="jmin.queryParams.cardId"
placeholder="请输入身份证号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="姓名" prop="name">
<el-input
v-model="jmin.queryParams.name"
placeholder="请输入姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="jminQuery"></el-button>
</el-form-item>
</el-form>
<el-alert title="双击选择户主" type="warning" :closable="false"></el-alert>
<el-table v-loading="jmin.loading" :data="jmin.list" border @cell-dblclick="jminDblclick">
<el-table-column label="姓名" align="center" prop="name" min-width="80"/>
<el-table-column label="身份证号" align="center" prop="cardId" min-width="180"/>
<el-table-column label="所属网格" align="center" prop="deptName" min-width="100"/>
<el-table-column label="性别" align="center" prop="sex">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"/>
</template>
</el-table-column>
<el-table-column label="籍贯" align="center" prop="jg" min-width="180"/>
<el-table-column label="手机号" align="center" prop="phone" min-width="120"/>
<el-table-column label="现居住地" align="center" prop="currentAddress" min-width="180"/>
</el-table>
<pagination
v-show="jmin.total>0"
:total="jmin.total"
:page.sync="jmin.queryParams.pageNum"
:limit.sync="jmin.queryParams.pageSize"
@pagination="getlistJminfo"
/>
</el-dialog>
</div>
</template>
<script>
import { listWish, getWish, delWish, addWish, updateWish } from "@/api/szxc/wish";
import { listJminfo } from "@/api/szxc/jminfo";
import { addXyrecard } from "@/api/szxc/xyrecard";
import { deptTreeSelect } from "@/api/system/user";
import Treeselect from "@riophae/vue-treeselect";
@ -314,7 +389,7 @@
export default {
name: "Wish",
components: { Treeselect },
dicts: ['szxc_wish_type', 'szxc_xystatus', 'szxc_audit_status'],
dicts: ['szxc_wish_type', 'szxc_xystatus', 'szxc_audit_status', 'sys_user_sex'],
data() {
return {
//
@ -405,7 +480,27 @@
{ required: true, message: "审核原因不能为空", trigger: "blur" }
],
}
}
},
//
rl_open:false,
//
jmin: {
visible: false,
//
loading: false,
//
total: 0,
//
queryParams:{
pageNum: 1,
pageSize: 10,
off: '0',
cardId: '',
name: ''
},
//
list: []
},
};
},
created() {
@ -501,7 +596,6 @@
},
/** 审核按钮操作 */
handleShenHe(row) {
console.log(this.$store.state.user);
this.shenHe.row = row;
this.resetForm("shenHeForm");
this.shenHe.form = {
@ -525,9 +619,13 @@
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
if(this.rl_open){
this.form.wishStatus = '3';
}
updateWish(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.rl_open = false;
this.getList();
});
} else {
@ -580,6 +678,50 @@
});
}
});
},
/** 审核按钮操作 */
handleRenLing(row) {
this.reset();
this.form = row;
this.rl_open = true;
},
/** 查询居民信息列表 */
getlistJminfo() {
this.jmin.loading = true;
listJminfo(this.jmin.queryParams).then(response => {
this.jmin.list = response.rows;
this.jmin.total = response.total;
this.jmin.loading = false;
});
},
//
ownerSelect(){
this.jmin.visible = true;
this.getlistJminfo()
},
//
jminQuery(){
this.jmin.queryParams.pageNum = 1;
this.getlistJminfo();
},
//
jminDblclick(row) {
this.form.rlId = row.id;
this.form.rlName = row.name;
this.form.rlPhone = row.phone;
this.jmin.visible = false
},
//
handleXiaJia(row){
this.reset();
this.$modal.confirm('是否确认下架心愿管理编号为【' + row.id + '】的数据项?').then(() => {
this.form = row;
this.form.wishStatus = '4';
updateWish(this.form).then(response => {
this.$modal.msgSuccess("下架成功");
this.getList();
});
})
}
}
};

Loading…
Cancel
Save