Update info.vue
This commit is contained in:
parent
3df8b8bbdb
commit
0f22b31029
@ -102,7 +102,18 @@
|
||||
</view>
|
||||
</view>
|
||||
<template #footer>
|
||||
<footer-button text="提交问诊单" @onClick="submit" />
|
||||
<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" />
|
||||
</view>
|
||||
</template>
|
||||
</full-page>
|
||||
<edit-popup :drug="editDrug" :visible="showEditPopup" :elderMode="elderMode" @close="showEditPopup = false"
|
||||
@ -165,6 +176,8 @@ const { storeId } = useUser();
|
||||
const waiting = ref(false);
|
||||
const orderId = ref("");
|
||||
const orderDoctor = ref({});
|
||||
const agree = ref(false);
|
||||
|
||||
// 自定义确认弹窗状态
|
||||
const customConfirmVisible = ref(false);
|
||||
const customConfirmData = ref({
|
||||
@ -337,6 +350,7 @@ async function getList(barcode) {
|
||||
|
||||
async function submit(ignoreUnsuit = false, ignoreRepeat = false) {
|
||||
if (waiting.value) return;
|
||||
|
||||
const hasDisease = Array.isArray(order.value.diseases)
|
||||
&& order.value.diseases.some(disease => typeof disease === 'string' && disease.trim());
|
||||
if (!hasDisease) {
|
||||
@ -355,6 +369,10 @@ async function submit(ignoreUnsuit = false, ignoreRepeat = false) {
|
||||
showRepeatDrugPopup.value = true;
|
||||
return
|
||||
}
|
||||
if (!agree.value) {
|
||||
toast("请阅读并同意《用户服务协议》和《知情同意书》");
|
||||
return;
|
||||
}
|
||||
if (order.value.consultType === 'onlineMedicinePurchase') {
|
||||
await checkStock()
|
||||
}
|
||||
@ -479,7 +497,11 @@ function changeDrugs(drugs) {
|
||||
order.value.drugs = drugs;
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
function viewTxt(type, title) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/consult/agreement?type=${type}&title=${title}`,
|
||||
});
|
||||
}
|
||||
onLoad(() => {
|
||||
attachMedicineConfig()
|
||||
uni.$on('on-disease-selected', onDiseaseSelected)
|
||||
@ -818,4 +840,22 @@ onMounted(() => {
|
||||
white-space: nowrap;
|
||||
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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user