|
@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="machine-drug-taking c-333 fs-13" :class="classList">
|
|
|
<div v-show="contentType==4||contentType==13||contentType==5" class="pt42 order-panel">
|
|
|
<div class="panel " :class="{'panel-no-data': (contentType==4)&&(!showSettleInfoList||!showSettleInfoList.length)}">
|
|
|
<div v-show="contentType==4||contentType==13||contentType==5||contentType==20" class="pt42 order-panel">
|
|
|
<div class="panel " :class="{'panel-no-data': (contentType==4)&&(!showSettleInfoList||!showSettleInfoList.length), 'record-panel': contentType==20}">
|
|
|
<div class="banner">
|
|
|
<div class="back-icon" @click="back()">
|
|
|
<div>
|
|
@ -10,7 +10,7 @@
|
|
|
<div class="ml5">{{closeTimes}}s</div>
|
|
|
</div>
|
|
|
<img class="bg-icon" src="../img/i-banner.png" alt="">
|
|
|
<div class="text">{{contentType==13? "自助取药": contentType==4? "门诊结算" : "门诊结算清单"}}</div>
|
|
|
<div class="text">{{contentType==13? "自助取药": contentType==4? "门诊结算" : contentType==5? "门诊结算清单" : "历史结算记录"}}</div>
|
|
|
</div>
|
|
|
|
|
|
<template v-if="contentType==4||contentType==13">
|
|
@ -78,17 +78,26 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</van-checkbox-group>
|
|
|
<div v-if="isPayed==0||contentType==4" class="bottom-button">
|
|
|
<div v-if="contentType==4||isPayed==0" class="bottom-button">
|
|
|
<!-- <div class="select"><van-checkbox v-model="isAllCheck" @change="onAllCheckChange" icon-size="3.46667vw">全选</van-checkbox></div> -->
|
|
|
<div class="">
|
|
|
<van-button @click="show({ contentType: 20 })" class="history-btn" block type="primary">{{!showSettleInfoList.length? '历史结算记录' : '历史记录'}}</van-button>
|
|
|
</div>
|
|
|
<div v-if="showSettleInfoList.length" class="">
|
|
|
<van-button @click="toSettleInfoDetail(1)" color="#22A9FA" block type="primary">立即结算</van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- <div v-else-if="isPayed==0" class="bottom-button">
|
|
|
<div class="select"><van-checkbox v-model="isAllCheck" @change="onAllCheckChange" icon-size="3.46667vw">全选</van-checkbox></div>
|
|
|
<div class="">
|
|
|
<van-button v-if="contentType==4||isPayed==0" @click="toSettleInfoDetail(1)" color="#2bd3dd" block type="primary">立即结算</van-button>
|
|
|
<van-button v-else color="#2bd3dd" block type="primary">立即取药</van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div> -->
|
|
|
</template>
|
|
|
|
|
|
</template>
|
|
|
<template v-else-if="contentType==5" class="panel " >
|
|
|
<template v-else-if="contentType==5" >
|
|
|
<div class="order-list fs-13 plr15 pt7 pb15">
|
|
|
<div v-for="(item) in curSettleList" :key="item.getSettleInfo.id" class="item ">
|
|
|
<div class="plr10">
|
|
@ -119,6 +128,30 @@
|
|
|
<div><van-button @click="jiesuan" color="#22a9fa" block type="primary">立即结算</van-button></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<template v-else-if="contentType==20">
|
|
|
<div class="order-list record-list fs-13 ptb5 bgc-fff ">
|
|
|
<template v-if="hisList.length">
|
|
|
<div @click="showPrint(item)" v-for="(item, i) in hisList" :key="item.id" class="record-item ">
|
|
|
<div class="sort">{{i+1}}</div>
|
|
|
<div class="name ellipsis_1">{{item.name}}</div>
|
|
|
<div class="dept ellipsis_1">{{item.data.deptName}}</div>
|
|
|
<div class="date">{{$moment(item.applyTime).format('YYYY/MM/DD')}}</div>
|
|
|
<div class="money ellipsis_1"><span class="fs8">¥</span>{{item.totalAmount}}</div>
|
|
|
<div class="print">打印 ></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<div v-else class="nodata">
|
|
|
<img src="../img/i-quesheng.png" alt="">
|
|
|
<div class="pt20 tc">无历史结算信息</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
|
|
|
<div class="record-btn" v-if="contentType==20&&!(page==1&&!hasMore)">
|
|
|
<div @click="changePage(-1)" :class="{disable: page<=1}">上一页</div>
|
|
|
<div @click="changePage(1)" :class="{disable: !hasMore}" class="blue">下一页</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@ -129,7 +162,7 @@
|
|
|
</div>
|
|
|
<div class="ml5">{{closeTimes}}s</div>
|
|
|
</div>
|
|
|
<SettleSuc :printMessageList="printMessageList" @printSettle="printSettle"/>
|
|
|
<SettleSuc :printMessageList="printMessageList" :isHis="isHis" @printSettle="printSettle"/>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
@ -149,7 +182,7 @@ export default {
|
|
|
return {
|
|
|
num: '',//64022149
|
|
|
keyboardShow: false,
|
|
|
contentType: 0, //1选择取药方式 2订单查询中 3提示 4门诊结算 5结算清单 6选择支付方式 7支付二维码 8结算成功 9结算失败 10出药中 11出药成功 12出药失败 13自助取药 14结算中 99结算成功
|
|
|
contentType: 0, //1选择取药方式 2订单查询中 3提示 4门诊结算 5结算清单 6选择支付方式 7支付二维码 8结算成功 9结算失败 10出药中 11出药成功 12出药失败 13自助取药 14结算中 20历史结算记录 99结算成功
|
|
|
nextContentType: 0,
|
|
|
hasTimer: false,
|
|
|
hasClose: true,
|
|
@ -166,7 +199,11 @@ export default {
|
|
|
isPayed: 1, //1已结算 0未结算
|
|
|
CardInfo: '',
|
|
|
cancelTokenRequest: {},
|
|
|
printMessageList: []
|
|
|
printMessageList: [],
|
|
|
hisList: [],
|
|
|
page: 1,
|
|
|
hasMore: false,
|
|
|
isHis: false
|
|
|
}
|
|
|
},
|
|
|
computed:{
|
|
@ -225,6 +262,8 @@ export default {
|
|
|
getSettlementInfoList&&getSettlementInfoList.cancel("终止请求")
|
|
|
checkOrderAndReturnOrderList&&checkOrderAndReturnOrderList.cancel("终止请求")
|
|
|
})
|
|
|
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
refresh(item){
|
|
@ -278,16 +317,26 @@ export default {
|
|
|
isBack = false
|
|
|
}){
|
|
|
if(!isBack){
|
|
|
if(contentType!=99){
|
|
|
if(contentType!=99 ){
|
|
|
this.lastContentType.push(arguments[0])
|
|
|
} else {
|
|
|
var last = this.lastContentType[this.lastContentType.length-1]
|
|
|
if(last.contentType === 20){
|
|
|
this.lastContentType.push(arguments[0])
|
|
|
}
|
|
|
}
|
|
|
this.$emit('onShow')
|
|
|
if(contentType == 20){
|
|
|
this.page = 1
|
|
|
this.list = []
|
|
|
this.selectSettlementList()
|
|
|
}
|
|
|
}
|
|
|
this.message = message
|
|
|
this.hasTimer = hasTimer
|
|
|
this.hasClose = hasClose
|
|
|
this.contentType = contentType
|
|
|
// this.contentType = 99
|
|
|
// this.contentType = 20
|
|
|
this.initCloseTimer()
|
|
|
this.showTipsDialog({
|
|
|
close: true
|
|
@ -532,6 +581,7 @@ export default {
|
|
|
clearInterval(checkPayThread)
|
|
|
}
|
|
|
this.printMessageList = data.printMessageList
|
|
|
this.isHis = false
|
|
|
this.show({
|
|
|
contentType: 99
|
|
|
})
|
|
@ -650,8 +700,74 @@ export default {
|
|
|
},
|
|
|
printSettle(obj){
|
|
|
this.$emit('printSettle', obj)
|
|
|
}
|
|
|
},
|
|
|
|
|
|
showPrint(item){
|
|
|
this.printMessageList = [item.data]
|
|
|
this.isHis = true
|
|
|
this.show({
|
|
|
contentType: 99
|
|
|
})
|
|
|
},
|
|
|
selectSettlementList(){
|
|
|
this.$loading("加载中..")
|
|
|
this.removeInterval(closeThread)
|
|
|
var p = {
|
|
|
ssc: this.cardNo, // "DJ8030814",//DJ8030814
|
|
|
equNum: this.deviceNum,
|
|
|
page: this.page,
|
|
|
size: 10,
|
|
|
}
|
|
|
console.log('selectSettlementList params', p)
|
|
|
medicineAbinetApi
|
|
|
.selectSettlementList(p)
|
|
|
.then(res=>{
|
|
|
console.log('selectSettlementList', res)
|
|
|
if(res.status == 200){
|
|
|
this.$toast.clear()
|
|
|
this.hisList = res.detailModelList || []
|
|
|
// || res.detailModelList.length<=p.size
|
|
|
if(!res.detailModelList ){
|
|
|
this.hasMore = false
|
|
|
} else {
|
|
|
p.page = this.page * 10 + 1
|
|
|
p.size = 1
|
|
|
medicineAbinetApi
|
|
|
.selectSettlementList(p)
|
|
|
.then(res=>{
|
|
|
if(res.status == 200){
|
|
|
if(!res.detailModelList || res.detailModelList.length==0){
|
|
|
this.hasMore = false
|
|
|
} else {
|
|
|
this.hasMore = true
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
// this.page += 1
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
.catch(err=>{
|
|
|
console.error(err)
|
|
|
})
|
|
|
.complete(()=>{
|
|
|
this.initCloseTimer(this.closeTimes)
|
|
|
})
|
|
|
},
|
|
|
changePage(diff){
|
|
|
if(diff == -1){
|
|
|
if(this.page<=1){
|
|
|
return
|
|
|
}
|
|
|
} else {
|
|
|
if(!this.hasMore){
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
|
|
|
this.page += diff
|
|
|
this.selectSettlementList()
|
|
|
}
|
|
|
},
|
|
|
}
|
|
|
</script>
|