| | |
| | | <view class="radio-item-label">{{item.name}}</view> |
| | | <view class="radio-item-list"> |
| | | <view class="radio-item-list-l"> |
| | | <view :class="child.active ? 'radio-item-list-item active' : 'radio-item-list-item'" v-for="(child, childIndex) in item.list" :key="childIndex" @click="selectMenu(index, childIndex)">{{child.price}}元</view> |
| | | <view v-if="child.price" :class="child.active ? 'radio-item-list-item active' : 'radio-item-list-item'" v-for="(child, childIndex) in item.list" :key="childIndex" @click="selectMenu(index, childIndex)">{{child.price||0}}元</view> |
| | | </view> |
| | | <view class="radio-item-list-data"> |
| | | <text style="flex-shrink: 0;">份数:</text> |
| | |
| | | </view> |
| | | <view class="box-hz-btn" :style="{ backgroundImage: 'url(' + btn + ')' }"> |
| | | <view class="box-hz-btn-kf" @click="contactPhone()">客服</view> |
| | | <view class="box-hz-btn-next" @click="submit">下一步</view> |
| | | <view class="box-hz-btn-next" @click="submit">立即下单</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | <view :class="form.startDate ? 'box-hz-list-item-val active' : 'box-hz-list-item-val'"> |
| | | <view class="box-hz-list-item-val-left"> |
| | | <image class="icon" src="/static/icon/ic_time@2x.png" mode="widthFix"></image> |
| | | <text>{{ form.startDate ? form.startDate + ' 至 ' + form.endDate : '请选择用工时间'}}</text> |
| | | <text>{{ form.startDate ? form.startDate + ' 至 ' + form.endDate : '请选择用车时间'}}</text> |
| | | </view> |
| | | <u-icon name="arrow-right" color="#111111" size="16"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="box-hz-list-item"> |
| | | <view class="box-hz-list-item-label"> |
| | | <text>用车时间:</text> |
| | | <text>用车地点:</text> |
| | | <text @click="addAddr">+增加途经点</text> |
| | | </view> |
| | | <view class="item-d"> |
| | |
| | | |
| | | <view class="box-hz-btn" :style="{ backgroundImage: 'url(' + btn + ')' }"> |
| | | <view class="box-hz-btn-kf" @click="contactPhone()" >客服</view> |
| | | <view class="box-hz-btn-next" @click="jump()">下一步</view> |
| | | <view class="box-hz-btn-next" @click="jump()">立即下单</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | this.form.estimatedAccount = '' |
| | | this.form.price = '' |
| | | this.form.address = '' |
| | | this.clearAll() |
| | | }) |
| | | // 刷新首页数据 |
| | | uni.$on('refresh', () => { |
| | |
| | | async onShow(options) { |
| | | await this.$onLaunched; |
| | | console.log('2') |
| | | this.form.startDate = '' |
| | | this.form.address = '' |
| | | this.form.endDate = '' |
| | | this.form.latitude = '' |
| | | this.form.longitude = '' |
| | | this.form.location = '' |
| | | this.form.locationEnd = '' |
| | | this.form.wayInfoDTOList = [] |
| | | this.form.workType = 0 |
| | | this.form.days = '' |
| | | this.form.locationRemark = '' |
| | | this.form.supplement = '' |
| | | this.form.multifileList = [] |
| | | this.form.estimatedAccount = '' |
| | | this.form.price = '' |
| | | this.viewStatus = false |
| | | this.clearAll() |
| | | |
| | | if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') { |
| | | console.log('已登陆') |
| | |
| | | this.form.estimatedAccount = '' |
| | | this.form.price = '' |
| | | this.viewStatus = false |
| | | this.clearAll() |
| | | } |
| | | }, |
| | | orderFood: { |
| | |
| | | this.orderFood[index].num = '' |
| | | this.orderFood[index].list.forEach(item => { |
| | | item.active = false |
| | | }) |
| | | }, |
| | | clearAll() { |
| | | this.orderFood.forEach(p=>{ |
| | | p.num=null |
| | | p.list.forEach(item => { |
| | | item.active = false |
| | | }) |
| | | }) |
| | | }, |
| | | getDictInfo(){ |
| | |
| | | if (!this.form.startDate) { |
| | | return uni.showToast({ title: '请选择用餐时间', icon: 'none' }) |
| | | } |
| | | if (this.form.price === 0) { |
| | | return uni.showToast({ title: '请选择用餐时间', icon: 'none' }) |
| | | let cateringDTOList = [] |
| | | let valid = true |
| | | let msg ='请选择' |
| | | that.orderFood.forEach(item => { |
| | | item.list.forEach(child => { |
| | | if (child.active) { |
| | | // (Number(child.price) * Number(item.num)) |
| | | if( !item.num){ |
| | | msg =msg +'【'+item.name+'】'; |
| | | valid =false |
| | | } |
| | | cateringDTOList.push({ |
| | | name: item.name, |
| | | num: item.num, |
| | | price: child.price * 100 |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | if(!valid){ |
| | | return uni.showToast({ title: msg+'用餐份数', icon: 'none' }) |
| | | } |
| | | if (cateringDTOList.length === 0) { |
| | | return uni.showToast({ title: '请选择用餐标准', icon: 'none' }) |
| | | } |
| | | if (!this.form.address) { |
| | | return uni.showToast({ title: '请选择用餐地点', icon: 'none' }) |
| | |
| | | uni.requestSubscribeMessage({ |
| | | tmplIds: ['oVjOBLcHxIlGzOMJsdInmgI5CHGXh-UTvMzQqfFOnIg'], |
| | | success(res) { |
| | | let cateringDTOList = [] |
| | | that.orderFood.forEach(item => { |
| | | item.list.forEach(child => { |
| | | if (child.active) { |
| | | // (Number(child.price) * Number(item.num)) |
| | | cateringDTOList.push({ |
| | | name: item.name, |
| | | num: item.num, |
| | | price: child.price * 100 |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | that.$u.api.release({ |
| | | ...that.form, |
| | | type: 2, |
| | |
| | | selectAddress(type, index) { |
| | | uni.chooseLocation({ |
| | | success: (res) => { |
| | | console.log("==================",res) |
| | | if ([1,2].includes(type)) { |
| | | this.form.latitude = res.latitude |
| | | this.form.longitude = res.longitude |
| | | this.form.address = res.address |
| | | this.form.address = res.name ||res.address |
| | | } else if (type === 3) { |
| | | this.form.locationEnd = res.address |
| | | this.form.locationEnd = res.name ||res.address |
| | | this.form.latEnd = res.latitude |
| | | this.form.lgtEnd = res.longitude |
| | | } else if (type === 4) { |
| | | this.form.wayInfoDTOList[0].lat = res.latitude |
| | | this.form.wayInfoDTOList[0].lgt = res.longitude |
| | | this.form.wayInfoDTOList[0].location = res.address |
| | | this.form.wayInfoDTOList[index].lat = res.latitude |
| | | this.form.wayInfoDTOList[index].lgt = res.longitude |
| | | this.form.wayInfoDTOList[index].location = res.name|| res.address |
| | | }else if (type == -1) { |
| | | console.log(res) |
| | | this.location.latitude = res.latitude |