解决退款速度慢,写真退款失败问题v2.0.1

This commit is contained in:
yuanteng 2025-03-25 09:36:50 +08:00
parent 30dc890c54
commit 8ef71c69fb
14 changed files with 96 additions and 123 deletions

View File

@ -42,7 +42,7 @@ const editorConfig = {
} }
editorConfig.readOnly = props.disableRich // editorConfig.readOnly = props.disableRich //
editorConfig.autoFocus = false editorConfig.autoFocus = false //
editorConfig.MENU_CONF['uploadImage'] = { editorConfig.MENU_CONF['uploadImage'] = {
allowedFileTypes: ['image/*'], // allowedFileTypes: ['image/*'], //
maxFileSize: 1024 * 1024 * 10, //10M maxFileSize: 1024 * 1024 * 10, //10M
@ -73,7 +73,6 @@ onBeforeUnmount(() => {
const handleCreated = (editor) => { const handleCreated = (editor) => {
editorRef.value = editor // editor editorRef.value = editor // editor
console.log(editor.getAllMenuKeys())
} }
const handleChange = (editor) => { //emit const handleChange = (editor) => { //emit

View File

@ -37,7 +37,7 @@
<div class="festivalBox"> <div class="festivalBox">
<el-form-item label="节日名称" prop="festivalName" style="width: 300px;"> <el-form-item label="节日名称" prop="festivalName" style="width: 300px;">
<el-select v-model="detailFrom.festivalName" placeholder="请选择" > <el-select v-model="detailFrom.festivalName" placeholder="请选择" >
<el-option v-for="item in festivalArr" :key="item" :label="item.name" :value="item.name" /> <el-option v-for="(item,index) in festivalArr" :key="index" :label="item.name" :value="item.name" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="产品类别" prop="type" style="width: 240px;"> <el-form-item label="产品类别" prop="type" style="width: 240px;">
@ -137,12 +137,12 @@ const getFestivalArr = async () => {
const getProductInfo = async () => { // const getProductInfo = async () => { //
const res = await myAxios.post('/goods/getById',{ id: route.params.id }) const res = await myAxios.post('/goods/getById',{ id: route.params.id })
console.log('后端查询商品--->',res.data.data) console.log('后端查询商品--->',res.data)
if(res.data.code === 1) { if(res.data.code === 1) {
previewImgUrl.value = res.data.data.goodImg previewImgUrl.value = res.data.data.goodImg
detailFrom.value = res.data.data detailFrom.value = res.data.data
previewRichText.value = res.data.data.richText previewRichText.value = res.data.data.richText
detailFrom.value.festivalName = res.data.data.festivalName.substring(0,1) detailFrom.value.festivalName = res.data.data.festivalName.split(';')[0]
labelList.value = res.data.data.label.split(';') labelList.value = res.data.data.label.split(';')
} }
} }
@ -156,7 +156,7 @@ const getTypeList = async () => { //获取类别列表作为可选项
// //
const onSubmit = async () => { const onSubmit = async () => {
console.log('提交前的表格',detailFrom.value) // console.log('',detailFrom.value)
const values = Object.values(detailFrom.value ); const values = Object.values(detailFrom.value );
// 使some() // 使some()
if (values.some((value: any) => value === null || value === undefined || value === '' || value === 'PHA+PGJyPjwvcD4=')) { if (values.some((value: any) => value === null || value === undefined || value === '' || value === 'PHA+PGJyPjwvcD4=')) {

View File

@ -126,7 +126,7 @@ onMounted(() => { //页面加载时获取商品列表和分类页表
const getProductList = async () => { const getProductList = async () => {
try { try {
const res = await myAxios.post('/goods/list/page', {...searchParams.value}); const res = await myAxios.post('/goods/list/page', {...searchParams.value});
console.log('res--->', res.data) // console.log('res--->', res.data)
if (res.data.code === 1) { if (res.data.code === 1) {
tableData.value = res.data.data.records; tableData.value = res.data.data.records;
total.value = parseInt(res.data.data.total) // total.value = parseInt(res.data.data.total) //

View File

@ -34,7 +34,7 @@
</template> </template>
</el-popconfirm> </el-popconfirm>
<el-popconfirm confirm-button-text='' cancel-button-text='' icon="InfoFilled" icon-color="red" <el-popconfirm confirm-button-text='' cancel-button-text='' icon="InfoFilled" icon-color="red"
title="拍摄是否完成?" @confirm="changeOrderStatus(scope.row)" width=180 v-if="['待发货'].includes(scope.row.orderStatus)"> title="拍摄是否完成?" @confirm="changeOrderStatus(scope.row,'交易成功')" width=180 v-if="['待发货'].includes(scope.row.orderStatus)">
<template #reference> <template #reference>
<el-button size="small" type="primary" plain>拍摄完成</el-button> <el-button size="small" type="primary" plain>拍摄完成</el-button>
</template> </template>
@ -99,7 +99,7 @@ const getOrderList = async () => {
if (res.data.code === 1) { if (res.data.code === 1) {
tableData.value = res.data.data.records; tableData.value = res.data.data.records;
total.value = parseInt(res.data.data.total) total.value = parseInt(res.data.data.total)
console.log('表单信息--->', tableData.value); // console.log('--->', tableData.value);
} else { } else {
ElMessage({ ElMessage({
message: '获取数据失败', message: '获取数据失败',
@ -120,30 +120,31 @@ const showDetail = (row: any) => {
} }
}) })
}; };
const changeOrderStatus = async (row: any) => { // const changeOrderStatus = async (row: any,msg: string) => { //
const res = await myAxios.post('/advanceOrder/update/orderStatus',{ const res = await myAxios.post('/advanceOrder/update/orderStatus',{
id: row.id, id: row.id,
orderStatus: '交易成功' orderStatus: msg
}) })
if(res.data.code === 1) { if(res.data.code === 1) {
await getOrderList() await getOrderList()
SuccessInfo('订单确认完成') SuccessInfo(msg)
} else { } else {
WarnInfo(res.data.message) WarnInfo(res.data.message)
} }
} }
const deleteOrder = async (row: any) => { //退 const deleteOrder = async (row: any) => { //退
loading.value = true loading.value = true
console.log('row-->', row) // console.log('row-->', row)
const res = await myAxios.post('/wechat/refund/create', { id: row.id }) //退 const res = await myAxios.post('/wechat/refund/photo/create', { id: row.id }) //退
console.log(res) // console.log(res)
setTimeout(() => { setTimeout(async () => {
if (res.data.code === 1) { if (res.data.code === 1) {
SuccessInfo('退款成功') SuccessInfo('退款成功')
getOrderList() await changeOrderStatus(row,'已退款')
await getOrderList()
loading.value = false loading.value = false
} }
}, 10000) }, 3000)
} }
const reset = () => { // const reset = () => { //
orderNumber.value = '' orderNumber.value = ''

View File

@ -20,15 +20,16 @@
<el-input size="large" style="margin: 10px 0;" :prefix-icon="Lock" show-password v-model="password"></el-input> <el-input size="large" style="margin: 10px 0;" :prefix-icon="Lock" show-password v-model="password"></el-input>
</el-form-item> </el-form-item>
<div style="margin: 10px 0; text-align: right"> <div style="margin: 10px 0; text-align: right">
<div style="display: block; <el-button
style="display: block;
font-size: 15px; font-size: 15px;
width: 80%; width: 80%;
margin: 35px auto 0 auto; margin: 35px auto 0 auto;
text-align: center; text-align: center;
border-radius: 20px; border-radius: 20px;
background-color: rgb(172, 115, 82); background-color: #AC7352;
line-height: 40px; "
" @click="Login">登录</div> @click="Login()" @keydown.enter="keyDown" size="large" ><p style="color: #ffffff">登录</p></el-button>
</div> </div>
</el-form> </el-form>
@ -41,8 +42,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue' import {onMounted, onUnmounted, ref} from 'vue'
import { ElMessage } from 'element-plus'
import { SuccessInfo, ErrorInfo, WarnInfo, CommInfo } from '@/utils/messageInfo'; import { SuccessInfo, ErrorInfo, WarnInfo, CommInfo } from '@/utils/messageInfo';
import {useRouter} from 'vue-router' import {useRouter} from 'vue-router'
import myAxios from '@/api/myAxios'; import myAxios from '@/api/myAxios';
@ -55,6 +55,20 @@ const password = ref('')
const router = useRouter() const router = useRouter()
const store = userStore() const store = userStore()
onMounted(()=>{
window.addEventListener('keydown',keyDown)
})
onUnmounted(()=>{
window.removeEventListener('keydown',keyDown,false)
})
//
const keyDown = (e:any) => {
if (e.keyCode == 13 || e.keyCode == 100) {
Login()
}
}
const Login = async ()=>{ const Login = async ()=>{
if(username.value === '' || password.value === '') { if(username.value === '' || password.value === '') {

View File

@ -66,7 +66,7 @@
发货 发货
</el-button> </el-button>
<el-popconfirm confirm-button-text='' cancel-button-text='' icon="InfoFilled" icon-color="red" <el-popconfirm confirm-button-text='' cancel-button-text='' icon="InfoFilled" icon-color="red"
title="订单是否完成?" @confirm="successfulTransaction(scope.row.id)" width=180> title="订单是否完成?" @confirm="orderTransaction(scope.row.id,'交易完成')" width=180>
<template #reference> <template #reference>
<el-button v-if="['待收货'].includes(scope.row.orderStatus)" size="small" type="success" <el-button v-if="['待收货'].includes(scope.row.orderStatus)" size="small" type="success"
plain>交易完成</el-button> plain>交易完成</el-button>
@ -273,17 +273,19 @@ const deleteOrder = async (row: any) => { //微信退款
console.log('row-->', row) console.log('row-->', row)
const res = await myAxios.post('/wechat/refund/create', { id: row.id }) //退 const res = await myAxios.post('/wechat/refund/create', { id: row.id }) //退
console.log(res) console.log(res)
setTimeout(() => { setTimeout(async () => {
if (res.data.code === 1) { if (res.data.code === 1) {
SuccessInfo('退款成功') SuccessInfo('退款成功')
getOrderList() await orderTransaction(row.id,'已退款')
await getOrderList()
loading.value = false loading.value = false
} }
}, 3) }, 3000)
} }
const reset = () => { // const reset = () => { //
orderNumber.value = ''; orderNumber.value = '';
}; }
const load = (onum : any) => { // const load = (onum : any) => { //
searchParams.value.orderNumber = onum searchParams.value.orderNumber = onum
searchParams.value.current = 1 searchParams.value.current = 1
@ -293,21 +295,21 @@ const cancelOrder = async (row: any) => { //取消订单的方法(未支付能
console.log('点击的这一行--->', row); console.log('点击的这一行--->', row);
const res = await myAxios.post('/order/cancel/id', { id: row.id }) const res = await myAxios.post('/order/cancel/id', { id: row.id })
if (res.data.code === 1) { if (res.data.code === 1) {
getOrderList() await getOrderList()
SuccessInfo('取消订单成功') SuccessInfo('取消订单成功')
} else { } else {
ErrorInfo('请求错误') ErrorInfo('请求错误')
} }
} }
const successfulTransaction = async (oid: any) => { const orderTransaction = async (oid: any,msg: string) => {
// console.log('---->',oid) // console.log('---->',oid)
// loading.value = true // loading.value = true
const res = await myAxios.post('/order/update/all/orderStatus',{ const res = await myAxios.post('/order/update/all/orderStatus',{
id: oid, id: oid,
orderStatus: '交易完成' orderStatus: msg
}) })
if (res.data.code === 1) { if (res.data.code === 1) {
SuccessInfo('订单完成') SuccessInfo(msg)
await getOrderList() await getOrderList()
loading.value = false loading.value = false
} else { } else {

View File

@ -131,27 +131,13 @@
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
<!-- 发货弹窗-->
<el-dialog title="发货" v-model="shipments" width="60%">
<el-form label-width="100px" size="default">
<el-form-item label="快递单号" style="width: 300px;">
<el-input v-model="shipment.trackingNumber"></el-input>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button style="height: 30px;" @click=" shipments = false">取消</el-button>
<el-button style="height: 30px" type="primary" @click="deliverGoods">确认</el-button>
</div>
</template>
</el-dialog>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted, ref } from "vue"; import { onMounted, ref } from "vue";
import myAxios from "@/api/myAxios"; import myAxios from "@/api/myAxios";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { SuccessInfo, ErrorInfo } from "@/utils/messageInfo"; import {SuccessInfo, ErrorInfo, WarnInfo} from "@/utils/messageInfo";
import DatePicker from "@/layout/components/DatePicker.vue"; import DatePicker from "@/layout/components/DatePicker.vue";
import TimePicker from "@/layout/components/TimePicker.vue"; import TimePicker from "@/layout/components/TimePicker.vue";
import emitter from "@/utils/emitter"; import emitter from "@/utils/emitter";
@ -162,11 +148,7 @@ const totalPage = ref(0);
const title = ref('') const title = ref('')
const disabled = ref(true) const disabled = ref(true)
const editForm: any = ref({});// const editForm: any = ref({});//
const shipment: any = ref({
trackingNumber: null
})//
const DialogVisible = ref(false); // const DialogVisible = ref(false); //
const shipments = ref(false)
const goodId = ref('') const goodId = ref('')
const reservationDate = ref('') const reservationDate = ref('')
@ -174,13 +156,10 @@ const timeSlot = ref('')
const searchParams: any = ref({ // const searchParams: any = ref({ //
current: 1, // current: 1, //
pageSize: 5, // pageSize: 5, //
// sortField: "id", //ID
sortOrder: "descend", // sortOrder: "descend", //
// goodId: goodId.value,
// reservationDate: reservationDate.value,
// timeSlot: timeSlot.value
}) })
const loading = ref(false) const loading = ref(false)
onMounted(() => { onMounted(() => {
emitter.on('getReservationDate', (val: any) => { emitter.on('getReservationDate', (val: any) => {
reservationDate.value = val reservationDate.value = val
@ -245,33 +224,10 @@ const showDetail = (index: number, row: any) => {
editForm.value = row; editForm.value = row;
console.log('editForm--->', editForm.value); console.log('editForm--->', editForm.value);
}; };
//
const currentId = ref<number | null>(null);
const openShipmentDialog = (id: number) => {
shipments.value = true;
currentId.value = id;
}
const deliverGoods = async () => { //
if (currentId.value) {
const res = await myAxios.post('/order/update', {
id: currentId.value,
trackingNumber: shipment.value.trackingNumber
})
if (res.data.code === 1) {
ElMessage({
type: 'success',
message: '发货成功'
})
getOrderList();
}
} else {
ElMessage.error('更新失败,请检查字段')
}
shipments.value = false;
}
const refundOrder = async (row : any) => { //退 const refundOrder = async (row : any) => { //退
loading.value = true loading.value = true
console.log('row-------------------------------------------------------------------------------------------------------------------------------->',row) // console.log('row-------------------------------------------------------------------------------------------------------------------------------->',row)
const res = await myAxios.post('/wechat/refund/part/create', { id: row.orderItemId }) //退 const res = await myAxios.post('/wechat/refund/part/create', { id: row.orderItemId }) //退
console.log(res) console.log(res)
if(res.data.code === 1) { if(res.data.code === 1) {
@ -279,9 +235,10 @@ const refundOrder = async (row : any) => { //微信退款
SuccessInfo('退款成功') SuccessInfo('退款成功')
getOrderList() getOrderList()
loading.value = false loading.value = false
}, 5000) }, 10000)
} }
} }
const reset = () => { // const reset = () => { //
goodId.value = '' goodId.value = ''
reservationDate.value = '' reservationDate.value = ''
@ -298,16 +255,7 @@ const reset = () => { //重置搜索框
const load = () => { const load = () => {
getOrderList() getOrderList()
} // } //
const cancelOrder = async (row: any) => { //()
console.log('点击的这一行--->', row);
const res = await myAxios.post('/order/cancel/id', { id: row.id })
if (res.data.code === 1) {
getOrderList()
SuccessInfo('取消订单成功')
} else {
ErrorInfo('请求错误')
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -62,7 +62,7 @@
</template> </template>
</el-popconfirm> </el-popconfirm>
<el-popconfirm confirm-button-text='' cancel-button-text='' icon="InfoFilled" icon-color="red" <el-popconfirm confirm-button-text='' cancel-button-text='' icon="InfoFilled" icon-color="red"
title="订单已完成?" @confirm="successfulTransaction(scope.row.id)" width=180> title="订单已完成?" @confirm="orderTransaction(scope.row.id,'交易完成')" width=180>
<template #reference> <template #reference>
<el-button v-if="['待收货'].includes(scope.row.orderStatus)" size="small" type="primary" <el-button v-if="['待收货'].includes(scope.row.orderStatus)" size="small" type="primary"
plain>完成订单</el-button> plain>完成订单</el-button>
@ -144,16 +144,17 @@ const getOrderList = async () => {
const deleteOrder = async (row : any) => { //退 const deleteOrder = async (row : any) => { //退
loading.value = true loading.value = true
console.log('row-->',row) // console.log('row-->',row)
const res = await myAxios.post('/wechat/refund/create', { id: row.id }) //退 const res = await myAxios.post('/wechat/refund/create', { id: row.id }) //退
console.log(res) // console.log(res)
setTimeout(()=>{ setTimeout(async ()=>{
if(res.data.code === 1) { if(res.data.code === 1) {
SuccessInfo('退款成功') SuccessInfo('退款成功')
getOrderList() await orderTransaction(row.id,'已退款')
await getOrderList()
loading.value = false loading.value = false
} }
},10000) },3000)
} }
const reset = () => { // const reset = () => { //
orderNumber.value = '' orderNumber.value = ''
@ -162,7 +163,7 @@ const load = () => {
getOrderList() getOrderList()
} // } //
const cancelOrder = async (row:any)=>{ //() const cancelOrder = async (row:any)=>{ //()
console.log('点击的这一行--->',row); // console.log('--->',row);
const res = await myAxios.post('/order/cancel/id',{ id: row.id }) const res = await myAxios.post('/order/cancel/id',{ id: row.id })
if(res.data.code === 1) { if(res.data.code === 1) {
getOrderList() getOrderList()
@ -171,10 +172,13 @@ const cancelOrder = async (row:any)=>{ //取消订单的方法(未支付能取
ErrorInfo('请求错误') ErrorInfo('请求错误')
} }
} }
const successfulTransaction = async (oid: any) => { // const orderTransaction = async (oid: any, msg: string) => { //
// console.log('---->',oid) // console.log('---->',oid)
// loading.value = true // loading.value = true
const res = await myAxios.post('',{}) const res = await myAxios.post('/order/update/all/orderStatus',{
id: oid,
orderStatus: msg
})
if (res.data.code === 1) { if (res.data.code === 1) {
SuccessInfo('订单完成') SuccessInfo('订单完成')
getOrderList() getOrderList()

View File

@ -109,7 +109,8 @@ const searchParams: any = ref({
// //
pageSize: 5, pageSize: 5,
// //
type: '服务类' type: '服务类',
sortOrder: 'descend'
}) })
const title : any = ref('编辑表单') const title : any = ref('编辑表单')
@ -123,7 +124,8 @@ const getCourseList = async () => {
const res = await myAxios.post('/banner/query/web',{ const res = await myAxios.post('/banner/query/web',{
current: searchParams.value.current, current: searchParams.value.current,
pageSize: searchParams.value.pageSize, pageSize: searchParams.value.pageSize,
type: searchParams.value.type type: searchParams.value.type,
sortOrder: searchParams.value.sortOrder
}) })
// console.log('---->',res.data) // console.log('---->',res.data)
if(res.data.code === 1) { if(res.data.code === 1) {
@ -138,12 +140,12 @@ const handleSelectionChange = (val:any)=>{
// //
const handleSizeChange = (newSize:any) => { const handleSizeChange = (newSize:any) => {
searchParams.value.pageSize = newSize // searchParams.value.pageSize = newSize //
// getCourseList()
}; };
// //
const handleCurrentChange = (Current:any) => { const handleCurrentChange = (Current:any) => {
searchParams.value.current = Current // searchParams.value.current = Current //
// getCourseList()
}; };
const restForm =()=> { const restForm =()=> {

View File

@ -109,7 +109,8 @@ const searchParams: any = ref({
// //
pageSize: 5, pageSize: 5,
// //
type: '实体类' type: '实体类',
sortOrder: 'descend'
}) })
const title : any = ref('编辑表单') const title : any = ref('编辑表单')
@ -123,9 +124,10 @@ const getCourseList = async () => {
const res = await myAxios.post('/banner/query/web',{ const res = await myAxios.post('/banner/query/web',{
current: searchParams.value.current, current: searchParams.value.current,
pageSize: searchParams.value.pageSize, pageSize: searchParams.value.pageSize,
type: searchParams.value.type type: searchParams.value.type,
sortOrder: searchParams.value.sortOrder
}) })
console.log('分页后端返回---->',res.data) // console.log('---->',res.data)
if(res.data.code === 1) { if(res.data.code === 1) {
tableData.value = res.data.data.records tableData.value = res.data.data.records
total.value = parseInt(res.data.data.total) total.value = parseInt(res.data.data.total)
@ -138,12 +140,12 @@ const handleSelectionChange = (val:any)=>{
// //
const handleSizeChange = (newSize:any) => { const handleSizeChange = (newSize:any) => {
searchParams.value.pageSize = newSize // searchParams.value.pageSize = newSize //
// getCourseList()
}; };
// //
const handleCurrentChange = (Current:any) => { const handleCurrentChange = (Current:any) => {
searchParams.value.current = Current // searchParams.value.current = Current //
// getCourseList()
}; };
const restForm =()=> { const restForm =()=> {

View File

@ -79,7 +79,7 @@ onMounted(() => {
// //
const getFestivalList = async () => { const getFestivalList = async () => {
const res = await myAxios.get('/festival/get') const res = await myAxios.get('/festival/get')
console.log('表格数据--->',res.data) // console.log('--->',res.data)
if (res.data.code === 1) { if (res.data.code === 1) {
tableData.value = res.data.data tableData.value = res.data.data
} else { } else {

View File

@ -35,7 +35,7 @@
<el-table-column prop="totalAmount" label="订单实付金额(元)" width="180"></el-table-column> <el-table-column prop="totalAmount" label="订单实付金额(元)" width="180"></el-table-column>
<el-table-column prop="orderStatus" label="订单状态"> <el-table-column prop="orderStatus" label="订单状态">
<template #default="scope"> <template #default="scope">
{{ scope.row.orderStatus === '待发货' ? '待取货' : '已取货' }} {{ scope.row.orderStatus === '待发货' ? '待取货' : scope.row.orderStatus }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="260px" fixed="right"> <el-table-column label="操作" width="260px" fixed="right">
@ -95,7 +95,6 @@ const searchParams: any = ref({ //封装分页
pageSize: 5, // pageSize: 5, //
sortField: "id", //ID sortField: "id", //ID
sortOrder: "descend", // sortOrder: "descend", //
orderType: 'service'
}) })
const router = useRouter() const router = useRouter()
const loading = ref(false) const loading = ref(false)
@ -120,7 +119,7 @@ const getOrderList = async () => {
try { try {
searchParams.value.orderNumber = orderNumber.value searchParams.value.orderNumber = orderNumber.value
const res = await myAxios.post('/clothesRent/list', { ...searchParams.value }); const res = await myAxios.post('/clothesRent/list', { ...searchParams.value });
console.log('订单信息--->', res.data.data); // console.log('--->', res.data.data);
if (res.data.code === 1) { if (res.data.code === 1) {
tableData.value = res.data.data.records; tableData.value = res.data.data.records;
total.value = parseInt(res.data.data.total) total.value = parseInt(res.data.data.total)
@ -152,23 +151,24 @@ const changeOrderStatus = async (row: any, msg : string) => { //改变订单
}) })
if(res.data.code === 1) { if(res.data.code === 1) {
await getOrderList() await getOrderList()
SuccessInfo('更新成功') SuccessInfo(msg)
} else { } else {
WarnInfo(res.data.message) WarnInfo(res.data.message)
} }
} }
const deleteOrder = async (row: any) => { //退 const deleteOrder = async (row: any) => { //退
loading.value = true loading.value = true
console.log('row-->', row) // console.log('row-->', row)
const res = await myAxios.post('/wechat/refund/clothesRent/create', { id: row.id }) //退 const res = await myAxios.post('/wechat/refund/clothesRent/create', { id: row.id }) //退
console.log(res) // console.log(res)
setTimeout(() => { setTimeout(async () => {
if (res.data.code === 1) { if (res.data.code === 1) {
SuccessInfo('退款成功') SuccessInfo('退款成功')
getOrderList() await changeOrderStatus(row, '已退款')
await getOrderList()
loading.value = false loading.value = false
} }
}, 10000) }, 3000)
} }
const reset = () => { // const reset = () => { //
orderNumber.value = '' orderNumber.value = ''
@ -177,7 +177,7 @@ const load = () => {
getOrderList() getOrderList()
} // } //
const cancelOrder = async (row: any) => { //() const cancelOrder = async (row: any) => { //()
console.log('点击的这一行--->', row); // console.log('--->', row);
const res = await myAxios.post('/order/cancel/id', { id: row.id }) const res = await myAxios.post('/order/cancel/id', { id: row.id })
if (res.data.code === 1) { if (res.data.code === 1) {
getOrderList() getOrderList()

View File

@ -20,7 +20,7 @@
</div> </div>
<div style="display: flex;"> <div style="display: flex;">
<el-form-item label="积分"> <el-form-item label="积分">
<el-input v-model="userForm.points"></el-input> <el-input-number v-model="userForm.points" min="0" :precision="0" :step="1" max="10000000"/>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
@ -37,6 +37,7 @@ import { ref, onBeforeMount } from 'vue'
import { SuccessInfo, WarnInfo } from '@/utils/messageInfo'; import { SuccessInfo, WarnInfo } from '@/utils/messageInfo';
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import PreviewSingleImgUpload from "@/utils/imgUpload/PreviewSingleImgUpload.vue"; import PreviewSingleImgUpload from "@/utils/imgUpload/PreviewSingleImgUpload.vue";
import {invInput} from "@/utils/entityProduct/globalVar";
const disabled = ref(true) // const disabled = ref(true) //

View File

@ -20,7 +20,7 @@
</div> </div>
<div style="display: flex;"> <div style="display: flex;">
<el-form-item label="积分"> <el-form-item label="积分">
<el-input v-model="userForm.points"></el-input> <el-input-number v-model="userForm.points" min="0" :precision="0" :step="1" max="10000000"/>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>