Commit c8a13464 by Sixong.Zhu

u

parent a006a8be
Showing with 31 additions and 3 deletions
......@@ -148,3 +148,10 @@ export interface PaymentDetail {
id: number;
v: number;
}
export interface UploadImageItem {
url: string;
fileName: string;
time: string;
fileSize: number;
}
......@@ -7,7 +7,8 @@ import {
orderTableListItemPredict,
SrcPlatform,
OrderPayItem,
PaymentDetail
PaymentDetail,
UploadImageItem
} from "../model";
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()
.model(orderService.generalOrderPaymentModel)
.action("addImages")
.updateInitialParams({ selected_list: [{ v, id: id as number }] })
.updateInitialParams({ selected_list: [{ v, id: payment as number }] })
.addInputs_parameter({ images: path })
.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();
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