forked from angelo/web-retail-h5
Compare commits
6 Commits
a0c6fc5418
...
0fa1d67333
| Author | SHA1 | Date |
|---|---|---|
|
|
0fa1d67333 | |
|
|
231767d4e0 | |
|
|
74d83bdc2f | |
|
|
d763431f5c | |
|
|
bf5e848095 | |
|
|
b6fa19b0de |
14
pages.json
14
pages.json
|
|
@ -123,13 +123,6 @@
|
|||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/bonus/menu",
|
||||
"style": {
|
||||
"navigationBarTitleText": "奖金查询",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/bonus/index",
|
||||
"style": {
|
||||
|
|
@ -138,13 +131,6 @@
|
|||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/bonus/real-time",
|
||||
"style": {
|
||||
"navigationBarTitleText": "实时奖金",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/bonusSource/index",
|
||||
"style": {
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ export default {
|
|||
BONUS_FIELD_MAP: {
|
||||
repurRangeIncome: '复购级差收益',
|
||||
retailRangeIncome: '直推级差收益',
|
||||
retailAreaIncome: '复购配送收益',
|
||||
},
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,84 +0,0 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view
|
||||
@click="goRouter(item.path)"
|
||||
class="kuaibox"
|
||||
v-for="(item, index) in selfServiceList"
|
||||
:key="index"
|
||||
>
|
||||
<view class="">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
<image class="kuaiimg" :src="item.url" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as sel from '@/config/selfService.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
...mapGetters(['user']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selfServiceList: [
|
||||
{
|
||||
name: '实时奖金',
|
||||
url: '../../static/images/bonus-record.svg',
|
||||
path: '/pages/bonus/real-time',
|
||||
},
|
||||
{
|
||||
name: '奖金明细',
|
||||
url: '../../static/images/mark2.png',
|
||||
path: '/pages/bonus/index',
|
||||
},
|
||||
],
|
||||
userInfo: '',
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.userInfo = uni.getStorageSync('User')
|
||||
},
|
||||
methods: {
|
||||
goRouter(path) {
|
||||
uni.navigateTo({
|
||||
url: path,
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
background-color: #f2f2f2;
|
||||
padding: 4rpx 21rpx 500rpx 21rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
|
||||
.kuaibox {
|
||||
width: 40%;
|
||||
// height: 150rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 60rpx 40rpx 60rpx 22rpx;
|
||||
margin: 13rpx 0rpx;
|
||||
background-color: #ffffff;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
|
||||
.kuaiimg {
|
||||
width: 52rpx;
|
||||
height: 53rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,212 +0,0 @@
|
|||
<template>
|
||||
<view class="container">
|
||||
<!-- 总览卡片 -->
|
||||
<view class="summary-card">
|
||||
<view class="summary-title-container">
|
||||
<view class="summary-icon"></view>
|
||||
<text class="summary-title">今日实发合计</text>
|
||||
</view>
|
||||
<view class="summary-amount">
|
||||
<text class="currency-symbol">¥</text>
|
||||
<text>{{ bonusData.realIncomeTotal || '0.00' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 奖金明细列表 -->
|
||||
<view class="details-card">
|
||||
<view class="detail-item">
|
||||
<text class="detail-label">奖金日期</text>
|
||||
<text class="detail-value date">{{
|
||||
bonusData.settleDate || formatDate
|
||||
}}</text>
|
||||
</view>
|
||||
<view v-for="(label, key) in detailLabels" :key="key" class="detail-item">
|
||||
<text class="detail-label">{{ label }}</text>
|
||||
<text class="detail-value">
|
||||
<text class="currency-symbol-small">¥</text>
|
||||
{{ bonusData[key] || '0.00' }}
|
||||
</text>
|
||||
</view>
|
||||
<!-- 分割线 -->
|
||||
<view class="divider"></view>
|
||||
<!-- 小计 -->
|
||||
<view class="detail-item total">
|
||||
<text class="detail-label total-label">小计(¥)</text>
|
||||
<text class="detail-value total-value">
|
||||
<text class="currency-symbol-small">¥</text>
|
||||
{{ bonusData.retailRealSubtotal || '0.00' }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { realTimeBonus } from '@/config/bonus.js'
|
||||
import dayjs from 'dayjs'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 使用截图中的数据作为示例
|
||||
bonusData: {
|
||||
totalIssued: 0,
|
||||
date: '',
|
||||
retailRangeIncome: 0,
|
||||
retailSameLevelIncome: 0.0,
|
||||
retailAreaIncome: 0.0,
|
||||
// welfareLevelDifferenceIncome: 0.0,
|
||||
// welfareDividendIncome: 0.0,
|
||||
backPoints: 0,
|
||||
subtotal: 0,
|
||||
},
|
||||
detailLabels: {
|
||||
retailRangeIncome: '直推收益(¥)',
|
||||
retailSameLevelIncome: '平级收益(¥)',
|
||||
retailAreaIncome: '区域收益(¥)',
|
||||
// welfareLevelDifferenceIncome: '福利级差收益(¥)',
|
||||
// welfareDividendIncome: '福利分红收益(¥)',
|
||||
backPoints: '重消收益(¥)',
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
this.getRealTimeBonus()
|
||||
},
|
||||
computed: {
|
||||
formatDate() {
|
||||
return dayjs(new Date()).format('YYYY-MM-DD')
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getRealTimeBonus() {
|
||||
realTimeBonus().then(res => {
|
||||
this.bonusData = res.rows?.[0] || {}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 主题色 */
|
||||
:root {
|
||||
--primary-color: #005bac;
|
||||
}
|
||||
|
||||
.container {
|
||||
background-color: #f7f8fa;
|
||||
min-height: 100vh;
|
||||
padding: 12px;
|
||||
box-sizing: border-box;
|
||||
font-family:
|
||||
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
|
||||
Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
}
|
||||
|
||||
.summary-card {
|
||||
background: linear-gradient(45deg, #005bac, #0077d9);
|
||||
color: #ffffff;
|
||||
padding: 24px;
|
||||
border-radius: 16px;
|
||||
margin-bottom: 16px;
|
||||
box-shadow: 0 8px 16px rgba(0, 91, 172, 0.2);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.summary-title-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.summary-icon {
|
||||
width: 4px;
|
||||
height: 16px;
|
||||
background-color: #fff;
|
||||
border-radius: 2px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.summary-title {
|
||||
font-size: 16px;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.summary-amount {
|
||||
font-size: 38px;
|
||||
font-weight: 700;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.currency-symbol {
|
||||
font-size: 22px;
|
||||
font-weight: 500;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.currency-symbol-small {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.details-card {
|
||||
background-color: #ffffff;
|
||||
padding: 8px 20px;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.detail-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 18px 0;
|
||||
}
|
||||
|
||||
.divider {
|
||||
height: 1px;
|
||||
background-color: #f2f2f2;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.detail-label {
|
||||
font-size: 15px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.detail-value {
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.detail-value.date {
|
||||
color: #999;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.total {
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.total-label {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.total-value {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.total-value .currency-symbol-small {
|
||||
color: var(--primary-color);
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -20,7 +20,7 @@ export default {
|
|||
if (!gradeValue) return
|
||||
this.gradeValue = gradeValue
|
||||
const params = {
|
||||
type: gradeValue === 80 ? 'city' : 'county',
|
||||
type: 'county',
|
||||
}
|
||||
getRegionAreaList(params).then(res => {
|
||||
this.provinceList = res.data.filter(item => item.parent === 0)
|
||||
|
|
@ -44,7 +44,6 @@ export default {
|
|||
)
|
||||
},
|
||||
getCityFilterList() {
|
||||
if (this.gradeValue === 80) return
|
||||
if (!this.countyList.length) {
|
||||
this.cityList = []
|
||||
}
|
||||
|
|
@ -53,7 +52,7 @@ export default {
|
|||
)
|
||||
},
|
||||
getCountyFilterList() {
|
||||
if (!this.gradeValue || this.gradeValue === 80) {
|
||||
if (!this.gradeValue) {
|
||||
this.countyList = []
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -97,16 +97,25 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 收益区域 -->
|
||||
<view class="my_order" v-if="regionInfoVisible">
|
||||
<view class="my_title">
|
||||
<text class="thetitle">收益区域</text>
|
||||
</view>
|
||||
<template
|
||||
v-if="
|
||||
regionInfo.provinceVal || regionInfo.cityVal || regionInfo.countyVal
|
||||
"
|
||||
<!-- 区域信息Tab -->
|
||||
<view class="my_order" v-if="showRegionTabs">
|
||||
<u-tabs
|
||||
:list="regionTabList"
|
||||
@change="onRegionTabChange"
|
||||
:current="currentRegionTab"
|
||||
:activeColor="'#005BAC'"
|
||||
:inactiveColor="'#999999'"
|
||||
:lineWidth="30"
|
||||
:lineHeight="4"
|
||||
:lineColor="'#005BAC'"
|
||||
:itemStyle="'padding: 15rpx 25rpx; font-size: 20rpx;'"
|
||||
>
|
||||
</u-tabs>
|
||||
|
||||
<!-- Tab内容区域 -->
|
||||
<view class="tab-content">
|
||||
<!-- 已选区域内容 -->
|
||||
<view v-if="currentRegionTab === 0 && hasRegionData">
|
||||
<view class="region-info-box">
|
||||
<view class="region-info-item">
|
||||
<text class="region-info-label">{{ '省' }}</text>
|
||||
|
|
@ -127,19 +136,40 @@
|
|||
}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="region-select-action">
|
||||
<u-button
|
||||
@click="openRegionSelect"
|
||||
color="#005BAC"
|
||||
shape="circle"
|
||||
text="选择区域"
|
||||
></u-button>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<!-- 配送中心内容 -->
|
||||
<view v-if="currentRegionTab === 1 && hasDistributionData">
|
||||
<view class="region-info-box">
|
||||
<view class="region-info-item">
|
||||
<text class="region-info-label">{{ '省' }}</text>
|
||||
<text class="region-info-value">{{
|
||||
dstributionCenter.provinceVal || '-'
|
||||
}}</text>
|
||||
</view>
|
||||
<view class="region-info-item">
|
||||
<text class="region-info-label">{{ '市' }}</text>
|
||||
<text class="region-info-value">{{
|
||||
dstributionCenter.cityVal || '-'
|
||||
}}</text>
|
||||
</view>
|
||||
<view class="region-info-item">
|
||||
<text class="region-info-label">{{ '区' }}</text>
|
||||
<text class="region-info-value">{{
|
||||
dstributionCenter.countyVal || '-'
|
||||
}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 配送中心无数据状态 -->
|
||||
<view v-if="currentRegionTab === 1 && !hasDistributionData">
|
||||
<view class="empty-state">
|
||||
<text class="empty-text">暂无配送中心信息</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="my_order">
|
||||
<view class="order_flex">
|
||||
<template v-for="(item, index) in otherMenuList">
|
||||
|
|
@ -362,6 +392,7 @@ export default {
|
|||
ifSpecial: false,
|
||||
awardsList: '',
|
||||
regionInfo: {},
|
||||
dstributionCenter: {},
|
||||
smallAreaBox: 0,
|
||||
totalBox: 0,
|
||||
// performanceData: {},
|
||||
|
|
@ -369,6 +400,7 @@ export default {
|
|||
totalSumPv: 0,
|
||||
smallAreaPv: 0,
|
||||
isNormal: false,
|
||||
currentRegionTab: 0, // 当前选中的tab索引
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
|
@ -378,7 +410,7 @@ export default {
|
|||
return
|
||||
}
|
||||
this.isNormal = isNormal
|
||||
// this.getRegionSelect()
|
||||
this.getRegionSelect()
|
||||
this.getMemberBoxCount()
|
||||
this.getMarketDynamicBoxCount()
|
||||
// this.getUserAwardss()
|
||||
|
|
@ -428,8 +460,8 @@ export default {
|
|||
marketWrapperVisible() {
|
||||
return this.userInfo.memberSign !== MEMBER_SIGN.ZERO_LEVEL
|
||||
},
|
||||
regionInfoVisible() {
|
||||
return this.regionInfo?.regionStatus === 0
|
||||
dstributionCenterVisible() {
|
||||
return !!this.dstributionCenter
|
||||
},
|
||||
formattedTotalSumPv() {
|
||||
const value = String(this.totalSumPv || '0.00')
|
||||
|
|
@ -463,9 +495,54 @@ export default {
|
|||
decimal: parts.length > 1 ? `.${parts[1]}` : '',
|
||||
}
|
||||
},
|
||||
// 是否有已选区域数据
|
||||
hasRegionData() {
|
||||
return !!(
|
||||
this.regionInfo &&
|
||||
(this.regionInfo.provinceVal ||
|
||||
this.regionInfo.cityVal ||
|
||||
this.regionInfo.countyVal)
|
||||
)
|
||||
},
|
||||
// 是否有配送中心数据
|
||||
hasDistributionData() {
|
||||
return !!(
|
||||
this.dstributionCenter &&
|
||||
(this.dstributionCenter.provinceVal ||
|
||||
this.dstributionCenter.cityVal ||
|
||||
this.dstributionCenter.countyVal)
|
||||
)
|
||||
},
|
||||
showRegionTabs() {
|
||||
return !!(
|
||||
(this.regionInfo && Object.keys(this.regionInfo).length) ||
|
||||
(this.dstributionCenter && Object.keys(this.dstributionCenter).length)
|
||||
)
|
||||
},
|
||||
regionTabList() {
|
||||
const tabs = []
|
||||
|
||||
if (this.regionInfo) {
|
||||
tabs.push({
|
||||
name: '已选区域',
|
||||
})
|
||||
}
|
||||
|
||||
if (this.dstributionCenter) {
|
||||
tabs.push({
|
||||
name: '配送中心',
|
||||
})
|
||||
}
|
||||
|
||||
return tabs
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
// Tab切换事件
|
||||
onRegionTabChange({ index }) {
|
||||
this.currentRegionTab = index
|
||||
},
|
||||
getRegionSelect() {
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
|
|
@ -473,7 +550,12 @@ export default {
|
|||
getRegionSelect()
|
||||
.then(res => {
|
||||
if (res.code == 200) {
|
||||
this.regionInfo = res.data
|
||||
this.regionInfo = (res.data || []).filter(
|
||||
item => item.businessType === 1
|
||||
)?.[0]
|
||||
this.dstributionCenter = (res.data || []).filter(
|
||||
item => item.businessType === 2
|
||||
)?.[0]
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
|
|
@ -1347,7 +1429,25 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
/* Tab相关样式 */
|
||||
.tab-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
padding: 60rpx 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.region-select-action {
|
||||
padding: 30rpx 20rpx;
|
||||
}
|
||||
::v-deep .u-tabs__wrapper__nav__item__text {
|
||||
font-size: 26rpx !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
/>
|
||||
</u-form-item>
|
||||
<u-form-item
|
||||
v-if="[60, 70, 80].includes(gradeValue) && provinceList.length"
|
||||
v-if="[80].includes(gradeValue) && provinceList.length"
|
||||
@click="regionSelectHandle"
|
||||
required
|
||||
label="会员区域"
|
||||
|
|
@ -827,7 +827,7 @@ export default {
|
|||
if (res.code == 200) {
|
||||
if (res.data.isEnough) {
|
||||
this.form.pkGradeVal = res.data.pkGradeVal
|
||||
if ([60, 70, 80].includes(res.data.gradeValue)) {
|
||||
if ([80].includes(res.data.gradeValue)) {
|
||||
this.gradeValue = res.data.gradeValue
|
||||
this.getRegionAreaList(res.data.gradeValue)
|
||||
}
|
||||
|
|
@ -1188,7 +1188,7 @@ export default {
|
|||
},
|
||||
goBuy() {
|
||||
const extParams = {}
|
||||
if ([60, 70, 80].includes(this.gradeValue) && this.provinceList.length) {
|
||||
if ([80].includes(this.gradeValue) && this.provinceList.length) {
|
||||
if (!this.regionAddress.length) {
|
||||
uni.showToast({
|
||||
title: '请选择会员区域',
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
>
|
||||
<u--input
|
||||
:placeholder="'请输入'"
|
||||
disabled
|
||||
v-model="dataForm.accountName"
|
||||
></u--input>
|
||||
</u-form-item>
|
||||
|
|
@ -54,7 +55,11 @@
|
|||
prop="sex"
|
||||
ref="item1"
|
||||
>
|
||||
<u-radio-group v-model="dataForm.sex" @change="radioGroupChange">
|
||||
<u-radio-group
|
||||
disabled
|
||||
v-model="dataForm.sex"
|
||||
@change="radioGroupChange"
|
||||
>
|
||||
<u-radio
|
||||
:customStyle="{ marginRight: '16rpx' }"
|
||||
v-for="(item, index) in sexList"
|
||||
|
|
@ -75,7 +80,6 @@
|
|||
>
|
||||
<u--input
|
||||
suffixIcon="arrow-right"
|
||||
readonly
|
||||
v-model="dataForm.idName"
|
||||
disabled
|
||||
:placeholder="'请选择'"
|
||||
|
|
@ -91,10 +95,11 @@
|
|||
>
|
||||
<u--input
|
||||
:placeholder="'请输入'"
|
||||
disabled
|
||||
v-model="dataForm.idCard"
|
||||
></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item
|
||||
<!-- <u-form-item
|
||||
required
|
||||
label-width="180rpx"
|
||||
:label="'银行名称'"
|
||||
|
|
@ -137,8 +142,8 @@
|
|||
v-model="dataForm.subBankName"
|
||||
disabledColor="#F5F5F5;"
|
||||
></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item
|
||||
</u-form-item> -->
|
||||
<!-- <u-form-item
|
||||
required
|
||||
@click="getDiqu"
|
||||
:label="'所在地区'"
|
||||
|
|
@ -153,7 +158,7 @@
|
|||
:placeholder="'请选择'"
|
||||
>
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
</u-form-item> -->
|
||||
|
||||
<view class="view-class">
|
||||
<u-form-item
|
||||
|
|
@ -165,6 +170,7 @@
|
|||
>
|
||||
<u-textarea
|
||||
v-model="dataForm.address"
|
||||
disabled
|
||||
placeholder-class="place-class"
|
||||
class="border-color"
|
||||
maxlength="200"
|
||||
|
|
@ -285,10 +291,10 @@ export default {
|
|||
showAmount: false,
|
||||
showCtype: false,
|
||||
dataForm: {
|
||||
bankName: '',
|
||||
cardNumber: '',
|
||||
pkBank: '',
|
||||
subBankName: '',
|
||||
// bankName: '',
|
||||
// cardNumber: '',
|
||||
// pkBank: '',
|
||||
// subBankName: '',
|
||||
accountName: '',
|
||||
idCard: '',
|
||||
pkProvince: '',
|
||||
|
|
@ -457,6 +463,7 @@ export default {
|
|||
this.$set(this.dataForm, 'accountName', res.data.name)
|
||||
this.$set(this.dataForm, 'idCard', res.data.idCard)
|
||||
this.$set(this.dataForm, 'sex', res.data.sex)
|
||||
this.$set(this.dataForm, 'address', res.data.address)
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.uploadImg1.deletePic({ index: 0 })
|
||||
|
|
@ -486,10 +493,13 @@ export default {
|
|||
}
|
||||
},
|
||||
imageUploaded1(url) {
|
||||
if (!url) return
|
||||
this.dataForm.idFront = url
|
||||
this.getIdCardInfo(url)
|
||||
},
|
||||
imageUploaded2(url) {
|
||||
this.dataForm.idBack = url
|
||||
this.idBackChange(url)
|
||||
},
|
||||
// radio选择发生变化
|
||||
radioGroupChange(e) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
/>
|
||||
</u-form-item>
|
||||
<u-form-item
|
||||
v-if="[60, 70, 80].includes(gradeValue) && provinceList.length"
|
||||
v-if="[80].includes(gradeValue) && provinceList.length"
|
||||
@click="regionSelectHandle"
|
||||
required
|
||||
label="会员区域"
|
||||
|
|
@ -719,7 +719,7 @@ export default {
|
|||
console.log(res.data, 'res.data.memLevel')
|
||||
if (res.data.isEnough) {
|
||||
this.form.pkGradeVal = res.data.pkGradeVal
|
||||
if ([60, 70, 80].includes(res.data.gradeValue)) {
|
||||
if ([80].includes(res.data.gradeValue)) {
|
||||
this.gradeValue = res.data.gradeValue
|
||||
this.getRegionAreaList(res.data.gradeValue)
|
||||
}
|
||||
|
|
@ -1005,7 +1005,7 @@ export default {
|
|||
},
|
||||
goBuy() {
|
||||
const extParams = {}
|
||||
if ([60, 70, 80].includes(this.gradeValue) && this.provinceList?.length) {
|
||||
if ([80].includes(this.gradeValue) && this.provinceList?.length) {
|
||||
if (!this.regionAddress.length) {
|
||||
uni.showToast({
|
||||
title: '请选择会员区域',
|
||||
|
|
|
|||
|
|
@ -1,30 +1,34 @@
|
|||
import store from '@/store'
|
||||
let userInfo = uni.getStorageSync('User')
|
||||
export function stateFormat(row, column, cellValue) {
|
||||
if (cellValue) {
|
||||
return Number(cellValue)
|
||||
.toFixed(2)
|
||||
.replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => {
|
||||
|
||||
return $1 + ',';
|
||||
return $1 + ','
|
||||
})
|
||||
|
||||
.replace(/\.$/, "");
|
||||
.replace(/\.$/, '')
|
||||
}
|
||||
}
|
||||
//element 转成千分位并保留小数
|
||||
//decimal 默认保留2位小数
|
||||
export function toThousandthAndKeepDecimal(element, decimal = 2) {
|
||||
if (!element || element === '') {//值不存在 或为空
|
||||
if (!element || element === '') {
|
||||
//值不存在 或为空
|
||||
return ''
|
||||
} else if (typeof element == 'string') {
|
||||
return Number(element).toLocaleString(undefined, { minimumFractionDigits: decimal, maximumFractionDigits: decimal });
|
||||
return Number(element).toLocaleString(undefined, {
|
||||
minimumFractionDigits: decimal,
|
||||
maximumFractionDigits: decimal,
|
||||
})
|
||||
} else if (typeof element == 'number') {
|
||||
return element.toLocaleString(undefined, { minimumFractionDigits: decimal, maximumFractionDigits: decimal });
|
||||
return element.toLocaleString(undefined, {
|
||||
minimumFractionDigits: decimal,
|
||||
maximumFractionDigits: decimal,
|
||||
})
|
||||
} else {
|
||||
return element;
|
||||
return element
|
||||
}
|
||||
|
||||
}
|
||||
// 千分号
|
||||
export function numberToCurrencyNo(value) {
|
||||
|
|
@ -36,14 +40,17 @@ export function numberToCurrencyNo(value) {
|
|||
// 获取整数部分
|
||||
const intPart = Math.trunc(value)
|
||||
// 整数部分处理,增加,
|
||||
const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
|
||||
const intPartFormat = intPart
|
||||
.toString()
|
||||
.replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
|
||||
// 预定义小数部分
|
||||
let floatPart = ''
|
||||
// 将数值截取为小数部分和整数部分
|
||||
const valueArray = value.toString().split('.')
|
||||
if (valueArray.length === 2) { // 有小数部分
|
||||
if (valueArray.length === 2) {
|
||||
// 有小数部分
|
||||
floatPart = valueArray[1].toString() // 取得小数部分
|
||||
if(floatPart.length == 1){
|
||||
if (floatPart.length == 1) {
|
||||
floatPart = floatPart + '0'
|
||||
}
|
||||
return intPartFormat + '.' + floatPart
|
||||
|
|
@ -62,9 +69,9 @@ export function numberToCurrencyNo(value) {
|
|||
// }
|
||||
// 添加当地币
|
||||
export function isLocal(value) {
|
||||
return (store.getters.user.currencyIcon + value) || (userInfo.currencyIcon + value)
|
||||
return '¥' + value
|
||||
}
|
||||
// 添加当地币
|
||||
export function isLocaled(value) {
|
||||
return store.getters.user.currencyIcon || userInfo.currencyIcon
|
||||
return '¥'
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue