first commit

This commit is contained in:
wangxiaowei
2025-10-22 22:56:36 +08:00
commit 90c54df48b
302 changed files with 54312 additions and 0 deletions

View File

@ -0,0 +1,154 @@
<template>
<view>
<view class="address-list bg-white">
<view class="address p30 d-s-c border-b-e" v-for="(item,index) in storeList" :key="index">
<view class="info flex-1" @click="onSelectedStore(item.store_id)">
<view class="user f34">
<text>{{item.shop_name}}</text>
</view>
<view class="pt10 user f30 gray6">
<text>{{item.phone}}</text>
</view>
<view class="pt10 f24 gray6">
<text> {{item.region.province}}{{item.region.city}}{{item.region.region}}{{item.address}}</text>
</view>
<view>
<text class="iconfont icon-dingwei"></text>
<text>{{item.distance_unit}}</text>
</view>
<!-- 选中状态 -->
<view v-if="item.store_id == selectedId" class="shop-item__right">
<text class="iconfont icon-iconfontduihaocopy"></text>
</view>
</view>
</view>
<!-- 无数据提供的页面 -->
<view v-if="!isLoading && !storeList.length">
<view class="yoshop-notcont">
<text class="iconfont icon-wushuju"></text>
<text class="cont">暂无自提门店哦</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
/*数据*/
listData: [],
isLoading: true, // 是否正在加载中
storeList: [], // 门店列表,
longitude: '',
latitude: '',
selectedId: -1,
}
},
onLoad(options) {
// 记录已选中的id
this.selectedId = options.store_id;
/*获取地址列表*/
this.getLocation();
this.getData();
},
methods: {
/**
* 授权启用定位权限
*/
onAuthorize() {
let self = this;
uni.openSetting({
success(res) {
if (res.authSetting["scope.userLocation"]) {
console.log('授权成功');
self.isAuthor = true;
setTimeout(() => {
// 获取用户坐标
self.getLocation((res) => {
});
}, 1000);
}
}
})
},
/**
* 获取用户坐标
*/
getLocation(callback) {
let self = this;
uni.getLocation({
type: 'wgs84',
success(res) {
self.longitude = res.longitude;
self.latitude = res.latitude;
self.getData();
},
fail() {
uni.showToast({
title: '获取定位失败,请点击右下角按钮打开定位权限',
duration: 2000
});
self.isAuthor=false;
},
})
},
/*获取数据*/
getData() {
let self = this;
self.isLoading = true;
self._get('store.store/lists', {
longitude: self.longitude,
latitude: self.latitude
}, function(res) {
self.isLoading = false;
self.storeList = res.data.list;
});
},
/**
* 选择门店
*/
onSelectedStore(e) {
let self = this;
self.selectedId = e;
// 设置上级页面的门店id
let pages = getCurrentPages();
if (pages.length < 2) {
return false;
}
self.$fire.fire('selectStoreId',e);
// 返回上级页面
// #ifndef H5
uni.navigateBack({
delta: parseInt(1)
});
// #endif
// #ifdef H5
history.go(-1);
// #endif
},
}
}
</script>
<style>
.address-list {
padding-bottom: 90rpx;
}
.foot-btns {
padding: 0;
}
.foot-btns .btn-red {
width: 100%;
height: 90rpx;
line-height: 90rpx;
border-radius: 0;
}
</style>

199
pages/store/clerkorder.vue Normal file
View File

@ -0,0 +1,199 @@
<template>
<view class="order-datail">
<!--详情状态-->
<view class="order-state d-s-c">
<view class="icon-box"><span class="icon iconfont icon-gantanhao"></span></view>
<view class="state-cont flex-1">
<view class="state-txt d-b-c">
<text class="desc f34">{{ detail.state_text }}</text>
</view>
</view>
<view class="dot-bg"></view>
</view>
<!-- 上门自提自提门店 -->
<view class="order-express p30 d-s-c" v-if="detail.delivery_type.value == 20">
<view class="flow-delivery__title m-top20">
<span class="icon iconfont icon-dizhi1">自提门店</span>
</view>
<view class="cont-text ml20">
<view class="express-text">
{{extractStore.store_name }} {{extractStore.phone }}
<view class="f24 gray9 pt10">
{{ extractStore.region.province }} {{ extractStore.region.city}}
{{ extractStore.region.region }}
{{ extractStore.address }}
</view>
</view>
</view>
</view>
<!--购物列表-->
<view class="shops group bg-white">
<view class="group-hd border-b-e">
<view class="left">
<text class="min-name">商品</text>
</view>
</view>
<view class="list">
<view class="one-product p-20-0" v-for="(item, index) in detail.product" :key="index">
<view class="d-s-c">
<view class="cover">
<image :src="item.image.file_path" mode="aspectFit"></image>
</view>
<view class="flex-1">
<view class="pro-info">{{ item.product_name }}</view>
<view class="pt10 p-0-30 d-b-c">
<view class="price f22">
¥
<text class="f40">{{ item.product_price }}</text>
</view>
<view class="f24 gray9">x{{ item.total_num }}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!--订单信息-->
<view class="group bg-white f28">
<view class="p-20-0">
<text class="gray9">订单编号</text>
<text>{{ detail.order_no }}</text>
</view>
<view class="p-20-0">
<text class="gray9">下单时间</text>
<text>{{ detail.create_time }}</text>
</view>
<view class="p-20-0">
<text class="gray9">支付方式</text>
<text>{{ detail.pay_type.text }}</text>
</view>
<view class="p-20-0">
<text class="gray9">配送方式</text>
<text>{{ detail.delivery_type.text }}</text>
</view>
<view class="p-20-0 d-b-c">
<text class="gray9">商品金额</text>
<text>¥ {{ detail.order_price }}</text>
</view>
<view class="p-20-0 d-b-c">
<text class="gray9">运费</text>
<text>+ ¥ {{ detail.express_price }}</text>
</view>
<view class="p-20-0 d-e-c fb f34">
应付金额
<text class="red">¥ {{ detail.order_price }}</text>
</view>
</view>
<!-- 操作栏 -->
<view v-if="detail.order_status.value != 20 " class="flow-fixed-footer b-f">
<!-- 订单核销 -->
<view v-if="detail.pay_status.value==20 && detail.delivery_type.value ==20 && detail.delivery_status.value == 10 ">
<button class="btn-red" @click="onSubmitExtract(detail.order_id)">确认核销</button>
</view>
</view>
</view>
</template>
<script>
import Popup from '@/components/uni-popup.vue'
import utils from '@/common/utils.js'
export default {
data() {
return {
indicatorDots: true,
autoplay: true,
interval: 2000,
duration: 500,
/*是否显示支付类别弹窗*/
isPayPopup: false,
/*订单id*/
order_no: 0,
/*订单详情*/
detail: {
order_status: [],
address: {
region: []
},
product: [],
pay_type: [],
delivery_type: [],
pay_status: []
},
extractStore: {},
};
},
components: {},
onLoad(e) {
this.order_no = e.order_no;
},
onShow() {
/*获取订单详情*/
this.getData();
},
methods: {
/*获取数据*/
getData() {
let self = this;
uni.showLoading({
title: '加载中'
});
self._get(
'store.order/detail', {
order_no: self.order_no
},
function(res) {
self.detail = res.data.order;
self.extractStore = res.data.order.extractStore;
uni.hideLoading();
}
);
},
/*核销*/
onSubmitExtract(order_id) {
let self = this;
wx.showModal({
title: "提示",
content: "您确定要核销吗?",
success: function(o) {
o.confirm && self._post(
'store.order/extract', {
order_id: order_id
},
function(res) {
uni.showToast({
title: res.msg,
duration: 2000,
icon: 'success',
});
setTimeout(function () {
self.getData();
}, 2000);
}
);
}
});
},
}
};
</script>
<style scoped>
.order-express {
background: #ffffff;
}
.order-express .icon-box .iconfont {
font-size: 50rpx;
}
.order-datail {
padding-bottom: 90 rpx;
}
</style>

View File

@ -0,0 +1,114 @@
<template>
<view class="store-container bg-white" v-if="!loading">
<view class="logo ww100 p-30-0 d-c-c">
<image :src="storeDetail.logo.file_path" mode="aspectFill"></image>
</view>
<view class="d-c-c d-c ww100">
<text class="f40">{{storeDetail.store_name}}</text>
<text class="f28 gray9">营业时间:{{storeDetail.shop_hours}}</text>
</view>
<view class="f30 mt30">
<view class="d-b-c p30 border-b" @click="callPhone(storeDetail.phone)">
<text class="gray9">联系电话</text>
<view class="">
<text class="iconfont icon-002dianhua"></text>
<text>{{storeDetail.phone}}</text>
</view>
</view>
<view class="d-b-c p30 border-b">
<text class="gray9">联系人</text>
<text>{{storeDetail.linkman}}</text>
</view>
<view class="d-b-c p30 border-b">
<text class="gray9">状态</text>
<text class="green">{{storeDetail.status.text}}</text>
</view>
<view class="d-b-c p30 border-b">
<text class="gray9">是否支持自提核销</text>
<text class="green">{{storeDetail.is_check.text}}</text>
</view>
<view class="d-b-c p30 border-b">
<text class="gray9">省市区</text>
<text>{{storeDetail.region.province}}{{storeDetail.region.city}}{{storeDetail.region.region}}</text>
</view>
<view class="d-b-c p30 border-b">
<text class="gray9">地址</text>
<text>{{storeDetail.address}}</text>
</view>
<view class="d-b-c p30 border-b">
<text class="gray9">简介</text>
<text class="flex-1 o-h tr">{{storeDetail.summary}}</text>
</view>
</view>
<view class="store-map">
<map :latitude="storeDetail.latitude" :longitude="storeDetail.longitude" :markers="covers">
</map>
</view>
</view>
</template>
<script>
export default {
data() {
return {
/*是否正在加载*/
loading:true,
/*门店ID*/
store_id:null,
/*门店详情*/
storeDetail:{},
/*标记点*/
covers: []
}
},
onLoad(e) {
this.store_id=e.store_id;
},
mounted() {
/*获取订单详情*/
this.getData();
},
methods: {
/*获取数据*/
getData() {
let self = this;
uni.showLoading({
title: '加载中'
});
self._get(
'store.store/detail', {
store_id: self.store_id,
},
function(res) {
self.storeDetail=res.data.detail;
let obj={
latitude: res.data.detail.latitude,
longitude: res.data.detail.longitude
}
self.covers.push(obj);
self.loading=false;
uni.hideLoading();
}
);
},
/*拨打电话*/
callPhone(phone){
let self=this;
uni.makePhoneCall({
phoneNumber: phone
});
}
}
}
</script>
<style lang="scss">
.store-container .logo image{ width: 200rpx; height: 200rpx;}
.store-container .store-map{ width: 750rpx; height: 400rpx;}
.store-container .store-map map{ width: 100%; height: 100%;}
.store-container .icon-002dianhua{ font-size:34rpx; font-weight: bold; color: $dominant-color;}
</style>