Update info.vue
This commit is contained in:
parent
3df8b8bbdb
commit
0f22b31029
@ -102,7 +102,18 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
<view>
|
||||||
|
<view class="protocol" :class="{ 'protocol--elder': elderMode }" @click="agree = !agree">
|
||||||
|
<uni-icons v-if="agree" type="checkbox-filled" :size="elderMode ? 32 : 24" :color="themeColor"></uni-icons>
|
||||||
|
<uni-icons v-else type="circle" :size="elderMode ? 32 : 24" color="#999"></uni-icons>
|
||||||
|
<view class="protocol_text" :class="{ 'protocol_text--elder': elderMode }">
|
||||||
|
我已阅读并同意<text class="active" :class="{ 'active--elder': elderMode }"
|
||||||
|
@click.stop="viewTxt('protocol', '用户服务协议')">《用户服务协议》</text>和<text class="active"
|
||||||
|
:class="{ 'active--elder': elderMode }" @click.stop="viewTxt('agreement', '知情同意书')">《知情同意书》</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<footer-button text="提交问诊单" @onClick="submit" />
|
<footer-button text="提交问诊单" @onClick="submit" />
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</full-page>
|
</full-page>
|
||||||
<edit-popup :drug="editDrug" :visible="showEditPopup" :elderMode="elderMode" @close="showEditPopup = false"
|
<edit-popup :drug="editDrug" :visible="showEditPopup" :elderMode="elderMode" @close="showEditPopup = false"
|
||||||
@ -165,6 +176,8 @@ const { storeId } = useUser();
|
|||||||
const waiting = ref(false);
|
const waiting = ref(false);
|
||||||
const orderId = ref("");
|
const orderId = ref("");
|
||||||
const orderDoctor = ref({});
|
const orderDoctor = ref({});
|
||||||
|
const agree = ref(false);
|
||||||
|
|
||||||
// 自定义确认弹窗状态
|
// 自定义确认弹窗状态
|
||||||
const customConfirmVisible = ref(false);
|
const customConfirmVisible = ref(false);
|
||||||
const customConfirmData = ref({
|
const customConfirmData = ref({
|
||||||
@ -337,6 +350,7 @@ async function getList(barcode) {
|
|||||||
|
|
||||||
async function submit(ignoreUnsuit = false, ignoreRepeat = false) {
|
async function submit(ignoreUnsuit = false, ignoreRepeat = false) {
|
||||||
if (waiting.value) return;
|
if (waiting.value) return;
|
||||||
|
|
||||||
const hasDisease = Array.isArray(order.value.diseases)
|
const hasDisease = Array.isArray(order.value.diseases)
|
||||||
&& order.value.diseases.some(disease => typeof disease === 'string' && disease.trim());
|
&& order.value.diseases.some(disease => typeof disease === 'string' && disease.trim());
|
||||||
if (!hasDisease) {
|
if (!hasDisease) {
|
||||||
@ -355,6 +369,10 @@ async function submit(ignoreUnsuit = false, ignoreRepeat = false) {
|
|||||||
showRepeatDrugPopup.value = true;
|
showRepeatDrugPopup.value = true;
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (!agree.value) {
|
||||||
|
toast("请阅读并同意《用户服务协议》和《知情同意书》");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (order.value.consultType === 'onlineMedicinePurchase') {
|
if (order.value.consultType === 'onlineMedicinePurchase') {
|
||||||
await checkStock()
|
await checkStock()
|
||||||
}
|
}
|
||||||
@ -479,7 +497,11 @@ function changeDrugs(drugs) {
|
|||||||
order.value.drugs = drugs;
|
order.value.drugs = drugs;
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
}
|
}
|
||||||
|
function viewTxt(type, title) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/consult/agreement?type=${type}&title=${title}`,
|
||||||
|
});
|
||||||
|
}
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
attachMedicineConfig()
|
attachMedicineConfig()
|
||||||
uni.$on('on-disease-selected', onDiseaseSelected)
|
uni.$on('on-disease-selected', onDiseaseSelected)
|
||||||
@ -818,4 +840,22 @@ onMounted(() => {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.protocol {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 30rpx 30rpx 0;
|
||||||
|
background: white;
|
||||||
|
line-height: 40rpx;
|
||||||
|
color: #666;
|
||||||
|
|
||||||
|
.active {
|
||||||
|
color: $theme-brown-primary;
|
||||||
|
}
|
||||||
|
|
||||||
|
.protocol_text {
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user