129 lines
5.9 KiB
Plaintext
129 lines
5.9 KiB
Plaintext
<navigation-bar title="用户详情" back="{{true}}" color="#f6efe7" background="#081518"></navigation-bar>
|
|
|
|
<view class="page-shell">
|
|
<view class="page-stack">
|
|
<view wx:if="{{user}}" class="surface-card">
|
|
<text class="section-title">{{user.nickname || user.account}}</text>
|
|
<text class="section-desc">{{user.displayTypeText}} · {{user.displayShopName}} · {{user.displayStatusText}}</text>
|
|
<view class="meta-grid">
|
|
<view class="meta-item">
|
|
<text class="meta-label">账号</text>
|
|
<text class="meta-value">{{user.account}}</text>
|
|
</view>
|
|
<view class="meta-item">
|
|
<text class="meta-label">手机号</text>
|
|
<text class="meta-value">{{user.phone || '--'}}</text>
|
|
</view>
|
|
<view class="meta-item">
|
|
<text class="meta-label">签名</text>
|
|
<text class="meta-value">{{user.signature || '暂无签名'}}</text>
|
|
</view>
|
|
<view class="meta-item">
|
|
<text class="meta-label">创建时间</text>
|
|
<text class="meta-value">{{user.displayCreateTime}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="list-actions">
|
|
<view class="mini-btn primary" bindtap="handleEdit">编辑资料</view>
|
|
<view class="mini-btn" bindtap="handlePermissionAssign">分配权限</view>
|
|
<view class="mini-btn" bindtap="handleResetPassword">重置密码</view>
|
|
</view>
|
|
<view class="list-actions">
|
|
<view class="mini-btn" data-action="disable" bindtap="handleUserAction">{{user.status === 0 ? '恢复启用' : '停用账号'}}</view>
|
|
<view class="mini-btn" data-action="unbind" bindtap="handleUserAction">解绑当前店铺</view>
|
|
<view class="mini-btn danger" data-action="delete" bindtap="handleUserAction">删除账号</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view wx:if="{{asset}}" class="surface-card">
|
|
<text class="section-title">余额与 VIP</text>
|
|
<view class="meta-grid">
|
|
<view class="meta-item">
|
|
<text class="meta-label">当前余额</text>
|
|
<text class="meta-value">¥{{asset.balance}}</text>
|
|
</view>
|
|
<view class="meta-item">
|
|
<text class="meta-label">累计充值</text>
|
|
<text class="meta-value">¥{{asset.totalRechargeAmount}}</text>
|
|
</view>
|
|
<view class="meta-item">
|
|
<text class="meta-label">VIP 等级</text>
|
|
<text class="meta-value">{{asset.vipLevel || '普通'}}</text>
|
|
</view>
|
|
<view class="meta-item">
|
|
<text class="meta-label">人工覆盖</text>
|
|
<text class="meta-value">{{asset.manualOverride ? '是' : '否'}}</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="divider-line"></view>
|
|
|
|
<text class="section-title">余额调整</text>
|
|
<view class="field-group">
|
|
<text class="field-label">金额(可填负数)</text>
|
|
<input class="field-input" type="digit" value="{{balanceForm.amount}}" data-field="amount" bindinput="handleBalanceInput"></input>
|
|
</view>
|
|
<view class="field-group">
|
|
<text class="field-label">变动场景</text>
|
|
<picker mode="selector" range="{{['MANUAL_RECHARGE','MANUAL_INCREASE','MANUAL_DEDUCT']}}" value="{{changeSceneIndex}}" bindchange="handleSceneChange">
|
|
<view class="field-picker">{{['MANUAL_RECHARGE','MANUAL_INCREASE','MANUAL_DEDUCT'][changeSceneIndex]}}</view>
|
|
</picker>
|
|
</view>
|
|
<view class="field-group">
|
|
<text class="field-label">外部单号</text>
|
|
<input class="field-input" value="{{balanceForm.externalOrderNo}}" data-field="externalOrderNo" bindinput="handleBalanceInput"></input>
|
|
</view>
|
|
<view class="field-group">
|
|
<text class="field-label">备注</text>
|
|
<textarea class="field-textarea" value="{{balanceForm.remark}}" data-field="remark" bindinput="handleBalanceInput"></textarea>
|
|
</view>
|
|
<view class="action-row">
|
|
<button class="primary-btn" bindtap="handleBalanceChange">提交余额变动</button>
|
|
</view>
|
|
|
|
<view class="divider-line"></view>
|
|
|
|
<text class="section-title">VIP 管理</text>
|
|
<view class="field-group">
|
|
<text class="field-label">手工等级</text>
|
|
<picker mode="selector" range="{{['普通','青铜','白银','黄金']}}" value="{{vipLevelIndex}}" bindchange="handleVipLevelChange">
|
|
<view class="field-picker">{{['普通','青铜','白银','黄金'][vipLevelIndex]}}</view>
|
|
</picker>
|
|
</view>
|
|
<view class="field-group">
|
|
<text class="field-label">备注</text>
|
|
<textarea class="field-textarea" value="{{vipRemark}}" bindinput="handleVipRemarkInput"></textarea>
|
|
</view>
|
|
<view class="action-row">
|
|
<button class="secondary-btn" bindtap="handleVipOverride">手工覆盖 VIP</button>
|
|
<button class="primary-btn" bindtap="handleVipRecalculate">恢复自动判级</button>
|
|
</view>
|
|
</view>
|
|
|
|
<view wx:if="{{balanceHistory.length}}" class="surface-card">
|
|
<text class="section-title">余额流水</text>
|
|
<block wx:for="{{balanceHistory}}" wx:key="id">
|
|
<view class="list-card">
|
|
<view class="list-head">
|
|
<view>
|
|
<text class="list-title">{{item.changeScene || item.type || '余额变动'}}</text>
|
|
<text class="list-subtitle">{{item.remark || '无备注'}}</text>
|
|
</view>
|
|
<text class="{{item.amountBadgeClass}}">{{item.amount}}</text>
|
|
</view>
|
|
<view class="meta-grid">
|
|
<view class="meta-item">
|
|
<text class="meta-label">变动后余额</text>
|
|
<text class="meta-value">{{item.afterBalance || item.currentBalance || '--'}}</text>
|
|
</view>
|
|
<view class="meta-item">
|
|
<text class="meta-label">变动时间</text>
|
|
<text class="meta-value">{{item.displayChangeTime}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
</view>
|
|
</view>
|