changerecord.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724
  1. <template>
  2. <view class="index">
  3. <view class="tab">
  4. <!-- //表格 -->
  5. <view class="exele">
  6. <view class="box">
  7. <table @change="change">
  8. <tr class="tr_one">
  9. <!-- <th style="width: 130upx; text-align: center;">编号</th> -->
  10. <th style="width: 90upx; text-align: center;">姓名</th>
  11. <!-- <th style="width: 120upx; text-align: center;">与户主关系</th> -->
  12. <th style="width: 260upx; text-align: center;">身份证号</th>
  13. <th style="width: 60upx; text-align: center;">历史状态</th>
  14. <th style="width: 170upx; text-align: center;">变更人</th>
  15. <th style="width: 164upx; text-align: center;">变更时间</th>
  16. <!-- <th style="width: 100upx;">联系方式</th> -->
  17. <!-- <th style="width: 70upx; text-align: center;">操作</th> -->
  18. <!-- <th style="width: 60upx;">查看</th> -->
  19. </tr>
  20. <scroll-view scroll-y class="scroll-view" upper-threshold="40" lower-threshold="40" @scrolltolower="bot_btn">
  21. <tr v-for="(item,index) in list" :key="index" :class=" [index%2 ==0 ? 'two_tr two_trtwo':'two_tr']" @click="chakn(item)">
  22. <!-- <td style="width: 130upx; text-align: center;" >{{ item.code == null ? '暂无信息' : item.code}}</td> -->
  23. <td style="width: 90upx; text-align: center;" >{{ item.userName == null ? '暂无信息' : item.userName}}</td>
  24. <!-- <td style="width:120upx; text-align: center;" >{{ item.yhzgx == null ? '暂无信息' : item.yhzgx}}</td> -->
  25. <!-- <td style="width: 40upx; text-align: center;">{{item.gender == null? '暂无信息' : item.gender }}</td> -->
  26. <td style="width: 260upx; text-align: center;">{{item.idCard == null? '暂无信息' : item.idCard }}</td>
  27. <!-- 状态 -->
  28. <td style="width: 60upx; text-align: center;" >{{ item.status == null ? '暂无信息' : statusFn(item.status)}}</td>
  29. <!-- <td style="width: 170upx; text-align: center;" >{{ item.phoneNum == null? '暂无信息' : item.phoneNum}}</td> -->
  30. <td style="width:170upx; text-align: center;" >{{ item.changUser == null ? '暂无信息' : item.changUser}}</td>
  31. <!-- <td style="width: 100upx;" :class="[item.phone == '' ? 'tdse' : '' ]" >{{ item.phone == ''? '未完善' : item.phone}}</td> -->
  32. <!-- <td style="width: 100upx; text-align: center;" :class="[item.addtime == null ? 'tdse' : item.addtime == ''? 'tdse' : '' ]">{{ item.addtime ==null ? '未完善' : item.addtime==''? '未完善' : item.addtime}}</td> -->
  33. <!-- <td style="width: 50upx;" class="coiu" @click.stop="dele(item.id)">删除</td> -->
  34. <!-- <td style="width: 70upx;text-align: center; color: #32B16C;" @click.stop="goDetail(item.id)">查看</td> -->
  35. <td style="width: 164upx;text-align: center; color: #32B16C;" >{{ item.changUserTime == null ? '暂无信息' : item.changUserTime}}</td>
  36. </tr>
  37. <div class="shax" v-if="list.length>0">
  38. {{wtdt}}
  39. </div>
  40. <div class="zanwu " v-else><span>暂无数据</span></div>
  41. </scroll-view>
  42. </table>
  43. </view>
  44. </view>
  45. </view>
  46. <!-- 弹窗 -->
  47. <!-- <div class='xinse'>
  48. <div class="xinsea btn1" @click="addVacFrom">新增家庭成员</div>
  49. <div class="xinsea btn2" @click='getSynFn'>与户主户籍同步</div>
  50. <div class="xinsea btn" @click='getSureFn'>一键确认信息无误</div>
  51. </div> -->
  52. </view>
  53. </template>
  54. <script>
  55. export default {
  56. data() {
  57. return {
  58. upimg:require("@/static/image/up.png"),
  59. activeTab: 0, //tab切换
  60. //列表数据
  61. list: [],
  62. show: false,
  63. actions: [{
  64. name: '102',
  65. }],
  66. params: { //上拉刷新
  67. pageNum: 1,
  68. pageSize: 40,
  69. },
  70. keyword: '',
  71. haveMore: true,
  72. wtdt: '上拉加载更多',
  73. terd: '',
  74. stuList: {}, //学生人数
  75. shoue: false,
  76. listShow: true, //判断是否有数据 true 有
  77. areaList: {}, //班级数据
  78. xuan: ['请选择', '请选择', '请选择'],
  79. columns: [
  80. ],
  81. cites: [],
  82. tehu: '请选择班级',
  83. companyId: '',
  84. arrbq: [],
  85. startDate:'选择开始时间',
  86. endDate:'选择结束时间',
  87. showtime:false,
  88. minDate:0 ,
  89. maxDate: 0,
  90. currentDate: 0,
  91. shwtie:0,
  92. baseurl:'',
  93. tabstalist:[]
  94. };
  95. },
  96. onShow() {
  97. let type = uni.getStorageSync('token')
  98. if (!type) {
  99. uni.redirectTo({
  100. url: '/pages/load/roles'
  101. })
  102. }
  103. },
  104. onLoad(e) {
  105. this.id=e.id;
  106. // this.params.pageNum = 1
  107. // this.params.code=e.code;
  108. this.list = []
  109. // 修改 获取列表的
  110. // 获取统计
  111. this.getStatelist()
  112. this.$nextTick(function(){
  113. this.lists(this.params)
  114. })
  115. },
  116. created() {
  117. },
  118. //下拉刷新
  119. onPullDownRefresh() {
  120. wx.showNavigationBarLoading()
  121. this.params.pageNum = 1
  122. this.shwtie = 0
  123. this.params = { //上拉刷新
  124. pageSize: 40,
  125. pageNum: 1,
  126. code:this.code
  127. }, //查询
  128. this.keyword = ''
  129. this.list = []
  130. },
  131. methods: {
  132. statusFn(sta){
  133. return this.selectDictLabel(sta)
  134. },
  135. selectDictLabel(value) {
  136. var actions = [];
  137. var datas=this.tabstalist
  138. Object.keys(datas).some((key) => {
  139. if (datas[key].dictValue == (value)) {
  140. actions.push(datas[key].dictLabel);
  141. return true;
  142. }
  143. })
  144. return actions.join('');
  145. },
  146. // 字典值
  147. getStatelist(){
  148. // 旧字典值
  149. this.$http.get("system/dict/data/type/person_type").then(res => {
  150. if (res.code == 200) {
  151. this.tabstalist = res.data
  152. // 列表
  153. } else {
  154. uni.showToast({
  155. title: res.msg,
  156. duration: 1000,
  157. icon: 'none'
  158. });
  159. }
  160. })
  161. },
  162. goDetail(id) {
  163. uni.navigateTo({
  164. url: '/add/pages/addvacfrom/addpeople?id=' + id
  165. })
  166. // uni.navigateTo({
  167. // url: '/pages/resident/residentdetail?id=' + id
  168. // })
  169. },
  170. // 一键确认
  171. getSureFn(){
  172. var that=this;
  173. var newArr=this.list;
  174. var newAdd=[];
  175. var newstr='';
  176. if(newArr.length>0){
  177. for(var i=0;i<newArr.length;i++){
  178. newAdd[newAdd.length]=newArr[i].id;
  179. }
  180. newstr=newAdd.join(',')
  181. this.$nextTick(function(){
  182. that.$http.get('boman-web-core/core/ryrl/confirmInfo/'+newstr,{}).then(res => {
  183. // console.log(res)
  184. if (res.code == 200) {
  185. uni.navigateTo({
  186. url: '/add/pages/addvacfrom/submit'
  187. })
  188. } else {
  189. uni.showToast({
  190. title: res.msg,
  191. icon: "none"
  192. })
  193. }
  194. })
  195. })
  196. }else{
  197. uni.showToast({
  198. title:'暂无需要确认的信息',
  199. icon: "none"
  200. })
  201. }
  202. },
  203. // 一键同步
  204. getSynFn(){
  205. var that=this;
  206. var code=this.code
  207. if(this.code){
  208. var url='boman-web-core/core/czrk/synchronization/'+code
  209. that.$http.get(url,{}).then(res => {
  210. // console.log(res)
  211. if (res.code == 200) {
  212. if(res.msg=='无家庭成员'){
  213. uni.showToast({
  214. title: res.msg,
  215. icon: "none"
  216. })
  217. }else{
  218. uni.navigateTo({
  219. url: '/add/pages/addvacfrom/submit'
  220. })
  221. }
  222. } else {
  223. uni.showToast({
  224. title: res.msg,
  225. icon: "none"
  226. })
  227. }
  228. })
  229. }else{
  230. uni.showToast({
  231. title:'暂无需要同步的信息',
  232. icon: "none"
  233. })
  234. }
  235. },
  236. addVacFrom () {
  237. uni.navigateTo({
  238. url: '/add/pages/addvacfrom/addpeople?code='+this.code
  239. })
  240. },
  241. //查询列表
  242. lists(params) {
  243. this.$http.post('boman-web-core/core/czrk/changeCzrkHistory',{id: this.id}).then(res => {
  244. //停止下拉加载
  245. uni.hideNavigationBarLoading()
  246. uni.stopPullDownRefresh()
  247. if (res.code == 200) {
  248. if (res.data.length < params.pageSize) {
  249. // this.listShow = false
  250. this.wtdt='到底了~'
  251. this.haveMore = false
  252. } else {
  253. this.wtdt='上拉加载更多'
  254. // this.listShow = true
  255. this.haveMore = true
  256. }
  257. if(params.pageSize==1){
  258. this.list = res.data
  259. }else{
  260. this.list = this.list.concat(res.data)
  261. }
  262. } else {
  263. uni.showToast({
  264. title: res.msg,
  265. duration: 1000,
  266. icon: 'none'
  267. });
  268. }
  269. })
  270. },
  271. //刷新
  272. bot_btn() {
  273. if (this.haveMore) {
  274. this.params.pageNum++
  275. this.lists(this.params)
  276. }
  277. },
  278. formatter(type, value){
  279. if (type === 'year') {
  280. return `${value}年`;
  281. } else if (type === 'month') {
  282. return `${value}月`;
  283. }
  284. return value;
  285. },
  286. }
  287. }
  288. </script>
  289. <style lang="scss" scoped>
  290. .address{
  291. display: flex;align-items: center;
  292. .adds{
  293. display: flex;align-items: center;justify-content: center;padding:20rpx 12rpx;width: 180rpx;box-sizing: border-box;
  294. .addsa{font-size: 26rpx;color: #333333;
  295. }
  296. .addsimg{width: 14rpx;height: 10rpx;margin-left: 16rpx;transition: all 0.3s;}
  297. }
  298. }
  299. .coie{
  300. width: 100%;
  301. box-sizing: border-box;
  302. padding: 0 33upx;
  303. .coie_nav{
  304. border-top: 1upx solid #E5E5E5;
  305. display: flex;
  306. flex-wrap: wrap;
  307. padding-bottom: 28upx;
  308. p{
  309. width: 33.33%;
  310. text-align: center;
  311. display: flex;
  312. flex-direction: column;
  313. margin-top: 53upx;
  314. span{
  315. font-size: 28upx;
  316. }
  317. i{
  318. font-size: 28upx;
  319. color: #333;
  320. margin-top: 28upx;
  321. }
  322. }
  323. }
  324. }
  325. .ieju{
  326. height: 17upx;
  327. width: 100%;
  328. background-color: #eee;
  329. margin-bottom: 33upx;
  330. }
  331. //暂无数据
  332. .zanwu {
  333. text-align: center;
  334. padding-top: 20upx;
  335. span {
  336. font-size: 24upx;
  337. }
  338. }
  339. .scroll-view {
  340. max-height: calc(100vh - 150upx);
  341. }
  342. .shax {
  343. // height: 83upx;
  344. font-size: 25upx;
  345. color: #666;
  346. text-align: center;
  347. }
  348. .index {
  349. // padding-top: 33upx;
  350. max-height: 100vh;
  351. .sous {
  352. padding: 24upx 33upx;
  353. // display: flex;
  354. .input {
  355. height: 90upx;
  356. border: 1upx solid #E5E5E5;
  357. flex: 1;
  358. margin-right: 28upx;
  359. padding-left: 10upx;
  360. box-sizing: border-box;
  361. }
  362. button {
  363. // width: 125upx;
  364. height: 90upx;
  365. background-color: #1678FF;
  366. text-size: 28upx;
  367. color: #fff;
  368. text-align: center;
  369. line-height: 90upx;
  370. }
  371. }
  372. //tab
  373. .tab {
  374. padding-top:33upx;
  375. .tabs {
  376. display: flex;
  377. padding: 0 20upx;
  378. box-sizing: border-box;
  379. height: 111upx;
  380. justify-content: space-between;
  381. box-shadow: 0px 7px 7px 0px rgba(229, 229, 229, 0.5);
  382. .one_tab {
  383. color: #1678FF !important;
  384. // width: 140upx;
  385. // text-align: center;
  386. // .twotabs {
  387. // font-size: 31upx;
  388. // color: #666666;
  389. // ;
  390. // font-weight: 500;
  391. // }
  392. // .twosrtabs {
  393. // color: #1678FF;
  394. // }
  395. // .twotabstwo {
  396. // font-size: 24upx;
  397. // color: #AAAAAA;
  398. // }
  399. }
  400. .one_tabqie {
  401. border-bottom: 8upx solid #1678FF;
  402. }
  403. }
  404. }
  405. //表格
  406. .exele {
  407. .box {
  408. .tr_one {
  409. display: flex;
  410. padding: 0 10upx;
  411. box-sizing: border-box;
  412. justify-content: space-between;
  413. th {
  414. // flex: 1;
  415. font-size: 24upx;
  416. font-family: PingFang SC;
  417. font-weight: 500;
  418. color: #333333;
  419. line-height: 14upx;
  420. overflow: hidden;
  421. text-overflow: ellipsis;
  422. white-space: nowrap;
  423. line-height: 83upx;
  424. height: 83upx;
  425. }
  426. }
  427. .two_tr {
  428. display: flex;
  429. padding: 0 10upx;
  430. box-sizing: border-box;
  431. justify-content: space-between;
  432. td {
  433. // flex: 1;
  434. font-size: 24upx;
  435. font-family: PingFang SC;
  436. font-weight: 500;
  437. color: #333333;
  438. line-height: 83upx;
  439. height: 83upx;
  440. overflow: hidden;
  441. text-overflow: ellipsis;
  442. white-space: nowrap;
  443. }
  444. .tdse {
  445. color: #E60012 !important;
  446. }
  447. .apply_span_xl{
  448. color: #32B16C !important;
  449. }
  450. .apply_span_xltwo{
  451. color: #ffa200 !important;
  452. }
  453. .apply_span_xlfive{
  454. color: #4c4b4b !important;
  455. }
  456. .apply_span_xlthreo{
  457. color: #f00404 !important;
  458. }
  459. .apply_span_xlforu{
  460. color: #aaaaaa !important;
  461. }
  462. // .apply_span_xla{
  463. // color: #1678FF;
  464. // text-decoration: underline ;
  465. // }
  466. .coiu {
  467. color: #EC1717;
  468. }
  469. }
  470. .two_trtwo {
  471. background-color: #F6F9FC;
  472. }
  473. }
  474. }
  475. }
  476. .banj {
  477. height: 86upx;
  478. width: 100%;
  479. // text-align: center;
  480. line-height: 86upx;
  481. // background-color: #F6F9FC;
  482. color: #AAAAAA;
  483. margin-top: 20upx;
  484. display: flex;
  485. justify-content: space-around;
  486. }
  487. .apply_box{
  488. .apply_item_input{
  489. padding: 0 33upx;
  490. // border-top: 1upx solid #F4F4F4;
  491. display: flex;
  492. height: 68upx;
  493. align-items: center;
  494. .apply_span_x{
  495. font-size: 28upx;
  496. color: #363535;
  497. span{
  498. color: #F22346;
  499. }
  500. }
  501. .input_r{
  502. font-size: 28upx;
  503. height: 100%;
  504. flex: 1;
  505. text-align: right;
  506. }
  507. .input_rtwo{
  508. line-height:68upx;
  509. }
  510. .input_rtwoss{
  511. color: #1678FF;
  512. }
  513. .input_rtwosss{
  514. color: #FF0000;
  515. }
  516. }
  517. .apply_title_jt{
  518. height: 130upx;
  519. border-top: 1upx solid #F4F4F4;
  520. display: flex;
  521. justify-content: space-between;
  522. align-items: center;
  523. padding: 0 32upx;
  524. span{
  525. font-size: 36upx;
  526. color: #333;
  527. font-weight: bold;
  528. }
  529. .apply_title_btn{
  530. width: 160upx;
  531. height: 60upx;
  532. font-size: 24upx;
  533. color: #fff;
  534. display: flex;
  535. justify-content: center;
  536. align-items: center;
  537. background: #FF568C;
  538. border-radius: 8upx;
  539. .img{
  540. width: 30upx;
  541. height: 30upx;
  542. margin-right: 10upx;
  543. }
  544. }
  545. }
  546. .apply_title_jts{
  547. border:none;
  548. }
  549. .apply_title_jt_item{
  550. border-bottom: 9upx solid #F4F4F4;
  551. .apply_item_input_qx{
  552. color: #FF5185;
  553. height: 100%;
  554. display: flex;
  555. justify-content: center;
  556. align-items: center;
  557. height: 112upx;
  558. font-size: 30upx;
  559. }
  560. }
  561. .apply_item_sfz{
  562. padding: 42upx 20upx;
  563. border-bottom: 9upx solid #F4F4F4;
  564. .apply_item_sfz_title{
  565. font-weight: bold;
  566. font-size: 34upx;
  567. margin-bottom: 40upx;
  568. margin-left: 2upx;
  569. }
  570. .apply_item_phones{
  571. display: flex;
  572. justify-content: space-between;
  573. .apply_item_phone{
  574. width: 340upx;
  575. height: 218upx;
  576. .img{
  577. width: 100%;
  578. height: 100%;
  579. border-radius: 20upx;
  580. }
  581. }
  582. }
  583. }
  584. .apply_item_zdxx{
  585. padding: 0 26upx;
  586. font-size: 34upx;
  587. font-weight: bold;
  588. color: #333;
  589. height: 112upx;
  590. line-height: 112upx;
  591. border: 1upx solid #F4F4F4;
  592. }
  593. .qt_div{
  594. height: 112upx;
  595. border-top: 1upx solid #F4F4F4;
  596. padding: 0 32upx;
  597. border-bottom: 9upx solid #F9F9F9;
  598. .input_l{
  599. height: 100%;
  600. font-size: 30upx;
  601. }
  602. }
  603. }
  604. .tabld{
  605. display: flex;
  606. // height: 90upx;
  607. box-shadow: 0px 7px 5px 0px rgba(218, 218, 218, 0.35);
  608. view {
  609. font-size:26upx ;
  610. font-family: PingFang SC;
  611. font-weight: 500;
  612. color: #191919;
  613. text-align: center;
  614. flex: 1;
  615. // line-height: 70upx;
  616. display: flex;
  617. flex-direction: column;
  618. padding: 18rpx 0 20rpx;
  619. }
  620. .one_tabhu{
  621. color: #009FE8;
  622. position: relative;
  623. ::after{width: 28rpx;height: 6rpx;background: #009FE8;position: absolute;left: 50%;margin-left: -14rpx;bottom: 0;content: "";}
  624. }
  625. }
  626. .nbhe{
  627. display: flex;
  628. margin-bottom: 44upx;
  629. p{
  630. font-size: 25upx;
  631. flex: 1;
  632. padding: 0 77upx;
  633. display: flex;
  634. align-items: center;
  635. }
  636. p:nth-child(2){
  637. justify-content: flex-end;
  638. }
  639. img{
  640. width: 31upx;
  641. height: 29upx;
  642. margin-right: 11upx;
  643. }
  644. }
  645. .xinse{
  646. position: fixed;
  647. width: 100%;
  648. bottom: 0;
  649. left: 0;
  650. padding: 0 20rpx;
  651. padding: 20rpx 34rpx;background: #ffffff;
  652. // box-shadow: 0 14rpx 40rpx 12rpx rgba(218, 218, 218, 1);
  653. .xinsea{
  654. font-size: 33upx;
  655. font-family: PingFang SC;
  656. font-weight: 500;
  657. color: #FFFFFF;
  658. height: 90upx;
  659. text-align: center;
  660. line-height: 90upx;
  661. border-radius: 6rpx;
  662. }
  663. .btn{
  664. background-color: #009FE8;
  665. }
  666. .btn1{
  667. background-color: #00B034;
  668. margin-bottom: 20rpx;
  669. }
  670. .btn2{background-color: #ff9329;margin-bottom: 20rpx;}
  671. }
  672. </style>