详情接口和提交预约接口增加多选一字段

main
刘佳宇 1 year ago
parent 0ad5223b9b
commit c7a2ff6f4a

@ -276,6 +276,7 @@ const buyClick = async (item) => {
popupMultiple.value.open("center");
multipleIndex.value = 0;
itemIds.value = [];
$store.setDuoXuanYi([]);
itemId.value = "";
multipleList.value = item.duo_xuan_yi;
return;
@ -288,7 +289,10 @@ const nextItemClick = () => {
uni.$lu.toast("请选择项目");
return;
}
itemIds.value.push(itemId.value);
itemIds.value.push({
item_id: itemId.value,
zu_name: multipleList.value[multipleIndex.value]["0"]["zu_name"],
});
if (multipleIndex.value == multipleList.value.length - 1) {
toDetail();
return;
@ -304,9 +308,7 @@ const toDetail = () => {
// ID
query += "&groupId=" + $props.groupId;
}
if (itemIds.value.length) {
query += "&itemIds=" + itemIds.value.join(",");
}
$store.setDuoXuanYi(itemIds.value);
// ID
// /
popupMultiple.value.close();
@ -495,14 +497,14 @@ const toRouter = () => {
<view
v-for="(item, index) in multipleList[multipleIndex]['item_list']"
:key="index"
@click="itemId = item.item_id"
class="px-20rpx box-border b-b-1 b-#EAEAEA b-solid bs between h-100rpx"
>
<text class="text-#000000 text-30rpx">{{ item.item_name }}</text>
<view class="center">
<text class="text-#EC3D15 text-20rpx">¥</text>
<text class="text-#EC3D15 text-20rpx mt-10rpx mr-5rpx">¥</text>
<text class="text-#EC3D15 text-32rpx mb-0">{{ item.price }}</text>
<uni-icons
@click="itemId = item.item_id"
class="ml-28rpx"
color="#239EA3"
:type="itemId == item.item_id ? 'checkbox-filled' : 'circle'"

@ -119,6 +119,7 @@ const buy = () => {
group_id: groupId.value,
item_ids: selectIds.value,
hospital: $store.save_info.hospital,
duo_xuan_yi: $store.getDuoXuanYi(),
});
$store.setYytjInfo({});
uni.navigateTo({
@ -135,6 +136,7 @@ const getBuyInfo = async () => {
hospital: $store.save_info.hospital,
person_id: personId.value,
group_id: groupId.value,
duo_xuan_yi: $store.getDuoXuanYi(),
};
const response = await $api("BuyInfo", obj);
$response(response, () => {
@ -383,18 +385,32 @@ onShow(() => {
<view class="grow center">检查指标意义</view>
</view>
<view v-for="(val, index) in groupInfo?.items" :key="index">
<view v-if="val.keshi_name != '材料费'">
<view class="flex h-55rpx bg-#9f9f9f text-#fff text-24rpx rounded-10rpx mt-10rpx">
<view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff"></view>
<view class="grow center">{{ val.keshi_name }}{{ val.children.length }}</view>
</view>
<view class="flex bg-#efefef text-#000 text-24rpx rounded-10rpx mt-10rpx" v-for="(v, i) in val.children" :key="i">
<view class="min-w-155rpx break-all max-w-155rpx center b-0 b-r-4 b-solid b-#fff p-10rpx box-border text-center">
{{ v.name }}
<view v-if="val.keshi_name != '材料费'">
<view
class="flex h-55rpx bg-#9f9f9f text-#fff text-24rpx rounded-10rpx mt-10rpx"
>
<view
class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff"
></view>
<view class="grow center"
>{{ val.keshi_name }}{{ val.children.length }}</view
>
</view>
<view
class="flex bg-#efefef text-#000 text-24rpx rounded-10rpx mt-10rpx"
v-for="(v, i) in val.children"
:key="i"
>
<view
class="min-w-155rpx break-all max-w-155rpx center b-0 b-r-4 b-solid b-#fff p-10rpx box-border text-center"
>
{{ v.name }}
</view>
<view class="grow center p-10rpx box-border">{{
v.desc || "-"
}}</view>
</view>
<view class="grow center p-10rpx box-border">{{v.desc || "-" }}</view>
</view>
</view>
</view>
</view>

@ -190,6 +190,7 @@ const comfrimyy = async () => {
plan_id: plan_id,
plan_nmr_id: plan_nmr_id,
doctor: yytjInfo.value?.doctor_name || "",
duo_xuan_yi: $store.getDuoXuanYi(),
};
console.log(obj);

@ -10,6 +10,7 @@ export const useStore = defineStore('counter', {
config: false,
groupInfo: {}, // 团检信息
combo_compare: [], // 套餐对比
duo_xuan_yi: [], // 多选一
save: {
hospital: 1,
doctor: 1,
@ -27,9 +28,16 @@ export const useStore = defineStore('counter', {
this.combo_compare = comboContrast;
uni.setStorageSync('COMBO_CONTRAST', JSON.stringify(this.combo_compare));
},
getComboContrast(){
getComboContrast() {
return JSON.parse(uni.getStorageSync('COMBO_CONTRAST') || '[]') || this.combo_compare;
},
setDuoXuanYi(duoXuanYi) {
this.duo_xuan_yi = duoXuanYi;
uni.setStorageSync('DUO_XUAN_YI', JSON.stringify(duoXuanYi))
},
getDuoXuanYi() {
return JSON.parse(uni.getStorageSync('DUO_XUAN_YI') || '[]') || this.duo_xuan_yi;
},
setTjbgInfo(tjbgInfo) {
this.tjbgInfo = tjbgInfo;
uni.setStorageSync('TJBG_INFO', JSON.stringify(tjbgInfo));

Loading…
Cancel
Save