H5退款
This commit is contained in:
1 parent
4f75a10dbf
commit
7bec9e9314
6 files changed
+53
-107
No files matched your search
@@ -6,6 +6,8 @@ import { isEmpty } from "radash"
|
||||
import { hooks, constant, router } from "@@/index"
|
||||
import { orderApi, refundApi } from "@@/api"
|
||||
|
||||
import { filePath } from "@@/utils/file";
|
||||
|
||||
const data = {
|
||||
|
||||
}
|
||||
@@ -90,10 +92,6 @@ const doCancelRefund = async () => {
|
||||
<view>商户</view>
|
||||
<view>{{ state.detail.merchantStr }}</view>
|
||||
</view>
|
||||
<view class="info_cell">
|
||||
<view>部门</view>
|
||||
<view>{{ state.detail.deptName }}</view>
|
||||
</view>
|
||||
<view class="m-t-15rpx h-1px bg-#999 bg-opacity-5" />
|
||||
<view class="info_cell">
|
||||
<view>订单号</view>
|
||||
@@ -117,7 +115,7 @@ const doCancelRefund = async () => {
|
||||
<view class="flex-row items-start justify-between" v-for="(v, i) in state.shopCarList" :key="i"
|
||||
@tap.stop="router.jump('/pages/merchant/product-detail', { id: v.productId })">
|
||||
<view class="flex-row items-center">
|
||||
<image class="w-160rpx h-160rpx rounded-8rpx" :src="v.productPic" mode="aspectFill" />
|
||||
<image class="w-160rpx h-160rpx rounded-8rpx" :src="filePath(v.productPic)" mode="aspectFill" />
|
||||
<view class="flex-col m-l-15rpx second-text-26">
|
||||
<view class="sub-text-28">{{ v.productName }}</view>
|
||||
<view class="m-t-5rpx">¥ {{ hooks.useMoney(v.productPrice) }}</view>
|
||||
@@ -139,7 +137,7 @@ const doCancelRefund = async () => {
|
||||
</view>
|
||||
</view>
|
||||
<!-- start 退款相关 start -->
|
||||
<slot v-if="state.detail.orderStatus == 10">
|
||||
<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>
|
||||
|
||||
@@ -6,6 +6,8 @@ import { isEmpty } from "radash"
|
||||
import { hooks, router } from "@@/index"
|
||||
import { orderApi, refundApi, commonApi } from "@@/api"
|
||||
|
||||
import { filePath } from "@@/utils/file";
|
||||
|
||||
const data = {
|
||||
payType: [
|
||||
{ text: "仅退款", disabled: false, visible: true, type: "10", value: "10" },
|
||||
@@ -42,7 +44,7 @@ const getSetting = async () => {
|
||||
const _pa = {};
|
||||
const { data } = await commonApi.setting(_pa)
|
||||
state.setting = data
|
||||
state.selectList = data.afterSaleRefundReasons.map(v => {
|
||||
state.selectList = data.afterSaleRefundReasons?.split(",").map(v => {
|
||||
return {
|
||||
id: v,
|
||||
title: v,
|
||||
@@ -119,7 +121,7 @@ const doSubmit = async () => {
|
||||
<view class="flex-row items-start justify-between" v-for="(v, i) in state.shopCarList" :key="i"
|
||||
@tap.stop="router.jump('/pages/merchant/product-detail', { id: v.productId })">
|
||||
<view class="flex-row items-center">
|
||||
<image class="w-160rpx h-160rpx rounded-8rpx" :src="v.productPic" mode="aspectFill" />
|
||||
<image class="w-160rpx h-160rpx rounded-8rpx" :src="filePath(v.productPic)" mode="aspectFill" />
|
||||
<view class="flex-col m-l-15rpx second-text-26">
|
||||
<view class="sub-text-28">{{ v.productName }}</view>
|
||||
<view class="m-t-5rpx">¥ {{ hooks.useMoney(v.productPrice) }}</view>
|
||||
@@ -135,7 +137,7 @@ const doSubmit = async () => {
|
||||
<view class="sub-text-28">实付款</view>
|
||||
<view class="flex-row items-end">
|
||||
<view class="sub-text-28">¥</view>
|
||||
<view class="m-l-5rpx sub-text-28">{{ hooks.useMoney(state.detail.practicalTotalPrice) }}</view>
|
||||
<view class="m-l-5rpx sub-text-28">{{ hooks.useMoney(state.detail.payPrice) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -151,7 +153,7 @@ const doSubmit = async () => {
|
||||
</view>
|
||||
<view class="flex-row items-center justify-between card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<view class="sub-text-28">退款金额</view>
|
||||
<view class="sub-text-28 color-red!">¥{{ hooks.useMoney(state.detail.practicalTotalPrice) }}</view>
|
||||
<view class="sub-text-28 color-red!">¥{{ hooks.useMoney(state.detail.payPrice) }}</view>
|
||||
</view>
|
||||
<view class="card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<tm-picker rang-key="title" rang-text="title" v-model="applyForm.reason"
|
||||
|
||||
+31
-85
@@ -5,6 +5,8 @@ import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { hooks, router } from "@@/index";
|
||||
import { orderApi, payApi } from "@@/api";
|
||||
|
||||
import { filePath } from "@@/utils/file";
|
||||
|
||||
import zTabs from "@@/components/other/z-tabs/z-tabs.vue";
|
||||
|
||||
const data = {
|
||||
@@ -22,7 +24,7 @@ const state = reactive<any>({
|
||||
},
|
||||
});
|
||||
|
||||
onLoad(() => {});
|
||||
onLoad(() => { });
|
||||
onShow(async () => {
|
||||
const isLogin = await hooks.useCheckLogin();
|
||||
if (!isLogin) return;
|
||||
@@ -37,11 +39,11 @@ const doTab = (e: any) => {
|
||||
};
|
||||
|
||||
const pageRef = ref<any>(null);
|
||||
const pageHook = hooks.usePage(pageRef, orderApi.page, null, "data.list");
|
||||
const pageHook = hooks.usePage(pageRef, orderApi.page, null, "data.records");
|
||||
const query = (page: number, pagesize: number) => {
|
||||
const isLogin = hooks.useStaticCheckLogin();
|
||||
console.log(isLogin,"isLogin");
|
||||
|
||||
console.log(isLogin, "isLogin");
|
||||
|
||||
if (!isLogin) return;
|
||||
pageHook.startPage(page, pagesize, false, state.pa);
|
||||
};
|
||||
@@ -50,7 +52,7 @@ const doToDetail = (v: any) => {
|
||||
router.jump("/pages/order/detail", { id: v.id });
|
||||
};
|
||||
|
||||
const doAppraise = () => {};
|
||||
const doAppraise = () => { };
|
||||
|
||||
const doRefund = (v: any) => {
|
||||
router.jump("/pages/refund/apply", { id: v.id });
|
||||
@@ -59,20 +61,9 @@ const doRefund = (v: any) => {
|
||||
|
||||
<template>
|
||||
<crud-layout title="订单" bg="/static/page/blue-bg.png">
|
||||
<z-paging
|
||||
ref="pageRef"
|
||||
height="100%"
|
||||
:fixed="false"
|
||||
v-model="pageHook.list"
|
||||
:default-page-size="5"
|
||||
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" height="100%" :fixed="false" v-model="pageHook.list" :default-page-size="5"
|
||||
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>
|
||||
<view class="h-30rpx" />
|
||||
<view class="bg-white rounded-16rpx px-20rpx">
|
||||
@@ -80,39 +71,23 @@ const doRefund = (v: any) => {
|
||||
</view>
|
||||
</template>
|
||||
<view class="h-20rpx" />
|
||||
<view
|
||||
class="flex-col justify-center card p-x-15rpx p-y-25rpx m-b-20rpx"
|
||||
v-for="(v, i) in pageHook.list"
|
||||
:key="i"
|
||||
@tap="doToDetail(v)"
|
||||
>
|
||||
<view class="flex-col justify-center card p-x-15rpx p-y-25rpx m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i"
|
||||
@tap="doToDetail(v)">
|
||||
<view class="flex-row items-center">
|
||||
<image
|
||||
class="w-80rpx h-80rpx rounded-8rpx"
|
||||
:src="v.merchantLogo"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<image class="w-80rpx h-80rpx rounded-8rpx" :src="filePath(v.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">{{ v.merchantStr }}</view>
|
||||
<view
|
||||
class="m-l-15rpx color-#999 font-size-26rpx! iconfont icon-youjiantou"
|
||||
/>
|
||||
<view class="main-text-28">{{ v.merchantName }}</view>
|
||||
<view class="m-l-15rpx color-#999 font-size-26rpx! iconfont icon-youjiantou" />
|
||||
</view>
|
||||
<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 == 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 == 15" size="xs">已核销</tm-tag>
|
||||
</view>
|
||||
<view class="flex-row items-center justify-between m-t-5rpx">
|
||||
<view class="second-text-26">
|
||||
<view class="second-text-20">
|
||||
<text>下单时间</text>
|
||||
<text class="m-l-10rpx">
|
||||
{{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}
|
||||
@@ -128,22 +103,14 @@ const doRefund = (v: any) => {
|
||||
<view class="absolute top-0 right-0 bottom-0 left-0 h-180rpx">
|
||||
<scroll-view scroll-x class="flex-row-center whitespace-nowrap">
|
||||
<view class="flex-row items-center">
|
||||
<view
|
||||
class="inline-flex! flex-col justify-center h-180rpx m-r-20rpx"
|
||||
v-for="(pV, pI) in v.shopCarList"
|
||||
:key="pI"
|
||||
@tap.stop="
|
||||
<view class="inline-flex! flex-col justify-center h-180rpx m-r-20rpx" v-for="(pV, pI) in v.carList"
|
||||
:key="pI" @tap.stop="
|
||||
router.jump('/pages/merchant/product-detail', {
|
||||
id: pV.productId,
|
||||
})
|
||||
"
|
||||
>
|
||||
<image
|
||||
class="w-160rpx h-120rpx rounded-8rpx"
|
||||
:src="pV.productPic"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="w-160rpx m-t-10rpx sub-text-28 show-line">
|
||||
">
|
||||
<image class="w-160rpx h-120rpx rounded-8rpx" :src="filePath(pV.productPic)" mode="aspectFill" />
|
||||
<view class="w-160rpx m-t-10rpx sub-text-24 show-line text-center">
|
||||
{{ pV.productName }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -154,37 +121,16 @@ const doRefund = (v: any) => {
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view
|
||||
class="absolute top-0 right-0 bottom-0 z-10 flex-col items-end w-160rpx p-x-20rpx bg-white bg-opacity-95"
|
||||
>
|
||||
<view class="main-text-30"
|
||||
>¥ {{ hooks.useMoney(v.totalPrice) }}</view
|
||||
>
|
||||
<view class="m-t-10rpx second-text-26"
|
||||
>共 {{ v.shopCarList.length }} 件</view
|
||||
>
|
||||
class="absolute top-0 right-0 bottom-0 z-10 flex-col items-end w-160rpx p-x-20rpx bg-white bg-opacity-95">
|
||||
<view class="main-text-30">¥ {{ hooks.useMoney(v.totalPrice) }}</view>
|
||||
<view class="m-t-10rpx second-text-26">共 {{ v.carList.length }} 件</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="[5, 10].includes(v.orderStatus)"
|
||||
class="flex-row items-center justify-end p-t-20rpx"
|
||||
>
|
||||
<view
|
||||
v-if="v.orderStatus == 10"
|
||||
class="botder_btn"
|
||||
@tap.stop="doAppraise"
|
||||
>评价</view
|
||||
>
|
||||
<view
|
||||
v-if="v.orderStatus == 5 && v.orderType == 2"
|
||||
class="botder_btn"
|
||||
@tap.stop="doRefund(v)"
|
||||
>退款
|
||||
<view v-if="['5', '10'].includes(v.orderStatus)" class="flex-row items-center justify-end p-t-20rpx">
|
||||
<view v-if="v.orderStatus == 5 && v.orderType == 2" class="botder_btn" @tap.stop="doRefund(v)">退款
|
||||
</view>
|
||||
<view
|
||||
v-if="v.orderStatus == 5 && v.orderType == 2"
|
||||
class="m-l-20rpx botder_btn"
|
||||
@tap.stop="hooks.usePreviewImage(v.orderTypeExtendReserve.qrCode)"
|
||||
>
|
||||
<view v-if="v.orderStatus == 5 && v.orderType == 2" class="m-l-20rpx botder_btn"
|
||||
@tap.stop="hooks.usePreviewImage(v.orderTypeExtendReserve.qrCode)">
|
||||
核销码
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from "@/sheep/utils/request";
|
||||
export default {
|
||||
setting: (params: any) =>
|
||||
request({
|
||||
url: "pay/setting/get",
|
||||
url: "wallet/wallet-setting/app/get-setting",
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
}),
|
||||
shopCarList: (params: any) =>
|
||||
request({
|
||||
url: `/hardware/car/get-by-order-id`,
|
||||
url: `/hard/hard-car/app/order-id`,
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
|
||||
+10
-10
@@ -3,28 +3,28 @@ import request from "@/sheep/utils/request";
|
||||
export default {
|
||||
create: (data: any) => {
|
||||
return request({
|
||||
url: "/hardware/trade-after-sale/create",
|
||||
url: "/hard/hard-after-sale/app/create",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
},
|
||||
cancel: (params: any) => {
|
||||
return request({
|
||||
url: "/hard/trade-after-sale/app/cancel",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
},
|
||||
get: (params: any) => {
|
||||
return request({
|
||||
url: "/hardware/trade-after-sale/get-by-order-id",
|
||||
url: "/hard/trade-after-sale/app/detail-by-order-id",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
},
|
||||
history: (params: any) => {
|
||||
return request({
|
||||
url: "/hardware/trade-after-sale/history",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
},
|
||||
cancel: (params: any) => {
|
||||
return request({
|
||||
url: "/hardware/trade-after-sale/cancel",
|
||||
url: "/hard/trade-after-sale/app/history",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user