| | |
| | | </view> |
| | | </view> |
| | | <view class="index-j-list"> |
| | | <view class="index-list-item" v-for="(item, index) in orderList" :key="index"> |
| | | <view class="index-list-item" v-if="orderList" v-for="(item, index) in orderList" :key="index"> |
| | | <view class="index-list-item-head"> |
| | | <view class="index-list-item-head-l"> |
| | | <view class="xoam"></view> |
| | |
| | | |
| | | <view class="address" v-if="item.type === 1"> |
| | | <view class="address-xian"></view> |
| | | <view class="address-row" v-for="(address, i) in item.wayInfo" :key="i"> |
| | | <view class="address-row" v-if="item.wayInfo" v-for="(address, i) in item.wayInfo" :key="i"> |
| | | <image src="/static/icon/ic_qidian@2x.png" mode="widthFix" v-if="i === 0"></image> |
| | | <image src="/static/icon/ic_jingguo@2x.png" mode="widthFix" v-else-if="i !== 0 && i !== item.wayInfo.length - 1"></image> |
| | | <image src="/static/icon/ic_zhongdian@2x.png" mode="widthFix" v-else-if="i === item.wayInfo.length - 1"></image> |
| | |
| | | |
| | | <view class="index-c-cate"> |
| | | <view |
| | | v-if="type" |
| | | :class="typeId === item.id ? 'index-c-cate-item active' : 'index-c-cate-item'" |
| | | v-for="(item, index) in type" |
| | | :key="index" |
| | |
| | | <view class="list-item-row"> |
| | | <view class="list-item-row-label">用餐时间<b>*</b></view> |
| | | <view class="list-item-row-radio"> |
| | | <view class="radio-item" v-for="(item, index) in orderFood" :key="index"> |
| | | <view class="radio-item" v-if="orderFood" v-for="(item, index) in orderFood" :key="index"> |
| | | <view class="radio-item-label">{{item.name}}</view> |
| | | <view class="radio-item-list"> |
| | | <view class="radio-item-list-l"> |
| | | <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 v-if="item.list" :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 class="list-item-row" v-if="viewStatus"> |
| | | <view class="list-item-row-label">图片</view> |
| | | <view class="list-item-row-upload"> |
| | | <view class="upload-item" v-for="(item, index) in form.multifileList" :key="index"> |
| | | <view class="upload-item" v-if=" form.multifileList" v-for="(item, index) in form.multifileList" :key="index"> |
| | | <image :src="item.url" mode="widthFix"></image> |
| | | <image class="upload-item-dele" @click="form.multifileList.splice(index, 1)" src="/static/icon/ic_delete1@2x.png" mode="widthFix"></image> |
| | | </view> |
| | |
| | | <!-- 用工 --> |
| | | <template v-if="typeId === 0"> |
| | | <view class="box-hz-cate"> |
| | | <view :class="form.workType === item.id ? 'box-hz-cate-item active' : 'box-hz-cate-item'" v-for="(item, index) in typeWork" :key="index" @click="clickTypeWork(item.id)"> |
| | | <view v-if="typeWork" :class="form.workType === item.id ? 'box-hz-cate-item active' : 'box-hz-cate-item'" v-for="(item, index) in typeWork" :key="index" @click="clickTypeWork(item.id)"> |
| | | <text>{{item.name}}</text> |
| | | <view class="box-hz-cate-item-x" v-if="form.workType === item.id"></view> |
| | | </view> |
| | |
| | | |
| | | <!-- 运货 --> |
| | | <template v-if="typeId === 1"> |
| | | <view class="box-hz-cate"> |
| | | <view :class="form.categoryId === item.id ? 'box-hz-cate-item active' : 'box-hz-cate-item'" v-for="(item, index) in car" :key="index" @click="clickCar(item)"> |
| | | <scroll-view class="nav-scroll" scroll-x="true"> |
| | | <view v-if="car" :class="form.categoryId === item.id ? 'nav-item active' : 'nav-item'" v-for="(item, index) in car" :key="index" @click="clickCar(item)"> |
| | | <text>{{item.name}}</text> |
| | | <view class="box-hz-cate-item-x" v-if="form.categoryId === item.id"></view> |
| | | <view class="nav-item-x" v-if="form.categoryId === item.id"></view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | |
| | | <view class="box-hz-car"> |
| | | <view class="box-hz-car-image"> |
| | | <image :src="carImage" mode="widthFix"></image> |
| | |
| | | <u-icon name="arrow-right" color="#111111" size="16"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="item-d-row" v-for="(item, index) in form.wayInfoDTOList" :key="index" @click="selectAddress(4, index)"> |
| | | <view class="item-d-row" v-if="form.wayInfoDTOList" v-for="(item, index) in form.wayInfoDTOList" :key="index" @click="selectAddress(4, index)"> |
| | | <view class="item-d-row-icon"> |
| | | <image src="/static/icon/ic_jingguo@2x.png" mode="widthFix"></image> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <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()" v-if="typeId == 2">立即下单</view> |
| | | <view class="box-hz-btn-next" @click="jump()" v-if="typeId !== 2">下一步</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <view></view> |
| | | <text>客服电话</text> |
| | | </view> |
| | | <view class="phone-item" v-for="(item,index) in serverPhone" :key="item" @click="contactPhoneDo(item)"> |
| | | <view class="phone-item" v-if="serverPhone" v-for="(item,index) in serverPhone" :key="item" @click="contactPhoneDo(item)"> |
| | | <view></view> |
| | | <text>{{item}}</text> |
| | | </view> |
| | |
| | | }, |
| | | 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.isLogin = true |
| | |
| | | watch: { |
| | | typeId: { |
| | | handler(news, old) { |
| | | console.log('typeId') |
| | | 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() |
| | | this.clearFormParam() |
| | | } |
| | | }, |
| | | orderFood: { |
| | |
| | | price += num * item.num |
| | | } |
| | | }) |
| | | console.log("========================",price) |
| | | this.form.price = price |
| | | } |
| | | }, |
| | | 'form.price': { |
| | | handler(news, old) { |
| | | if (news > 0) { |
| | | console.log(news,"==========",old) |
| | | if (news != old) { |
| | | this.getPrice() |
| | | } |
| | | } |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | clearFormParam(){ |
| | | 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() |
| | | }, |
| | | clear(index) { |
| | | this.orderFood[index].num = '' |
| | | this.orderFood[index].list.forEach(item => { |
| | | item.active = false |
| | | }) |
| | | }) |
| | | }, |
| | | clearAll() { |
| | | this.orderFood.forEach(p=>{ |
| | |
| | | var that = this; |
| | | this.show1 = false |
| | | uni.requestSubscribeMessage({ |
| | | tmplIds: ['tDpYImlrdv-0d3euTrHbYZ1cEZvjVHTNlqHvV0tpLHg'], |
| | | tmplIds: ['AA97cHjvlPiNO4viMkVe4JifCf9TD5b5Eb7s6El3VS8','3YSC7gouRlSjHXz4CrWOGFzPmGwEBtFj4snwdfMvKHk','tDpYImlrdv-0d3euTrHbYZ1cEZvjVHTNlqHvV0tpLHg'], |
| | | success(res) { |
| | | that.getaccept() |
| | | }, |
| | |
| | | valid =false |
| | | } |
| | | cateringDTOList.push({ |
| | | id:item.id, |
| | | name: item.name, |
| | | num: item.num, |
| | | price: child.price * 100 |
| | |
| | | return uni.showToast({ title: '请输入联系电话', icon: 'none' }) |
| | | } |
| | | uni.requestSubscribeMessage({ |
| | | tmplIds: ['oVjOBLcHxIlGzOMJsdInmgI5CHGXh-UTvMzQqfFOnIg'], |
| | | tmplIds: ['oVjOBLcHxIlGzOMJsdInmgI5CHGXh-UTvMzQqfFOnIg','AA97cHjvlPiNO4viMkVe4JifCf9TD5b5Eb7s6El3VS8'], |
| | | success(res) { |
| | | that.$u.api.release({ |
| | | ...that.form, |
| | |
| | | cateringDTOList |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | that.clearFormParam(); |
| | | wx.requestPayment({ |
| | | timeStamp: res.data.object.timeStamp, |
| | | nonceStr: res.data.object.nonceStr, |
| | |
| | | that.form.estimatedAccount = res.data |
| | | } |
| | | }) |
| | | }else{ |
| | | that.form.estimatedAccount = 0 |
| | | } |
| | | }, |
| | | addAddr() { |
| | |
| | | margin-top: 30rpx; |
| | | } |
| | | } |
| | | .nav-scroll { |
| | | white-space: nowrap; /* 防止导航项换行 */ |
| | | margin-bottom: 50rpx; |
| | | height: 66rpx; |
| | | overflow: auto; /* 允许滚动条出现 */ |
| | | .nav-item { |
| | | display: inline-block; /* 使导航项水平排列 */ |
| | | margin-right: 60rpx; |
| | | position: relative; |
| | | text { |
| | | font-weight: 400; |
| | | font-size: 30rpx; |
| | | color: #666666; |
| | | } |
| | | .nav-item-x { |
| | | width: 40rpx; |
| | | height: 6rpx; |
| | | position: absolute; |
| | | bottom: -10rpx; |
| | | left: 50%; |
| | | transform: translate(-50%, 0); |
| | | background: #FF5A40; |
| | | border-radius: 3rpx; |
| | | } |
| | | // padding: 10px 20px; /* 设置内边距 */ |
| | | // margin-right: 10px; /* 设置右边距 */ |
| | | // background-color: #f0f0f0; /* 设置背景色 */ |
| | | // border: 1px solid #ddd; /* 设置边框 */ |
| | | // border-radius: 5px; /* 设置圆角 */ |
| | | } |
| | | .active { |
| | | text { |
| | | font-weight: 600 !important; |
| | | font-size: 32rpx !important; |
| | | color: #222222 !important; |
| | | } |
| | | } |
| | | } |
| | | .box-hz-cate { |
| | | width: 100%; |
| | | display: flex; |