新增开票发送接口和估值审核模拟数据
This commit is contained in:
parent
bf88fb502b
commit
106472944b
@ -371,8 +371,185 @@ export default {
|
||||
updateInvoiceStatus: (data = {}) => request.post('/invoice/update-status', data),
|
||||
remindInvoice: (data = {}) => request.post('/invoice/remind', data),
|
||||
refundInvoice: (data = {}) => request.post('/invoice/refund', data),
|
||||
sendInvoice: (data = {}) => request.post('/invoice/send', data),
|
||||
// valuation (估值评估)
|
||||
getValuationList: (params = {}) => request.get('/valuation', { params }),
|
||||
getValuationList: (params = {}) => {
|
||||
// Mock 数据
|
||||
const mockValuations = [
|
||||
{
|
||||
id: 2001,
|
||||
phone: '13800138001',
|
||||
wechat: 'zhangsan_wx',
|
||||
valuation_result: 1250000.00,
|
||||
created_at: '2024-11-10T09:30:00Z',
|
||||
reviewed_at: null,
|
||||
status: 'pending',
|
||||
admin_notes: null
|
||||
},
|
||||
{
|
||||
id: 2002,
|
||||
phone: '13800138002',
|
||||
wechat: 'lisi2024',
|
||||
valuation_result: 880000.00,
|
||||
created_at: '2024-11-09T14:20:00Z',
|
||||
reviewed_at: '2024-11-09T16:45:00Z',
|
||||
status: 'approved',
|
||||
admin_notes: '评估结果合理,已通过审核'
|
||||
},
|
||||
{
|
||||
id: 2003,
|
||||
phone: '13800138003',
|
||||
wechat: 'wangwu_user',
|
||||
valuation_result: 2100000.00,
|
||||
created_at: '2024-11-08T16:45:00Z',
|
||||
reviewed_at: '2024-11-08T18:30:00Z',
|
||||
status: 'approved',
|
||||
admin_notes: '评估价格偏高,但审核通过'
|
||||
},
|
||||
{
|
||||
id: 2004,
|
||||
phone: '13800138004',
|
||||
wechat: 'zhaoliu_vip',
|
||||
valuation_result: 560000.00,
|
||||
created_at: '2024-11-07T11:15:00Z',
|
||||
reviewed_at: null,
|
||||
status: 'pending',
|
||||
admin_notes: null
|
||||
},
|
||||
{
|
||||
id: 2005,
|
||||
phone: '13800138005',
|
||||
wechat: 'sunqi888',
|
||||
valuation_result: 1680000.00,
|
||||
created_at: '2024-11-06T08:30:00Z',
|
||||
reviewed_at: '2024-11-06T10:15:00Z',
|
||||
status: 'approved',
|
||||
admin_notes: '评估数据完整,审核通过'
|
||||
},
|
||||
{
|
||||
id: 2006,
|
||||
phone: '13800138006',
|
||||
wechat: 'zhouba2024',
|
||||
valuation_result: 950000.00,
|
||||
created_at: '2024-11-05T13:20:00Z',
|
||||
reviewed_at: null,
|
||||
status: 'pending',
|
||||
admin_notes: null
|
||||
},
|
||||
{
|
||||
id: 2007,
|
||||
phone: '13800138007',
|
||||
wechat: 'wujiu_user',
|
||||
valuation_result: 3200000.00,
|
||||
created_at: '2024-11-04T15:45:00Z',
|
||||
reviewed_at: '2024-11-04T17:20:00Z',
|
||||
status: 'approved',
|
||||
admin_notes: '高价值资产,评估结果准确'
|
||||
},
|
||||
{
|
||||
id: 2008,
|
||||
phone: '13800138008',
|
||||
wechat: 'zhengshi_vip',
|
||||
valuation_result: 750000.00,
|
||||
created_at: '2024-11-03T10:10:00Z',
|
||||
reviewed_at: '2024-11-03T12:00:00Z',
|
||||
status: 'approved',
|
||||
admin_notes: '评估流程规范,结果可信'
|
||||
},
|
||||
{
|
||||
id: 2009,
|
||||
phone: '13800138009',
|
||||
wechat: 'chenjun2024',
|
||||
valuation_result: 1890000.00,
|
||||
created_at: '2024-11-02T14:30:00Z',
|
||||
reviewed_at: null,
|
||||
status: 'pending',
|
||||
admin_notes: null
|
||||
},
|
||||
{
|
||||
id: 2010,
|
||||
phone: '13800138010',
|
||||
wechat: 'liuxia_user',
|
||||
valuation_result: 430000.00,
|
||||
created_at: '2024-11-01T11:45:00Z',
|
||||
reviewed_at: '2024-11-01T13:30:00Z',
|
||||
status: 'approved',
|
||||
admin_notes: '低价值资产,评估合理'
|
||||
},
|
||||
{
|
||||
id: 2011,
|
||||
phone: '13800138011',
|
||||
wechat: 'zhaolei2024',
|
||||
valuation_result: 2100000.00,
|
||||
created_at: '2024-10-31T09:20:00Z',
|
||||
reviewed_at: '2024-10-31T11:00:00Z',
|
||||
status: 'approved',
|
||||
admin_notes: '评估报告详细,数据支撑充分'
|
||||
},
|
||||
{
|
||||
id: 2012,
|
||||
phone: '13800138012',
|
||||
wechat: 'sunmei_vip',
|
||||
valuation_result: 680000.00,
|
||||
created_at: '2024-10-30T16:15:00Z',
|
||||
reviewed_at: null,
|
||||
status: 'pending',
|
||||
admin_notes: null
|
||||
}
|
||||
]
|
||||
|
||||
// 模拟分页和搜索
|
||||
let filteredValuations = [...mockValuations]
|
||||
|
||||
// 手机号搜索
|
||||
if (params.phone) {
|
||||
filteredValuations = filteredValuations.filter(valuation =>
|
||||
valuation.phone.includes(params.phone)
|
||||
)
|
||||
}
|
||||
|
||||
// 微信号搜索
|
||||
if (params.wechat) {
|
||||
filteredValuations = filteredValuations.filter(valuation =>
|
||||
valuation.wechat && valuation.wechat.includes(params.wechat)
|
||||
)
|
||||
}
|
||||
|
||||
// 状态筛选
|
||||
if (params.status) {
|
||||
filteredValuations = filteredValuations.filter(valuation =>
|
||||
valuation.status === params.status
|
||||
)
|
||||
}
|
||||
|
||||
// 提交时间筛选
|
||||
if (params.created_at && Array.isArray(params.created_at) && params.created_at.length === 2) {
|
||||
const [startDate, endDate] = params.created_at
|
||||
filteredValuations = filteredValuations.filter(valuation => {
|
||||
const valuationDate = new Date(valuation.created_at)
|
||||
return valuationDate >= new Date(startDate) && valuationDate <= new Date(endDate)
|
||||
})
|
||||
}
|
||||
|
||||
// 分页处理
|
||||
const page = params.page || 1
|
||||
const pageSize = params.page_size || 10
|
||||
const startIndex = (page - 1) * pageSize
|
||||
const endIndex = startIndex + pageSize
|
||||
const paginatedValuations = filteredValuations.slice(startIndex, endIndex)
|
||||
|
||||
// 返回 Promise 模拟异步请求
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: paginatedValuations,
|
||||
total: filteredValuations.length,
|
||||
page: page,
|
||||
page_size: pageSize
|
||||
})
|
||||
}, 300) // 模拟网络延迟
|
||||
})
|
||||
},
|
||||
getValuationById: (params = {}) => request.get(`/valuation/${params.valuation_id}`),
|
||||
createValuation: (data = {}) => request.post('/valuation', data),
|
||||
updateValuation: (data = {}) => request.put(`/valuation/${data.id}`, data),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user