Commit c8d4a66c by Sixong.Zhu

ad

parent 515362e6
Showing with 29 additions and 13 deletions
......@@ -54,12 +54,12 @@ export interface OrderTableListItem {
export const orderPredict = {
id: "ID",
v: 'uniplat_version',
no: 'OrderDocNo',
v: "uniplat_version",
no: "OrderDocNo",
title: "ProductId#product.OuterName",
status: "Status",
time: "CreatedDate",
createTime: 'CreatedDate',
createTime: "CreatedDate",
PayAmount: "PayAmount",
PaidAmount: "PaidAmount",
RefundAmount: "RefundAmount",
......@@ -107,6 +107,9 @@ export interface OrderPayItem {
value: number;
status: PayStatus;
method: PayMethod;
createdTime: string;
v: number;
actions?: any[];
}
export const enum ChatOpenDirection {
......
......@@ -72,7 +72,12 @@ class OrderService {
);
}
public getPayments(id: number) {
/**
* 获取订单支付记录
* @param id 订单id
* @param withActions 是否获取行数据中action条目
*/
public getPayments(id: number, withActions = false) {
return this.getSdk()
.model(orderService.generalOrderPaymentModel)
.list()
......@@ -80,7 +85,7 @@ class OrderService {
.query({ pageIndex: 1, item_size: 100 })
.then((r) => {
if (r && r.pageData && r.pageData.rows) {
return this.handler.buildRows<OrderPayItem>(
const items = this.handler.buildRows<OrderPayItem>(
r.pageData.rows,
{
status: "Status",
......@@ -90,8 +95,18 @@ class OrderService {
deadLine: "PaymentDueDate",
value: "Amount",
method: "PaymentFunction",
createdTime: "CreatedDate",
v: "uniplat_version",
}
);
if (withActions) {
for (let i = 0; i < r.pageData.rows.length; i++) {
items[i].actions = r.pageData.rows[i].actions;
}
}
return items;
}
return [];
});
......@@ -121,7 +136,9 @@ class OrderService {
return this.getSdk()
.model(orderService.generalOrderPaymentModel)
.action("addImages")
.updateInitialParams({ selected_list: [{ v, id: payment as number }] })
.updateInitialParams({
selected_list: [{ v, id: payment as number }],
})
.addInputs_parameter({ images: path })
.execute();
}
......@@ -132,17 +149,13 @@ class OrderService {
.list()
.addPrefilter({ PaymentId: payment })
.query({ item_size: 10, pageIndex: 1 })
.then(
(r) =>
this.handler.buildRows<UploadImageItem>(
r.pageData.rows,
{
.then((r) =>
this.handler.buildRows<UploadImageItem>(r.pageData.rows, {
time: "CreatedDate",
fileSize: "FileSize",
fileName: "FileName",
url: "Url",
}
)
})
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment