gukai 2 years ago
parent 2165fd5258
commit d4b28ddaba

@ -1,91 +1,126 @@
import {
request
request
} from "@/utils/request";
export default {
SalesDiscounts: {
SalesDiscounts: {
List(data) {
return request({
url: "/shop/SalesDiscounts/List",
method: "GET",
data,
type: 'mall'
});
},
GetItem(data) {
return request({
url: "/shop/SalesDiscounts/GetItem",
method: "GET",
data,
type: 'mall'
});
},
Create(data) {
return request({
url: "/shop/SalesDiscounts/Create",
method: "POST",
data,
type: 'mall'
});
},
},
List(data) {
return request({
url: "/shop/SalesDiscounts/List",
method: "GET",
data,
type: 'mall'
});
},
GetItem(data) {
return request({
url: "/shop/SalesDiscounts/GetItem",
method: "GET",
data,
type: 'mall'
});
},
Create(data) {
return request({
url: "/shop/SalesDiscounts/Create",
method: "POST",
data,
type: 'mall'
});
},
},
SalesFullDiscounts: {
SalesFullDiscounts: {
List(data) {
return request({
url: "/shop/SalesFullDiscounts/List",
method: "GET",
data,
type: 'mall'
});
},
GetItem(data) {
return request({
url: "/shop/SalesFullDiscounts/GetItem",
method: "GET",
data,
type: 'mall'
});
},
Create(data) {
return request({
url: "/shop/SalesFullDiscounts/Create",
method: "POST",
data,
type: 'mall'
});
},
},
List(data) {
return request({
url: "/shop/SalesFullDiscounts/List",
method: "GET",
data,
type: 'mall'
});
},
GetItem(data) {
return request({
url: "/shop/SalesFullDiscounts/GetItem",
method: "GET",
data,
type: 'mall'
});
},
Create(data) {
return request({
url: "/shop/SalesFullDiscounts/Create",
method: "POST",
data,
type: 'mall'
});
},
},
SalesFullSetRedution: {
SalesFullSetRedution: {
List(data) {
return request({
url: "/shop/SalesFullSetRedution/List",
method: "GET",
data,
type: 'mall'
});
},
GetItem(data) {
return request({
url: "/shop/SalesFullSetRedution/GetItem",
method: "GET",
data,
type: 'mall'
});
},
Create(data) {
return request({
url: "/shop/SalesFullSetRedution/Create",
method: "POST",
data,
type: 'mall'
});
},
}
List(data) {
return request({
url: "/shop/SalesFullSetRedution/List",
method: "GET",
data,
type: 'mall'
});
},
GetItem(data) {
return request({
url: "/shop/SalesFullSetRedution/GetItem",
method: "GET",
data,
type: 'mall'
});
},
Create(data) {
return request({
url: "/shop/SalesFullSetRedution/Create",
method: "POST",
data,
type: 'mall'
});
},
},
caiwu: {
List(data) {
return request({
url: "/shop/shop/shareList",
method: "GET",
data,
type: 'mall'
});
},
cashList(data) {
return request({
url: "/shop/shop/cashList",
method: "GET",
data,
type: 'mall'
});
},
shopData(data) {
return request({
url: "/shop/shop/getData",
method: "GET",
data,
type: 'mall'
});
},
cashSubmit(data) {
return request({
url: "/shop/shop/cashSubmit",
method: "POST",
data,
type: 'mall'
});
},
}
};

@ -0,0 +1,146 @@
<template>
<view>
<kevyloading v-if="loading" type="bsm-loader" color="#618af8" transparent></kevyloading>
<wd-form v-if="!loading" :model="form" :rules="rules" :disabled="mode == 'show'" ref="dialogForm"
label-width="100px">
<wd-form-item label="收款人" prop="user_name">
<wd-input placeholder="请输入收款人" v-model="dataForm.user_name" clearable
style="width: 100%"></wd-input>
</wd-form-item>
<wd-form-item label="联系电话" prop="user_mobile">
<wd-input placeholder="请输入联系电话" v-model="dataForm.user_mobile" clearable style="width: 100%"></wd-input>
</wd-form-item>
<wd-form-item label="提现金额" prop="user_name">
<wd-input type="number" placeholder="请输入提现金额" step="0.01" v-model.number="dataForm.cash_price" clearable
style="width: 100%"></wd-input>
</wd-form-item>
<wd-form-item label="提现类型" prop="user_name">
<wd-radio-group v-model="dataForm.type" :inline="true" shape='dot'>
<wd-radio :value="0">银行卡</wd-radio>
<wd-radio :value="1">微信</wd-radio>
<wd-radio :value="2">支付宝</wd-radio>
</wd-radio-group>
</wd-form-item>
<template v-if="dataForm.type == 0">
<wd-form-item label="开户行" prop="bank_name">
<wd-input placeholder="请输入开户行" v-model="dataForm.bank_name" clearable style="width: 100%"></wd-input>
</wd-form-item>
<wd-form-item label="银行卡号" prop="bank_code">
<wd-input placeholder="请输入银行卡号" v-model="dataForm.bank_code" clearable style="width: 100%"></wd-input>
</wd-form-item>
</template>
<template v-if="dataForm.type == 1">
<wd-form-item label="微信收款码" prop="wx_payee_pic">
<yUpload v-model="dataForm.wx_payee_pic" :size="1"></yUpload>
</wd-form-item>
</template>
<template v-if="dataForm.type == 2">
<wd-form-item label="支付宝账号" prop="ali_code">
<wd-input placeholder="请输入账号" v-model="dataForm.ali_code" clearable style="width: 100%"></wd-input>
</wd-form-item>
</template>
<!-- 提交按钮 -->
<view class="mt-2 px-12 py-3 bg-slate-50">
<wd-button type="primary" size="large" @click="handleSubmit" block>
保存
</wd-button>
</view>
</wd-form>
</view>
</template>
<script>
import yGoods from "@/components/yGoods/index.vue";
import uniDataPicker from "@/components/uni-data-picker/components/uni-data-picker/uni-data-picker.vue";
import kevyloading from "@/components/kevy-loading/kevy-loading";
import utils from '@/utils/utils.js'
import {
useApi
} from "@/hooks/useApi.js"
import discountApi from '@/api/mall/discount.js';
import yUpload from "@/components/yUpload/index.vue";
console.log(yGoods);
/**
* 从本地存储中获取用户信息
*/
const user_info = uni.getStorageSync("user_info");
export default {
components: {
yGoods,
uniDataPicker,
kevyloading,
yUpload
},
data() {
return {
utils,
user_info,
//
dataForm: {
type: 0,
ali_code: "",
bank_code: "",
bank_name: "",
user_mobile: "",
user_name: "",
wx_payee_pic: "",
cash_price: ''
},
columns: [],
loading: false
};
},
onLoad(e) {
this.getData()
},
methods: {
async getData() {
const res = await discountApi.caiwu.shopData()
console.log(res, 'res')
this.dataForm = res.data.default_cash ? res.data.default_cash : {}
},
/**
* 处理表单提交
*/
async handleSubmit() {
uni.showLoading({
title: '提交中'
})
//
const res = await discountApi.caiwu.cashSubmit({
...this.dataForm,
});
uni.hideLoading()
uni.showToast({
title: res.msg,
icon: 'none'
});
if (res.code == 0) {
setTimeout(() => {
uni.navigateBack()
}, 1500);
}
},
},
};
</script>
<style>
/* 在这里添加样式,根据需要自定义表单样式 */
</style>

@ -0,0 +1,165 @@
<template>
<view class="content">
<kevyloading v-if="loading" type="bsm-loader" color="#618af8" transparent></kevyloading>
<view class=" bg-white sticky top-0 z-50 flex items-center" style="height: 9vh;display: flex;justify-content: center;">
<view class="mr-2">
<wd-button @click="utils.toUrl('/mall/caiwu/cash/edit')" size="small">提现</wd-button>
</view>
</view>
<view class="grid p-2">
<yList height="91vh" ref="yListRef" :apiObj="fullDiscountApi.caiwu.cashList" :params="{ ...params }">
<template #default="{ list }">
<view>
<view v-for="item of list" class="goods">
<wd-card type="rectangle">
<template #title>
<view class="title">
<view>
<span class="mr-2">ID{{ item?.id }}</span>
</view>
<view style="display: flex;align-items: center;">
{{ item.create_time }}
<view class="p-2 mb-2 flex justify-between" style="font-size: 22rpx;">
<view>
<wd-button :round="false" size="small"
:type="['warning', 'success', 'warning', 'info', 'info'][item.status]">
<div>{{ ["待审核", "待打款", "已打款", "已拒绝"][item.status] }}</div>
</wd-button>
</view>
</view>
</view>
</view>
</template>
<view class="bg-gray-50 p-2 mb-2 flex justify-between" style="font-size: 22rpx;">
<view>
<template v-if="item.type == 0">
<div>开户行{{ item.bank_name }}</div>
<div>银行卡号{{ item.bank_code }}</div>
</template>
<template v-if="item.type == 1">
<div>
<img :src="item.wx_payee_pic" style="width: 30px;" alt="">
</div>
</template>
<template v-if="item.type == 2">
<div>{{ item.ali_code }}</div>
</template>
</view>
<view style="font-weight: bold;font-size: 32rpx;color: #19be6b;">
{{ item.cash_price }}
</view>
</view>
<view v-if="item.auditing_desc" class="bg-gray-50 p-2 mb-2 flex justify-between" style="font-size: 22rpx;">
<view>
<span class="mr-2 warn-state warn-status-processing bg-yellow-600"></span>
审核备注{{ item.auditing_desc }}
</view>
</view>
</wd-card>
</view>
</view>
</template>
</yList>
</view>
<wd-toast />
<wd-message-box></wd-message-box>
</view>
</template>
<script setup>
import {
ref,
nextTick
} from 'vue';
import utils from '@/utils/utils.js';
import fullDiscountApi from '@/api/mall/discount.js';
import kevyloading from "@/components/kevy-loading/kevy-loading";
import yList from "/components/yList/index.vue";
import {
onShow,
} from "@dcloudio/uni-app";
const yListRef = ref(null);
const popover = ref(false);
const params = ref({
name: null,
price: null,
send_type: null
});
/**
* @type {Ref<boolean>}
* 控制页面加载状态的 Ref
*/
const loading = ref(false);
//
onShow(() => {
})
</script>
<style lang="scss" scoped>
.search-type {
position: relative;
height: 30px;
line-height: 30px;
padding: 0 8px 0 16px;
font-size: 24rpx;
color: rgba(0, 0, 0, .45);
}
.search-type::after {
position: absolute;
content: '';
width: 1px;
right: 0;
top: 5px;
bottom: 5px;
background: rgba(0, 0, 0, 0.25);
}
.search-type {
:deep(.icon-arrow) {
display: inline-block;
font-size: 20px;
vertical-align: middle;
}
}
.couponBox,
.title {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
}
.couponBox {
justify-content: flex-start;
}
.title {
justify-content: space-between;
}
.title-tip {
color: rgba(0, 0, 0, 0.25);
font-size: 12px;
}
</style>

@ -0,0 +1,146 @@
<template>
<view class="content">
<kevyloading v-if="loading" type="bsm-loader" color="#618af8" transparent></kevyloading>
<view class=" bg-white sticky top-0 z-50 flex items-center" style="height: 9vh;display: flex;justify-content: flex-end;">
<view style="text-align: center;width: 100%;color: red;font-weight: bold;">
余额{{ shop_info ? shop_info.money : '0.00' }}
</view>
</view>
<view class="grid p-2">
<yList height="91vh" ref="yListRef" :apiObj="fullDiscountApi.caiwu.List" :params="{ ...params }">
<template #default="{ list }">
<view>
<view v-for="item of list" class="goods">
<wd-card type="rectangle">
<template #title>
<view class="title">
<view>
<span class="mr-2">ID{{ item?.id }}</span>
</view>
<view>
{{ item.create_time }}
</view>
</view>
</template>
<view class="bg-gray-50 p-2 mb-2 flex justify-between" style="font-size: 22rpx;">
<view>
{{ item.desc_info }}
</view>
<view style="font-weight: bold;font-size: 32rpx;" :style="{
color: item.type == 1 ? '#19be6b' : '#fa3534'
}">
{{ item.type == 1 ? '+' : '-' }} {{ item.money }}
</view>
</view>
</wd-card>
</view>
</view>
</template>
</yList>
</view>
<wd-toast />
<wd-message-box></wd-message-box>
</view>
</template>
<script setup>
import {
ref,
nextTick
} from 'vue';
import utils from '@/utils/utils.js';
import fullDiscountApi from '@/api/mall/discount.js';
import kevyloading from "@/components/kevy-loading/kevy-loading";
import yList from "/components/yList/index.vue";
import {
onShow,
} from "@dcloudio/uni-app";
const yListRef = ref(null);
const popover = ref(false);
const params = ref({
name: null,
price: null,
send_type: null
});
const shop_info = ref(null);
/**
* @type {Ref<boolean>}
* 控制页面加载状态的 Ref
*/
const loading = ref(false);
const getData = async () => {
const res = await fullDiscountApi.caiwu.shopData()
console.log(res, 'res')
shop_info.value = res.data.shop_info ? res.data.shop_info : null
}
//
onShow(() => {
getData()
})
</script>
<style lang="scss" scoped>
.search-type {
position: relative;
height: 30px;
line-height: 30px;
padding: 0 8px 0 16px;
font-size: 24rpx;
color: rgba(0, 0, 0, .45);
}
.search-type::after {
position: absolute;
content: '';
width: 1px;
right: 0;
top: 5px;
bottom: 5px;
background: rgba(0, 0, 0, 0.25);
}
.search-type {
:deep(.icon-arrow) {
display: inline-block;
font-size: 20px;
vertical-align: middle;
}
}
.couponBox,
.title {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
}
.couponBox {
justify-content: flex-start;
}
.title {
justify-content: space-between;
}
.title-tip {
color: rgba(0, 0, 0, 0.25);
font-size: 12px;
}
</style>

@ -1,88 +1,90 @@
<template>
<view class="charts-box bg-white content p-2">
<view v-if="parent.id" class="p-4 mb-2 bg-slate-50">
上级分类 ({{ parent.name }})
</view>
<wd-form ref="form" :model="baseForm">
<wd-cell-group class="flex py-2 w-full" title="分类图片">
<view class="ml-3">
<yUpload v-model="baseForm.pic_url" :size="1"></yUpload>
</view>
</wd-cell-group>
<wd-form-item label-width="76px" label="分类名称" prop="address">
<wd-input v-model="baseForm.name" placeholder="请输入分类名称" clearable />
</wd-form-item>
<wd-form-item label-width="80px" label="分类排序" prop="address">
<view class="ml-3 flex">
<wd-input-number v-model="baseForm.sort" />
</view>
</wd-form-item>
<wd-form-item label-width="80px" label="状态" prop="address">
<view class="ml-3 flex">
<wd-switch v-model="baseForm.status" :active-value="1" :inactive-value="0" />
</view>
</wd-form-item>
<view class="footer m-4">
<wd-button @click="saveCat" type="primary" size="large" block>保存</wd-button>
</view>
</wd-form>
</view>
<view class="charts-box bg-white content p-2">
<view v-if="parent.id" class="p-4 mb-2 bg-slate-50">
上级分类 ({{ parent.name }})
</view>
<wd-form ref="form" :model="baseForm">
<wd-cell-group class="flex py-2 w-full" title="分类图片">
<view class="ml-3">
<yUpload v-model="baseForm.pic_url" :size="1"></yUpload>
</view>
</wd-cell-group>
<wd-form-item label-width="76px" label="分类名称" prop="address">
<wd-input v-model="baseForm.name" placeholder="请输入分类名称" clearable />
</wd-form-item>
<wd-form-item label-width="80px" label="分类排序" prop="address">
<view class="ml-3 flex">
<wd-input-number v-model="baseForm.sort" />
</view>
</wd-form-item>
<wd-form-item label-width="80px" label="状态" prop="address">
<view class="ml-3 flex">
<wd-switch v-model="baseForm.status" :active-value="1" :inactive-value="0" />
</view>
</wd-form-item>
<view class="footer m-4">
<wd-button @click="saveCat" type="primary" size="large" block>保存</wd-button>
</view>
</wd-form>
</view>
</template>
<script setup>
import { ref } from 'vue'
import goods from '@/api/mall/goods.js'
import yUpload from "@/components/yUpload/index.vue"
import {
onLoad,
} from "@dcloudio/uni-app";
const parent = ref({})
const model = ref({})
const baseForm = ref({})
onLoad(async (e) => {
if (e.parent) {
parent.value = JSON.parse(e.parent)
}
if (e.edit) {
baseForm.value = JSON.parse(e.edit)
}
})
const saveCat = () => {
goods.classify.createItem({
parent_id: parent.value.id || baseForm.value.id || 0,
...baseForm.value
}).then(res => {
if (res.code == 0) {
uni.showToast({
title: '操作成功!',
icon: 'success'
})
uni.navigateBack()
}
})
}
import {
ref
} from 'vue'
import goods from '@/api/mall/goods.js'
import yUpload from "@/components/yUpload/index.vue"
import {
onLoad,
} from "@dcloudio/uni-app";
const parent = ref({})
const model = ref({})
const baseForm = ref({})
onLoad(async (e) => {
if (e.parent) {
parent.value = JSON.parse(e.parent)
}
if (e.edit) {
baseForm.value = JSON.parse(e.edit)
}
})
const saveCat = () => {
goods.classify.createItem({
parent_id: parent.value.id || baseForm.value.id || 0,
...baseForm.value
}).then(res => {
if (res.code == 0) {
uni.showToast({
title: '操作成功!',
icon: 'success'
})
uni.navigateBack()
}
})
}
</script>
<style scoped>
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-box {
width: 100%;
height: 300px;
}
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-box {
width: 100%;
height: 300px;
}
</style>

@ -133,4 +133,4 @@ export default {
<style>
/* 在这里添加样式,根据需要自定义表单样式 */
</style>
</style>

@ -110,6 +110,33 @@
</div>
</view>
</wd-transition>
<wd-transition :duration="360" :show="true" name="zoom-in">
<view class="px-2 my-1">
<div class="relative flex flex-col rounded-xl bg-white p-4 shadow-sm">
<div class="mb-2 pointer-events-auto relative inline-flex bg-white font-medium ">
<div class="flex items-baseline text-xs px-2">
<span class="mr-2 warn-state warn-status-processing bg-yellow-600"></span>
财务
</div>
</div>
<view class="grid grid-cols-3 gap-3">
<div @click="utils.toUrl('/mall/caiwu/money/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
佣金管理
</div>
<div @click="utils.toUrl('/mall/caiwu/cash/index')"
class="item border-2 border-solid border-gray-100 rounded bg-slate-50 p-2 flex justify-between"
style="font-size: 0.75rem;">
提现管理
</div>
</view>
</div>
</view>
</wd-transition>
<view class="bg-transparent h-[80px]"></view>

@ -434,6 +434,27 @@
"navigationBarTitleText": "满额立减",
"enablePullDownRefresh": false
}
},
{
"path": "caiwu/money/index",
"style": {
"navigationBarTitleText": "佣金明细",
"enablePullDownRefresh": false
}
},
{
"path": "caiwu/cash/index",
"style": {
"navigationBarTitleText": "提现列表",
"enablePullDownRefresh": false
}
},
{
"path": "caiwu/cash/edit",
"style": {
"navigationBarTitleText": "提现",
"enablePullDownRefresh": false
}
}
]
}

@ -2,14 +2,14 @@
<view class="content">
<view
style="padding: 120rpx 0 80rpx;background: #19be6b;display: flex;justify-content: space-around;align-items: center;color: #FFF;">
<view @click="saoma">
<!-- <view @click="saoma">
<view style="text-align: center;">
<wd-icon name="scan1" size="28px"></wd-icon>
</view>
<view style="text-align: center;margin-top: 10rpx;">
收款
</view>
</view>
</view> -->
<view @click="utils.toUrl('/store/recon/list')">
<view style="text-align: center;">
<wd-icon name="view-module" size="28px"></wd-icon>
@ -18,14 +18,14 @@
账单
</view>
</view>
<!-- <view>
<view @click="show_tuikuan = 1">
<view style="text-align: center;">
<wd-icon name="enter" size="28px"></wd-icon>
</view>
<view style="text-align: center;margin-top: 10rpx;">
退款
</view>
</view> -->
</view>
</view>
<!-- <view class="action-box">
@ -173,6 +173,36 @@
</view>
</view>
</wd-popup>
<wd-popup v-model="show_tuikuan" custom-style="padding: 30px 40px;width: 80%;border-radius: 20rpx;" @close="tuikuan_info = {}">
<view style="text-align: center;color: #000;">
退款信息
</view>
<view class="shop_item_box" style="max-height: 1000rpx;overflow: scroll;">
<view style="display: flex;align-items: center;justify-content: space-between;border: none;">
<view style="width: 150rpx;">
订单号
</view>
<view style="width: calc(100% - 150rpx);">
<wd-input style="width: 100%;" v-model="tuikuan_info.order_no" />
</view>
</view>
<view style="display: flex;align-items: center;justify-content: space-between;border: none;">
<view style="width: 150rpx;">
退款金额
</view>
<view style="width: calc(100% - 150rpx);">
<wd-input type="digit" style="width: 100%;" v-model="tuikuan_info.refund_price" />
</view>
</view>
<view style="border: none;display: flex;align-items: center;justify-content: space-around;">
<wd-button type="error" @click="show_tuikuan = 0;tuikuan_info = {}">取消</wd-button>
<wd-button @click="tuikuan(tuikuan_info.order_no)"></wd-button>
</view>
</view>
</wd-popup>
</view>
</template>
@ -202,6 +232,9 @@
const show_shop = ref(0);
const date_list = ref([])
const show_tuikuan = ref(0);
const tuikuan_info = ref({})
import {
onShow,
@ -400,6 +433,41 @@
}
})
const tuikuan = (order_no) => {
uni.showModal({
title: '提示',
content: '是否确认退款?',
success(res) {
if (res.confirm) {
uni.showLoading({
title: '提交中'
})
recon.tuikuan({
order_no,
refund_price: tuikuan_info.value ? tuikuan_info.value.refund_price : 0
}).then(res => {
uni.hideLoading()
if (res.code == 0) {
uni.showToast({
icon: 'none',
title: '退款成功'
})
show_tuikuan.value = 0
} else {
uni.showToast({
icon: 'none',
title: res.msg
})
}
})
}
}
})
};
//

@ -24,32 +24,23 @@
</view>
</view>
</template>
<view style="height: 40px;" class="userBox">
<template v-if="order.detail && order.detail.length > 0">
<view v-for="item of order.detail" style="width: 100%;">
<view style="color: rgba(0,0,0,0.85); font-size: 16px;display: flex;align-items: center;justify-content: space-around;">
<view style="width: 50%;">
{{ item.goods_name }}
</view>
<view style="width: 25%;">
x {{ item.num }}
</view>
<view style="width: 25%;">
<wd-tag class="mx-1" size="small" type="success">
{{ item.price }}
</wd-tag>
</view>
<view style="height: 40px;display: block;" class="userBox" v-if="order.detail && order.detail.length > 0">
<view v-for="item of order.detail" style="width: 100%;">
<view style="color: rgba(0,0,0,0.85); font-size: 16px;display: flex;align-items: center;justify-content: space-around;">
<view style="width: 50%;">
{{ item.goods_name }}
</view>
<view style="width: 25%;">
x {{ item.num }}
</view>
<view style="width: 25%;">
<wd-tag class="mx-1" size="small" type="success">
{{ item.price }}
</wd-tag>
</view>
</view>
</template>
<template v-else>
<view style="color: rgba(0,0,0,0.85);">
支付金额<wd-tag class="mx-1" size="small" type="success">
{{ order.total_price }}
</wd-tag>
</view>
</template>
</view>
</view>
<template #footer>
@ -57,8 +48,11 @@
<view style="color: #999;">
{{ order.create_time }}
</view>
<view style="color: rgba(0,0,0,0.85);padding: 30rpx 0">
支付金额{{ order.pay_price }}
</view>
<view>
<wd-button @click="tuikuan(order.order_no)" size="small"
<wd-button @click="tuikuan_order = order;show_tuikuan=1;tuikuan_info.refund_price = tuikuan_order.pay_price" size="small"
style="margin-right: 0px;">退款</wd-button>
</view>
</view>
@ -72,6 +66,36 @@
<wd-toast />
<wd-message-box></wd-message-box>
<wd-popup v-model="show_tuikuan" custom-style="padding: 30px 40px;width: 80%;border-radius: 20rpx;" @close="tuikuan_info = {}">
<view style="text-align: center;color: #000;">
退款信息
</view>
<view class="shop_item_box" style="max-height: 1000rpx;overflow: scroll;">
<view style="display: flex;align-items: center;justify-content: space-between;border: none;">
<view style="width: 150rpx;">
订单号
</view>
<view style="width: calc(100% - 150rpx);">
{{ tuikuan_order.order_no }}
</view>
</view>
<view style="display: flex;align-items: center;justify-content: space-between;border: none;">
<view style="width: 150rpx;">
退款金额
</view>
<view style="width: calc(100% - 150rpx);">
<wd-input type="digit" style="width: 100%;" v-model="tuikuan_info.refund_price" />
</view>
</view>
<view style="border: none;display: flex;align-items: center;justify-content: space-around;">
<wd-button type="error" @click="show_tuikuan = 0;tuikuan_info = {}">取消</wd-button>
<wd-button @click="tuikuan(tuikuan_order.order_no)"></wd-button>
</view>
</view>
</wd-popup>
</view>
</template>
@ -110,6 +134,11 @@
const searchType = ref('订单号');
const popover = ref(false);
const show_tuikuan = ref(0);
const tuikuan_info = ref({})
const tuikuan_order = ref({})
const search = ({
@ -139,12 +168,20 @@
content: '是否确认退款?',
success(res) {
if (res.confirm) {
uni.showLoading({
title: '提交中'
})
recon.tuikuan({
order_no,
refund_price: ''
refund_price: tuikuan_info.value ? tuikuan_info.value.refund_price : 0
}).then(res => {
uni.hideLoading()
if (res.code == 0) {
uni.showToast({
icon: 'none',
title: '退款成功'
})
show_tuikuan.value = 0
} else {
uni.showToast({
icon: 'none',
@ -249,4 +286,10 @@
color: rgba(0, 0, 0, 0.25);
font-size: 12px;
}
.shop_item_box>view {
padding: 20rpx 0;
border-bottom: 1rpx solid #F0F0F0;
}
</style>
Loading…
Cancel
Save