lincl 1 năm trước cách đây
mục cha
commit
6c5b1c9580

+ 8 - 0
mini-pro-web/src/api/api-medicineAbinet.js

@ -773,6 +773,14 @@ let service = {
		});
	},
	selectSettlementList: function(params) {
		return request({
			url: `${BASE}/baseOrder/open/selectSettlementList`,
			method: "get",
			params
		});
	},
	
};
export default service;

+ 20 - 0
mini-pro-web/src/main.js

@ -47,6 +47,26 @@ Promise.prototype.complete = function(callback){
	)
}
function replaceWidthStar(str) {
	if(!str) {
	  return ""
	}
	
	var len = str.length, 
		starLen = Math.floor(len / 2) ,
		diffLen = len - starLen,
		preLen =Math.floor(diffLen / 2),
		preStr = str.substr(0, preLen),
		appendStr = str.substr(preLen + starLen),
		starStr = ""
	for (var i = 0; i < starLen; i++) {
		starStr += '*';
	}
	return preStr + starStr + appendStr;
}
Vue.filter('replaceWidthStar', replaceWidthStar)
Vue.prototype.$replaceWidthStar = replaceWidthStar
new Vue({
	data: {
		imWs: null,

+ 128 - 12
mini-pro-web/src/views/machine/components/DrugTaking.vue

@ -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>

+ 6 - 3
mini-pro-web/src/views/machine/components/SettleSuc.vue

@ -1,6 +1,6 @@
<template>
	<div class="settleSuc" >
		<div class="settleSuc-inner">
		<div class="settleSuc-inner" :class="{'his-settleSuc-inner': isHis}">
			<img class="banner" src="../img/settle-suc-banner.png" alt="">
			<div class="line"></div>
			<div class="content fs-8 ">
@ -9,7 +9,7 @@
				<div class="title mt6 c-bold"><span>结算信息</span></div>
				<div class="rows plr14">
					<div class="row">社保卡号:{{printMessage.cardno}}</div>
					<div class="row">社保卡号:{{printMessage.cardno | replaceWidthStar}}</div>
					<div class="row">姓名:{{printMessage.name}}</div>
					<div class="row">挂号科室:{{printMessage.deptName}}</div>
					<div class="row">医生姓名:{{printMessage.doctorName}}</div>
@ -91,7 +91,7 @@
<script>
import medicineAbinetApi from '@/api/api-medicineAbinet'
export default {
	props: ['printMessageList'],
	props: ['printMessageList', 'isHis'],
  	data() {
    	return {
			// printMessageList: [],
@ -139,6 +139,9 @@ export default {
			var printcon = []
			_.each(this.printMessageList, printMessage=>{
				var { hospital, feeRemark, itemList } = printMessage
				// if(printMessage.cardno){
				// 	printMessage.cardno = this.$replaceWidthStar(printMessage.cardno)
				// }
				printMessage.applyTime = this.$moment(printMessage.applyTime).format('YYYY-MM-DD')
				printcon = printcon.concat([
					{type:"reset"},

+ 7 - 3
mini-pro-web/src/views/machine/components/TipsDialog.vue

@ -250,7 +250,8 @@ export default {
			nextContentType,
			close = false,
			payType = '',
			payScene = ''
			payScene = '',
			isPickComplete = false
		}){
			if(close){
				this.onClose()
@ -262,7 +263,7 @@ export default {
			if(nextContentType){
				this.nextContentType = nextContentType
			}
			this.isPickComplete = isPickComplete
			this.lastContentType = this.contentType
			this.payScene = payScene
			this.message = message
@ -314,7 +315,10 @@ export default {
				closeThread = setInterval(()=>{
					if(this.closeTimes <= 0){
						this.removeInterval()
						if(this.contentType == 2){
						if(this.isPickComplete){
							this.$emit('onPickCompleteClose')
							this.onClose()
						} else if(this.contentType == 2){
							this.$EventBus.$emit('abortReadOrderRequest')
							this.show({
								contentType: 3,

+ 60 - 20
mini-pro-web/src/views/machine/index.vue

@ -45,12 +45,12 @@
				</div>
				<div class="banner-list kitbox">
					<div @click="onPrevReadCard({contentType: 1, nextContentType: 13})" class="banner-list-item-1">
					<div @click="indexFuncClick({contentType: 1, nextContentType: 13})" :class="{'icon-gray': funcMgn.quyao!==true}" class="banner-list-item-1">
						<div>自助</div><div>取药</div>
					</div>
					<div>
						<div @click="onPrevReadCard({contentType: 1, nextContentType: 4})" class="banner-list-item-2">门诊结算</div>
						<div @click="onPrevReadCard({contentType: 1, nextContentType: 20})" class="banner-list-item-3">预缴金充值</div>
						<div @click="indexFuncClick({contentType: 1, nextContentType: 4})" :class="{'icon-gray': funcMgn.jiesuan!==true}" class="banner-list-item-2">门诊结算</div>
						<div @click="indexFuncClick({contentType: 1, nextContentType: 20})" :class="{'icon-gray': funcMgn.yujiaojin!==true}" class="banner-list-item-3 ">预缴金充值</div>
					</div>
				</div>
@ -83,7 +83,7 @@
		<DrugTaking ref="DrugTaking" :orgCode="orgCode" :deviceNum="deviceNum" @startSendShipment="startSendShipment" 
			:cardSn="cardSn" :cardNo="cardNo" :idcard="idcard" :userName="userName"
			@onClose="isShow=true" @onShow="isShow=false" @printSettle="printSettle"/>
		<TipsDialog ref="TipsDialog" @readcard="readcard" @SetPrintPage="SetPrintPage"/>
		<TipsDialog ref="TipsDialog" @onPickCompleteClose="$refs.DrugTaking&&$refs.DrugTaking.onClose()" @readcard="readcard" @SetPrintPage="SetPrintPage"/>
		<audio id='audioPlay' src='' hidden='true'/>
	</div>
@ -111,6 +111,12 @@ export default {
  	},
  	data() {
    	return {
			funcMgn: {
				jiesuan: true,
				quyao: true,
				yujiaojin: true,
			},
			isErr: 2, //1设备维护  2正常使用
			deviceNum: this.$route.query.deviceNum || '14912202107000001500000000000000',//14912202107000001500000000000000    14912202111000001000000000000000
			step: 0, //0启动页  1首页  2扫码页  3订单页
@ -182,6 +188,28 @@ export default {
		window.socketUtils = socketUtils
	},
  	methods: {
		indexFuncClick(data){
			var { jiesuan, quyao, yujiaojin } = this.funcMgn
			if(data.nextContentType == 13){
				if(quyao === true){
					this.onPrevReadCard(data)
				} else {
					this.$toast(quyao || "该功能暂未开放")
				}
			} else if(data.nextContentType == 4){
				if(jiesuan === true){
					this.onPrevReadCard(data)
				} else {
					this.$toast(jiesuan || "该功能暂未开放")
				}
			} else if(data.nextContentType == 20){
				if(yujiaojin === true){
					this.onPrevReadCard(data)
				} else {
					this.$toast(yujiaojin || "该功能暂未开放")
				}
			} 
		},
		loopCharge(v, item, j){
			return new Promise((resolve, reject)=>{
				item.sort =  j
@ -418,7 +446,8 @@ export default {
					if(this.printType==1){
						this.showTipsDialog({
							contentType: 3,
							message: "您的医嘱已打印,请注意取走医嘱"
							message: "您的医嘱已打印,请注意取走医嘱",
							isPickComplete: true
						})
					} else {
						this.showTipsDialog({
@ -432,7 +461,7 @@ export default {
				} 
			})
			socketUtils.$on('checkNextEvent', (msg)=>{
				this.checkNextEvent(msg.type)
				this.checkNextEvent(msg.type, msg)
			})
			socketUtils.init({
@ -455,6 +484,19 @@ export default {
					this.orgCode = res.obj.belongCommunity
					this.humidity = res.obj.nowHumidity
					this.temperature = res.obj.nowTemperature
					if(res.obj.modules){
						try {
							this.funcMgn = JSON.parse(res.obj.modules)
						} catch (error) {
							console.error(error)
						}
					}
					// this.funcMgn = {
					// 	jiesuan: "111",
					// 	quyao: "dsfasd",
					// 	yujiaojin: "该功能暂未开放",
					// }
                })
                .catch(err=>{
                    console.error(err)
@ -695,7 +737,7 @@ export default {
				location.reload(true)
			}, 3000)
		},
		checkNextEvent(eventName){
		checkNextEvent(eventName, data){
			if(eventName == 'equ_normal'){
				//设备上线
				if(this.inOut){
@ -728,7 +770,11 @@ export default {
				}
			} else if(eventName == 'exeUpdate'){
				jsApp.update()
			}
			} else if(eventName == 'indexFuncManage'){
				if(data.mess){
					this.funcMgn = _.assign(this.funcMgn, JSON.parse(data.mess))
				}
			} 
		},
		checkCardNo(item){
			if(this.oldCardNo){
@ -746,28 +792,22 @@ export default {
		onloadeddata(e){
			console.log('onloadeddata', e)
			console.log('当媒介数据已加载时运行的脚本', e)
			
		},
		onerror(){
			console.log('onerror', e)
			console.log('当在文件加载期间发生错误时运行的脚本。', e)
			
		},
		onstalled(e){
			console.log('onstalled', e)
			console.log('在浏览器不论何种原因未能取回媒介数据时运行的脚本。', e)
			
		},
		onsuspend(e){
			console.log('onsuspend', e)
			console.log('在媒介数据完全加载之前不论何种原因终止取回媒介数据时运行的脚本。', e)
			
		},
		onemptied (e){
			console.log('onemptied', e)
			console.log('当发生故障并且文件突然不可用时运行的脚本(比如连接意外断开时)', e)
			
		},
		onended (e){
			console.log('onended', e)
			console.log('当媒介已到达结尾时运行的脚本(可发送类似“感谢观看”之类的消息)。', e)
			
		},
		

+ 76 - 0
mini-pro-web/src/views/machine/scss/DrugTaking.scss

@ -385,4 +385,80 @@
            display: none;
        }
    }
    .history-btn{
        background-color: rgba(34, 169, 250, 0.2);
        color: rgba(34, 169, 250, 1);
        border: none;
    }
    .record-panel{
        height: 424px;
    }
    .panel  .record-list{
        height: 100%;
    }
    .record-item{
        background-color: #fff;
        display: -webkit-box;
        padding: 9px 0;
        line-height: 20px;
        font-size: 10px;
        .sort{
            width: 24px;
            text-align: center;
        }
        .name{
            width: 50px;
        }
        .dept{
            width: 77px;
        }
        .date{
            width: 62px;
        }
        .money{
            -webkit-box-flex: 1;
            text-align: right;
            .fs8{
                font-size: 8px;
            }
        }
        .print{
            width: 60px;
            padding-right: 14px;
            text-align: right;
            color: #22A9FA;
        }
    }
    .record-btn{
        width: 333px;
        margin: 0 auto;
        display: -webkit-box;
        -webkit-box-pack: center;
        padding-top: 18px;
        font-size: 16px;
        >div{
            width: 136px;
            height: 42px;
            text-align: center;
            border: 1px solid #22A9FA;
            color: #22A9FA;
            border-radius: 42px;
            background-color: #fff;
            line-height: 42px;
            margin: 0 10px;
            &.blue{
                background-color: #22A9FA;
                color: #fff;
            }
            &.disable{
                border: 1px solid #999;
                background-color: #999;
                color: #fff;
            }
        }
    }
}

+ 9 - 0
mini-pro-web/src/views/machine/scss/settleSuc.scss

@ -7,10 +7,19 @@
        margin: 0 auto;
        box-shadow: 0px calc(16px / 6)  calc(96px / 6)  rgba(0, 91, 175, 0.2);
        border-radius: calc(60px / 6)  ;
        
        .banner{
            width: 100%;
            display: block;
        }
        &.his-settleSuc-inner{
            height: 480px;
            padding-top: 10px;
            .banner{
                display: none;
            }
        }
        .line{
            background: #DCE0E4;
            border-radius: calc(23px / 6);

+ 4 - 1
mini-pro-web/src/views/machine/utils/socket.js

@ -347,7 +347,7 @@ class SocketUtils extends Vue {
            printcon.push({type:"line"})
        })
        var {date, phone, num, remark, time, community, qrCodeContent, info} = this.orderInfo
        var {date, phone, num, remark, time, community, qrCodeContent, name, info} = this.orderInfo
        var infoArr = (info&&info.split(',')) || [], 
            infoTextArr = []
        if(infoArr.indexOf("community") != -1){
@ -359,6 +359,9 @@ class SocketUtils extends Vue {
        if(infoArr.indexOf("orderNo") != -1){
            infoTextArr.push(`处方单号:${num}\n`)
        }
        if(infoArr.indexOf("name") != -1){
            infoTextArr.push(`居民姓名:${name}\n`)
        }
        if(infoArr.indexOf("shipTime") != -1){
            infoTextArr.push(`取药日期:${date} ${time}\n`)
        }