123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- <!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="../../static/kj/vue.min.js"></script>
- <script src="../../static/kj/element-ui/index.js"></script>
- <script src="../../static/kj/httpVueLoader.js"></script>
- <script src="../../static/kj/jquery.min.js"></script>
- <script src="../../static/kj/layer/layer.js"></script>
- <script src="../../static/sa.js"></script>
- <script src="../../static/kj/upload-util.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>
- <sa-item type="text" name="姓名" v-model="p.name" :need="false"></sa-item>
- <sa-item type="text" name="姓名" v-model="p.name" :need="false"></sa-item>
- <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
- <el-button type="info" icon="el-icon-refresh" @click="sa.f5()">重置</el-button>
- <el-button v-if="sa.isAuth('tb-shop-people-add')" size="mini" type="primary"
- @click="add()">新增</el-button>
- </el-form>
- <!-- ------------- 数据列表 ------------- -->
- <el-table class="data-table" ref="data-table" :data="dataList">
- <sa-td type="index" name="序号"></sa-td>
- <sa-td name="姓名" prop="name"></sa-td>
- <sa-td name="手机号码" prop="phone"></sa-td>
- <sa-td name="身份证" prop="idCard"></sa-td>
- <sa-td name="互助组名称" prop="groupName"></sa-td>
- <el-table-column label="操作" width="140px">
- <template slot-scope="s">
- <el-button class="c-btn" type="danger" icon="el-icon-delete"
- @click="delBind(s.row)">移除绑定</el-button>
- </template>
- </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="[10, 20, 30, 40, 50, 100, 1000]" @current-change="f5()" @size-change="f5()">
- </el-pagination>
- </div>
- </div>
- </div>
- <script>
- var app = new Vue({
- components: {
- "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
- "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
- },
- el: '.vue-box',
- data: {
- p: { // 查询参数
- name: '', // 姓名
- code: '', // 边民号
- sex: '', // 性别(1=男,2=女)
- age: '', // 年龄
- idCard: '', // 身份证
- phone: '', // 手机号码
- bankNo: '', // 银行编号
- bankCode: '', // 银行卡号
- bankName: '', // 银行名称
- groupId: '', // 所属互助组(1=测试组)
- groupName: '', // 互助组名称
- status: '', // 是否可用(0=否,1=是)
- role: '', // 角色(1=普通边民,2=兼组长)
- shopId: sa.p('shopId', -1),
- address: '', // 联系地址
- addressIds: '', // 地址ID
- detailAddress: '', // 详细地址
- isLock: '', // 是否锁定
- leftPrice: '', // 当天剩余额度
- pageNo: 1, // 当前页
- pageSize: 10, // 页大小
- sortType: 0 // 排序方式
- },
- dataCount: 0,
- dataList: [], // 数据集合
- },
- methods: {
- // 刷新
- f5: function() {
- sa.ajax('/level-one-server/TbPeople/getList', sa.removeNull(this.p), function(res) {
- console.log("res", res)
- this.dataList = res.data; // 数据
- this.dataCount = res.dataCount; // 数据总数
- sa.f5TableHeight(); // 刷新表格高度
- }.bind(this));
- },
- delBind(data) {
- sa.confirm('是否解绑该边民?', function() {
- sa.ajax('/level-one-server/TbPeople/removeBind?id=' + data.id, function(res) {
- sa.ok('解绑成功');
- this.f5()
- }.bind(this))
- }.bind(this));
- }
- },
- created: function() {
- this.f5();
- sa.onInputEnter();
- }
- })
- </script>
- </body>
- </html>
|