Commit da6ef098 by Sixong.Zhu

u

parent 8620aa88
Showing with 29 additions and 3 deletions
...@@ -6,12 +6,14 @@ import { ...@@ -6,12 +6,14 @@ import {
OrderTableListItem, OrderTableListItem,
orderTableListItemPredict, orderTableListItemPredict,
SrcPlatform, SrcPlatform,
OrderPayItem
} from "../model"; } from "../model";
class OrderService { class OrderService {
public generalOrder = "general_order_info"; public readonly generalOrder = "general_order_info";
public generalOrderPaymentModel = "general_order_payment_info"; public readonly generalOrderPaymentModel = "general_order_payment_info";
private handler = new UniplatSdkExtender(); private readonly handler = new UniplatSdkExtender();
public openOrder(params: { public openOrder(params: {
productId: number; productId: number;
...@@ -58,6 +60,30 @@ class OrderService { ...@@ -58,6 +60,30 @@ class OrderService {
) )
); );
} }
public getPayments(id: number) {
return Chat.getSdk()
.model(orderService.generalOrderPaymentModel)
.list()
.addPrefilter({ OrderId: id })
.query({ pageIndex: 1, item_size: 100 })
.then((r) => {
if (r && r.pageData && r.pageData.rows) {
return this.handler.buildRows<OrderPayItem>(
r.pageData.rows,
{
status: "Status",
id: "ID",
title: "ItemName",
time: "PaymentDate",
deadLine: "PaymentDueDate",
value: "Amount",
}
);
}
return [];
});
}
} }
export const orderService = new OrderService(); export const orderService = new OrderService();
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