diff --git a/pages/order_details/index.vue b/pages/order_details/index.vue index 67a37a9..f0956d2 100644 --- a/pages/order_details/index.vue +++ b/pages/order_details/index.vue @@ -4,20 +4,25 @@ <!-- 给header上与data上加on为退款订单--> <!--预售--> <view v-if="orderInfo.activity_type == 2 && (orderInfo.status == 10 || orderInfo.status == 11)"> - <view class='header presell_header' :style="{ 'background-image': `url(${imgUrl}/static/diy/presell_bg${keyColor}.jpg)`}" :class="'header'+keyColor"> + <view class='header presell_header' + :style="{ 'background-image': `url(${imgUrl}/static/diy/presell_bg${keyColor}.jpg)`}" + :class="'header'+keyColor"> <view class="presell_payment"> <text class="iconfont icon-shijian1"></text> {{ orderInfo.status == 11 ? '交易已关闭' : '待付尾款' }} </view> <view class='data' style="margin-left: 0;"> - <view class='state'>请在{{orderInfo.orderProduct[0].cart_info.productPresell.final_end_time}}前完成支付,超时订单将自动取消</view> + <view class='state'> + 请在{{orderInfo.orderProduct[0].cart_info.productPresell.final_end_time}}前完成支付,超时订单将自动取消 + </view> </view> </view> </view> <view v-else> <view class='header acea-row row-middle' :class='isGoodsReturn ? "on":""'> <view class='pictrue' v-if="isGoodsReturn==false"> - <image v-if="orderInfo.status != 9" :src="imgUrl+'/static/order_'+(orderInfo.status+2)+'.gif'"></image> + <image v-if="orderInfo.status != 9" :src="imgUrl+'/static/order_'+(orderInfo.status+2)+'.gif'"> + </image> <image v-else :src="imgUrl+'/static/order_2.gif'"></image> </view> <view class='data' :class='isGoodsReturn ? "on":""'> @@ -25,7 +30,8 @@ <block v-if="orderInfo.status == 0 && orderInfo.order_type != 1">待发货</block> <block v-if="orderInfo.status == 9">等待其他人参加拼团</block> <block v-if="orderInfo.status == 0 && orderInfo.order_type == 1">待核销</block> - <block v-if="orderInfo.status == 1">{{orderInfo.is_virtual == 1 ? '服务商品已虚拟发货' : '待收货'}}</block> + <block v-if="orderInfo.status == 1">{{orderInfo.is_virtual == 1 ? '服务商品已虚拟发货' : '待收货'}} + </block> <block v-if="orderInfo.status == 2">待评价</block> <block v-if="orderInfo.status == 3">已完成</block> <block v-if="orderInfo.status == -1">已为您退款,感谢您的支持</block> @@ -37,8 +43,10 @@ <view class='nav'> <view class='navCon acea-row row-between-wrapper'> <view>待付款</view> - <view :class="(orderInfo.status == 0 || orderInfo.status == 9) ? 'on':''" v-if="orderInfo.order_type != 1">待发货</view> - <view :class="(orderInfo.status == 0 || orderInfo.status == 9) ? 'on':''" v-if="orderInfo.order_type == 1">待核销</view> + <view :class="(orderInfo.status == 0 || orderInfo.status == 9) ? 'on':''" + v-if="orderInfo.order_type != 1">待发货</view> + <view :class="(orderInfo.status == 0 || orderInfo.status == 9) ? 'on':''" + v-if="orderInfo.order_type == 1">待核销</view> <view :class="orderInfo.status == 1 ? 'on':''" v-if="orderInfo.order_type != 1">待收货</view> <view :class="orderInfo.status == 2 ? 'on':''">待评价</view> <view :class="orderInfo.status == 3 ? 'on':''">已完成</view> @@ -46,13 +54,24 @@ <view class='progress acea-row row-between-wrapper'> <view class='iconfont icon-yuandianxiao t-color'></view> <view class='line b-color'></view> - <view class='iconfont' :class='((orderInfo.status == 0 || orderInfo.status == 9) ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 0 ? "t-color":"")'></view> - <view class='line' :class='orderInfo.status > 0 && orderInfo.status != 9 ? "b-color":""'></view> - <view class='iconfont' :class='(orderInfo.status == 1 ? "icon-webicon318":"icon-yuandianxiao") + " " +(orderInfo.status >= 1 && orderInfo.status != 9 ? "t-color":"")' v-if="orderInfo.order_type == 0"></view> - <view class='line' :class='orderInfo.status > 1 && orderInfo.status != 9 ? "b-color":""' v-if="orderInfo.order_type == 0"></view> - <view class='iconfont' :class='(orderInfo.status == 2 && orderInfo.status != 9 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 2 && orderInfo.status != 9 ? "t-color":"")'></view> - <view class='line' :class='orderInfo.status > 2 && orderInfo.status != 9 ? "b-color":""'></view> - <view class='iconfont' :class='(orderInfo.status == 3 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 3 && orderInfo.status != 9 ? "t-color":"")'></view> + <view class='iconfont' + :class='((orderInfo.status == 0 || orderInfo.status == 9) ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 0 ? "t-color":"")'> + </view> + <view class='line' :class='orderInfo.status > 0 && orderInfo.status != 9 ? "b-color":""'> + </view> + <view class='iconfont' + :class='(orderInfo.status == 1 ? "icon-webicon318":"icon-yuandianxiao") + " " +(orderInfo.status >= 1 && orderInfo.status != 9 ? "t-color":"")' + v-if="orderInfo.order_type == 0"></view> + <view class='line' :class='orderInfo.status > 1 && orderInfo.status != 9 ? "b-color":""' + v-if="orderInfo.order_type == 0"></view> + <view class='iconfont' + :class='(orderInfo.status == 2 && orderInfo.status != 9 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 2 && orderInfo.status != 9 ? "t-color":"")'> + </view> + <view class='line' :class='orderInfo.status > 2 && orderInfo.status != 9 ? "b-color":""'> + </view> + <view class='iconfont' + :class='(orderInfo.status == 3 ? "icon-webicon318":"icon-yuandianxiao") + " " + (orderInfo.status >= 3 && orderInfo.status != 9 ? "t-color":"")'> + </view> </view> </view> <view class='line'> @@ -63,7 +82,9 @@ <view> <!-- 配送地址 --> <view class='address' v-if="orderInfo.order_type == 0 && orderInfo.is_virtual != 1"> - <view class='name'>{{orderInfo.real_name}}<view class='phone'>{{orderInfo.user_phone}}</view></view> + <view class='name'>{{orderInfo.real_name}} + <view class='phone'>{{orderInfo.user_phone}}</view> + </view> <view>{{orderInfo.user_address}}</view> </view> <!-- 地图 --> @@ -88,11 +109,13 @@ 营业时间 </view> <view class="text"> - <text v-if="orderInfo.take.mer_take_day && orderInfo.take.mer_take_day.length == 7">周一至周日:</text> + <text + v-if="orderInfo.take.mer_take_day && orderInfo.take.mer_take_day.length == 7">周一至周日:</text> <block v-else> <text v-for="item in orderInfo.take.mer_take_day">{{'周'+ toChinese(item)}},</text> </block> - <text class="time" v-if="orderInfo.take.mer_take_time">{{orderInfo.take.mer_take_time[0]}}-{{orderInfo.take.mer_take_time[1]}}</text> + <text class="time" + v-if="orderInfo.take.mer_take_time">{{orderInfo.take.mer_take_time[0]}}-{{orderInfo.take.mer_take_time[1]}}</text> </view> </view> <view class="code" @click="showCode"> @@ -103,14 +126,20 @@ </view> </view> </view> - <view class="merchant" v-if="orderInfo.merchant && orderInfo.order_type != 1" @click="goStore(orderInfo.mer_id)"> + <view class="merchant" v-if="orderInfo.merchant && orderInfo.order_type != 1" + @click="goStore(orderInfo.mer_id)"> {{orderInfo.merchant.mer_name}} <text class="iconfont icon-xiangyou"></text> </view> <block v-if="cartInfo.length>0"> - <orderGoods :orderData='orderInfo' :evaluate='orderInfo.status' :activityType='orderInfo.activity_type' :orderId="order_id" :cartInfo="cartInfo" :jump="true"></orderGoods> - <block v-if="orderInfo.order_type == 1 && orderInfo.takeOrderList && orderInfo.takeOrderList.length > 0" v-for="(item,index) in orderInfo.takeOrderList" :key="index"> - <orderGoods :orderData='item' :evaluate='item.status' :activityType='item.activity_type' :orderId="item.order_id" :cartInfo="item.orderProduct" :jump="true"></orderGoods> + <orderGoods :orderData='orderInfo' :evaluate='orderInfo.status' + :activityType='orderInfo.activity_type' :orderId="order_id" :cartInfo="cartInfo" :jump="true"> + </orderGoods> + <block + v-if="orderInfo.order_type == 1 && orderInfo.takeOrderList && orderInfo.takeOrderList.length > 0" + v-for="(item,index) in orderInfo.takeOrderList" :key="index"> + <orderGoods :orderData='item' :evaluate='item.status' :activityType='item.activity_type' + :orderId="item.order_id" :cartInfo="item.orderProduct" :jump="true"></orderGoods> </block> </block> <block v-if="orderInfo.merchant"> @@ -137,7 +166,8 @@ </view> </view> <view class="item acea-row"> - <view style="color:#868686;">卡密已自动发放 <view>{{orderInfo.delivery_id}}</view></view> + <view style="color:#868686;">卡密已自动发放 <view>{{orderInfo.delivery_id}}</view> + </view> </view> </view> <!-- 送货 --> @@ -169,7 +199,7 @@ <view v-else class="virtual_delivery_not">配送员未接单</view> </view> <navigator class="virtual_detail" hover-class="none" - :url="'/pages/order_details/delivery?orderId=' + orderInfo.order_id">查看详情</navigator> + :url="'/pages/order_details/delivery?orderId=' + orderInfo.order_id">查看详情</navigator> </view> </view> <view v-if="orderInfo.remark" class="wrapper"> @@ -210,7 +240,8 @@ <view>支付方式:</view> <view class='conter' v-if="orderInfo.pay_type==0">余额支付</view> <view class='conter' v-if="orderInfo.pay_type==4 || orderInfo.pay_type==5">支付宝支付</view> - <view class='conter' v-if="orderInfo.pay_type==1 || orderInfo.pay_type==2 || orderInfo.pay_type==3">微信支付</view> + <view class='conter' + v-if="orderInfo.pay_type==1 || orderInfo.pay_type==2 || orderInfo.pay_type==3">微信支付</view> </view> <view class='item acea-row row-between' v-if="orderInfo.mark"> <view>买家留言:</view> @@ -219,11 +250,13 @@ </view> </view> <view v-if="orderInfo.order_extend" class='wrapper'> - <view v-for="(item,index) in orderInfo.order_extend" v-if="item" :key="index" class='item acea-row row-between'> + <view v-for="(item,index) in orderInfo.order_extend" v-if="item" :key="index" + class='item acea-row row-between'> <view>{{index}}:</view> <view v-if="!Array.isArray(item)" class='conter'>{{item}}</view> <view v-else class='conter virtual_image'> - <image v-for="(pic,i) in item" :key="i" class="picture" :src="pic" @click="getPhotoClickIdx(item,i)"></image> + <image v-for="(pic,i) in item" :key="i" class="picture" :src="pic" + @click="getPhotoClickIdx(item,i)"></image> </view> </view> </view> @@ -249,39 +282,62 @@ <view class='conter'>¥{{orderInfo.pay_price}}</view> </view> </view> - <view class="content-clip" v-if="isGoodsReturn==false && (orderInfo.status != 0 || (orderInfo.status == 0 && refundNum.length != cartInfo.length && orderInfo.refund_status && orderInfo.refund_switch))"></view> + <view class="content-clip" + v-if="isGoodsReturn==false && (orderInfo.status != 0 || (orderInfo.status == 0 && refundNum.length != cartInfo.length && orderInfo.refund_status && orderInfo.refund_switch))"> + </view> <view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false && orderInfo.status != 0"> - <view v-if="!orderInfo.receipt && !isGoodsReturn && orderInfo.open_receipt == 1" class='bnt cancel' @click="applyInvoice">申请开票</view> - <view v-if="orderInfo.activity_type == 2 && (orderInfo.status == 10 || orderInfo.status == 11)" class=" acea-row row-right row-middle" style="margin-left: 17rpx;"> - <view v-if="orderInfo.presellOrder.activeStatus == 0" class='bnt b-color btn_auto'>{{ orderInfo.presellOrder.final_start_time | filterDay }} 付尾款</view> - <view v-if="orderInfo.presellOrder.activeStatus == 1" class='bnt b-color' @tap='pay_open'>立即付款</view> - <view v-if="orderInfo.presellOrder.activeStatus == 2" class='bnt cancel' @click="cancelOrder">取消订单</view> + <view v-if="!orderInfo.receipt && !isGoodsReturn && orderInfo.open_receipt == 1" class='bnt cancel' + @click="applyInvoice">申请开票</view> + <view v-if="orderInfo.activity_type == 2 && (orderInfo.status == 10 || orderInfo.status == 11)" + class=" acea-row row-right row-middle" style="margin-left: 17rpx;"> + <view v-if="orderInfo.presellOrder.activeStatus == 0" class='bnt b-color btn_auto'> + {{ orderInfo.presellOrder.final_start_time | filterDay }} 付尾款</view> + <view v-if="orderInfo.presellOrder.activeStatus == 1" class='bnt b-color' @tap='pay_open'>立即付款 + </view> + <view v-if="orderInfo.presellOrder.activeStatus == 2" class='bnt cancel' @click="cancelOrder">取消订单 + </view> </view> <block v-if="orderInfo.status == 9"> <view class="bnt cancel" @click="getCombinationRemove">取消拼团</view> </block> <view class='bnt b-color' v-if="orderInfo.activity_type==4" @tap='goJoinPink'>查看拼团</view> <block v-if="orderInfo.status == 1"> - <view class="bnt cancel" @click="allRefund" v-if="refundNum.length != cartInfo.length && orderInfo.refund_status && orderInfo.refund_switch == 1">批量退款</view> - <navigator v-if="orderInfo.delivery_type == 1 || orderInfo.delivery_type == 4" class='bnt cancel' hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.order_id">查看物流</navigator> + <view class="bnt cancel" @click="allRefund" + v-if="refundNum.length != cartInfo.length && orderInfo.refund_status && orderInfo.refund_switch == 1"> + 批量退款</view> + <navigator v-if="orderInfo.delivery_type == 1 || orderInfo.delivery_type == 4" class='bnt cancel' + hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.order_id">查看物流 + </navigator> <view class='bnt b-color' @tap='confirmOrder'>确认收货</view> </block> <block v-if="orderInfo.status == 2"> - <view class="bnt cancel" @click="allRefund" v-if="refundNum.length != cartInfo.length && orderInfo.refund_status && orderInfo.refund_switch == 1">批量退款</view> - <navigator v-if="orderInfo.delivery_type == 1 || orderInfo.delivery_type == 4" class='bnt cancel' hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.order_id">查看物流</navigator> - <view class='bnt b-color' @click="goOrderConfirm" v-if="orderInfo.activity_type!=1 && orderInfo.activity_type!=2 && orderInfo.activity_type!=3 &&orderInfo.activity_type!=4 && orderInfo.activity_type!=10">再次购买</view> + <view class="bnt cancel" @click="allRefund" + v-if="refundNum.length != cartInfo.length && orderInfo.refund_status && orderInfo.refund_switch == 1"> + 批量退款</view> + <navigator v-if="orderInfo.delivery_type == 1 || orderInfo.delivery_type == 4" class='bnt cancel' + hover-class='none' :url="'/pages/users/goods_logistics/index?orderId='+ orderInfo.order_id">查看物流 + </navigator> + <view class='bnt b-color' @click="goOrderConfirm" + v-if="orderInfo.activity_type!=1 && orderInfo.activity_type!=2 && orderInfo.activity_type!=3 &&orderInfo.activity_type!=4 && orderInfo.activity_type!=10"> + 再次购买</view> </block> <block v-if="orderInfo.status == 3"> <view class='bnt cancel' @click="delOrder">删除订单</view> - <view class="bnt cancel" @click="allRefund" v-if="refundNum.length != cartInfo.length && orderInfo.refund_status && orderInfo.refund_switch == 1">批量退款</view> - <view class='bnt b-color' @click="goOrderConfirm" v-if="orderInfo.activity_type!=1 && orderInfo.activity_type!=2 && orderInfo.activity_type!=3 && orderInfo.activity_type!=4 && orderInfo.activity_type!=10">再次购买</view> + <view class="bnt cancel" @click="allRefund" + v-if="refundNum.length != cartInfo.length && orderInfo.refund_status && orderInfo.refund_switch == 1"> + 批量退款</view> + <view class='bnt b-color' @click="goOrderConfirm" + v-if="orderInfo.activity_type!=1 && orderInfo.activity_type!=2 && orderInfo.activity_type!=3 && orderInfo.activity_type!=4 && orderInfo.activity_type!=10"> + 再次购买</view> </block> </view> - <view class='footer acea-row row-right row-middle' v-if="isGoodsReturn==false && orderInfo.status == 0 && refundNum.length != cartInfo.length && orderInfo.refund_status && orderInfo.refund_switch"> + <view class='footer acea-row row-right row-middle' + v-if="isGoodsReturn==false && orderInfo.status == 0 && refundNum.length != cartInfo.length && orderInfo.refund_status && orderInfo.refund_switch"> <view class="bnt cancel" @click="allRefund">批量退款</view> </view> </view> - <payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice' :order_type='1'></payment> + <payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" + :totalPrice='totalPrice' :order_type='1'></payment> <addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing> <!--核销码弹窗--> <uni-popup ref="cancellPoupon" type="bottom"> @@ -313,7 +369,9 @@ // | Author: CRMEB Team <admin@crmeb.com> // +---------------------------------------------------------------------- let app = getApp(); - import { HTTP_REQUEST_URL } from '@/config/app'; + import { + HTTP_REQUEST_URL + } from '@/config/app'; import { getOrderDetail, orderAgain, @@ -323,15 +381,27 @@ verifyCode, applyInvoiceApi } from '@/api/order.js'; - import { postCombinationRemove } from '@/api/activity'; - import { openOrderRefundSubscribe } from '@/utils/SubscribeMessage.js'; - import { getUserInfo } from '@/api/user.js'; + import { + postCombinationRemove + } from '@/api/activity'; + import { + openOrderRefundSubscribe + } from '@/utils/SubscribeMessage.js'; + import { + getUserInfo + } from '@/api/user.js'; import payment from '@/components/payment'; import orderGoods from "@/components/orderGoods"; import ClipboardJS from "@/plugin/clipboard/clipboard.js"; - import { mapGetters } from "vuex"; - import { configMap } from "@/utils"; - import { toLogin } from '@/libs/login.js'; + import { + mapGetters + } from "vuex"; + import { + configMap + } from "@/utils"; + import { + toLogin + } from '@/libs/login.js'; import addInvoicing from '@/components/addInvoicing'; import zbCode from '@/components/zb-code/zb-code.vue'; export default { @@ -383,8 +453,8 @@ pay_order_id: '', totalPrice: '0', refundNum: [], //退款个数临时数据 - imgUrl:HTTP_REQUEST_URL, - codeUrl:'', + imgUrl: HTTP_REQUEST_URL, + codeUrl: '', isTimePay: false, codeShow: false, cid: '1', @@ -409,15 +479,19 @@ } }; }, - computed:{ - ...configMap({hide_mer_status:0,yue_pay_status:0,alipay_open:0}, - mapGetters(['isLogin','uid','viewColor','keyColor'])), + computed: { + ...configMap({ + hide_mer_status: 0, + yue_pay_status: 0, + alipay_open: 0 + }, + mapGetters(['isLogin', 'uid', 'viewColor', 'keyColor'])), }, - filters:{ - filterDay(val){ - if(val){ - var reg =/(\d{4})\-(\d{2})\-(\d{2})/; - var date = val.replace(reg,"$2月$3日"); + filters: { + filterDay(val) { + if (val) { + var reg = /(\d{4})\-(\d{2})\-(\d{2})/; + var date = val.replace(reg, "$2月$3日"); return date } } @@ -461,37 +535,41 @@ }); }, // 判断是否到支付尾款时间 - isPayBalance(){ + isPayBalance() { let that = this; - if(that.orderInfo.status === 10){ - if(new Date() < new Date(that.orderInfo.presellOrder.final_start_time)){ + if (that.orderInfo.status === 10) { + if (new Date() < new Date(that.orderInfo.presellOrder.final_start_time)) { that.isTimePay = false; //未开始 - }else if((new Date() >= new Date(that.orderInfo.presellOrder.final_start_time)) && (new Date() <= new Date(that.orderInfo.presellOrder.final_start_time)) ){ + } else if ((new Date() >= new Date(that.orderInfo.presellOrder.final_start_time)) && (new Date() <= + new Date(that.orderInfo.presellOrder.final_start_time))) { that.isTimePay = true; //立即支付 } } }, // 数字转汉字 - toChinese(num){ + toChinese(num) { let changeNum = ['零', '一', '二', '三', '四', '五', '六', '日', '八', '九']; let unit = ["", "十", "百", "千", "万"]; num = parseInt(num); let getWan = (temp) => { - let strArr = temp.toString().split("").reverse(); - let newNum = ""; - for (var i = 0; i < strArr.length; i++) { - newNum = (i == 0 && strArr[i] == 0 ? "" : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum; - } - return newNum; - } - let overWan = Math.floor(num / 10000); - let noWan = num % 10000; - if (noWan.toString().length < 4) { noWan = "0" + noWan; } - return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num); + let strArr = temp.toString().split("").reverse(); + let newNum = ""; + for (var i = 0; i < strArr.length; i++) { + newNum = (i == 0 && strArr[i] == 0 ? "" : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : + changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum; + } + return newNum; + } + let overWan = Math.floor(num / 10000); + let noWan = num % 10000; + if (noWan.toString().length < 4) { + noWan = "0" + noWan; + } + return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num); }, // 返回店铺首页 - goStore(mer_id){ - if(this.hide_mer_status != 1){ + goStore(mer_id) { + if (this.hide_mer_status != 1) { uni.navigateTo({ url: '/pages/store/home/index?id=' + mer_id }) @@ -504,11 +582,13 @@ uni.hideLoading(); if (this.orderInfo.status == 0 || this.orderInfo.is_virtual != 0) { uni.navigateTo({ - url: '/pages/users/refund/index?order_id=' + this.order_id + '&refund_type=1&type=2&order_type='+this.orderInfo.order_type + url: '/pages/users/refund/index?order_id=' + this.order_id + + '&refund_type=1&type=2&order_type=' + this.orderInfo.order_type }) } else { uni.navigateTo({ - url: '/pages/users/refund/select?order_id=' + this.order_id + '&type=2&order_type='+this.orderInfo.order_type + url: '/pages/users/refund/select?order_id=' + this.order_id + + '&type=2&order_type=' + this.orderInfo.order_type }) } }).catch(() => { @@ -518,11 +598,13 @@ // #ifdef H5 || APP-PLUS if (this.orderInfo.status == 0 || this.orderInfo.is_virtual != 0) { uni.navigateTo({ - url: '/pages/users/refund/index?order_id=' + this.order_id + '&refund_type=1&type=2&order_type='+this.orderInfo.order_type + url: '/pages/users/refund/index?order_id=' + this.order_id + + '&refund_type=1&type=2&order_type=' + this.orderInfo.order_type }) } else { uni.navigateTo({ - url: '/pages/users/refund/select?order_id=' + this.order_id + '&type=2&order_type='+this.orderInfo.order_type + url: '/pages/users/refund/select?order_id=' + this.order_id + '&type=2&order_type=' + this + .orderInfo.order_type }) } // #endif @@ -531,7 +613,7 @@ getCombinationRemove: function() { var that = this; postCombinationRemove({ - group_buying_id: that.orderInfo.orderProduct[0].activity_id + group_buying_id: that.orderInfo.orderProduct[0].activity_id }) .then(res => { that.$util.Tips({ @@ -547,23 +629,23 @@ }); }, // 取消售后 - cancelSales(){ + cancelSales() { let that = this; uni.showModal({ - content: '确定要取消售后?', - success: function(res) { - if(res.confirm) { - deletePlantApi(that.id).then(res => { - if (res.status === 200) { - that.$util.Tips({ - title: res.message - }); + content: '确定要取消售后?', + success: function(res) { + if (res.confirm) { + deletePlantApi(that.id).then(res => { + if (res.status === 200) { + that.$util.Tips({ + title: res.message + }); } - }) - } else if(res.cancel) { - console.log('用户点击取消'); - } - } + }) + } else if (res.cancel) { + console.log('用户点击取消'); + } + } }); }, // 联系客服 @@ -610,10 +692,10 @@ */ call: function() { let that = this - if(that.orderInfo.merchant.service_phone){ + if (that.orderInfo.merchant.service_phone) { uni.showModal({ title: '提示', - content: '暂无在线客服,确定拨打客服电话:'+that.orderInfo.merchant.service_phone+'吗?', + content: '暂无在线客服,确定拨打客服电话:' + that.orderInfo.merchant.service_phone + '吗?', success: function(res) { if (res.confirm) { uni.makePhoneCall({ @@ -622,7 +704,7 @@ } } }) - }else{ + } else { return that.$util.Tips({ title: '暂无可用客服' }) @@ -633,22 +715,24 @@ * */ showMaoLocation: function() { - if (!this.orderInfo.take.mer_take_location[0] || !this.orderInfo.take.mer_take_location[1]) return this.$util.Tips({ - title: '请设置允许商城访问您的位置!' - }); - let that = this, lat = parseFloat(that.orderInfo.take.mer_take_location[0]), - long = parseFloat(that.orderInfo.take.mer_take_location[1]) + if (!this.orderInfo.take.mer_take_location[0] || !this.orderInfo.take.mer_take_location[1]) return this + .$util.Tips({ + title: '请设置允许商城访问您的位置!' + }); + let that = this, + lat = parseFloat(that.orderInfo.take.mer_take_location[0]), + long = parseFloat(that.orderInfo.take.mer_take_location[1]) //#ifdef H5 if (that.$wechat.isWeixin() === true) { that.$wechat.seeLocation({ latitude: Number(lat), longitude: Number(long), address: that.orderInfo.take ? that.orderInfo.take.mer_take_name : '' - }).then(res=>{ + }).then(res => { console.log('success'); }) - }else{ - //#endif + } else { + //#endif uni.openLocation({ latitude: lat, longitude: long, @@ -718,7 +802,7 @@ uni.showLoading({ title: "正在加载中" }); - getOrderDetail(that.order_id).then(res => { + getOrderDetail(that.order_id).then(res => { uni.hideLoading(); that.$set(that, 'orderInfo', res.data); that.orderInfo.take = res.data.take; @@ -731,7 +815,7 @@ that.refundNum.push(el) } }) - if(res.data.order_type == 1){ + if (res.data.order_type == 1) { that.getOrderCode() } }).catch(err => { @@ -747,7 +831,7 @@ showCode() { this.$refs.cancellPoupon.open(); }, - close(){ + close() { this.$refs.cancellPoupon.close(); }, /** @@ -759,8 +843,7 @@ let that = this; uni.setClipboardData({ data: that.orderInfo.order_sn, - success: function(res){ - } + success: function(res) {} }); }, @@ -774,9 +857,8 @@ let that = this; uni.setClipboardData({ data: that.orderInfo.delivery_id, - success: function(res){ - } - + success: function(res) {} + }); }, // #endif @@ -794,7 +876,8 @@ */ goJoinPink: function() { uni.navigateTo({ - url: '/pages/activity/combination_status/index?id=' + this.orderInfo.orderProduct[0].activity_id, + url: '/pages/activity/combination_status/index?id=' + this.orderInfo.orderProduct[0] + .activity_id, }); }, /** @@ -903,13 +986,13 @@ }, // 关闭发票弹窗 changeInvoiceClose: function(data) { - if(data)this.getInvoiceData(data); + if (data) this.getInvoiceData(data); this.$set(this.invoice, 'invoice', false); }, // 开票回调 getInvoiceData(data) { let that = this - applyInvoiceApi(that.order_id,data).then(res => { + applyInvoiceApi(that.order_id, data).then(res => { return that.$util.Tips({ title: res.message, }); @@ -926,6 +1009,7 @@ .remark { flex: 1; } + .merchant { width: 100%; height: 86rpx; @@ -937,20 +1021,25 @@ line-height: 86rpx; box-sizing: border-box; background-color: #fff; + .iconfont { margin-top: 6rpx; font-size: 22rpx; } } - .presell_bg_header{ + + .presell_bg_header { background: linear-gradient(to right, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%); } + .b-color { background-color: var(--view-theme); } + .t-color { - color: var(--view-theme)!important; + color: var(--view-theme) !important; } + .goodCall { text-align: center; width: 100%; @@ -961,10 +1050,12 @@ line-height: 86rpx; background: #fff; color: #282828; + .icon-kefu { font-size: 28rpx; margin-right: 15rpx; } + /* #ifdef MP */ button { display: flex; @@ -974,59 +1065,72 @@ font-size: 30rpx; color: #e93323; } + /* #endif */ } + .order-details .header { padding: 0 30rpx; height: 150rpx; - background-image: linear-gradient(90deg, var(--view-bntColor21) 0%,var(--view-bntColor22) 100%); - &.presell_header{ + background-image: linear-gradient(90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%); + + &.presell_header { background-repeat: no-repeat; background-size: cover; padding: 35rpx 50rpx; - .data{ + + .data { margin: 8rpx 0 0 13rpx; - .state{ + + .state { font-weight: normal; font-size: 24rpx; } } } } - .take-info{ + + .take-info { padding: 0 30rpx 30rpx; background-color: #ffffff; margin-bottom: 14rpx; } + .take-msg { display: flex; justify-content: space-between; background-color: #FAFAFA; padding: 24rpx; border-radius: 4rpx; + .left { font-size: 24rpx; display: flex; flex-direction: column; justify-content: space-between; + .title { font-size: 28rpx; font-weight: bold; color: #282828; } + .text { color: #666666; } } + .code { display: flex; flex-direction: column; align-items: center; justify-content: center; + .iconfont { font-size: 50rpx; color: #666666; } + .text { font-size: 20rpx; color: #666666; @@ -1034,69 +1138,85 @@ } } } + .order-details .header.on { background-color: #666 !important; } + .order-details .header .pictrue { width: 110rpx; height: 110rpx; } + .order-details .header .pictrue image { width: 100%; height: 100%; } + .order-details .header .data { color: rgba(255, 255, 255, 0.8); font-size: 24rpx; margin-left: 27rpx; } + .order-details .header .data.on { margin-left: 0; } + .order-details .header .data .state { font-size: 30rpx; font-weight: bold; color: #fff; margin-bottom: 7rpx; } - .presell_header .presell_payment{ + + .presell_header .presell_payment { color: #fff; font-size: 30rpx; font-weight: bold; - .iconfont{ + + .iconfont { font-weight: normal; margin-right: 8rpx; } } + .order-details .header .data .time { margin-left: 20rpx; } + .order-details .nav { background-color: #fff; font-size: 26rpx; color: #282828; padding: 25rpx 0; } + .order-details .nav .navCon { padding: 0 40rpx; } + .order-details .nav .on { color: var(--view-theme); } + .order-details .nav .progress { padding: 0 65rpx; margin-top: 10rpx; } + .order-details .nav .progress .line { width: 100rpx; height: 2rpx; background-color: #939390; } + .order-details .nav .progress .iconfont { font-size: 25rpx; color: #939390; margin-top: -2rpx; } + .order-details .address { font-size: 26rpx; color: #868686; @@ -1104,56 +1224,70 @@ margin-top: 13rpx; padding: 35rpx 30rpx; } + .order-details .address .name { font-size: 30rpx; color: #282828; margin-bottom: 15rpx; } + .order-details .line { width: 100%; height: 3rpx; } + .order-details .line image { width: 100%; height: 100%; display: block; } + .order-details .wrapper { background-color: #fff; margin-top: 12rpx; padding: 30rpx; } + .order-details .wrapper .item { font-size: 28rpx; color: #282828; } + .order-details .wrapper .virtual_item { display: flex; justify-content: space-between; align-items: center; } + .order-details .virtual_item .virtual_row { width: 300rpx; align-items: center; justify-content: space-between; - image,uni-image{ + + image, + uni-image { width: 80rpx; height: 80rpx; border-radius: 100%; } } + .order-details .virtual_item .virtual_detail { color: var(--view-theme); } + .order-details .virtual_item .virtual_delivery { line-height: 40rpx; } + .order-details .virtual_item .virtual_delivery_not { font-weight: bold; } + .order-details .wrapper .item~.item { margin-top: 20rpx; } + .order-details .wrapper .item .conter { color: #868686; width: 500rpx; @@ -1162,18 +1296,22 @@ justify-content: flex-end; text-align: right; } + .order-details .wrapper .item .virtual_image { margin-left: 50rpx; } - .order-details .wrapper .item .virtual_image .picture{ + + .order-details .wrapper .item .virtual_image .picture { width: 106rpx; height: 106rpx; border-radius: 8rpx; margin-right: 10rpx; - &:last-child{ + + &:last-child { margin-right: 0; } } + .order-details .wrapper .item .conter .copy { font-size: 20rpx; color: #333; @@ -1182,15 +1320,18 @@ padding: 3rpx 15rpx; margin-left: 24rpx; } + .order-details .wrapper .actualPay { border-top: 1px solid #eee; margin-top: 30rpx; padding-top: 30rpx; } + .order-details .wrapper .actualPay .money { font-weight: bold; font-size: 30rpx; } + .order-details .footer { width: 100%; position: fixed; @@ -1203,11 +1344,13 @@ height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/ box-sizing: border-box; } - .content-clip{ + + .content-clip { height: 120rpx; height: calc(120rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/ height: calc(120rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/ } + .order-details .footer .bnt { width: 156rpx; text-align: center; @@ -1218,26 +1361,32 @@ display: flex; align-items: center; justify-content: center; - &.btn_auto{ + + &.btn_auto { width: auto; padding: 0 40rpx; } + ~.bnt { margin-left: 17rpx; } } + .order-details .footer .bnt.cancel { color: #aaa; border: 1px solid #ddd; } + .order-details .footer .bnt~.bnt { margin-left: 18rpx; } + .order-details .writeOff { background-color: #fff; margin-top: 13rpx; padding-bottom: 30rpx; } + .order-details .writeOff .title { font-size: 30rpx; color: #282828; @@ -1246,26 +1395,31 @@ padding: 0 30rpx; line-height: 87rpx; } + .grayBg .pictrue { width: 290rpx; height: 290rpx; margin: 0 auto; } + .grayBg .pictrue image { width: 100%; height: 100%; display: block; } + .gear { width: 590rpx; height: 30rpx; margin: 0 auto; } + .gear image { width: 100%; height: 100%; display: block; } + .num { color: #282828; font-size: 34rpx; @@ -1274,32 +1428,39 @@ text-align: center; margin-top: 30rpx; } + .order-details .writeOff .rules { margin: 46rpx 30rpx 0 30rpx; border-top: 1px solid #f0f0f0; padding-top: 10rpx; } + .order-details .writeOff .rules .item { margin-top: 20rpx; } + .order-details .writeOff .rules .item .rulesTitle { font-size: 28rpx; color: #282828; } + .order-details .writeOff .rules .item .rulesTitle .iconfont { font-size: 30rpx; color: #333; margin-right: 8rpx; margin-top: 5rpx; } + .order-details .writeOff .rules .item .info { font-size: 28rpx; color: #999; margin-top: 7rpx; } + .order-details .writeOff .rules .item .info .time { margin-left: 20rpx; } + .order-details .map { height: 86rpx; font-size: 30rpx; @@ -1310,6 +1471,7 @@ background-color: #fff; padding: 0 30rpx; } + .order-details .map .place { font-size: 26rpx; width: 176rpx; @@ -1318,20 +1480,24 @@ text-align: center; border: 1px solid var(--view-theme); } + .order-details .map .place .iconfont { font-size: 27rpx; height: 27rpx; line-height: 27rpx; margin: 2rpx 3rpx 0 0; } + .order-details .address .name .iconfont { font-size: 34rpx; margin-left: 10rpx; } + .refund { padding: 0 30rpx 30rpx; margin-top: 24rpx; background-color: #fff; + .title { display: flex; align-items: center; @@ -1339,18 +1505,21 @@ color: #333; height: 86rpx; border-bottom: 1px solid #f5f5f5; + image { width: 32rpx; height: 32rpx; margin-right: 10rpx; } } + .con { padding-top: 25rpx; font-size: 28rpx; color: #868686; } } + .qs-btn { width: auto; height: 60rpx; @@ -1364,6 +1533,7 @@ border: 1px solid #ddd; margin-right: 20rpx; } + .code-content { display: flex; flex-direction: column; @@ -1373,18 +1543,21 @@ background: #ffffff; border-radius: 16rpx 16rpx 0 0; position: relative; - .iconfont{ + + .iconfont { font-size: 24rpx; color: #939393; position: absolute; top: 20rpx; right: 30rpx; } - .title{ + + .title { color: #282828; font-size: 32rpx; font-weight: bold; } + .trip { font-size: 28rpx; font-weight: 400; @@ -1392,5 +1565,4 @@ margin: 40rpx 0; } } -</style> - +</style> \ No newline at end of file diff --git a/pages/store/home/index.vue b/pages/store/home/index.vue index 0a47c2d..d023ca0 100644 --- a/pages/store/home/index.vue +++ b/pages/store/home/index.vue @@ -142,14 +142,14 @@ <text class="sale_num">已销 {{item.sales}}{{item.sales>0?'+':''}}</text> </view> - <view class="tag"> - <view class="tag-item">24H发货</view> + <!-- 标签 --> + <view class="tag" v-if="item.mer_label_name && item.mer_label_name.length > 0"> + <view class="tag-item" v-for="(ii,indx) in item.mer_label_name">{{ii}}</view> </view> - <view class="shop-detail"> - <text class="brand">品牌:123123</text> - <text class="unit">规格:{{item.unit_name}}</text> - <!-- <text class="addr">产地:{{item}}</text> --> + <!-- 规格产地 --> + <view class="shop-detail" v-if="item.store_info"> + {{item.store_info}} </view> <view class="price"> diff --git a/pages/store/settled/index.vue b/pages/store/settled/index.vue index 8d5ca08..931aaf3 100644 --- a/pages/store/settled/index.vue +++ b/pages/store/settled/index.vue @@ -1,30 +1,43 @@ <template> - <view class="page"> + <view class="page" :style="{'height':successful?'100vh':''}"> <!-- #ifdef MP || APP-PLUS --> - - <view class="conten-top" :style="'height:'+statusBarHeight+'px'"> + <view class="conten-top" :style="'height:'+statusBarHeight+'px'" :class="{'bar-top-bg':barBg}" + v-if="!successful"> <view class="" style="position: absolute;left: 30rpx;bottom: 15rpx;" @click="logout"><i - class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;"></i></view> + class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;color:#fff;"></i></view> <view class="" - style="position: absolute;left: 30rpx;bottom: 15rpx;width: 120rpx; left:50%;margin-left:-60rpx;"> + style="position: absolute;bottom: 15rpx;width: 500rpx; left:50%;transform: translate(-50%);text-align: center;color:#fff;font-size: 32rpx;font-weight: bold;"> 商家入驻 </view> </view> - <view :style="'height:'+statusBarHeight+'px'"></view> + <!-- #endif --> + + <!-- #ifdef H5 --> + <view class="header" v-if="!successful"> + <view class="title-bar" :class="{'bar-top-bg':barBg}"> + <view class="title-bar-icon" @click="logout"> + <i class="iconfont icon-xiangzuo"></i> + </view> + <view class="title-bar-txt"> + 商家入驻 + </view> + </view> + </view> <!-- #endif --> <view v-if="!successful" :style="viewColor"> <form report-submit='true'> <view class='merchantsSettled'> <view class="merchantBgCount"> - <image mode="widthFix" class="merchantBg" :src="domain+'/static/diy/merchantBg'+keyColor+'.jpg'" - alt=""> + <image mode="widthFix" class="merchantBg" + src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/7d0f8202403160938542943.webp" alt=""> </view> <view class="application-record" @click="jumpToList" v-if="!mer_i_id"> 申请记录 <text class="iconfont icon-xiangyou"></text> </view> <view class='list'> + <view class="list-title">商家入驻</view> <view class="item"> <view class="acea-row row-middle"> <text class="item-name">商户名称</text> @@ -45,11 +58,6 @@ v-model="mer_classification"> <view class='iconfont icon-jiantou'></view> </picker> - <!-- <picker @change="bindPickerChange" @columnchange="columnchange" mode="multiSelector" :value="index" :range="[array, bindPickerChangeidx]" range-key="cate_name"> - <input placeholder="请选择商户分类" type="text" readonly disabled - v-model="mer_classification"> - <view class='iconfont icon-jiantou'></view> - </picker> --> </view> </view> </view> @@ -81,10 +89,9 @@ :range="business" range-key="name" @columnchange="pickerColumnchange"> <view class="businessBox" :style="{'color':(business_name == '' || business_name.length == 5)?'#B2B2B2':''}" - style="width: 400rpx;word-break: keep-all;line-height: 40rpx;font-size: 16px;"> + style="width: 400rpx;word-break: keep-all;line-height: 40rpx;font-size: 30rpx;"> {{(business_name == '' || business_name.length == 5)?'请选择商圈':business_name}} </view> - <view class='iconfont icon-jiantou'></view> </picker> </view> @@ -293,11 +300,9 @@ </view> <view class="settlementAgreement" v-if="isshow"> <view class="setAgCount" style="width: 100%;height: 100%;padding-top: 180rpx;"> - <!-- <i class="icon iconfont icon-cha" @click="recuo"></i> --> <view class="" style="width: 60rpx;height: 60rpx; position: absolute;left: 30rpx; top:90rpx" @click="recuo"> <i class="iconfont icon-xiangzuo" style="width: 60rpx;height: 60rpx;font-size: 40rpx;"></i> - <!-- <image src="@/static/images/close.png" mode="aspectFit" style="width: 60rpx;height: 60rpx;"></image> --> </view> <div class="title">{{detail.title}}</div> @@ -310,7 +315,6 @@ </view> <view class="contenta" v-else> <jyf-parser :html="detail.mer_supply_agree" ref="article" :tag-style="tagStyle"></jyf-parser> - </view> <view class="setAgCountbtn"> @@ -482,7 +486,8 @@ page: 1, limit: 10 }, - codenote: [] + codenote: [], + barBg: false, //导航栏背景 }; }, beforeDestroy() { @@ -492,6 +497,13 @@ sys_intention_agree: '' }, mapGetters(['isLogin', 'viewColor', 'keyColor'])), + onPageScroll(e) { + if (e.scrollTop > 50) { + this.barBg = true; + } else { + this.barBg = false; + } + }, onLoad(options) { if (this.isLogin) { this.getClassfication(); @@ -684,7 +696,6 @@ this.city_id = resData.city_id; this.area_id = resData.area_id this.street_id = resData.street_id - // this.mer_storeType = resData.mer_storeType this.village_id = resData.village_id; const bankInfo = resData.financial_bank ? JSON.parse(resData.financial_bank) : ''; @@ -833,10 +844,8 @@ again() { this.getcaptcha() }, - /** - * 上传文件 - * - */ + + // 上传文件 uploadpic: function() { let that = this; that.$util.uploadImageOne('upload/image', function(res) { @@ -844,16 +853,15 @@ that.$set(that, 'pics', that.pics); }); }, + uploadpicBack: function() { let that = this; that.$util.uploadImageOne('upload/image', function(res) { that.bank_front = res.data.path; }); }, - /** - * 上传图片识别文字 - * - */ + + // 上传图片识别文字 uploadpicText: function() { let that = this; that.$util.uploadImageOne('upload/image', function(res) { @@ -876,16 +884,15 @@ }) }); }, - /** - * 删除图片 - * - */ + + // 删除图片 DelPic: function(index) { let that = this, pic = this.pics[index]; that.pics.splice(index, 1); that.$set(that, 'pics', that.pics); }, + getCode() { let that = this getCodeApi().then(res => { @@ -896,6 +903,7 @@ }); }); }, + async code(data) { let that = this; if (!that.merchantData.phone) return that.$util.Tips({ @@ -905,27 +913,22 @@ title: '请输入正确的手机号码' }); await verify({ - phone: that.merchantData.phone, - // key: that.codeKey, - // code: that.codeVal, - type: 'intention', - captchaType: 'blockPuzzle', - captchaVerification: data.captchaVerification - }) - .then(res => { - that.$util.Tips({ - title: res.msg - }); - that.sendCode(); - }) - .catch(res => { - that.$util.Tips({ - title: res - }); - if (res.status == 402) { - // that.getcaptcha(); - } + phone: that.merchantData.phone, + // key: that.codeKey, + // code: that.codeVal, + type: 'intention', + captchaType: 'blockPuzzle', + captchaVerification: data.captchaVerification + }).then(res => { + that.$util.Tips({ + title: res.msg }); + that.sendCode(); + }).catch(res => { + that.$util.Tips({ + title: res + }); + }); }, getcaptcha() { @@ -1053,72 +1056,6 @@ } } } - - // let that = this; - // if (that.validateForm() && that.validate) { - // if (this.num == 0) { - // let requestData = { - // phone: that.merchantData.phone, - // mer_name: that.merchantData.enterprise_name, - // name: that.merchantData.user_name, - // code: that.merchantData.yanzhengma, - // company_name: that.merchantData.company_name, - // address: that.merchantData.address, - // social_credit_code: that.merchantData.social_credit_code, - // merchant_category_id: that.merchantData.classification, - // mer_type_id: that.merchantData.mer_type, - // mer_storeType: this.mer_storeType, - // area_id: this.area_id, - // street_id: this.street_id, - // village_id: this.village_id, - // is_nmsc: this.isnum, - // images: that.pics - // } - // that.validate = false; - // if (that.mer_i_id) { - // updateGoodsRecord(that.mer_i_id, requestData).then(res => { - // if (res.status == 200) { - // title: '提交成功', - // that.loading = true; - // that.timer = setTimeout(() => { - // that.successful = true; - // that.validate = true; - // }, 1000) - // } - // }).catch(res => { - // this.isshow = false - // that.validate = true; - // that.$util.Tips({ - // title: res - // }); - // }) - // } else { - // create(requestData).then(data => { - // if (data.status == 200) { - // title: '提交成功', - // that.loading = true; - // this.timer = setTimeout(() => { - // that.successful = true; - // that.validate = true; - // }, 1000) - // } - - // }).catch(res => { - // that.validate = true; - // that.$util.Tips({ - // title: res - // }); - // }) - // } - // } else { - // this.isshow = true - // this.countDown() - // } - - // } - - - }, validateBtn: function() { let that = this, @@ -1182,17 +1119,45 @@ if (!that.isAgree) return that.$util.Tips({ title: '请勾选并同意入驻协议' }); + if (that.isShowCode && !that.codeVal) return that.$util.Tips({ title: '请填写图片验证码' }); if (!that.business_license) return that.$util.Tips({ title: '请上传营业执照' }); - // if (that.pics.length == 0) return that.$util.Tips({ - // title: '请上传一张或者多张图片' - // }); + if (this.nature_business == 1 && !this.merchantData.bank_code) { + return that.$util.Tips({ + title: '请输入对公账号' + }); + } + + if (this.nature_business != 1 && !this.merchantData.bank_code) { + return that.$util.Tips({ + title: '请输入银行卡号' + }); + } + + if (!this.merchantData.bank_username) { + return that.$util.Tips({ + title: '请输入开户银行' + }); + } + + if (!this.merchantData.bank_opening) { + return that.$util.Tips({ + title: '请输入开户网点' + }); + } + + if (this.nature_business == 0 && !this.merchantData.bank_card_username) { + return that.$util.Tips({ + title: '请输入持卡人姓名' + }); + } + that.validate = true; return true; }, @@ -1223,6 +1188,46 @@ </script> <style scoped lang="scss"> + .page { + width: 750rpx; + height: 2400rpx; + background: linear-gradient(180deg, #44AF38 0%, #72BE53 100%); + } + + .header { + // height: 440rpx; + width: 100%; + text-align: center; + background-color: transparent; + // background-image: url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/96ec1202403151608564555.webp); + background-position: center; + + .title-bar { + position: fixed; + top: 0; + height: 88rpx; + line-height: 88rpx; + width: 100%; + z-index: 11; + + .title-bar-icon { + position: absolute; + left: 30rpx; + + .icon-xiangzuo { + font-size: 40rpx; + text-align: left; + color: #fff; + } + } + + .title-bar-txt { + text-align: center; + color: #fff; + } + } + } + /deep/checkbox .uni-checkbox-input.uni-checkbox-input-checked, /deep/checkbox .wx-checkbox-input.wx-checkbox-input-checked { border: 1px solid var(--view-theme) !important; @@ -1234,7 +1239,7 @@ .conten-top { width: 100%; text-align: center; - background-color: #fff; + background-color: transparent; position: absolute; top: 0; position: fixed; @@ -1245,6 +1250,10 @@ color: #B2B2B2; } + .bar-top-bg { + background-color: #46CC4B; + } + .item-name { width: 190rpx; } @@ -1286,16 +1295,38 @@ padding: 22px 0; margin: 0 15px; position: absolute; - top: 300rpx; + top: 400rpx; width: calc(100% - 30px); + } + .list-title { + position: relative; + font-weight: 600; + font-size: 30rpx; + color: #40AE36; + text-align: center; + margin-bottom: 40rpx; + + &::after { + content: ""; + display: inline-block; + position: absolute; + bottom: 0; + left: 50%; + transform: translateX(-50%); + width: 233rpx; + height: 14rpx; + background: #40AE36; + opacity: 0.36; + filter: blur(6px); + } } .application-record { position: absolute; display: flex; align-items: center; - top: 240rpx; + top: 320rpx; right: 0; color: #fff; font-size: 22rpx; @@ -1688,11 +1719,10 @@ .setAgCountbtnc { margin-top: 40rpx; - // width: 200rpx; height: 74rpx; text-align: center; line-height: 74rpx; - background: linear-gradient(270deg, #FF6D20 0%, #F84221 100%); + background: linear-gradient(270deg, #3da834 0%, #72BE53 100%); border-radius: 46rpx 46rpx; opacity: 1; font-size: 25rpx; diff --git a/pages/store/settled/unit.vue b/pages/store/settled/unit.vue index e250220..b8d8f3d 100644 --- a/pages/store/settled/unit.vue +++ b/pages/store/settled/unit.vue @@ -1,12 +1,12 @@ <template> - <view class="page"> + <view class="page" :style="{'height':successful?'100vh':''}"> <!-- #ifdef MP || APP-PLUS --> <view class="conten-top" :style="'height:'+statusBarHeight+'px'" :class="{'bar-top-bg':barBg}" v-if="!successful"> <view class="" style="position: absolute;left: 30rpx;bottom: 15rpx;" @click="logout"><i class="iconfont icon-xiangzuo" style="font-size: 40rpx;text-align: left;color:#fff;"></i></view> <view class="" - style="position: absolute;bottom: 15rpx;width: 500rpx; left:50%;transform: translate(-50%);text-align: center;color:#fff;"> + style="position: absolute;bottom: 15rpx;width: 500rpx; left:50%;transform: translate(-50%);text-align: center;color:#fff;font-size: 32rpx;font-weight: bold;"> 种养殖户入驻 </view> </view> @@ -36,7 +36,9 @@ 申请记录 <text class="iconfont icon-xiangyou"></text> </view> + <view class='list'> + <view class="list-title">种养殖户入驻</view> <view class="item"> <view class="acea-row row-middle"> <text class="item-name">姓名</text> @@ -49,17 +51,21 @@ <view class="uni-list"> <view class="uni-list-cell"> <view class="uni-list-cell-db acea-row row-middle"> - <text class="item-name businessBox">所在地</text> + <text class="item-name businessBox">店铺所在地</text> <picker mode=multiSelector @change="bindPickerChange2" :value="index2" :range="business" range-key="name" @columnchange="pickerColumnchange"> - <input class="businessBox" placeholder="请选择商圈" type="text" readonly disabled - v-model="business_name"> + <view class="businessBox" + :style="{'color':(business_name == '' || business_name.length == 5)?'#B2B2B2':''}" + style="width: 400rpx;word-break: keep-all;line-height: 40rpx;font-size: 32rpx;"> + {{(business_name == '' || business_name.length == 5)?'请选择商圈':business_name}} + </view> <view class='iconfont icon-jiantou'></view> </picker> </view> </view> </view> </view> + <view class="item"> <view class="uni-list"> <view class="uni-list-cell"> @@ -73,6 +79,7 @@ </view> </view> </view> + <view class="item no-border"> <view class='acea-row row-middle'> <text class="item-title" style="margin-right: 20rpx;">请上传营业执照</text> @@ -97,6 +104,7 @@ @input="validateBtn" placeholder-class='placeholder' /> </view> </view> + <view class="item"> <view class="acea-row row-middle"> <text class="item-name">开户银行</text> @@ -105,6 +113,7 @@ placeholder-class='placeholder' /> </view> </view> + <view class="item"> <view class="acea-row row-middle"> <text class="item-name">开户网点</text> @@ -112,6 +121,7 @@ @input="validateBtn" placeholder-class='placeholder' /> </view> </view> + <view class="item"> <view class="acea-row row-middle"> <text class="item-name">持卡人</text> @@ -144,6 +154,7 @@ @input="validateBtn" placeholder-class='placeholder' /> </view> </view> + <view class="item rel"> <view class="acea-row row-middle"> <text class="item-name">验证码</text> @@ -155,6 +166,7 @@ </button> </view> </view> + <view class="item" v-if="isShowCode"> <view class="acea-row row-middle"> <text class="item-name">验证码</text> @@ -194,7 +206,6 @@ <view class="settlementAgreement" v-if="isshow"> <view class="setAgCount" style="width: 100%;height: 100%;padding-top: 180rpx;"> - <!-- <i class="icon iconfont icon-cha" @click="recuo"></i> --> <view class="" style="width: 60rpx;height: 60rpx; position: absolute;left: 30rpx; top:90rpx" @click="recuo"> <i class="iconfont icon-xiangzuo" style="width: 60rpx;height: 60rpx;font-size: 40rpx;"></i> @@ -206,11 +217,9 @@ <view class="contenta" v-if="detail.mer_services_agree"> <jyf-parser :html="detail.mer_services_agree" ref="article" :tag-style="tagStyle"></jyf-parser> - </view> <view class="contenta" v-else> <jyf-parser :html="detail.mer_supply_agree" ref="article" :tag-style="tagStyle"></jyf-parser> - </view> <view class="setAgCountbtn"> @@ -274,7 +283,8 @@ import { getStreet, getArea, - getVillage + getVillage, + getCitys } from "@/api/article.js" import { mapGetters @@ -349,9 +359,11 @@ StreetTyoeArr: [{ area_id: '', street_id: '', + city_id: '', village_id: '' }], mer_storeType: '', + city_id: '', area_id: '', street_id: '', village_id: '', @@ -402,7 +414,7 @@ this.$nextTick(function() { this.getGoodsDetails(options.mer_i_id) }) - } else this.getArea() + } else this.getCity() this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 45; }, @@ -477,57 +489,88 @@ }, // 获取村 - getVillage(e) { + getVillage(street = null) { const self = this; getVillage({ - street_code: e + street_code: street }).then(res => { - self.$set(self.business, 2, res.data); + self.$set(self.business, 3, res.data); if (self.mer_i_id && !this.business_name) { - let area = self.business[0].find(item => item.code == self.area_id)?.name; - let street = self.business[1].find(item => item.code == self.street_id)?.name; - let village = self.business[2].find(item => item.id == self.village_id)?.name; - this.business_name = `${area} ${street} ${village}`; - this.getArea(); + let city = self.business[0].find(item => item.code == self.city_id)?.name; + const zero = self.business[0].findIndex(item => item.code == self.city_id); + this.index2[0] = zero; + + let area = self.business[1].find(item => item.code == self.area_id)?.name; + const one = self.business[0].findIndex(item => item.code == self.area_id); + this.index2[1] = one; + + + let street = self.business[2].find(item => item.code == self.street_id)?.name; + const two = self.business[0].findIndex(item => item.code == self.street_id); + this.index2[2] = two; + + let village = self.business[3].find(item => item.id == self.village_id)?.name; + const three = self.business[0].findIndex(item => item.code == self.village_id); + this.index2[3] = three; + + this.business_name = `${city} ${area} ${street} ${village}`; } }) }, //获取镇 - getStreet(e, street) { + getStreet(area = null, street = null) { const self = this; getStreet({ - area_code: e + area_code: area }).then(res => { - self.$set(self.business, 1, res.data) - self.getVillage(street ? street : self.business[1][0].code) + this.business[2] = res.data; + street = street == null ? self.business[2][0].code : street; + self.getVillage(street) }) }, //获取区 - getArea(code = null, street = null) { + getArea(city = null, area = null, street = null) { getArea({ - city_code: 510500 + city_code: city }).then(res => { + this.business[1] = res.data; + area = area == null ? this.business[1][0].code : area; + this.getStreet(area, street) + }) + }, + + // 获取市 + getCity(city = null, area = null, street = null) { + getCitys().then(res => { this.business[0] = res.data; - this.code1 = code ? code : this.business[0][0].code; - this.getStreet(this.code1, street) + const code = this.business[0][0].code; //市 初始化 + city = city == null ? code : city; + + this.getArea(city, area, street); }) }, //商圈数据变化 pickerColumnchange(e) { - if (e.detail.column === 0) { - this.getStreet(this.business[0][e.detail.value].code) + if (e.detail.column === 0) { //第0列 + this.getArea(this.business[0][e.detail.value].code); this.index2[0] = e.detail.value this.index2[1] = 0 this.index2[2] = 0 + this.index2[3] = 0 } else if (e.detail.column === 1) { - this.getVillage(this.business[1][e.detail.value].code) + this.getStreet(this.business[1][e.detail.value].code) this.index2[1] = e.detail.value this.index2[2] = 0 - } else if (e.detail.column === 1) { + this.index2[3] = 0 + } else if (e.detail.column === 2) { + this.getVillage(this.business[2][e.detail.value].code) this.index2[2] = e.detail.value + this.index2[3] = 0 + } else if (e.detail.column == 3) { + this.index2[3] = e.detail.value } }, @@ -549,7 +592,6 @@ // 获取历史提交数据详情 getGoodsDetails(id) { getGoodsDetails(id).then(res => { - let resData = res.data this.merchantData.enterprise_name = resData.mer_name this.merchantData.user_name = resData.name @@ -560,9 +602,9 @@ this.merchantData.invitation_code = resData.invitation_code this.merchantData.classification = resData.merchant_category_id this.merchantData.mer_type = resData.mer_type_id + this.city_id = resData.city_id; this.area_id = resData.area_id this.street_id = resData.street_id - this.mer_storeType = resData.mer_storeType this.village_id = resData.village_id const bankInfo = resData.financial_bank ? JSON.parse(resData.financial_bank) : ''; @@ -578,7 +620,8 @@ this.mer_classification = this.getCategoryName(resData.merchant_category_id, this.array) this.mer_storeType = this.getStoreTypeName(resData.mer_type_id, this.storeTypeArr) this.business_name = ''; - this.getArea(this.area_id, this.street_id); + + this.getCity(this.city_id, this.area_id, this.street_id); if (resData.mer_type_id != 12) { this.shoplist('mer_services_agree') } else { @@ -605,66 +648,26 @@ }, bindPickerChange: function(e) { - // console.log(e.detail); - // this.index = e.target.value[1]; let idx = e.target.value; - // let idx = e.target.value[1]; this.merchantData.classification = this.array[idx]['merchant_category_id'] this.mer_classification = this.array[idx]['category_name'] - // this.merchantData.classification = this.bindPickerChangeidx[idx]['store_category_id'] - // this.mer_classification = this.bindPickerChangeidx[idx]['cate_name'] this.validateBtn() }, columnchange(e) { - // console.log(e.detail); if (e.detail.column == 0) { this.bindPickerChangeidx = this.array[e.detail.value].children; } }, - bindPickerChange1: function(e) { - - this.index1 = e.target.value - let idx = e.target.value - this.merchantData.mer_type = this.storeTypeArr[idx]['mer_type_id'] - this.mer_storeType = this.storeTypeArr[idx]['type_name'] - // console.log(this.merchantData.mer_type) - if (this.storeTypeArr[idx]['type_code'] == 'TypeStore' && this.merchantData.mer_type) { - this.shoplist('mer_services_agree') - } else { - this.shoplist('mer_supply_agree') - } - this.validateBtn() - }, - bindPickerChange2: function(e) { - // console.log(e.detail.value) this.index2 = e.detail.value this.business_name = - `${this.business[0][this.index2[0]].name} ${this.business[1][this.index2[1]].name} ${this.business[2][this.index2[2]].name}` - this.area_id = this.business[0][this.index2[0]].code - this.street_id = this.business[1][this.index2[1]].code - this.village_id = this.business[2][this.index2[2]].id - // return; // 种养殖户入驻也不需要 - if (this.merchantData.mer_type == 12) return; //市级供应链不需要查询镇农科公司 - merstreet({ - area_code: this.area_id - }).then((res) => { - if (res.code == 0) { - this.company = '' - this.organization_code = '' - // this.$util.Tips({ - // title: res.msg - // }); - return false; - } else { - this.company = res.data.title - this.organization_code = res.data.organization_code - } - }).catch(res => { - console.log(res) - }) + `${this.business[0][this.index2[0]].name} ${this.business[1][this.index2[1]].name} ${this.business[2][this.index2[2]].name} ${this.business[3][this.index2[3]].name}` + this.city_id = this.business[0][this.index2[0]].code; + this.area_id = this.business[1][this.index2[1]].code; + this.street_id = this.business[2][this.index2[2]].code + this.village_id = this.business[3][this.index2[3]].id }, // 获取商户分类 @@ -863,6 +866,7 @@ name: that.merchantData.user_name, code: that.merchantData.yanzhengma, address: that.merchantData.address, + city_id: this.city_id, area_id: this.area_id, street_id: this.street_id, village_id: this.village_id, @@ -987,6 +991,30 @@ title: '请上传营业执照' }); + if (!this.merchantData.bank_code) { + return that.$util.Tips({ + title: '请输入银行卡号' + }); + } + + if (!this.merchantData.bank_username) { + return that.$util.Tips({ + title: '请输入开户银行' + }); + } + + if (!this.merchantData.bank_opening) { + return that.$util.Tips({ + title: '请输入开户网点' + }); + } + + if (!this.merchantData.bank_card_username) { + return that.$util.Tips({ + title: '请输入持卡人姓名' + }); + } + that.validate = true; return true; }, @@ -1026,7 +1054,6 @@ } .header { - height: 440rpx; width: 100%; text-align: center; @@ -1129,6 +1156,29 @@ width: calc(100% - 30px); } + .list-title { + position: relative; + font-weight: 600; + font-size: 30rpx; + color: #40AE36; + text-align: center; + margin-bottom: 40rpx; + + &::after { + content: ""; + display: inline-block; + position: absolute; + bottom: 0; + left: 50%; + transform: translateX(-50%); + width: 233rpx; + height: 14rpx; + background: #40AE36; + opacity: 0.36; + filter: blur(6px); + } + } + .application-record { position: absolute; display: flex; diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue index d7f767e..619635f 100644 --- a/pages/users/order_confirm/index.vue +++ b/pages/users/order_confirm/index.vue @@ -602,7 +602,13 @@ value: 'offline', title: '线下支付', payStatus: 2, - }, + }, { + "name": "对公转账", + "icon": "icon-yinhangqia", + value: 'public', + title: '对公转账', + payStatus: 1, + } ], tagStyle: { img: 'width:100%;display:block;',