communicationList.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <view>
  3. <cu-custom bgColor="bg-luohu" :isBack="true">
  4. <block slot="backText">返回</block>
  5. <block slot="content">沟通列表</block>
  6. <block slot="right">
  7. <view @click="getGo('','3')">添加</view>
  8. </block>
  9. </cu-custom>
  10. <view class="cu-bar bg-white search fixed" :style="[{top:CustomBar + 'px'}]">
  11. <view class="search-form round">
  12. <text class="cuIcon-search"></text>
  13. <input type="text" v-model="keyword" placeholder="输入搜索的关键词" confirm-type="search"
  14. @confirm="search"></input>
  15. </view>
  16. <view class="action">
  17. <button class="cu-btn bg-gradual-blue shadow-blur round" @tap="search">搜索</button>
  18. </view>
  19. </view>
  20. <block v-if="list.length > 0">
  21. <view v-for="(item,index) in list" :key="index" style="margin: 10rpx 20rpx;position: relative;"
  22. :style="[{top:'calc('+ CustomBar + 'px + 20rpx)'}]">
  23. <uni-section :title="'表单编号:'+item.biao_dan_bian_hao" type="line" padding>
  24. <view class="sectionBox">
  25. <view class="left">联系人:</view>
  26. <view>{{item.ke_hu_lian_xi_ren}} </view>
  27. </view>
  28. <view class="sectionBox">
  29. <view class="left">委托单号:</view>
  30. <view>{{item.weiTuoBianHao}} </view>
  31. </view>
  32. <view class="sectionBox">
  33. <view class="left">编制日期:</view>
  34. <view>{{item.bian_zhi_shi_jian}} </view>
  35. </view>
  36. <view class="sectionBox">
  37. <view class="left">类型:</view>
  38. <view>{{item.lei_xing_ == '2' ? '医院提出沟通' : '客户提出沟通'}} </view>
  39. </view>
  40. <view class="sectionBox">
  41. <view class="left">状态:</view>
  42. <view>{{item.shi_fou_guo_shen_ == '1' ? '已完成' : item.shi_fou_guo_shen_}} </view>
  43. </view>
  44. <view style=" width: 100%; text-align: right; padding-top: 5rpx;padding-bottom: 0rpx;">
  45. <u-button type="warning" size="mini" @click="getGo(item.id_,'2')" class="u-m-r-15"
  46. v-if="item.lei_xing_ == '2' && item.shi_fou_guo_shen_ == '已编制'">签名</u-button>
  47. <u-button type="warning" size="mini" class="btn-back-color" @click="getGo(item.id_,'1')">查阅
  48. </u-button>
  49. </view>
  50. </uni-section>
  51. </view>
  52. </block>
  53. </view>
  54. </template>
  55. <script>
  56. import {
  57. ACCESS_TOKEN,
  58. USER_NAME,
  59. USER_INFO
  60. } from "@/common/util/constants" // 拉取登录token,userName,userInfo
  61. export default {
  62. data() {
  63. return {
  64. CustomBar: this.CustomBar,
  65. keyword: '',
  66. list: [],
  67. current: 0
  68. }
  69. },
  70. // 下拉刷新
  71. onPullDownRefresh() {
  72. this.getInit()
  73. },
  74. // 上拉加载
  75. onReachBottom() {
  76. let _self = this
  77. uni.showNavigationBarLoading()
  78. if (this.ReachBottomShow) {
  79. this.getData()
  80. }
  81. },
  82. created() {
  83. this.getInit()
  84. },
  85. methods: {
  86. getInit() {
  87. this.current = 0
  88. this.list = []
  89. this.getData(this.keyword)
  90. },
  91. getValue() {
  92. this.getInit()
  93. },
  94. /**
  95. * 模糊查询
  96. */
  97. search() {
  98. this.current = 0
  99. this.list = []
  100. this.getData(this.keyword)
  101. },
  102. //获取列表数据
  103. getData(keyword) {
  104. uni.showLoading({
  105. mask: true,
  106. title: 'loading'
  107. });
  108. let info = uni.getStorageSync(USER_INFO);
  109. let useId = info.user.id
  110. var page = 0
  111. if (this.current == 0) {
  112. page = 0
  113. } else {
  114. page = this.current * 10
  115. }
  116. let sql =
  117. `select a.*,b.wei_tuo_bian_hao_ as weiTuoBianHao from t_khgtjlb a left join t_lhwtsqb b on a.wei_tuo_dan_hao_ = b.id_ where a.ke_hu_dan_wei_min = '${useId}' and biao_dan_bian_hao like'%${keyword}%' ORDER BY a.create_time_ desc LIMIT ${page},10`
  118. let requestData = this.$sig(sql)
  119. this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
  120. if (res.data.state == 200) {
  121. const data = res.data.variables.data
  122. this.list.push(...data)
  123. uni.stopPullDownRefresh();
  124. if (data.length > 10) {
  125. this.ReachBottomShow = false
  126. } else {
  127. this.current++
  128. }
  129. uni.hideLoading()
  130. }
  131. })
  132. },
  133. getGo(id, typeValue) {
  134. uni.navigateTo({
  135. url: `./communication?id=${id}&typeValue=${typeValue}`
  136. })
  137. }
  138. }
  139. }
  140. </script>
  141. <style lang="scss" scoped>
  142. .sectionBox {
  143. display: flex;
  144. align-items: center;
  145. margin-bottom: 5rpx;
  146. .left {
  147. width: 150rpx;
  148. }
  149. }
  150. </style>