tb-group-people-add.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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="https://unpkg.com/vue@2.6.10/dist/vue.min.js"></script>
  12. <script src="https://unpkg.com/element-ui@2.13.0/lib/index.js"></script>
  13. <script src="https://unpkg.com/jquery@3.4.1/dist/jquery.js"></script>
  14. <script src="../../static/kj/layer/layer.js"></script>
  15. <script src="../../static/sa.js"></script>
  16. </head>
  17. <body>
  18. <div class="vue-box" style="display: none;" :style="'display: block;'">
  19. <div class="c-panel">
  20. <!-- ------------- 检索参数 ------------- -->
  21. <div class="c-title">检索参数</div>
  22. <el-form ref="form" :model='p' @submit.native.prevent>
  23. <div class="c-item">
  24. <label class="c-label">姓名:</label>
  25. <el-input size="mini" v-model="p.name"></el-input>
  26. </div>
  27. <div class="c-item">
  28. <label class="c-label">手机号码:</label>
  29. <el-input size="mini" v-model="p.phone"></el-input>
  30. </div>
  31. <div class="c-item" style="min-width: 0px;">
  32. <el-button size="mini" type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询
  33. </el-button>
  34. <el-button size="mini" type="primary" icon="el-icon-circle-check" @click="sureFn()">确定</el-button>
  35. </div>
  36. </el-form>
  37. <!-- ------------- 快捷按钮 ------------- -->
  38. <!-- ------------- 数据列表 ------------- -->
  39. <el-table class="data-table" :row-key="(row)=>{ return row.id}" @selection-change="selectionChange"
  40. ref="data-table" :data="dataList" size="small">
  41. <el-table-column align="center" :reserve-selection="true" type="selection" width="45px">
  42. </el-table-column>
  43. <el-table-column align="center" label="姓名" prop="name"></el-table-column>
  44. <el-table-column align="center" label="边民号" prop="code"></el-table-column>
  45. <el-table-column align="center" label="性别">
  46. <template slot-scope="s">
  47. <b v-if="s.row.sex == 1">男</b>
  48. <b v-if="s.row.sex == 2">女</b>
  49. </template>
  50. </el-table-column>
  51. <el-table-column align="center" label="身份证" prop="idCard"></el-table-column>
  52. <el-table-column align="center" label="手机号码" prop="phone"></el-table-column>
  53. </el-table>
  54. <!-- ------------- 分页 ------------- -->
  55. <div class="page-box">
  56. <el-pagination background layout="total, prev, pager, next, sizes, jumper"
  57. :current-page.sync="p.pageNo" :page-size.sync="p.pageSize" :total="dataCount"
  58. :page-sizes="[1, 10, 20, 30, 40, 50, 100, 1000]" @current-change="f5()" @size-change="f5()">
  59. </el-pagination>
  60. </div>
  61. </div>
  62. </div>
  63. <script>
  64. var app = new Vue({
  65. el: '.vue-box',
  66. data: {
  67. groupId: sa.p('groupId', ''),
  68. p: { // 查询参数
  69. name: '', // 姓名
  70. phone: '', // 手机号码
  71. pageNo: 1, // 当前页
  72. pageSize: 20, // 页大小
  73. sortType: 0 // 排序方式
  74. },
  75. dataCount: 0,
  76. dataList: [], // 数据集合
  77. select: [],
  78. },
  79. methods: {
  80. selectionChange(selection) {
  81. this.select = selection;
  82. },
  83. sureFn() {
  84. let selectList = this.select;
  85. if (selectList.length == 0) {
  86. sa.alert('请选择边民');
  87. return;
  88. }
  89. let idArray = selectList.map(selection => selection.id);
  90. let obj = {
  91. groupId: this.groupId,
  92. peopleIds: idArray.join(','),
  93. approve: 1
  94. };
  95. //边民申请加入互助组
  96. sa.ajax('/level-one-server/TbPeople/applyAddGroup', obj, function(resp) {
  97. }.bind(this));
  98. //组长同意边民加入互助组--目前跳过审核步骤,直接同意加入互助组
  99. sa.ajax('/level-one-server/TbPeople/passApply', obj, function(resp) {
  100. sa.closeCurrIframe(); // 关闭本弹窗
  101. parent.app.f5(); // 刷新父页面列表
  102. }.bind(this));
  103. },
  104. // 刷新
  105. f5: function() {
  106. sa.ajax('/level-one-server/TbPeople/getLeftPeople',{groupId:this.groupId}, function(res) {
  107. this.dataList = res.data; // 数据
  108. this.dataCount = res.dataCount; // 数据总数
  109. sa.f5TableHeight(); // 刷新表格高度
  110. }.bind(this));
  111. },
  112. },
  113. created: function() {
  114. this.f5();
  115. sa.onInputEnter();
  116. }
  117. })
  118. </script>
  119. </body>
  120. </html>