|
|
@@ -1,20 +1,34 @@
|
|
|
<template>
|
|
|
<div v-loading="loading">
|
|
|
<div class="white-box" style="padding: 0 25px; margin-top: 25px;">
|
|
|
+<!-- <div class="noList">-->
|
|
|
+<!-- <el-select ref="select" @change="countriesChange" v-model="countries" filterable placeholder="">-->
|
|
|
+<!-- <el-option v-for="(item, index) in countriesList" :key="item.ID" :label="item.NAME" :value="item.ID" />-->
|
|
|
+<!-- </el-select>-->
|
|
|
+<!-- </div>-->
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :xs="24" :sm="24" :lg="14">
|
|
|
- <el-form ref="form" label-width="180px" :label-position="labelPosition" class="form-page">
|
|
|
-
|
|
|
- <el-form-item :label="$t('user.welcomePackWay')">
|
|
|
- <el-radio-group v-model="form.decType" @change="decTypeChange">
|
|
|
- <el-radio size="small" label="normal">{{ $t('user.normal') }}</el-radio>
|
|
|
- <!-- <el-radio size="small" label="ba">{{ $t('user.BAUpgrade') }}</el-radio>-->
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-form ref="form" label-width="180px" :label-position="labelPosition" class="form-page">
|
|
|
+<!-- <el-form-item :label="$t('user.welcomePackWay')">-->
|
|
|
+<!-- <el-radio-group v-model="form.decType" @change="decTypeChange">-->
|
|
|
+<!-- <el-radio size="small" label="normal">{{ $t('user.normal') }}</el-radio>-->
|
|
|
+<!-- <!– <el-radio size="small" label="ba">{{ $t('user.BAUpgrade') }}</el-radio>–>-->
|
|
|
+<!-- </el-radio-group>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
<el-divider content-position="left">{{ $t('user.accountInformation') }}</el-divider>
|
|
|
+ <el-form-item :label="$t('shop.country')">
|
|
|
+ <el-select ref="select" @change="countriesChange" v-model="form.countryId" filterable :placeholder="$t('user.selectCountry')" style="width: 100%;">
|
|
|
+ <el-option v-for="(item, index) in countriesList" :key="item.ID" :label="item.NAME" :value="item.ID" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="$t('common.language')">
|
|
|
+ <el-select ref="select" v-model="form.languageId" filterable :placeholder="$t('user.selectLanguage')" style="width: 100%;">
|
|
|
+ <el-option v-for="(item, index) in languageList" :key="item.ID" :label="item.NAME" :value="item.ID" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item :label="$t('user.newMemberCode')">
|
|
|
- <el-input v-model="form.insertUserName" :readonly="userReadOnly" @blur="checkBaUser" />
|
|
|
+ <el-input v-model="form.insertUserName" :readonly="userReadOnly" @blur="checkBaUser" :placeholder="$t('user.enterMemberCode')" />
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="$t('user.entryLevel')">
|
|
|
<el-select v-model="form.decLv" :placeholder="$t('user.selectEntryLevel')" style="width: 100%;">
|
|
|
@@ -22,7 +36,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="$t('user.stockistCode')">
|
|
|
- <el-input v-model="form.decUserName" :disabled="isDec == 1"/>
|
|
|
+ <el-input v-model="form.decUserName" :disabled="isDec == 1" />
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
|
|
@@ -45,8 +59,10 @@
|
|
|
<div style="text-align: left; line-height: 25px;">
|
|
|
<span style="font-weight: bold; cursor: pointer;" @click="handleProduct(row)">{{ row.GOODS_NAME }}</span><br>
|
|
|
<span>{{ row.GOODS_NO }}</span><br>
|
|
|
- <span style="color: tomato;">{{ $t('shop.productPrice') }}:{{ $t('currency.sign') }} {{ row.SELL_PRICE | toThousandFilter }}</span><br>
|
|
|
+ <span style="color: tomato;">{{ $t('shop.salesPrice') }}:{{row.CODE}} {{ row.SELL_PRICE | toThousandFilter }}</span><br>
|
|
|
<span>{{ $t('shop.productBV') }}:{{ row.PRICE_PV | toThousandFilter }}</span><br>
|
|
|
+ <span>{{ $t('shop.marketPrice') }}:{{row.CODE}} {{ row.MARKET_PRICE | toThousandFilter }}</span><br>
|
|
|
+
|
|
|
<span style="display: inline-block; float: right; ">
|
|
|
<el-input-number v-model="storeNums[$index]" size="mini" :min="1" :max="Number(row.STORE_NUMS)" @change="handleInputNumber($event, row)" />
|
|
|
</span>
|
|
|
@@ -62,9 +78,9 @@
|
|
|
|
|
|
<div class="white-box-footer">
|
|
|
<div class="flex data" style="float: right; display: inline-block; line-height: 30px; font-size: 14px; margin-top: 15px; margin-bottom: 10px; border: 1px solid #dcdfe6; border-radius: 4px; padding: 0 5px;">
|
|
|
- <div style="margin-right: 1rem; display: inline-block;">{{ $t('shop.productPrice') }}:{{ $t('currency.sign') }} {{ sellPriceSum | toThousandFilter }}</div>
|
|
|
+ <div style="margin-right: 1rem; display: inline-block;">{{ $t('shop.productPrice') }}: {{currencyUnitCode}} {{ sellPriceSum | toThousandFilter }}</div>
|
|
|
<div style="margin-right: 1rem; display: inline-block;">{{ $t('shop.productBV') }}:{{ pricePvSum | toThousandFilter }}</div>
|
|
|
- <div style="display: inline-block;">{{ $t('shop.taxAmount') }}:{{ $t('currency.sign') }} {{ taxSum }}</div>
|
|
|
+ <div style="display: inline-block;">{{ $t('shop.taxAmount') }}:{{currencyUnitCode}} {{ taxSum }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
@@ -72,41 +88,39 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-divider content-position="left">{{ $t('atlas.networkInformation') }}</el-divider>
|
|
|
- <el-form-item :label="$t('shop.sponsorCode')">
|
|
|
+ <el-form-item :label="$t('user.recommenderName')">
|
|
|
<el-input v-model="form.recUserName" :readonly="recReadOnly" @change="handleChkRecUser" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-input v-model="recRealName" :disabled="true" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item :label="$t('atlas.placementCode')">
|
|
|
- <el-input v-model="form.conUserName" @change="handleChkConUser" />
|
|
|
+ <el-form-item :label="$t('user.recommenderActualName')">
|
|
|
+ <el-input v-model="form.conUserName" @change="handleChkRecommenderActualName" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-input v-model="conRealName" type="textarea" :rows="2" :disabled="true" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item :label="$t('atlas.placementTree')">
|
|
|
- <el-radio-group v-model="form.location" border>
|
|
|
- <el-radio :label="1">{{ $t('atlas.left') }}</el-radio>
|
|
|
- <el-radio :label="2">{{ $t('atlas.right') }}</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item><!--自动安置区位-->
|
|
|
- <el-row :gutter="5">
|
|
|
- <el-col :xs="24" :sm="12" :lg="12">
|
|
|
- <el-button size="small" type="primary" @click="setAutoPlace('left')">{{ $t('atlas.placementAutoLeft') }}</el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="12">
|
|
|
- <el-button size="small" type="primary" @click="setAutoPlace('right')">{{ $t('atlas.placementAutoRight') }}</el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form-item>
|
|
|
+<!-- <el-form-item :label="$t('atlas.placementTree')">-->
|
|
|
+<!-- <el-radio-group v-model="form.location" border>-->
|
|
|
+<!-- <el-radio :label="1">{{ $t('atlas.left') }}</el-radio>-->
|
|
|
+<!-- <el-radio :label="2">{{ $t('atlas.right') }}</el-radio>-->
|
|
|
+<!-- </el-radio-group>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- <el-form-item><!–自动安置区位–>-->
|
|
|
+<!-- <el-row :gutter="5">-->
|
|
|
+<!-- <el-col :xs="24" :sm="12" :lg="12">-->
|
|
|
+<!-- <el-button size="small" type="primary" @click="setAutoPlace('left')">{{ $t('atlas.placementAutoLeft') }}</el-button>-->
|
|
|
+<!-- </el-col>-->
|
|
|
+<!-- <el-col :xs="24" :sm="12" :lg="12">-->
|
|
|
+<!-- <el-button size="small" type="primary" @click="setAutoPlace('right')">{{ $t('atlas.placementAutoRight') }}</el-button>-->
|
|
|
+<!-- </el-col>-->
|
|
|
+<!-- </el-row>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
|
|
|
<el-divider content-position="left">{{ $t('profile.personalInformation') }}</el-divider>
|
|
|
<el-form-item :label="$t('shop.memberName')">
|
|
|
<el-input v-model="form.realName" />
|
|
|
</el-form-item>
|
|
|
-
|
|
|
-
|
|
|
<el-form-item :label="$t('shop.phoneNumber')">
|
|
|
<el-input v-model="form.mobile" />
|
|
|
</el-form-item>
|
|
|
@@ -161,7 +175,7 @@
|
|
|
<el-form-item :label="$t('shop.paymentMethod')" required>
|
|
|
<el-radio-group v-model="form.payType" @change="chosePayType">
|
|
|
<el-radio v-for="(item, index) in payList" :key="index" border :label="item.label" style="margin: 5px;">
|
|
|
- {{ item.name }}<span v-if="item.label === 'cash'" style="color: tomato;">({{ $t('currency.sign') }} {{ userBalance.cash }})</span>
|
|
|
+ {{ item.name }}<span v-if="item.label === 'cash'" style="color: tomato;">( {{currencyUnitCode}} {{ userBalance.cash }})</span>
|
|
|
</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
@@ -225,10 +239,11 @@
|
|
|
<div style="text-align: left; line-height: 50px; font-size: 16px;">
|
|
|
<span style="font-weight: bold; font-size: 20px;">{{ product.GOODS_NAME }}</span><br>
|
|
|
<span style="font-weight: bold; font-size: 15px;">{{ $t('shop.productCode') }}:{{ product.GOODS_NO }}</span><br>
|
|
|
- <span style="color: tomato;">{{ $t('shop.productPrice') }}:{{ $t('currency.sign') }} {{ product.SELL_PRICE }}</span><br>
|
|
|
+ <span style="color: tomato;">{{ $t('shop.salesPrice') }}:{{currencyUnitCode}} {{ product.SELL_PRICE }}</span><br>
|
|
|
+ <span>{{ $t('shop.marketPrice') }}:{{currencyUnitCode}} {{ product.MARKET_PRICE }}</span><br>
|
|
|
<span>{{ $t('shop.productBV') }}:{{ product.PRICE_PV }}</span><br>
|
|
|
<span>{{ $t('shop.taxRate') }}:{{ product.TAX_RATE / 100 }}</span><br>
|
|
|
- <span>{{ $t('shop.taxAmount') }}:{{ $t('currency.sign') }} {{ product.taxAmount }}</span><br>
|
|
|
+ <span>{{ $t('shop.taxAmount') }}:{{currencyUnitCode}} {{ product.taxAmount }}</span><br>
|
|
|
<span>{{ $t('shop.inventory') }}:{{ product.STORE_NUMS }}</span>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
@@ -239,7 +254,14 @@
|
|
|
|
|
|
<script>
|
|
|
import { deleteApproachOrder } from '@/api/shop'
|
|
|
-import { createWelcomePack, fetchAutoPlace, fetchBrandAmbassadorInfo, fetchFullInfo, fetchWelcomePack } from '@/api/user'
|
|
|
+import {
|
|
|
+ createWelcomePack,
|
|
|
+ fetchAutoPlace,
|
|
|
+ fetchBrandAmbassadorInfo,
|
|
|
+ fetchFullInfo,
|
|
|
+ fetchInspectNetwork,
|
|
|
+ fetchWelcomePack
|
|
|
+} from '@/api/user'
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
import waves from '@/directive/waves'
|
|
|
import region from '@/store/modules/region'
|
|
|
@@ -272,6 +294,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ isChooseCountry: false,
|
|
|
loading: false,
|
|
|
tool: tool,
|
|
|
|
|
|
@@ -280,7 +303,7 @@ export default {
|
|
|
categoryType: '',
|
|
|
sellType: [],
|
|
|
payList: [],
|
|
|
- screenWidth: getScreenWidth() > 600 ? '500px' : getScreenWidth() + 'px',
|
|
|
+ screenWidth: getScreenWidth() > 600 ? '50%' : getScreenWidth() + 'px',
|
|
|
labelPosition: getScreenWidth() > 600 ? 'right' : 'top',
|
|
|
payStackScreenWidth: getScreenWidth() > 500 ? '450px' : getScreenWidth() + 'px',
|
|
|
|
|
|
@@ -358,10 +381,10 @@ export default {
|
|
|
TAX_RATE: 0,
|
|
|
taxAmount: 0
|
|
|
},
|
|
|
- imageStyle: 'margin-top: -50px;',
|
|
|
+ imageStyle: 'margin-top: 0px;',
|
|
|
|
|
|
decWay: '2',
|
|
|
- regionData: region.regionInfo.regionData,
|
|
|
+ regionData: [],
|
|
|
form: {
|
|
|
decType: 'normal',
|
|
|
realName: '',
|
|
|
@@ -405,11 +428,14 @@ export default {
|
|
|
|
|
|
userReadOnly: true,
|
|
|
recReadOnly: false,
|
|
|
- allDecLevel: usersInfo.getBaseInfo().decLevels,
|
|
|
+ allDecLevel: [],
|
|
|
allOpenBank: [],
|
|
|
|
|
|
activeName: 'product',
|
|
|
- isDec:null
|
|
|
+ isDec:null,
|
|
|
+
|
|
|
+ countries: null,
|
|
|
+ currencyUnitCode: ""
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -421,7 +447,16 @@ export default {
|
|
|
text += possible.charAt(Math.floor(Math.random() * possible.length))
|
|
|
}
|
|
|
return text
|
|
|
- }
|
|
|
+ },
|
|
|
+ countriesList() {
|
|
|
+ return this.$store.getters.getCountriesList
|
|
|
+ },
|
|
|
+ languageList() {
|
|
|
+ return this.$store.getters.languageList
|
|
|
+ },
|
|
|
+ language() {
|
|
|
+ return this.$store.getters.language
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
isDec: {
|
|
|
@@ -431,25 +466,39 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
}
|
|
|
- },
|
|
|
+ },
|
|
|
created() {
|
|
|
const regionInfo = this.$store.getters.regionInfo
|
|
|
// console.log(this.$store.state.region)
|
|
|
- this.fetchWelcomePack()
|
|
|
+ // this.fetchWelcomePack()
|
|
|
+ this.getCountries()
|
|
|
},
|
|
|
methods: {
|
|
|
+
|
|
|
+ countriesChange(e){
|
|
|
+ this.fetchWelcomePack()
|
|
|
+ },
|
|
|
+ //国家列表
|
|
|
+ getCountries() {
|
|
|
+ this.$store.dispatch('settings/getCountries')
|
|
|
+ },
|
|
|
// 会员报单/BA升级
|
|
|
fetchWelcomePack() {
|
|
|
this.loading = true
|
|
|
- fetchWelcomePack().then(response => {
|
|
|
+ fetchWelcomePack({countryId: this.form.countryId}).then(response => {
|
|
|
this.form.insertUserName = response.data.userName
|
|
|
this.allOpenBank = response.data.allOpenBank
|
|
|
this.allDecPackage = response.data.allDecPackage
|
|
|
this.allGoods = response.data.allGoods
|
|
|
this.userBalance = response.data.userBalance
|
|
|
+ this.regionData = response.data.region
|
|
|
+ this.allDecLevel = response.data.decLevel
|
|
|
this.categoryType = 1
|
|
|
- //是否是报单中心
|
|
|
- this.isDec = response.data.isDec
|
|
|
+ if(response.data.allGoods && response.data.allGoods.length > 0){
|
|
|
+ this.currencyUnitCode = response.data.allGoods[0].CODE
|
|
|
+ }
|
|
|
+ //是否是报单中心
|
|
|
+ this.isDec = response.data.isDec
|
|
|
const settingObj = this.allGoods
|
|
|
for (const i in this.allGoods) {
|
|
|
this.storeNums[i] = 1
|
|
|
@@ -478,12 +527,15 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
this.loading = false
|
|
|
}, 0.5 * 1000)
|
|
|
+ }).catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ this.loading = false
|
|
|
})
|
|
|
},
|
|
|
// 商品详情
|
|
|
handleProduct(row) {
|
|
|
this.product = row
|
|
|
- this.product.taxAmount = tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
|
|
|
+ this.product.taxAmount = tool.calculateTax(row.MARKET_PRICE, row.TAX_RATE)
|
|
|
this.visibleProduct = true
|
|
|
},
|
|
|
// 选择商品计数
|
|
|
@@ -507,9 +559,9 @@ export default {
|
|
|
if (this.multipleSelection.length > 0) {
|
|
|
let accumulatorSellPrice = 0; let accumulatorPricePv = 0; let accumulatorTax = 0
|
|
|
this.multipleSelection.forEach(accumulator => {
|
|
|
- accumulatorSellPrice += accumulator.SELL_PRICE * accumulator.goodsNum
|
|
|
+ accumulatorSellPrice += accumulator.MARKET_PRICE * accumulator.goodsNum
|
|
|
accumulatorPricePv += Number(accumulator.PRICE_PV) * Number(accumulator.goodsNum)
|
|
|
- accumulatorTax += tool.calculateTax(Number(accumulator.SELL_PRICE), Number(accumulator.TAX_RATE), Number(accumulator.goodsNum))
|
|
|
+ accumulatorTax += tool.calculateTax(Number(accumulator.MARKET_PRICE), Number(accumulator.TAX_RATE), Number(accumulator.goodsNum))
|
|
|
})
|
|
|
|
|
|
this.sellPriceSum = tool.formatPrice(accumulatorSellPrice)
|
|
|
@@ -680,9 +732,11 @@ export default {
|
|
|
packageId: this.form.packageId,
|
|
|
goodsId: this.form.goodsId,
|
|
|
goodsNum: this.form.goodsNum,
|
|
|
- location: this.form.location,
|
|
|
+ location: 1, //自动安置
|
|
|
decWay: this.decWay,
|
|
|
- payType: this.form.payType
|
|
|
+ payType: this.form.payType,
|
|
|
+ countryId: this.form.countryId,
|
|
|
+ languageId: this.form.languageId
|
|
|
}
|
|
|
createWelcomePack(params).then(response => {
|
|
|
if (this.form.payType !== 'pay_stack') {
|
|
|
@@ -721,7 +775,7 @@ export default {
|
|
|
this.multipleSelection.map((item) => {
|
|
|
this.form.goodsId.push(item.ID)
|
|
|
this.form.goodsNum.push(item.goodsNum)
|
|
|
- this.payAmount += item.goodsNum * item.SELL_PRICE
|
|
|
+ this.payAmount += item.goodsNum * item.MARKET_PRICE
|
|
|
})
|
|
|
},
|
|
|
// 报单方式
|
|
|
@@ -765,6 +819,19 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ // 查询安置人
|
|
|
+ handleChkRecommenderActualName() {
|
|
|
+ if (this.form.conUserName) {
|
|
|
+ this.loading = true
|
|
|
+ fetchInspectNetwork({ recommenderName: this.form.recUserName, recommenderActualName: this.form.conUserName }).then(response => {
|
|
|
+ this.conRealName = response.data.REAL_NAME
|
|
|
+ this.loading = false
|
|
|
+ }).catch(() => {
|
|
|
+ this.conRealName = '-'
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
// 自动设置区位
|
|
|
setAutoPlace(side) {
|
|
|
if (this.recRealName !== '-') {
|
|
|
@@ -807,4 +874,7 @@ export default {
|
|
|
.el-radio--medium.is-bordered {
|
|
|
margin: 5px 0;
|
|
|
}
|
|
|
+.noList{
|
|
|
+ margin: 10px 0;
|
|
|
+}
|
|
|
</style>
|