Commit c8a13464 by Sixong.Zhu

u

parent a006a8be
Showing with 31 additions and 3 deletions
...@@ -148,3 +148,10 @@ export interface PaymentDetail { ...@@ -148,3 +148,10 @@ export interface PaymentDetail {
id: number; id: number;
v: number; v: number;
} }
export interface UploadImageItem {
url: string;
fileName: string;
time: string;
fileSize: number;
}
...@@ -7,7 +7,8 @@ import { ...@@ -7,7 +7,8 @@ import {
orderTableListItemPredict, orderTableListItemPredict,
SrcPlatform, SrcPlatform,
OrderPayItem, OrderPayItem,
PaymentDetail PaymentDetail,
UploadImageItem
} from "../model"; } from "../model";
class OrderService { class OrderService {
...@@ -107,14 +108,34 @@ class OrderService { ...@@ -107,14 +108,34 @@ class OrderService {
); );
} }
public addImage4Payment(id: number | string, v: number, path: string) { public addImage4Payment(payment: number | string, v: number, path: string) {
return Chat.getSdk() return Chat.getSdk()
.model(orderService.generalOrderPaymentModel) .model(orderService.generalOrderPaymentModel)
.action("addImages") .action("addImages")
.updateInitialParams({ selected_list: [{ v, id: id as number }] }) .updateInitialParams({ selected_list: [{ v, id: payment as number }] })
.addInputs_parameter({ images: path }) .addInputs_parameter({ images: path })
.execute(); .execute();
} }
public getImages4Payment(payment: number) {
return Chat.getSdk()
.model("general_order_payment_file_info")
.list()
.addPrefilter({ PaymentId: payment })
.query({ item_size: 10, pageIndex: 1 })
.then(
(r) =>
this.handler.buildRows<UploadImageItem>(
r.pageData.rows,
{
time: "CreatedDate",
fileSize: "FileSize",
fileName: "FileName",
url: "Url",
}
)
);
}
} }
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