123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- <template>
- <view>
- <van-radio-group >
- <van-cell-group
- v-for="(item, index) in list"
- :key="index"
- >
- <van-cell
- :border="false"
- :title="item.title"
- @click="onChange(index)"
- >
- <template slot="right-icon">
- <van-radio-group style="width: 20upx;" :value="radio" >
- <van-radio checked-color="#D9332E" :name="index" >
- </van-radio>
- </van-radio-group>
- </template>
- </van-cell>
- </van-cell-group>
- </van-radio-group>
-
- <view v-if="radio === 0"
- style="border-top: 15upx solid #F5F5F5;
- border-bottom: 15upx solid #F5F5F5;
- "
- >
- <van-field
- :value="username"
- label="酒店"
- placeholder="请输入酒店"
- />
-
- <van-field
- :value="username"
- label="房间号"
- placeholder="请输入房间号"
- />
- <van-field
- :value="username"
- label="收货人"
- placeholder="请输入收货人"
- />
- <van-field
- :value="username"
- label="手机号"
- placeholder="请输入手机号"
- />
-
- </view>
-
- <view v-if="radio === 2"
- style="border-top: 15upx solid #F5F5F5;
- border-bottom: 15upx solid #F5F5F5;
- "
- >
- <van-field
- :value="username"
- label="预定酒店"
- placeholder="请输入预定酒店"
- />
-
- <van-field
- :value="username"
- label="入住人"
- placeholder="请输入入住人"
- />
- <van-field
- :value="username"
- label="手机号"
- placeholder="请输入手机号"
- />
- <van-field
- :value="username"
- label="备注"
- placeholder="请输入备注"
- />
- </view>
- <van-cell v-if="radio === 1&&choseadress == '' " @click="goAdress" class="LinkAdress" title="选择地址" is-link/>
- <view v-if="radio === 1&&choseadress != ''" class="wrapper">
- <view class="u-box" @click="goAdress" >
- <text class="name" style="padding-right: 20upx;">{{choseadress.address_realname}}</text>
- <text class="mobile">{{choseadress.address_mob_phone}}</text>
- </view>
- <view class="u-box">
- <text class="address">{{choseadress.area_info}} {{choseadress.address_detail}}</text>
- </view>
- </view>
-
- <view @tap="goDetail()" class="cart-list">
- <view class="topTip">
- <view style="display: flex;align-items: center;border-bottom: 1px solid #F5F5F5;">
- <image :src="pictureUrl+'/uploads/home/store/'+store.store_id+'/'+store.store_logo" style="border-radius: 50%;
- width: 50upx;height: 50upx;"></image>
- <span style="padding-left: 8upx;">{{store.store_name}}</span>
- </view>
- </view>
-
- <view v-for="(item,index) in pricelist" :key="index" class="shoplist" style="background-color: #fff;">
- <view>
- <van-card
- title-class="changewidth"
- price-class ="priceClass"
- :price="item.goods_price"
- :desc="item.desarray[1]+'X'+item.goods_num"
- :title="item.desarray[0]"
- :thumb="pictureUrl + '/uploads/home/store/goods/' + item.goods_image.substr(0, item.goods_image.indexOf('\_')) + '/' + item.goods_image"
- >
- </van-card>
- </view>
- </view>
- <view class="topTip" v-if="radio === 1">
- <view style="font-size: 28upx;">运费:{{ralodprice}}</view>
- </view>
- </view>
- <!-- 底部付款 -->
- <view class="adressbutton">
- <view class="buttonStatus">
- <view @click="estimate" class="deleteOrder">应付<span>¥{{prices}}</span></view>
- <view class="payOrder" @click="goPay">付款</view>
- </view>
- </view>
-
- </view>
- </template>
- <script>
-
- export default {
- data() {
- return {
- ralodprice: 0,
- prices:'',
- pictureUrl: this.pictureUrl,
- list:[
- {title:'请送到我的房间'},
- {title:'快递到我的地址'},
- {title:'处理我的客房预定'}
- ],
- username:'',
- radio: 0,
- store: {},
- pricelist: [],
- choseadress: '',
- order_id:''
- }
- },
- onLoad(options) {
- console.log(options);
- this.order_id = options.order_id;
- this.store = JSON.parse(options.store);
- this.pricelist = JSON.parse(options.pricelist);
- let prices = Number((options.prices/100).toFixed(2));
- this.prices = prices;
- uni.$on("getadress",(adress)=>{
- this.choseadress = adress;
- console.log(this.choseadress)
- this.address_id = this.choseadress.address_id;
- this.getralodprice();
- })
- },
- methods: {
- // 核算运费
- getralodprice() {
- this.request({
- url: '/v2/entry/orderFreight',
- method: 'POST',
- data: {
-
- }
- })
- },
- onChange(index) {
- this.radio = index;
- },
- goAdress() {
- console.log("dddd")
- uni.navigateTo({
- url: '../myOrder/adress',
- });
- }
- }
- }
-
- </script>
- <style lang="scss">
- .LinkAdress /deep/ .van-cell {
- border-top: 15upx solid #F5F5F5;
- border-bottom: 15upx solid #F5F5F5;
- }
- .wrapper{
- border-top: 15rpx solid #F5F5F5;
- border-bottom: 15rpx solid #F5F5F5;
- padding: 0 32upx;
- }
- .u-box {
- padding: 15upx 0;
- }
- .topTip {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 20upx 36upx;
- border-bottom: 1px solid #F5F5F5;
- }
- .changewidth {
- color: #303133;
- font-size: 32upx;
- font-weight: 100!important;
- }
- .priceClass {
- color:#303133!important;
- font-weight: 100!important;
- font-size: 36upx;
- }
- .van-card {
- background-color: #fff!important;
- }
- .shoplist {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .adressbutton {
- position: fixed;
- bottom: 0;
- width: 100%;
- .buttonStatus {
- display: flex;
- text-align: left;
- .deleteOrder {
- flex: 3;
- color: #303133;
- font-size: 32upx;
- background-color: #fff;
- padding: 10px 0;
- }
- .payOrder {
- flex: 1;
- font-size: 32upx;
- color: #fff;
- background-color: #D9332E;
- padding: 10px 0;
- text-align: center;
- }
- }
- }
- </style>
|