| | |
| | | VUE_APP_CONTEXT_PATH = './' |
| | | |
| | | # 接口前缀 |
| | | VUE_APP_API_PREFIX = '/jinkuai_admin' |
| | | VUE_APP_API_PREFIX = '/nyx_admin' |
| | |
| | | # 开发环境配置 |
| | | NODE_ENV = 'development' |
| | | VUE_APP_API_URL = 'http://192.168.1.4:10010' |
| | | # VUE_APP_API_URL = 'https://jinkuai.832smartfarm.com/jinkuai_admin' |
| | |
| | | # 关闭DEBUG |
| | | VUE_APP_DEBUG = 'off' |
| | | |
| | | VUE_APP_API_URL = 'https://jinkuai.832smartfarm.com/jinkuai_admin' |
| | | VUE_APP_API_URL = 'https://llfc.lmpro.cn/nyx_admin' |
| | |
| | | } |
| | | } else { |
| | | if (currentPath !== item.pagePath) { |
| | | if(item.pagePath ==='/pages/itinerary/itinerary'){ |
| | | uni.setStorageSync("orderStatus",-1) |
| | | } |
| | | uni.switchTab({ |
| | | url: item.pagePath |
| | | }) |
| | |
| | | Vue.prototype.$isResolve = resolve; |
| | | }) |
| | | |
| | | Vue.prototype.$baseUrl = 'http://192.168.1.4:10011' |
| | | // Vue.prototype.$baseUrl = 'https://jinkuai.832smartfarm.com/jinkuai_web/' |
| | | // Vue.prototype.$baseUrl = 'http://192.168.1.4:10011' |
| | | |
| | | Vue.prototype.$baseUrl = 'https://llfc.lmpro.cn/nyx_web/' |
| | | |
| | | const app = new Vue({ |
| | | store, |
| | |
| | | /* 快应用特有相关 */ |
| | | "quickapp" : {}, |
| | | /* 小程序特有相关 */ |
| | | "optimization" : { |
| | | /* "optimization" : { |
| | | "subPackages" : true |
| | | }, |
| | | }, */ |
| | | "mp-weixin" : { |
| | | "appid" : "wxb1b59320e803dc6c", |
| | | "setting" : { |
| | |
| | | "uniStatistics" : { |
| | | "enable" : false |
| | | }, |
| | | "vueVersion" : "2" |
| | | "vueVersion" : "2", |
| | | "h5" : { |
| | | "sdkConfigs" : { |
| | | "maps" : {} |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | "path": "pages/write-off/write-off", |
| | | "style": { |
| | | "navigationBarTitleText": "手动核验" |
| | | "navigationBarTitleText": "订单核验" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/write-off-a/write-off-a", |
| | | "style": { |
| | | "navigationBarTitleText": "订单核验" |
| | | } |
| | | }, |
| | | { |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/orders/orders", |
| | | "style": { |
| | | "navigationBarTitleText": "门店订单" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/order-details/order-details", |
| | | "style": { |
| | | "navigationBarTitleText": "门店订单详情", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/withdraw/withdraw", |
| | | "style": { |
| | | "navigationBarTitleText": "提现" |
| | |
| | | <view class="tips" v-if="info.overdueStatus !==0"> |
| | | <image src="/static/icon/ic_waring@2x.png" mode="widthFix"></image> |
| | | <text v-if="info.overdueStatus ===1">已超过取件时间,已产生超时费用:¥{{((info.overdueFee || 0)/100).toFixed(2)}}元</text> |
| | | <text v-if="info.overdueStatus ===2">已超过取件时间,需要支付超时费用:¥{{((info.overdueFee || 0)/100).toFixed(2)}}元</text> |
| | | <text v-if="info.overdueStatus ===3">超过取件时间,已支付超时费用:¥{{((info.overdueFee || 0)/100).toFixed(2)}}元</text> |
| | | <text v-if="info.overdueStatus ===3">已超过取件时间,需要支付超时费用:¥{{((info.overdueFee || 0)/100).toFixed(2)}}元</text> |
| | | <text v-if="info.overdueStatus ===4">超过取件时间,已支付超时费用:¥{{((info.overdueFee || 0)/100).toFixed(2)}}元</text> |
| | | </view> |
| | | <view class="footer" v-if="info.type===0"> |
| | | <view class="footer-btns"> |
| | |
| | | <view class="btn you" @click="payOrder(info)" v-if="info.status ===0">立即支付</view> |
| | | <!-- <view class="btn you" v-if="info.status >=1 &&info.status <7 " @click="openQrcode(info)" >核销码</view> |
| | | --> <view class="btn you" @click="evaluateOrder(info)" v-if="info.status ===7 && !info.commentStatus ">评价订单</view> |
| | | <view class="btn you" @click="payOrderFee(info)" v-if="info.status ===5 && info.overdueStatus===2 ">立即支付</view> |
| | | <view class="btn you" @click="payOrderFee(info)" v-if="info.status ===5 && info.overdueStatus===3 ">立即支付</view> |
| | | </view> |
| | | </view> |
| | | <view class="footer" v-if="info.type===1"> |
| | |
| | | <!-- <view class="btn you" v-if="info.status ===1 || (info.takeShopId && info.status ===5)" @click="openQrcode(info)" >核销码</view> |
| | | --> <view class="btn you" @click="doneOrder(info)" v-if="!info.takeShopId && info.status ===5">确认收货</view> |
| | | <view class="btn you" @click="evaluateOrder(info)" v-if="info.status ===7 && !info.commentStatus ">评价订单</view> |
| | | <view class="btn you" @click="payOrderFee(info)" v-if="info.status ===5 && info.overdueStatus ===2">立即支付</view> |
| | | <view class="btn you" @click="payOrderFee(info)" v-if="info.status ===5 && info.overdueStatus ===3">立即支付</view> |
| | | </view> |
| | | </view> |
| | | <u-popup :show="showPhone" round="15" mode="bottom" :safeAreaInsetBottom="true" @close="contactPhone()" :closeable="true" :closeOnClickOverlay="true"> |
| | |
| | | } |
| | | }, |
| | | onShow() { |
| | | }, |
| | | onLoad(options) { |
| | | this.id = options.id |
| | | this.info={} |
| | | this.showDone=false |
| | | this.showCancel=false |
| | |
| | | this.showPhone=false |
| | | this.getUserDetail() |
| | | this.linkItem={title:'',linkname:'',linkphone:''} |
| | | }, |
| | | onLoad(options) { |
| | | this.id = options.id |
| | | }, |
| | | methods:{ |
| | | previewImage(images,index = 0) { |
| | |
| | | <text class="rate-text">{{ form.driverScore }}星</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="divider"></view> |
| | | |
| | | <view class="rate-block" v-if="info.type ===1 && info.takeShopId "> |
| | | <view class="title-row"> |
| | | <text class="title-label">收件门店:</text> |
| | |
| | | <view class="service-card deposit-card" @click="jumpxiadan"> |
| | | <image class="service-image" src="/static/image/home_ic_jicun@2x.png" mode="aspectFit"></image> |
| | | </view> |
| | | <view class="service-card retrieve-card"> |
| | | <view class="service-card retrieve-card" @click="jumpOrderList(3)"> |
| | | <image class="service-image" src="/static/image/home_ic_qujian@2x.png" mode="aspectFit"></image> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="notice-card"> |
| | | <view class="notice-card" v-if="ingOrder && ingOrder.orderId" @click="jumpOrderDetail(ingOrder.orderId)"> |
| | | <view class="notice-icon-wrap"> |
| | | <image src="/static/icon/home_ic_daizhifu@2x.png" mode="aspectFit"></image> |
| | | </view> |
| | | <view class="notice-copy"> |
| | | <text class="notice-title">待支付</text> |
| | | <text class="notice-text">请在 10 分钟内完成支付,超时订单将自动取消</text> |
| | | <text class="notice-title">{{ingOrder.statusDesc || ''}}</text> |
| | | <text class="notice-text">{{ingOrder.tip || ''}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | bannerList: [], |
| | | pointList: [], |
| | | page: 1, |
| | | ingOrder:null, |
| | | isRequest: true |
| | | } |
| | | }, |
| | |
| | | await this.getNearbyShopList() |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.ingOrder =null |
| | | this.getIngorder() |
| | | }, |
| | | onReachBottom() { |
| | | if (this.cityId && this.latitude && this.longitude) { |
| | | this.getNearbyShopList() |
| | | } |
| | | }, |
| | | methods: { |
| | | jumpOrderDetail(id){ |
| | | uni.navigateTo({ |
| | | url:'/pages/delivery-order-detail/delivery-order-detail?userType=0&id='+id |
| | | }) |
| | | }, |
| | | async getIngorder(){ |
| | | var that =this |
| | | let res = await that.$u.api.getActiveOrderTip() |
| | | if (res && res.code === 200) { |
| | | this.ingOrder = res.data |
| | | } |
| | | }, |
| | | jumpOrderList(status){ |
| | | uni.setStorageSync("orderStatus",status) |
| | | uni.switchTab({ |
| | | url: '/pages/itinerary/itinerary' |
| | | }) |
| | | }, |
| | | jumpxiadan() { |
| | | if (!this.cityId) return uni.showToast({ |
| | | title: '当前城市暂未开通', |
| | |
| | | <text class="head-name text-ellipsis">{{ item.depositShopName||'' }}</text> |
| | | <text class="head-user">{{ item.takeUser ||'' }}</text> |
| | | </view> |
| | | <text v-if="item.status < 7" class=" status-text status-orange">{{ item.statusName||'' }}</text> |
| | | <text v-else-if="item.status ===7" class=" status-text status-grey">{{ item.statusName||'' }}</text> |
| | | <text v-else-if="item.status >7" class=" status-text status-grey">{{ item.statusName||'' }}</text> |
| | | <view style="display: flex;flex-direction: column;"> |
| | | <text v-if="item.status ===5 && item.overdueStatus ===1 " class="status-text" style="color: red;">超时未取件</text> |
| | | <text v-else-if="item.status ===5 && item.overdueStatus ===3 " class="status-text" style="color: red;">超时到店取件</text> |
| | | <text v-else-if="item.status < 7" class=" status-text status-orange">{{ item.statusName||'' }}</text> |
| | | <text v-else-if="item.status ===7" class=" status-text status-grey">{{ item.statusName||'' }}</text> |
| | | <text v-else class=" status-text status-grey">{{ item.statusName||'' }}</text> |
| | | <text v-if="item.status ===5 && item.overdueStatus ===1 " class="status-text" style="color: red;font-size: 24rpx;">逾期费用¥{{((item.overdueFee || 0)/100).toFixed(2)}}</text> |
| | | <text v-if="item.status ===5 && item.overdueStatus ===3 " class="status-text" style="color: red;font-size: 24rpx;">逾期费用¥{{((item.overdueFee || 0)/100).toFixed(2)}}</text> |
| | | </view> |
| | | </view> |
| | | <view v-else class="head-city"> |
| | | <view class="head-copy city-left"> |
| | |
| | | <view class="arrow-head"></view> |
| | | </view> |
| | | <view class="head-copy city-right align-right"> |
| | | <text v-if="item.status < 7" class=" status-text status-orange">{{ item.statusName||'' }}</text> |
| | | <text v-else-if="item.status ===7" class="status-text status-grey" >{{ item.statusName||'' }}</text> |
| | | <text v-else-if="item.status >7" class=" status-text status-grey">{{ item.statusName||'' }}</text> |
| | | <view style="display: flex;flex-direction: column;"> |
| | | <text v-if="item.status ===5 && item.overdueStatus ===1 " class="status-text" style="color: red;">超时未取件</text> |
| | | <text v-else-if="item.status ===5 && item.overdueStatus ===3 " class="status-text" style="color: red;">超时到店取件</text> |
| | | <text v-else-if="item.status < 7" class=" status-text status-orange">{{ item.statusName||'' }}</text> |
| | | <text v-else-if="item.status ===7" class=" status-text status-grey">{{ item.statusName||'' }}</text> |
| | | <text v-else class=" status-text status-grey">{{ item.statusName||'' }}</text> |
| | | <text v-if="item.status ===5 && item.overdueStatus ===1 " class="status-text" style="color: red;font-size: 24rpx;">逾期费用¥{{((item.overdueFee || 0)/100).toFixed(2)}}</text> |
| | | <text v-if="item.status ===5 && item.overdueStatus ===3 " class="status-text" style="color: red;font-size: 24rpx;">逾期费用¥{{((item.overdueFee || 0)/100).toFixed(2)}}</text> |
| | | </view> |
| | | <text class="head-name text-ellipsis">{{ item.takeShopName || item.takeLocation||'' }}</text> |
| | | <text class="head-user">{{ item.takeUser||'' }}</text> |
| | | </view> |
| | |
| | | <view class="footer-btn contact-btn" v-if="item.status ===0 || item.status ===1" @click="cancelOrder(item)">取消订单</view> |
| | | <view class="footer-btn contact-btn" @click="deleteOrder(item)" v-if="item.status ===7 || item.status===96 || item.status == 99">删除订单</view> |
| | | <view class="footer-btn primary-btn" @click="payOrder(item)" v-if="item.status ===0">立即支付</view> |
| | | <view class="footer-btn primary-btn" @click="payOrderFee(item)" v-if="item.status ===5 && item.overdueStatus===3 ">立即支付</view> |
| | | <view class="footer-btn primary-btn" v-if="item.status >=1 &&item.status <7 " @click="openQrcode(item)" >核销码</view> |
| | | <view class="footer-btn primary-btn" @click="evaluateOrder(item)" v-if="item.status ===7 && !item.commentStatus ">评价订单</view> |
| | | </view> |
| | |
| | | <view class="footer-btn contact-btn" @click="contactPhone(item,0)" v-if="item.status ===1 || item.status ==2">联系门店</view> |
| | | <view class="footer-btn contact-btn" @click="contactPhone(item,2)" v-if="item.status ===3 || item.status ===4 ">联系骑手</view> |
| | | <view class="footer-btn contact-btn" @click="contactPhone(item,1)" v-if="item.status ===5">联系门店</view> |
| | | <view class="footer-btn contact-btn" v-if="item.status ===0" @click="cancelOrder(item)">取消订单</view> |
| | | <view class="footer-btn primary-btn" @click="payOrder(item)" v-if="item.status ===0">立即支付</view> |
| | | <view class="footer-btn contact-btn" v-if="item.status ===0" @click="cancelOrder(item)">取消订单</view> |
| | | <view class="footer-btn primary-btn" @click="payOrder(item)" v-if="item.status ===0">立即支付</view> |
| | | <view class="footer-btn primary-btn" @click="payOrderFee(item)" v-if="item.status ===5 && item.overdueStatus===3 ">立即支付</view> |
| | | <view class="footer-btn contact-btn" @click="deleteOrder(item)" v-if="item.status ===7 || item.status===96 || item.status == 99">删除订单</view> |
| | | <view class="footer-btn primary-btn" @click="cancelOrder(item)" v-if="item.status ===1">申请退款</view> |
| | | <view class="footer-btn primary-btn" v-if="item.status ===1 || (item.takeShopId && item.status ===5)" @click="openQrcode(item)" >核销码</view> |
| | |
| | | { label: '待配送', value: 2 }, |
| | | { label: '待收货', value: 3}, |
| | | { label: '已完成', value: 4}, |
| | | { label: '已退款', value: 5} |
| | | { label: '已取消', value: 5} |
| | | ], |
| | | dataList: [] |
| | | } |
| | |
| | | onLoad(options) { |
| | | console.log(options ) |
| | | this.activeTab = -1 |
| | | if (options.status != null && options.status != undefined) { |
| | | /* if (options.status != null && options.status != undefined) { |
| | | this.activeTab = Number(options.status) |
| | | } |
| | | } */ |
| | | var that =this |
| | | uni.$on('updateOrder',function(data){ |
| | | console.log('监听到事件来自 update ,携带参数 msg 为:' ,data); |
| | |
| | | }) |
| | | }, |
| | | onShow() { |
| | | |
| | | this.activeTab = -1 |
| | | this.showDone=false |
| | | this.showCancel=false |
| | | this.showDelete=false |
| | |
| | | this.linkItem={title:'',linkname:'',linkphone:''} |
| | | var orderStatus = uni.getStorageSync("orderStatus"); |
| | | console.log(orderStatus,"==================") |
| | | if (orderStatus != null &&orderStatus != undefined) { |
| | | this.activeTab = Number(orderStatus) |
| | | if (orderStatus != null &&orderStatus != undefined ) { |
| | | if( Number(orderStatus) === -2){ |
| | | this.activeTab = 0 |
| | | } else{ |
| | | this.activeTab = Number(orderStatus) |
| | | } |
| | | } |
| | | if(this.ac) |
| | | uni.clearStorageSync("orderStatus") |
| | | // this.getFirstPageData() |
| | | this.getFirstPageData() |
| | | }, |
| | | onReachBottom(){ |
| | | this.getDataList(); |
| | | }, |
| | | methods: { |
| | | payOrderFee(info){ |
| | | var that = this; |
| | | uni.showLoading({ title: '发起支付中...', mask: true }) |
| | | this.$u.api.payOverdueFee({ |
| | | orderId: info.id |
| | | }).then(res => { |
| | | uni.hideLoading() |
| | | if (res.code === 200 && res.data) { |
| | | let paymentData = res.data.response |
| | | uni.requestPayment({ |
| | | provider: 'wxpay', |
| | | timeStamp: paymentData.timeStamp || '', |
| | | nonceStr: paymentData.nonceStr || '', |
| | | package: paymentData.package || '', |
| | | signType: paymentData.signType || 'MD5', |
| | | paySign: paymentData.paySign || '', |
| | | success: (res) => { |
| | | that.getFirstPageData() |
| | | }, |
| | | fail: (err) => { |
| | | if (err.errMsg.includes('cancel')) { |
| | | uni.showToast({ title: '已取消支付', icon: 'none' }) |
| | | } else { |
| | | uni.showToast({ title: '支付失败', icon: 'none' }) |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | | uni.showToast({ title: res.msg || '支付失败', icon: 'none' }) |
| | | } |
| | | }).catch(err => { |
| | | uni.hideLoading() |
| | | uni.showToast({ title: '支付失败', icon: 'none' }) |
| | | }) |
| | | }, |
| | | payOrder(item){ |
| | | var that = this; |
| | | uni.showLoading({ title: '发起支付中...', mask: true }) |
| | |
| | | } |
| | | }, |
| | | toOrderDetail(label) { |
| | | uni.setStorageSync("orderStatus",label) |
| | | uni.setStorageSync("orderStatus",label===0?-2:label) |
| | | uni.switchTab({ |
| | | url: '/pages/itinerary/itinerary?status=' + label |
| | | url: '/pages/itinerary/itinerary' |
| | | }) |
| | | }, |
| | | toSetting() { |
| | |
| | | |
| | | export default { |
| | | computed: { |
| | | ...mapState(['openid', 'userInfo']) |
| | | ...mapState(['openid', 'userInfo','userType']) |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | onLoad() { |
| | | // 静默登录 |
| | | |
| | | if (this.userInfo.bindShopId) { |
| | | this.$u.api.shopSilentLogin({}) |
| | | .then(async res => { |
| | | if (res.code === 200) { |
| | | this.$store.commit('setUserType', 1) |
| | | this.$store.commit('setShopToken', res.data.token) |
| | | // 获取门店信息 |
| | | const shopInfoRes = await this.$u.api.getShopInfo({}) |
| | | if (shopInfoRes.code === 200) { |
| | | this.$store.commit('setShopInfo', shopInfoRes.data) |
| | | uni.showLoading({ |
| | | title:'登录中...' |
| | | }) |
| | | try{ |
| | | console.log(this.userType,"============================================") |
| | | this.$u.api.shopSilentLogin({}) |
| | | .then( res => { |
| | | if (res.code === 200) { |
| | | this.$store.commit('setUserType', 1) |
| | | this.$store.commit('setShopToken', res.data.token) |
| | | // 获取门店信息 |
| | | this.$u.api.getShopInfo({}).then( shopInfoRes => { |
| | | if (shopInfoRes.code === 200) { |
| | | this.$store.commit('setShopInfo', shopInfoRes.data) |
| | | } |
| | | uni.hideLoading(); |
| | | // setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '/shop/pages/store-home/store-home' |
| | | }); |
| | | // }, 1000) |
| | | }) |
| | | } |
| | | setTimeout(() => { |
| | | uni.reLaunch({ |
| | | url: '/shop/pages/store-home/store-home' |
| | | }); |
| | | }, 1000) |
| | | } |
| | | }) |
| | | }) |
| | | }catch(e){ |
| | | uni.hideLoading() |
| | | } |
| | | setTimeout(() => { |
| | | uni.hideLoading() |
| | | }, 10000) |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | <template> |
| | | <view class="qualification-page"> |
| | | <!-- <view class="type-tabs"> |
| | | <view class="tab-item" :class="{ active: currentType === 'personal' }" @tap="currentType = 'personal'">个人资质</view> |
| | | <view class="tab-item" :class="{ active: currentType === 'company' }" @tap="currentType = 'company'">企业资质</view> |
| | | </view> --> |
| | | |
| | | <view class="card base-card"> |
| | | <view class="store-row"> |
| | | <image class="store-cover" src="" mode="aspectFill"></image> |
| | | <image class="store-cover" @click="previewImage([info.shopAvatar],0)" :src="(info.shopAvatar)?info.shopAvatar:'/static/icon/default2.png'" mode="aspectFill"></image> |
| | | <view class="store-info"> |
| | | <text class="store-name">中铁快运南站旗舰店</text> |
| | | <text class="store-line">联系人:苏眠眠</text> |
| | | <text class="store-line">联系电话:18155114565</text> |
| | | <text class="store-name">{{info.name||''}}</text> |
| | | <text class="store-line">联系人:{{info.linkName || ''}}</text> |
| | | <text class="store-line">联系电话:{{info.linkPhone || ''}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="detail-block"> |
| | | <view class="info-row"> |
| | | <text class="info-label">省市区:</text> |
| | | <text class="info-value">安徽省合肥市经济技术开发区</text> |
| | | <text class="info-value">{{info.provinceName || ''}}{{info.cityName || ''}}{{info.areaName || ''}}</text> |
| | | </view> |
| | | <view class="info-row"> |
| | | <text class="info-label">门店地址:</text> |
| | | <text class="info-value">莲花路200号莲花产业园F栋401</text> |
| | | <text class="info-value">{{info.address || ''}}</text> |
| | | </view> |
| | | |
| | | <template v-if="currentType === 'personal'"> |
| | | <template v-if="info.companyType === 0" > |
| | | <view class="info-row"> |
| | | <text class="info-label">身份证号:</text> |
| | | <text class="info-value">3401823742786473267</text> |
| | | <text class="info-value">{{info.idcard || ''}}</text> |
| | | </view> |
| | | <view class="material-row top-align"> |
| | | <text class="info-label">身份证:</text> |
| | | <view class="material-list double-list"> |
| | | <image class="material-image id-card" src="" mode="aspectFill"></image> |
| | | <image class="material-image id-card" src="" mode="aspectFill"></image> |
| | | <image class="material-image id-card" @click="previewImage([info.idcardImgUrl],0)" :src="info.idcardImgUrl?info.idcardImgUrl:'/static/icon/default2.png'" mode="aspectFill"></image> |
| | | <image class="material-image id-card" @click="previewImage([info.idcardImgBackUrl],0)" :src="info.idcardImgBackUrl?info.idcardImgBackUrl:'/static/icon/default2.png'" mode="aspectFill"></image> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | <view class="material-row top-align license-row"> |
| | | <text class="info-label">营业执照:</text> |
| | | <view class="material-list single-list"> |
| | | <image class="material-image license-image" src="" mode="aspectFill"></image> |
| | | <image class="material-image license-image" @click="previewImage([info.businessImgUrl],0)" :src="info.businessImgUrl?info.businessImgUrl:'/static/icon/default2.png'" mode="aspectFill"></image> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | |
| | | <view style="width: 100%; height: 20rpx; background-color: #F7F7F7;"></view> |
| | | |
| | | <view v-if="currentType === 'personal'" class="card subject-card"> |
| | | <view v-if="info.companyType === 0" class="card subject-card"> |
| | | <text class="section-title">主体资质</text> |
| | | <view class="material-group"> |
| | | <view class="material-row top-align"> |
| | | <text class="info-label">有效劳动合同:</text> |
| | | <view class="material-list triple-list"> |
| | | <image class="material-image contract-image" src="" mode="aspectFill"></image> |
| | | <image class="material-image contract-image" src="" mode="aspectFill"></image> |
| | | <image class="material-image contract-image" src="" mode="aspectFill"></image> |
| | | <text class="info-label">有效劳动合同:</text> |
| | | <view v-if=" info.laborContractImgUrls" class="material-list triple-list" > |
| | | <image @click="previewImage(info.laborContractImgUrls,index)" v-for="(item,index) in info.laborContractImgUrls" :key="item" class="material-image contract-image" :src="item" mode="aspectFill"></image> |
| | | </view> |
| | | </view> |
| | | <view class="material-row top-align proof-row"> |
| | | <text class="info-label">社保缴纳证明:</text> |
| | | <view class="material-list single-list"> |
| | | <image class="material-image proof-image" src="" mode="aspectFill"></image> |
| | | <view v-if=" info.socialSecurityImgUrls" class="material-list triple-list" > |
| | | <image @click="previewImage(info.socialSecurityImgUrls,index)" v-for="(item,index) in info.socialSecurityImgUrls" :key="item" class="material-image contract-image" :src="item" mode="aspectFill"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="detail-block legal-block"> |
| | | <view class="info-row"> |
| | | <text class="info-label">法人姓名:</text> |
| | | <text class="info-value">张光宣</text> |
| | | <text class="info-value">{{info.legalPersonName||''}}</text> |
| | | </view> |
| | | <view class="info-row"> |
| | | <text class="info-label">法人电话:</text> |
| | | <text class="info-value">181554462589</text> |
| | | <text class="info-value">{{info.legalPersonPhone ||''}}</text> |
| | | </view> |
| | | <view class="info-row"> |
| | | <text class="info-label">身份证号:</text> |
| | | <text class="info-value">3401823742786473267</text> |
| | | <text class="info-value">{{info.legalPersonCard || ''}}</text> |
| | | </view> |
| | | <view class="material-row top-align"> |
| | | <text class="info-label">身份证:</text> |
| | | <view class="material-list double-list"> |
| | | <image class="material-image id-card" src="" mode="aspectFill"></image> |
| | | <image class="material-image id-card" src="" mode="aspectFill"></image> |
| | | <image class="material-image id-card" :src="info.idcardImgUrl?info.idcardImgUrl:'/static/icon/default2.png'" mode="aspectFill"></image> |
| | | <image class="material-image id-card" :src="info.idcardImgBackUrl?info.idcardImgBackUrl:'/static/icon/default2.png'" mode="aspectFill"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapState } from 'vuex' |
| | | export default { |
| | | computed: { |
| | | ...mapState(['navHeight', 'statusbarHeight','shopInfo','shopToken']) |
| | | }, |
| | | data() { |
| | | return { |
| | | currentType: 'personal' |
| | | id:null, |
| | | qrcodeImage:null, |
| | | showCancel:false, |
| | | info:{} |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.info ={} |
| | | this.getMyShop() |
| | | }, |
| | | onLoad(options) { |
| | | }, |
| | | methods:{ |
| | | previewImage(images,index = 0) { |
| | | uni.previewImage({ |
| | | current: index, |
| | | urls: images |
| | | }); |
| | | }, |
| | | async getMyShop(index){ |
| | | var that =this |
| | | let res = await that.$u.api.getShopInfoDetail() |
| | | if (res.code === 200) { |
| | | this.info = res.data |
| | | console.log(this.info.laborContractImgUrls,this.info.laborContractImgUrls.length,"====================") |
| | | console.log(this.info,"====================") |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <view class="stats-section" :style="{ backgroundImage: 'url(' + bgImg + ')' }"> |
| | | <view class="stats-tabs"> |
| | | <view class="stats-tabs-left"> |
| | | <text class="tab-item active">今日</text> |
| | | <text class="tab-item">本月</text> |
| | | <text class="tab-item">上月</text> |
| | | <view :class="'tab-item '+(active ==0?'active':'')" @click="changeActive(0)">今日</view> |
| | | <view :class="'tab-item '+(active ==1?'active':'')" @click="changeActive(1)">本月</view> |
| | | <view :class="'tab-item '+(active ==2?'active':'')" @click="changeActive(2)">上月</view> |
| | | </view> |
| | | <text class="tab-item right">在库订单: 10</text> |
| | | <text class="tab-item right">在库订单: {{countData.storageCount||0}}</text> |
| | | </view> |
| | | |
| | | <view class="stats-cards"> |
| | |
| | | <text>销售额(元)</text> |
| | | <image class="stat-icon" src="/static/icon/ic_visible@2x.png"></image> |
| | | </view> |
| | | <text class="stat-value">12,000.00</text> |
| | | <text class="stat-value">{{countData.salesAmount}}</text> |
| | | </view> |
| | | <view class="stat-card"> |
| | | <view class="stat-label"> |
| | | <text>结算利润(元)</text> |
| | | </view> |
| | | <text class="stat-value">1,200.00</text> |
| | | <text class="stat-value">{{countData.settlementProfit}}</text> |
| | | </view> |
| | | <view class="stat-card"> |
| | | <view class="stat-label"> |
| | | <text>订单数</text> |
| | | </view> |
| | | <text class="stat-value">23</text> |
| | | <text class="stat-value">{{countData.orderCount||0}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | <!-- 功能按钮 --> |
| | | <view class="function-buttons"> |
| | | <view class="func-btn"> |
| | | <view class="func-btn" @click="jumpHexiaoOrder"> |
| | | <image class="func-icon" src="/static/icon/ic_zitihexiao@2x.png"></image> |
| | | <text class="func-text">门店出入库</text> |
| | | </view> |
| | | <view class="func-btn"> |
| | | <view class="func-btn" @click="jumpOrders()"> |
| | | <image class="func-icon" src="/static/icon/ic_dingdanguanli@2x.png"></image> |
| | | <text class="func-text">订单管理</text> |
| | | </view> |
| | | <view class="func-btn" @click="goToStoreInfo"> |
| | | <image class="func-icon" src="/static/icon/ic_wodezizhi@2x.png"></image> |
| | | <image class="func-icon" src="/static/icon/ic_zhuanshuhaibao@2x.png"></image> |
| | | <text class="func-text">门店信息</text> |
| | | </view> |
| | | <view class="func-btn" @click="goToQualification"> |
| | |
| | | <text class="func-text">门店资质</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <text class="section-title">待处理订单(2)</text> |
| | | |
| | | <text class="section-title">待处理订单({{total||0}})</text> |
| | | <!-- 待处理订单 --> |
| | | <view class="orders-section"> |
| | | <view class="order-item"> |
| | | <view class="order-header"> |
| | | <view class="order-item" v-for="(item,index) in dataList" :key="item.id"> |
| | | <view class="order-header" @click="jumpOrderDetails(item.id)"> |
| | | <view style="display: flex; align-items: center;"> |
| | | <view class="order-tag">就地寄存</view> |
| | | <text class="order-user">李明 181****1898</text> |
| | | <view class="order-tag">{{item.type===1?'同城配送':'就地寄存'}}</view> |
| | | <text class="order-user">{{item.takeUser || ''}} {{item.takePhone||''}}</text> |
| | | </view> |
| | | <text class="order-status">待核验</text> |
| | | <view style="display: flex;flex-direction: column;"> |
| | | <text v-if="item.status ===5 && item.overdueStatus ===1 " class="order-status" style="color: red;">超时未取件</text> |
| | | <text v-else-if="item.status ===5 && item.overdueStatus ===3 " class="order-status" style="color: red;">超时到店取件</text> |
| | | <text v-else class="order-status">{{item.statusName || ''}}</text> |
| | | <text v-if="item.status ===5 && item.overdueStatus ===1 " class="order-status" style="color: red;font-size: 24rpx;">逾期费用¥{{((item.overdueFee || 0)/100).toFixed(2)}}</text> |
| | | <text v-if="item.status ===5 && item.overdueStatus ===3 " class="order-status" style="color: red;font-size: 24rpx;">逾期费用¥{{((item.overdueFee || 0)/100).toFixed(2)}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="order-items"> |
| | | <view class="order-product"> |
| | | <view class="product-info"> |
| | | <text class="product-name">大件行李箱</text> |
| | | <text class="product-spec">24-28寸</text> |
| | | </view> |
| | | <view class="product-price-count"> |
| | | <text class="product-price">¥35</text> |
| | | <text class="product-count">x1</text> |
| | | </view> |
| | | </view> |
| | | <view class="order-product"> |
| | | <view class="product-info"> |
| | | <text class="product-name">中件行李箱</text> |
| | | <text class="product-spec">24-28寸</text> |
| | | </view> |
| | | <view class="product-price-count"> |
| | | <text class="product-price">¥35</text> |
| | | <text class="product-count">x1</text> |
| | | </view> |
| | | </view> |
| | | <view class="order-items" @click="jumpOrderDetails(item.id)"> |
| | | <view class="order-product" v-for="(item1,index1) in item.detailList" :key="item1.id"> |
| | | <view class="product-info"> |
| | | <text class="product-name">{{item1.luggageName || ''}}</text> |
| | | <text class="product-spec">{{item1.luggageDetail || ''}}</text> |
| | | </view> |
| | | <view class="product-price-count"> |
| | | <text class="product-price">¥{{((item1.subtotal || 0)/100).toFixed(2) }}</text> |
| | | <text class="product-count">x{{ item1.num || 1}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="order-footer"> |
| | | <text class="total-price"> |
| | | <text>实付款: </text> |
| | | <text>¥80.00</text> |
| | | <text>¥{{((item.estimatedAmount || 0)/100).toFixed(2) }}</text> |
| | | </text> |
| | | <view class="order-buttons"> |
| | | <button class="btn secondary">联系客户</button> |
| | | <button class="btn primary">扫码核销</button> |
| | | </view> |
| | | <button class="btn secondary" @click="contactPhoneDo(item.takePhone)">联系客户</button> |
| | | <button class="btn secondary" @click="contactPhoneDo(item.driverPhone)" v-if="item.type ===1&&(item.status === 4 || item.status === 3)">联系骑手</button> |
| | | <button class="btn primary" v-if="item.status ===1 " @click="jumpHexiaoOrder(item)">收件核销</button> |
| | | <button class="btn primary" v-if="item.status ===5 &&(item.overdueStatus ==0 || item.overdueStatus == 1)" @click="jumpHexiaoOrder(item)">确认到店</button> |
| | | <button class="btn primary" v-if="item.status ===5 && (item.overdueStatus == 4 || item.overdueStatus == 2) " @click="jumpHexiaoOrder(item)">取件核销</button> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="order-note">订单备注: 13:30来寄存</view> |
| | | <view class="order-note" v-if="item.remark">订单备注: <text>{{item.remark || '-'}}</text></view> |
| | | </view> |
| | | <view v-if="isLoadingMore" class="loading-text">加载中...</view> |
| | | <view v-else-if="!hasNext && dataList.length" class="loading-text">没有更多了</view> |
| | | <view v-else-if="!hasNext && !dataList.length" class="loading-text">暂无数据</view> |
| | | </view> |
| | | <custom-tabbar></custom-tabbar> |
| | | </view> |
| | |
| | | }, |
| | | onReachBottom() { |
| | | console.log('store-home onReachBottom') |
| | | this.getDataList(); |
| | | }, |
| | | onShow() { |
| | | this.shop ={} |
| | | this.checkShopLogin() |
| | | this.active=0 |
| | | this.shop = this.shopInfo || {} |
| | | this.getCountData(0) |
| | | this.total=0 |
| | | this.hasNext=true |
| | | this.currentPage = 0 |
| | | this.getFirstPageData() |
| | | }, |
| | | methods: { |
| | | goToStoreInfo() { |
| | | uni.navigateTo({ |
| | | url: '/shop/pages/store-info/store-info' |
| | | }) |
| | | }, |
| | | goToQualification() { |
| | | uni.navigateTo({ |
| | | url: '/shop/pages/qualification/qualification' |
| | | }) |
| | | }, |
| | | goToStore() { |
| | | uni.switchTab({ |
| | | url: '/pages/index/index' |
| | | }) |
| | | } |
| | | changeActive(index){ |
| | | this.getCountData(index) |
| | | }, |
| | | checkShopLogin(){ |
| | | /* var that =this |
| | | if( this.shopInfo ==null || this.shopInfo.id==null || this.shopToken==null || this.shopToken==''){ |
| | | this.jumpShopLogin() |
| | | } */ |
| | | }, |
| | | hexiaoOrder(item){ |
| | | uni.navigateTo({ |
| | | url:'/shop/pages/write-off-a/write-off-a?id='+item.id |
| | | }) |
| | | }, |
| | | jumpHexiaoOrder(){ |
| | | uni.navigateTo({ |
| | | url:'/shop/pages/write-off/write-off' |
| | | }) |
| | | }, |
| | | jumpOrders(){ |
| | | uni.navigateTo({ |
| | | url:'/shop/pages/orders/orders' |
| | | }) |
| | | }, |
| | | jumpOrderDetails(id){ |
| | | uni.navigateTo({ |
| | | url:'/shop/pages/order-details/order-details?id='+id |
| | | }) |
| | | }, |
| | | async getCountData(index){ |
| | | var that =this |
| | | let res = await that.$u.api.shopSalesStats({ period: index, endDate: null, startDate: null, tokenType:1 }) |
| | | if (res.code === 200) { |
| | | this.active = index |
| | | this.countData = res.data |
| | | this.countData.salesAmount = (this.countData.salesAmount||0.00 ).toFixed(2) |
| | | console.log(this.countData.salesAmount,'====================',1) |
| | | this.countData.settlementProfit = (this.countData.settlementProfit||0.00).toFixed(2) |
| | | this.countData.salesAmountNum = Math.floor(this.countData.salesAmount) |
| | | |
| | | console.log(this.countData.salesAmountNum,'====================',2) |
| | | this.countData.settlementProfitNum = Math.floor( this.countData.settlementProfit) |
| | | var t1 =(this.countData.salesAmount - this.countData.salesAmountNum).toFixed(2) |
| | | console.log(t1,'====================',3) |
| | | var t2 =(this.countData.settlementProfit - this.countData.settlementProfitNum).toFixed(2) |
| | | this.countData.salesAmountFloat =( t1+'').slice(1, 4) |
| | | |
| | | console.log(this.countData.salesAmountFloat,'====================',4) |
| | | this.countData.settlementProfitFloat = ( t2+'').slice(1, 4) |
| | | } |
| | | }, |
| | | getFirstPageData(){ |
| | | this.currentPage = 0 |
| | | this.hasNext=true |
| | | this.total=0 |
| | | this.dataList=[] |
| | | this.getDataList() |
| | | }, |
| | | async getDataList(){ |
| | | if(this.loading || !this.hasNext){ |
| | | return |
| | | } |
| | | this.loading=true |
| | | this.currentPage = this.currentPage+1 |
| | | if(this.currentPage == 1){ |
| | | this.hasNext =true |
| | | this.dataList=[] |
| | | } |
| | | var that =this |
| | | let res = await that.$u.api.shopOrderPage({ |
| | | capacity:this.pageSize, |
| | | model: { |
| | | combinedStatus: 7 |
| | | }, |
| | | page:this.currentPage |
| | | }); |
| | | if (res.code === 200 ) { |
| | | if ( res.data && res.data.page ===this.currentPage) { |
| | | res.data.records = res.data.records||[] |
| | | that.dataList.push(...res.data.records) |
| | | that.total=res.data.total |
| | | if( this.currentPage >= res.data.pageCount||0){ |
| | | that.hasNext=false |
| | | }else{ |
| | | that.hasNext=true |
| | | } |
| | | } |
| | | } |
| | | this.loading=false |
| | | }, |
| | | contactPhoneDo(phone){ |
| | | if( phone!=null && phonee!=''){ |
| | | uni.makePhoneCall({ |
| | | phoneNumber: phone |
| | | }) |
| | | } |
| | | }, |
| | | goToStoreInfo() { |
| | | uni.navigateTo({ |
| | | url: '/shop/pages/store-info/store-info' |
| | | }) |
| | | }, |
| | | goToQualification() { |
| | | uni.navigateTo({ |
| | | url: '/shop/pages/qualification/qualification' |
| | | }) |
| | | }, |
| | | goToStore() { |
| | | uni.switchTab({ |
| | | url: '/pages/index/index' |
| | | }) |
| | | }, |
| | | jumpShopLogin() { |
| | | uni.redirectTo({ |
| | | url: '/shop/pages/login/login' |
| | | }) |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | bgImg: require('@/static/image/bg_card@2x.png'), |
| | | show:false, |
| | | showHaibao:false, |
| | | showQrcode:false, |
| | | active:0, |
| | | loading:false, |
| | | showMoney:false, |
| | | showPhone:false, |
| | | currentPage:1, |
| | | total:0, |
| | | hasNext:true, |
| | | pageSize: 10, |
| | | isLoadingMore: false, |
| | | |
| | | dataList:[], |
| | | shop:{}, |
| | | linkItem:{}, |
| | | countData:{}, |
| | | orders: [ |
| | | { |
| | | id: 1, |
| | |
| | | background-color: $bg-color; |
| | | min-height: 100vh; |
| | | } |
| | | |
| | | .loading-text { |
| | | padding: 18rpx 0 8rpx; |
| | | text-align: center; |
| | | font-size: 22rpx; |
| | | color: #a5aab3; |
| | | } |
| | | /* 渐变背景容器 */ |
| | | .gradient-background { |
| | | padding: 0 30rpx; |
| | |
| | | .order-note { |
| | | width: 100%; |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | color: red; |
| | | background-color: #F8F9FB; |
| | | padding: 20rpx; |
| | | box-sizing: border-box; |
| | |
| | | <view class="top-gradient"></view> |
| | | <view class="form-card"> |
| | | <text class="page-title">门店信息</text> |
| | | |
| | | <view class="form-group"> |
| | | <text class="label">门店名称</text> |
| | | <input v-model="form.name" class="text-input align-left" type="text" placeholder="请输入门店名称" placeholder-style="color: #B2B2B2;" /> |
| | | <text class="text-input align-left" style="font-weight: 600;margin-left: 30rpx;">{{info.name}}</text> |
| | | </view> |
| | | |
| | | <view class="form-group"> |
| | | <text class="label">门店头像</text> |
| | | <view class="upload-row" style="margin-top: 20rpx;"> |
| | | <view class="upload-box" @click="chooseAndUploadImage(1)"> |
| | | <view class="upload-plus">+</view> |
| | | <text class="upload-text">上传照片</text> |
| | | </view> |
| | | <view :key="index" class="photo-box" v-if="form.coverImgUrl"> |
| | | <image class="photo-image" :src="form.coverImgUrl" mode="aspectFill"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="divider"></view> |
| | | |
| | | <view class="form-group textarea-group"> |
| | | <text class="label">门店介绍</text> |
| | | <input v-model="form.intro" class="text-input align-left" type="text" placeholder="请输入门店介绍" placeholder-style="color: #B2B2B2;" /> |
| | | <input v-model="form.content" class="text-input align-left" type="text" placeholder="请输入门店介绍" placeholder-style="color: #B2B2B2;" /> |
| | | </view> |
| | | |
| | | <view class="divider"></view> |
| | | |
| | | <view class="form-group switch-group"> |
| | | <view class="label-row"> |
| | | <text class="label">是否全天营业</text> |
| | | <text class="required">*</text> |
| | | </view> |
| | | <view class="switch-row"> |
| | | <view class="switch-pill" :class="{ active: !form.fullTime }" @tap="form.fullTime = false">是</view> |
| | | <view class="switch-pill" :class="{ active: form.fullTime }" @tap="form.fullTime = true">否</view> |
| | | <view class="switch-pill" :class="{ active: form.businessType ===1 }" @tap="form.businessType = 1">是</view> |
| | | <view class="switch-pill" :class="{ active: form.businessType===0 }" @tap="form.businessType = 0">否</view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-group"> |
| | | <view class="label-row"> |
| | | <text class="label">营业时间</text> |
| | | <text class="required">*</text> |
| | | </view> |
| | | <input v-model="form.businessHours" class="text-input align-left" type="text" placeholder="必填,请输入门店营业时间" placeholder-style="color: #B2B2B2;" /> |
| | | <input v-model="form.shopHours" class="text-input align-left" type="text" placeholder="必填,请输入门店营业时间" placeholder-style="color: #B2B2B2;" /> |
| | | </view> |
| | | |
| | | <view class="divider"></view> |
| | | |
| | | <view class="form-group"> |
| | | <text class="label">寄存类型</text> |
| | | <input v-model="form.storageType" class="text-input align-left" type="text" placeholder="请输入可寄存类型" placeholder-style="color: #B2B2B2;" /> |
| | | <input v-model="form.depositTypes" class="text-input align-left" type="text" placeholder="请输入可寄存类型" placeholder-style="color: #B2B2B2;" /> |
| | | </view> |
| | | |
| | | <view class="divider"></view> |
| | | |
| | | <view class="form-group"> |
| | | <view class="label-row"> |
| | | <text class="label">配送范围</text> |
| | | <text class="required">*</text> |
| | | </view> |
| | | <view class="input-with-unit"> |
| | | <input v-model="form.deliveryRange" class="text-input" type="digit" placeholder="必填,请输入" placeholder-style="color: #B2B2B2;" /> |
| | | <input v-model="form.deliveryArea" class="text-input" type="digit" placeholder="必填,请输入" placeholder-style="color: #B2B2B2;" /> |
| | | <text class="unit-text" style="font-size: 28rpx;">公里</text> |
| | | </view> |
| | | </view> |
| | |
| | | <text class="label">收费标准</text> |
| | | <text class="required">*</text> |
| | | </view> |
| | | <textarea v-model="form.chargeRule" class="text-area charge-area" placeholder="必填,请输入门店收费标准" placeholder-style="color: #B2B2B2;" auto-height></textarea> |
| | | <textarea v-model="form.feeStandard" class="text-area charge-area" placeholder="必填,请输入门店收费标准" placeholder-style="color: #B2B2B2;" auto-height></textarea> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="save-wrap"> |
| | | <view class="save-btn">保存</view> |
| | | <view class="save-btn" @click="maintainShop">保存</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapState } from 'vuex' |
| | | export default { |
| | | computed: { |
| | | ...mapState(['navHeight', 'statusbarHeight','shopInfo','shopToken']) |
| | | }, |
| | | data() { |
| | | return { |
| | | form: { |
| | | name: '', |
| | | intro: '', |
| | | fullTime: true, |
| | | businessHours: '', |
| | | storageType: '', |
| | | deliveryRange: '', |
| | | chargeRule: '' |
| | | info:{}, |
| | | form:{ |
| | | coverImgUrl:"", |
| | | businessType: 0, |
| | | content: "", |
| | | coverImg: "", |
| | | deliveryArea: 0, |
| | | depositTypes:"" , |
| | | feeStandard:"" , |
| | | shopHours: "" |
| | | } |
| | | } |
| | | }, |
| | | onShow() { |
| | | }, |
| | | onLoad() { |
| | | this.info ={} |
| | | this.getMyShop() |
| | | }, |
| | | methods:{ |
| | | previewImage(images,index = 0) { |
| | | uni.previewImage({ |
| | | current: index, |
| | | urls: images |
| | | }); |
| | | }, |
| | | async getMyShop(index){ |
| | | var that =this |
| | | let res1 = await that.$u.api.getShopInfoDetail() |
| | | if (res1.code === 200) { |
| | | this.info = res1.data |
| | | } |
| | | let res = await that.$u.api.maintainInfo() |
| | | if (res.code === 200) { |
| | | if(res.data){ |
| | | this.form ={ |
| | | coverImgUrl:res.data.coverImgUrl || '', |
| | | businessType: res.data.businessType || 0, |
| | | content: res.data.content || '', |
| | | coverImg: res.data.coverImg || '', |
| | | deliveryArea: res.data.deliveryArea || 0, |
| | | depositTypes: res.data.depositTypes || '', |
| | | feeStandard:res.data.feeStandard || '', |
| | | shopHours: res.data.shopHours || '', |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | maintainShop(index){ |
| | | if(this.loading){ |
| | | return; |
| | | } |
| | | if(!this.form.shopHours){ |
| | | uni.showToast({ |
| | | title:"请填写营业时间", |
| | | icon:'none' |
| | | }) |
| | | return |
| | | } |
| | | if(!this.form.deliveryArea){ |
| | | uni.showToast({ |
| | | title:"请填写配送范围", |
| | | icon:'none' |
| | | }) |
| | | return |
| | | } |
| | | if(!this.form.feeStandard){ |
| | | uni.showToast({ |
| | | title:"请填写收费标准", |
| | | icon:'none' |
| | | }) |
| | | return |
| | | } |
| | | this.loading = true |
| | | try{ |
| | | var that =this |
| | | that.$u.api.maintainShopInfo(this.form).then(res=>{ |
| | | if (res.code === 200) { |
| | | uni.showToast({ |
| | | title:"信息保存成功", |
| | | icon:'success' |
| | | }) |
| | | } |
| | | this.loading =false |
| | | }) |
| | | }catch(e){ |
| | | this.loading =false |
| | | } |
| | | }, |
| | | async uploadFiles(filePaths, maxCount =1) { |
| | | console.log("==================================1") |
| | | if (!filePaths || !filePaths.length) { |
| | | return null |
| | | } |
| | | |
| | | console.log("==================================3") |
| | | const uploadTasks = filePaths.map(filePath => { |
| | | return new Promise((resolve, reject) => { |
| | | uni.uploadFile({ |
| | | url: this.$baseUrl + '/web/public/upload', |
| | | filePath: filePath, |
| | | name: 'file', |
| | | formData: { |
| | | folder: 'shop' |
| | | }, |
| | | success: (res) => { |
| | | if (res.statusCode === 200) { |
| | | const data = JSON.parse(res.data) |
| | | if (data.code === 200) { |
| | | resolve(data.data) |
| | | } else { |
| | | |
| | | console.log("==================================6") |
| | | reject(new Error(data.msg || '上传失败')) |
| | | } |
| | | } else { |
| | | |
| | | console.log("==================================4") |
| | | reject(new Error('上传失败')) |
| | | } |
| | | }, |
| | | fail: (err) => { |
| | | |
| | | console.log("==================================5",err) |
| | | reject(err) |
| | | } |
| | | }) |
| | | }) |
| | | }) |
| | | try { |
| | | const results = await Promise.all(uploadTasks) |
| | | return results |
| | | } catch (error) { |
| | | uni.showToast({ |
| | | title: '上传失败', |
| | | icon: 'none' |
| | | }) |
| | | throw error |
| | | } |
| | | }, |
| | | async chooseAndUploadImage(maxCount = 1) { |
| | | var that = this |
| | | uni.chooseImage({ |
| | | count: 1, |
| | | sizeType: ['compressed'], |
| | | sourceType: ['album', 'camera'], |
| | | success: async (res) => { |
| | | const tempFilePaths = res.tempFilePaths |
| | | uni.showLoading({ |
| | | title: '上传中...', |
| | | mask: true |
| | | }) |
| | | try { |
| | | const uploadResults = await that.uploadFiles(tempFilePaths, maxCount) |
| | | |
| | | that.form.coverImgUrl = uploadResults.map(item => item.url || item.path || item)[0] |
| | | that.form.coverImg = uploadResults.map(item => item.imgaddr)[0] |
| | | console.log(that.form,"=====================================01") |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '上传成功', |
| | | icon: 'success' |
| | | }) |
| | | } catch (error) { |
| | | uni.hideLoading() |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .upload-row { |
| | | display: flex; |
| | | align-items: flex-start; |
| | | gap: 10rpx; |
| | | margin-bottom: 22rpx; |
| | | } |
| | | |
| | | .upload-box, |
| | | .photo-box { |
| | | width: 122rpx; |
| | | height: 122rpx; |
| | | border-radius: 0; |
| | | overflow: hidden; |
| | | position: relative; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .upload-box { |
| | | border: 1rpx dashed #c8ccd4; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .upload-plus { |
| | | font-size: 54rpx; |
| | | line-height: 1; |
| | | color: #999999; |
| | | } |
| | | |
| | | .upload-text { |
| | | margin-top: 8rpx; |
| | | font-size: 24rpx; |
| | | color: #999999; |
| | | } |
| | | |
| | | .photo-image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .store-info-page { |
| | | position: relative; |
| | | height: 482rpx; |
| | |
| | | </template> |
| | | </view> |
| | | <view class="info-a-price"> |
| | | <text>{{item.type==1?'-':'+'}}{{(item.num ||0).toFixed(2)}}</text> |
| | | <text>{{item.type==1?'-':'+'}}{{item.amountInfo || 0}}</text> |
| | | <text></text> |
| | | </view> |
| | | </view> |
| | | <view class="info-b"> |
| | | <view class="info-b" v-if="item.orderNo"> |
| | | <text>订单编号:{{item.orderNo || ''}}</text> |
| | | </view> |
| | | <view class="info-b"> |
| | |
| | | <view class="box"> |
| | | <view class="title">输入核验码</view> |
| | | <view class="input"> |
| | | <input type="number" v-model="code" placeholder="请输入6位取件码" /> |
| | | <input type="number" v-model="code" placeholder="请输入6位核验码" /> |
| | | </view> |
| | | <view class="btn" v-if="!loading" @click="confirmDo">确认</view> |
| | | <view class="btn1" v-if="loading" >正在查询</view> |
| | | <view class="footer" @click="scanCodeDo"> |
| | | <image src="/shop/images/ic_saoma@2x.png" mode="widthFix"></image> |
| | | <image src="/shop/static/images/ic_saoma@2x.png" mode="widthFix"></image> |
| | | <text>扫码核销</text> |
| | | </view> |
| | | <u-popup :show="show1" round="15" :safeAreaInsetBottom="false" mode="center"> |
| | |
| | | <view class="tc-contemt"> |
| | | <view class="tc-contemt-title">订单查询结果</view> |
| | | <view class="tc-contemt-nr"> |
| | | 订单【{{info.code}}】不满足核销条件! |
| | | 该订单不满足核销条件! |
| | | </view> |
| | | </view> |
| | | <view class="tc-btn"> |
| | |
| | | import { mapState } from 'vuex' |
| | | export default { |
| | | computed: { |
| | | ...mapState(['navHeight', 'statusbarHeight']) |
| | | ...mapState(['navHeight', 'statusbarHeight','shopInfo', 'shopToken']) |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | }; |
| | | }, |
| | | onShow() { |
| | | // this.loading =false |
| | | // this.show1 =false |
| | | // this.info={} |
| | | // this.code ='' |
| | | // this.checkShopLogin() |
| | | this.loading =false |
| | | this.show1 =false |
| | | this.info={} |
| | | this.code ='' |
| | | this.checkShopLogin() |
| | | }, |
| | | onLoad(options) { |
| | | }, |
| | | methods:{ |
| | | scanCodeDo(){ |
| | |
| | | this.getShopDetail() |
| | | } |
| | | }, |
| | | jumpWriteoffA(){ |
| | | if(this.info && this.info.orderId){ |
| | | jumpWriteoffA(type){ |
| | | if(this.info && this.info.id){ |
| | | uni.navigateTo({ |
| | | url: '/pagesA/pages/write-off-a/write-off-a?id='+this.info.orderId |
| | | url: '/shop/pages/write-off-a/write-off-a?id='+this.info.id+'&type='+type |
| | | }) |
| | | } |
| | | }, |
| | |
| | | } |
| | | this.loading =true |
| | | var that =this |
| | | that.$u.api.getOrderDetailByCode({exchangeCode:this.code,tokenType:1 }) |
| | | .then(res=>{ |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | that.info = res.data |
| | | if(res.data.orderStatus == 1 && res.data.receiveType ==1){ |
| | | that.jumpWriteoffA() |
| | | }else{ |
| | | this.show1 = !this.show1 |
| | | this.loading =false |
| | | } |
| | | } |
| | | }).catch(e=>{ |
| | | try{ |
| | | that.$u.api.shopOrderDetail({verifyCode:this.code,tokenType:1 }) |
| | | .then(res=>{ |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | that.info = res.data |
| | | if(res.data.status === 1 || res.data.status === 5 || res.data.status === 3){ |
| | | that.jumpWriteoffA(0) |
| | | } else{ |
| | | this.show1 = !this.show1 |
| | | } |
| | | } |
| | | this.loading =false |
| | | }) |
| | | }catch(e){ |
| | | this.loading =false |
| | | }).finally(e=>{ |
| | | // this.loading =false |
| | | }) |
| | | } |
| | | }, |
| | | checkShopLogin(){ |
| | | var that =this |
| | | if( this.shopInfo ==null || this.shopInfo.id==null || this.shopToken==null || this.shopToken==''){ |
| | | if( this.shopInfo ==null || this.shopToken==null || this.shopToken == ''){ |
| | | uni.navigateTo({ |
| | | url: '/pages/login/login' |
| | | url: '/shop/pages/login/login' |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | let continuePayOrder = (data = {}) => vm.$u.http.post('web/order/continuePay/'+data.orderId, data); //继续发起支付 |
| | | let orderComment = (data = {}) => vm.$u.http.post('web/order/comment', data); //订单评价 |
| | | let payOverdueFee = (data = {}) => vm.$u.http.post('web/order/payOverdueFee/'+data.orderId, data); //继续发起支付 |
| | | let shopSalesStats = (params = {}) => vm.$u.http.get('web/shopInfo/salesStats',{ params }); //门店销售统计 |
| | | let shopOrderDetail = (params = {}) => vm.$u.http.get('web/order/shopDetail',{ params }); //门店订单详情 |
| | | let shopVerifyOrder = (data = {}) => vm.$u.http.post('web/order/shopVerify',data); //门店核销收件 |
| | | let storeOutOrder = (data = {}) => vm.$u.http.post('web/order/storeOut',data); //门店核销出货 |
| | | let confirmArrivedOrder = (data = {}) => vm.$u.http.post('web/order/confirmArrived',data); //确认到店 |
| | | let getShopInfoDetail= (params = {}) => vm.$u.http.get('web/shopInfo/shopDetail',{ params }); // 获取我的店铺信息 |
| | | let logOutShop= (params = {}) => vm.$u.http.get('web/account/logOutShop',{ params }); // 门店退出登录 |
| | | let getActiveOrderTip= (params = {}) => vm.$u.http.get('web/config/getActiveOrderTip',{ params }); // 首页进行中订单提示 |
| | | let maintainInfo= (data = {}) => vm.$u.http.post('web/shopInfo/maintainInfo',data); // 查询门店维护信息 |
| | | let maintainShopInfo= (data = {}) => vm.$u.http.post('web/shopInfo/maintain',data); // 查询门店维护信息 |
| | | |
| | | vm.$u.api = { |
| | | getActiveOrderTip, |
| | | logOutShop, |
| | | maintainShopInfo, |
| | | maintainInfo, |
| | | getShopInfoDetail, |
| | | storeOutOrder, |
| | | confirmArrivedOrder, |
| | | shopVerifyOrder, |
| | | shopOrderDetail, |
| | | shopSalesStats, |
| | | payOverdueFee, |
| | | orderComment, |
| | | confirmReceipt, |
| | |
| | | // 请求拦截器 |
| | | uni.$u.http.interceptors.request.use((config) => { |
| | | uni.showLoading({ title: '加载中' }); |
| | | let Headtoken = '' |
| | | if (vm.$store.state.userType === 1) { |
| | | Headtoken = vm.$store.state.shopToken || '' |
| | | } else { |
| | | Headtoken = vm.$store.state.token || '' |
| | | } |
| | | let Headtoken = vm.$store.state.token || '' |
| | | let shopHeadtoken= vm.$store.state.shopToken || '' |
| | | // 判断有无token,有则加入请求头中 |
| | | if (Headtoken) { |
| | | config.header['token'] = Headtoken; |
| | | } |
| | | if (shopHeadtoken) { |
| | | config.header['shopToken'] = shopHeadtoken; |
| | | } |
| | | return config; |
| | | }, config => { |
| | |
| | | // 响应拦截器 |
| | | uni.$u.http.interceptors.response.use((response) => { |
| | | uni.hideLoading(); |
| | | if (response.data.code === 5113) { |
| | | if (response.data.code === 5113 || response.data.code === 5112) { |
| | | uni.switchTab({ |
| | | url: '/pages/index/index' |
| | | }); |
| | | return |
| | | } |
| | | if (response.data.code === 51131|| response.data.code === 51121) { |
| | | uni.navigateTo({ |
| | | url: '/shop/pages/login/login' |
| | | }); |
| | | return |
| | | } |
| | | if (response.data.code !== 200) { |
| | | uni.showToast({ |
| | | title: response.data.message, |