| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <template>
- <view>
- <cu-custom bgColor="bg-luohu" :isBack="true">
- <block slot="backText">返回</block>
- <block slot="content">沟通列表</block>
- <block slot="right">
- <view @click="getGo('','3')">添加</view>
- </block>
- </cu-custom>
- <view class="cu-bar bg-white search fixed" :style="[{top:CustomBar + 'px'}]">
- <view class="search-form round">
- <text class="cuIcon-search"></text>
- <input type="text" v-model="keyword" placeholder="请输入表单编号" confirm-type="search" @confirm="search"></input>
- </view>
- <view class="action">
- <button class="cu-btn bg-gradual-blue shadow-blur round" @tap="search">搜索</button>
- </view>
- </view>
- <block v-if="list.length > 0">
- <view v-for="(item,index) in list" :key="index" style="margin: 15rpx 20rpx;position: relative;" :style="[{top:'calc('+ CustomBar + 'px + 20rpx)'}]">
- <uni-section :title="'表单编号:'+item.biao_dan_bian_hao" type="line" padding>
- <view class="sectionBox">
- <view class="left">联系人:</view>
- <view>{{item.ke_hu_lian_xi_ren}} </view>
- </view>
- <view class="sectionBox">
- <view class="left">委托单号:</view>
- <view>{{item.weiTuoBianHao}} </view>
- </view>
- <view class="sectionBox">
- <view class="left">编制日期:</view>
- <view>{{item.bian_zhi_shi_jian}} </view>
- </view>
- <view class="sectionBox">
- <view class="left">类型:</view>
- <view>{{item.lei_xing_ == '2' ? '医院提出沟通' : '客户提出沟通'}} </view>
- </view>
- <view class="sectionBox">
- <view class="left">状态:</view>
- <view style="color: #7349ff;" v-if="item.shi_fou_guo_shen_ == '1'">已完成</view>
- <view style="color: red;" v-else-if="item.shi_fou_guo_shen_ == '已退回'">已退回</view>
- <view v-else>
- {{item.shi_fou_guo_shen_}}
- </view>
- </view>
- <view style=" width: 100%; text-align: right; padding-top: 5rpx;padding-bottom: 0rpx;">
- <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>
- <u-button type="success" size="mini" class="u-m-r-15" @click="getGo(item.id_,'4')" v-if="item.shi_fou_guo_shen_ == '已退回'">修改
- </u-button>
- <u-button type="warning" size="mini" class="btn-back-color" @click="getGo(item.id_,'1')">查阅
- </u-button>
- </view>
- </uni-section>
- </view>
- </block>
- <view v-if="list.length==0" style="margin-top: 350rpx">
- <u-empty text="暂无沟通数据" mode="list"></u-empty>
- </view>
- </view>
- </template>
- <script>
- import {
- ACCESS_TOKEN,
- USER_NAME,
- USER_INFO
- } from "@/common/util/constants" // 拉取登录token,userName,userInfo
- export default {
- data() {
- return {
- CustomBar: this.CustomBar,
- keyword: '',
- list: [],
- current: 0
- }
- },
- // 下拉刷新
- onPullDownRefresh() {
- this.getInit()
- },
- // 上拉加载
- onReachBottom() {
- let _self = this
- uni.showNavigationBarLoading()
- if (this.ReachBottomShow) {
- this.getData()
- }
- },
- created() {
- this.getInit()
- },
- methods: {
- getInit() {
- this.current = 0
- this.list = []
- this.getData(this.keyword)
- },
- getValue() {
- this.getInit()
- },
- /**
- * 模糊查询
- */
- search() {
- this.current = 0
- this.list = []
- this.getData(this.keyword)
- },
- //获取列表数据
- getData(keyword) {
- uni.showLoading({
- mask: true,
- title: '加载中'
- });
- let info = uni.getStorageSync(USER_INFO);
- let useId = info.user.id
- var page = 0
- if (this.current == 0) {
- page = 0
- } else {
- page = this.current * 10
- }
- let sql =
- `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`
- let requestData = this.$sig(sql)
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- const data = res.data.variables.data
- this.list.push(...data)
- uni.stopPullDownRefresh();
- if (data.length > 10) {
- this.ReachBottomShow = false
- } else {
- this.current++
- }
- uni.hideLoading()
- }
- })
- },
- getGo(id, typeValue) {
- uni.navigateTo({
- url: `./communication?id=${id}&typeValue=${typeValue}`
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .sectionBox {
- display: flex;
- align-items: center;
- margin-bottom: 5rpx;
- .left {
- width: 150rpx;
- }
- }
- </style>
|