@@ -193,7 +244,7 @@
import { getMyShop, updateShop, deleteShop, queryShop, closeShop ,updateShopConfig,deleteShopConfig,getChainAndCoin} from '@/api/shops'
import { coinList } from '@/utils/coinList'
-import { getShopConfig } from '@/api/wallet'
+import { getShopConfig,getShopConfigV2 ,withdrawBalanceForSeller,updateShopConfigV2} from '@/api/wallet'
export default {
@@ -227,7 +278,19 @@ export default {
{ label: 'BSC (BEP20)', value: 'bsc' },
{ label: 'Nexa', value: 'nexa' },
],
- shopLoading: false
+ shopLoading: false,
+ /* 提现弹窗状态(仅本页使用) */
+ withdrawDialogVisible: false,
+ withdrawLoading: false,
+ currentWithdrawRow: {},
+ withdrawForm: {
+ amount: '',
+ toAddress: '',
+ fee: '0.00',
+ googleCode: ''
+ },
+ withdrawAddressEditable: false,
+ withdrawRules: {}
}
},
computed: {
@@ -261,12 +324,199 @@ export default {
selectedCoinLabels() {
const map = new Map((this.editCoinOptions || []).map(o => [String(o.value), String(o.label).toUpperCase()]))
return (this.configForm.payCoins || []).map(v => map.get(String(v)) || String(v).toUpperCase())
+ },
+ /* 提现弹窗标题:如 USDT提现 */
+ withdrawDialogTitle() {
+ const sym = String((this.currentWithdrawRow && this.currentWithdrawRow.payCoin) || '').toUpperCase() || 'USDT'
+ return `${sym}提现`
+ },
+ /* 提现币种(大写) */
+ displayWithdrawSymbol() {
+ return String((this.currentWithdrawRow && this.currentWithdrawRow.payCoin) || '').toUpperCase()
+ },
+ /* 可用余额(最多6位小数显示) */
+ availableWithdrawBalance() {
+ const n = Number((this.currentWithdrawRow && this.currentWithdrawRow.balance) || 0)
+ return this.formatDec6(n)
+ },
+ /* 实际到账金额 = 可用余额 - 手续费(只显示可用余额,不展示总余额/冻结) */
+ actualAmount() {
+ const amountInt = this.toScaledInt(this.withdrawForm.amount)
+ const feeInt = this.toScaledInt(this.withdrawForm.fee)
+ if (!Number.isFinite(amountInt) || !Number.isFinite(feeInt)) return '0'
+ const res = amountInt - feeInt
+ return res > 0 ? this.formatDec6FromInt(res) : '0'
}
},
created() {
this.fetchMyShop()
},
methods: {
+ /** 余额展示:带币种单位 */
+ formatBalance(row) {
+ try {
+ const num = Number(row && row.balance)
+ const valid = Number.isFinite(num)
+ const coin = String(row && row.payCoin ? row.payCoin : '').toUpperCase()
+ if (!valid) return '-'
+ const text = String(num)
+ return coin ? `${text} ${coin}` : text
+ } catch (e) {
+ return '-'
+ }
+ },
+ /** 仅数字部分(用于红色显示) */
+ formatAmount(row) {
+ try {
+ const num = Number(row && row.balance)
+ if (!Number.isFinite(num)) return '-'
+ return String(num)
+ } catch (e) {
+ return '-'
+ }
+ },
+ /** 仅币种单位(大写) */
+ formatCoin(row) {
+ return String(row && row.payCoin ? row.payCoin : '').toUpperCase()
+ },
+ /** 打开提现对话框(行数据驱动) */
+ async handleWithdraw(row) {
+ this.currentWithdrawRow = row || {}
+ const fee = Number(row && (row.serviceCharge != null ? row.serviceCharge : row.charge))
+ this.withdrawForm.fee = Number.isFinite(fee) ? this.formatDec6(fee) : '0.00'
+ this.withdrawForm.amount = ''
+ // 收款地址默认填充为当前行地址,且禁用编辑
+ this.withdrawForm.toAddress = row && row.payAddress ? row.payAddress : ''
+ this.withdrawForm.googleCode = ''
+ this.withdrawAddressEditable = false
+ // 初始化校验规则
+ this.withdrawRules = {
+ amount: [
+ { required: true, message: '请输入提现金额', trigger: 'blur' },
+ { validator: this.validateWithdrawAmount, trigger: 'blur' }
+ ],
+ // 地址为只读已填,不再要求用户输入
+ googleCode: [
+ { required: true, message: '请输入谷歌验证码', trigger: 'blur' },
+ { validator: this.validateGoogleCode, trigger: 'blur' }
+ ]
+ }
+ this.withdrawDialogVisible = true
+ },
+ /* 点击“修改”启用收款地址编辑并聚焦 */
+ handleEditAddressClick() {
+ this.withdrawAddressEditable = true
+ this.$nextTick(() => {
+ const input = this.$refs.withdrawToAddressInput
+ if (input && input.focus) input.focus()
+ })
+ },
+ /* 提现金额输入(<=6位小数) */
+ handleAmountInput(v) {
+ let s = String(v || '')
+ s = s.replace(/[^0-9.]/g, '')
+ const i = s.indexOf('.')
+ if (i !== -1) {
+ s = s.slice(0, i + 1) + s.slice(i + 1).replace(/\./g, '')
+ const [intPart, decPart = ''] = s.split('.')
+ s = intPart + '.' + decPart.slice(0, 6)
+ }
+ this.withdrawForm.amount = s
+ },
+ /* 谷歌验证码仅数字 */
+ handleGoogleCodeInput(v) {
+ this.withdrawForm.googleCode = String(v || '').replace(/\D/g, '')
+ },
+ /* 确认提现 - 调用后端卖家提现接口 */
+ confirmWithdraw() {
+ this.$refs.withdrawForm.validate(async (valid) => {
+ if (!valid) return
+ this.withdrawLoading = true
+ try {
+ const row = this.currentWithdrawRow || {}
+ const payload = {
+ toChain: row.chain,
+ toSymbol: row.payCoin,
+ amount: Number(this.withdrawForm.amount),
+ toAddress: this.withdrawForm.toAddress,
+ fromAddress: row.payAddress || this.withdrawForm.toAddress || '',
+ code: this.withdrawForm.googleCode,
+ serviceCharge: Number(this.withdrawForm.fee) || 0
+ }
+ const res = await withdrawBalanceForSeller(payload)
+ if (res && (res.code === 0 || res.code === 200)) {
+ this.$message.success('提现申请已提交,请等待处理')
+ this.withdrawDialogVisible = false
+ this.fetchShopConfigs(this.shop.id)
+ }
+ } catch (e) {
+ console.error('卖家提现失败', e)
+ } finally {
+ this.withdrawLoading = false
+ }
+ })
+ },
+ /* 工具:最多6位小数显示 */
+ formatDec6(value) {
+ if (value === null || value === undefined || value === '') return '0'
+ let s = String(value)
+ if (/e/i.test(s)) {
+ const n = Number(value)
+ if (!Number.isFinite(n)) return '0'
+ s = n.toFixed(20).replace(/\.0+$/, '').replace(/(\.\d*?)0+$/, '$1')
+ }
+ const m = s.match(/^(-?)(\d+)(?:\.(\d+))?$/)
+ if (!m) return s
+ let intPart = m[2]
+ let decPart = m[3] || ''
+ if (decPart.length > 6) decPart = decPart.slice(0, 6)
+ return decPart ? `${intPart}.${decPart}` : intPart
+ },
+ /* 工具:金额字符串 -> 10^6 精度整数 */
+ toScaledInt(amountStr, decimals = 6) {
+ if (amountStr === null || amountStr === undefined) return 0
+ const normalized = String(amountStr).trim()
+ if (normalized === '') return 0
+ const re = new RegExp(`^\\d+(?:\\.(\\d{0,${decimals}}))?$`)
+ const match = normalized.match(re)
+ if (!match) {
+ const n = Number(normalized)
+ if (!Number.isFinite(n)) return 0
+ const scale = Math.pow(10, decimals)
+ return Math.round(n * scale)
+ }
+ const [intPart, decPartRaw] = normalized.split('.')
+ const decPart = (decPartRaw || '').padEnd(decimals, '0').slice(0, decimals)
+ const scale = Math.pow(10, decimals)
+ return Number(intPart) * scale + Number(decPart)
+ },
+ /* 工具:10^6 精度整数 -> 最多6位小数字符串 */
+ formatDec6FromInt(intVal) {
+ const sign = intVal < 0 ? '-' : ''
+ const abs = Math.abs(intVal)
+ const scale = Math.pow(10, 6)
+ const intPart = Math.floor(abs / scale)
+ const decPart = String(abs % scale).padStart(6, '0')
+ const s = `${sign}${intPart}.${decPart}`
+ return s.replace(/\.0+$/, '').replace(/(\.\d*?)0+$/, '$1')
+ },
+ /* 校验:提现金额 */
+ validateWithdrawAmount(rule, value, callback) {
+ const amtInt = this.toScaledInt(value)
+ if (!Number.isFinite(amtInt) || amtInt <= 0) { callback(new Error('请输入有效的金额')); return }
+ const feeInt = this.toScaledInt(this.withdrawForm.fee)
+ const balanceInt = this.toScaledInt((this.currentWithdrawRow && this.currentWithdrawRow.balance) || 0)
+ if (amtInt >= balanceInt) { callback(new Error('提现金额必须小于可用余额')); return }
+ if (amtInt <= feeInt) { callback(new Error('提现金额必须大于手续费')); return }
+ if (amtInt < 1000000) { callback(new Error('最小提现金额为 1')); return }
+ callback()
+ },
+ /* 校验:谷歌验证码 */
+ validateGoogleCode(rule, value, callback) {
+ const v = String(value || '')
+ if (!/^\d{6}$/.test(v)) { callback(new Error('谷歌验证码必须是6位数字')); return }
+ callback()
+ },
/**
* 手续费率显示:最多6位小数,去除多余的0;空值显示为 '-'
*/
@@ -362,7 +612,7 @@ export default {
}
try {
- const res = await getShopConfig({id:shopId})
+ const res = await getShopConfigV2({id:shopId})
if (res && (res.code === 0 || res.code === 200) && Array.isArray(res.data)) {
// 直接使用后端返回的数据;children: [{payCoin,image}]
this.shopConfigs = res.data
@@ -430,15 +680,7 @@ export default {
},
submitConfigEdit() {
- // 基础校验
- if (!this.configForm.chainLabel && !this.configForm.chainValue) {
- this.$message.warning('请选择支付链')
- return
- }
- if (!this.configForm.payCoins || this.configForm.payCoins.length === 0) {
- this.$message.warning('请选择支付币种')
- return
- }
+ // 仅校验钱包地址
const addr = (this.configForm.payAddress || '').trim()
if (!addr) {
this.$message.warning('请输入钱包地址')
@@ -446,11 +688,17 @@ export default {
}
const payload = {
id: this.configForm.id,
- chain: this.configForm.chainValue || this.configForm.chainLabel,
- payCoin: (this.configForm.payCoins || []).join(','),
+ chain: this.configForm.chainValue || this.configForm.chainLabel || '',
payAddress: this.configForm.payAddress
}
- this.updateShopConfig(payload)
+ ;(async () => {
+ const res = await updateShopConfigV2(payload)
+ if (res && (res.code === 0 || res.code === 200)) {
+ this.$message.success('保存成功')
+ this.visibleConfigEdit = false
+ this.fetchShopConfigs(this.shop.id)
+ }
+ })()
},
removeSelectedCoin(labelUpper) {
const label = String(labelUpper || '').toLowerCase()
@@ -690,6 +938,14 @@ export default {
.guide-note { margin-top: 10px; color: #6b7280; font-size: 13px; background: #f9fafb; border: 1px dashed #e5e7eb; padding: 8px 10px; border-radius: 8px; }
.coin-list { display: flex; align-items: center; gap: 8px; }
.coin-img { width: 20px; height: 20px; border-radius: 4px; display: inline-block; }
+/* 提现弹窗样式(与钱包页统一) */
+.balance-info { font-size: 12px; color: #666; margin-top: 4px; text-align: left; }
+.fee-info { font-size: 12px; color: #e6a23c; margin-top: 4px; text-align: left; }
+.actual-amount-info { font-size: 12px; color: #67c23a; margin-top: 4px; text-align: left; font-weight: 500; }
+.address-tip { font-size: 12px; color: #f56c6c; margin-top: 4px; line-height: 1.4; text-align: left; }
+/* 余额数字红色显示 */
+.balance-num { color: #ff4d4f; font-weight: 600; }
+.balance-unit { color: #606266; }
diff --git a/power_leasing/src/views/account/products.vue b/power_leasing/src/views/account/products.vue
index d9b7f89..1fcbc2a 100644
--- a/power_leasing/src/views/account/products.vue
+++ b/power_leasing/src/views/account/products.vue
@@ -51,7 +51,7 @@
@@ -103,16 +103,24 @@
-
-
-
-
+
+
+
+ {{ getRowCoinText(scope.row) }}
+
+
+
+
+
+ {{ getRowAlgorithmText(scope.row) }}
+
+
-
+
- {{ getTheoryText(scope.row) }}
+ {{ getTheoryText(scope.row) }}
@@ -272,30 +280,76 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
6) intPart = intPart.slice(0, 6)
+ if (decPart) decPart = decPart.slice(0, 4)
+ v = decPart.length ? `${intPart}.${decPart}` : (endsWithDot ? `${intPart}.` : intPart)
+ this.$set(this.editDialog.form.coinAndAlgoList[index], 'theoryPower', v)
+ },
+ /** 编辑弹窗:单位变更 */
+ editHandleRowUnitChange(index, value) {
+ this.$set(this.editDialog.form.coinAndAlgoList[index], 'unit', value)
+ },
+ /** 编辑弹窗:新增一行(最多10行) */
+ editHandleAddRow() {
+ const list = this.editDialog.form.coinAndAlgoList || []
+ if (list.length >= 10) {
+ this.$message.warning('最多添加 10 行')
+ return
+ }
+ const last = list[list.length - 1] || { unit: 'TH/S' }
+ list.push({ coin: '', algorithm: '', theoryPower: '', unit: last.unit || 'TH/S', coinAndPowerId: null })
+ this.$set(this.editDialog.form, 'coinAndAlgoList', list)
+ },
+ /** 编辑弹窗:删除一行(至少保留1行) */
+ editHandleRemoveRow(index) {
+ const list = this.editDialog.form.coinAndAlgoList || []
+ if (list.length <= 1) return
+ list.splice(index, 1)
+ this.$set(this.editDialog.form, 'coinAndAlgoList', list)
+ },
+ /** 行:币种(来自 coinAndAlgoList,去重后用中文逗号拼接;兜底 row.coin) */
+ getRowCoinText(row) {
+ try {
+ const list = Array.isArray(row && row.coinAndAlgoList) ? row.coinAndAlgoList : []
+ if (list.length) {
+ const coins = list.map(i => String(i && i.coin ? i.coin : '').trim()).filter(Boolean)
+ const uniq = Array.from(new Set(coins))
+ if (uniq.length) return uniq.join(',')
+ }
+ const fallback = String(row && row.coin ? row.coin : '').trim()
+ return fallback || '-'
+ } catch (e) {
+ return String(row && row.coin ? row.coin : '').trim() || '-'
+ }
+ },
+ /** 行:算法(来自 coinAndAlgoList,去重后用中文逗号拼接;兜底 row.algorithm) */
+ getRowAlgorithmText(row) {
+ try {
+ const list = Array.isArray(row && row.coinAndAlgoList) ? row.coinAndAlgoList : []
+ if (list.length) {
+ const algos = list.map(i => String(i && i.slogithm ? i.slogithm : (i && i.algorithm ? i.algorithm : '')).trim()).filter(Boolean)
+ const uniq = Array.from(new Set(algos))
+ if (uniq.length) return uniq.join(',')
+ }
+ const fallback = String(row && row.algorithm ? row.algorithm : '').trim()
+ return fallback || '-'
+ } catch (e) {
+ return String(row && row.algorithm ? row.algorithm : '').trim() || '-'
+ }
+ },
/** 从首行 priceList 推断表头单位(优先按 selectedPayKey 匹配) */
computeUnitFromFirstRow() {
try {
@@ -655,12 +775,29 @@ export default {
return '-'
}
},
- /** 展示理论算力(带单位) */
+ /** 展示理论算力(来自 coinAndAlgoList:每项“值 单位”,多项以中文逗号拼接;兜底 row.theoryPower + row.unit) */
getTheoryText(row) {
- const val = row && row.theoryPower != null ? String(row.theoryPower) : ''
- if (!val) return '-'
- const unit = (row && row.unit ? String(row.unit) : '').trim().toUpperCase()
- return unit ? `${val} ${unit}` : val
+ try {
+ const list = Array.isArray(row && row.coinAndAlgoList) ? row.coinAndAlgoList : []
+ if (list.length) {
+ const parts = list.map(i => {
+ const power = (i && i.theoryPower != null) ? String(i.theoryPower) : ''
+ const unit = (i && (i.unit || i.Unit)) ? String(i.unit || i.Unit).trim().toUpperCase() : ''
+ const text = power ? (unit ? `${power} ${unit}` : power) : ''
+ return text
+ }).filter(Boolean)
+ if (parts.length) return parts.join(', ')
+ }
+ const val = row && row.theoryPower != null ? String(row.theoryPower) : ''
+ if (!val) return '-'
+ const unit = (row && row.unit ? String(row.unit) : '').trim().toUpperCase()
+ return unit ? `${val} ${unit}` : val
+ } catch (e) {
+ const val = row && row.theoryPower != null ? String(row.theoryPower) : ''
+ if (!val) return '-'
+ const unit = (row && row.unit ? String(row.unit) : '').trim().toUpperCase()
+ return unit ? `${val} ${unit}` : val
+ }
},
/** 展示功耗(kw/h) */
getPowerDissText(row) {
@@ -1014,27 +1151,41 @@ export default {
/** 编辑 */
handleEdit(row) {
+ // coinAndAlgoList:从后端 coinAndAlgoList 转换;若没有则用旧字段构造单行
+ const srcList = Array.isArray(row.coinAndAlgoList) ? row.coinAndAlgoList : []
+ const coinAndAlgoList = srcList.length
+ ? srcList.map(it => ({
+ coin: String(it && (it.coin || '')).trim(),
+ algorithm: String(it && (it.slogithm || it.algorithm || '')).trim(),
+ theoryPower: (it && it.theoryPower != null) ? String(it.theoryPower) : '',
+ unit: String(it && (it.unit || '')).trim() || 'TH/S',
+ coinAndPowerId: it && (it.coinAndPowerId != null) ? it.coinAndPowerId : null
+ }))
+ : [{
+ coin: String(row.coin || '').trim(),
+ algorithm: String(row.algorithm || '').trim(),
+ theoryPower: (row && row.theoryPower != null) ? String(row.theoryPower) : '',
+ unit: String(row.unit || 'TH/S').trim(),
+ coinAndPowerId: null
+ }]
const form = {
id: row.id,
name: row.name || '',
- coin: row.coin || '',
- algorithm: row.algorithm || '',
+ coinAndAlgoList,
maxLeaseDays: row.maxLeaseDays || '',
powerDissipation: row.powerDissipation || row.powerDissipation || '',
saleNumbers: row.saleNumbers || '',
- theoryPower: row.theoryPower || '',
- unit: row.unit || 'GH/S',
state: (row && (row.state === 0 || row.state === 1)) ? row.state : 0
}
// 构建可编辑的价格列表:以支持的支付方式为模板
- const srcList = Array.isArray(row.priceList) ? row.priceList : []
+ const priceSrc = Array.isArray(row.priceList) ? row.priceList : []
const template = (this.payTypes || []).map(pt => ({
chain: (pt.payChain || pt.chain || '').toString(),
coin: (pt.payCoin || pt.coin || '').toString(),
payTypeId: pt.payTypeId || pt.id || 0
}))
this.editDialog.priceList = template.map(t => {
- const hit = srcList.find(p =>
+ const hit = priceSrc.find(p =>
String(p.chain || p.payChain || '') === t.chain &&
String(p.coin || p.payCoin || '') === t.coin
)
@@ -1062,16 +1213,40 @@ export default {
const f = this.editDialog.form
// 基础校验
if (!String(f.name || '').trim()) { this.$message.warning('矿机型号不能为空'); return }
- if (!String(f.coin || '').trim()) { this.$message.warning('币种不能为空'); return }
- if (!String(f.algorithm || '').trim()) { this.$message.warning('算法不能为空'); return }
+ // 校验 coinAndAlgoList
+ const list = Array.isArray(f.coinAndAlgoList) ? f.coinAndAlgoList : []
+ if (!list.length) { this.$message.warning('请至少添加一行币种/算法/算力/单位'); return }
+ const coinPattern = /^[A-Za-z0-9]{1,10}$/
+ const algoPattern = /^[A-Za-z0-9-]{2,20}$/
+ const powerPattern = /^\d{1,6}(\.\d{1,4})?$/
+ for (let i = 0; i < list.length; i += 1) {
+ const r = list[i] || {}
+ const coin = String(r.coin || '').trim()
+ const algo = String(r.algorithm || '').trim()
+ const power = String(r.theoryPower || '').trim()
+ const unit = String(r.unit || '').trim()
+ if (!coin) { this.$message.warning(`第 ${i + 1} 行:请输入币种`); return }
+ if (!coinPattern.test(coin)) { this.$message.warning(`第 ${i + 1} 行:币种仅允许字母或数字,1-10 位`); return }
+ if (!algo) { this.$message.warning(`第 ${i + 1} 行:请输入算法`); return }
+ if (!algoPattern.test(algo)) { this.$message.warning(`第 ${i + 1} 行:算法仅允许字母/数字/“-”,2-20 位`); return }
+ if (!power || !powerPattern.test(power) || Number(power) <= 0) {
+ this.$message.warning(`第 ${i + 1} 行:理论算力需大于0,整数最多6位,小数最多4位`); return
+ }
+ if (!unit) { this.$message.warning(`第 ${i + 1} 行:请选择算力单位`); return }
+ }
const days = parseInt(String(f.maxLeaseDays || '').replace(/[^\d]/g, ''), 10)
if (!(Number.isInteger(days) && days >= 1 && days <= 365)) { this.$message.warning('最大租赁天数需为1-365的整数'); return }
const sale = parseInt(String(f.saleNumbers || '').replace(/[^\d]/g, ''), 10)
if (!Number.isInteger(sale) || sale < 0) { this.$message.warning('出售数量应为非负整数'); return }
- const payload = {
+ const payload = {
id: f.id,
- algorithm: String(f.algorithm || '').trim(),
- coin: String(f.coin || '').trim(),
+ coinAndAlgoList: (f.coinAndAlgoList || []).map(it => ({
+ coin: String(it.coin || '').trim().toUpperCase(),
+ algorithm: String(it.algorithm || '').trim().toUpperCase(),
+ theoryPower: Number(it.theoryPower) || 0,
+ unit: it.unit,
+ coinAndPowerId: it.coinAndPowerId || null
+ })),
maxLeaseDays: days,
name: String(f.name || '').trim(),
powerDissipation: Number(String(f.powerDissipation || '0').replace(/[^\d.]/g, '')) || 0,
@@ -1083,8 +1258,6 @@ export default {
productMachineId: p.productMachineId || f.id || 0
})),
saleNumbers: sale,
- theoryPower: Number(String(f.theoryPower || '0').replace(/[^\d.]/g, '')) || 0,
- unit: String(f.unit || '').trim() || 'GH/S',
state: (f && (f.credentials ? f.state : f.state)) ?? 0
}
// 价格至少有一个填写
@@ -1247,6 +1420,13 @@ export default {
padding-left: 12px; /* 对齐到上方 el-input 的内边距视觉效果 */
}
+/* 编辑弹窗:左侧标签不换行(长文本保持单行,可溢出隐藏省略) */
+.edit-form :deep(.el-form-item__label) {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
::v-deep .el-form-item__content{
text-align: left;
}
@@ -1294,6 +1474,24 @@ export default {
font-weight: 700;
}
+/* 表格单元格文本溢出省略,hover 显示完整(依赖列的 show-overflow-tooltip) */
+.ellipsis-cell {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+/* 编辑弹窗:币种/算法/算力/单位 多行布局 */
+.coin-algo-rows { display: grid; gap: 8px; width: 100%; }
+.coin-algo-line { display: flex; align-items: center; gap: 8px; }
+.coin-algo-line .coin-input { width: 18%; min-width: 140px; }
+.coin-algo-line .algo-input { width: 24%; min-width: 160px; }
+.coin-algo-line .power-input { width: 20%; min-width: 140px; }
+.coin-algo-line .unit-select { width: 16%; min-width: 120px; }
+.coin-algo-line .op-btn { flex: 0 0 auto; }
+
::v-deep .el-input__prefix, .el-input__suffix{
top:24%;
}
diff --git a/power_leasing/src/views/account/withdrawRecord.vue b/power_leasing/src/views/account/withdrawRecord.vue
new file mode 100644
index 0000000..6f17a65
--- /dev/null
+++ b/power_leasing/src/views/account/withdrawRecord.vue
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+
+ 加载中...
+
+
+
+
+
+
+ {{ formatFullTime(scope.row.createTime) }}
+
+
+
+
+
+
+ -{{ formatAmount(scope.row.amount, scope.row.coin || scope.row.toSymbol || 'USDT').text }}
+
+
+
+
+ -{{ formatAmount(scope.row.amount, scope.row.coin || scope.row.toSymbol || 'USDT').text }}
+
+
+
+
+
+
+ {{ formatAmount(scope.row.serviceCharge, scope.row.coin || scope.row.toSymbol || 'USDT').text }}
+
+
+
+ {{ formatChain(scope.row.toChain || scope.row.chain) }}
+
+
+ {{ String(scope.row.coin || scope.row.toSymbol || '').toUpperCase() }}
+
+
+
+
+ {{ scope.row.toAddress }}
+
+ 复制
+
+
+
+
+
+ {{ scope.row.txHash }}
+
+ 复制
+
+
+
+
+ {{ getStatusText(scope.row.status) }}
+
+
+
+ {{ formatFullTime(scope.row.updateTime) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/power_leasing/src/views/cart/index.vue b/power_leasing/src/views/cart/index.vue
index 34e3809..9550888 100644
--- a/power_leasing/src/views/cart/index.vue
+++ b/power_leasing/src/views/cart/index.vue
@@ -1,5 +1,5 @@
-
+
购物车
@@ -40,10 +40,21 @@
:header-cell-style="{ textAlign: 'left' }" :cell-style="{ textAlign: 'left' }">
-
+
+
+
+ {{ formatMachineType(scope.row.type) }}
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+ {{ Number(scope.row.canSaleNumbers || 0) }}
+
+
+
+
+ handleNumbersChange(scope.row, val)"
+ />
+
+
+
+ {{ scope.row.maxLeaseDays != null ? scope.row.maxLeaseDays : '' }}
+
+
+
+
+
+
单价({{ getSelectedCoinSymbolForShop(shopScope.row) || 'USDT' }})
@@ -160,25 +178,6 @@
-
-
-
-
-
-
-
-
-
- {{ scope.row.maxLeaseDays != null ? scope.row.maxLeaseDays : '' }}
@@ -276,20 +275,27 @@
已选机器:{{ selectedMachineCount }} 台
- 金额合计(USDT):
-
-
-
- {{ formatAmount(selectedTotal, 'USDT').text }}
-
+ 金额合计:
+
+
+
+
+
+ {{ coin }}: {{ formatAmount(amt, coin).text }}
+
+
+
+ {{ coin }}: {{ formatAmount(amt, coin).text }}
-
- {{ formatAmount(selectedTotal, 'USDT').text }}
-
+
+
+
+ -
+
删除所选机器
@@ -325,10 +331,19 @@
-
-
-
-
+
+
+
+ {{ formatMachineType(scope.row.type) }}
+
+
+
+
+
单价({{ grp.coinSymbol || 'USDT' }})
@@ -348,6 +363,7 @@
+
小计({{ grp.coinSymbol || 'USDT' }})
@@ -424,6 +440,142 @@
+
+
+
+
+
+
+
选择币种/算法
+
+
选择矿池/模型
+
+
+
+
+
+
+
+ {{ formatMachineType(scope.row.type) }}
+
+
+
+
+
+
+
+
钱包地址
+
+
挖矿账户
+
+
矿工号
+
+
+
+
+
+
+
已配置机器
+
+
+
+
+ {{ formatMachineType(scope.row.type) }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ formatWalletAddress(scope.row.walletAddress) }}
+
+ -
+
+
+
+
+
+
+
+
+ 取消
+
+ {{ unconfiguredMachinesList.length > 0 ? '确认配置' : '下一步' }}
+
+
+
+
@@ -489,8 +641,8 @@