Commit 8d620d11 by Sixong.Zhu

Merge branch 'master' into pre

parents d1c3f11e 0822f25b
......@@ -7,6 +7,7 @@
'justify-content-center': isWithdrawMessage,
'offset-bottom': matchKeywords,
}"
@mouseenter="hoverWithdraw"
>
<div class="msg-content" :class="{ 'algin-left': !isMyMessage }">
<div
......@@ -101,7 +102,6 @@
!isQuestionAnswerMessage &&
isChatMember
"
@mouseenter="hoverWithdraw"
@click="withdraw"
>撤回此消息</span
>
......@@ -171,6 +171,7 @@
import Xim from "@/customer-service/xim";
const twoMinutes = 2 * 60 * 1000;
const twoHours = 2 * 60 * 60 * 1000;
const messageMapping = new Map<dto.MessageType, string>([
[dto.MessageType.Image, "image-message"],
......@@ -266,7 +267,10 @@
private get canWithdraw() {
if (this.backend && this.data) {
return new Date().valueOf() - this.data.ts * 1000 < twoMinutes;
if (this.needReadTip) {
return new Date().valueOf() - this.data.ts * 1000 < twoMinutes;
}
return new Date().valueOf() - this.data.ts * 1000 < twoHours;
}
return false;
}
......@@ -276,7 +280,8 @@
this.data.type !== dto.MessageType.Pay &&
this.data.type !== dto.MessageType.Refund &&
this.data.type !== dto.MessageType.PayV1 &&
this.data.type !== dto.MessageType.RefundV1
this.data.type !== dto.MessageType.RefundV1 &&
this.data.type !== dto.MessageType.PayResult
);
}
......@@ -496,8 +501,12 @@
}
private hoverWithdraw() {
this.isWithdraw =
new Date().valueOf() - this.data.ts * 1000 < twoMinutes;
if (!this.isWithdraw || !this.isMyMessage) {
return;
}
this.isWithdraw = this.needReadTip
? new Date().valueOf() - this.data.ts * 1000 < twoMinutes
: new Date().valueOf() - this.data.ts * 1000 < twoHours;
}
private openReaderList(e: MouseEvent) {
......
......@@ -135,6 +135,7 @@ export interface OrderPayItem {
OpenningBankName?: string;
bankAccountNo?: string;
paymentItemId?: number;
paymentDate: string;
}
export interface OrderComment {
......@@ -153,7 +154,7 @@ export const orderPayItemPredict = {
method: "PaymentFunction_label",
type: "ItemName",
desc: "PaymentDesc",
agent: "ProviderCollectId#provider_agent.AgentTrueName",
agent: "ProviderCollectId#provider_all_agent.AgentTrueName",
id: "ID",
v: "uniplat_version",
title: "ItemName",
......@@ -163,6 +164,7 @@ export const orderPayItemPredict = {
OpenningBankName: "ProviderHandleId#ServiceProviderBank.OpenningBankName",
bankAccountNo: "ProviderHandleId#ServiceProviderBank.AccountNo",
paymentItemId: "PaymentItemId",
paymentDate: "PaymentDate",
};
export const enum ChatOpenDirection {
......@@ -190,6 +192,8 @@ export const enum OperationType {
}
export interface UploadImageItem {
id: number;
v: number;
url: string;
fileName: string;
time: string;
......
......@@ -17,6 +17,7 @@ class OrderService {
public readonly generalOrder = "general_order_info";
public readonly generalOrderPaymentModel = "general_order_payment_info";
private readonly commentModel = "uniplat_model_remark@general_order";
private readonly fileModel = "general_order_payment_file_info";
private readonly handler = new UniplatSdkExtender();
private innerSdk: UniplatSdk | null = null;
......@@ -171,7 +172,7 @@ class OrderService {
public getImages4Payment(payment: number) {
return this.getSdk()
.model("general_order_payment_file_info")
.model(this.fileModel)
.list()
.addPrefilter({ PaymentId: payment })
.query({ item_size: 10, pageIndex: 1 })
......@@ -181,10 +182,23 @@ class OrderService {
fileSize: "FileSize",
fileName: "FileName",
url: "Url",
id: "ID",
v: "uniplat_version",
})
);
}
public deleteImage(payment: number, image: number, v: number) {
return this.getSdk()
.model(this.fileModel)
.action("delete")
.updateInitialParams({
selected_list: [{ v, id: image }],
prefilters: [{ property: "PaymentId", value: payment }],
})
.execute();
}
public buildOrder(o: metaRow) {
return this.handler.buildRow<OrderTableListItem>(o, orderPredict);
}
......
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