communicationList.vue 4.6 KB

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