11
This commit is contained in:
1 parent
ac997a5630
commit
41d3b01c24
4 files changed
+124
-125
No files matched your search
@@ -60,9 +60,36 @@ const getActDetail = async () => {
|
||||
const goGetCoupon = () => {
|
||||
uni.navigateTo({ url: `/pages/merchant/merchant-activity?actId=${actDetail.value.actId}&actType=${actDetail.value.actType}` })
|
||||
}
|
||||
const normalizeRichText = (html: string) => {
|
||||
const origin = "https://stgl.pj.gov.cn"
|
||||
return html.replace(/<img\b[^>]*>/gi, (imgTag) => {
|
||||
let next = imgTag
|
||||
|
||||
next = next.replace(/\bsrc\s*=\s*(['"])(.*?)\1/i, (_m, quote: string, src: string) => {
|
||||
let resolved = src
|
||||
if (resolved?.startsWith("/api")) resolved = `${origin}${resolved}`
|
||||
if (resolved?.startsWith("//")) resolved = `https:${resolved}`
|
||||
return `src=${quote}${resolved}${quote}`
|
||||
})
|
||||
|
||||
const styleMatch = next.match(/\bstyle\s*=\s*(['"])([\s\S]*?)\1/i)
|
||||
const required = "max-width: 100%; height: auto; display: block;"
|
||||
if (styleMatch) {
|
||||
const quote = styleMatch[1]
|
||||
const styleValue = styleMatch[2] ?? ""
|
||||
if (styleValue.includes("max-width") || styleValue.includes("width")) return next
|
||||
const merged = styleValue.trim().length ? `${styleValue.replace(/;?\s*$/, "; ")}${required}` : required
|
||||
return next.replace(/\bstyle\s*=\s*(['"])([\s\S]*?)\1/i, `style=${quote}${merged}${quote}`)
|
||||
}
|
||||
|
||||
return next.replace(/<img\b/i, `<img style="${required}"`)
|
||||
})
|
||||
}
|
||||
|
||||
const nodes = computed(() => {
|
||||
return detail.value.description?.replaceAll(`<img src="/api`, `<img src="https://stgl.pj.gov.cn/api`)
|
||||
const html = detail.value.description
|
||||
if (!html) return ""
|
||||
return normalizeRichText(html)
|
||||
})
|
||||
|
||||
function getTypeLabel(type: string) {
|
||||
|
||||
+17
-24
@@ -69,19 +69,17 @@ const doCancelRefund = async () => {
|
||||
|
||||
<template>
|
||||
<crud-layout title="订单详情" mainIsScroll bg="/static/page/blue-bg.png">
|
||||
<view class="flex-row-center m-t-30rpx" v-if="state.detail.orderStatus === '5' && ['2', '7'].includes(state.detail.orderType)">
|
||||
<view class="flex-row-center m-t-30rpx"
|
||||
v-if="state.detail.orderStatus === '5' && ['2', '7'].includes(state.detail.orderType)">
|
||||
<view class="flex-row-center bg-white w-550rpx rounded-16rpx">
|
||||
<image
|
||||
class="w-500rpx"
|
||||
:src="filePath(state.detail.reserveCode)"
|
||||
mode="widthFix"
|
||||
@click.stop="hooks.usePreviewImage(filePath(state.detail.reserveCode))"
|
||||
/>
|
||||
<image class="w-500rpx" :src="filePath(state.detail.reserveCode)" mode="widthFix"
|
||||
@click.stop="hooks.usePreviewImage(filePath(state.detail.reserveCode))" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="h-30rpx" />
|
||||
<view class="relative flex-col justify-center overflow-hidden card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<image class="absolute top--20rpx right--60rpx w-160rpx h-160rpx" src="/static/icon/guarantee.png" mode="widthFix" />
|
||||
<image class="absolute top--20rpx right--60rpx w-160rpx h-160rpx" src="/static/icon/guarantee.png"
|
||||
mode="widthFix" />
|
||||
<view class="sub-text-32">订单信息</view>
|
||||
<view class="m-t-15rpx">
|
||||
<view class="info_cell">
|
||||
@@ -141,10 +139,8 @@ const doCancelRefund = async () => {
|
||||
</view>
|
||||
<!-- start 退款相关 start -->
|
||||
<slot v-if="['10'].includes(state.detail.orderStatus)">
|
||||
<view
|
||||
class="flex-row items-center justify-between card p-x-20rpx p-y-30rpx m-b-20rpx"
|
||||
@tap="router.jump('/pages/refund/history', { id: state.refundDetail.id })"
|
||||
>
|
||||
<view class="flex-row items-center justify-between card p-x-20rpx p-y-30rpx m-b-20rpx"
|
||||
@tap="router.jump('/pages/refund/history', { id: state.refundDetail.id })">
|
||||
<view>
|
||||
<view class="sub-text-28">
|
||||
<view>
|
||||
@@ -179,7 +175,8 @@ const doCancelRefund = async () => {
|
||||
<view>{{ state.refundDetail.applyDescription }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="state.refundDetail.status == 62" class="card p-x-20rpx p-y-30rpx space-y-10rpx m-b-20rpx second-text-24">
|
||||
<view v-if="state.refundDetail.status == 62"
|
||||
class="card p-x-20rpx p-y-30rpx space-y-10rpx m-b-20rpx second-text-24">
|
||||
<view class="flex-row items-center">
|
||||
<view>审核人:</view>
|
||||
<view>{{ state.refundDetail.auditUsername }}</view>
|
||||
@@ -197,18 +194,14 @@ const doCancelRefund = async () => {
|
||||
<!-- end 退款相关 end -->
|
||||
<view class="h-30rpx" />
|
||||
<template #main-bottom>
|
||||
<view
|
||||
v-if="state.detail.orderStatus == 10 && state.refundDetail.status == 10"
|
||||
<view v-if="state.detail.orderStatus == 10 && state.refundDetail.status == 10"
|
||||
class="bg-#999 p-y-20rpx text-center rounded-40rpx m-x-30rpx m-y-30rpx sub-text-30 color-white!"
|
||||
@tap="doCancelRefund"
|
||||
>
|
||||
@tap="doCancelRefund">
|
||||
取消申请
|
||||
</view>
|
||||
<view
|
||||
v-else-if="state.refundDetail.status == 62 || state.refundDetail.status == 61"
|
||||
<view v-else-if="state.refundDetail.status == 62 || state.refundDetail.status == 61"
|
||||
class="bg-#999 p-y-20rpx text-center rounded-40rpx m-x-30rpx m-y-30rpx sub-text-30 color-white!"
|
||||
@tap="router.jump('/pages/refund/apply', { id: state.detailId }, 2)"
|
||||
>
|
||||
@tap="router.jump('/pages/refund/apply', { id: state.detailId }, 2)">
|
||||
重新申请
|
||||
</view>
|
||||
</template>
|
||||
@@ -224,18 +217,18 @@ const doCancelRefund = async () => {
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
|
||||
& > view {
|
||||
&>view {
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
& > view:nth-child(1) {
|
||||
&>view:nth-child(1) {
|
||||
width: 130rpx;
|
||||
}
|
||||
|
||||
& > view:nth-child(2) {
|
||||
&>view:nth-child(2) {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,57 +1,42 @@
|
||||
<template>
|
||||
<crud-layout bg="/static/page/blue-bg.png">
|
||||
<z-paging
|
||||
ref="pageRef"
|
||||
:fixed="false"
|
||||
v-model="pageHook.list"
|
||||
:default-page-size="10"
|
||||
safe-area-inset-bottom
|
||||
:loading-more-enabled="true"
|
||||
:show-scrollbar="false"
|
||||
@query="query"
|
||||
:auto-clean-list-when-reload="false"
|
||||
:auto-scroll-to-top-when-reload="false"
|
||||
@scroll="pageHook.scroll"
|
||||
>
|
||||
<z-paging ref="pageRef" :fixed="false" v-model="pageHook.list" :default-page-size="10" safe-area-inset-bottom
|
||||
:loading-more-enabled="true" :show-scrollbar="false" @query="query" :auto-clean-list-when-reload="false"
|
||||
:auto-scroll-to-top-when-reload="false" @scroll="pageHook.scroll">
|
||||
<template #top v-if="false">
|
||||
<view class="h-30rpx" />
|
||||
<view class="flex justify-between items-center bg-white rounded-16rpx px-20rpx">
|
||||
<z-tabs :list="tabs" @change="tabChange" />
|
||||
<tm-between-time
|
||||
start="2020-1-1"
|
||||
end="2050-1-1"
|
||||
v-model="state.date"
|
||||
v-model:model-str="state.formatVal"
|
||||
@confirm="datePickerConfirm"
|
||||
format="YYYY-MM-DD"
|
||||
:quickDate="[]"
|
||||
drawerSize="900"
|
||||
>
|
||||
<tm-between-time start="2020-1-1" end="2050-1-1" v-model="state.date"
|
||||
v-model:model-str="state.formatVal" @confirm="datePickerConfirm" format="YYYY-MM-DD"
|
||||
:quickDate="[]" drawerSize="900">
|
||||
<view class="w-100rpx text-center second-text-28 text-30 mb-4rpx">筛选</view>
|
||||
</tm-between-time>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
|
||||
<template #top>
|
||||
<view>
|
||||
<view class="h-20rpx" />
|
||||
<tm-input placeholder="请输入关键字" leftIcon="search-2-line" />
|
||||
<view class="h-20rpx" />
|
||||
<tabSearch />
|
||||
<tabSearch />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view class="h-20rpx" />
|
||||
|
||||
<view class="flex-col justify-center card p-3 m-b-20rpx border-2rpx border-solid border-color-#eeeeee" v-for="(v, i) in pageHook.list" :key="i">
|
||||
<view class="flex-col justify-center card p-3 m-b-20rpx border-2rpx border-solid border-color-#eeeeee"
|
||||
v-for="(v, i) in pageHook.list" :key="i">
|
||||
<view class="flex-row">
|
||||
<image class="w-160rpx h-212rpx rounded-8rpx" :src="filePath(v.logoPic)" mode="aspectFill" />
|
||||
<view class="flex-1 m-l-20rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row items-center">
|
||||
<view class="main-text-28">{{ v.merchantName }}</view>
|
||||
<view v-if="false" class="m-l-15rpx color-#999 font-size-26rpx! iconfont icon-youjiantou" />
|
||||
<view v-if="false"
|
||||
class="m-l-15rpx color-#999 font-size-26rpx! iconfont icon-youjiantou" />
|
||||
</view>
|
||||
<template v-if="false">
|
||||
<tm-tag v-if="v.orderStatus == 1" color="info" size="xs">未支付</tm-tag>
|
||||
@@ -60,7 +45,7 @@
|
||||
<tm-tag v-if="v.orderStatus == 20" size="xs">已核销</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 30" color="info" size="xs">已取消(智能柜)</tm-tag>
|
||||
</template>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="flex-row-center m-t-10rpx justify-left">
|
||||
<tm-icon name="map-pin-2-line" color="#999"></tm-icon>
|
||||
@@ -74,80 +59,82 @@
|
||||
<text>{{ v.username }}</text>
|
||||
<text class="m-l-10rpx">{{ v.userMobile }}</text>
|
||||
</view>
|
||||
<view class="second-text-22 h-30rpx">{{ hooks.useEnum("hardwareRefundStatusEnum", v.refundStatus) }}</view>
|
||||
<view class="second-text-22 h-30rpx">{{ hooks.useEnum("hardwareRefundStatusEnum",
|
||||
v.refundStatus) }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="flex justify-between items-center m-b-10rpx">
|
||||
<view class="second-text-22">
|
||||
<text>商品</text>
|
||||
</view>
|
||||
<view class="second-text-22 color-#000! h-30rpx">3物品</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="flex justify-between items-center m-b-10rpx">
|
||||
<view class="second-text-22">
|
||||
<text>日期</text>
|
||||
</view>
|
||||
<view class="second-text-22 color-#000! h-30rpx">{{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</view>
|
||||
<view class="second-text-22 color-#000! h-30rpx">{{ hooks.useTime(v.createTime, "{y}-{m}-{d}
|
||||
{ h }: { i }: { s }") }}</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="flex justify-between items-center" v-if="false">
|
||||
<view class="second-text-22">
|
||||
<text>下单时间</text>
|
||||
<text class="m-l-10rpx">{{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</text>
|
||||
<text class="m-l-10rpx">{{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}")
|
||||
}}</text>
|
||||
</view>
|
||||
<view class="main-text-30 color-red! min-w-140rpx text-right">¥ {{
|
||||
hooks.useMoney(v.totalPrice) }}
|
||||
</view>
|
||||
<view class="main-text-30 color-red! min-w-140rpx text-right">¥ {{ hooks.useMoney(v.totalPrice) }}</view>
|
||||
<!-- <view class="second-text-24">共 {{ v.carList.length }} 件</view> -->
|
||||
</view>
|
||||
<view v-if="v.payType == '9'" class="sub-text-24">{{ v.productDesc }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="m-t-15rpx m-b-15rpx h-1rpx bg-#eeeeee "></view>
|
||||
|
||||
<view class="flex justify-between items-center m-b-10rpx">
|
||||
<view class="second-text-22">
|
||||
<tm-tag v-if="v.orderStatus == 1" color="info" size="xs">未支付</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 5" color="success" size="xs">已支付</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 10" color="error" size="xs">售后</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 20" size="xs">已核销</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 30" color="info" size="xs">已取消(智能柜)</tm-tag>
|
||||
</view>
|
||||
<view class="main-text-30 color-red! min-w-140rpx text-right">¥ {{ hooks.useMoney(v.totalPrice) }}</view>
|
||||
|
||||
<view class="m-t-15rpx m-b-15rpx h-1rpx bg-#eeeeee "></view>
|
||||
|
||||
<view class="flex justify-between items-center m-b-10rpx">
|
||||
<view class="second-text-22">
|
||||
<tm-tag v-if="v.orderStatus == 1" color="info" size="xs">未支付</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 5" color="success" size="xs">已支付</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 10" color="error" size="xs">售后</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 20" size="xs">已核销</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 30" color="info" size="xs">已取消(智能柜)</tm-tag>
|
||||
</view>
|
||||
|
||||
<view class="main-text-30 color-red! min-w-140rpx text-right">¥ {{ hooks.useMoney(v.totalPrice) }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex justify-end items-center mt-1">
|
||||
<view v-if="v.orderType == '1' && v.refundStatus" class="ml-1 botder_btn" @tap.stop="refundDetail(v)">售后详情</view>
|
||||
<view
|
||||
v-if="v.orderStatus == '5' && v.orderType == '1' && v.payType != '9'"
|
||||
class="ml-1 botder_btn"
|
||||
@tap.stop="doIndividualRefund(v)"
|
||||
>
|
||||
<view v-if="v.orderType == '1' && v.refundStatus" class="ml-1 botder_btn"
|
||||
@tap.stop="refundDetail(v)">售后详情
|
||||
</view>
|
||||
<view v-if="v.orderStatus == '5' && v.orderType == '1' && v.payType != '9'" class="ml-1 botder_btn"
|
||||
@tap.stop="doIndividualRefund(v)">
|
||||
申请退款
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
|
||||
<tm-drawer title="退款" :showClose="true" size="90%" placement="bottom" bgColor="#EBF6FF" v-model:show="state.showDrawer" zIndex="999">
|
||||
<tm-drawer title="退款" :showClose="true" size="90%" placement="bottom" bgColor="#EBF6FF"
|
||||
v-model:show="state.showDrawer" zIndex="999">
|
||||
<view class="bg-white rounded-16rpx px-10rpx m-b-10rpx animate-both">
|
||||
<z-tabs
|
||||
:list="['同意退款', '拒绝退款']"
|
||||
bar-width="300"
|
||||
bar-height="0"
|
||||
:active-style="{
|
||||
width: '300rpx',
|
||||
height: '70rpx',
|
||||
backgroundColor: '#0779FDdd',
|
||||
color: '#000000',
|
||||
textAlign: 'center',
|
||||
lineHeight: '70rpx',
|
||||
fontWeight: 'bold',
|
||||
fontSize: '30rpx',
|
||||
borderRadius: '10rpx',
|
||||
marginTop: '10rpx',
|
||||
}"
|
||||
:inactive-style="{
|
||||
<z-tabs :list="['同意退款', '拒绝退款']" bar-width="300" bar-height="0" :active-style="{
|
||||
width: '300rpx',
|
||||
height: '70rpx',
|
||||
backgroundColor: '#0779FDdd',
|
||||
color: '#000000',
|
||||
textAlign: 'center',
|
||||
lineHeight: '70rpx',
|
||||
fontWeight: 'bold',
|
||||
fontSize: '30rpx',
|
||||
borderRadius: '10rpx',
|
||||
marginTop: '10rpx',
|
||||
}" :inactive-style="{
|
||||
width: '300rpx',
|
||||
height: '70rpx',
|
||||
color: '#000000',
|
||||
@@ -157,19 +144,19 @@
|
||||
fontSize: '30rpx',
|
||||
borderRadius: '10rpx',
|
||||
marginTop: '10rpx',
|
||||
}"
|
||||
@change="refundTabChange"
|
||||
/>
|
||||
}" @change="refundTabChange" />
|
||||
</view>
|
||||
|
||||
<view class="flex-col justify-center card p-x-15rpx p-y-25rpx m-b-10rpx">
|
||||
<view class="flex-row items-center">
|
||||
<image class="w-100rpx h-100rpx rounded-8rpx" :src="filePath(state.curOrder.logoPic)" mode="aspectFill" />
|
||||
<image class="w-100rpx h-100rpx rounded-8rpx" :src="filePath(state.curOrder.logoPic)"
|
||||
mode="aspectFill" />
|
||||
<view class="flex-1 flex-col m-l-20rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row items-center">
|
||||
<view class="main-text-28">{{ state.curOrder.merchantName }}</view>
|
||||
<view v-if="false" class="m-l-15rpx color-#999 font-size-26rpx! iconfont icon-youjiantou" />
|
||||
<view v-if="false"
|
||||
class="m-l-15rpx color-#999 font-size-26rpx! iconfont icon-youjiantou" />
|
||||
</view>
|
||||
<tm-tag v-if="state.curOrder.orderStatus == 1" color="info" size="xs">未支付</tm-tag>
|
||||
<tm-tag v-if="state.curOrder.orderStatus == 5" color="success" size="xs">已支付</tm-tag>
|
||||
@@ -190,12 +177,16 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex flex-col items-end justify-center m-t-5rpx">
|
||||
<view class="second-text-22">{{ hooks.useEnum("hardwareRefundStatusEnum", state.curOrder.refundStatus) }}</view>
|
||||
<view class="second-text-22">{{ hooks.useEnum("hardwareRefundStatusEnum",
|
||||
state.curOrder.refundStatus) }}</view>
|
||||
<view class="flex">
|
||||
<view v-if="state.curOrder.carList?.length" class="m-t-4rpx m-r-10rpx second-text-26">
|
||||
<view v-if="state.curOrder.carList?.length"
|
||||
class="m-t-4rpx m-r-10rpx second-text-26">
|
||||
共 {{ state.curOrder.carList.length }} 件
|
||||
</view>
|
||||
<view class="main-text-30 color-red!">¥ {{ hooks.useMoney(state.curOrder.totalPrice) }}</view>
|
||||
<view class="main-text-30 color-red!">¥ {{ hooks.useMoney(state.curOrder.totalPrice)
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -234,7 +225,8 @@
|
||||
<view>{{ state.refundDetail.applyDescription }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="state.refundDetail.status == 62" class="card p-x-20rpx p-y-30rpx space-y-10rpx m-b-10rpx second-text-24">
|
||||
<view v-if="state.refundDetail.status == 62"
|
||||
class="card p-x-20rpx p-y-30rpx space-y-10rpx m-b-10rpx second-text-24">
|
||||
<view class="flex-row items-center">
|
||||
<view>审核人:</view>
|
||||
<view>{{ state.refundDetail.auditUsername }}</view>
|
||||
@@ -256,24 +248,12 @@
|
||||
</view>
|
||||
<view v-else class="h-270rpx" />
|
||||
<view class="flex">
|
||||
<tm-modal
|
||||
v-if="state.refundScene === 0"
|
||||
style="flex: 1"
|
||||
height="250"
|
||||
title="确定同意退款吗?"
|
||||
:show-footer="true"
|
||||
@confirm="doAgreeRefund()"
|
||||
>
|
||||
<tm-modal v-if="state.refundScene === 0" style="flex: 1" height="250" title="确定同意退款吗?"
|
||||
:show-footer="true" @confirm="doAgreeRefund()">
|
||||
<template v-slot:trigger><tm-button block>同意退款</tm-button></template>
|
||||
</tm-modal>
|
||||
<tm-modal
|
||||
v-if="state.refundScene === 1"
|
||||
style="flex: 1"
|
||||
height="250"
|
||||
title="确定拒绝退款吗?"
|
||||
:show-footer="true"
|
||||
@confirm="doRefuseRefund()"
|
||||
>
|
||||
<tm-modal v-if="state.refundScene === 1" style="flex: 1" height="250" title="确定拒绝退款吗?"
|
||||
:show-footer="true" @confirm="doRefuseRefund()">
|
||||
<template v-slot:trigger><tm-button block color="danger">拒绝退款</tm-button></template>
|
||||
</tm-modal>
|
||||
</view>
|
||||
|
||||
@@ -226,8 +226,7 @@ const autoLogin = async (): Promise<boolean> => {
|
||||
function isZzdNeedSmsVerify(data: unknown): data is { needSmsVerify: true; bindSessionId: string; displayName?: string } {
|
||||
if (!data || typeof data !== "object") return false
|
||||
const o = data as Record<string, unknown>
|
||||
const need =
|
||||
o.needSmsVerify === true || o.needSmsVerify === "true" || o.needSmsVerify === 1 || o.needSmsVerify === "1"
|
||||
const need = o.needSmsVerify === true || o.needSmsVerify === "true" || o.needSmsVerify === 1 || o.needSmsVerify === "1"
|
||||
const sid = o.bindSessionId
|
||||
const sidStr = typeof sid === "string" ? sid : sid != null ? String(sid) : ""
|
||||
return need && sidStr.length > 0
|
||||
|
||||
Reference in new issue
Block a user