tb-sho-people-list.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>边民-列表</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  8. <!-- 所有的 css & js 资源 -->
  9. <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
  10. <link rel="stylesheet" href="../../static/sa.css">
  11. <script src="../../static/kj/vue.min.js"></script>
  12. <script src="../../static/kj/element-ui/index.js"></script>
  13. <script src="../../static/kj/httpVueLoader.js"></script>
  14. <script src="../../static/kj/jquery.min.js"></script>
  15. <script src="../../static/kj/layer/layer.js"></script>
  16. <script src="../../static/sa.js"></script>
  17. <script src="../../static/kj/upload-util.js"></script>
  18. </head>
  19. <body>
  20. <div class="vue-box" style="display: none;" :style="'display: block;'">
  21. <div class="c-panel">
  22. <!-- ------------- 检索参数 ------------- -->
  23. <!-- <div class="c-title">检索参数</div> -->
  24. <el-form ref="form" :model='p' @submit.native.prevent>
  25. <sa-item type="text" name="姓名" v-model="p.name" :need="false"></sa-item>
  26. <sa-item type="text" name="姓名" v-model="p.name" :need="false"></sa-item>
  27. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  28. <el-button type="info" icon="el-icon-refresh" @click="sa.f5()">重置</el-button>
  29. <el-button v-if="sa.isAuth('tb-shop-people-add')" size="mini" type="primary"
  30. @click="add()">新增</el-button>
  31. </el-form>
  32. <!-- ------------- 数据列表 ------------- -->
  33. <el-table class="data-table" ref="data-table" :data="dataList">
  34. <sa-td type="index" name="序号"></sa-td>
  35. <sa-td name="姓名" prop="name"></sa-td>
  36. <sa-td name="手机号码" prop="phone"></sa-td>
  37. <sa-td name="身份证" prop="idCard"></sa-td>
  38. <sa-td name="互助组名称" prop="groupName"></sa-td>
  39. <el-table-column label="操作" width="140px">
  40. <template slot-scope="s">
  41. <el-button class="c-btn" type="danger" icon="el-icon-delete"
  42. @click="delBind(s.row)">移除绑定</el-button>
  43. </template>
  44. </el-table-column>
  45. </el-table>
  46. <!-- ------------- 分页 ------------- -->
  47. <div class="page-box">
  48. <el-pagination background layout="total, prev, pager, next, sizes, jumper"
  49. :current-page.sync="p.pageNo" :page-size.sync="p.pageSize" :total="dataCount"
  50. :page-sizes="[10, 20, 30, 40, 50, 100, 1000]" @current-change="f5()" @size-change="f5()">
  51. </el-pagination>
  52. </div>
  53. </div>
  54. </div>
  55. <script>
  56. var app = new Vue({
  57. components: {
  58. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  59. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  60. },
  61. el: '.vue-box',
  62. data: {
  63. p: { // 查询参数
  64. name: '', // 姓名
  65. code: '', // 边民号
  66. sex: '', // 性别(1=男,2=女)
  67. age: '', // 年龄
  68. idCard: '', // 身份证
  69. phone: '', // 手机号码
  70. bankNo: '', // 银行编号
  71. bankCode: '', // 银行卡号
  72. bankName: '', // 银行名称
  73. groupId: '', // 所属互助组(1=测试组)
  74. groupName: '', // 互助组名称
  75. status: '', // 是否可用(0=否,1=是)
  76. role: '', // 角色(1=普通边民,2=兼组长)
  77. shopId: sa.p('shopId', -1),
  78. address: '', // 联系地址
  79. addressIds: '', // 地址ID
  80. detailAddress: '', // 详细地址
  81. isLock: '', // 是否锁定
  82. leftPrice: '', // 当天剩余额度
  83. pageNo: 1, // 当前页
  84. pageSize: 10, // 页大小
  85. sortType: 0 // 排序方式
  86. },
  87. dataCount: 0,
  88. dataList: [], // 数据集合
  89. },
  90. methods: {
  91. // 刷新
  92. f5: function() {
  93. sa.ajax('/level-one-server/TbPeople/getList', sa.removeNull(this.p), function(res) {
  94. console.log("res", res)
  95. this.dataList = res.data; // 数据
  96. this.dataCount = res.dataCount; // 数据总数
  97. sa.f5TableHeight(); // 刷新表格高度
  98. }.bind(this));
  99. },
  100. delBind(data) {
  101. sa.confirm('是否解绑该边民?', function() {
  102. sa.ajax('/level-one-server/TbPeople/removeBind?id=' + data.id, function(res) {
  103. sa.ok('解绑成功');
  104. this.f5()
  105. }.bind(this))
  106. }.bind(this));
  107. }
  108. },
  109. created: function() {
  110. this.f5();
  111. sa.onInputEnter();
  112. }
  113. })
  114. </script>
  115. </body>
  116. </html>