|
@@ -17,12 +17,12 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="r-team-tips" v-if="peopleNum && selectTabs == 1">该团队赛需{{ peopleNum }}位一组报名参赛</view>
|
|
|
- <view class="r-shoping">
|
|
|
+ <view class="r-shoping" v-if="selectEvents != null && selectTabs == 0">
|
|
|
<view class="shoping-title">购买数量</view>
|
|
|
<view class="shoping-num">
|
|
|
<view class="num-btn" @click="reduceNum">-</view>
|
|
|
<view class="num-input">
|
|
|
- <input type="number">
|
|
|
+ <input v-model="countTotal" disabled type="number" />
|
|
|
</view>
|
|
|
<view class="num-btn" @click="addNum">+</view>
|
|
|
</view>
|
|
@@ -55,7 +55,7 @@
|
|
|
<view class="g-teamName">
|
|
|
<view class="team-name"><text style="color: #FB5B5B ;">*</text> 队名</view>
|
|
|
<view class="name-input">
|
|
|
- <input type="text" placeholder="请输入队名(20字以内)" class="team-name-input" />
|
|
|
+ <input type="text" v-model="teamNameInfo" placeholder="请输入队名(20字以内)" class="team-name-input" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="g-teamBadge">
|
|
@@ -91,7 +91,7 @@
|
|
|
<view class="r-insurance-price">
|
|
|
<view class="r-price">¥{{ insurePrice }}/天·人</view>
|
|
|
<view class="r-insurance-btn" v-if="insureData.length < 1"
|
|
|
- @click="gotoInsuracePage(item.priceDataList)">去投保
|
|
|
+ @click="gotoInsuracePage(item, item.priceDataList)">去投保
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -101,17 +101,21 @@
|
|
|
<view class="r-insurance-adduser" v-for="(insureUser, index) in insureData" :key="index">
|
|
|
<view class="r-adduser-btn">
|
|
|
<view class="r-celar" @click="clearUser">清除</view>
|
|
|
- <view class="r-edit" @click="RouterUtils.to_page(`/pages/index/insure/index?priceDataList=${JSON.stringify(item.priceDataList)}`)">修改</view>
|
|
|
+ <view class="r-edit"
|
|
|
+ @click="RouterUtils.to_page(`/pages/index/insure/index?priceDataList=${JSON.stringify(item.priceDataList)}`)">
|
|
|
+ 修改</view>
|
|
|
</view>
|
|
|
<view class="r-userinfo-list">
|
|
|
<view class="r-userinfo-item">
|
|
|
<view class="r-item-title">被保人</view>
|
|
|
- <view class="r-item-info">{{ insureUser.userData.length }}人(<text v-for="user in insureUser.userData"
|
|
|
- :key="user.id">{{ user.fullName }},</text>)</view>
|
|
|
+ <view class="r-item-info">{{ insureUser.userData.length }}人(<text
|
|
|
+ v-for="user in insureUser.userData" :key="user.id">{{ user.fullName }},</text>)
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="r-userinfo-item">
|
|
|
<view class="r-item-title">生效时间</view>
|
|
|
- <view class="r-item-info">{{ insureUser.slectObj.day }}天({{ insureUser.startDate }}-{{ insureUser.endDate }})
|
|
|
+ <view class="r-item-info">{{ insureUser.slectObj.day }}天({{ insureUser.startDate }}-{{
|
|
|
+ insureUser.endDate }})
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="r-userinfo-item">
|
|
@@ -137,33 +141,10 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<uni-popup ref="insurePopup" type="center">
|
|
|
- <view class="r-center-popup">
|
|
|
- <view class="r-popup-title">无保险免责声明</view>
|
|
|
+ <view class="r-center-popup" v-if="agreementContent">
|
|
|
+ <view class="r-popup-title">{{ agreementContent.protocolName }}</view>
|
|
|
<view class="r-popup-content">
|
|
|
- 一、本声明的目的是为了使用体育场地的人员明确
|
|
|
- 知晓体育活动所存在的风险,凡签署本声明的人员,
|
|
|
- 均视为已经仔细阅读和完全理解并同意接受本声明
|
|
|
- 的全部条款。对于违反国家相关法规、恶意侵犯他
|
|
|
- 人或其他涉及犯罪行为的事件,均不在本声明范国
|
|
|
- 内跟覆篮戏娇须由个人承担相应的法律责任。
|
|
|
- 一、本声明的目的是为了使用体育场地的人员明确
|
|
|
- 知晓体育活动所存在的风险,凡签署本声明的人员,
|
|
|
- 均视为已经仔细阅读和完全理解并同意接受本声明
|
|
|
- 的全部条款。对于违反国家相关法规、恶意侵犯他
|
|
|
- 人或其他涉及犯罪行为的事件,均不在本声明范国
|
|
|
- 内跟覆篮戏娇须由个人承担相应的法律责任。
|
|
|
- 一、本声明的目的是为了使用体育场地的人员明确
|
|
|
- 知晓体育活动所存在的风险,凡签署本声明的人员,
|
|
|
- 均视为已经仔细阅读和完全理解并同意接受本声明
|
|
|
- 的全部条款。对于违反国家相关法规、恶意侵犯他
|
|
|
- 人或其他涉及犯罪行为的事件,均不在本声明范国
|
|
|
- 内跟覆篮戏娇须由个人承担相应的法律责任。
|
|
|
- 一、本声明的目的是为了使用体育场地的人员明确
|
|
|
- 知晓体育活动所存在的风险,凡签署本声明的人员,
|
|
|
- 均视为已经仔细阅读和完全理解并同意接受本声明
|
|
|
- 的全部条款。对于违反国家相关法规、恶意侵犯他
|
|
|
- 人或其他涉及犯罪行为的事件,均不在本声明范国
|
|
|
- 内跟覆篮戏娇须由个人承担相应的法律责任。
|
|
|
+ <rich-text :nodes="agreementContent.protocolContent"></rich-text>
|
|
|
</view>
|
|
|
<view class="r-popup-footer">
|
|
|
<view class="r-popup-needbtn" @click="toNeed">我需要购买保险</view>
|
|
@@ -185,8 +166,11 @@ import { onLoad } from '@dcloudio/uni-app';
|
|
|
import zsTabs from "@/components/zzx-tabs/zzx-tabs.vue";
|
|
|
const insurePopup = ref()
|
|
|
const select_insurance = ref(false)
|
|
|
+const teamNameInfo=ref('')
|
|
|
onLoad((options) => {
|
|
|
eventId.value = options.id;
|
|
|
+ orderFormData.value.orderType = 3
|
|
|
+ orderFormData.value.amount = 1
|
|
|
})
|
|
|
onMounted(() => {
|
|
|
get_userData()
|
|
@@ -197,23 +181,44 @@ onMounted(() => {
|
|
|
const selectEvents = ref()
|
|
|
const peopleNum = ref()
|
|
|
const toggleSelect = (item: any, index: number) => {
|
|
|
+ orderFormData.value.productIds = item.id
|
|
|
peopleNum.value = item.peopleNum
|
|
|
selectEvents.value = index;
|
|
|
};
|
|
|
const to_play = () => {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/index/eventsOrder/index'
|
|
|
- })
|
|
|
+ submitOrder()
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/index/eventsOrder/index'
|
|
|
+ // })
|
|
|
}
|
|
|
|
|
|
const toUserList = () => {
|
|
|
RouterUtils.to_page('/pages/index/userList/index')
|
|
|
}
|
|
|
|
|
|
+const countTotal = ref(1)
|
|
|
+const reduceNum = () => {
|
|
|
+ if (countTotal.value > 1) {
|
|
|
+ countTotal.value--
|
|
|
+ orderFormData.value.amount = countTotal.value
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const addNum = () => {
|
|
|
+ countTotal.value++
|
|
|
+ orderFormData.value.amount = countTotal.value || 1
|
|
|
+}
|
|
|
+
|
|
|
const userData = ref()
|
|
|
const get_userData = () => {
|
|
|
uni.$on('userData', function (data) {
|
|
|
userData.value = data
|
|
|
+ if (data.length > 0) {
|
|
|
+ let familyIds = data.map(item => item.id)
|
|
|
+ orderFormData.value.familyIds = familyIds.join(',')
|
|
|
+ } else {
|
|
|
+ orderFormData.value.familyIds = []
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -227,6 +232,13 @@ const deleteUser = async (e) => {
|
|
|
const selectTabs = ref(0);
|
|
|
const changeTab = (e: any) => {
|
|
|
selectTabs.value = e;
|
|
|
+ selectEvents.value = null
|
|
|
+ peopleNum.value = null
|
|
|
+ if (e == 0) {
|
|
|
+ orderFormData.value.orderType = 3 // 个人赛
|
|
|
+ } else {
|
|
|
+ orderFormData.value.orderType = 4 // 团队赛
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
const eventId = ref()
|
|
@@ -254,9 +266,18 @@ const get_eventsInfoDetail = () => {
|
|
|
}
|
|
|
|
|
|
const priceDataListData = ref([])
|
|
|
-const gotoInsuracePage = (e: any) => {
|
|
|
- priceDataListData.value = e
|
|
|
- insurePopup.value.open()
|
|
|
+const gotoInsuracePage = (e1: any, e2: any) => {
|
|
|
+ getFindByType(e1.insuranceName)
|
|
|
+ priceDataListData.value = e2
|
|
|
+ orderFormData.value.insureOrderInfoForm.insureId = e1.id
|
|
|
+}
|
|
|
+
|
|
|
+const agreementContent = ref()
|
|
|
+const getFindByType = (insuranceName: any) => {
|
|
|
+ http.get('/my/feedback/findByType', { data: { insuranceName: insuranceName, protocolType: 0 }, loading: true }).then((res: any) => {
|
|
|
+ agreementContent.value = res.result
|
|
|
+ insurePopup.value.open()
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const toNeed = () => {
|
|
@@ -276,17 +297,56 @@ const insureData = ref([])
|
|
|
const getInsureData = () => {
|
|
|
uni.$on('insureData', function (data) {
|
|
|
insureData.value = data
|
|
|
- console.log(insureData.value, '投保信息');
|
|
|
-
|
|
|
+ console.log(insureData.value, '投保人信息');
|
|
|
+ orderFormData.value.insureOrderInfoForm.assertStartTime = insureData.value[0].startDate
|
|
|
+ orderFormData.value.insureOrderInfoForm.assertEndTime = insureData.value[0].endDate
|
|
|
+ orderFormData.value.insureOrderInfoForm.insurePriceId = insureData.value[0].slectObj.id
|
|
|
+ if (data.length > 0) {
|
|
|
+ let familyMembersIds = data[0].userData.map(item => item.id)
|
|
|
+ orderFormData.value.insureOrderInfoForm.familyMembersIds = familyMembersIds.join(',')
|
|
|
+ } else {
|
|
|
+ orderFormData.value.insureOrderInfoForm.familyMembersIds = []
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
|
|
|
const clearUser = async () => {
|
|
|
- let res:any = await TipsUtils.tips_alert('确定清除投保人信息吗?', true)
|
|
|
+ let res: any = await TipsUtils.tips_alert('确定清除投保人信息吗?', true)
|
|
|
if (res.confirm) {
|
|
|
insureData.value = []
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+let orderFormData = ref({
|
|
|
+ type: 1,
|
|
|
+ productIds: null,
|
|
|
+ orderType: null,
|
|
|
+ amount: null,
|
|
|
+ familyIds: null,
|
|
|
+ insureOrderInfoForm: {
|
|
|
+ insureId: null,
|
|
|
+ assertStartTime: null,
|
|
|
+ assertEndTime: null,
|
|
|
+ insurePriceId: null,
|
|
|
+ familyMembersIds: null,
|
|
|
+ },
|
|
|
+ // gameCertificationForm:{
|
|
|
+ // teamName:'',
|
|
|
+ // teamEmblemImg: '',
|
|
|
+ // certificationDTOS:[{
|
|
|
+ // name: '',
|
|
|
+ // certificationImg: '',
|
|
|
+ // }]
|
|
|
+ // }
|
|
|
+})
|
|
|
+const submitOrder = () => {
|
|
|
+ // orderFormData.value.gameCertificationForm.teamName=teamNameInfo.value
|
|
|
+ if (!peopleNum.value) return TipsUtils.tips_toast('请选择项目')
|
|
|
+ if (!userData.value) return TipsUtils.tips_toast('请添加用户信息')
|
|
|
+ http.post('/order/createOrder', orderFormData.value, { loading: true }).then((res) => {
|
|
|
+
|
|
|
+ })
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
@@ -366,6 +426,7 @@ const clearUser = async () => {
|
|
|
|
|
|
.num-input {
|
|
|
width: 80rpx;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -720,7 +781,7 @@ const clearUser = async () => {
|
|
|
|
|
|
.r-center-popup {
|
|
|
width: 646rpx;
|
|
|
- height: 1220rpx;
|
|
|
+ max-height: 1220rpx;
|
|
|
background: #F6F6F6;
|
|
|
border-radius: 32rpx;
|
|
|
padding: 20rpx;
|
|
@@ -736,7 +797,7 @@ const clearUser = async () => {
|
|
|
margin-top: 28rpx;
|
|
|
font-size: 28rpx;
|
|
|
color: #222222;
|
|
|
- height: 800rpx;
|
|
|
+ max-height: 800rpx;
|
|
|
overflow: auto;
|
|
|
}
|
|
|
|