|
@@ -1,28 +1,28 @@
|
|
|
<template>
|
|
|
<window-size>
|
|
|
- <van-cell title="就诊人" :value="params.patName"></van-cell>
|
|
|
+ <van-cell title="就诊人" :value="routeParams.patientName"></van-cell>
|
|
|
<van-cell title="医院名称" value="长沙泰和医院"></van-cell>
|
|
|
- <van-cell title="开方科室" :value="params.deptName"></van-cell>
|
|
|
- <van-cell title="开方医生" :value="params.doctorName"></van-cell>
|
|
|
+ <van-cell title="开方科室" :value="routeParams.deptName"></van-cell>
|
|
|
+ <van-cell title="开方医生" :value="routeParams.doctorName"></van-cell>
|
|
|
<van-cell title="总金额">
|
|
|
<template #default>
|
|
|
- <span style="color: orangered">{{ makeMoney(params.totalAmt) }}</span>
|
|
|
+ <span style="color: orangered">{{ makeMoney(routeParams.totalAmt) }}</span>
|
|
|
</template>
|
|
|
</van-cell>
|
|
|
- <div v-if="params.fundPay && params.fundPay !== 'undefined'">
|
|
|
+ <div v-if="routeParams.fundPay && routeParams.fundPay !== 'undefined'">
|
|
|
<van-cell title="医保统筹支付">
|
|
|
<template #default>
|
|
|
- <span style="color: orangered">{{ makeMoney(params.fundPay) }}</span>
|
|
|
+ <span style="color: orangered">{{ makeMoney(routeParams.fundPay) }}</span>
|
|
|
</template>
|
|
|
</van-cell>
|
|
|
- <van-cell v-if="params.acctPay" title="个人账户支付">
|
|
|
+ <van-cell v-if="routeParams.acctPay" title="个人账户支付">
|
|
|
<template #default>
|
|
|
- <span style="color: orangered">{{ makeMoney(params.acctPay) }}</span>
|
|
|
+ <span style="color: orangered">{{ makeMoney(routeParams.acctPay) }}</span>
|
|
|
</template>
|
|
|
</van-cell>
|
|
|
<van-cell title="个人现金支付">
|
|
|
<template #default>
|
|
|
- <span style="color: orangered">{{ makeMoney(params.selfAmt) }}</span>
|
|
|
+ <span style="color: orangered">{{ makeMoney(routeParams.selfAmt) }}</span>
|
|
|
</template>
|
|
|
</van-cell>
|
|
|
</div>
|
|
@@ -36,7 +36,7 @@
|
|
|
<van-col span="5">金额(元)</van-col>
|
|
|
</van-row>
|
|
|
<div style="height: 5px"></div>
|
|
|
- <div v-for="(fee, index) in fees" :key="index">
|
|
|
+ <div v-for="(fee, index) in chargeList" :key="index">
|
|
|
<div style="height: 5px"></div>
|
|
|
<van-row>
|
|
|
<van-col span="10">{{ fee.itemName }}</van-col>
|
|
@@ -48,119 +48,49 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="height: 10px"></div>
|
|
|
- <van-button block type="primary" @click="wechatPay">微信支付(¥ {{ makePrice(params.selfAmt) }})</van-button>
|
|
|
-
|
|
|
- <van-dialog
|
|
|
- v-model:show="showRate"
|
|
|
- title="您的评价是我们前进的动力"
|
|
|
- show-confirm-button
|
|
|
- show-cancel-button
|
|
|
- confirm-button-text="提交"
|
|
|
- @cancel="router.push('/hospitalService')"
|
|
|
- @confirm="submitComment">
|
|
|
- <div style="font-size: 12px; color: rgb(128, 128, 128); padding: 8px 0 0 20px">请您对医生作出评价:</div>
|
|
|
- <div style="padding: 8px 0 20px 20px">
|
|
|
- <div>
|
|
|
- 评分:
|
|
|
- <van-rate
|
|
|
- v-model="comment.commentLevel"
|
|
|
- :size="20"
|
|
|
- color="#ffd21e"
|
|
|
- void-icon="star"
|
|
|
- void-color="#eee"
|
|
|
- />
|
|
|
- <span style="margin-left: 12px; font-size: 12px; color: rgb(128, 128, 128)">({{rateLevelExplain}})</span>
|
|
|
- </div>
|
|
|
- <van-field
|
|
|
- v-model="comment.commentContent"
|
|
|
- rows="5"
|
|
|
- autosize
|
|
|
- type="textarea"
|
|
|
- placeholder="请在此输入评价内容..."
|
|
|
- style="border: 1px solid lightgray; border-radius: 5px; margin-top: 12px"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </van-dialog>
|
|
|
+ <van-button block type="primary" @click="toCashier">提交订单</van-button>
|
|
|
</window-size>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import {useRouter} from 'vue-router'
|
|
|
import {getUnPaidDetail} from '../../../api/pay-mz-fee'
|
|
|
-import {computed, onMounted, reactive, ref} from 'vue'
|
|
|
-import {wxPay} from '../../../utils/wx-pay'
|
|
|
+import {onMounted, ref} from 'vue'
|
|
|
import store from '../../../store'
|
|
|
-import {showToast} from 'vant';
|
|
|
-import {commitNewComment} from "../../../api/comment";
|
|
|
|
|
|
const router = useRouter()
|
|
|
-const params = router.currentRoute.value.params
|
|
|
-const fees = ref([])
|
|
|
-const showRate = ref(false)
|
|
|
-const comment = reactive({
|
|
|
- commentLevel: 5,
|
|
|
- commentContent: '',
|
|
|
- doctorName: '',
|
|
|
- hisOrdNum: '',
|
|
|
- patientName: '',
|
|
|
- patientId: ''
|
|
|
-})
|
|
|
-const rateLevelExplain = computed(() => {
|
|
|
- switch (comment.commentLevel) {
|
|
|
- case 5:
|
|
|
- return '很满意'
|
|
|
- case 4:
|
|
|
- return '满意'
|
|
|
- case 3:
|
|
|
- return '一般'
|
|
|
- case 2:
|
|
|
- return '不满意'
|
|
|
- case 1:
|
|
|
- return '很不满意'
|
|
|
- }
|
|
|
-})
|
|
|
-const submitComment = () => {
|
|
|
- comment.doctorCode = params.doctorCode
|
|
|
- comment.doctorName = params.doctorName
|
|
|
- comment.hisOrdNum = params.hisOrdNum
|
|
|
- comment.patientId = params.patientId
|
|
|
- comment.patientName = params.patName
|
|
|
- commitNewComment(comment).then(res => {
|
|
|
- showToast({
|
|
|
- message: res,
|
|
|
- position: 'top',
|
|
|
- });
|
|
|
- router.push('/hospitalService')
|
|
|
- })
|
|
|
-}
|
|
|
-const wechatPay = () => {
|
|
|
- let bodyText = '门诊缴费'
|
|
|
- if (fees.value.length === 1) {
|
|
|
- bodyText = fees.value[0].itemName || '门诊缴费'
|
|
|
- }
|
|
|
- const param = {
|
|
|
- body: bodyText,
|
|
|
+const routeParams = router.currentRoute.value.params
|
|
|
+const chargeList = ref([])
|
|
|
+
|
|
|
+function toCashier() {
|
|
|
+ const createOrderRequest = {
|
|
|
+ body: '门诊缴费',
|
|
|
orderType: 2,
|
|
|
- totalFee: makePrice(params.selfAmt),
|
|
|
- patientId: params.patientId,
|
|
|
- hisOrdNum: params.hisOrdNum,
|
|
|
+ totalFee: routeParams.totalAmt / 100,
|
|
|
+ fundpayAmt: routeParams.fundPay / 100,
|
|
|
+ acctpayAmt: routeParams.acctPay / 100,
|
|
|
+ cashpayAmt: routeParams.selfAmt / 100,
|
|
|
+ couponAmt: 0,
|
|
|
+ patientId: routeParams.patientId,
|
|
|
+ hisOrdNum: routeParams.hisOrdNum,
|
|
|
yjReqNo: store.state.yjReqNo,
|
|
|
+ doctorCode: routeParams.doctorCode,
|
|
|
+ doctorName: routeParams.doctorName,
|
|
|
+ deptName: routeParams.deptName,
|
|
|
+ patientName: routeParams.patientName,
|
|
|
+ chargeList: chargeList.value
|
|
|
}
|
|
|
- wxPay(param).then((result) => {
|
|
|
- showToast({
|
|
|
- message: result,
|
|
|
- position: 'top',
|
|
|
- });
|
|
|
- if (params.doctorCode === '99999') {
|
|
|
- router.push('/hospitalService')
|
|
|
- } else {
|
|
|
- showRate.value = true
|
|
|
- }
|
|
|
+ store.dispatch({
|
|
|
+ type: 'storeCreateOrderRequest',
|
|
|
+ createOrderRequest,
|
|
|
+ }).then(() => {
|
|
|
+ router.push('/cashier')
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
- getUnPaidDetail(params.patientId, params.hisOrdNum).then((res) => {
|
|
|
- fees.value = res
|
|
|
+ getUnPaidDetail(routeParams.patientId, routeParams.hisOrdNum).then((res) => {
|
|
|
+ chargeList.value = res
|
|
|
})
|
|
|
})
|
|
|
|
|
@@ -170,6 +100,6 @@ function makePrice(num) {
|
|
|
|
|
|
function makeMoney(money) {
|
|
|
const m = money / 100
|
|
|
- return '¥ ' + m.toFixed(2)
|
|
|
+ return '¥' + m.toFixed(2)
|
|
|
}
|
|
|
</script>
|