123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>边民-列表</title>
- <meta charset="utf-8">
- <meta name="viewport"
- content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <!-- 所有的 css & js 资源 -->
- <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
- <link rel="stylesheet" href="../../static/sa.css">
- <script src="https://unpkg.com/vue@2.6.10/dist/vue.min.js"></script>
- <script src="https://unpkg.com/element-ui@2.13.0/lib/index.js"></script>
- <script src="https://unpkg.com/jquery@3.4.1/dist/jquery.js"></script>
- <script src="../../static/kj/layer/layer.js"></script>
- <script src="../../static/sa.js"></script>
- </head>
- <body>
- <div class="vue-box" style="display: none;" :style="'display: block;'">
- <div class="c-panel">
- <!-- ------------- 检索参数 ------------- -->
- <div class="c-title">检索参数</div>
- <el-form ref="form" :model='p' @submit.native.prevent>
- <div class="c-item">
- <label class="c-label">姓名:</label>
- <el-input size="mini" v-model="p.name"></el-input>
- </div>
- <div class="c-item">
- <label class="c-label">手机号码:</label>
- <el-input size="mini" v-model="p.phone"></el-input>
- </div>
- <div class="c-item" style="min-width: 0px;">
- <el-button size="mini" type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询
- </el-button>
- <el-button size="mini" type="primary" icon="el-icon-circle-check" @click="sureFn()">确定</el-button>
- </div>
- </el-form>
- <!-- ------------- 快捷按钮 ------------- -->
-
- <!-- ------------- 数据列表 ------------- -->
- <el-table class="data-table" :row-key="(row)=>{ return row.id}" @selection-change="selectionChange"
- ref="data-table" :data="dataList" size="small">
- <el-table-column align="center" :reserve-selection="true" type="selection" width="45px">
- </el-table-column>
- <el-table-column align="center" label="姓名" prop="name"></el-table-column>
- <el-table-column align="center" label="边民号" prop="code"></el-table-column>
- <el-table-column align="center" label="性别">
- <template slot-scope="s">
- <b v-if="s.row.sex == 1">男</b>
- <b v-if="s.row.sex == 2">女</b>
- </template>
- </el-table-column>
- <el-table-column align="center" label="身份证" prop="idCard"></el-table-column>
- <el-table-column align="center" label="手机号码" prop="phone"></el-table-column>
- </el-table>
- <!-- ------------- 分页 ------------- -->
- <div class="page-box">
- <el-pagination background layout="total, prev, pager, next, sizes, jumper"
- :current-page.sync="p.pageNo" :page-size.sync="p.pageSize" :total="dataCount"
- :page-sizes="[1, 10, 20, 30, 40, 50, 100, 1000]" @current-change="f5()" @size-change="f5()">
- </el-pagination>
- </div>
- </div>
- </div>
- <script>
- var app = new Vue({
- el: '.vue-box',
- data: {
- groupId: sa.p('groupId', ''),
- p: { // 查询参数
- name: '', // 姓名
- phone: '', // 手机号码
- pageNo: 1, // 当前页
- pageSize: 20, // 页大小
- sortType: 0 // 排序方式
- },
- dataCount: 0,
- dataList: [], // 数据集合
- select: [],
- },
- methods: {
- selectionChange(selection) {
- this.select = selection;
- },
- sureFn() {
- let selectList = this.select;
- if (selectList.length == 0) {
- sa.alert('请选择边民');
- return;
- }
- let idArray = selectList.map(selection => selection.id);
- let obj = {
- groupId: this.groupId,
- peopleIds: idArray.join(','),
- approve: 1
- };
- //边民申请加入互助组
- sa.ajax('/level-one-server/TbPeople/applyAddGroup', obj, function(resp) {
- }.bind(this));
- //组长同意边民加入互助组--目前跳过审核步骤,直接同意加入互助组
- sa.ajax('/level-one-server/TbPeople/passApply', obj, function(resp) {
- sa.closeCurrIframe(); // 关闭本弹窗
- parent.app.f5(); // 刷新父页面列表
- }.bind(this));
- },
- // 刷新
- f5: function() {
- sa.ajax('/level-one-server/TbPeople/getLeftPeople',{groupId:this.groupId}, function(res) {
- this.dataList = res.data; // 数据
- this.dataCount = res.dataCount; // 数据总数
- sa.f5TableHeight(); // 刷新表格高度
- }.bind(this));
- },
- },
- created: function() {
- this.f5();
- sa.onInputEnter();
- }
- })
- </script>
- </body>
- </html>
|