订单历史添加商户订单号

This commit is contained in:
sunxiaolong
2024-01-07 21:05:14 +08:00
parent ec50c1b30e
commit 4b61fd3477
4 changed files with 26 additions and 15 deletions

View File

@@ -1,12 +1,3 @@
/***************************************************
** @Desc : This file for ...
** @Time : 2019/10/19 14:56
** @Author : yuebin
** @File : account_history_info
** @Last Modified by : yuebin
** @Last Modified time: 2019/10/19 14:56
** @Software: GoLand
****************************************************/
package account
import (
@@ -19,6 +10,7 @@ type AccountHistoryInfo struct {
AccountUid string
AccountName string
Type string
OrderId string
Amount float64
Balance float64
UpdateTime string

View File

@@ -153,23 +153,31 @@ let pay = {
let con = "";
$.each(list, function (index, item) {
let st;
let operation;
switch (item.OperateType) {
case"plus_amount":
st = "加款";
operation = "+";
break;
case"sub_amount":
st = "减款";
operation = "-";
break;
case"freeze_amount":
st = "冻结";
operation = "-";
break;
case"unfreeze_amount":
operation = "+";
st = "解冻";
break;
default:
st = ""
}
con += `<tr><th scope="row">` + (index + 1) + `</th><td>` + item.CreateTime + `</td><td>` + item.Amount.toFixed(2) + `</td><td>` + item.Fee.toFixed(2) + `</td><td>` + item.FreezeAmount.toFixed(2) + `</td><td>` + item.Recharge.toFixed(2) + `</td><td>` + st + `</td></tr>`
con += `<tr><th scope="row">` + (index + 1) + `</th><td>` + item.CreateTime +
`</td><td>${operation}${item.Amount.toFixed(2)}</td><td>` +
item.Fee.toFixed(2) + `</td><td>` + item.FreezeAmount.toFixed(2) +
`</td><td>` + item.Recharge.toFixed(2) + `</td><td>` + st + `</td></tr>`
});
if (con === "") {
con += `<tr><td colspan="9">没有检索到数据</td></tr>`
@@ -225,23 +233,34 @@ let pay = {
let con = "";
$.each(list, function (index, item) {
let st = "";
let operation = ""
let color = ""
switch (item.Type) {
case"plus_amount":
st = "加款";
operation = "+";
color = "blue";
break;
case"sub_amount":
st = "减款";
operation = "-";
color = "red";
break;
case"freeze_amount":
st = "冻结";
operation = "-";
color = "gray";
break;
case"unfreeze_amount":
st = "解冻";
color = "black";
operation = "+";
break
}
con += `<tr><th scope="row">` + (index + 1) + `</th>
<td>` + item.CreateTime + `</td>
<td>` + item.Amount.toFixed(2) + `</td>
con += `<tr style="color: ${color}"><th scope="row">` + (index + 1) + `</th>
<td>${item.CreateTime}</td>
<td>${item.OrderId}</td>
<td>${operation}${item.Amount.toFixed(2)}</td>
<td>` + item.Balance.toFixed(2) + `</td>
<td>` + st + `</td></tr>`
});

View File

@@ -127,7 +127,7 @@ var historyStatus = map[string]string{
UNFREEZE_AMOUNT: "解冻",
}
// 历史记录状态
// GetHistoryStatus 历史记录状态
func GetHistoryStatus() map[string]string {
return historyStatus
}

View File

@@ -99,13 +99,13 @@
<tr>
<th>#</th>
<th>操作时间</th>
<th>订单号</th>
<th>变动金额</th>
<th>账户余额</th>
<th>操作类型</th>
</tr>
</thead>
<tbody id="your_show_time">
</tbody>
</table>
</div>