Files
tashow-manager/mock/order.ts
2025-10-29 17:10:53 +08:00

491 lines
13 KiB
TypeScript

import type { Request, Response } from "express";
const getOrderPage = (_req: Request, res: Response) => {
res.json({
data: {
list: [
{
id: 1,
orderNum: "123333333333",
orderType: 1,
orderTerminal: 1,
orderStatus: 10,
userId: 1,
userName: "李老师",
userNickName: null,
userAvatar: null,
userMobile: "17609087876",
userRemark: "测试用户备注",
createTime: "2025-10-16 11:31:39",
finishTime: "2025-10-16 11:28:55",
items: [
{
picUrl:
"https://inews.gtimg.com/news_bt/OBkbmPLeWLy4IM4oUDGvOIqSDSZ9lYOtW3qSXCYh78KXcAA/1000",
spuName: "测试商品名称",
skuName: "规格名称",
count: 1,
price: 1,
discountPrice: 1,
handedPrice: 0,
payPrice: 1,
unit: "件",
subTime: "2025-10-16 11:34:10",
serveAddress: "11232",
},
],
shopName: null,
shopLogo: null,
payLastTime: null,
},
// {
// orderTerminal: 0, // 订单来源
// userId: 0, // 用户编号
// userName: "", // 用户姓名
// userNickName: "张宁清", // 用户昵称
// userAvatar: "", // 用户头像
// userMobile: "18634556151", // 用户手机号
// orderStatus: 10, // 订单状态
// picUrl: "", // 商品图片
// spuName:
// "商品主标题商品主标题商品主标题商品主标题商品主题商品主标题商品主标题商品主", // 商品名称
// skuName: "标准,单独火化,基础清洁", // 商品规格
// count: 1, // 购买商品数量
// price: 100, // 单价
// handedPrice: 80, // 到手价
// payPrice: "500", // 应付金额
// unit: "", // 单位
// subTime: 1760585499000, // 预约时间
// serveAddress: "张宁清,18659156151,福州 台江区 鳌峰路 万达中心甲",
// userRemark: "你好呀你好元", // 用户备注
// payType: "wx", // 微信
// financeStatus: "1", // 财务状态
// },
// {
// id: 2,
// orderNum: "3214421412",
// createTime: "",
// orderCategoryName: "宠物殡葬",
// orderTerminal: 0,
// userId: 0,
// userName: "",
// userNickName: "",
// userAvatar: "",
// userMobile: "",
// orderStatus: 20,
// picUrl: "",
// spuName: "",
// skuName: "",
// subTime: 1760585499000, // 预约时间
// count: 0,
// price: 0,
// handedPrice: 0,
// payPrice: 0,
// unit: "",
// orderTime: "",
// serveAddress: "",
// userRemark: "",
// payType: "",
// financeStatus: "",
// },
// {
// id: 3,
// orderNum: "3214421412",
// createTime: "",
// orderCategoryName: "宠物殡葬",
// orderTerminal: 0,
// userId: 0,
// userName: "",
// subTime: 1760585499000, // 预约时间
// userNickName: "",
// userAvatar: "",
// userMobile: "",
// orderStatus: 30,
// picUrl: "",
// spuName: "",
// skuName: "",
// count: 0,
// price: 0,
// handedPrice: 0,
// payPrice: 0,
// unit: "",
// orderTime: "",
// serveAddress: "",
// userRemark: "",
// payType: "",
// financeStatus: "",
// },
// {
// id: 4,
// orderNum: "3214421412",
// createTime: "",
// orderCategoryName: "宠物殡葬",
// orderTerminal: 0,
// userId: 0,
// userName: "",
// subTime: 1760585499000, // 预约时间
// userNickName: "",
// userAvatar: "",
// userMobile: "",
// orderStatus: 40,
// picUrl: "",
// spuName: "",
// skuName: "",
// count: 0,
// price: 0,
// handedPrice: 0,
// payPrice: 0,
// unit: "",
// orderTime: "",
// serveAddress: "",
// userRemark: "",
// payType: "",
// financeStatus: "",
// },
// {
// id: 5,
// orderNum: "3214421412",
// createTime: "",
// orderCategoryName: "宠物殡葬",
// orderTerminal: 0,
// userId: 0,
// userName: "",
// subTime: 1760585499000, // 预约时间
// userNickName: "",
// userAvatar: "",
// userMobile: "",
// orderStatus: 50,
// picUrl: "",
// spuName: "",
// skuName: "",
// count: 0,
// price: 0,
// handedPrice: 0,
// payPrice: 0,
// unit: "",
// orderTime: "",
// serveAddress: "",
// userRemark: "",
// payType: "",
// financeStatus: "",
// },
// {
// id: 6,
// orderNum: "3214421412",
// createTime: "",
// orderCategoryName: "宠物殡葬",
// orderTerminal: 0,
// userId: 0,
// userName: "",
// subTime: 1760585499000, // 预约时间
// userNickName: "",
// userAvatar: "",
// userMobile: "",
// orderStatus: 60,
// picUrl: "",
// spuName: "",
// skuName: "",
// count: 0,
// price: 0,
// handedPrice: 0,
// payPrice: 0,
// unit: "",
// orderTime: "",
// serveAddress: "",
// userRemark: "",
// payType: "",
// financeStatus: "",
// },
// {
// id: 7,
// orderNum: "3214421412",
// createTime: "",
// orderCategoryName: "宠物殡葬",
// orderTerminal: 0,
// userId: 0,
// userName: "",
// subTime: 1760585499000, // 预约时间
// userNickName: "",
// userAvatar: "",
// userMobile: "",
// orderStatus: 70,
// picUrl: "",
// spuName: "",
// skuName: "",
// count: 0,
// price: 0,
// handedPrice: 0,
// payPrice: 0,
// unit: "",
// orderTime: "",
// serveAddress: "",
// userRemark: "",
// payType: "",
// financeStatus: "",
// },
],
total: 0,
},
code: 0,
});
};
const getOrderDetail = (_req: Request, res: Response) => {
res.json({
data: {
id: 1,
orderNum: "123333333333",
orderType: 1,
orderTerminal: 1,
orderStatus: 10,
userId: 1,
userName: "李老师",
userNickName: null,
userAvatar: null,
userMobile: "17609087876",
userRemark: "测试用户备注",
createTime: "2025-10-16 11:31:39",
finishTime: "2025-10-16 11:28:55",
orderCategoryId: 1,
orderCategoryName: "222",
cancelReason: "非常",
merchantRemark: "测试商家备注",
refundTime: null,
propertyTime: null,
propertyStatus: null,
price: null,
payPrice: null,
discountPrice: null,
refundPrice: null,
livePrice: null,
payType: 1,
payChannelCode: 1,
financeStatus: null,
payOrderId: "12323123123",
payTime: "2025-10-16 11:29:51",
cancelTime: "2025-10-16 11:28:57",
statusList: [
{
id: 1,
orderId: 1,
beforeStatus: 10,
afterStatus: 20,
operateType: 1,
content: "1",
createTime: 1760952084000,
},
{
id: 2,
orderId: 1,
beforeStatus: 20,
afterStatus: 30,
operateType: 1,
content: "测试内容",
createTime: null,
},
],
items: [
{
id: 1,
shopName: "22",
shopLogo: null,
spuId: 1,
skuId: 1,
picUrl:
"https://inews.gtimg.com/news_bt/OBkbmPLeWLy4IM4oUDGvOIqSDSZ9lYOtW3qSXCYh78KXcAA/1000",
spuName: "测试商品名称",
skuName: "规格名称",
orderCategoryId: 1,
orderCategoryName: "222",
count: 1,
price: 1,
unit: "件",
totalPrice: 0,
discountPrice: 1,
payPrice: 1,
refundPrice: null,
refundCount: null,
handedPrice: 0,
expensePrice: 1,
properties: null,
serveContent: null,
},
],
tradeServeInfo: {
changeRule: "bbbb",
userRemark: "bbbb",
subOrder: "bbbb",
pickUpAddress: "bbbb",
subType: "bbbb",
merchantRemark: "bbbb",
sendAddress: "bbbb",
petName: "aaa",
boneUrl: "aaa",
petType: "aaa",
diedTime: "aaa",
weight: "aaa",
diedReason: "aaa",
},
tradeExtendServeInfo: [
{
refundCount: "ccc",
totalPrice: "ccc",
payPrice: "ccc",
discountPrice: "ccc",
refundMoney: "ccc",
serve: {
serveName: "ccc",
serveUrl: "ccc",
price: "ccc",
serveDesc: "ccc",
handPrice: "ccc",
count: "ccc",
},
tempType: 1,
},
{
refundCount: "ccc",
totalPrice: "ccc",
payPrice: "ccc",
discountPrice: "ccc",
refundMoney: "ccc",
serve: [
{
serveName: "ccc",
serveUrl: "ccc",
price: "ccc",
serveDesc: "ccc",
handPrice: "ccc",
count: "ccc",
riteAddress: "ccc",
parentActive: "ccc",
},
],
tempType: 2,
},
{
refundCount: "ccc",
deliveryInfo: {
address: "收货地址",
userMobile: "手机号码",
deliveryType: "配送方式",
user: "收货人/提货人",
},
serveTitle: "骨灰处理",
totalPrice: "ccc",
payPrice: "ccc",
serveType: "处理方式",
discountPrice: "ccc",
refundMoney: "ccc",
serve: [
{
serveName: "ccc",
serveUrl: "ccc",
price: "ccc",
serveDesc: "ccc",
handPrice: "ccc",
count: "ccc",
},
{
serveName: "ccc",
serveUrl: "ccc",
price: "ccc",
serveDesc: "ccc",
handPrice: "ccc",
count: "ccc",
},
],
tempType: 3,
},
{
refundCount: "ccc",
deliveryInfo: {
address: "收货地址",
userMobile: "手机号码",
deliveryType: "配送方式",
user: "收货人/提货人",
},
totalPrice: "ccc",
payPrice: "ccc",
discountPrice: "ccc",
refundMoney: "ccc",
serve: {
parentActivity: "ccc",
prodUrl: "ccc",
price: "ccc",
handPrice: "ccc",
count: "ccc",
prodName: "ccc",
prodType: "ccc",
prodDesc: "ccc",
},
tempType: 4,
},
],
tradeExtendCostInfo: [
{
costDetail: {
costName: "超区域服务费",
targetArea: "目标区域",
chargeType: "收费方式",
serveArea: "可服务区域",
},
serveExtFee: "",
refundPrice: "11",
payInfo: {
totalPrice: "11",
payPrice: "333",
discountPrice: "222",
},
},
{
costDetail: {
respMode: "响应模式",
respTime: "响应时间",
chargeType: "收费方式",
},
serveExtFee: "",
refundPrice: "11",
payInfo: {
totalPrice: "11",
payPrice: "333",
discountPrice: "222",
},
},
{
costDetail: {
costName: "超区域服务费",
chargeType: "收费方式",
weight: "体型/体重",
},
serveExtFee: "",
refundPrice: "11",
payInfo: {
totalPrice: "11",
payPrice: "333",
discountPrice: "222",
},
},
{
costDetail: {
costName: "超区域服务费",
chargeTime: "收费时段",
chargeType: "收费方式",
},
serveExtFee: "",
refundPrice: "11",
payInfo: {
totalPrice: "11",
payPrice: "333",
discountPrice: "222",
},
},
],
},
code: 0,
});
};
export default {
"GET /admin-api/trade/order/page": getOrderPage,
"GET /admin-api/trade/order/get-detail": getOrderDetail,
};