Commit 451b9ffa authored by 陈宗胤(贵阳日报)'s avatar 陈宗胤(贵阳日报)
parents b393bc4a 526fd2be
...@@ -114,3 +114,11 @@ export function getLogisticsMap(data) { ...@@ -114,3 +114,11 @@ export function getLogisticsMap(data) {
data, data,
}); });
} }
// 确认收货 orderNumber
export function confirmReceipt(data) {
return request({
url: '/sgyrdd/sgyOrder/receipt/' + data,
method: 'POST',
});
}
...@@ -84,34 +84,15 @@ ...@@ -84,34 +84,15 @@
<image mode="aspectFill" :src="imgUrl + item.pic"></image> <image mode="aspectFill" :src="imgUrl + item.pic"></image>
<view class="info"> <view class="info">
<text class="title multi-line">{{ item.prodName }}</text> <text class="title multi-line">{{ item.prodName }}</text>
<text class="subtitle">赠价值59元特产伴手礼一份</text> <!-- <text class="subtitle">{{ item.brief }}</text> -->
<text class="subtitle"></text>
<view class="tag-list"> <view class="tag-list">
<!-- <text class="tag">可定明日</text>
<text class="tag">可定明日</text> <text class="tag">可定明日</text>
<text class="tag">可定明日</text> <text class="tag">可定明日</text> -->
<text class="tag">可定明日</text>
</view>
<view class="fs-box">
<text class="fs-num">{{ item.score }}分</text>
<text style="margin-left: 20rpx" class="sales-volume">
月销{{ item.monthSoldNum }}
</text>
</view>
<text class="address">{{ item.tripArea }}出发</text>
</view>
<text class="price">¥{{ item.price }}</text>
</view>
<view class="item" v-for="(item, index) in cardData" :key="index">
<image mode="aspectFill" :src="imgUrl + item.pic"></image>
<view class="info">
<text class="title multi-line">{{ item.prodName }}</text>
<text class="subtitle">赠价值59元特产伴手礼一份</text>
<view class="tag-list">
<text class="tag">可定明日</text>
<text class="tag">可定明日</text>
<text class="tag">可定明日</text>
</view> </view>
<view class="fs-box"> <view class="fs-box">
<text class="fs-num">{{ item.score }}分</text> <text class="fs-num" v-if="item.score">{{ item.score }}分</text>
<text style="margin-left: 20rpx" class="sales-volume"> <text style="margin-left: 20rpx" class="sales-volume">
月销{{ item.monthSoldNum }} 月销{{ item.monthSoldNum }}
</text> </text>
...@@ -148,13 +129,6 @@ const params = ref({ ...@@ -148,13 +129,6 @@ const params = ref({
current: 1, current: 1,
size: 15, size: 15,
isEnd: false, isEnd: false,
sortType: '',
dateType: '', // 日期
allocateDate: '',
attractionId: '',
startCity: '',
serviceCommitment: '',
labelId: '',
}); });
const shopSwiperList = ref([ const shopSwiperList = ref([
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg', 'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg',
...@@ -209,33 +183,29 @@ const dataParams = (item, datePart) => { ...@@ -209,33 +183,29 @@ const dataParams = (item, datePart) => {
}; };
// 景点 // 景点
const placeParams = (info) => { const placeParams = (info) => {
console.log('id', info); params.value.attractionIdList = [info.id];
params.value.attractionId = info.id;
refresh().then(() => { refresh().then(() => {
queryOfferProdListFn(); queryOfferProdListFn();
}); });
}; // 筛选 }; // 筛选
const screenParams = (item, type) => { const screenParams = (item, type) => {
if (type === 'screen') { if (type === 'screen') {
params.value.startCity = item.tripCity; params.value.startCityList = [item.tripCity];
} else if (type === 'serve') { } else if (type === 'serve') {
params.value.serviceCommitment = item.labelName; params.value.serviceList = [item.labelName];
} else if (type === 'people') { } else if (type === 'people') {
params.value.labelId = item.labelName; params.value.forPeopleList = [item.labelName];
} }
refresh().then(() => { refresh().then(() => {
queryOfferProdListFn(); queryOfferProdListFn();
}); });
}; };
const resetParams = () => { const resetParams = () => {
params.value.sortType = null; params.value = {
params.value.attractionId = null; size: 15,
params.value.dateType = null; current: 1,
params.value.startCity = null; isEnd: false,
params.value.serviceCommitment = null; };
params.value.labelId = null;
params.value.allocateDate = null;
refresh().then(() => { refresh().then(() => {
queryOfferProdListFn(); queryOfferProdListFn();
}); });
...@@ -471,6 +441,7 @@ page { ...@@ -471,6 +441,7 @@ page {
font-weight: bold; font-weight: bold;
/* 主题色 */ /* 主题色 */
color: #fa5151; color: #fa5151;
margin-left: auto;
align-self: flex-end; align-self: flex-end;
} }
} }
......
...@@ -15,72 +15,49 @@ ...@@ -15,72 +15,49 @@
</view> </view>
<view class="top"> <view class="top">
<view class="left"> <view class="left">
<image class="logo" src="/static/ticket/logo.png" mode="aspectFill"></image> <image class="logo" :src="iconUrl + info.com + '.png'" mode="aspectFill"></image>
<text>中通快递78810259271088</text> <view class="text">{{ info.companyName }}{{ info.nu }}</view>
</view> </view>
<view class="right"> <view class="right">
<text>复制</text> <text @tap="copyTextToClipboard(info.nu)">复制</text>
<text></text> <text></text>
<text>打电话</text> <text @tap="callShopPhone(shopInfo.phone)">打电话</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="steps"> <view class="steps">
<wd-steps :active="1" vertical> <wd-steps :active="1" vertical>
<wd-step> <wd-step v-for="(item, index) in info.data" :key="index">
<template #icon>
<view class="dot-red"></view>
</template>
<template #title>
<view class="titlebox">
<text class="title red-title">待取件</text>
<text class="time red">06-25 17:37</text>
</view>
</template>
<template #description>
<view class="desc">您购买的包裹已暂存至贵阳市市政公园菜鸟驿站, 请凭取件码取件。</view>
</template>
</wd-step>
<wd-step>
<template #icon>
<view class="dot"></view>
</template>
<template #title>
<view class="titlebox">
<text class="title">派送中</text>
<text class="time">06-25 09:05</text>
</view>
</template>
<template #description>
<rich-text class="desc1" :nodes="detail"></rich-text>
</template>
</wd-step>
<wd-step>
<template #icon>
<view class="dot"></view>
</template>
<template #title>
<view class="titlebox">
<text class="title">运输中</text>
<text class="time">06-25 05:15</text>
</view>
</template>
<template #description>
<text class="desc2">【贵阳市】快件已到达 贵阳小河二部</text>
</template>
</wd-step>
<wd-step>
<template #icon> <template #icon>
<view class="dot"></view> <view class="dot-red" v-if="index === 0"></view>
<view class="dot" v-else></view>
</template> </template>
<template #title> <template #title>
<view class="titlebox"> <view class="titlebox">
<text class="time">06-20 01:25</text> <text
class="title"
:class="index === 0 ? 'red-title' : ''"
v-if="item.status !== '在途'"
>
{{ item.status }}
</text>
<text class="time" :class="index === 0 ? 'red' : ''">
{{ item.ftime.slice(5, 16) }}
</text>
</view> </view>
</template> </template>
<template #description> <template #description>
<text class="desc2">【黔南布依族苗族自治州】快件已发往 贵阳小河二部</text> <!-- <rich-text class="desc1" :nodes="item.context"></rich-text> -->
<text
class="desc1"
v-for="(t, i) in distinguishPhone(item.context)"
@click="phoneCall(t)"
:key="i"
:style="{ color: t.type === 'phone' ? '#ff0909' : '' }"
>
{{ t.val }}
</text>
</template> </template>
</wd-step> </wd-step>
<wd-step> <wd-step>
...@@ -99,9 +76,12 @@ ...@@ -99,9 +76,12 @@
<view class="bottom"> <view class="bottom">
<view class="b-icon"></view> <view class="b-icon"></view>
<view class="right"> <view class="right">
<text class="title">送至 贵阳市市政公园正门菜鸟驿站</text> <text class="title">送至 {{ orderInfo.orderLogistics.receiverAddress }}</text>
<view class="rowbox"> <view class="rowbox">
<text class="text1">李先生 +86-187****4253</text> <text class="text1">
{{ orderInfo.orderLogistics.receiverName }}
{{ maskPhoneNumber(orderInfo.orderLogistics.receiverMobile) }}
</text>
<text class="text">隐藏保护中</text> <text class="text">隐藏保护中</text>
</view> </view>
</view> </view>
...@@ -111,11 +91,18 @@ ...@@ -111,11 +91,18 @@
<script setup> <script setup>
const props = defineProps({ const props = defineProps({
dataList: { orderInfo: {
type: Array, type: Object,
default: null, default: null,
}, },
phone: {
type: String,
default: '',
},
}); });
const info = ref({}); // 物流轨迹信息
const iconUrl = ref('https://cdn.kuaidi100.com/images/all/56/');
const show = ref(false); const show = ref(false);
// 正则表达式匹配电话号码 // 正则表达式匹配电话号码
const phoneRegex = /\b(\d{3,4}-\d{7,8}|\d{11})\b/g; const phoneRegex = /\b(\d{3,4}-\d{7,8}|\d{11})\b/g;
...@@ -123,16 +110,78 @@ const phoneRegex = /\b(\d{3,4}-\d{7,8}|\d{11})\b/g; ...@@ -123,16 +110,78 @@ const phoneRegex = /\b(\d{3,4}-\d{7,8}|\d{11})\b/g;
const highlightedText = (val) => { const highlightedText = (val) => {
return val.replace(phoneRegex, '<span class="highlight">$1</span>'); return val.replace(phoneRegex, '<span class="highlight">$1</span>');
}; };
const detail = ref(
'【贵阳市】贵阳小河二部的业务员【文凯凯, 18784286692】正在为您派件(95720为中通快递员外呼专属号码,请放心接听,如有问题可联系网点:0851-83876676,投诉电话:0851-83876678)', const maskPhoneNumber = (phone) => {
); return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
const open = () => { };
detail.value = highlightedText(detail.value);
const distinguishPhone = (val) => {
const a = val;
const c = a.split(phoneRegex);
const list = [];
for (const i in c) {
const flag = c[i] !== '' && phoneRegex.test(c[i]);
c[i] !== '' &&
list.push({
type: flag ? 'phone' : 'text',
val: c[i],
});
}
return list;
};
/**
* 拨打商家电话
* @param {*} phoneNumber
*/
function callShopPhone(phoneNumber) {
xma.makePhoneCall({
phoneNumber, // 仅为示例
});
}
const phoneCall = (t) => {
if (t.type === 'phone') {
console.log(t.val);
uni.makePhoneCall({
phoneNumber: t.val,
success: () => {},
fail: () => {},
});
}
};
/**
* 复制到剪切板
* @param {*} text
*/
function copyTextToClipboard(text) {
xma.setClipboardData({
data: text,
success: function () {
// 可以添加用户友好的提示,例如使用uni.showToast提示复制成功
xma.showToast({
title: '复制成功',
icon: 'success',
duration: 2000,
});
},
});
}
const open = (val) => {
info.value = val;
// info.value.data.forEach((item) => {
// item.context = highlightedText(item.context);
// });
console.log(info.value);
show.value = true; show.value = true;
}; };
const close = () => { const close = () => {
show.value = false; show.value = false;
}; };
defineExpose({ defineExpose({
open, open,
close, close,
...@@ -150,6 +199,12 @@ defineExpose({ ...@@ -150,6 +199,12 @@ defineExpose({
border-bottom: 1px solid #ededed; border-bottom: 1px solid #ededed;
padding: 20rpx 30rpx 33rpx; padding: 20rpx 30rpx 33rpx;
gap: 26rpx; gap: 26rpx;
position: fixed;
width: 100%;
box-sizing: border-box;
background-color: #fff;
z-index: 10;
border-radius: 16rpx 16rpx 0 0;
.rowbox { .rowbox {
display: flex; display: flex;
...@@ -181,7 +236,7 @@ defineExpose({ ...@@ -181,7 +236,7 @@ defineExpose({
border-radius: 50%; border-radius: 50%;
} }
text { .text {
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
font-size: 28rpx; font-size: 28rpx;
...@@ -207,6 +262,7 @@ defineExpose({ ...@@ -207,6 +262,7 @@ defineExpose({
} }
.steps { .steps {
margin-top: 160rpx;
padding: 28rpx 30rpx; padding: 28rpx 30rpx;
&:deep(.wd-step__icon.is-icon) { &:deep(.wd-step__icon.is-icon) {
...@@ -317,6 +373,7 @@ defineExpose({ ...@@ -317,6 +373,7 @@ defineExpose({
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 6rpx; gap: 6rpx;
.title { .title {
font-family: font-family:
PingFang SC, PingFang SC,
......
...@@ -78,12 +78,30 @@ ...@@ -78,12 +78,30 @@
> >
删除 删除
</view> </view>
<view v-if="item.orderType !== 'logistics'">
<view
class="btn-info"
v-if="item.status === 'receive' || item.status == 'not_use'"
@tap="handleQrcode(item)"
>
核销码
</view>
</view>
<view v-if="item.orderType === 'logistics'">
<view
class="btn-info"
v-if="item.status == 'not_use'"
@tap="handleDetail(item)"
>
查看物流
</view>
</view>
<view <view
class="btn-info" class="btn-info"
v-if="item.status === 'receive' || item.status == 'not_use'" @tap="receipt(item.orderNumber)"
@tap="handleQrcode(item)" v-if="item.orderType === 'logistics' && item.status === 'not_use'"
> >
核销码 确认收货
</view> </view>
<view <view
class="btn-info" class="btn-info"
...@@ -167,6 +185,7 @@ import { ...@@ -167,6 +185,7 @@ import {
cancelOrderApi, cancelOrderApi,
repaymentApi, repaymentApi,
getOrderDetail, getOrderDetail,
confirmReceipt,
} from '@/api/order'; } from '@/api/order';
import { getOrderDic } from '@/utils/orderDic'; import { getOrderDic } from '@/utils/orderDic';
import { orderStatus, signIn } from '@/utils/signIn'; import { orderStatus, signIn } from '@/utils/signIn';
...@@ -302,7 +321,7 @@ const catalog = reactive({ ...@@ -302,7 +321,7 @@ const catalog = reactive({
endDate: '', endDate: '',
keyword: '', keyword: '',
status: '', // 待付款-not_pay,待使用-not_use,待评价not_eval,退款-after_sales status: '', // 待付款-not_pay,待使用-not_use,待评价not_eval,退款-after_sales
orderType: '', // 团购到店-store,外卖订单-takeaway,筑农物流logistics orderType: 'logistics', // 团购到店-store,外卖订单-takeaway,筑农物流logistics
}); });
const getList = async () => { const getList = async () => {
if (isEnd.value) return; if (isEnd.value) return;
...@@ -574,6 +593,38 @@ const handleRefund = (item) => { ...@@ -574,6 +593,38 @@ const handleRefund = (item) => {
}); });
}; };
/**
* 确认收货
* @param {*} orderNumber
*/
const receipt = (orderNumber) => {
xma.showModal({
title: '提示',
content: '确认收货后,订单将无法退换货,请确认是否已收到货物',
success: function (res) {
if (res.confirm) {
xma.showLoading({
title: '加载中',
mask: true,
});
confirmReceipt(orderNumber).then((res) => {
xma.hideLoading();
xma.showToast({
title: '收货成功',
icon: 'success',
duration: 2000,
});
setTimeout(() => {
initDataList().then(() => {
getList();
}, 2000);
});
});
}
},
});
};
/** /**
* 店铺详情 * 店铺详情
*/ */
...@@ -658,6 +709,7 @@ page { ...@@ -658,6 +709,7 @@ page {
gap: 10rpx; gap: 10rpx;
display: flex; display: flex;
align-items: center; align-items: center;
.text { .text {
margin-left: 10rpx; margin-left: 10rpx;
font-family: font-family:
...@@ -762,7 +814,7 @@ page { ...@@ -762,7 +814,7 @@ page {
gap: 14rpx; gap: 14rpx;
.btn-info { .btn-info {
width: 162rpx; width: 152rpx;
height: 66rpx; height: 66rpx;
border-radius: 34rpx; border-radius: 34rpx;
border: 1rpx solid #999999; border: 1rpx solid #999999;
......
...@@ -23,17 +23,17 @@ ...@@ -23,17 +23,17 @@
<text class="num">{{ orderDetail.orderItems[0].prodCount }}</text> <text class="num">{{ orderDetail.orderItems[0].prodCount }}</text>
<text>件商品 实付款</text> <text>件商品 实付款</text>
<text class="icon"></text> <text class="icon"></text>
<text class="price">{{ orderDetail.orderStore.actualTotal }}</text> <text class="price">{{ orderDetail.baseOrder.actualTotal }}</text>
</view> </view>
</view> </view>
<view class="content-item"> <view class="content-item">
<view class="item-buttom"> <view class="item-buttom">
<text>{{ orderDetail.orderStore.createTime }}</text> <text>{{ orderDetail.baseOrder.createTime }}</text>
</view> </view>
</view> </view>
<view class="content-between"> <view class="content-between">
<text>退款金额</text> <text>退款金额</text>
<text class="price">{{ orderDetail.orderStore.actualTotal }}</text> <text class="price">{{ orderDetail.baseOrder.actualTotal }}</text>
</view> </view>
<view class="content-between"> <view class="content-between">
<text>相关图片</text> <text>相关图片</text>
......
...@@ -253,8 +253,7 @@ const cardBackwardNull = ref(false); ...@@ -253,8 +253,7 @@ const cardBackwardNull = ref(false);
const qualificationsNull = ref(false); const qualificationsNull = ref(false);
// 用户选择的分类 // 用户选择的分类
const choosedShopInfo = ref([]); const choosedShopInfo = ref([]);
// 临时创建的用户选择分类
const tempChoosedData = ref([]);
// 确保choosedShopInfo内是用户最新选择的分类 // 确保choosedShopInfo内是用户最新选择的分类
const chooseShopType = (id, name) => { const chooseShopType = (id, name) => {
let hasSameData = false; let hasSameData = false;
...@@ -265,35 +264,18 @@ const chooseShopType = (id, name) => { ...@@ -265,35 +264,18 @@ const chooseShopType = (id, name) => {
}); });
if (!hasSameData) { if (!hasSameData) {
choosedShopInfo.value.push({ areaId: id, areaName: name, qualifications: '' }); choosedShopInfo.value.push({ areaId: id, areaName: name, qualifications: '' });
tempChoosedData.value.push({ areaId: id, areaName: name, qualifications: '', tag: 'add' });
} else { } else {
choosedShopInfo.value = choosedShopInfo.value.filter((item) => { choosedShopInfo.value = choosedShopInfo.value.filter((item) => {
if (item.areaId === id) {
/* tempChoosedData.value.push({
areaId: id,
areaName: name,
qualifications: item.qualifications,
tag: 'delete',
}); */
// tempChoosedData.value.forEach(())
tempChoosedData.value.filter((sitem) => sitem.tag !== 'add');
console.log('tempChoosedData');
console.log(tempChoosedData.value);
console.log('choosedShopInfo');
console.log(choosedShopInfo.value);
}
return item.areaId !== id; return item.areaId !== id;
}); });
} }
console.log('临时数组');
console.log(tempChoosedData.value);
}; };
// 删除图片之前的提示 // 删除图片之前的提示
const beforeRemove = ({ file, fileList, resolve }) => { const beforeRemove = ({ file, fileList, resolve }) => {
xma.showModal({ xma.showModal({
title: '提示', title: '提示',
content: '确定删除图片' + file.name + '吗', content: '确定删除图片吗?',
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
xma.showToast({ title: '删除成功', duration: 2000 }); xma.showToast({ title: '删除成功', duration: 2000 });
...@@ -505,30 +487,7 @@ const show = ref(false); ...@@ -505,30 +487,7 @@ const show = ref(false);
// 关闭店铺分类弹出层 // 关闭店铺分类弹出层
const handleClose = () => { const handleClose = () => {
show.value = false; show.value = false;
tempChoosedData.value.forEach((item) => {
if (item.tag === 'add') {
// 删除
// console.log('应该删除' + item.areaName);
// console.log('删除前的choosedShopInfo');
// console.log(choosedShopInfo.value);
for (let i = 0; i < choosedShopInfo.value.length; i++) {
if (item.areaId === choosedShopInfo.value[i].areaId) {
choosedShopInfo.value.splice(i, 1);
}
}
} else {
// 添加
choosedShopInfo.value.push(
reactive({
areaId: item.areaId,
areaName: item.areaName,
qualifications: item.qualifications,
}),
);
}
});
console.log('删除后的choosedShopInfo');
console.log(choosedShopInfo.value);
setTimeout(() => { setTimeout(() => {
testFileList.value = choosedShopInfo.value.reduce((obj, item) => { testFileList.value = choosedShopInfo.value.reduce((obj, item) => {
if (item.qualifications === '') { if (item.qualifications === '') {
...@@ -563,7 +522,6 @@ const chooseCategory = () => { ...@@ -563,7 +522,6 @@ const chooseCategory = () => {
// 显示店铺分类弹窗 // 显示店铺分类弹窗
const showclass = () => { const showclass = () => {
show.value = true; show.value = true;
tempChoosedData.value = [];
}; };
const isCategoryNull = ref(false); const isCategoryNull = ref(false);
...@@ -876,7 +834,6 @@ page { ...@@ -876,7 +834,6 @@ page {
font-size: var(--wot-input-fs, var(--wot-cell-title-fs, 14px)); font-size: var(--wot-input-fs, var(--wot-cell-title-fs, 14px));
color: var(--wot-input-placeholder-color, #bfbfbf); color: var(--wot-input-placeholder-color, #bfbfbf);
} }
.text.shopcateboxtxt { .text.shopcateboxtxt {
margin-left: 0px; margin-left: 0px;
} }
...@@ -919,10 +876,8 @@ page { ...@@ -919,10 +876,8 @@ page {
.newAddCertification { .newAddCertification {
margin-top: 40rpx; margin-top: 40rpx;
.citem { .citem {
margin-bottom: 20rpx; margin-bottom: 20rpx;
.titleOfC { .titleOfC {
margin-bottom: 10rpx; margin-bottom: 10rpx;
display: block; display: block;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment