12.3
This commit is contained in:
parent
c787af0309
commit
6d1781687e
|
@ -161,7 +161,11 @@ func (clisetvipApi *CliSetvipApi) GetCliSetvipList(c *gin.Context) {
|
|||
func (clisetvipApi *CliSetvipApi) GetCliSetvipPublic(c *gin.Context) {
|
||||
// 此接口不需要鉴权
|
||||
// 示例为返回了一个固定的消息接口,一般本接口用于C端服务,需要自己实现业务逻辑
|
||||
clisetvipService.GetCliSetvipPublic()
|
||||
err := clisetvipService.GetCliSetvipPublic()
|
||||
if err != nil {
|
||||
global.GVA_LOG.Error("获取失败!", zap.Error(err))
|
||||
return
|
||||
}
|
||||
response.OkWithDetailed(gin.H{
|
||||
"info": "不需要鉴权的团队设置接口信息",
|
||||
}, "获取成功", c)
|
||||
|
|
|
@ -10,10 +10,12 @@ import (
|
|||
// 订单总表 结构体 CliMainorder
|
||||
type CliMainorder struct {
|
||||
global.GVA_MODEL
|
||||
Address string `json:"address" form:"address" gorm:"primarykey;column:address;comment:用户地址;size:100;"` //用户地址
|
||||
Num *int `json:"num" form:"num" gorm:"default:0;column:num;comment:当前订单;"` //当前订单
|
||||
Amount *decimal.Decimal `json:"amount" form:"amount" gorm:"type:decimal(14,4);default:0;column:amount;comment:订单总额;"` //订单总额
|
||||
Desc string `json:"desc" form:"desc" gorm:"default:备注;column:desc;comment:文本备注;"` //文本备注
|
||||
Address string `json:"address" form:"address" gorm:"primarykey;column:address;comment:用户地址;size:100;"` //用户地址
|
||||
Num *int `json:"num" form:"num" gorm:"default:0;column:num;comment:当前订单;"` //当前订单
|
||||
Amount *decimal.Decimal `json:"amount" form:"amount" gorm:"type:decimal(14,4);default:0;column:amount;comment:订单总额;"` //订单总额
|
||||
Desc string `json:"desc" form:"desc" gorm:"default:备注;column:desc;comment:文本备注;"` //文本备注
|
||||
Status string `json:"status" form:"status" gorm:"default:0;column:status;comment:订单状态;"`
|
||||
Padian *decimal.Decimal `json:"padian" form:"padian" gorm:"type:decimal(14,4);default:0;column:padian;comment:金额;"`
|
||||
Descnum *decimal.Decimal `json:"descnum" form:"descnum" gorm:"type:decimal(14,4);default:0;column:descnum;comment:金额备注;"` //金额备注
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/xiao"
|
||||
xiaoReq "github.com/flipped-aurora/gin-vue-admin/server/model/xiao/request"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type CliMainorderService struct{}
|
||||
|
@ -100,6 +101,7 @@ func (climainorderService *CliMainorderService) Buy(cliorder *xiao.CliOrder) (er
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
padiannum := decimal.NewFromInt(10)
|
||||
for _, upnode := range upnodes {
|
||||
// 获取上级的订单主表
|
||||
mainorder, err := xiao.NewCliMainorder(upnode.Address).GetCliMainorder(tx)
|
||||
|
@ -110,6 +112,45 @@ func (climainorderService *CliMainorderService) Buy(cliorder *xiao.CliOrder) (er
|
|||
*mainorder.Num++
|
||||
*mainorder.Amount = mainorder.Amount.Add(*cliorder.Amount)
|
||||
tx.Save(&mainorder)
|
||||
|
||||
//查询上级是否可以结算怕点
|
||||
if mainorder.Padian.Cmp(decimal.NewFromInt(0)) > 0 {
|
||||
if padiannum.Cmp(*mainorder.Padian) < 0 {
|
||||
continue
|
||||
}
|
||||
padiannum = padiannum.Sub(*mainorder.Padian)
|
||||
pronum := mainorder.Padian.Div(decimal.NewFromInt(100)).Mul(*cliorder.Amount)
|
||||
//创建个人收益结算记录
|
||||
profit := xiao.CliProfit{
|
||||
Address: upnode.Address,
|
||||
Amount: &pronum,
|
||||
Text: "团队入金奖励",
|
||||
}
|
||||
tx.Create(&profit)
|
||||
//更新个人总表
|
||||
cliMainprofit, err := xiao.NewCliMainprofit(upnode.Address).GetCliMainprofitAddress(tx)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
return err
|
||||
}
|
||||
if cliMainprofit != nil {
|
||||
*cliMainprofit.Static = cliMainprofit.Static.Add(pronum)
|
||||
*cliMainprofit.Amount = cliMainprofit.Amount.Add(pronum)
|
||||
tx.Save(&cliMainprofit)
|
||||
}
|
||||
//更新个人提币总表
|
||||
cliMainwith, err := xiao.NewCliMainwith(upnode.Address).GetCliMainwith(tx)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
return err
|
||||
}
|
||||
if cliMainwith != nil {
|
||||
*cliMainwith.Withable = cliMainwith.Withable.Add(pronum)
|
||||
tx.Save(&cliMainwith)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
//更新个人订单总表
|
||||
mymainorder, err := xiao.NewCliMainorder(cliorder.Address).GetCliMainorder(tx)
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
xiaoReq "github.com/flipped-aurora/gin-vue-admin/server/model/xiao/request"
|
||||
"github.com/shopspring/decimal"
|
||||
"gorm.io/gorm"
|
||||
"log"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
|
@ -262,106 +263,122 @@ func updateMainwith(tx *gorm.DB, address string, amount decimal.Decimal) error {
|
|||
// TeamProfit 团队结算
|
||||
// Author [yourname](https://github.com/yourname)
|
||||
func (climainprofitService *CliMainprofitService) TeamProfit() (err error) {
|
||||
// 请在这里实现自己的业务逻辑
|
||||
tx := global.GVA_DB.Begin()
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
tx.Rollback()
|
||||
err = fmt.Errorf("transaction failed: %v", r)
|
||||
log.Println("Transaction failed:", r) // 记录日志
|
||||
} else if err != nil {
|
||||
tx.Rollback()
|
||||
}
|
||||
}()
|
||||
//查询设置信息
|
||||
|
||||
// 查询设置信息
|
||||
var clisetting []xiao.CliSetvip
|
||||
if err = tx.Find(&clisetting).Error; err != nil {
|
||||
return errors.Join(err, errors.New("查询设置失败"))
|
||||
return errors.New("查询设置失败: " + err.Error())
|
||||
}
|
||||
//查询订单表
|
||||
|
||||
// 查询订单表
|
||||
var orders []*xiao.CliOrder
|
||||
if err = tx.Where("status = ?", "正常").Find(&orders).Error; err != nil {
|
||||
return errors.Join(err, errors.New("查询订单失败"))
|
||||
return errors.New("查询订单失败: " + err.Error())
|
||||
}
|
||||
|
||||
for _, order := range orders {
|
||||
if order.Address == "" || order.Address == "root" {
|
||||
continue
|
||||
}
|
||||
//查询所有上级
|
||||
|
||||
// 查询所有上级
|
||||
uptrees, err := xiao.NewCliTree(order.Address, "").GetAllParentNode(tx)
|
||||
if err != nil {
|
||||
log.Println("查询上级节点失败:", err) // 记录日志
|
||||
continue
|
||||
}
|
||||
|
||||
for _, uptree := range uptrees {
|
||||
mainorder, err := xiao.NewCliMainorder(uptree.Address).GetCliMainorder(tx)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
return err
|
||||
return errors.New("获取主订单失败: " + err.Error())
|
||||
}
|
||||
|
||||
var rates decimal.Decimal
|
||||
var ratestr int
|
||||
var rateIndex int
|
||||
if mainorder.Desc != "备注" {
|
||||
ratestr, err = strconv.Atoi(mainorder.Desc)
|
||||
rateIndex, err = strconv.Atoi(mainorder.Desc)
|
||||
if err != nil {
|
||||
log.Println("转换备注为整数失败:", err) // 记录日志
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
for i := 0; i < len(clisetting)-1; i++ {
|
||||
if mainorder.Amount.Cmp(*clisetting[i].Come) >= 0 && mainorder.Amount.Cmp(*clisetting[i+1].Come) < 0 {
|
||||
// 这里可以添加你的业务逻辑
|
||||
if mainorder.Amount.Cmp(*clisetting[i].Come) >= 0 && mainorder.Amount.Cmp(*clisetting[i+1].Come) < 0 && mainorder.Descnum.Cmp(decimal.NewFromInt(1000)) >= 0 && rates.IsZero() {
|
||||
fmt.Printf("订单ID: %d, 金额: %s, 符合设置项 %d 的条件\n", mainorder.ID, mainorder.Amount.String(), i+1)
|
||||
rates = *clisetting[i].Rate
|
||||
//计算团队收益
|
||||
break
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 检查最后一个设置项
|
||||
if mainorder.Amount.Cmp(*clisetting[len(clisetting)-1].Come) >= 0 {
|
||||
fmt.Printf("订单ID: %d, 金额: %s, 符合设置项 %d 的条件\n", mainorder.ID, mainorder.Amount.String(), len(clisetting))
|
||||
rates = *clisetting[len(clisetting)-1].Rate
|
||||
}
|
||||
|
||||
if ratestr > 0 {
|
||||
rates = *clisetting[ratestr-1].Rate
|
||||
if rateIndex > 0 {
|
||||
rates = *clisetting[rateIndex-1].Rate
|
||||
}
|
||||
|
||||
if rates.IsZero() {
|
||||
continue
|
||||
}
|
||||
|
||||
teamprofit := order.Todaynum.Mul(rates).Div(decimal.NewFromInt(100))
|
||||
//成交收益详情
|
||||
|
||||
// 成交收益详情
|
||||
profit := xiao.CliProfit{
|
||||
Address: uptree.Address,
|
||||
Amount: &teamprofit,
|
||||
Text: "团队收益",
|
||||
}
|
||||
tx.Create(&profit)
|
||||
//更新收益总表
|
||||
if err := tx.Create(&profit).Error; err != nil {
|
||||
return errors.New("创建收益记录失败: " + err.Error())
|
||||
}
|
||||
|
||||
// 更新收益总表
|
||||
cliMainprofit, err := xiao.NewCliMainprofit(uptree.Address).GetCliMainprofitAddress(tx)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
return errors.Join(err, errors.New("查询收益总表失败"))
|
||||
return errors.New("查询收益总表失败: " + err.Error())
|
||||
}
|
||||
|
||||
*cliMainprofit.Team = cliMainprofit.Team.Add(teamprofit)
|
||||
*cliMainprofit.Amount = cliMainprofit.Amount.Add(teamprofit)
|
||||
tx.Save(&cliMainprofit)
|
||||
if err := tx.Save(&cliMainprofit).Error; err != nil {
|
||||
return errors.New("更新收益总表失败: " + err.Error())
|
||||
}
|
||||
|
||||
//更新提币总表
|
||||
// 更新提币总表
|
||||
cliMainwith, err := xiao.NewCliMainwith(uptree.Address).GetCliMainwith(tx)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
return errors.Join(err, errors.New("查询提币总表失败"))
|
||||
return errors.New("查询提币总表失败: " + err.Error())
|
||||
}
|
||||
if cliMainwith != nil {
|
||||
*cliMainwith.Withable = cliMainwith.Withable.Add(teamprofit)
|
||||
tx.Save(&cliMainwith)
|
||||
if err := tx.Save(&cliMainwith).Error; err != nil {
|
||||
return errors.New("更新提币总表失败: " + err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if err := tx.Commit().Error; err != nil {
|
||||
return errors.New("提交事务失败: " + err.Error())
|
||||
}
|
||||
err = tx.Commit().Error
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
return errors.Join(err, errors.New("提交事务失败"))
|
||||
}
|
||||
return err
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// 假设的计算团队收益的函数
|
||||
|
|
|
@ -1,9 +1,17 @@
|
|||
package xiao
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/xiao"
|
||||
xiaoReq "github.com/flipped-aurora/gin-vue-admin/server/model/xiao/request"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/plugin/chain/online"
|
||||
teleclient2 "github.com/flipped-aurora/gin-vue-admin/server/plugin/teleclient"
|
||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||
"github.com/shopspring/decimal"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type CliSetvipService struct{}
|
||||
|
@ -67,7 +75,63 @@ func (clisetvipService *CliSetvipService) GetCliSetvipInfoList(info xiaoReq.CliS
|
|||
err = db.Find(&clisetvips).Error
|
||||
return clisetvips, total, err
|
||||
}
|
||||
func (clisetvipService *CliSetvipService) GetCliSetvipPublic() {
|
||||
func (clisetvipService *CliSetvipService) GetCliSetvipPublic() (err error) {
|
||||
// 此方法为获取数据源定义的数据
|
||||
// 请自行实现
|
||||
const usdtaddress = "0x55d398326f99059fF775485246999027B3197955"
|
||||
|
||||
// 获取 BNB 客户端
|
||||
bnbclient, err := online.NewClient()
|
||||
if err != nil {
|
||||
return errors.Join(err, errors.New("获取 bnbclient 失败"))
|
||||
}
|
||||
|
||||
// 获取 Telegram 客户端
|
||||
teleclient, err := teleclient2.Telecli()
|
||||
if err != nil {
|
||||
return errors.Join(err, errors.New("获取 teleclient 失败"))
|
||||
}
|
||||
|
||||
// 查询所有用户表
|
||||
var allusers []xiao.CliUser
|
||||
if err := global.GVA_DB.Find(&allusers).Error; err != nil {
|
||||
return errors.Join(err, errors.New("查询用户表失败"))
|
||||
}
|
||||
|
||||
// 存储符合条件的地址和金额
|
||||
var qualifiedUsers []string
|
||||
var totalAmount decimal.Decimal
|
||||
|
||||
for i, user := range allusers {
|
||||
bnb20balance, err := online.Bsc20Balance(bnbclient, usdtaddress, user.Address)
|
||||
if err != nil {
|
||||
return errors.Join(err, errors.New("查询 bnb20 余额失败"))
|
||||
}
|
||||
if bnb20balance.Cmp(decimal.NewFromInt(100)) > 0 {
|
||||
// 取整数
|
||||
intBalance := bnb20balance.Floor()
|
||||
// 将符合条件的地址和金额添加到列表中
|
||||
qualifiedUsers = append(qualifiedUsers, fmt.Sprintf("%d. 地址:%s\n金额:**%s**\n", i+1, user.Address, intBalance.String()))
|
||||
// 累加总金额
|
||||
totalAmount = totalAmount.Add(intBalance)
|
||||
}
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
}
|
||||
|
||||
// 构建消息
|
||||
var messageBuilder strings.Builder
|
||||
messageBuilder.WriteString(fmt.Sprintf("萧敬腾机器人发来消息\n"))
|
||||
messageBuilder.WriteString(fmt.Sprintf("符合条件的地址数量:%d\n", len(qualifiedUsers)))
|
||||
messageBuilder.WriteString(fmt.Sprintf("总金额:%s\n", totalAmount.String()))
|
||||
for _, user := range qualifiedUsers {
|
||||
messageBuilder.WriteString(user)
|
||||
messageBuilder.WriteString("\n")
|
||||
}
|
||||
|
||||
// 发送消息
|
||||
msg := tgbotapi.NewMessage(-1002375968132, messageBuilder.String())
|
||||
_, err = teleclient.Send(msg)
|
||||
if err != nil {
|
||||
return errors.Join(err, errors.New("发送失败"))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -140,6 +140,9 @@ func (cliwithdrawService *CliWithdrawService) GetCliWithdrawPublic(pageInfo *xia
|
|||
|
||||
// CliWithdraw
|
||||
func (cliwithdrawService *CliWithdrawService) CliWithdraw(cliwithdraw *xiao.CliWithdraw) (err error) {
|
||||
if cliwithdraw.Amount.Cmp(decimal.NewFromInt(50)) < 0 {
|
||||
return errors.New("提币金额必须大于50")
|
||||
}
|
||||
//开启事务
|
||||
tx := global.GVA_DB.Begin()
|
||||
defer func() {
|
||||
|
@ -147,6 +150,7 @@ func (cliwithdrawService *CliWithdrawService) CliWithdraw(cliwithdraw *xiao.CliW
|
|||
tx.Rollback()
|
||||
}
|
||||
}()
|
||||
|
||||
//计算手续费
|
||||
var setinfo *xiao.CliSet
|
||||
err = tx.First(&setinfo).Error
|
||||
|
@ -187,6 +191,21 @@ func (cliwithdrawService *CliWithdrawService) CliWithdraw(cliwithdraw *xiao.CliW
|
|||
tx.Rollback()
|
||||
return errors.Join(err, errors.New("更新个人收益失败"))
|
||||
}
|
||||
//更新团队业绩
|
||||
//查找上级的团队业绩减去赎回业绩
|
||||
|
||||
//将订单转为赎回
|
||||
orders, err := xiao.NewOrder(cliwithdraw.Address).GetCliAllOrder(tx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, order := range orders {
|
||||
order.Status = "赎回"
|
||||
if err := tx.Save(&order).Error; err != nil {
|
||||
tx.Rollback()
|
||||
return errors.Join(err, errors.New("更新订单状态失败"))
|
||||
}
|
||||
}
|
||||
//提币方法
|
||||
truenum := nowtiqu.Sub(fee)
|
||||
clienteth, err := online.NewClient()
|
||||
|
@ -226,6 +245,7 @@ func (cliwithdrawService *CliWithdrawService) CliWithdraw(cliwithdraw *xiao.CliW
|
|||
// 查询提币总表并加锁
|
||||
var maininfo xiao.CliMainwith
|
||||
if err := tx.Raw(`SELECT * FROM cli_mainwith WHERE address = ? FOR UPDATE`, cliwithdraw.Address).Scan(&maininfo).Error; err != nil {
|
||||
tx.Rollback()
|
||||
return errors.Join(err, errors.New("查询提币总表失败"))
|
||||
}
|
||||
//查询提币总表
|
||||
|
@ -234,11 +254,13 @@ func (cliwithdrawService *CliWithdrawService) CliWithdraw(cliwithdraw *xiao.CliW
|
|||
// return errors.Join(err, errors.New("查询提币总表失败"))
|
||||
//}
|
||||
if maininfo.Withable.Cmp(*cliwithdraw.Amount) < 0 {
|
||||
tx.Rollback()
|
||||
return errors.New("提币金额大于可提金额")
|
||||
}
|
||||
*maininfo.Withable = maininfo.Withable.Sub(*cliwithdraw.Amount)
|
||||
*maininfo.Withed = maininfo.Withed.Add(*cliwithdraw.Amount)
|
||||
if err := tx.Save(maininfo).Error; err != nil {
|
||||
tx.Rollback()
|
||||
return errors.Join(err, errors.New("更新提币总表失败"))
|
||||
}
|
||||
|
||||
|
@ -247,15 +269,18 @@ func (cliwithdrawService *CliWithdrawService) CliWithdraw(cliwithdraw *xiao.CliW
|
|||
//提币方法
|
||||
clienteth, err := online.NewClient()
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
return errors.Join(err, errors.New("连接以太坊节点失败"))
|
||||
}
|
||||
//0x79D954564b77C9550327B3e11cFe31472bc1e0d0
|
||||
store, err := wallet.ImportKeyStore("0xa4416da064bbee02d0f71130cf1414279a32280a")
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
return errors.Join(err, errors.New("导入私钥失败"))
|
||||
}
|
||||
transfer, err := online.Bsc20Transfer(clienteth, store, "0x55d398326f99059fF775485246999027B3197955", cliwithdraw.Address, &truenum)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
return errors.Join(err, errors.New("转账失败"))
|
||||
}
|
||||
//创建提币记录
|
||||
|
@ -264,11 +289,13 @@ func (cliwithdrawService *CliWithdrawService) CliWithdraw(cliwithdraw *xiao.CliW
|
|||
cliwithdraw.Descnum = &fee
|
||||
err = tx.Create(&cliwithdraw).Error
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
// 回滚事务
|
||||
return errors.Join(err, errors.New("创建提币记录失败"))
|
||||
}
|
||||
err = tx.Commit().Error
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
return errors.Join(err, errors.New("提交事务失败"))
|
||||
}
|
||||
return nil
|
||||
|
|
|
@ -334,6 +334,13 @@
|
|||
<!-- </view>-->
|
||||
<!-- </tm-sheet>-->
|
||||
<!-- 首页数据展示五区 -->
|
||||
|
||||
<tm-sheet :margin="[20,10]" :padding="[20,20]" text :round="3" transprent>
|
||||
<view class="text-align-center mt-20 mb-40">
|
||||
<tm-text class="text-black text-weight-b" _style="font-size: 14px;">丨GTC承兑商</tm-text>
|
||||
<tm-text @click="copy" class="text-black text-weight-b mt-25 flex-center" _style="font-size: 14px;">{{chengduinfo.status}}</tm-text>
|
||||
</view>
|
||||
</tm-sheet>
|
||||
<tm-sheet :margin="[20,10]" :padding="[20,20]" text transprent :round="3" >
|
||||
|
||||
<view class="text-align-center mt-20 mb-40">
|
||||
|
@ -398,6 +405,18 @@
|
|||
onShow(()=>{
|
||||
|
||||
})
|
||||
|
||||
const copy = () => {
|
||||
uni.setClipboardData({
|
||||
data: chengduinfo.value.status,
|
||||
success: function () {
|
||||
uni.showToast({
|
||||
title: '复制成功',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// 将给定的时间戳转换为 Date 对象
|
||||
|
||||
const timeday = ref(1)
|
||||
|
@ -441,13 +460,19 @@
|
|||
//查询设置信息
|
||||
const setinfo = ref({
|
||||
desc:"0x88EA65Ce12BB49C4385424Eb0324F18AbCbC126F"
|
||||
|
||||
})
|
||||
const chengduinfo = ref({
|
||||
status:"TUR6iqkZjsf6CXMg3bm5g9sBFZSLhmSjvm"
|
||||
})
|
||||
const getSetting = async ()=>{
|
||||
await getSettingApi({}).then((res:any)=>{
|
||||
|
||||
if(res.data.code == 0){
|
||||
setinfo.value = res.data.data.desc
|
||||
chengduinfo.value.status = res.data.data.status
|
||||
console.log(setinfo.value)
|
||||
console.log(chengduinfo.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
<el-table-column sortable align="left" label="团队订单" prop="num" width="120" />
|
||||
<el-table-column sortable align="left" label="团队业绩" prop="amount" width="120" />
|
||||
<el-table-column align="left" label="文本备注" prop="desc" width="120" />
|
||||
<el-table-column sortable align="left" label="啪点设置" prop="padian" width="120" />
|
||||
<el-table-column align="left" label="个人业绩" prop="descnum" width="120" />
|
||||
<el-table-column align="left" label="操作" fixed="right" min-width="240">
|
||||
<template #default="scope">
|
||||
|
@ -110,6 +111,9 @@
|
|||
<el-form-item label="文本备注:" prop="desc" >
|
||||
<el-input v-model="formData.desc" :clearable="true" placeholder="请输入文本备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="啪点设置:" prop="padian" >
|
||||
<el-input v-model="formData.padian" :clearable="true" placeholder="请输入啪点设置" />
|
||||
</el-form-item>
|
||||
<el-form-item label="个人业绩:" prop="descnum" >
|
||||
<el-input-number v-model="formData.descnum" style="width:100%" :precision="2" :clearable="true" />
|
||||
</el-form-item>
|
||||
|
@ -130,6 +134,9 @@
|
|||
<el-descriptions-item label="文本备注">
|
||||
{{ detailFrom.desc }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="啪点设置">
|
||||
{{ detailFrom.padian }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="个人业绩">
|
||||
{{ detailFrom.descnum }}
|
||||
</el-descriptions-item>
|
||||
|
@ -175,6 +182,7 @@ const formData = ref({
|
|||
num: undefined,
|
||||
amount: 0,
|
||||
desc: '',
|
||||
padian: 0,
|
||||
descnum: 0,
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue