Commit 6bdbdede by 杨铁龙

优化接口

parent 2c7c0c2b
Showing with 33 additions and 1 deletions
import type { UniplatSdk } from "uniplat-sdk";
export * from "./order";
export * from "./order-product"
export const enum ChatRole {
Default = 25,
......
......@@ -64,14 +64,40 @@ class OrderService {
.execute();
}
/** 专项工单 */
public getOrders(params: {
productCode?: GeneralOrderDirection;
index: number;
size?: number;
}, isHrs = false) {
const list = this.getSdk()
.model(this.generalOrder)
.list(isHrs ? "hroOrgOrderList" : "userOrderList");
if (params.productCode) {
list.addPrefilter({ 'ProductId#product.Code': params.productCode });
}
return list
.query({ item_size: params.size || 100, pageIndex: params.index })
.then((r) => {
return {
total: r.pageData.record_count,
list: this.handler.buildRows<OrderTableListItem>(
r.pageData.rows,
orderPredict
),
};
});
}
public getProcessOrders(params: {
productCode?: GeneralOrderDirection;
index: number;
size?: number;
}) {
const list = this.getSdk()
.model(this.generalOrder)
.list("userOrderList");
.list("hroOrgDoingOrderList");
if (params.productCode) {
list.addPrefilter({ 'ProductId#product.Code': params.productCode });
}
......@@ -184,6 +210,11 @@ class OrderService {
return this.getSdk().domainService("hro_spview", "OrderSetting", "sendPayAccountInfo")
.request("get", { params })
}
public sendPayAccountInfoForAgent(params: { send: string; userOrderPaymentId: number }) {
return this.getSdk().domainService("hro_spview", "OrderSetting", "sendPayAccountInfoForAgent")
.request("get", { params })
}
}
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