| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250 |
- <template>
- <view class="container">
- <cu-custom bgColor="bg-luohu" :isBack="true">
- <block slot="backText">返回</block>
- <block slot="content">我的样品</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>
- <view v-for="(item,i) in resdata" :key="i" style="margin: 10rpx 20rpx;position: relative;" :style="[{top:'calc('+ CustomBar + 'px + 20rpx)'}]">
- <uni-section :title="'样品编号:'+item.yang_pin_bian_hao" :subTitle="'检测委托单号:'+item.wei_tuo_bian_hao_" type="line" padding subTitleColor="rgb(51, 51, 51)" subTitleFontSize="14px">
- <view>
- <view>
- <view style="display: flex;line-height: 50rpx;">
- <view class="title">样品名称:</view>
- <view> {{item.yang_pin_ming_che}} </view>
- </view>
- <view style="display: flex;line-height: 50rpx;">
- <view class="title">送样批号:</view>
- <view> {{item.song_jian_pi_hao_}} </view>
- </view>
- <view style="display: flex;line-height: 50rpx;">
- <view class="title">收样时间:</view>
- <view> {{item.shou_yang_ri_qi_}} </view>
- </view>
- <view style="display: flex;line-height: 50rpx;">
- <view>验收结果:</view>
- <view style="color: #5E00FF;" v-if="item.yan_shou_jie_guo_"> {{item.yan_shou_jie_guo_}}
- </view>
- </view>
- <view style="display: flex;line-height: 50rpx;">
- <view>付款状态:</view>
- <view v-if="item.fu_kuan_zhuang_ta=='已结清'">
- <view style="color: #7349ff;"> 已结清 </view>
- </view>
- <view v-else>
- <view style="color: #7349ff;"> 未结清 </view>
- </view>
- </view>
- <view style="display: flex;line-height: 50rpx;">
- <view>样品接收备注:</view>
- <view> {{item.bei_zhu_ || '无'}}</view>
- </view>
- </view>
- <!-- v-if="item.zhuang_tai_ && (item.zhuang_tai_ == '待运营中心审核' || item.zhuang_tai_ == '待检测中心审核' || item.zhuang_tai_ == '待财务审核' || item.zhuang_tai_ == '待样品接收')" -->
- <view class="btnList">
- <u-button class="u-m-r-15 btn-back-color" type="success" size="mini" @click="goto(item.id_,item.wei_tuo_bian_hao_)" v-if="item.wei_tuo_zhuang_ta && (item.wei_tuo_zhuang_ta == '待审核' ||item.wei_tuo_zhuang_ta == '已编制')">
- 样品修改</u-button>
- <u-button type="success" size="mini" class="m-r-15" @click="getTag(item.id_)">样品标签</u-button>
- <u-button type="success" size="mini" @click="goBaogao(item.yang_pin_bian_hao)">查看报告</u-button>
- </view>
- </view>
- </uni-section>
- </view>
- <view v-if="resdata.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
- import md5 from "@/common/util/md5.js"
- import http from "@/common/service/http.js"
- export default {
- components: {},
- // 初始化
- data() {
- return {
- keyword: '',
- CustomBar: this.CustomBar,
- url: http.apiHosp +
- 'demo/reportJsp/pdfReport.jsp?rpx=%E4%B8%AD%E6%B1%87%E7%91%9E%E5%BE%B7%E6%A3%80%E6%B5%8B%E4%B8%AD%E5%BF%83/39%E6%A0%B7%E5%93%81%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F/GDYR-CX11-R01A%20%E6%A3%80%E6%B5%8B%E5%A7%94%E6%89%98%E5%8D%95.rpx&id_=',
- resdata: [],
- current: 0,
- total: 10,
- pageSize: 10,
- ReachBottomShow: true
- }
- },
- // 页面加载
- onLoad: function() {
- this.getData(this.keyword)
- // this.getData(this.current, this.pageSize, this.total);
- },
- // 下拉刷新
- onPullDownRefresh() {
- this.current = 0
- this.resdata = []
- this.getData(this.keyword)
- },
- // 上拉加载
- onReachBottom() {
- let _self = this
- uni.showNavigationBarLoading()
- if (this.ReachBottomShow) {
- this.getData(this.keyword)
- }
- },
- methods: {
- /**
- * 模糊查询
- */
- search() {
- this.current = 0
- this.resdata = []
- this.getData(this.keyword)
- },
- add() {
- this.total += 10
- },
- reset() {
- this.total = 0
- this.current = 1
- },
- change(e) {
- this.getData(this.current, this.pageSize, this.total);
- this.current = e.current
- },
- // 拉取列表数据
- getData(keyworks) {
- 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.id_,a.create_time_,a.yang_pin_ming_che,a.song_jian_pi_hao_,a.yang_pin_bian_hao,c.fu_kuan_zhuang_ta,c.wei_tuo_bian_hao_,c.wei_tuo_zhuang_ta,b.shou_yang_ri_qi_,b.bei_zhu_,b.yan_shou_jie_guo_,d.ke_hu_zhang_hao_ ` +
- `from t_lhypb a ` +
- `left join t_lhwtsqb c on a.parent_id_ = c.id_ ` +
- `left join t_bjd d on c.he_tong_id_ = d.id_ ` +
- `left join t_lhypdjb b on a.yang_pin_bian_hao = b.yang_ben_bian_hao ` +
- ` where (a.create_by_= '${useId}' or d.ke_hu_zhang_hao_ = '${useId}') and (a.yang_pin_bian_hao like '%${keyworks}%' or a.wei_tuo_dan_hao_ like '%${keyworks}%') and c.wei_tuo_lei_xing_ = '客户委托' 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.resdata.push(...data)
- uni.stopPullDownRefresh();
- if (data.length > 10) {
- this.ReachBottomShow = false
- } else {
- this.current++
- }
- uni.hideLoading()
- } else {
- this.$methCommon.getPrompt('服务器异常', 'error')
- uni.hideLoading()
- }
- }).catch(error => {
- this.$methCommon.getPrompt('服务器异常', 'error')
- uni.hideLoading()
- })
- },
- /**
- * @param {Object} id
- * 修改样品跳转
- */
- goto(id, weiTuoBianHao) {
- uni.navigateTo({ // 跳转页面
- url: `/pages/jiance/list/specimen?id=${id}&weiTuoBianHao=${weiTuoBianHao}`
- })
- },
- goBaogao(option) {
- uni.navigateTo({ // 跳转页面
- url: '/pages/fileView/reportList?reportId=' + option
- })
- },
- /**
- * 样品标签页
- */
- getTag(id) {
- uni.navigateTo({ // 跳转页面
- url: '/pages/tag/sampleTag?id=' + id
- })
- },
- sig(sql) {
- let rul = (sql.length + 9) * 12 * 3 + 168
- let salt = "JinYuanXinTong"
- return md5(rul + '' + salt)
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .chat-custom-right {
- flex: 1;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- justify-content: space-between;
- align-items: flex-end;
- }
- .chat-custom-text {
- font-size: 12px;
- /* color: #999; */
- color: black;
- }
- .title {
- width: 140rpx;
- }
- /deep/ .uni-section__content-sub {
- color: rgb(51, 51, 51);
- font-size: 28rpx;
- }
- /* ------------------------------------------------------------- */
- .btnList {
- width: 100%;
- text-align: right;
- padding-top: 15rpx;
- padding-bottom: 0rpx;
- }
- </style>
|