|
@@ -21,7 +21,7 @@
|
|
|
<van-button type="primary" block :disabled="disableRefundButton" @click="revokeMzyReq">退款退号</van-button>
|
|
|
<div style="font-size: 14px; color: orangered; padding: 4px 12px">
|
|
|
<p>小提示:</p>
|
|
|
- <p style="font-weight: bold">仅支持最近15天内尚未就诊的微信自助挂号。</p>
|
|
|
+ <p style="font-weight: bold">仅支持不超过预约日期且尚未就诊的微信自助挂号。</p>
|
|
|
</div>
|
|
|
</window-size>
|
|
|
</template>
|
|
@@ -29,7 +29,7 @@
|
|
|
<script>
|
|
|
import {onMounted, ref} from 'vue'
|
|
|
import {getMzyReqrecInfo, cancelReqrec} from '../../../../api/appointment.js'
|
|
|
-import {Toast} from 'vant'
|
|
|
+import {Dialog, Toast} from 'vant'
|
|
|
import {useRouter} from "vue-router";
|
|
|
import {getDateDiff} from "../../../../utils/date";
|
|
|
|
|
@@ -46,17 +46,22 @@ export default {
|
|
|
const disableRefundButton = ref(true)
|
|
|
|
|
|
const revokeMzyReq = () => {
|
|
|
- cancelReqrec(mzyReq.value).then(() => {
|
|
|
- Toast.success('退号成功。');
|
|
|
- router.go(-1)
|
|
|
- })
|
|
|
+ Dialog.confirm({
|
|
|
+ title: '温馨提示',
|
|
|
+ message: '是否确认退号退费?'
|
|
|
+ }).then(() => {
|
|
|
+ cancelReqrec(mzyReq.value).then(() => {
|
|
|
+ Toast.success('退号成功,您的资金已原路退回,请留意微信退款信息。');
|
|
|
+ router.go(-1)
|
|
|
+ })
|
|
|
+ }).catch(() => {})
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
const params = {patientId, times, filterUnpaidReq: false}
|
|
|
getMzyReqrecInfo(params).then(res => {
|
|
|
mzyReq.value = res
|
|
|
- disableRefundButton.value = (getDateDiff(res.requestDayStr) > 15 || null === res.paymode
|
|
|
+ disableRefundButton.value = (getDateDiff(res.requestDayStr) > 0 || null === res.paymode
|
|
|
|| res.visitedMark === '1' || res.cancelMark === '1');
|
|
|
if (res.visitedMark === '1') {
|
|
|
reqStatus.value = '挂号费(已就诊)'
|