1
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
VITE_APP_NAME=后台管理系统
|
||||
VITE_API_URL=http://localhost:9090/api
|
||||
#VITE_API_URL=http://localhost:9090/api
|
||||
#VITE_API_URL=http://yxw.wsdns.cn/api
|
||||
#VITE_SOCKET_URL=ws://localhost:9190
|
||||
#VITE_API_URL=http://127.0.0.1:9090/api
|
||||
VITE_API_URL=http://127.0.0.1:9090/api
|
||||
#VITE_API_URL=https://server.gxwebsoft.com/api
|
||||
VITE_SOCKET_URL=wss://server.gxwebsoft.com
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
VITE_APP_NAME=后台管理系统
|
||||
#VITE_API_URL=https://server.jimeigroup.cn/api
|
||||
#VITE_API_URL=https://server.gxwebsoft.com/api
|
||||
VITE_API_URL=/api
|
||||
VITE_API_URL=http://yxw.wsdns.cn/api
|
||||
VITE_SOCKET_URL=wss://server.gxwebsoft.com
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Order, OrderParam } from './model';
|
||||
import { App } from "@/api/app/model";
|
||||
import { App } from '@/api/app/model';
|
||||
|
||||
/**
|
||||
* 分页查询订单
|
||||
@@ -32,6 +32,20 @@ export async function listOrder(params?: OrderParam) {
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*/
|
||||
export async function listOrderPay(params?: OrderParam) {
|
||||
const res = await request.get<ApiResult<Order[]>>('/shop/order-pay', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询订单
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@ export interface Order {
|
||||
// 订单类型
|
||||
orderType?: string;
|
||||
// 订单来源
|
||||
orderSource?: string;
|
||||
orderSource?: number;
|
||||
// 来源记录ID
|
||||
orderSourceId?: number;
|
||||
// 来源记录的参数 (json格式)
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
<template v-if="column.key === 'user'">
|
||||
<User v-if="record.user" :record="record.user" />
|
||||
</template>
|
||||
<template v-if="column.key === 'touziUser'">
|
||||
<User v-if="record.touziUser" :record="record.touziUser" />
|
||||
</template>
|
||||
<template v-if="column.key === 'qrcode'">
|
||||
<a-image :src="record.qrcode" :width="50" />
|
||||
</template>
|
||||
@@ -180,6 +183,11 @@
|
||||
dataIndex: 'user',
|
||||
key: 'user'
|
||||
},
|
||||
{
|
||||
title: '投资人',
|
||||
dataIndex: 'touziUser',
|
||||
key: 'touziUser'
|
||||
},
|
||||
{
|
||||
title: '设备名称',
|
||||
dataIndex: 'equipmentName',
|
||||
|
||||
@@ -504,6 +504,11 @@
|
||||
return '第' + (index + 1) + '期';
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '订单号',
|
||||
dataIndex: 'orderNo',
|
||||
key: 'orderNo'
|
||||
},
|
||||
{
|
||||
title: '订单金额',
|
||||
dataIndex: 'orderPrice',
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"
|
||||
>
|
||||
<a-form-item label="订单号" name="orderId">
|
||||
<span>{{ order.orderId }}</span>
|
||||
<span>{{ order.orderNo }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
:body-style="{ paddingBottom: '8px' }"
|
||||
@update:visible="updateVisible"
|
||||
:maskClosable="false"
|
||||
:destroy-on-close="true"
|
||||
@ok="save"
|
||||
>
|
||||
<a-form
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
},
|
||||
{
|
||||
title: '订单号',
|
||||
dataIndex: 'orderId',
|
||||
dataIndex: 'orderNo',
|
||||
key: 'orderId'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
</a-form-item>
|
||||
<a-row :gutter="16">
|
||||
<a-col>
|
||||
<a-form-item label="投资人收益" name="touziProfit">
|
||||
<a-form-item :label="(form.equipmentCategory == '20' || form.equipmentCategory == '30')?'投资人每期收益':'投资人收益'" name="touziProfit">
|
||||
<a-input-number
|
||||
:min="0"
|
||||
:precision="2"
|
||||
@@ -219,7 +219,7 @@
|
||||
</a-row>
|
||||
<a-row :gutter="16">
|
||||
<a-col>
|
||||
<a-form-item label="推荐人收益" name="tuijianProfit">
|
||||
<a-form-item :label="(form.equipmentCategory == '20' || form.equipmentCategory == '30')?'推荐人每期收益':'推荐人收益'" name="tuijianProfit">
|
||||
<a-input-number
|
||||
:min="0"
|
||||
:precision="2"
|
||||
@@ -241,7 +241,7 @@
|
||||
</a-row>
|
||||
<a-row :gutter="16">
|
||||
<a-col>
|
||||
<a-form-item label="门店收益" name="mendianProfit">
|
||||
<a-form-item :label="(form.equipmentCategory == '20' || form.equipmentCategory == '30')?'门店每期收益':'门店收益'" name="mendianProfit">
|
||||
<a-input-number
|
||||
:min="0"
|
||||
:precision="2"
|
||||
@@ -263,7 +263,7 @@
|
||||
</a-row>
|
||||
<a-row :gutter="16">
|
||||
<a-col>
|
||||
<a-form-item label="区域经理收益" name="jingliProfit">
|
||||
<a-form-item :label="(form.equipmentCategory == '20' || form.equipmentCategory == '30')?'区域经理每期收益':'区域经理收益'" name="jingliProfit">
|
||||
<a-input-number
|
||||
:min="0"
|
||||
:precision="2"
|
||||
@@ -413,6 +413,14 @@
|
||||
repayment: 0,
|
||||
serviceCharges: 0,
|
||||
periodsType: 0,
|
||||
touziProfit: 0,
|
||||
touziFirstProfit: 0,
|
||||
tuijianProfit: 0,
|
||||
tuijianFirstProfit: 0,
|
||||
mendianProfit: 0,
|
||||
mendianFirstProfit: 0,
|
||||
jingliProfit: 0,
|
||||
jingliFirstProfit: 0,
|
||||
tenantId: Number(localStorage.getItem('tenantId'))
|
||||
});
|
||||
|
||||
|
||||
@@ -295,6 +295,7 @@
|
||||
batteryDeposit: 300,
|
||||
batteryInsurance: 0,
|
||||
batteryPrice: 0,
|
||||
touziUserId: null,
|
||||
tenantId: Number(localStorage.getItem('tenantId'))
|
||||
});
|
||||
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="column.key === 'touziUser'">
|
||||
<User v-if="record.touziUser" :record="record.touziUser" />
|
||||
</template>
|
||||
<template v-if="column.key === 'user'">
|
||||
<User v-if="record.user" :record="record.user" />
|
||||
</template>
|
||||
@@ -76,6 +79,7 @@
|
||||
{{ record.comments }}
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template v-if="column.key === 'userId'">
|
||||
<a-tag v-if="record.userId === 0" color="orange">未绑定</a-tag>
|
||||
<a-tag v-else color="green">已绑定</a-tag>
|
||||
@@ -176,7 +180,12 @@
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '用户信息',
|
||||
title: '投资人',
|
||||
dataIndex: 'touziUser',
|
||||
key: 'touziUser'
|
||||
},
|
||||
{
|
||||
title: '在租用户',
|
||||
dataIndex: 'user',
|
||||
key: 'user'
|
||||
},
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
</a-table>
|
||||
</a-spin>
|
||||
</a-card>
|
||||
<a-card title="续费订单" class="order-card">
|
||||
<a-card title="缴费记录" class="order-card">
|
||||
<a-spin :spinning="loading">
|
||||
<a-table
|
||||
:data-source="renewOrderList"
|
||||
@@ -368,7 +368,7 @@
|
||||
import * as EquipmentApi from '@/api/apps/equipment';
|
||||
import * as EquipmentRecordApi from '@/api/apps/equipment/record';
|
||||
import { ColumnItem } from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import { listOrder } from '@/api/order';
|
||||
import { listOrder, listOrderPay } from '@/api/order';
|
||||
import { CopyOutlined } from '@ant-design/icons-vue';
|
||||
import { EquipmentRecord } from '@/api/apps/equipment/record/model';
|
||||
|
||||
@@ -501,8 +501,26 @@
|
||||
dataIndex: 'index',
|
||||
key: 'index',
|
||||
customRender: ({ index }) => {
|
||||
return '第' + (index + 1) + '期';
|
||||
console.log({ ...order });
|
||||
|
||||
if(props.data.orderSource == 20) {
|
||||
if(index == 0) {
|
||||
return '首期';
|
||||
}else {
|
||||
return '第' + index + '期';
|
||||
}
|
||||
}else if(props.data.orderSource == 30 || props.data.orderSource == 40) {
|
||||
return '第' + (index + 1) + '期';
|
||||
}else if(props.data.orderSource == 10) {
|
||||
return '一次性购买';
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '订单号',
|
||||
dataIndex: 'orderNo',
|
||||
key: 'orderNo'
|
||||
},
|
||||
{
|
||||
title: '订单金额',
|
||||
@@ -640,13 +658,26 @@
|
||||
|
||||
const getRenewOrder = () => {
|
||||
loading.value = true;
|
||||
listOrder({
|
||||
console.log(order);
|
||||
if(order.orderId > 28798) {
|
||||
listOrderPay({
|
||||
rentOrderId: order.orderId,
|
||||
payStatus: 20
|
||||
sort: ' create_time asc'
|
||||
}).then((data) => {
|
||||
renewOrderList.value = data;
|
||||
loading.value = false;
|
||||
});
|
||||
}else {
|
||||
listOrder({
|
||||
rentOrderId: order.orderId,
|
||||
payStatus: 20,
|
||||
sort: 'create_time asc',
|
||||
}).then((data) => {
|
||||
renewOrderList.value = data;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const getEquipmentRecordList = () => {
|
||||
@@ -660,8 +691,10 @@
|
||||
|
||||
const expirationDay = (order) => {
|
||||
const setTime = new Date(order.expirationTime);
|
||||
const nowTime = new Date(order.payTime);
|
||||
const nowTime = new Date();
|
||||
const restSec = setTime.getTime() - nowTime.getTime();
|
||||
console.log("计算剩余天数");
|
||||
console.log(restSec);
|
||||
// 剩余天数
|
||||
const day = parseInt(String(restSec / (60 * 60 * 24 * 1000)));
|
||||
if (day < 0) {
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
</template>
|
||||
<template v-if="column.key === 'payStatus'">
|
||||
<div class="ele-text-placeholder">
|
||||
付款状态:
|
||||
<!-- 付款状态:-->
|
||||
<a-tag
|
||||
v-if="record.payStatus === 10"
|
||||
@click="onAlipayQuery(record.orderId)"
|
||||
@@ -84,24 +84,27 @@
|
||||
>
|
||||
</div>
|
||||
<div class="ele-text-placeholder">
|
||||
发货状态:
|
||||
<!-- 发货状态:-->
|
||||
<a-tag v-if="record.deliveryStatus === 10">未发货</a-tag>
|
||||
<a-tag v-if="record.deliveryStatus === 20" color="success"
|
||||
>已发货</a-tag
|
||||
>
|
||||
</div>
|
||||
<div class="ele-text-placeholder">
|
||||
收货状态:
|
||||
<!-- 收货状态:-->
|
||||
<a-tag v-if="record.receiptStatus === 10">未收货</a-tag>
|
||||
<a-tag v-if="record.receiptStatus === 20" color="success"
|
||||
>已收货</a-tag
|
||||
>
|
||||
<a-tag v-if="record.receiptStatus === 21" color="purple"
|
||||
>退租中</a-tag
|
||||
>
|
||||
<a-tag v-if="record.receiptStatus === 30" color="error"
|
||||
>已退租</a-tag
|
||||
>
|
||||
</div>
|
||||
<div class="ele-text-placeholder" v-if="record.orderSource != 10">
|
||||
分期状态:
|
||||
<!-- 分期状态:-->
|
||||
<a-tag v-if="record.fenqiStatus == 1" color="success"
|
||||
>已完成</a-tag
|
||||
>
|
||||
@@ -163,6 +166,12 @@
|
||||
<template v-if="column.key === 'nickname'">
|
||||
<User :record="record" />
|
||||
</template>
|
||||
<template v-if="column.key === 'batteryModel'">
|
||||
{{ record.equipmentGoods.batteryModel }}
|
||||
</template>
|
||||
<template v-if="column.key === 'equipmentCode'">
|
||||
{{ record.equipment?.equipmentCode }}
|
||||
</template>
|
||||
<template v-if="column.key === 'createTime'">
|
||||
{{ record.createTime }}
|
||||
</template>
|
||||
@@ -261,8 +270,8 @@
|
||||
},
|
||||
{
|
||||
title: '订单号',
|
||||
dataIndex: 'orderId',
|
||||
key: 'orderId',
|
||||
dataIndex: 'orderNo',
|
||||
key: 'orderNo',
|
||||
sorter: true
|
||||
},
|
||||
{
|
||||
@@ -270,6 +279,16 @@
|
||||
dataIndex: 'goodsId',
|
||||
key: 'goodsId'
|
||||
},
|
||||
{
|
||||
title: '电池型号',
|
||||
dataIndex: 'batteryModel',
|
||||
key: 'batteryModel'
|
||||
},
|
||||
{
|
||||
title: '电池编号',
|
||||
dataIndex: 'equipmentCode',
|
||||
key: 'equipmentCode'
|
||||
},
|
||||
{
|
||||
title: '所属商户',
|
||||
dataIndex: 'merchantName',
|
||||
@@ -419,6 +438,7 @@
|
||||
}
|
||||
where.tenantId = localStorage.getItem('tenantId');
|
||||
where.isRenew = 0;
|
||||
where.isFreeze = 1;
|
||||
return pageOrder({
|
||||
...where,
|
||||
...orders,
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<!-- 搜索表单 -->
|
||||
<template>
|
||||
<a-space :size="10" style="flex-wrap: wrap">
|
||||
<a-button
|
||||
danger
|
||||
type="primary"
|
||||
class="ele-btn-icon"
|
||||
:disabled="selection.length === 0"
|
||||
@click="removeBatch"
|
||||
>
|
||||
<template #icon>
|
||||
<delete-outlined />
|
||||
</template>
|
||||
<span>批量删除</span>
|
||||
</a-button>
|
||||
<!-- <a-button-->
|
||||
<!-- danger-->
|
||||
<!-- type="primary"-->
|
||||
<!-- class="ele-btn-icon"-->
|
||||
<!-- :disabled="selection.length === 0"-->
|
||||
<!-- @click="removeBatch"-->
|
||||
<!-- >-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <delete-outlined />-->
|
||||
<!-- </template>-->
|
||||
<!-- <span>批量删除</span>-->
|
||||
<!-- </a-button>-->
|
||||
<a-input-search
|
||||
allow-clear
|
||||
placeholder="请输入关键词"
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
</template>
|
||||
<template v-if="column.key === 'action'">
|
||||
<a-space>
|
||||
<a-button @click="openEdit(record)">审核</a-button>
|
||||
<a-button v-if="record.auditStatus == 10" @click="openEdit(record)">审核</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</template>
|
||||
@@ -128,8 +128,8 @@
|
||||
},
|
||||
{
|
||||
title: '订单号',
|
||||
dataIndex: 'orderId',
|
||||
key: 'orderId'
|
||||
dataIndex: 'orderNo',
|
||||
key: 'orderNo'
|
||||
},
|
||||
{
|
||||
title: '买家',
|
||||
|
||||
Reference in New Issue
Block a user