Jelajahi Sumber

feat: EK-879: 【AE】管理员增加“Country”属性,根据所选国家限制登录后所显示的奖金、余额等数据(二期).

kevinElken 9 bulan lalu
induk
melakukan
b993bb996d

+ 10 - 22
.env.development

@@ -1,24 +1,15 @@
+NODE_ENV=production
+
 # just a flag
-ENV='development'
+ENV='staging'
 
-# # api请求地址
-# VUE_APP_BASE_API='http://172.17.133.86:9970'
-# # 文件下载地址
-# VUE_APP_BASE_DO_API='http://local.ng.backend.api.com'
-# # CDN文件地址
-# VUE_APP_CDN_API='http://172.17.133.86:9970'
-# # 页面地址
-# VUE_APP_BASE_WEBSITE='http://local.ng.backend.ele.com'
-# # 会员端地址
-# VUE_APP_FRONTEND_WEBSITE='http://local.ng.frontend.ele.com'
-# # PayStack
-# VUE_APP_BASE_PAY_STACK_PUBLIC_KEY='pk_test_2eed10135c4a958c5073795b22854ded9d1a6c55'
-# # 请求token前缀
-# VUE_APP_ACCESS_TOKEN_PREFIX='Bearer '
-# # 区域js文件地址
-# VUE_APP_SYSTEM_JS='http://ng-upload.elken.com'
+# PayStack支付key
+VUE_APP_BASE_PAY_STACK_PUBLIC_KEY='pk_test_2eed10135c4a958c5073795b22854ded9d1a6c55'
+# 请求token前缀
+VUE_APP_ACCESS_TOKEN_PREFIX='Bearer '
 
-# api请求地址
+# test
+# # api请求地址
  VUE_APP_BASE_API='http://16.163.228.151:8020'
  # 文件下载地址
  VUE_APP_BASE_DO_API='http://16.163.228.151:8020'
@@ -30,7 +21,4 @@ ENV='development'
  VUE_APP_BASE_WEBSITE='http://16.163.228.151:8019'
  # 会员页面地址
  VUE_APP_FRONTEND_WEBSITE='http://16.163.228.151:8017'
-# PayStack支付key
-VUE_APP_BASE_PAY_STACK_PUBLIC_KEY='pk_test_2eed10135c4a958c5073795b22854ded9d1a6c55'
-# 请求token前缀
-VUE_APP_ACCESS_TOKEN_PREFIX='Bearer '
+

+ 5 - 5
src/api/config.js

@@ -265,7 +265,7 @@ export function updateOtherConfig(data) {
  */
 export function fetchCurrenciesList() {
   return request({
-    url: '/v1/currency/currencies',
+    url: '/v1/config/currencies',
     method: 'get'
   })
 }
@@ -276,7 +276,7 @@ export function fetchCurrenciesList() {
  */
 export function fetchCurrencyConversionsList() {
   return request({
-    url: '/v1/currency/currencies-conversions',
+    url: '/v1/config/currencies',
     method: 'get'
   })
 }
@@ -287,7 +287,7 @@ export function fetchCurrencyConversionsList() {
  */
 export function setCurrencyConversions(data) {
   return request({
-    url: '/v1/currency/set-currencies-conversions',
+    url: '/v1/config/set-currencies-conversions',
     method: 'post',
     data
   })
@@ -299,7 +299,7 @@ export function setCurrencyConversions(data) {
  */
 export function fetchTransportationList() {
   return request({
-    url: '/v1/transportation/transportation',
+    url: '/v1/config/transportation',
     method: 'get'
   })
 }
@@ -310,7 +310,7 @@ export function fetchTransportationList() {
  */
 export function setTransportation(data) {
   return request({
-    url: '/v1/transportation/set-transportation',
+    url: '/v1/config/set-transportation',
     method: 'post',
     data
   })

+ 2 - 1
src/lang/en.js

@@ -519,7 +519,7 @@ export default {
     bonusConfig: 'Bonus settings',
     scoreConfig: 'Points configuration',
     transferConfig: 'Transfer configuration',
-    exchangeRateConfig: 'Exchange rate configuration',
+    currenciesConfig: 'Exchange rate configuration',
     otherConfig: 'Other configuration',
     decLevelConfig: 'Member level configuration',
     empLevelConfig: 'Member rank level configuration',
@@ -893,6 +893,7 @@ export default {
     delNotice: 'Determine to delete the selected data'
   },
   exchangeRateConfig: {
+    countryName: "Country",
     currencyType: "Currency Type",
     ProductExchangeRate: 'Product Exchange Rate',
     BonusExchangeRate: "Bonus Exchange Rate"

+ 3 - 2
src/lang/zh.js

@@ -519,7 +519,7 @@ export default {
     bonusConfig: '奖金设置',
     scoreConfig: '积分配置',
     transferConfig: '转账配置',
-    exchangeRateConfig: '汇率配置',
+    currenciesConfig: '汇率配置',
     otherConfig: '其他配置',
     decLevelConfig: '会员级别配置',
     empLevelConfig: '会员聘级配置',
@@ -883,7 +883,8 @@ export default {
     delNotice: '确定删除选定的数据?'
   },
   exchangeRateConfig: {
-    currencyType: "货币类型",
+    countryName: "国家",
+    currencyType: "货币",
     ProductExchangeRate: '产品汇率',
     BonusExchangeRate: "奖金汇率"
   },

+ 0 - 5
src/router/index.js

@@ -9,8 +9,6 @@ import Layout from '@/layout'
 /* Router Modules */
 import configRouter from '@/router/modules/config'
 import memberRouter from '@/router/modules/member'
-import currencyRouter from "@/router/modules/currency"
-import transportationRouter from "@/router/modules/transportation"
 /**
  * Note: sub-menu only appear when route children.length >= 1
  * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
@@ -301,9 +299,6 @@ export const asyncRoutes = [
     // 设置
     configRouter,
 
-    currencyRouter,
-
-    transportationRouter,
   {
     path: '/ad',
     component: Layout,

+ 9 - 3
src/router/modules/config.js

@@ -15,11 +15,17 @@ const configRouter = {
       meta: { title: '站点配置', icon: 'user', noCache: true }
     },
     {
-      path: 'currency-conversions', // 汇率配置
-      component: () => import('@/views/config/exchange-rate'),
-      name: 'exchangeRate',
+      path: 'currencies', // 汇率配置
+      component: () => import('@/views/config/currencies-config'),
+      name: 'currenciesConfig',
       meta: { title: '汇率列表', icon: 'user', noCache: true }
     },
+    {
+      path: 'transportation',
+      component: () => import('@/views/config/transportation-config'),
+      name: 'transportationConfig',
+      meta: { title: '运费配置', icon: 'user', noCache: true }
+    },
     {
       path: 'dec-role', // 报单中心配置
       component: () => import('@/views/config/stockist-config'),

+ 0 - 20
src/router/modules/currency.js

@@ -1,20 +0,0 @@
-/** When your routing table is too long, you can split it into small modules **/
-
-import Layout from '@/layout'
-
-const currencyRouter = {
-  path: '/currency',
-  component: Layout,
-  redirect: '/currency/currencies-conversions',
-  hidden: true,
-  children: [
-    {
-      path: 'currencies-conversions', // 汇率配置
-      component: () => import('@/views/config/exchange-rate'),
-      name: 'exchangeRate',
-      meta: { title: '汇率列表', icon: 'user', noCache: true }
-    }
-  ]
-}
-
-export default currencyRouter

+ 0 - 21
src/router/modules/transportation.js

@@ -1,21 +0,0 @@
-/** When your routing table is too long, you can split it into small modules **/
-
-import Layout from '@/layout'
-
-const transportationRouter = {
-  path: '/transportation',
-  component: Layout,
-  redirect: '/transportation/transportation',
-  hidden: true,
-  children: [
-    {
-      path: 'transportation',
-      component: () => import('@/views/config/transportation-config'),
-      name: 'transportation',
-      meta: { title: '运费配置', icon: 'user', noCache: true }
-    },
-
-  ]
-}
-
-export default transportationRouter

+ 4 - 0
src/store/modules/permission.js

@@ -33,6 +33,8 @@ export function generaMenu(routes, data) {
       }
     }
 
+    console.log('menu', menu)
+
     if (item.child) {
       generaMenu(menu.children, item.child)
     }
@@ -48,7 +50,9 @@ const actions = {
       roles = ['admin']
       const baseInfo = JSON.parse(localStorage.getItem('baseInfo'))
       const apiMenu = baseInfo.menu
+      console.log('apiMenu', apiMenu)
       const formatMenu = generaMenu([], apiMenu)
+      console.log('formatMenu', formatMenu)
       commit('SET_ROUTES', formatMenu)
       resolve(formatMenu)
     })

+ 1 - 11
src/views/config/exchange-rate.vue → src/views/config/currencies-config.vue

@@ -5,16 +5,6 @@
         <el-table-column prop="NAME" :label="$t('exchangeRateConfig.currencyType')" />
         <el-table-column prop="PRODUCT_RATE" :label="$t('exchangeRateConfig.ProductExchangeRate')" min-width="90px;" />
         <el-table-column prop="BONUSES_RATE" :label="$t('exchangeRateConfig.BonusExchangeRate')" min-width="90px;" />
-<!--        <el-table-column :label="$t('common.createdAt')" min-width="100px;">-->
-<!--          <template slot-scope="{row}">-->
-<!--            {{ row.CREATED_AT | parseTime('{y}-{m}-{d} {h}:{i}:{s}') }}-->
-<!--          </template>-->
-<!--        </el-table-column>-->
-<!--        <el-table-column :label="$t('common.updatedAt')" min-width="100px;">-->
-<!--          <template slot-scope="{row}">-->
-<!--            {{ row.UPDATED_AT | parseTime('{y}-{m}-{d} {h}:{i}:{s}') }}-->
-<!--          </template>-->
-<!--        </el-table-column>-->
         <el-table-column :label="$t('common.action')" min-width="100px;">
           <template slot-scope="scope">
             <el-button type="primary" size="mini" icon="el-icon-edit" plain @click="edit(scope.row)">{{ $t('common.edit') }}</el-button>
@@ -57,7 +47,7 @@ import {
 import { getScreenWidth } from '@/utils'
 
 export default {
-  name: 'Currencies',
+  name: 'currencies',
   data() {
     return {
       form: {

+ 1 - 11
src/views/config/transportation-config.vue

@@ -3,19 +3,9 @@
     <div v-loading="loading" class="white-box">
       <el-table :data="conversionsList" stripe style="width: 100%;">
         <el-table-column prop="NAME" :label="$t('transportationConfig.countryName')" />
-        <el-table-column prop="currency.NAME" :label="$t('exchangeRateConfig.currencyType')" />
+        <el-table-column prop="currency.CODE" :label="$t('exchangeRateConfig.currencyType')" />
         <el-table-column prop="free_shipping" :label="$t('transportationConfig.freeShipping')" min-width="90px;" />
         <el-table-column prop="freight" :label="$t('transportationConfig.free')" min-width="90px;" />
-<!--        <el-table-column :label="$t('common.createdAt')" min-width="100px;">-->
-<!--          <template slot-scope="{row}">-->
-<!--            {{ row.CREATED_AT | parseTime('{y}-{m}-{d} {h}:{i}:{s}') }}-->
-<!--          </template>-->
-<!--        </el-table-column>-->
-<!--        <el-table-column :label="$t('common.updatedAt')" min-width="100px;">-->
-<!--          <template slot-scope="{row}">-->
-<!--            {{ row.UPDATED_AT | parseTime('{y}-{m}-{d} {h}:{i}:{s}') }}-->
-<!--          </template>-->
-<!--        </el-table-column>-->
         <el-table-column :label="$t('common.action')" min-width="100px;">
           <template slot-scope="scope">
             <el-button type="primary" size="mini" icon="el-icon-edit" plain @click="edit(scope.row)">{{ $t('common.edit') }}</el-button>

+ 4 - 0
src/views/finance/change-balance-opt.vue

@@ -13,6 +13,9 @@
               <el-form-item :label="$t('financial.memberLevel')" v-show="userInfo.REAL_NAME!==null"><!--会员级别-->
                 <el-input :value="userInfo.LEVEL_NAME" :disabled="true"></el-input>
               </el-form-item>
+              <el-form-item :label="$t('common.country')" v-show="userInfo.country!==null">
+                <el-input :value="userInfo.country" :disabled="true"></el-input>
+              </el-form-item>
               <!--<el-form-item label="报单中心级别" v-show="userInfo.DEC_ROLE_NAME!=='无'">-->
                 <!--<el-input :value="userInfo.DEC_ROLE_NAME" :disabled="true"></el-input>-->
               <!--</el-form-item>-->
@@ -119,6 +122,7 @@
           },
           userInfo: {
             REAL_NAME: null,
+            country: null,
             DEC_ROLE_NAME: '',
             BONUS: 0,
             BONUS_FREEZE: 0,

+ 2 - 5
src/views/user/change-highest-emp-level.vue

@@ -107,7 +107,7 @@
           </el-input>
 
           <el-tag v-show="userInfo.REAL_NAME !== null" style="margin-top: 5px">
-            {{ $t("member.memberName") }}:{{ userInfo.REAL_NAME }}
+            {{ $t("member.memberName") }}:{{ userInfo.REAL_NAME }} ({{ userInfo.country }})
           </el-tag>
           <el-tag
             v-show="userInfo.REAL_NAME !== null"
@@ -116,13 +116,10 @@
             :value="item.ID"
             :key="key"
             v-if="key === userInfo.EMP_LV"
-            style="margin-top: 5px; width: 100%;"
+            style="margin-top: 5px;"
           >
             {{ $t("member.highestLevel") }}:{{ item.LEVEL_NAME }}
           </el-tag>
-          <el-tag v-show="userInfo.country !== null" style="margin-top: 5px">
-            {{ $t("common.country") }}:{{ userInfo.country }}
-          </el-tag>
         </el-form-item>
         <el-form-item :label="$t('member.modifyHighestDirectorLevelLevel')" required>
           <el-select

+ 3 - 1
src/views/user/dec-level-list.vue

@@ -35,7 +35,8 @@
 			<el-form ref="form" :model="form" label-width="150px" :label-position="labelPosition">
 				<el-form-item :label="$t('member.memberCode')">
 					<el-input v-model.trim="form.userName" @change="handleChange"></el-input>
-					<el-tag style="margin-top: 15px;" v-show="userInfo.REAL_NAME!==null">{{ $t('member.memberName') }}:{{ userInfo.REAL_NAME }} {{ $t('member.currentLevel') }}:{{ userInfo.LEVEL_NAME }}</el-tag>
+					<el-tag style="margin-top: 15px;" v-show="userInfo.REAL_NAME!==null">{{ $t('member.memberName') }}:{{ userInfo.REAL_NAME }} ({{ userInfo.country }})</el-tag>
+          <el-tag style="margin-top: 15px;" v-show="userInfo.REAL_NAME!==null">{{ $t('member.currentLevel') }}:{{ userInfo.LEVEL_NAME }}</el-tag>
 				</el-form-item>
 				<el-form-item :label="$t('member.entryLevel')">
 					<el-select v-model="form.levelId" :placeholder="$t('member.selectEntryLevelHint')">
@@ -100,6 +101,7 @@
 				userInfo: {
 					REAL_NAME: null,
 					DEC_LV: null,
+          country: null,
 				},
 			}
 		},

+ 3 - 1
src/views/user/modify-stockist-level.vue

@@ -4,7 +4,8 @@
 			<el-form ref="form" :model="form" label-width="250px" :label-position="labelPosition">
 				<el-form-item :label="$t('member.memberCode')">
 					<el-input v-model.trim="form.userName" @change="handleChange"></el-input>
-					<el-tag style="margin-top: 15px;" v-show="userInfo.REAL_NAME !== null">{{ $t('member.memberName') }}:{{ userInfo.REAL_NAME }} {{ $t('member.currentLevel') }}:{{ allDecRole[userInfo.DEC_ROLE_ID] ? allDecRole[userInfo.DEC_ROLE_ID]['ROLE_NAME'] : '' }}</el-tag>
+					<el-tag style="margin-top: 15px;" v-show="userInfo.REAL_NAME !== null">{{ $t('member.memberName') }}:{{ userInfo.REAL_NAME }} ({{ userInfo.country }})</el-tag>
+          <el-tag v-show="userInfo.REAL_NAME !== null" style="margin-top: 5px;">{{ $t('member.currentLevel') }}:{{ allDecRole[userInfo.DEC_ROLE_ID] ? allDecRole[userInfo.DEC_ROLE_ID]['ROLE_NAME'] : '' }}</el-tag>
 				</el-form-item>
 				<el-form-item :label="$t('member.stockistLevel')">
 					<el-select v-model="form.levelId" :placeholder="$t('member.pleaseSelectStockistLevel')">
@@ -46,6 +47,7 @@ export default {
 			userInfo: {
 				REAL_NAME: null,
 				DEC_ROLE_ID: null,
+        country: null,
 			},
       screenWidth: getScreenWidth() > 600 ? '500px' : getScreenWidth() + 'px',
       labelPosition: getScreenWidth() > 600 ? 'right' : 'top',