tyler 2 سال پیش
والد
کامیت
059360d952

+ 19 - 15
public/index.html

@@ -1,15 +1,19 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="renderer" content="webkit">
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-<!--    <link rel="icon" href="<%= BASE_URL %>favicon.ico">-->
-    <title><%= webpackConfig.name %></title>
-  </head>
-  <body>
-    <div id="app"></div>
-    <!-- built files will be auto injected -->
-  </body>
-</html>
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="renderer" content="webkit">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+    <meta http-equiv="cache-control" content="no-cache,no-store, must-revalidate" />
+    <meta http-equiv="pragma" content="no-cache" />
+    <meta http-equiv="Expires" content="0" />
+
+    <!--    <link rel="icon" href="<%= BASE_URL %>favicon.ico">-->
+    <title><%= webpackConfig.name %></title>
+  </head>
+  <body>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+  </body>
+</html>

+ 212 - 212
src/layout/components/Navbar.vue

@@ -1,212 +1,212 @@
-<template>
-  <div class="navbar">
-    <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
-
-    <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
-
-    <div class="right-menu">
-      <template v-if="device!=='mobile'">
-        <!--        <search id="header-search" class="right-menu-item" />-->
-
-        <!--        <error-log class="errLog-container right-menu-item hover-effect" />-->
-
-        <screenfull id="screenfull" class="right-menu-item hover-effect" />
-
-        <el-tooltip :content="$t('navbar.size')" effect="dark" placement="bottom">
-          <size-select id="size-select" class="right-menu-item hover-effect" />
-        </el-tooltip>
-
-      </template>
-      <lang-select class="right-menu-item hover-effect" />
-
-      <el-dropdown :class="device == 'mobile'? 'avatar-container_m' :'avatar-container'" class=" right-menu-item hover-effect" trigger="click">
-        <div class="avatar-wrapper">
-          <img src="@/assets/user_images/avatar.png" class="user-avatar" alt="">
-          <i v-if="device!=='mobile'" class="el-icon-caret-bottom" />
-        </div>
-        <el-dropdown-menu slot="dropdown">
-          <el-dropdown-item>
-            {{ userName }}
-          </el-dropdown-item>
-          <!-- <router-link to="/">
-						<el-dropdown-item>
-							{{ $t('navbar.dashboard') }}
-						</el-dropdown-item>
-					</router-link> -->
-          <!-- <router-link to="/profile/index">
-            <el-dropdown-item>
-              {{ $t('navbar.profile') }}
-            </el-dropdown-item>
-          </router-link>
-					<router-link to="/config/receive-address-list">
-						<el-dropdown-item>
-							{{ $t('navbar.shippingAddress') }}
-						</el-dropdown-item>
-					</router-link> -->
-          <!-- <el-dropdown-item>
-						<a target="_blank" :href="visitWebsite">{{ $t('navbar.visitPreviousVersion') }}</a>
-					</el-dropdown-item> -->
-          <el-dropdown-item divided @click.native="logout">
-            <span style="display:block;">{{ $t('navbar.logOut') }}</span>
-          </el-dropdown-item>
-        </el-dropdown-menu>
-      </el-dropdown>
-    </div>
-  </div>
-</template>
-
-<script>
-import Breadcrumb from '@/components/Breadcrumb'
-import ErrorLog from '@/components/ErrorLog'
-import Hamburger from '@/components/Hamburger'
-import Search from '@/components/HeaderSearch'
-import LangSelect from '@/components/LangSelect'
-import Screenfull from '@/components/Screenfull'
-import SizeSelect from '@/components/SizeSelect'
-import { mapGetters } from 'vuex'
-
-export default {
-  components: {
-    Breadcrumb,
-    Hamburger,
-    ErrorLog,
-    Screenfull,
-    SizeSelect,
-    LangSelect,
-    Search
-  },
-  data() {
-    return {
-      visitWebsite: process.env.NODE_ENV === 'production' ? 'http://ngds.elken.com:8010/' : 'http://16.163.228.151:8035',
-      userName: ''
-    }
-  },
-  computed: {
-    ...mapGetters([
-      'sidebar',
-      'device'
-    ])
-  },
-  mounted() {
-    this.getUserInfo()
-  },
-  methods: {
-    toggleSideBar() {
-      this.$store.dispatch('app/toggleSideBar')
-    },
-    async logout() {
-      await this.$store.dispatch('user/logout')
-      this.$router.push(`/login?redirect=${this.$route.fullPath}`)
-    },
-    getUserInfo() {
-      this.userName = window.localStorage.getItem('userName')
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.navbar {
-  height: 50px;
-  overflow: hidden;
-  position: relative;
-  background: #fff;
-  box-shadow: 0 1px 4px rgba(0,21,41,.08);
-
-  .hamburger-container {
-    line-height: 46px;
-    height: 100%;
-    float: left;
-    cursor: pointer;
-    transition: background .3s;
-    -webkit-tap-highlight-color:transparent;
-
-    &:hover {
-      background: rgba(0, 0, 0, .025)
-    }
-  }
-
-  .breadcrumb-container {
-    float: left;
-  }
-
-  .errLog-container {
-    display: inline-block;
-    vertical-align: top;
-  }
-
-  .right-menu {
-    float: right;
-    height: 100%;
-    line-height: 50px;
-
-    &:focus {
-      outline: none;
-    }
-
-    .right-menu-item {
-      display: inline-block;
-      padding: 0 8px;
-      height: 100%;
-      font-size: 18px;
-      color: #5a5e66;
-      vertical-align: text-bottom;
-
-      &.hover-effect {
-        cursor: pointer;
-        transition: background .3s;
-
-        &:hover {
-          background: rgba(0, 0, 0, .025)
-        }
-      }
-    }
-
-    .avatar-container_m{
-      margin-right: 3px;
-      .avatar-wrapper {
-        margin-top: 5px;
-        position: relative;
-
-        .user-avatar {
-          cursor: pointer;
-          width: 40px;
-          height: 40px;
-          border-radius: 10px;
-        }
-
-        .el-icon-caret-bottom {
-          cursor: pointer;
-          position: absolute;
-          right: -20px;
-          top: 25px;
-          font-size: 12px;
-        }
-      }
-    }
-    .avatar-container {
-      margin-right: 30px;
-
-      .avatar-wrapper {
-        margin-top: 5px;
-        position: relative;
-
-        .user-avatar {
-          cursor: pointer;
-          width: 40px;
-          height: 40px;
-          border-radius: 10px;
-        }
-
-        .el-icon-caret-bottom {
-          cursor: pointer;
-          position: absolute;
-          right: -20px;
-          top: 25px;
-          font-size: 12px;
-        }
-      }
-    }
-  }
-}
-</style>
+<template>
+  <div class="navbar">
+    <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
+
+    <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
+
+    <div class="right-menu">
+      <template v-if="device!=='mobile'">
+        <!--        <search id="header-search" class="right-menu-item" />-->
+
+        <!--        <error-log class="errLog-container right-menu-item hover-effect" />-->
+
+        <screenfull id="screenfull" class="right-menu-item hover-effect" />
+
+        <el-tooltip :content="$t('navbar.size')" effect="dark" placement="bottom">
+          <size-select id="size-select" class="right-menu-item hover-effect" />
+        </el-tooltip>
+
+      </template>
+      <lang-select class="right-menu-item hover-effect" />
+
+      <el-dropdown :class="device == 'mobile'? 'avatar-container_m' :'avatar-container'" class=" right-menu-item hover-effect" trigger="click">
+        <div class="avatar-wrapper">
+          <img src="@/assets/user_images/avatar.png" class="user-avatar" alt="">
+          <i v-if="device!=='mobile'" class="el-icon-caret-bottom" />
+        </div>
+        <el-dropdown-menu slot="dropdown">
+          <el-dropdown-item>
+            {{ userName }}
+          </el-dropdown-item>
+          <!-- <router-link to="/">
+						<el-dropdown-item>
+							{{ $t('navbar.dashboard') }}
+						</el-dropdown-item>
+					</router-link> -->
+          <!-- <router-link to="/profile/index">
+            <el-dropdown-item>
+              {{ $t('navbar.profile') }}
+            </el-dropdown-item>
+          </router-link>
+					<router-link to="/config/receive-address-list">
+						<el-dropdown-item>
+							{{ $t('navbar.shippingAddress') }}
+						</el-dropdown-item>
+					</router-link> -->
+          <!-- <el-dropdown-item>
+						<a target="_blank" :href="visitWebsite">{{ $t('navbar.visitPreviousVersion') }}</a>
+					</el-dropdown-item> -->
+          <el-dropdown-item divided @click.native="logout">
+            <span style="display:block;">{{ $t('navbar.logOut') }}</span>
+          </el-dropdown-item>
+        </el-dropdown-menu>
+      </el-dropdown>
+    </div>
+  </div>
+</template>
+
+<script>
+import Breadcrumb from '@/components/Breadcrumb'
+import ErrorLog from '@/components/ErrorLog'
+import Hamburger from '@/components/Hamburger'
+import Search from '@/components/HeaderSearch'
+import LangSelect from '@/components/LangSelect'
+import Screenfull from '@/components/Screenfull'
+import SizeSelect from '@/components/SizeSelect'
+import { mapGetters } from 'vuex'
+
+export default {
+  components: {
+    Breadcrumb,
+    Hamburger,
+    ErrorLog,
+    Screenfull,
+    SizeSelect,
+    LangSelect,
+    Search
+  },
+  data() {
+    return {
+      visitWebsite: process.env.NODE_ENV === 'production' ? 'http://ngds.elken.com:8010/' : 'http://16.163.228.151:8035',
+      userName: ''
+    }
+  },
+  computed: {
+    ...mapGetters([
+      'sidebar',
+      'device'
+    ])
+  },
+  mounted() {
+    this.getUserInfo()
+  },
+  methods: {
+    toggleSideBar() {
+      this.$store.dispatch('app/toggleSideBar')
+    },
+    async logout() {
+      await this.$store.dispatch('user/logout')
+      this.$router.push(`/login?redirect=${this.$route.fullPath}`)
+    },
+    getUserInfo() {
+      this.userName = window.localStorage.getItem('userName')
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.navbar {
+  height: 50px;
+  overflow: hidden;
+  position: relative;
+  background: #fff;
+  box-shadow: 0 1px 4px rgba(0,21,41,.08);
+
+  .hamburger-container {
+    line-height: 46px;
+    height: 100%;
+    float: left;
+    cursor: pointer;
+    transition: background .3s;
+    -webkit-tap-highlight-color:transparent;
+
+    &:hover {
+      background: rgba(0, 0, 0, .025)
+    }
+  }
+
+  .breadcrumb-container {
+    float: left;
+  }
+
+  .errLog-container {
+    display: inline-block;
+    vertical-align: top;
+  }
+
+  .right-menu {
+    float: right;
+    height: 100%;
+    line-height: 50px;
+
+    &:focus {
+      outline: none;
+    }
+
+    .right-menu-item {
+      display: inline-block;
+      padding: 0 8px;
+      height: 100%;
+      font-size: 18px;
+      color: #5a5e66;
+      vertical-align: text-bottom;
+
+      &.hover-effect {
+        cursor: pointer;
+        transition: background .3s;
+
+        &:hover {
+          background: rgba(0, 0, 0, .025)
+        }
+      }
+    }
+
+    .avatar-container_m{
+      margin-right: 3px;
+      .avatar-wrapper {
+        margin-top: 5px;
+        position: relative;
+
+        .user-avatar {
+          cursor: pointer;
+          width: 40px;
+          height: 40px;
+          border-radius: 10px;
+        }
+
+        .el-icon-caret-bottom {
+          cursor: pointer;
+          position: absolute;
+          right: -20px;
+          top: 25px;
+          font-size: 12px;
+        }
+      }
+    }
+    .avatar-container {
+      margin-right: 30px;
+
+      .avatar-wrapper {
+        margin-top: 5px;
+        position: relative;
+
+        .user-avatar {
+          cursor: pointer;
+          width: 40px;
+          height: 40px;
+          border-radius: 10px;
+        }
+
+        .el-icon-caret-bottom {
+          cursor: pointer;
+          position: absolute;
+          right: -20px;
+          top: 25px;
+          font-size: 12px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 105 - 105
src/layout/index.vue

@@ -1,105 +1,105 @@
-<template>
-  <div :class="classObj" class="app-wrapper">
-    <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
-    <sidebar class="sidebar-container" />
-    <div :class="{hasTagsView:needTagsView}" class="main-container">
-      <div :class="{'fixed-header':fixedHeader}">
-        <navbar />
-      </div>
-      <app-main />
-      <right-panel v-if="showSettings">
-        <settings />
-      </right-panel>
-    </div>
-  </div>
-</template>
-
-<script>
-import RightPanel from '@/components/RightPanel'
-import { AppMain, Navbar, Settings, Sidebar } from './components'
-import ResizeMixin from './mixin/ResizeHandler'
-import { mapState } from 'vuex'
-import initRegion from "@/utils/region"
-
-export default {
-  name: 'Layout',
-	beforeCreate() {
-		// 获取地区信息
-		initRegion(this)
-	},
-  components: {
-    AppMain,
-    Navbar,
-    RightPanel,
-    Settings,
-    Sidebar,
-  },
-  mixins: [ResizeMixin],
-  computed: {
-    ...mapState({
-      sidebar: state => state.app.sidebar,
-      device: state => state.app.device,
-      showSettings: state => state.settings.showSettings,
-      needTagsView: state => state.settings.tagsView,
-      fixedHeader: state => state.settings.fixedHeader
-    }),
-    classObj() {
-      return {
-        hideSidebar: !this.sidebar.opened,
-        openSidebar: this.sidebar.opened,
-        withoutAnimation: this.sidebar.withoutAnimation,
-        mobile: this.device === 'mobile'
-      }
-    }
-  },
-  methods: {
-    handleClickOutside() {
-      this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-  @import "~@/styles/mixin.scss";
-  @import "~@/styles/variables.scss";
-
-  .app-wrapper {
-    @include clearfix;
-    position: relative;
-    height: 100%;
-    width: 100%;
-
-    &.mobile.openSidebar {
-      position: fixed;
-      top: 0;
-    }
-  }
-
-  .drawer-bg {
-    background: #000;
-    opacity: 0.3;
-    width: 100%;
-    top: 0;
-    height: 100%;
-    position: absolute;
-    z-index: 999;
-  }
-
-  .fixed-header {
-    position: fixed;
-    top: 0;
-    right: 0;
-    z-index: 9;
-    width: calc(100% - #{$sideBarWidth});
-    transition: width 0.28s;
-  }
-
-  .hideSidebar .fixed-header {
-    width: calc(100% - 54px)
-  }
-
-  .mobile .fixed-header {
-    width: 100%;
-  }
-</style>
+<template>
+  <div :class="classObj" class="app-wrapper">
+    <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
+    <sidebar class="sidebar-container" />
+    <div :class="{hasTagsView:needTagsView}" class="main-container">
+      <div :class="{'fixed-header':fixedHeader}">
+        <navbar />
+      </div>
+      <app-main />
+      <right-panel v-if="showSettings">
+        <settings />
+      </right-panel>
+    </div>
+  </div>
+</template>
+
+<script>
+import RightPanel from '@/components/RightPanel'
+import { AppMain, Navbar, Settings, Sidebar } from './components'
+import ResizeMixin from './mixin/ResizeHandler'
+import { mapState } from 'vuex'
+import initRegion from '@/utils/region'
+
+export default {
+  name: 'Layout',
+  components: {
+    AppMain,
+    Navbar,
+    RightPanel,
+    Settings,
+    Sidebar
+  },
+  mixins: [ResizeMixin],
+  computed: {
+    ...mapState({
+      sidebar: state => state.app.sidebar,
+      device: state => state.app.device,
+      showSettings: state => state.settings.showSettings,
+      needTagsView: state => state.settings.tagsView,
+      fixedHeader: state => state.settings.fixedHeader
+    }),
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened,
+        withoutAnimation: this.sidebar.withoutAnimation,
+        mobile: this.device === 'mobile'
+      }
+    }
+  },
+  beforeCreate() {
+    // 获取地区信息
+    initRegion(this)
+  },
+  methods: {
+    handleClickOutside() {
+      this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+  @import "~@/styles/mixin.scss";
+  @import "~@/styles/variables.scss";
+
+  .app-wrapper {
+    @include clearfix;
+    position: relative;
+    height: 100%;
+    width: 100%;
+
+    &.mobile.openSidebar {
+      position: fixed;
+      top: 0;
+    }
+  }
+
+  .drawer-bg {
+    background: #000;
+    opacity: 0.3;
+    width: 100%;
+    top: 0;
+    height: 100%;
+    position: absolute;
+    z-index: 999;
+  }
+
+  .fixed-header {
+    position: fixed;
+    top: 0;
+    right: 0;
+    z-index: 9;
+    width: calc(100% - #{$sideBarWidth});
+    transition: width 0.28s;
+  }
+
+  .hideSidebar .fixed-header {
+    width: calc(100% - 54px)
+  }
+
+  .mobile .fixed-header {
+    width: 100%;
+  }
+</style>

+ 58 - 58
src/main.js

@@ -1,58 +1,58 @@
-import Vue from 'vue'
-
-import Cookies from 'js-cookie'
-
-import 'normalize.css/normalize.css' // a modern alternative to CSS resets
-
-import Element from 'element-ui'
-import './styles/element-variables.scss'
-
-import moment from 'moment'
-
-import '@/styles/index.scss' // global css
-
-import App from './App'
-import store from './store'
-import router from './router'
-
-import i18n from './lang' // internationalization
-import './icons' // icon
-import './permission' // permission control
-import './utils/error-log' // error log
-
-import * as filters from './filters' // global filters
-
-/**
- * If you don't want to use mock-server
- * you want to use MockJs for mock api
- * you can execute: mockXHR()
- *
- * Currently MockJs will be used in the production environment,
- * please remove it before going online ! ! !
-
-if (process.env.NODE_ENV === 'production') {
-  const { mockXHR } = require('../mock')
-  mockXHR()
-}
-*/
-
-Vue.use(Element, {
-  size: Cookies.get('size') || 'medium', // set element-ui default size
-  i18n: (key, value) => i18n.t(key, value)
-})
-
-// register global utility filters
-Object.keys(filters).forEach(key => {
-  Vue.filter(key, filters[key])
-})
-
-Vue.config.productionTip = false
-Vue.prototype.$moment = moment
-
-new Vue({
-  el: '#app',
-  router,
-  store,
-  i18n,
-  render: h => h(App)
-})
+import Vue from 'vue'
+
+import Cookies from 'js-cookie'
+
+import 'normalize.css/normalize.css' // a modern alternative to CSS resets
+
+import Element from 'element-ui'
+import './styles/element-variables.scss'
+
+import moment from 'moment'
+
+import '@/styles/index.scss' // global css
+
+import App from './App'
+import store from './store'
+import router from './router'
+
+import i18n from './lang' // internationalization
+import './icons' // icon
+import './permission' // permission control
+import './utils/error-log' // error log
+
+import * as filters from './filters' // global filters
+
+/**
+ * If you don't want to use mock-server
+ * you want to use MockJs for mock api
+ * you can execute: mockXHR()
+ *
+ * Currently MockJs will be used in the production environment,
+ * please remove it before going online ! ! !
+
+if (process.env.NODE_ENV === 'production') {
+  const { mockXHR } = require('../mock')
+  mockXHR()
+}
+*/
+
+Vue.use(Element, {
+  size: Cookies.get('size') || 'medium', // set element-ui default size
+  i18n: (key, value) => i18n.t(key, value)
+})
+
+// register global utility filters
+Object.keys(filters).forEach(key => {
+  Vue.filter(key, filters[key])
+})
+
+Vue.config.productionTip = false
+Vue.prototype.$moment = moment
+
+new Vue({
+  el: '#app',
+  router,
+  store,
+  i18n,
+  render: h => h(App)
+})

+ 541 - 541
src/views/shop/car-fund-products.vue

@@ -1,574 +1,574 @@
 <template>
-	<div class="app-container">
-		<el-table :data="tableData" :show-header="false" :key="tableKey" v-loading="listLoading" fit ref="multipleTable" @selection-change="handleSelectionChange">
-			<el-table-column type="selection" width="30" align="center"></el-table-column>
-			<el-table-column align="center">
-				<template slot-scope="{row, $index}">
-					<el-container>
-						<el-aside width="80px" style="background-color: #ffffff; padding: 0; margin-bottom: 0;">
-							<el-image style="width: 80px; height: 80px" :src="tool.getArImage(row.COVER, '/files/')" @click="handleProduct(row)"></el-image>
-						</el-aside>
-						<el-main style="padding: 5px 5px; text-align: left;">
-							<el-row :gutter="10">
-								<el-col :xs="24" :sm="24" :lg="6">
-									<span style="cursor: pointer;" @click="handleProduct(row)">{{ row.GOODS_NAME }}</span>
-								</el-col>
-								<el-col :xs="24" :sm="24" :lg="4">
-									<span style="color: #9c9c9c; cursor: pointer;">{{ row.GOODS_NO }}</span>
-								</el-col>
-								<el-col :xs="24" :sm="24" :lg="5">
-								<span style="font-size: 13px;">
-									<span style="font-weight: bold; color: tomato;">{{ $t('shop.productPrice') }}:{{ row.SELL_PRICE | toThousandFilter }}</span>
-								</span>
-								</el-col>
-								<el-col :xs="24" :sm="24" :lg="4">
-									<span style="font-size: 13px;">{{ $t('shop.inventory') }}:{{ row.STORE_NUMS }}</span>
-								</el-col>
-								<el-col :xs="24" :sm="24" :lg="5">
-									<el-input-number size="mini" v-model="storeNums[$index]" :min="1" :max="Number(row.STORE_NUMS)" @change="handleInputNumber($event, row)"></el-input-number>
-								</el-col>
-							</el-row>
-						</el-main>
-					</el-container>
-				</template>
-			</el-table-column>
-		</el-table>
+  <div class="app-container">
+    <el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="tableData" :show-header="false" fit @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="30" align="center" />
+      <el-table-column align="center">
+        <template slot-scope="{row, $index}">
+          <el-container>
+            <el-aside width="80px" style="background-color: #ffffff; padding: 0; margin-bottom: 0;">
+              <el-image style="width: 80px; height: 80px" :src="tool.getArImage(row.COVER, '/files/')" @click="handleProduct(row)" />
+            </el-aside>
+            <el-main style="padding: 5px 5px; text-align: left;">
+              <el-row :gutter="10">
+                <el-col :xs="24" :sm="24" :lg="6">
+                  <span style="cursor: pointer;" @click="handleProduct(row)">{{ row.GOODS_NAME }}</span>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="4">
+                  <span style="color: #9c9c9c; cursor: pointer;">{{ row.GOODS_NO }}</span>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="5">
+                  <span style="font-size: 13px;">
+                    <span style="font-weight: bold; color: tomato;">{{ $t('shop.productPrice') }}:{{ row.SELL_PRICE | toThousandFilter }}</span>
+                  </span>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="4">
+                  <span style="font-size: 13px;">{{ $t('shop.inventory') }}:{{ row.STORE_NUMS }}</span>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="5">
+                  <el-input-number v-model="storeNums[$index]" size="mini" :min="1" :max="Number(row.STORE_NUMS)" @change="handleInputNumber($event, row)" />
+                </el-col>
+              </el-row>
+            </el-main>
+          </el-container>
+        </template>
+      </el-table-column>
+    </el-table>
 
-		<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
+    <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
 
-		<div class="white-box-footer" style="margin-top: 15px;" v-show="total>0">
-			<div class="flex data" style="float: left; display: inline-block; margin-top: 20px;">
-				<el-button type="primary" size="small" @click="settlement()" style="float: left;">{{ $t('shop.checkOut') }}</el-button>
-			</div>
-			<div class="flex data" style="float: right; display: inline-block; line-height: 28px; font-size: 14px; margin-top: 10px; border: 1px solid #dcdfe6; border-radius: 4px; padding: 0 5px;">
-				<div style="margin-right: 2rem; display: inline-block;">{{ $t('shop.productPrice') }}:{{ $t('currency.sign') }} {{ sellPriceSum | toThousandFilter }}</div>
-				<div style="display: inline-block;">{{ $t('shop.taxAmount') }}:{{ $t('currency.sign') }} {{ taxSum | toThousandFilter }}</div>
-			</div>
-		</div>
+    <div v-show="total>0" class="white-box-footer" style="margin-top: 15px;">
+      <div class="flex data" style="float: left; display: inline-block; margin-top: 20px;">
+        <el-button type="primary" size="small" style="float: left;" @click="settlement()">{{ $t('shop.checkOut') }}</el-button>
+      </div>
+      <div class="flex data" style="float: right; display: inline-block; line-height: 28px; font-size: 14px; margin-top: 10px; border: 1px solid #dcdfe6; border-radius: 4px; padding: 0 5px;">
+        <div style="margin-right: 2rem; display: inline-block;">{{ $t('shop.productPrice') }}:{{ $t('currency.sign') }} {{ sellPriceSum | toThousandFilter }}</div>
+        <div style="display: inline-block;">{{ $t('shop.taxAmount') }}:{{ $t('currency.sign') }} {{ taxSum | toThousandFilter }}</div>
+      </div>
+    </div>
 
-		<!-- 购物车	-->
-		<el-dialog :title="$t('shop.productsSettlement')" :visible.sync="visibleShoppingCart" :width="screenWidth" style="margin-top: -95px;" :close="cleanShowCart" :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false">
-			<div v-loading="loading">
-				<div class="white-box">
-					<el-table :data="goods" :show-header="false">
-						<el-table-column align="center">
-							<template slot-scope="{row}">
-								<el-container>
-									<el-aside width="100px" style="background-color: #ffffff; padding: 0; margin-bottom: 0;">
-										<el-image style="width: 100px; height: 100px" :src="tool.getArImage(row.COVER, '/files/')" @click="handleProduct(row)"></el-image>
-									</el-aside>
-									<el-main style="padding: 10px 5px; text-align: left;">
-										<el-row :gutter="10">
-											<el-col :xs="24" :sm="8" :lg="8">
-												<span style="cursor: pointer;" @click="handleProduct(row)">{{ row.GOODS_NAME }}</span>
-											</el-col>
-											<el-col :xs="24" :sm="4" :lg="4">
-												<span style="color: #9c9c9c; cursor: pointer;">{{ row.GOODS_NO }}</span>
-											</el-col>
-											<el-col :xs="16" :sm="4" :lg="4">
-												<span style="font-weight: bold;">{{ row.member_price | toThousandFilter }}</span>
-											</el-col>
-											<el-col :xs="8" :sm="3" :lg="3">
-												<span style="">x {{ row.chose_num }}</span>
-											</el-col>
-											<el-col :xs="24" :sm="5" :lg="5">
-												<span style="color: tomato; font-weight: bold;">{{ row.member_price_plus | toThousandFilter }}</span>
-											</el-col>
-										</el-row>
-									</el-main>
-								</el-container>
-							</template>
-						</el-table-column>
-					</el-table>
+    <!-- 购物车	-->
+    <el-dialog :title="$t('shop.productsSettlement')" :visible.sync="visibleShoppingCart" :width="screenWidth" style="margin-top: -95px;" :close="cleanShowCart" :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false">
+      <div v-loading="loading">
+        <div class="white-box">
+          <el-table :data="goods" :show-header="false">
+            <el-table-column align="center">
+              <template slot-scope="{row}">
+                <el-container>
+                  <el-aside width="100px" style="background-color: #ffffff; padding: 0; margin-bottom: 0;">
+                    <el-image style="width: 100px; height: 100px" :src="tool.getArImage(row.COVER, '/files/')" @click="handleProduct(row)" />
+                  </el-aside>
+                  <el-main style="padding: 10px 5px; text-align: left;">
+                    <el-row :gutter="10">
+                      <el-col :xs="24" :sm="8" :lg="8">
+                        <span style="cursor: pointer;" @click="handleProduct(row)">{{ row.GOODS_NAME }}</span>
+                      </el-col>
+                      <el-col :xs="24" :sm="4" :lg="4">
+                        <span style="color: #9c9c9c; cursor: pointer;">{{ row.GOODS_NO }}</span>
+                      </el-col>
+                      <el-col :xs="16" :sm="4" :lg="4">
+                        <span style="font-weight: bold;">{{ row.member_price | toThousandFilter }}</span>
+                      </el-col>
+                      <el-col :xs="8" :sm="3" :lg="3">
+                        <span style="">x {{ row.chose_num }}</span>
+                      </el-col>
+                      <el-col :xs="24" :sm="5" :lg="5">
+                        <span style="color: tomato; font-weight: bold;">{{ row.member_price_plus | toThousandFilter }}</span>
+                      </el-col>
+                    </el-row>
+                  </el-main>
+                </el-container>
+              </template>
+            </el-table-column>
+          </el-table>
 
-					<div class="white-box-footer">
-						<!-- 订单合计 -->
-						<div class="" style="margin: 15px 0;">
-							<el-row :gutter="20">
-								<el-col :xs="24" :sm="24" :lg="3">
-									<span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.totalOrders') }}:</span>
-								</el-col>
-								<el-col :xs="24" :sm="24" :lg="21" style="word-break: normal; white-space: nowrap; line-height: 28px;">
-									<span>{{ $t('shop.total') }}:{{ parseFloat(pointsSum) | toThousandFilter }}</span>
-									<span>{{ $t('shop.freight') }}:{{ pointFreight }}</span>
-								</el-col>
-							</el-row>
-						</div>
-						<el-divider></el-divider>
-						<!-- 支付方式/账户余额 {{ cashCurrency }}:  -->
-						<div class="" style="margin: 15px 0;">
-							<el-row :gutter="20" type="flex" style="flex-wrap: wrap;">
-								<el-col :xs="24" :sm="24" :lg="3">
-									<span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.selectPayment') }}:</span>
-								</el-col>
-								<el-col :xs="24" :sm="24" :lg="21" style="word-break: normal; white-space: nowrap;">
-									<el-radio-group v-model="payType" @change='chosePayType'>
-										<div v-for="(item, index) in payList" :key='index' class="address">
-											<el-radio :label="item.label" border>
-												{{ item.name }}<span v-if="item.label === payType" style="color: tomato;">({{ userBalance[payType] | toThousandFilter }})</span>
-											</el-radio>
-										</div>
-									</el-radio-group>
-								</el-col>
-							</el-row>
-						</div>
-						<el-divider></el-divider>
-						<!-- 收货地址 -->
-						<div class="" style="margin: 15px 0;">
-							<el-row :gutter="10" type="flex" style="flex-wrap: wrap;">
-								<el-col :xs="24" :sm="24" :lg="3">
-									<span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.selectAddress') }}:</span>
-								</el-col>
-								<el-col :xs="24" :sm="24" :lg="21" style="word-break: normal; white-space: nowrap;">
-									<el-radio-group v-model="addressId" @change='choseAddress'>
-										<div class="address">
-											<el-radio :label="selfPickUpAddressId">{{ $t('shop.selfPickUp') }}</el-radio>
-										</div>
-										<div v-for="(item, index) in shippingAddressList" :key='index' class="address">
-											<el-radio :label="item.ID" style="word-break: break-all; white-space: normal;">
-												<span>{{item.ADDRESS}}, {{item.LGA_NAME}}, {{item.PROVINCE_NAME}}</span>
-												<el-divider direction="vertical"></el-divider>
-												<span>{{item.MOBILE}}</span>
-												<el-divider direction="vertical"></el-divider>
-												<span>{{item.CONSIGNEE}}</span>
-											</el-radio>
-										</div>
-									</el-radio-group>
-								</el-col>
-							</el-row>
-						</div>
-					</div>
+          <div class="white-box-footer">
+            <!-- 订单合计 -->
+            <div class="" style="margin: 15px 0;">
+              <el-row :gutter="20">
+                <el-col :xs="24" :sm="24" :lg="3">
+                  <span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.totalOrders') }}:</span>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="21" style="word-break: normal; white-space: nowrap; line-height: 28px;">
+                  <span>{{ $t('shop.total') }}:{{ parseFloat(pointsSum) | toThousandFilter }}</span>
+                  <span>{{ $t('shop.freight') }}:{{ pointFreight }}</span>
+                </el-col>
+              </el-row>
+            </div>
+            <el-divider />
+            <!-- 支付方式/账户余额 {{ cashCurrency }}:  -->
+            <div class="" style="margin: 15px 0;">
+              <el-row :gutter="20" type="flex" style="flex-wrap: wrap;">
+                <el-col :xs="24" :sm="24" :lg="3">
+                  <span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.selectPayment') }}:</span>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="21" style="word-break: normal; white-space: nowrap;">
+                  <el-radio-group v-model="payType" @change="chosePayType">
+                    <div v-for="(item, index) in payList" :key="index" class="address">
+                      <el-radio :label="item.label" border>
+                        {{ item.name }}<span v-if="item.label === payType" style="color: tomato;">({{ userBalance[payType] | toThousandFilter }})</span>
+                      </el-radio>
+                    </div>
+                  </el-radio-group>
+                </el-col>
+              </el-row>
+            </div>
+            <el-divider />
+            <!-- 收货地址 -->
+            <div class="" style="margin: 15px 0;">
+              <el-row :gutter="10" type="flex" style="flex-wrap: wrap;">
+                <el-col :xs="24" :sm="24" :lg="3">
+                  <span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.selectAddress') }}:</span>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="21" style="word-break: normal; white-space: nowrap;">
+                  <el-radio-group v-model="addressId" @change="choseAddress">
+                    <div class="address">
+                      <el-radio :label="selfPickUpAddressId">{{ $t('shop.selfPickUp') }}</el-radio>
+                    </div>
+                    <div v-for="(item, index) in shippingAddressList" :key="index" class="address">
+                      <el-radio :label="item.ID" style="word-break: break-all; white-space: normal;">
+                        <span>{{ item.ADDRESS }}, {{ item.LGA_NAME }}, {{ item.PROVINCE_NAME }}</span>
+                        <el-divider direction="vertical" />
+                        <span>{{ item.MOBILE }}</span>
+                        <el-divider direction="vertical" />
+                        <span>{{ item.CONSIGNEE }}</span>
+                      </el-radio>
+                    </div>
+                  </el-radio-group>
+                </el-col>
+              </el-row>
+            </div>
+          </div>
 
-					<div class="white-box-footer" >
-						<el-row :gutter="40">
-							<el-col :xs="24" :sm="24" :lg="24" align="left">
-								<el-button type="warning"  size="small" @click="cleanShowCart">{{ $t('shop.goBack') }}</el-button>
-								<el-button type="primary" size="small" @click="orderSubmit" :loading="submitButtonStat">{{ $t('shop.goPay') }}</el-button>
-							</el-col>
-						</el-row>
-					</div>
-				</div>
-			</div>
-		</el-dialog>
+          <div class="white-box-footer">
+            <el-row :gutter="40">
+              <el-col :xs="24" :sm="24" :lg="24" align="left">
+                <el-button type="warning" size="small" @click="cleanShowCart">{{ $t('shop.goBack') }}</el-button>
+                <el-button type="primary" size="small" :loading="submitButtonStat" @click="orderSubmit">{{ $t('shop.goPay') }}</el-button>
+              </el-col>
+            </el-row>
+          </div>
+        </div>
+      </div>
+    </el-dialog>
 
-		<!-- 商品详情 -->
-		<el-dialog :title="product.GOODS_NO" :visible.sync="visibleProduct" :width="screenWidth" style="margin-top: -95px;">
-			<el-row :gutter="20">
-				<el-col :xs="24" :sm="12" :lg="12">
-					<el-image style="width: 100%; height: 100%" :style="imageStyle" :src="tool.getArImage(product.COVER, '/files/')"></el-image>
-				</el-col>
-				<el-col :xs="24" :sm="12" :lg="12">
-					<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') }}:{{ product.SELL_PRICE | toThousandFilter }}</span><br />
-						<span>{{ $t('shop.taxRate') }}:{{ product.TAX_RATE / 100 }}</span><br />
-						<span>{{ $t('shop.taxAmount') }}:{{ product.taxAmount | toThousandFilter }}</span><br />
-						<span>{{ $t('shop.inventory') }}:{{ product.STORE_NUMS }}</span>
-					</div>
-				</el-col>
-			</el-row>
-		</el-dialog>
-	</div>
+    <!-- 商品详情 -->
+    <el-dialog :title="product.GOODS_NO" :visible.sync="visibleProduct" :width="screenWidth" style="margin-top: -95px;">
+      <el-row :gutter="20">
+        <el-col :xs="24" :sm="12" :lg="12">
+          <el-image style="width: 100%; height: 100%" :style="imageStyle" :src="tool.getArImage(product.COVER, '/files/')" />
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12">
+          <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') }}:{{ product.SELL_PRICE | toThousandFilter }}</span><br>
+            <span>{{ $t('shop.taxRate') }}:{{ product.TAX_RATE / 100 }}</span><br>
+            <span>{{ $t('shop.taxAmount') }}:{{ product.taxAmount | toThousandFilter }}</span><br>
+            <span>{{ $t('shop.inventory') }}:{{ product.STORE_NUMS }}</span>
+          </div>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-import {fetchProductList, fetchShoppingCart, createOrder} from '@/api/shop'
+import { createOrder, fetchProductList, fetchShoppingCart } from '@/api/shop'
+import Pagination from '@/components/Pagination'
 import waves from '@/directive/waves'
-import {formatAmount, getMedia, getScreenWidth} from '@/utils'
+import { getScreenWidth } from '@/utils'
 import tool from '@/utils/tool'
-import Pagination from '@/components/Pagination'
-import usersInfo from "@/utils/usersInfo"
+import usersInfo from '@/utils/usersInfo'
 
 export default {
-	name: 'CarFundProducts',
-	components: { Pagination },
-	directives: { waves },
-	filters: {
-		priceFilter(price) {
-			return tool.formatPrice(price)
-		},
-		taxAmountFilter(row) {
-			return tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
-		},
-		statusFilter(status) {
-			const statusMap = {
-				Unpaid: 'info',
-				Paid: 'success',
-			}
-			return statusMap[status]
-		},
-	},
-	data() {
-		return {
-			tableKey: 0,
-			list: [],
-			total: 0,
-			tableData: [],
-			listLoading: true,
-			listQuery: {
-				categoryType: 5,
-				page: 1,
-				limit: 50,
-			},
-			tool: tool,
-			multipleSelection: [],
-			sellPriceSum: 0.00,
-			pricePvSum: 0.00,
-			taxSum: 0.00,
-			storeNums: [],
-			display: false,
-			currentPage: 1,
-			shoppingCartGoods: [],
+  name: 'CarFundProducts',
+  components: { Pagination },
+  directives: { waves },
+  filters: {
+    priceFilter(price) {
+      return tool.formatPrice(price)
+    },
+    taxAmountFilter(row) {
+      return tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
+    },
+    statusFilter(status) {
+      const statusMap = {
+        Unpaid: 'info',
+        Paid: 'success'
+      }
+      return statusMap[status]
+    }
+  },
+  data() {
+    return {
+      tableKey: 0,
+      list: [],
+      total: 0,
+      tableData: [],
+      listLoading: true,
+      listQuery: {
+        categoryType: 5,
+        page: 1,
+        limit: 50
+      },
+      tool: tool,
+      multipleSelection: [],
+      sellPriceSum: 0.00,
+      pricePvSum: 0.00,
+      taxSum: 0.00,
+      storeNums: [],
+      display: false,
+      currentPage: 1,
+      shoppingCartGoods: [],
 
-			visibleShoppingCart: false,
-			loading: false,
+      visibleShoppingCart: false,
+      loading: false,
 
-			goods: [],
-			payList: [],
-			cashCurrency: '',
-			currency: {},
-			pointsSum: 0,
-			pointFreight: 0,
-			freeShipping: '',
-			goodsId: '',
-			goodsNum: '',
-			payPassword: '',
-			submitButtonStat: false,
-			sn: '',
-			orderType: '',
-			payDialog: false,
-			totalAmount: 0.00,
-			freight: 0.00,
-			userBalance: {},
+      goods: [],
+      payList: [],
+      cashCurrency: '',
+      currency: {},
+      pointsSum: 0,
+      pointFreight: 0,
+      freeShipping: '',
+      goodsId: '',
+      goodsNum: '',
+      payPassword: '',
+      submitButtonStat: false,
+      sn: '',
+      orderType: '',
+      payDialog: false,
+      totalAmount: 0.00,
+      freight: 0.00,
+      userBalance: {},
 
-			payType: 'garage_points',
-			addressId: '',
-			selfPickUpAddressId: '100000000000000000',
-			shippingAddressList: [],
+      payType: 'garage_points',
+      addressId: '',
+      selfPickUpAddressId: '100000000000000000',
+      shippingAddressList: [],
 
-			screenWidth: getScreenWidth() > 600 ? '80%' : getScreenWidth() + 'px',
-			labelPosition: getScreenWidth() > 600 ? 'right' : 'top',
+      screenWidth: getScreenWidth() > 600 ? '80%' : getScreenWidth() + 'px',
+      labelPosition: getScreenWidth() > 600 ? 'right' : 'top',
 
-			visibleProduct: false,
-			product: {
-				GOODS_NAME: '',
-				GOODS_NO: '',
-				COVER: '',
-				SELL_PRICE: 0,
-				PRICE_PV: 0,
-				TAX_RATE: 0,
-				taxAmount: 0,
-			},
-			imageStyle: 'margin-top: -50px;',
-		}
-	},
-	created() {
-		this.getList()
-	},
-	mounted() {
-		// 支付方式、账户信息、余额
-		this.getShoppingCart()
-	},
-	methods: {
-		getList() {
-			this.listLoading = true
-			fetchProductList(this.listQuery).then(response => {
-				this.list = response.data.list
-				this.total = response.data.totalCount
+      visibleProduct: false,
+      product: {
+        GOODS_NAME: '',
+        GOODS_NO: '',
+        COVER: '',
+        SELL_PRICE: 0,
+        PRICE_PV: 0,
+        TAX_RATE: 0,
+        taxAmount: 0
+      },
+      imageStyle: 'margin-top: -50px;'
+    }
+  },
+  created() {
+    this.getList()
+  },
+  mounted() {
+    // 支付方式、账户信息、余额
+    this.getShoppingCart()
+  },
+  methods: {
+    getList() {
+      this.listLoading = true
+      fetchProductList(this.listQuery).then(response => {
+        this.list = response.data.list
+        this.total = response.data.totalCount
 
-				setTimeout(() => {
-					this.listLoading = false
-				}, 1.5 * 1000)
+        setTimeout(() => {
+          this.listLoading = false
+        }, 1.5 * 1000)
 
-				let settingObj = this.list
-				for (let i in this.list) {
-					this.storeNums[i] = 1
-					settingObj[i].chose_num = 0
-				}
+        const settingObj = this.list
+        for (const i in this.list) {
+          this.storeNums[i] = 1
+          settingObj[i].chose_num = 0
+        }
 
-				this.tableData = Object.values(settingObj)
-				let pageList = this.multipleSelection[this.currentPage]
-				this.$nextTick(function () {
-					for (let i in this.tableData) {
-						for( let j in  pageList) {
-							if( pageList[j].ID === this.tableData[i].ID ) {
-								this.$data.storeNums[i] = pageList[j].chose_num
-								this.tableData[i].chose_num = pageList[j].chose_num
-								break
-							}
-						}
-					}
-				})
-			})
-		},
-		// 选择商品计数
-		handleInputNumber(current, row){
-			let pageList = this.multipleSelection[this.listQuery.page]
-			let selectStatus = false
-			for (let i in pageList) {
-				if (pageList[i].ID === row.ID) {
-					pageList[i].chose_num = current
-					selectStatus = true
-					break
-				}
-			}
-			if (selectStatus) {
-				this.multipleSelection[this.listQuery.page] = pageList
-				this.handleSureChange()
-			}
-		},
-		// 统计商品
-		handleSureChange() {
-			if (this.multipleSelection.length > 0) {
-				let accumulatorSellPrice = 0, accumulatorPricePv = 0, accumulatorTax = 0
-				this.multipleSelection.forEach(item => {
-					item.forEach(accumulator => { accumulatorSellPrice += accumulator.SELL_PRICE * accumulator.chose_num * accumulator.DISCOUNT / 100; })
-					item.forEach(accumulator => { accumulatorPricePv += Number(accumulator.PRICE_PV) * Number(accumulator.chose_num) * (Number(accumulator.DISCOUNT) / 100); })
-					item.forEach(accumulator => { accumulatorTax += tool.calculateTax(Number(accumulator.SELL_PRICE), Number(accumulator.TAX_RATE), Number(accumulator.chose_num)); })
-				})
+        this.tableData = Object.values(settingObj)
+        const pageList = this.multipleSelection[this.currentPage]
+        this.$nextTick(function() {
+          for (const i in this.tableData) {
+            for (const j in pageList) {
+              if (pageList[j].ID === this.tableData[i].ID) {
+                this.$data.storeNums[i] = pageList[j].chose_num
+                this.tableData[i].chose_num = pageList[j].chose_num
+                break
+              }
+            }
+          }
+        })
+      })
+    },
+    // 选择商品计数
+    handleInputNumber(current, row) {
+      const pageList = this.multipleSelection[this.listQuery.page]
+      let selectStatus = false
+      for (const i in pageList) {
+        if (pageList[i].ID === row.ID) {
+          pageList[i].chose_num = current
+          selectStatus = true
+          break
+        }
+      }
+      if (selectStatus) {
+        this.multipleSelection[this.listQuery.page] = pageList
+        this.handleSureChange()
+      }
+    },
+    // 统计商品
+    handleSureChange() {
+      if (this.multipleSelection.length > 0) {
+        let accumulatorSellPrice = 0; let accumulatorPricePv = 0; let accumulatorTax = 0
+        this.multipleSelection.forEach(item => {
+          item.forEach(accumulator => { accumulatorSellPrice += accumulator.SELL_PRICE * accumulator.chose_num * accumulator.DISCOUNT / 100 })
+          item.forEach(accumulator => { accumulatorPricePv += Number(accumulator.PRICE_PV) * Number(accumulator.chose_num) * (Number(accumulator.DISCOUNT) / 100) })
+          item.forEach(accumulator => { accumulatorTax += tool.calculateTax(Number(accumulator.SELL_PRICE), Number(accumulator.TAX_RATE), Number(accumulator.chose_num)) })
+        })
 
-				this.sellPriceSum = tool.formatPrice(accumulatorSellPrice)
-				this.pricePvSum = tool.formatPrice(accumulatorPricePv)
-				this.taxSum = tool.formatPrice(accumulatorTax)
+        this.sellPriceSum = tool.formatPrice(accumulatorSellPrice)
+        this.pricePvSum = tool.formatPrice(accumulatorPricePv)
+        this.taxSum = tool.formatPrice(accumulatorTax)
 
-				this.display = true
-			} else {
-				this.sellPriceSum = this.pricePvSum = this.taxSum = 0.00
-				this.display = true
-			}
-		},
-		// 选择商品
-		handleSelectionChange(val) {
-			let idx = -1, num
-			for (let i in this.tableData) {
-				for (let v in val){
-					if (val[v].ID === this.tableData[i].ID) {
-						idx = i
-						num = this.storeNums[idx]
-						val[v]['chose_num'] = num
-						break
-					}
-				}
-			}
-			this.multipleSelection[this.listQuery.page] = val
-			// 计算统计
-			this.handleSureChange()
-		},
-		// 结算商品
-		settlement() {
-			if (this.multipleSelection.length <= 0) {
-				this.$message.error(this.$t('shop.chooseTips'))
-				return false
-			}
-			// 弹出购物车
-			this.visibleShoppingCart = true
-			// 展示购物车商品数据
-			this.getShowCart()
-		},
-		// 设置运费
-		setFreight() {
-			// 如果地址为自提,则运费为0
-			this.pointFreight = (this.addressId === this.selfPickUpAddressId) ? Number(0) : Number(this.freight);
-		},
-		// 表格合并
-		getSummaries(param) {
-			const {columns, data} = param
-			const sums = []
-			columns.forEach((column, index) => {
-				if (index === 0) {
-					sums[index] = this.$t('shop.total')
-					return
-				}
-				const values = data.map(item => Number(item[column.property]));
-				if ((!values.every(value => isNaN(value))) && [2, 3, 4, 6].includes(index)) {
-					sums[index] = values.reduce((prev, curr) => {
-						const value = Number(curr)
-						if (!isNaN(value)) {
-							return Math.round((prev + curr) * 100) / 100
-						} else {
-							return Math.round(prev * 100) / 100
-						}
-					}, 0);
-					if (index !== 2) {
-						sums[index] = sums[index]
-					}
-				}
-			});
+        this.display = true
+      } else {
+        this.sellPriceSum = this.pricePvSum = this.taxSum = 0.00
+        this.display = true
+      }
+    },
+    // 选择商品
+    handleSelectionChange(val) {
+      let idx = -1; let num
+      for (const i in this.tableData) {
+        for (const v in val) {
+          if (val[v].ID === this.tableData[i].ID) {
+            idx = i
+            num = this.storeNums[idx]
+            val[v]['chose_num'] = num
+            break
+          }
+        }
+      }
+      this.multipleSelection[this.listQuery.page] = val
+      // 计算统计
+      this.handleSureChange()
+    },
+    // 结算商品
+    settlement() {
+      if (this.multipleSelection.length <= 0) {
+        this.$message.error(this.$t('shop.chooseTips'))
+        return false
+      }
+      // 弹出购物车
+      this.visibleShoppingCart = true
+      // 展示购物车商品数据
+      this.getShowCart()
+    },
+    // 设置运费
+    setFreight() {
+      // 如果地址为自提,则运费为0
+      this.pointFreight = (this.addressId === this.selfPickUpAddressId) ? Number(0) : Number(this.freight)
+    },
+    // 表格合并
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = this.$t('shop.total')
+          return
+        }
+        const values = data.map(item => Number(item[column.property]))
+        if ((!values.every(value => isNaN(value))) && [2, 3, 4, 6].includes(index)) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr)
+            if (!isNaN(value)) {
+              return Math.round((prev + curr) * 100) / 100
+            } else {
+              return Math.round(prev * 100) / 100
+            }
+          }, 0)
+          if (index !== 2) {
+            sums[index] = sums[index]
+          }
+        }
+      })
 
-			return sums
-		},
-		// 支付方式、账户信息、余额
-		getShoppingCart() {
-			fetchShoppingCart({categoryType: this.listQuery.categoryType}).then(response => {
-				// 收货地址
-				this.shippingAddressList = response.data.allAddress
-				this.shippingAddressList.map(item => {
-					if (item.IS_DEFAULT === '1') {
-						this.addressId = item.ID
-					}
-				})
-				// 账户
-				this.userBalance = response.data.userBalance
-				// 支付方式处理
-				this.currency = response.data.payList
-				this.cashCurrency = response.data.payList[this.payType].name
-				// 支付方式
-				for (let item of response.data.sellType) {
-					if (item.id === this.listQuery.categoryType) {
-						this.payList = item.sell_type
-						break
-					}
-				}
-				// 免运费阈值
-				this.freeShipping = response.data.freeShipping
-				// 运费
-				this.freight = response.data.freight
-			})
-		},
-		// 关闭时清空购物车等信息
-		cleanShowCart() {
-			this.visibleShoppingCart = false
-			this.goods = []
-			this.totalAmount = 0.00
-			this.goodsNum = ''
-			this.goodsId = ''
-			this.pointFreight = 0
-			this.pointsSum = 0
-		},
-		// 支付
-		orderSubmit() {
-			// 账户余额
-			let amountBalance = this.userBalance[this.payType]
-			// 账户类型提示信息
-			let accountType = this.currency[this.payType].name
-			if (amountBalance < 0 || !accountType) {
-				this.$message({
-					message: this.$t('shop.paymentError'),
-					type: 'error'
-				})
-				return false
-			}
-			// 余额是否充足
-			if ((amountBalance - this.pointsSum) < 0) {
-				this.$message({
-					message: accountType + this.$t('shop.balanceNotAllow'),
-					type: 'error'
-				})
-				this.submitButtonStat = false
-				return false
-			}
+      return sums
+    },
+    // 支付方式、账户信息、余额
+    getShoppingCart() {
+      fetchShoppingCart({ categoryType: this.listQuery.categoryType }).then(response => {
+        // 收货地址
+        this.shippingAddressList = response.data.allAddress
+        this.shippingAddressList.map(item => {
+          if (item.IS_DEFAULT === '1') {
+            this.addressId = item.ID
+          }
+        })
+        // 账户
+        this.userBalance = response.data.userBalance
+        // 支付方式处理
+        this.currency = response.data.payList
+        this.cashCurrency = response.data.payList[this.payType].name
+        // 支付方式
+        for (const item of response.data.sellType) {
+          if (item.id === this.listQuery.categoryType) {
+            this.payList = item.sell_type
+            break
+          }
+        }
+        // 免运费阈值
+        this.freeShipping = response.data.freeShipping
+        // 运费
+        this.freight = response.data.freight
+      })
+    },
+    // 关闭时清空购物车等信息
+    cleanShowCart() {
+      this.visibleShoppingCart = false
+      this.goods = []
+      this.totalAmount = 0.00
+      this.goodsNum = ''
+      this.goodsId = ''
+      this.pointFreight = 0
+      this.pointsSum = 0
+    },
+    // 支付
+    orderSubmit() {
+      // 账户余额
+      const amountBalance = this.userBalance[this.payType]
+      // 账户类型提示信息
+      const accountType = this.currency[this.payType].name
+      if (amountBalance < 0 || !accountType) {
+        this.$message({
+          message: this.$t('shop.paymentError'),
+          type: 'error'
+        })
+        return false
+      }
+      // 余额是否充足
+      if ((amountBalance - this.pointsSum) < 0) {
+        this.$message({
+          message: accountType + this.$t('shop.balanceNotAllow'),
+          type: 'error'
+        })
+        this.submitButtonStat = false
+        return false
+      }
 
-			this.submitButtonStat = true
-			this.$prompt(this.$t('shop.inputPasswordTips'), this.$t('common.hint'), {
-				confirmButtonText: this.$t('common.confirm'),
-				cancelButtonText: this.$t('common.cancel'),
-				customClass: 'csClass',
-				type: 'info',
-				inputType: 'password',
-				inputPattern: /\S+/,
-				inputErrorMessage: this.$t('shop.inputPasswordTips')
-			}).then(({value}) => {
-				this.payPassword = value
-				let params = {
-					goodsId: this.goodsId,
-					goodsNum: this.goodsNum,
-					payPassword: this.payPassword,
-					email: usersInfo.userEmail(),
-					addressId: this.addressId,
-					address: this.address,
-					payType: this.payType,
-				}
+      this.submitButtonStat = true
+      this.$prompt(this.$t('shop.inputPasswordTips'), this.$t('common.hint'), {
+        confirmButtonText: this.$t('common.confirm'),
+        cancelButtonText: this.$t('common.cancel'),
+        customClass: 'csClass',
+        type: 'info',
+        inputType: 'password',
+        inputPattern: /\S+/,
+        inputErrorMessage: this.$t('shop.inputPasswordTips')
+      }).then(({ value }) => {
+        this.payPassword = value
+        const params = {
+          goodsId: this.goodsId,
+          goodsNum: this.goodsNum,
+          payPassword: this.payPassword,
+          email: usersInfo.userEmail(),
+          addressId: this.addressId,
+          address: this.address,
+          payType: this.payType
+        }
 
-				createOrder(params).then(() => {
-					this.submitButtonStat = false
-					this.$message({
-						message: this.$t('common.successfully'),
-						type: 'success',
-						duration: 5 * 1000
-					})
-					this.$router.push({path: `/shop/order-list`})
-				}).catch(err => {
-					this.$message({
-						message: err,
-						type: 'error',
-						duration: 5 * 1000
-					})
-					this.submitButtonStat = false
-				})
-			}).catch(err => {
-				this.submitButtonStat = false
-			})
-		},
-		// 计算价格
-		getSumMoney () {
-			let cash_plus_sum = [];
-			let goodsId = [];
-			let goodsNum = [];
-			let choseNum = 0;
-			this.goods.map(item => {
-				choseNum = Number(item.chose_num);
-				if (choseNum > 0) {
-					cash_plus_sum.push(item.SELL_PRICE * choseNum * (item.DISCOUNT / 100));
-					goodsId.push(item.ID);
-					goodsNum.push(choseNum);
-				}
-			})
-			this.goodsNum = goodsNum;
-			this.goodsId = goodsId;
-			// 增加运费
-			let payAmount = tool.sum(cash_plus_sum);
-			// 设置运费
-			this.setFreight();
-			// 商品总价大于预定值,免运费
-			this.pointFreight = (this.pointFreight > 0) ? ((payAmount >= this.freeShipping) ? 0 : this.freight) : 0
-			// 计算总价
-			this.pointsSum = tool.formatPrice(tool.sum(cash_plus_sum) + this.pointFreight) ;
-		},
-		// 展示购物车信息
-		getShowCart () {
-			let orderGoods = this.multipleSelection
-			let cartGoods = []
-			for (let i in orderGoods) {
-				cartGoods = orderGoods[i]
-				if (!cartGoods) continue
+        createOrder(params).then(() => {
+          this.submitButtonStat = false
+          this.$message({
+            message: this.$t('common.successfully'),
+            type: 'success',
+            duration: 5 * 1000
+          })
+          this.$router.push({ path: `/shop/own-order` })
+        }).catch(err => {
+          this.$message({
+            message: err,
+            type: 'error',
+            duration: 5 * 1000
+          })
+          this.submitButtonStat = false
+        })
+      }).catch(err => {
+        this.submitButtonStat = false
+      })
+    },
+    // 计算价格
+    getSumMoney() {
+      const cash_plus_sum = []
+      const goodsId = []
+      const goodsNum = []
+      let choseNum = 0
+      this.goods.map(item => {
+        choseNum = Number(item.chose_num)
+        if (choseNum > 0) {
+          cash_plus_sum.push(item.SELL_PRICE * choseNum * (item.DISCOUNT / 100))
+          goodsId.push(item.ID)
+          goodsNum.push(choseNum)
+        }
+      })
+      this.goodsNum = goodsNum
+      this.goodsId = goodsId
+      // 增加运费
+      const payAmount = tool.sum(cash_plus_sum)
+      // 设置运费
+      this.setFreight()
+      // 商品总价大于预定值,免运费
+      this.pointFreight = (this.pointFreight > 0) ? ((payAmount >= this.freeShipping) ? 0 : this.freight) : 0
+      // 计算总价
+      this.pointsSum = tool.formatPrice(tool.sum(cash_plus_sum) + this.pointFreight)
+    },
+    // 展示购物车信息
+    getShowCart() {
+      const orderGoods = this.multipleSelection
+      let cartGoods = []
+      for (const i in orderGoods) {
+        cartGoods = orderGoods[i]
+        if (!cartGoods) continue
 
-				cartGoods.map(item => {
-					if (Number(item.chose_num) > 0) {
-						let discount = item.DISCOUNT / 100
-						item.member_price = Math.round(item.SELL_PRICE * discount * 100) / 100;
-						item.member_price_plus = Math.round(item.SELL_PRICE * Number(item.chose_num) * discount * 100) / 100;
-						item.tax_amount_plus = Math.round((item.member_price - item.member_price / (1 + item.TAX_RATE / 100)) * item.chose_num * 100) / 100;
-						this.goods.push(item)
-						this.totalAmount += item.member_price_plus
-					}
-				})
-			}
+        cartGoods.map(item => {
+          if (Number(item.chose_num) > 0) {
+            const discount = item.DISCOUNT / 100
+            item.member_price = Math.round(item.SELL_PRICE * discount * 100) / 100
+            item.member_price_plus = Math.round(item.SELL_PRICE * Number(item.chose_num) * discount * 100) / 100
+            item.tax_amount_plus = Math.round((item.member_price - item.member_price / (1 + item.TAX_RATE / 100)) * item.chose_num * 100) / 100
+            this.goods.push(item)
+            this.totalAmount += item.member_price_plus
+          }
+        })
+      }
 
-			this.goods = cartGoods
+      this.goods = cartGoods
 
-			// 计算价格
-			this.getSumMoney();
-		},
-		// 选择收货地址
-		choseAddress (addressId) {
-			this.addressId = addressId
-			// 设置运费
-			this.setFreight()
-			// 计算价格
-			this.getSumMoney()
-		},
-		// 切换支付方式
-		chosePayType(type) {
-			this.payType = type
-		},
-		// 商品详情
-		handleProduct(row) {
-			this.product = row
-			this.product.taxAmount = tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
-			this.visibleProduct = true
-		},
-	},
+      // 计算价格
+      this.getSumMoney()
+    },
+    // 选择收货地址
+    choseAddress(addressId) {
+      this.addressId = addressId
+      // 设置运费
+      this.setFreight()
+      // 计算价格
+      this.getSumMoney()
+    },
+    // 切换支付方式
+    chosePayType(type) {
+      this.payType = type
+    },
+    // 商品详情
+    handleProduct(row) {
+      this.product = row
+      this.product.taxAmount = tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
+      this.visibleProduct = true
+    }
+  }
 }
 </script>
 

+ 8 - 7
src/views/shop/reconsume.vue

@@ -73,13 +73,14 @@
                       <el-col :xs="20" :sm="8" :lg="8">
                         <span style="font-weight: bold;">{{ $t('currency.sign') }} {{ row.member_price | toThousandFilter }}</span>
                         <!-- <span style="font-weight:normal; color: #606266;">({{ row.PRICE_PV | toThousandFilter }}{{ $t('shop.productBV') }})</span> -->
-
+                        <span>({{ row.PRICE_PV | toThousandFilter }}{{ $t('shop.productBV') }})</span><br>
                       </el-col>
                       <el-col :xs="8" :sm="3" :lg="3">
                         <span style="">x {{ row.chose_num }}</span>
                       </el-col>
                       <el-col :xs="24" :sm="5" :lg="5">
                         <span style="color: tomato; font-weight: bold;">{{ $t('currency.sign') }} {{ row.member_price_plus | toThousandFilter }}</span>
+                        <span>({{ row.PRICE_PV | toThousandFilter }}{{ $t('shop.productBV') }})</span><br>
                       </el-col>
                     </el-row>
                   </el-main>
@@ -96,7 +97,7 @@
                   <span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.totalOrders') }}:</span>
                 </el-col>
                 <el-col :xs="24" :sm="24" :lg="21" style="word-break: normal; white-space: nowrap; line-height: 28px;">
-                  <span>{{ $t('shop.total') }}:{{ $t('currency.sign') }} {{ parseFloat(cashSum) | toThousandFilter }}</span><br>
+                  <span>{{ $t('shop.total') }}:{{ $t('currency.sign') }} {{ parseFloat(cashSum) | toThousandFilter }}({{ pricePvSum | toThousandFilter }}{{ $t('shop.productBV') }})</span><br>
                   <span>{{ $t('shop.freight') }}:{{ $t('currency.sign') }} {{ pointFreight }}</span>
                 </el-col>
               </el-row>
@@ -253,11 +254,11 @@
 
 <script>
 import {
-createApproachReconsumeOrder,
-createReconsumeOrder,
-deleteApproachOrder,
-fetchReconsumeProductList,
-fetchShoppingCart
+  createApproachReconsumeOrder,
+  createReconsumeOrder,
+  deleteApproachOrder,
+  fetchReconsumeProductList,
+  fetchShoppingCart
 } from '@/api/shop'
 import { fetchFullInfo } from '@/api/user'
 import Pagination from '@/components/Pagination'

+ 3 - 1
src/views/shop/standard-products.vue

@@ -72,12 +72,14 @@
                       </el-col>
                       <el-col :xs="16" :sm="4" :lg="4">
                         <span style="font-weight: bold;">{{ $t('currency.sign') }} {{ row.member_price | toThousandFilter }}</span>
+                        <span>({{ row.PRICE_PV | toThousandFilter }}{{ $t('shop.productBV') }})</span><br>
                       </el-col>
                       <el-col :xs="8" :sm="3" :lg="3">
                         <span style="">x {{ row.chose_num }}</span>
                       </el-col>
                       <el-col :xs="24" :sm="5" :lg="5">
                         <span style="color: tomato; font-weight: bold;">{{ $t('currency.sign') }} {{ row.member_price_plus | toThousandFilter }}</span>
+                        <span style="color: tomato;">({{ row.PRICE_PV | toThousandFilter }}{{ $t('shop.productBV') }})</span><br>
                       </el-col>
                     </el-row>
                   </el-main>
@@ -94,7 +96,7 @@
                   <span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.totalOrders') }}:</span>
                 </el-col>
                 <el-col :xs="24" :sm="24" :lg="21" style="word-break: normal; white-space: nowrap; line-height: 28px;">
-                  <span>{{ $t('shop.total') }}:{{ $t('currency.sign') }} {{ parseFloat(cashSum) | toThousandFilter }}</span><br>
+                  <span>{{ $t('shop.total') }}:{{ $t('currency.sign') }} {{ parseFloat(cashSum) | toThousandFilter }}({{ pricePvSum | toThousandFilter }}{{ $t('shop.productBV') }})</span><br>
                   <span>{{ $t('shop.freight') }}:{{ $t('currency.sign') }} {{ pointFreight }}</span>
                 </el-col>
               </el-row>

+ 541 - 541
src/views/shop/villa-fund-products.vue

@@ -1,574 +1,574 @@
 <template>
-	<div class="app-container">
-		<el-table :data="tableData" :show-header="false" :key="tableKey" v-loading="listLoading" fit ref="multipleTable" @selection-change="handleSelectionChange">
-			<el-table-column type="selection" width="30" align="center"></el-table-column>
-			<el-table-column align="center">
-				<template slot-scope="{row, $index}">
-					<el-container>
-						<el-aside width="80px" style="background-color: #ffffff; padding: 0; margin-bottom: 0;">
-							<el-image style="width: 80px; height: 80px" :src="tool.getArImage(row.COVER, '/files/')" @click="handleProduct(row)"></el-image>
-						</el-aside>
-						<el-main style="padding: 5px 5px; text-align: left;">
-							<el-row :gutter="10">
-								<el-col :xs="24" :sm="24" :lg="6">
-									<span style="cursor: pointer;" @click="handleProduct(row)">{{ row.GOODS_NAME }}</span>
-								</el-col>
-								<el-col :xs="24" :sm="24" :lg="4">
-									<span style="color: #9c9c9c; cursor: pointer;">{{ row.GOODS_NO }}</span>
-								</el-col>
-								<el-col :xs="24" :sm="24" :lg="5">
-								<span style="font-size: 13px;">
-									<span style="font-weight: bold; color: tomato;">{{ $t('shop.productPrice') }}:{{ row.SELL_PRICE | toThousandFilter }}</span>
-								</span>
-								</el-col>
-								<el-col :xs="24" :sm="24" :lg="4">
-									<span style="font-size: 13px;">{{ $t('shop.inventory') }}:{{ row.STORE_NUMS }}</span>
-								</el-col>
-								<el-col :xs="24" :sm="24" :lg="5">
-									<el-input-number size="mini" v-model="storeNums[$index]" :min="1" :max="Number(row.STORE_NUMS)" @change="handleInputNumber($event, row)"></el-input-number>
-								</el-col>
-							</el-row>
-						</el-main>
-					</el-container>
-				</template>
-			</el-table-column>
-		</el-table>
+  <div class="app-container">
+    <el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="tableData" :show-header="false" fit @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="30" align="center" />
+      <el-table-column align="center">
+        <template slot-scope="{row, $index}">
+          <el-container>
+            <el-aside width="80px" style="background-color: #ffffff; padding: 0; margin-bottom: 0;">
+              <el-image style="width: 80px; height: 80px" :src="tool.getArImage(row.COVER, '/files/')" @click="handleProduct(row)" />
+            </el-aside>
+            <el-main style="padding: 5px 5px; text-align: left;">
+              <el-row :gutter="10">
+                <el-col :xs="24" :sm="24" :lg="6">
+                  <span style="cursor: pointer;" @click="handleProduct(row)">{{ row.GOODS_NAME }}</span>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="4">
+                  <span style="color: #9c9c9c; cursor: pointer;">{{ row.GOODS_NO }}</span>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="5">
+                  <span style="font-size: 13px;">
+                    <span style="font-weight: bold; color: tomato;">{{ $t('shop.productPrice') }}:{{ row.SELL_PRICE | toThousandFilter }}</span>
+                  </span>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="4">
+                  <span style="font-size: 13px;">{{ $t('shop.inventory') }}:{{ row.STORE_NUMS }}</span>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="5">
+                  <el-input-number v-model="storeNums[$index]" size="mini" :min="1" :max="Number(row.STORE_NUMS)" @change="handleInputNumber($event, row)" />
+                </el-col>
+              </el-row>
+            </el-main>
+          </el-container>
+        </template>
+      </el-table-column>
+    </el-table>
 
-		<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
+    <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
 
-		<div class="white-box-footer" style="margin-top: 15px;" v-show="total>0">
-			<div class="flex data" style="float: left; display: inline-block; margin-top: 20px;">
-				<el-button type="primary" size="small" @click="settlement()" style="float: left;">{{ $t('shop.checkOut') }}</el-button>
-			</div>
-			<div class="flex data" style="float: right; display: inline-block; line-height: 28px; font-size: 14px; margin-top: 10px; border: 1px solid #dcdfe6; border-radius: 4px; padding: 0 5px;">
-				<div style="margin-right: 2rem; display: inline-block;">{{ $t('shop.productPrice') }}:{{ $t('currency.sign') }} {{ sellPriceSum | toThousandFilter }}</div>
-				<div style="display: inline-block;">{{ $t('shop.taxAmount') }}:{{ $t('currency.sign') }} {{ taxSum | toThousandFilter }}</div>
-			</div>
-		</div>
+    <div v-show="total>0" class="white-box-footer" style="margin-top: 15px;">
+      <div class="flex data" style="float: left; display: inline-block; margin-top: 20px;">
+        <el-button type="primary" size="small" style="float: left;" @click="settlement()">{{ $t('shop.checkOut') }}</el-button>
+      </div>
+      <div class="flex data" style="float: right; display: inline-block; line-height: 28px; font-size: 14px; margin-top: 10px; border: 1px solid #dcdfe6; border-radius: 4px; padding: 0 5px;">
+        <div style="margin-right: 2rem; display: inline-block;">{{ $t('shop.productPrice') }}:{{ $t('currency.sign') }} {{ sellPriceSum | toThousandFilter }}</div>
+        <div style="display: inline-block;">{{ $t('shop.taxAmount') }}:{{ $t('currency.sign') }} {{ taxSum | toThousandFilter }}</div>
+      </div>
+    </div>
 
-		<!-- 购物车	-->
-		<el-dialog :title="$t('shop.productsSettlement')" :visible.sync="visibleShoppingCart" :width="screenWidth" style="margin-top: -95px;" :close="cleanShowCart" :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false">
-			<div v-loading="loading">
-				<div class="white-box">
-					<el-table :data="goods" :show-header="false">
-						<el-table-column align="center">
-							<template slot-scope="{row}">
-								<el-container>
-									<el-aside width="100px" style="background-color: #ffffff; padding: 0; margin-bottom: 0;">
-										<el-image style="width: 100px; height: 100px" :src="tool.getArImage(row.COVER, '/files/')" @click="handleProduct(row)"></el-image>
-									</el-aside>
-									<el-main style="padding: 10px 5px; text-align: left;">
-										<el-row :gutter="10">
-											<el-col :xs="24" :sm="8" :lg="8">
-												<span style="cursor: pointer;" @click="handleProduct(row)">{{ row.GOODS_NAME }}</span>
-											</el-col>
-											<el-col :xs="24" :sm="4" :lg="4">
-												<span style="color: #9c9c9c; cursor: pointer;">{{ row.GOODS_NO }}</span>
-											</el-col>
-											<el-col :xs="16" :sm="4" :lg="4">
-												<span style="font-weight: bold;">{{ row.member_price | toThousandFilter }}</span>
-											</el-col>
-											<el-col :xs="8" :sm="3" :lg="3">
-												<span style="">x {{ row.chose_num }}</span>
-											</el-col>
-											<el-col :xs="24" :sm="5" :lg="5">
-												<span style="color: tomato; font-weight: bold;">{{ row.member_price_plus | toThousandFilter }}</span>
-											</el-col>
-										</el-row>
-									</el-main>
-								</el-container>
-							</template>
-						</el-table-column>
-					</el-table>
+    <!-- 购物车	-->
+    <el-dialog :title="$t('shop.productsSettlement')" :visible.sync="visibleShoppingCart" :width="screenWidth" style="margin-top: -95px;" :close="cleanShowCart" :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false">
+      <div v-loading="loading">
+        <div class="white-box">
+          <el-table :data="goods" :show-header="false">
+            <el-table-column align="center">
+              <template slot-scope="{row}">
+                <el-container>
+                  <el-aside width="100px" style="background-color: #ffffff; padding: 0; margin-bottom: 0;">
+                    <el-image style="width: 100px; height: 100px" :src="tool.getArImage(row.COVER, '/files/')" @click="handleProduct(row)" />
+                  </el-aside>
+                  <el-main style="padding: 10px 5px; text-align: left;">
+                    <el-row :gutter="10">
+                      <el-col :xs="24" :sm="8" :lg="8">
+                        <span style="cursor: pointer;" @click="handleProduct(row)">{{ row.GOODS_NAME }}</span>
+                      </el-col>
+                      <el-col :xs="24" :sm="4" :lg="4">
+                        <span style="color: #9c9c9c; cursor: pointer;">{{ row.GOODS_NO }}</span>
+                      </el-col>
+                      <el-col :xs="16" :sm="4" :lg="4">
+                        <span style="font-weight: bold;">{{ row.member_price | toThousandFilter }}</span>
+                      </el-col>
+                      <el-col :xs="8" :sm="3" :lg="3">
+                        <span style="">x {{ row.chose_num }}</span>
+                      </el-col>
+                      <el-col :xs="24" :sm="5" :lg="5">
+                        <span style="color: tomato; font-weight: bold;">{{ row.member_price_plus | toThousandFilter }}</span>
+                      </el-col>
+                    </el-row>
+                  </el-main>
+                </el-container>
+              </template>
+            </el-table-column>
+          </el-table>
 
-					<div class="white-box-footer">
-						<!-- 订单合计 -->
-						<div class="" style="margin: 15px 0;">
-							<el-row :gutter="20">
-								<el-col :xs="24" :sm="24" :lg="3">
-									<span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.totalOrders') }}:</span>
-								</el-col>
-								<el-col :xs="24" :sm="24" :lg="21" style="word-break: normal; white-space: nowrap; line-height: 28px;">
-									<span>{{ $t('shop.total') }}:{{ parseFloat(pointsSum) | toThousandFilter }}</span>
-									<span>{{ $t('shop.freight') }}:{{ pointFreight }}</span>
-								</el-col>
-							</el-row>
-						</div>
-						<el-divider></el-divider>
-						<!-- 支付方式/账户余额 {{ cashCurrency }}:  -->
-						<div class="" style="margin: 15px 0;">
-							<el-row :gutter="20" type="flex" style="flex-wrap: wrap;">
-								<el-col :xs="24" :sm="24" :lg="3">
-									<span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.selectPayment') }}:</span>
-								</el-col>
-								<el-col :xs="24" :sm="24" :lg="21" style="word-break: normal; white-space: nowrap;">
-									<el-radio-group v-model="payType" @change='chosePayType'>
-										<div v-for="(item, index) in payList" :key='index' class="address">
-											<el-radio :label="item.label" border>
-												{{ item.name }}<span v-if="item.label === payType" style="color: tomato;">({{ userBalance[payType] | toThousandFilter }})</span>
-											</el-radio>
-										</div>
-									</el-radio-group>
-								</el-col>
-							</el-row>
-						</div>
-						<el-divider></el-divider>
-						<!-- 收货地址 -->
-						<div class="" style="margin: 15px 0;">
-							<el-row :gutter="10" type="flex" style="flex-wrap: wrap;">
-								<el-col :xs="24" :sm="24" :lg="3">
-									<span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.selectAddress') }}:</span>
-								</el-col>
-								<el-col :xs="24" :sm="24" :lg="21" style="word-break: normal; white-space: nowrap;">
-									<el-radio-group v-model="addressId" @change='choseAddress'>
-										<div class="address">
-											<el-radio :label="selfPickUpAddressId">{{ $t('shop.selfPickUp') }}</el-radio>
-										</div>
-										<div v-for="(item, index) in shippingAddressList" :key='index' class="address">
-											<el-radio :label="item.ID" style="word-break: break-all; white-space: normal;">
-												<span>{{item.ADDRESS}}, {{item.LGA_NAME}}, {{item.PROVINCE_NAME}}</span>
-												<el-divider direction="vertical"></el-divider>
-												<span>{{item.MOBILE}}</span>
-												<el-divider direction="vertical"></el-divider>
-												<span>{{item.CONSIGNEE}}</span>
-											</el-radio>
-										</div>
-									</el-radio-group>
-								</el-col>
-							</el-row>
-						</div>
-					</div>
+          <div class="white-box-footer">
+            <!-- 订单合计 -->
+            <div class="" style="margin: 15px 0;">
+              <el-row :gutter="20">
+                <el-col :xs="24" :sm="24" :lg="3">
+                  <span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.totalOrders') }}:</span>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="21" style="word-break: normal; white-space: nowrap; line-height: 28px;">
+                  <span>{{ $t('shop.total') }}:{{ parseFloat(pointsSum) | toThousandFilter }}</span>
+                  <span>{{ $t('shop.freight') }}:{{ pointFreight }}</span>
+                </el-col>
+              </el-row>
+            </div>
+            <el-divider />
+            <!-- 支付方式/账户余额 {{ cashCurrency }}:  -->
+            <div class="" style="margin: 15px 0;">
+              <el-row :gutter="20" type="flex" style="flex-wrap: wrap;">
+                <el-col :xs="24" :sm="24" :lg="3">
+                  <span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.selectPayment') }}:</span>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="21" style="word-break: normal; white-space: nowrap;">
+                  <el-radio-group v-model="payType" @change="chosePayType">
+                    <div v-for="(item, index) in payList" :key="index" class="address">
+                      <el-radio :label="item.label" border>
+                        {{ item.name }}<span v-if="item.label === payType" style="color: tomato;">({{ userBalance[payType] | toThousandFilter }})</span>
+                      </el-radio>
+                    </div>
+                  </el-radio-group>
+                </el-col>
+              </el-row>
+            </div>
+            <el-divider />
+            <!-- 收货地址 -->
+            <div class="" style="margin: 15px 0;">
+              <el-row :gutter="10" type="flex" style="flex-wrap: wrap;">
+                <el-col :xs="24" :sm="24" :lg="3">
+                  <span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.selectAddress') }}:</span>
+                </el-col>
+                <el-col :xs="24" :sm="24" :lg="21" style="word-break: normal; white-space: nowrap;">
+                  <el-radio-group v-model="addressId" @change="choseAddress">
+                    <div class="address">
+                      <el-radio :label="selfPickUpAddressId">{{ $t('shop.selfPickUp') }}</el-radio>
+                    </div>
+                    <div v-for="(item, index) in shippingAddressList" :key="index" class="address">
+                      <el-radio :label="item.ID" style="word-break: break-all; white-space: normal;">
+                        <span>{{ item.ADDRESS }}, {{ item.LGA_NAME }}, {{ item.PROVINCE_NAME }}</span>
+                        <el-divider direction="vertical" />
+                        <span>{{ item.MOBILE }}</span>
+                        <el-divider direction="vertical" />
+                        <span>{{ item.CONSIGNEE }}</span>
+                      </el-radio>
+                    </div>
+                  </el-radio-group>
+                </el-col>
+              </el-row>
+            </div>
+          </div>
 
-					<div class="white-box-footer" >
-						<el-row :gutter="40">
-							<el-col :xs="24" :sm="24" :lg="24" align="left">
-								<el-button type="warning"  size="small" @click="cleanShowCart">{{ $t('shop.goBack') }}</el-button>
-								<el-button type="primary" size="small" @click="orderSubmit" :loading="submitButtonStat">{{ $t('shop.goPay') }}</el-button>
-							</el-col>
-						</el-row>
-					</div>
-				</div>
-			</div>
-		</el-dialog>
+          <div class="white-box-footer">
+            <el-row :gutter="40">
+              <el-col :xs="24" :sm="24" :lg="24" align="left">
+                <el-button type="warning" size="small" @click="cleanShowCart">{{ $t('shop.goBack') }}</el-button>
+                <el-button type="primary" size="small" :loading="submitButtonStat" @click="orderSubmit">{{ $t('shop.goPay') }}</el-button>
+              </el-col>
+            </el-row>
+          </div>
+        </div>
+      </div>
+    </el-dialog>
 
-		<!-- 商品详情 -->
-		<el-dialog :title="product.GOODS_NO" :visible.sync="visibleProduct" :width="screenWidth" style="margin-top: -95px;">
-			<el-row :gutter="20">
-				<el-col :xs="24" :sm="12" :lg="12">
-					<el-image style="width: 100%; height: 100%" :style="imageStyle" :src="tool.getArImage(product.COVER, '/files/')"></el-image>
-				</el-col>
-				<el-col :xs="24" :sm="12" :lg="12">
-					<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') }}:{{ product.SELL_PRICE | toThousandFilter }}</span><br />
-						<span>{{ $t('shop.taxRate') }}:{{ product.TAX_RATE / 100 }}</span><br />
-						<span>{{ $t('shop.taxAmount') }}:{{ product.taxAmount | toThousandFilter }}</span><br />
-						<span>{{ $t('shop.inventory') }}:{{ product.STORE_NUMS }}</span>
-					</div>
-				</el-col>
-			</el-row>
-		</el-dialog>
-	</div>
+    <!-- 商品详情 -->
+    <el-dialog :title="product.GOODS_NO" :visible.sync="visibleProduct" :width="screenWidth" style="margin-top: -95px;">
+      <el-row :gutter="20">
+        <el-col :xs="24" :sm="12" :lg="12">
+          <el-image style="width: 100%; height: 100%" :style="imageStyle" :src="tool.getArImage(product.COVER, '/files/')" />
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12">
+          <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') }}:{{ product.SELL_PRICE | toThousandFilter }}</span><br>
+            <span>{{ $t('shop.taxRate') }}:{{ product.TAX_RATE / 100 }}</span><br>
+            <span>{{ $t('shop.taxAmount') }}:{{ product.taxAmount | toThousandFilter }}</span><br>
+            <span>{{ $t('shop.inventory') }}:{{ product.STORE_NUMS }}</span>
+          </div>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-import {fetchProductList, fetchShoppingCart, createOrder} from '@/api/shop'
+import { createOrder, fetchProductList, fetchShoppingCart } from '@/api/shop'
+import Pagination from '@/components/Pagination'
 import waves from '@/directive/waves'
-import {formatAmount, getMedia, getScreenWidth} from '@/utils'
+import { getScreenWidth } from '@/utils'
 import tool from '@/utils/tool'
-import Pagination from '@/components/Pagination'
-import usersInfo from "@/utils/usersInfo";
+import usersInfo from '@/utils/usersInfo'
 
 export default {
-	name: 'VillaFundProducts',
-	components: { Pagination },
-	directives: { waves },
-	filters: {
-		priceFilter(price) {
-			return tool.formatPrice(price)
-		},
-		taxAmountFilter(row) {
-			return tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
-		},
-		statusFilter(status) {
-			const statusMap = {
-				Unpaid: 'info',
-				Paid: 'success',
-			}
-			return statusMap[status]
-		},
-	},
-	data() {
-		return {
-			tableKey: 0,
-			list: [],
-			total: 0,
-			tableData: [],
-			listLoading: true,
-			listQuery: {
-				categoryType: 6,
-				page: 1,
-				limit: 50,
-			},
-			tool: tool,
-			multipleSelection: [],
-			sellPriceSum: 0.00,
-			pricePvSum: 0.00,
-			taxSum: 0.00,
-			storeNums: [],
-			display: false,
-			currentPage: 1,
-			shoppingCartGoods: [],
+  name: 'VillaFundProducts',
+  components: { Pagination },
+  directives: { waves },
+  filters: {
+    priceFilter(price) {
+      return tool.formatPrice(price)
+    },
+    taxAmountFilter(row) {
+      return tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
+    },
+    statusFilter(status) {
+      const statusMap = {
+        Unpaid: 'info',
+        Paid: 'success'
+      }
+      return statusMap[status]
+    }
+  },
+  data() {
+    return {
+      tableKey: 0,
+      list: [],
+      total: 0,
+      tableData: [],
+      listLoading: true,
+      listQuery: {
+        categoryType: 6,
+        page: 1,
+        limit: 50
+      },
+      tool: tool,
+      multipleSelection: [],
+      sellPriceSum: 0.00,
+      pricePvSum: 0.00,
+      taxSum: 0.00,
+      storeNums: [],
+      display: false,
+      currentPage: 1,
+      shoppingCartGoods: [],
 
-			visibleShoppingCart: false,
-			loading: false,
+      visibleShoppingCart: false,
+      loading: false,
 
-			goods: [],
-			payList: [],
-			cashCurrency: '',
-			currency: {},
-			pointsSum: 0,
-			pointFreight: 0,
-			freeShipping: '',
-			goodsId: '',
-			goodsNum: '',
-			payPassword: '',
-			submitButtonStat: false,
-			sn: '',
-			orderType: '',
-			payDialog: false,
-			totalAmount: 0.00,
-			freight: 0.00,
-			userBalance: {},
+      goods: [],
+      payList: [],
+      cashCurrency: '',
+      currency: {},
+      pointsSum: 0,
+      pointFreight: 0,
+      freeShipping: '',
+      goodsId: '',
+      goodsNum: '',
+      payPassword: '',
+      submitButtonStat: false,
+      sn: '',
+      orderType: '',
+      payDialog: false,
+      totalAmount: 0.00,
+      freight: 0.00,
+      userBalance: {},
 
-			payType: 'villa_points',
-			addressId: '',
-			selfPickUpAddressId: '100000000000000000',
-			shippingAddressList: [],
+      payType: 'villa_points',
+      addressId: '',
+      selfPickUpAddressId: '100000000000000000',
+      shippingAddressList: [],
 
-			screenWidth: getScreenWidth() > 600 ? '80%' : getScreenWidth() + 'px',
-			labelPosition: getScreenWidth() > 600 ? 'right' : 'top',
+      screenWidth: getScreenWidth() > 600 ? '80%' : getScreenWidth() + 'px',
+      labelPosition: getScreenWidth() > 600 ? 'right' : 'top',
 
-			visibleProduct: false,
-			product: {
-				GOODS_NAME: '',
-				GOODS_NO: '',
-				COVER: '',
-				SELL_PRICE: 0,
-				PRICE_PV: 0,
-				TAX_RATE: 0,
-				taxAmount: 0,
-			},
-			imageStyle: 'margin-top: -50px;',
-		}
-	},
-	created() {
-		this.getList()
-	},
-	mounted() {
-		// 支付方式、账户信息、余额
-		this.getShoppingCart()
-	},
-	methods: {
-		getList() {
-			this.listLoading = true
-			fetchProductList(this.listQuery).then(response => {
-				this.list = response.data.list
-				this.total = response.data.totalCount
+      visibleProduct: false,
+      product: {
+        GOODS_NAME: '',
+        GOODS_NO: '',
+        COVER: '',
+        SELL_PRICE: 0,
+        PRICE_PV: 0,
+        TAX_RATE: 0,
+        taxAmount: 0
+      },
+      imageStyle: 'margin-top: -50px;'
+    }
+  },
+  created() {
+    this.getList()
+  },
+  mounted() {
+    // 支付方式、账户信息、余额
+    this.getShoppingCart()
+  },
+  methods: {
+    getList() {
+      this.listLoading = true
+      fetchProductList(this.listQuery).then(response => {
+        this.list = response.data.list
+        this.total = response.data.totalCount
 
-				setTimeout(() => {
-					this.listLoading = false
-				}, 1.5 * 1000)
+        setTimeout(() => {
+          this.listLoading = false
+        }, 1.5 * 1000)
 
-				let settingObj = this.list
-				for (let i in this.list) {
-					this.storeNums[i] = 1
-					settingObj[i].chose_num = 0
-				}
+        const settingObj = this.list
+        for (const i in this.list) {
+          this.storeNums[i] = 1
+          settingObj[i].chose_num = 0
+        }
 
-				this.tableData = Object.values(settingObj)
-				let pageList = this.multipleSelection[this.currentPage]
-				this.$nextTick(function () {
-					for (let i in this.tableData) {
-						for( let j in  pageList) {
-							if( pageList[j].ID === this.tableData[i].ID ) {
-								this.$data.storeNums[i] = pageList[j].chose_num
-								this.tableData[i].chose_num = pageList[j].chose_num
-								break
-							}
-						}
-					}
-				})
-			})
-		},
-		// 选择商品计数
-		handleInputNumber(current, row){
-			let pageList = this.multipleSelection[this.listQuery.page]
-			let selectStatus = false
-			for (let i in pageList) {
-				if (pageList[i].ID === row.ID) {
-					pageList[i].chose_num = current
-					selectStatus = true
-					break
-				}
-			}
-			if (selectStatus) {
-				this.multipleSelection[this.listQuery.page] = pageList
-				this.handleSureChange()
-			}
-		},
-		// 统计商品
-		handleSureChange() {
-			if (this.multipleSelection.length > 0) {
-				let accumulatorSellPrice = 0, accumulatorPricePv = 0, accumulatorTax = 0
-				this.multipleSelection.forEach(item => {
-					item.forEach(accumulator => { accumulatorSellPrice += accumulator.SELL_PRICE * accumulator.chose_num * accumulator.DISCOUNT / 100; })
-					item.forEach(accumulator => { accumulatorPricePv += Number(accumulator.PRICE_PV) * Number(accumulator.chose_num) * (Number(accumulator.DISCOUNT) / 100); })
-					item.forEach(accumulator => { accumulatorTax += tool.calculateTax(Number(accumulator.SELL_PRICE), Number(accumulator.TAX_RATE), Number(accumulator.chose_num)); })
-				})
+        this.tableData = Object.values(settingObj)
+        const pageList = this.multipleSelection[this.currentPage]
+        this.$nextTick(function() {
+          for (const i in this.tableData) {
+            for (const j in pageList) {
+              if (pageList[j].ID === this.tableData[i].ID) {
+                this.$data.storeNums[i] = pageList[j].chose_num
+                this.tableData[i].chose_num = pageList[j].chose_num
+                break
+              }
+            }
+          }
+        })
+      })
+    },
+    // 选择商品计数
+    handleInputNumber(current, row) {
+      const pageList = this.multipleSelection[this.listQuery.page]
+      let selectStatus = false
+      for (const i in pageList) {
+        if (pageList[i].ID === row.ID) {
+          pageList[i].chose_num = current
+          selectStatus = true
+          break
+        }
+      }
+      if (selectStatus) {
+        this.multipleSelection[this.listQuery.page] = pageList
+        this.handleSureChange()
+      }
+    },
+    // 统计商品
+    handleSureChange() {
+      if (this.multipleSelection.length > 0) {
+        let accumulatorSellPrice = 0; let accumulatorPricePv = 0; let accumulatorTax = 0
+        this.multipleSelection.forEach(item => {
+          item.forEach(accumulator => { accumulatorSellPrice += accumulator.SELL_PRICE * accumulator.chose_num * accumulator.DISCOUNT / 100 })
+          item.forEach(accumulator => { accumulatorPricePv += Number(accumulator.PRICE_PV) * Number(accumulator.chose_num) * (Number(accumulator.DISCOUNT) / 100) })
+          item.forEach(accumulator => { accumulatorTax += tool.calculateTax(Number(accumulator.SELL_PRICE), Number(accumulator.TAX_RATE), Number(accumulator.chose_num)) })
+        })
 
-				this.sellPriceSum = tool.formatPrice(accumulatorSellPrice)
-				this.pricePvSum = tool.formatPrice(accumulatorPricePv)
-				this.taxSum = tool.formatPrice(accumulatorTax)
+        this.sellPriceSum = tool.formatPrice(accumulatorSellPrice)
+        this.pricePvSum = tool.formatPrice(accumulatorPricePv)
+        this.taxSum = tool.formatPrice(accumulatorTax)
 
-				this.display = true
-			} else {
-				this.sellPriceSum = this.pricePvSum = this.taxSum = 0.00
-				this.display = true
-			}
-		},
-		// 选择商品
-		handleSelectionChange(val) {
-			let idx = -1, num
-			for (let i in this.tableData) {
-				for (let v in val){
-					if (val[v].ID === this.tableData[i].ID) {
-						idx = i
-						num = this.storeNums[idx]
-						val[v]['chose_num'] = num
-						break
-					}
-				}
-			}
-			this.multipleSelection[this.listQuery.page] = val
-			// 计算统计
-			this.handleSureChange()
-		},
-		// 结算商品
-		settlement() {
-			if (this.multipleSelection.length <= 0) {
-				this.$message.error(this.$t('shop.chooseTips'))
-				return false
-			}
-			// 弹出购物车
-			this.visibleShoppingCart = true
-			// 展示购物车商品数据
-			this.getShowCart()
-		},
-		// 设置运费
-		setFreight() {
-			// 如果地址为自提,则运费为0
-			this.pointFreight = (this.addressId === this.selfPickUpAddressId) ? Number(0) : Number(this.freight);
-		},
-		// 表格合并
-		getSummaries(param) {
-			const {columns, data} = param
-			const sums = []
-			columns.forEach((column, index) => {
-				if (index === 0) {
-					sums[index] = this.$t('shop.total')
-					return
-				}
-				const values = data.map(item => Number(item[column.property]));
-				if ((!values.every(value => isNaN(value))) && [2, 3, 4, 6].includes(index)) {
-					sums[index] = values.reduce((prev, curr) => {
-						const value = Number(curr)
-						if (!isNaN(value)) {
-							return Math.round((prev + curr) * 100) / 100
-						} else {
-							return Math.round(prev * 100) / 100
-						}
-					}, 0);
-					if (index !== 2) {
-						sums[index] = sums[index]
-					}
-				}
-			});
+        this.display = true
+      } else {
+        this.sellPriceSum = this.pricePvSum = this.taxSum = 0.00
+        this.display = true
+      }
+    },
+    // 选择商品
+    handleSelectionChange(val) {
+      let idx = -1; let num
+      for (const i in this.tableData) {
+        for (const v in val) {
+          if (val[v].ID === this.tableData[i].ID) {
+            idx = i
+            num = this.storeNums[idx]
+            val[v]['chose_num'] = num
+            break
+          }
+        }
+      }
+      this.multipleSelection[this.listQuery.page] = val
+      // 计算统计
+      this.handleSureChange()
+    },
+    // 结算商品
+    settlement() {
+      if (this.multipleSelection.length <= 0) {
+        this.$message.error(this.$t('shop.chooseTips'))
+        return false
+      }
+      // 弹出购物车
+      this.visibleShoppingCart = true
+      // 展示购物车商品数据
+      this.getShowCart()
+    },
+    // 设置运费
+    setFreight() {
+      // 如果地址为自提,则运费为0
+      this.pointFreight = (this.addressId === this.selfPickUpAddressId) ? Number(0) : Number(this.freight)
+    },
+    // 表格合并
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = this.$t('shop.total')
+          return
+        }
+        const values = data.map(item => Number(item[column.property]))
+        if ((!values.every(value => isNaN(value))) && [2, 3, 4, 6].includes(index)) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr)
+            if (!isNaN(value)) {
+              return Math.round((prev + curr) * 100) / 100
+            } else {
+              return Math.round(prev * 100) / 100
+            }
+          }, 0)
+          if (index !== 2) {
+            sums[index] = sums[index]
+          }
+        }
+      })
 
-			return sums
-		},
-		// 支付方式、账户信息、余额
-		getShoppingCart() {
-			fetchShoppingCart({categoryType: this.listQuery.categoryType}).then(response => {
-				// 收货地址
-				this.shippingAddressList = response.data.allAddress
-				this.shippingAddressList.map(item => {
-					if (item.IS_DEFAULT === '1') {
-						this.addressId = item.ID
-					}
-				})
-				// 账户
-				this.userBalance = response.data.userBalance
-				// 支付方式处理
-				this.currency = response.data.payList
-				this.cashCurrency = response.data.payList[this.payType].name
-				// 支付方式
-				for (let item of response.data.sellType) {
-					if (item.id === this.listQuery.categoryType) {
-						this.payList = item.sell_type
-						break
-					}
-				}
-				// 免运费阈值
-				this.freeShipping = response.data.freeShipping
-				// 运费
-				this.freight = response.data.freight
-			})
-		},
-		// 关闭时清空购物车等信息
-		cleanShowCart() {
-			this.visibleShoppingCart = false
-			this.goods = []
-			this.totalAmount = 0.00
-			this.goodsNum = ''
-			this.goodsId = ''
-			this.pointFreight = 0
-			this.pointsSum = 0
-		},
-		// 支付
-		orderSubmit() {
-			// 账户余额
-			let amountBalance = this.userBalance[this.payType]
-			// 账户类型提示信息
-			let accountType = this.currency[this.payType].name
-			if (amountBalance < 0 || !accountType) {
-				this.$message({
-					message: this.$t('shop.paymentError'),
-					type: 'error'
-				})
-				return false
-			}
-			// 余额是否充足
-			if ((amountBalance - this.pointsSum) < 0) {
-				this.$message({
-					message: accountType + this.$t('shop.balanceNotAllow'),
-					type: 'error'
-				})
-				this.submitButtonStat = false
-				return false
-			}
+      return sums
+    },
+    // 支付方式、账户信息、余额
+    getShoppingCart() {
+      fetchShoppingCart({ categoryType: this.listQuery.categoryType }).then(response => {
+        // 收货地址
+        this.shippingAddressList = response.data.allAddress
+        this.shippingAddressList.map(item => {
+          if (item.IS_DEFAULT === '1') {
+            this.addressId = item.ID
+          }
+        })
+        // 账户
+        this.userBalance = response.data.userBalance
+        // 支付方式处理
+        this.currency = response.data.payList
+        this.cashCurrency = response.data.payList[this.payType].name
+        // 支付方式
+        for (const item of response.data.sellType) {
+          if (item.id === this.listQuery.categoryType) {
+            this.payList = item.sell_type
+            break
+          }
+        }
+        // 免运费阈值
+        this.freeShipping = response.data.freeShipping
+        // 运费
+        this.freight = response.data.freight
+      })
+    },
+    // 关闭时清空购物车等信息
+    cleanShowCart() {
+      this.visibleShoppingCart = false
+      this.goods = []
+      this.totalAmount = 0.00
+      this.goodsNum = ''
+      this.goodsId = ''
+      this.pointFreight = 0
+      this.pointsSum = 0
+    },
+    // 支付
+    orderSubmit() {
+      // 账户余额
+      const amountBalance = this.userBalance[this.payType]
+      // 账户类型提示信息
+      const accountType = this.currency[this.payType].name
+      if (amountBalance < 0 || !accountType) {
+        this.$message({
+          message: this.$t('shop.paymentError'),
+          type: 'error'
+        })
+        return false
+      }
+      // 余额是否充足
+      if ((amountBalance - this.pointsSum) < 0) {
+        this.$message({
+          message: accountType + this.$t('shop.balanceNotAllow'),
+          type: 'error'
+        })
+        this.submitButtonStat = false
+        return false
+      }
 
-			this.submitButtonStat = true
-			this.$prompt(this.$t('shop.inputPasswordTips'), this.$t('common.hint'), {
-				confirmButtonText: this.$t('common.confirm'),
-				cancelButtonText: this.$t('common.cancel'),
-				customClass: 'csClass',
-				type: 'info',
-				inputType: 'password',
-				inputPattern: /\S+/,
-				inputErrorMessage: this.$t('shop.inputPasswordTips')
-			}).then(({value}) => {
-				this.payPassword = value
-				let params = {
-					goodsId: this.goodsId,
-					goodsNum: this.goodsNum,
-					payPassword: this.payPassword,
-					email: usersInfo.userEmail(),
-					addressId: this.addressId,
-					address: this.address,
-					payType: this.payType,
-				}
+      this.submitButtonStat = true
+      this.$prompt(this.$t('shop.inputPasswordTips'), this.$t('common.hint'), {
+        confirmButtonText: this.$t('common.confirm'),
+        cancelButtonText: this.$t('common.cancel'),
+        customClass: 'csClass',
+        type: 'info',
+        inputType: 'password',
+        inputPattern: /\S+/,
+        inputErrorMessage: this.$t('shop.inputPasswordTips')
+      }).then(({ value }) => {
+        this.payPassword = value
+        const params = {
+          goodsId: this.goodsId,
+          goodsNum: this.goodsNum,
+          payPassword: this.payPassword,
+          email: usersInfo.userEmail(),
+          addressId: this.addressId,
+          address: this.address,
+          payType: this.payType
+        }
 
-				createOrder(params).then(() => {
-					this.submitButtonStat = false
-					this.$message({
-						message: this.$t('common.successfully'),
-						type: 'success',
-						duration: 5 * 1000
-					})
-					this.$router.push({path: `/shop/order-list`})
-				}).catch(err => {
-					this.$message({
-						message: err,
-						type: 'error',
-						duration: 5 * 1000
-					})
-					this.submitButtonStat = false
-				})
-			}).catch(err => {
-				this.submitButtonStat = false
-			})
-		},
-		// 计算价格
-		getSumMoney () {
-			let cash_plus_sum = [];
-			let goodsId = [];
-			let goodsNum = [];
-			let choseNum = 0;
-			this.goods.map(item => {
-				choseNum = Number(item.chose_num);
-				if (choseNum > 0) {
-					cash_plus_sum.push(item.SELL_PRICE * choseNum * (item.DISCOUNT / 100));
-					goodsId.push(item.ID);
-					goodsNum.push(choseNum);
-				}
-			})
-			this.goodsNum = goodsNum;
-			this.goodsId = goodsId;
-			// 增加运费
-			let payAmount = tool.sum(cash_plus_sum);
-			// 设置运费
-			this.setFreight();
-			// 商品总价大于预定值,免运费
-			this.pointFreight = (this.pointFreight > 0) ? ((payAmount >= this.freeShipping) ? 0 : this.freight) : 0
-			// 计算总价
-			this.pointsSum = tool.formatPrice(tool.sum(cash_plus_sum) + this.pointFreight) ;
-		},
-		// 展示购物车信息
-		getShowCart () {
-			let orderGoods = this.multipleSelection
-			let cartGoods = []
-			for (let i in orderGoods) {
-				cartGoods = orderGoods[i]
-				if (!cartGoods) continue
+        createOrder(params).then(() => {
+          this.submitButtonStat = false
+          this.$message({
+            message: this.$t('common.successfully'),
+            type: 'success',
+            duration: 5 * 1000
+          })
+          this.$router.push({ path: `/shop/own-order` })
+        }).catch(err => {
+          this.$message({
+            message: err,
+            type: 'error',
+            duration: 5 * 1000
+          })
+          this.submitButtonStat = false
+        })
+      }).catch(err => {
+        this.submitButtonStat = false
+      })
+    },
+    // 计算价格
+    getSumMoney() {
+      const cash_plus_sum = []
+      const goodsId = []
+      const goodsNum = []
+      let choseNum = 0
+      this.goods.map(item => {
+        choseNum = Number(item.chose_num)
+        if (choseNum > 0) {
+          cash_plus_sum.push(item.SELL_PRICE * choseNum * (item.DISCOUNT / 100))
+          goodsId.push(item.ID)
+          goodsNum.push(choseNum)
+        }
+      })
+      this.goodsNum = goodsNum
+      this.goodsId = goodsId
+      // 增加运费
+      const payAmount = tool.sum(cash_plus_sum)
+      // 设置运费
+      this.setFreight()
+      // 商品总价大于预定值,免运费
+      this.pointFreight = (this.pointFreight > 0) ? ((payAmount >= this.freeShipping) ? 0 : this.freight) : 0
+      // 计算总价
+      this.pointsSum = tool.formatPrice(tool.sum(cash_plus_sum) + this.pointFreight)
+    },
+    // 展示购物车信息
+    getShowCart() {
+      const orderGoods = this.multipleSelection
+      let cartGoods = []
+      for (const i in orderGoods) {
+        cartGoods = orderGoods[i]
+        if (!cartGoods) continue
 
-				cartGoods.map(item => {
-					if (Number(item.chose_num) > 0) {
-						let discount = item.DISCOUNT / 100
-						item.member_price = Math.round(item.SELL_PRICE * discount * 100) / 100;
-						item.member_price_plus = Math.round(item.SELL_PRICE * Number(item.chose_num) * discount * 100) / 100;
-						item.tax_amount_plus = Math.round((item.member_price - item.member_price / (1 + item.TAX_RATE / 100)) * item.chose_num * 100) / 100;
-						this.goods.push(item)
-						this.totalAmount += item.member_price_plus
-					}
-				})
-			}
+        cartGoods.map(item => {
+          if (Number(item.chose_num) > 0) {
+            const discount = item.DISCOUNT / 100
+            item.member_price = Math.round(item.SELL_PRICE * discount * 100) / 100
+            item.member_price_plus = Math.round(item.SELL_PRICE * Number(item.chose_num) * discount * 100) / 100
+            item.tax_amount_plus = Math.round((item.member_price - item.member_price / (1 + item.TAX_RATE / 100)) * item.chose_num * 100) / 100
+            this.goods.push(item)
+            this.totalAmount += item.member_price_plus
+          }
+        })
+      }
 
-			this.goods = cartGoods
+      this.goods = cartGoods
 
-			// 计算价格
-			this.getSumMoney();
-		},
-		// 选择收货地址
-		choseAddress (addressId) {
-			this.addressId = addressId
-			// 设置运费
-			this.setFreight()
-			// 计算价格
-			this.getSumMoney()
-		},
-		// 切换支付方式
-		chosePayType(type) {
-			this.payType = type
-		},
-		// 商品详情
-		handleProduct(row) {
-			this.product = row
-			this.product.taxAmount = tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
-			this.visibleProduct = true
-		},
-	},
+      // 计算价格
+      this.getSumMoney()
+    },
+    // 选择收货地址
+    choseAddress(addressId) {
+      this.addressId = addressId
+      // 设置运费
+      this.setFreight()
+      // 计算价格
+      this.getSumMoney()
+    },
+    // 切换支付方式
+    chosePayType(type) {
+      this.payType = type
+    },
+    // 商品详情
+    handleProduct(row) {
+      this.product = row
+      this.product.taxAmount = tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
+      this.visibleProduct = true
+    }
+  }
 }
 </script>
 

+ 600 - 600
src/views/user/member-upgrade.vue

@@ -1,648 +1,648 @@
 <template>
-	<div v-loading="loading">
-		<div class="white-box" style="padding: 15px 25px;">
-			<el-row :gutter="20">
-				<el-col :xs="24" :sm="16" :lg="16">
-					<el-form :model="form" ref="form" :label-position="labelPosition" label-width="180px" class="form-page">
-						<el-form-item :label="$t('shop.memberCode')" prop="insertUserName">
-							<el-input v-model="form.insertUserName" @blur="fetchUpgradeInfo" :placeholder="$t('user.enterMemberCode')" :rules="{ required: true, message: $t('user.enterMemberCode'), trigger: 'blur' }"></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('profile.memberLevel')">
-							<el-input v-model="form.userDecName" disabled></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('shop.memberName')">
-							<el-input v-model="form.userRealName" disabled></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('profile.joiningDate')">
-							<el-input v-model="form.addAt" disabled></el-input>
-						</el-form-item>
+  <div v-loading="loading">
+    <div class="white-box" style="padding: 15px 25px;">
+      <el-row :gutter="20">
+        <el-col :xs="24" :sm="16" :lg="16">
+          <el-form ref="form" :model="form" :label-position="labelPosition" label-width="180px" class="form-page">
+            <el-form-item :label="$t('shop.memberCode')" prop="insertUserName">
+              <el-input v-model="form.insertUserName" :placeholder="$t('user.enterMemberCode')" :rules="{ required: true, message: $t('user.enterMemberCode'), trigger: 'blur' }" @blur="fetchUpgradeInfo" />
+            </el-form-item>
+            <el-form-item :label="$t('profile.memberLevel')">
+              <el-input v-model="form.userDecName" disabled />
+            </el-form-item>
+            <el-form-item :label="$t('shop.memberName')">
+              <el-input v-model="form.userRealName" disabled />
+            </el-form-item>
+            <el-form-item :label="$t('profile.joiningDate')">
+              <el-input v-model="form.addAt" disabled />
+            </el-form-item>
 
-						<el-form-item v-if="!isMax" :label="$t('profile.upgradeWay')">
-							<el-input v-model="form.upgradeFunc" disabled></el-input>
-						</el-form-item>
-						<el-form-item v-if="!isMax" prop="upgradeValue" :label="$t('profile.toUpgradeLevel')">
-							<el-select v-model="form.upgradeValue" :placeholder="$t('profile.selectLevel')" @change="handleChangeLevel($event)" style="width: 100%;">
-								<el-option v-for="item in upgradeOption" :key="item.ID" :label="item.LEVEL_NAME" :value="{value:item.ID, diffPv:item.REPAIR_PV}"></el-option>
-							</el-select>
-						</el-form-item>
-						<el-form-item v-if="!isMax" :label="$t('profile.topUpBV')">
-							<el-input v-model="needDiffPv" disabled></el-input>
-						</el-form-item>
-						<el-form-item v-if="!isMax">
-							<template slot="label">{{ $t('profile.upgradePurchaseProduct') }}</template>
-							<el-tabs type="border-card" v-model="decWay" style="position: relative; width: 100%;">
-								<el-tab-pane :label="$t('shop.product')" name="2">
-									<el-collapse accordion v-model="activeName">
-										<el-collapse-item name="product">
-											<el-table :data="tableData" :show-header="false" @selection-change="handleSelectionChange">
-												<el-table-column type="selection" width="30" align="center" style="top: -30px;"></el-table-column>
-												<el-table-column align="center">
-													<template slot-scope="{row, $index}">
-														<el-container>
-															<el-aside width="80px" style=" padding: 0; margin-bottom: 0; background-color: #ffffff;">
-																<el-image style="width: 80px; height: 80px" :src="tool.getArImage(row.COVER, '/files/')"></el-image>
-															</el-aside>
-															<el-main style="padding: 0;">
-																<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>{{ $t('shop.productBV') }}:{{ row.PRICE_PV | toThousandFilter }}</span><br />
-																	<span style="display: inline-block; float: right; ">
-																	<el-input-number size="mini" v-model="storeNums[$index]" :min="1" :max="Number(row.STORE_NUMS)" @change="handleInputNumber($event, row)"></el-input-number>
-																</span>
-																	<br />
-																</div>
-															</el-main>
-														</el-container>
-													</template>
-												</el-table-column>
-											</el-table>
-										</el-collapse-item>
-									</el-collapse>
+            <el-form-item v-if="!isMax" :label="$t('profile.upgradeWay')">
+              <el-input v-model="form.upgradeFunc" disabled />
+            </el-form-item>
+            <el-form-item v-if="!isMax" prop="upgradeValue" :label="$t('profile.toUpgradeLevel')">
+              <el-select v-model="form.upgradeValue" :placeholder="$t('profile.selectLevel')" style="width: 100%;" @change="handleChangeLevel($event)">
+                <el-option v-for="item in upgradeOption" :key="item.ID" :label="item.LEVEL_NAME" :value="{value:item.ID, diffPv:item.REPAIR_PV}" />
+              </el-select>
+            </el-form-item>
+            <el-form-item v-if="!isMax" :label="$t('profile.topUpBV')">
+              <el-input v-model="needDiffPv" disabled />
+            </el-form-item>
+            <el-form-item v-if="!isMax">
+              <template slot="label">{{ $t('profile.upgradePurchaseProduct') }}</template>
+              <el-tabs v-model="decWay" type="border-card" style="position: relative; width: 100%;">
+                <el-tab-pane :label="$t('shop.product')" name="2">
+                  <el-collapse v-model="activeName" accordion>
+                    <el-collapse-item name="product">
+                      <el-table :data="tableData" :show-header="false" @selection-change="handleSelectionChange">
+                        <el-table-column type="selection" width="30" align="center" style="top: -30px;" />
+                        <el-table-column align="center">
+                          <template slot-scope="{row, $index}">
+                            <el-container>
+                              <el-aside width="80px" style=" padding: 0; margin-bottom: 0; background-color: #ffffff;">
+                                <el-image style="width: 80px; height: 80px" :src="tool.getArImage(row.COVER, '/files/')" />
+                              </el-aside>
+                              <el-main style="padding: 0;">
+                                <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>{{ $t('shop.productBV') }}:{{ row.PRICE_PV | 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>
+                                  <br>
+                                </div>
+                              </el-main>
+                            </el-container>
+                          </template>
+                        </el-table-column>
+                      </el-table>
+                    </el-collapse-item>
+                  </el-collapse>
 
-									<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.productBV') }}:{{ pricePvSum | toThousandFilter }}</div>
-											<div style="display: inline-block;">{{ $t('shop.taxAmount') }}:{{ $t('currency.sign') }} {{ taxSum }}</div>
-										</div>
-									</div>
-								</el-tab-pane>
-							</el-tabs>
-						</el-form-item>
-						<el-form-item v-if="!isMax" :label="$t('shop.recipientName')">
-							<el-input v-model="form.consignee"></el-input>
-						</el-form-item>
-						<el-form-item v-if="!isMax" :label="$t('shop.phoneNumber')">
-							<el-input v-model="form.acceptMobile"></el-input>
-						</el-form-item>
-						<el-form-item v-if="!isMax" prop="areaSelected" :label="$t('config.state')">
-							<el-cascader size="large" :options="regionData" v-model="form.areaSelected" style="width: 100%;"></el-cascader>
-						</el-form-item>
-						<el-form-item v-if="!isMax" :label="$t('config.localGovernmentArea')">
-							<el-input v-model="form.lgaName"></el-input>
-						</el-form-item>
-						<el-form-item v-if="!isMax" :label="$t('config.city')">
-							<el-input v-model="form.cityName"></el-input>
-						</el-form-item>
-						<el-form-item v-if="!isMax" :label="$t('config.detailedAddress')">
-							<el-input v-model="form.address"></el-input>
-						</el-form-item>
-						<el-form-item v-if="!isMax" :label="$t('common.note')">
-							<el-input type="textarea" v-model="form.remark"></el-input>
-						</el-form-item>
+                  <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.productBV') }}:{{ pricePvSum | toThousandFilter }}</div>
+                      <div style="display: inline-block;">{{ $t('shop.taxAmount') }}:{{ $t('currency.sign') }} {{ taxSum }}</div>
+                    </div>
+                  </div>
+                </el-tab-pane>
+              </el-tabs>
+            </el-form-item>
+            <el-form-item v-if="!isMax" :label="$t('shop.recipientName')">
+              <el-input v-model="form.consignee" />
+            </el-form-item>
+            <el-form-item v-if="!isMax" :label="$t('shop.phoneNumber')">
+              <el-input v-model="form.acceptMobile" />
+            </el-form-item>
+            <el-form-item v-if="!isMax" prop="areaSelected" :label="$t('config.state')">
+              <el-cascader v-model="form.areaSelected" size="large" :options="regionData" style="width: 100%;" />
+            </el-form-item>
+            <el-form-item v-if="!isMax" :label="$t('config.localGovernmentArea')">
+              <el-input v-model="form.lgaName" />
+            </el-form-item>
+            <el-form-item v-if="!isMax" :label="$t('config.city')">
+              <el-input v-model="form.cityName" />
+            </el-form-item>
+            <el-form-item v-if="!isMax" :label="$t('config.detailedAddress')">
+              <el-input v-model="form.address" />
+            </el-form-item>
+            <el-form-item v-if="!isMax" :label="$t('common.note')">
+              <el-input v-model="form.remark" type="textarea" />
+            </el-form-item>
 
-						<el-form-item v-if="!isMax" :label="$t('shop.paymentMethod')" required style="padding-left: 0;">
-							<el-radio-group v-model="form.payType" @change="chosePayType">
-								<el-radio border v-for="(item, index) in payList" :key='index' :label="item.label" style="margin: 5px;">
-									{{ item.name }}<span v-if="item.label === 'cash'" style="color: tomato;">({{ $t('currency.sign') }} {{ userBalance.cash | toThousandFilter }})</span>
-								</el-radio>
-							</el-radio-group>
-						</el-form-item>
+            <el-form-item v-if="!isMax" :label="$t('shop.paymentMethod')" required style="padding-left: 0;">
+              <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 | toThousandFilter }})</span>
+                </el-radio>
+              </el-radio-group>
+            </el-form-item>
 
-						<el-form-item v-if="!isMax">
-							<el-button size="small" type="primary" @click="onSubmit" :loading="submitButtonStat">{{ $t('common.save') }}</el-button>
-						</el-form-item>
-				</el-form>
-				</el-col>
-			</el-row>
-		</div>
+            <el-form-item v-if="!isMax">
+              <el-button size="small" type="primary" :loading="submitButtonStat" @click="onSubmit">{{ $t('common.save') }}</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
+      </el-row>
+    </div>
 
-		<!-- payStack模态框 -->
-		<el-dialog :title="$t('shop.goPay')" :visible.sync="visible" :width="payStackScreenWidth" v-loading="payStackLoading" :before-close="handleClose">
-			<section>
-				<el-form :model="payForm">
-					<el-form-item :label="$t('user.email')" label-width="100px" required>
-						<el-input v-model="payForm.email" autocomplete="off"></el-input>
-					</el-form-item>
-					<el-form-item :label="$t('shop.amount')" label-width="100px" required>
-						<el-input v-model="payForm.amount" autocomplete="off" readonly></el-input>
-					</el-form-item>
-				</el-form>
-			</section>
-			<paystack
-				:firstname="payForm.firstname"
-				:lastname="payForm.lastname"
-				:amount="payForm.amount * 100"
-				:email="payForm.email"
-				:metadata="payForm.metadata"
-				:currency="payForm.currency"
-				:paystackkey="payForm.publicKey"
-				:reference="reference"
-				:channels="channels"
-				:callback="processPayment"
-				:close="handleClose"
-			>
-				<el-button type="primary" size="small">{{ $t('shop.goPay') }}</el-button>
-			</paystack>
-			<el-button type="danger" size="small" class="cancelButton" @click="handleClose" style="margin-left: 10px;">{{ $t('common.cancel') }}</el-button>
-		</el-dialog>
+    <!-- payStack模态框 -->
+    <el-dialog v-loading="payStackLoading" :title="$t('shop.goPay')" :visible.sync="visible" :width="payStackScreenWidth" :before-close="handleClose">
+      <section>
+        <el-form :model="payForm">
+          <el-form-item :label="$t('user.email')" label-width="100px" required>
+            <el-input v-model="payForm.email" autocomplete="off" />
+          </el-form-item>
+          <el-form-item :label="$t('shop.amount')" label-width="100px" required>
+            <el-input v-model="payForm.amount" autocomplete="off" readonly />
+          </el-form-item>
+        </el-form>
+      </section>
+      <paystack
+        :firstname="payForm.firstname"
+        :lastname="payForm.lastname"
+        :amount="payForm.amount * 100"
+        :email="payForm.email"
+        :metadata="payForm.metadata"
+        :currency="payForm.currency"
+        :paystackkey="payForm.publicKey"
+        :reference="reference"
+        :channels="channels"
+        :callback="processPayment"
+        :close="handleClose"
+      >
+        <el-button type="primary" size="small">{{ $t('shop.goPay') }}</el-button>
+      </paystack>
+      <el-button type="danger" size="small" class="cancelButton" style="margin-left: 10px;" @click="handleClose">{{ $t('common.cancel') }}</el-button>
+    </el-dialog>
 
-		<!-- 倒计时页面 -->
-		<el-dialog :title="$t('common.hint')" :visible.sync="payDialog" :width="payStackScreenWidth" :show-close="false" :close="handleOrderList">
-			<el-card shadow="always">
-				<el-result icon="success" :title="$t('common.successfully')" :subTitle="$t('shop.successOrderTips')">
-					<template slot="extra">
-						<el-button type="primary" size="medium" @click="handleOrderList">{{ $t('shop.goBack') }}({{ countdown }})</el-button>
-					</template>
-				</el-result>
-			</el-card>
-		</el-dialog>
+    <!-- 倒计时页面 -->
+    <el-dialog :title="$t('common.hint')" :visible.sync="payDialog" :width="payStackScreenWidth" :show-close="false" :close="handleOrderList">
+      <el-card shadow="always">
+        <el-result icon="success" :title="$t('common.successfully')" :sub-title="$t('shop.successOrderTips')">
+          <template slot="extra">
+            <el-button type="primary" size="medium" @click="handleOrderList">{{ $t('shop.goBack') }}({{ countdown }})</el-button>
+          </template>
+        </el-result>
+      </el-card>
+    </el-dialog>
 
-		<!-- 商品详情 -->
-		<el-dialog :title="product.GOODS_NO" :visible.sync="visibleProduct" :width="screenWidth" style="margin-top: -95px;">
-			<el-row :gutter="20">
-				<el-col :xs="24" :sm="12" :lg="12">
-					<el-image style="width: 100%; height: 100%" :style="imageStyle" :src="tool.getArImage(product.COVER, '/files/')"></el-image>
-				</el-col>
-				<el-col :xs="24" :sm="12" :lg="12">
-					<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 | toThousandFilter }}</span><br />
-						<span>{{ $t('shop.productBV') }}:{{ product.PRICE_PV | toThousandFilter }}</span><br />
-						<span>{{ $t('shop.taxRate') }}:{{ product.TAX_RATE / 100 }}</span><br />
-						<span>{{ $t('shop.taxAmount') }}:{{ $t('currency.sign') }} {{ product.taxAmount | toThousandFilter }}</span><br />
-						<span>{{ $t('shop.inventory') }}:{{ product.STORE_NUMS }}</span>
-					</div>
-				</el-col>
-			</el-row>
-		</el-dialog>
-	</div>
+    <!-- 商品详情 -->
+    <el-dialog :title="product.GOODS_NO" :visible.sync="visibleProduct" :width="screenWidth" style="margin-top: -95px;">
+      <el-row :gutter="20">
+        <el-col :xs="24" :sm="12" :lg="12">
+          <el-image style="width: 100%; height: 100%" :style="imageStyle" :src="tool.getArImage(product.COVER, '/files/')" />
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12">
+          <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 | toThousandFilter }}</span><br>
+            <span>{{ $t('shop.productBV') }}:{{ product.PRICE_PV | toThousandFilter }}</span><br>
+            <span>{{ $t('shop.taxRate') }}:{{ product.TAX_RATE / 100 }}</span><br>
+            <span>{{ $t('shop.taxAmount') }}:{{ $t('currency.sign') }} {{ product.taxAmount | toThousandFilter }}</span><br>
+            <span>{{ $t('shop.inventory') }}:{{ product.STORE_NUMS }}</span>
+          </div>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-import {fetchFullInfo, fetchSendUpgrade, fetchUpgrade, fetchUpgradeInfo} from '@/api/user'
-import waves from '@/directive/waves'
-import {formatAmount, getScreenWidth} from "@/utils"
+import { deleteApproachOrder } from '@/api/shop'
+import { fetchFullInfo, fetchSendUpgrade, fetchUpgrade, fetchUpgradeInfo } from '@/api/user'
 import Pagination from '@/components/Pagination'
+import waves from '@/directive/waves'
+import region from '@/store/modules/region'
+import { getScreenWidth } from '@/utils'
+import tool from '@/utils/tool'
+import usersInfo from '@/utils/usersInfo'
 import paystack from 'vue-paystack'
-import tool from "@/utils/tool"
-import {deleteApproachOrder} from "@/api/shop"
-import usersInfo from "@/utils/usersInfo"
-import region from "@/store/modules/region"
 
 export default {
-  name: 'upgradeManagement',
+  name: 'UpgradeManagement',
   components: { Pagination, paystack },
   directives: { waves },
-	filters: {
-		bvFilter(row) {
-			return tool.calculateBV(row.REAL_PV, row.BUY_NUMS)
-		},
-		taxAmountFilter(row) {
-			return tool.calculateTax(row.REAL_PRICE, row.BUY_NUMS)
-		},
-		priceAmountFilter(row) {
-			return tool.formatPrice(row.REAL_PRICE * row.BUY_NUMS)
-		},
-		statusFilter(status) {
-			const statusMap = {
-				Unpaid: 'info',
-				Paid: 'success'
-			}
-			return statusMap[status]
-		}
-	},
-	computed: {
-		// PayStack混淆串
-		reference() {
-			let text = ''
-			let possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-			for (let i = 0; i < 10; i++) {
-				text += possible.charAt(Math.floor(Math.random() * possible.length))
-			}
-			return text
-		}
-	},
+  filters: {
+    bvFilter(row) {
+      return tool.calculateBV(row.REAL_PV, row.BUY_NUMS)
+    },
+    taxAmountFilter(row) {
+      return tool.calculateTax(row.REAL_PRICE, row.BUY_NUMS)
+    },
+    priceAmountFilter(row) {
+      return tool.formatPrice(row.REAL_PRICE * row.BUY_NUMS)
+    },
+    statusFilter(status) {
+      const statusMap = {
+        Unpaid: 'info',
+        Paid: 'success'
+      }
+      return statusMap[status]
+    }
+  },
   data() {
-		return {
-			tool: tool,
+    return {
+      tool: tool,
 
-			nowPerf: '',
-			nextPerf: '',
-			decUserName: '',
-			needDiffPv: '',
-			isMax: true,
-			upgradeOption: [],
-			toLevel: '',
-			currentRow: null,
-			decWay: '2',
-			regionData: region.regionInfo.regionData,
-			form: {
-				address: '',
-				areaSelected:[],
-				consignee: '',
-				upgradeFunc: '',
-				upgradeValue: '',
-				addAt: '',
-				userRealName: '',
-				userDecName: '',
-				remark: '',
-				realName: '',
-				decLv: '',
-				insertUserName: '',
-				decUserName: '',
-				recUserName: '',
-				conUserName: '',
-				insertUserIdCard: '',
-				packageId: '',
-				goodsId:[],
-				goodsNum:[],
-				province: '',
-				// city: '',
-				// county: '',
-				lgaName: '',
-				cityName: '',
-				acceptMobile: '',
-				payType: '',
-			},
-			num: 1,
-			allDecPackage: {},
-			loading: false,
-			submitButtonStat: false,
-			submitButton: false,
-			allGoods: [],
-			goodsNums: [],
-			numList: [],
-			sell_price_sum: 0.00,
-			price_pv_sum: 0.00,
-			payList: [],
-			sn: '',
-			payDialog: false,
-			countdown: 5,
-			visible: false,
-			payStackLoading: false,
-			channels: ['card', 'bank', 'ussd', 'qr'], // eft(南非)  mobile_money(加纳)
-			payForm: {
-				publicKey: process.env.VUE_APP_BASE_PAY_STACK_PUBLIC_KEY,
-				currency: 'NGN',
-				firstname: usersInfo.userName(),
-				lastname: '',
-				email: usersInfo.userEmail(),
-				amount: 0, // kobo
-				orderSn: '',
-				metadata: {
-					cart_id: '',
-					custom_fields: [
-						{
-							display_name: 'orderSn',
-							variable_name: 'orderSn',
-							value: this.sn
-						},
-						{
-							display_name: 'orderType',
-							variable_name: 'orderType',
-							value: 'userUpgrade'
-						},
-					]
-				},
-			},
+      nowPerf: '',
+      nextPerf: '',
+      decUserName: '',
+      needDiffPv: '',
+      isMax: true,
+      upgradeOption: [],
+      toLevel: '',
+      currentRow: null,
+      decWay: '2',
+      regionData: region.regionInfo.regionData,
+      form: {
+        address: '',
+        areaSelected: [],
+        consignee: '',
+        upgradeFunc: '',
+        upgradeValue: '',
+        addAt: '',
+        userRealName: '',
+        userDecName: '',
+        remark: '',
+        realName: '',
+        decLv: '',
+        insertUserName: '',
+        decUserName: '',
+        recUserName: '',
+        conUserName: '',
+        insertUserIdCard: '',
+        packageId: '',
+        goodsId: [],
+        goodsNum: [],
+        province: '',
+        // city: '',
+        // county: '',
+        lgaName: '',
+        cityName: '',
+        acceptMobile: '',
+        payType: ''
+      },
+      num: 1,
+      allDecPackage: {},
+      loading: false,
+      submitButtonStat: false,
+      submitButton: false,
+      allGoods: [],
+      goodsNums: [],
+      numList: [],
+      sell_price_sum: 0.00,
+      price_pv_sum: 0.00,
+      payList: [],
+      sn: '',
+      payDialog: false,
+      countdown: 5,
+      visible: false,
+      payStackLoading: false,
+      channels: ['card', 'bank', 'ussd', 'qr'], // eft(南非)  mobile_money(加纳)
+      payForm: {
+        publicKey: process.env.VUE_APP_BASE_PAY_STACK_PUBLIC_KEY,
+        currency: 'NGN',
+        firstname: usersInfo.userName(),
+        lastname: '',
+        email: usersInfo.userEmail(),
+        amount: 0, // kobo
+        orderSn: '',
+        metadata: {
+          cart_id: '',
+          custom_fields: [
+            {
+              display_name: 'orderSn',
+              variable_name: 'orderSn',
+              value: this.sn
+            },
+            {
+              display_name: 'orderType',
+              variable_name: 'orderType',
+              value: 'userUpgrade'
+            }
+          ]
+        }
+      },
 
-			addressId: '',
-			selfPickUpAddressId: '100000000000000000',
-			shippingAddressList: [],
+      addressId: '',
+      selfPickUpAddressId: '100000000000000000',
+      shippingAddressList: [],
 
-			visibleProduct: false,
-			product: {
-				GOODS_NAME: '',
-				GOODS_NO: '',
-				COVER: '',
-				SELL_PRICE: 0,
-				PRICE_PV: 0,
-				TAX_RATE: 0,
-				taxAmount: 0,
-			},
-			imageStyle: 'margin-top: -50px;',
+      visibleProduct: false,
+      product: {
+        GOODS_NAME: '',
+        GOODS_NO: '',
+        COVER: '',
+        SELL_PRICE: 0,
+        PRICE_PV: 0,
+        TAX_RATE: 0,
+        taxAmount: 0
+      },
+      imageStyle: 'margin-top: -50px;',
 
-			screenWidth: getScreenWidth() > 600 ? '600px' : getScreenWidth() + 'px',
-			labelPosition: getScreenWidth() > 500 ? 'right' : 'top',
-			payStackScreenWidth: getScreenWidth() > 500 ? '450px' : getScreenWidth() + 'px',
+      screenWidth: getScreenWidth() > 600 ? '600px' : getScreenWidth() + 'px',
+      labelPosition: getScreenWidth() > 500 ? 'right' : 'top',
+      payStackScreenWidth: getScreenWidth() > 500 ? '450px' : getScreenWidth() + 'px',
 
-			multipleSelection: [],
-			sellPriceSum: 0.00,
-			pricePvSum: 0.00,
-			taxSum: 0.00,
-			storeNums: [],
-			tableData: null,
-			payAmount: 0.00,
-			userBalance: {
-				cash: 0,
-			},
+      multipleSelection: [],
+      sellPriceSum: 0.00,
+      pricePvSum: 0.00,
+      taxSum: 0.00,
+      storeNums: [],
+      tableData: null,
+      payAmount: 0.00,
+      userBalance: {
+        cash: 0
+      },
 
-			activeName: 'product',
-		}
+      activeName: 'product'
+    }
+  },
+  computed: {
+    // PayStack混淆串
+    reference() {
+      let text = ''
+      const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
+      for (let i = 0; i < 10; i++) {
+        text += possible.charAt(Math.floor(Math.random() * possible.length))
+      }
+      return text
+    }
   },
   created() {
     this.fetchUpgrade()
   },
-	mounted() {
-	},
+  mounted() {
+  },
   methods: {
-		fetchUpgrade() {
-			this.loading = true
-			fetchUpgrade().then(response => {
-				this.loading = false
+    fetchUpgrade() {
+      this.loading = true
+      fetchUpgrade().then(response => {
+        this.loading = false
 
-				this.userBalance = response.data.userBalance
-				this.decUserName = response.data.decUserName
-				this.allDecPackage = response.data.allDecPackage
-				this.allGoods = response.data.allGoods
+        this.userBalance = response.data.userBalance
+        this.decUserName = response.data.decUserName
+        this.allDecPackage = response.data.allDecPackage
+        this.allGoods = response.data.allGoods
 
-				let settingObj = this.allGoods
-				for (let i in this.allGoods) {
-					this.storeNums[i] = 1
-					settingObj[i].goodsNum = 0
-				}
+        const settingObj = this.allGoods
+        for (const i in this.allGoods) {
+          this.storeNums[i] = 1
+          settingObj[i].goodsNum = 0
+        }
 
-				this.tableData = Object.values(settingObj)
-				let pageList = this.multipleSelection
-				this.$nextTick(function () {
-					for (let i in this.tableData) {
-						for( let j in  pageList) {
-							if( pageList[j].ID === this.tableData[i].ID ) {
-								this.$data.storeNums[i] = pageList[j].goodsNum
-								this.tableData[i].goodsNum = pageList[j].goodsNum
-								break
-							}
-						}
-					}
-				})
+        this.tableData = Object.values(settingObj)
+        const pageList = this.multipleSelection
+        this.$nextTick(function() {
+          for (const i in this.tableData) {
+            for (const j in pageList) {
+              if (pageList[j].ID === this.tableData[i].ID) {
+                this.$data.storeNums[i] = pageList[j].goodsNum
+                this.tableData[i].goodsNum = pageList[j].goodsNum
+                break
+              }
+            }
+          }
+        })
 
-				// 支付方式
-				this.payList = response.data.sellType[0]['sell_type']
-				// 支付方式的第一项默认选中
-				this.form.payType = Object.values(this.payList)[1]['label']
+        // 支付方式
+        this.payList = response.data.sellType[0]['sell_type']
+        // 支付方式的第一项默认选中
+        this.form.payType = Object.values(this.payList)[1]['label']
 
         setTimeout(() => {
           this.loading = false
         }, 0.5 * 1000)
       })
     },
-		fetchUpgradeInfo() {
-			if (!this.form.insertUserName) {
-				this.$message({
-					message: this.$t('user.enterMemberCode'),
-					type: 'error'
-				})
-				return false
-			}
+    fetchUpgradeInfo() {
+      if (!this.form.insertUserName) {
+        this.$message({
+          message: this.$t('user.enterMemberCode'),
+          type: 'error'
+        })
+        return false
+      }
 
-			this.loading = true
-			fetchUpgradeInfo({ userName: this.form.insertUserName }).then(response => {
-				this.loading = false
-				this.form.addAt = response.data.baseInfo.ADD_AT
-				this.form.userRealName = response.data.baseInfo.REAL_NAME
-				this.form.userDecName = response.data.baseInfo.DEC_NAME
-				this.isMax = response.data.baseInfo.IS_MAX
-				this.upgradeOption = response.data.baseInfo.LEVEL_LIST
-				this.form.upgradeFunc = response.data.baseInfo.UPGRADE_FUNC
-				this.nowPerf = response.data.baseInfo.NOW_PERF
-				this.nextPerf = response.data.baseInfo.NEXT_PERF
+      this.loading = true
+      fetchUpgradeInfo({ userName: this.form.insertUserName }).then(response => {
+        this.loading = false
+        this.form.addAt = response.data.baseInfo.ADD_AT
+        this.form.userRealName = response.data.baseInfo.REAL_NAME
+        this.form.userDecName = response.data.baseInfo.DEC_NAME
+        this.isMax = response.data.baseInfo.IS_MAX
+        this.upgradeOption = response.data.baseInfo.LEVEL_LIST
+        this.form.upgradeFunc = response.data.baseInfo.UPGRADE_FUNC
+        this.nowPerf = response.data.baseInfo.NOW_PERF
+        this.nextPerf = response.data.baseInfo.NEXT_PERF
 
-				setTimeout(() => {
-					this.loading = false
-				}, 0.5 * 1000)
-			})
-		},
-		// 商品详情
-		handleProduct(row) {
-			this.product = row
-			this.product.taxAmount = tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
-			this.visibleProduct = true
-		},
-		// 选择商品计数
-		handleInputNumber(current, row){
-			let pageList = this.multipleSelection
-			let selectStatus = false
-			for (let i in pageList) {
-				if (pageList[i].ID === row.ID) {
-					pageList[i].goodsNum = current
-					selectStatus = true
-					break
-				}
-			}
-			if (selectStatus) {
-				this.multipleSelection = pageList
-				this.handleSureChange()
-			}
-		},
-		// 统计商品
-		handleSureChange() {
-			if (this.multipleSelection.length > 0) {
-				let accumulatorSellPrice = 0, accumulatorPricePv = 0, accumulatorTax = 0
-				this.multipleSelection.forEach(accumulator => {
-					accumulatorSellPrice += accumulator.SELL_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));
-				})
+        setTimeout(() => {
+          this.loading = false
+        }, 0.5 * 1000)
+      })
+    },
+    // 商品详情
+    handleProduct(row) {
+      this.product = row
+      this.product.taxAmount = tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
+      this.visibleProduct = true
+    },
+    // 选择商品计数
+    handleInputNumber(current, row) {
+      const pageList = this.multipleSelection
+      let selectStatus = false
+      for (const i in pageList) {
+        if (pageList[i].ID === row.ID) {
+          pageList[i].goodsNum = current
+          selectStatus = true
+          break
+        }
+      }
+      if (selectStatus) {
+        this.multipleSelection = pageList
+        this.handleSureChange()
+      }
+    },
+    // 统计商品
+    handleSureChange() {
+      if (this.multipleSelection.length > 0) {
+        let accumulatorSellPrice = 0; let accumulatorPricePv = 0; let accumulatorTax = 0
+        this.multipleSelection.forEach(accumulator => {
+          accumulatorSellPrice += accumulator.SELL_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))
+        })
 
-				this.sellPriceSum = tool.formatPrice(accumulatorSellPrice)
-				this.pricePvSum = tool.formatPrice(accumulatorPricePv)
-				this.taxSum = tool.formatPrice(accumulatorTax)
+        this.sellPriceSum = tool.formatPrice(accumulatorSellPrice)
+        this.pricePvSum = tool.formatPrice(accumulatorPricePv)
+        this.taxSum = tool.formatPrice(accumulatorTax)
 
-				this.display = true
-			} else {
-				this.sellPriceSum = this.pricePvSum = this.taxSum = 0.00
-				this.display = true
-			}
-		},
-		// 选择商品
-		handleSelectionChange(val) {
-			let idx = -1, num
-			for (let i in this.tableData) {
-				for (let v in val){
-					if (val[v].ID === this.tableData[i].ID) {
-						idx = i
-						num = this.storeNums[idx]
-						val[v]['goodsNum'] = num
-						break
-					}
-				}
-			}
-			this.multipleSelection = val
-			// 计算统计
-			this.handleSureChange()
-		},
-		// 选择收货地址
-		choseAddress (addressId) {
-			this.addressId = addressId
-			// 设置运费
-			this.setFreight()
-			// 计算价格
-			this.getSumMoney()
-		},
-		// 切换支付方式
-		chosePayType(type) {
-			this.payType = type
-		},
-		// 关闭支付回调
-		handleClose() {
-			this.$confirm(this.$t('shop.confirmClose')).then(_ => {
-				deleteApproachOrder({ orderSn: this.form.orderSn }).then(() => {
-					// 关闭支付模态框
-					this.visible = false
-					// 关闭购物车
-					this.visibleShoppingCart = false
-					this.submitButtonStat = false
-				})
-			})
-		},
-		// 支付成功回调
-		processPayment() {
-			// 关闭支付页面
-			this.visible = false
-			this.payStackLoading = false
-			// 显示支付成功模态框
-			this.payDialog = true;
-			// 启动支付成功倒计时
-			this.handleCountdown()
-		},
-		// 倒计时结束跳转
-		handleOrderList () {
-			this.$router.push({path: `/shop/order-list`})
-		},
-		// 启动倒计时
-		handleCountdown () {
-			// 创建定时器
-			setInterval(() => {
-				// 每隔1秒把time的值减一,赋值给span标签
-				this.countdown--
-				if (this.countdown === 0) {
-					// 倒计时结束,跳转到订单列表
-					this.$router.push({path: `/shop/order-list`});
-				}
-			}, 1000)
-		},
-		// 会员查询
-		handleChkRecUser () {
-			this.form.conUserName = ''
-			this.conRealName = '-'
-			this.form.autoPlace = ''
-			if (this.form.recUserName) {
-				this.loading = true
-				fetchFullInfo({ userName: this.form.recUserName }).then(response => {
-					this.recRealName = response.data.REAL_NAME
-					this.loading = false
-				}).catch(() => {
-					this.recRealName = '-'
-					this.loading = false
-				})
-			}
-		},
-		// 返回方式
-		wayChange () {
-			if (this.form.way === 'pickup') {
-				this.areaDisabled = true
-				this.addressDisabled = true
-			} else {
-				this.areaDisabled = false
-				this.addressDisabled = false
-			}
-		},
-		// 提交订单
-		onSubmit () {
-			if (!this.form.insertUserName) {
-				this.$message({
-					message: this.$t('user.enterMemberCode'),
-					type: 'error'
-				})
-				return false;
-			}
-			if (!this.toLevel) {
-				this.$message({
-					message: this.$t('profile.selectLevel'),
-					type: 'error'
-				})
-				return false
-			}
-			// 已选择商品
-			this.selectProduct()
-			if (this.multipleSelection.length <= 0) {
-				this.$message.error(this.$t('shop.chooseTips'))
-				return false
-			}
-			// 余额
-			let amountBalance = this.userBalance[this.form.payType] || 0
-			// 余额是否充足
-			if ((this.form.payType === 'cash') && ((amountBalance - this.payAmount) < 0)) {
-				// 账户类型提示信息
-				let account = this.payList.filter(item => {
-					return this.form.payType === item.label;
-				})
-				let accountType = account[0] && account[0].name || ''
-				this.$message({
-					message: accountType + this.$t('shop.balanceNotAllow'),
-					type: 'error'
-				})
-				return false
-			}
+        this.display = true
+      } else {
+        this.sellPriceSum = this.pricePvSum = this.taxSum = 0.00
+        this.display = true
+      }
+    },
+    // 选择商品
+    handleSelectionChange(val) {
+      let idx = -1; let num
+      for (const i in this.tableData) {
+        for (const v in val) {
+          if (val[v].ID === this.tableData[i].ID) {
+            idx = i
+            num = this.storeNums[idx]
+            val[v]['goodsNum'] = num
+            break
+          }
+        }
+      }
+      this.multipleSelection = val
+      // 计算统计
+      this.handleSureChange()
+    },
+    // 选择收货地址
+    choseAddress(addressId) {
+      this.addressId = addressId
+      // 设置运费
+      this.setFreight()
+      // 计算价格
+      this.getSumMoney()
+    },
+    // 切换支付方式
+    chosePayType(type) {
+      this.payType = type
+    },
+    // 关闭支付回调
+    handleClose() {
+      this.$confirm(this.$t('shop.confirmClose')).then(_ => {
+        deleteApproachOrder({ orderSn: this.form.orderSn }).then(() => {
+          // 关闭支付模态框
+          this.visible = false
+          // 关闭购物车
+          this.visibleShoppingCart = false
+          this.submitButtonStat = false
+        })
+      })
+    },
+    // 支付成功回调
+    processPayment() {
+      // 关闭支付页面
+      this.visible = false
+      this.payStackLoading = false
+      // 显示支付成功模态框
+      this.payDialog = true
+      // 启动支付成功倒计时
+      this.handleCountdown()
+    },
+    // 倒计时结束跳转
+    handleOrderList() {
+      this.$router.push({ path: `/shop/member-order` })
+    },
+    // 启动倒计时
+    handleCountdown() {
+      // 创建定时器
+      setInterval(() => {
+        // 每隔1秒把time的值减一,赋值给span标签
+        this.countdown--
+        if (this.countdown === 0) {
+          // 倒计时结束,跳转到订单列表
+          this.$router.push({ path: `/shop/member-order` })
+        }
+      }, 1000)
+    },
+    // 会员查询
+    handleChkRecUser() {
+      this.form.conUserName = ''
+      this.conRealName = '-'
+      this.form.autoPlace = ''
+      if (this.form.recUserName) {
+        this.loading = true
+        fetchFullInfo({ userName: this.form.recUserName }).then(response => {
+          this.recRealName = response.data.REAL_NAME
+          this.loading = false
+        }).catch(() => {
+          this.recRealName = '-'
+          this.loading = false
+        })
+      }
+    },
+    // 返回方式
+    wayChange() {
+      if (this.form.way === 'pickup') {
+        this.areaDisabled = true
+        this.addressDisabled = true
+      } else {
+        this.areaDisabled = false
+        this.addressDisabled = false
+      }
+    },
+    // 提交订单
+    onSubmit() {
+      if (!this.form.insertUserName) {
+        this.$message({
+          message: this.$t('user.enterMemberCode'),
+          type: 'error'
+        })
+        return false
+      }
+      if (!this.toLevel) {
+        this.$message({
+          message: this.$t('profile.selectLevel'),
+          type: 'error'
+        })
+        return false
+      }
+      // 已选择商品
+      this.selectProduct()
+      if (this.multipleSelection.length <= 0) {
+        this.$message.error(this.$t('shop.chooseTips'))
+        return false
+      }
+      // 余额
+      const amountBalance = this.userBalance[this.form.payType] || 0
+      // 余额是否充足
+      if ((this.form.payType === 'cash') && ((amountBalance - this.payAmount) < 0)) {
+        // 账户类型提示信息
+        const account = this.payList.filter(item => {
+          return this.form.payType === item.label
+        })
+        const accountType = account[0] && account[0].name || ''
+        this.$message({
+          message: accountType + this.$t('shop.balanceNotAllow'),
+          type: 'error'
+        })
+        return false
+      }
 
-			this.submitButtonStat = true
+      this.submitButtonStat = true
 
-			let params = {
-				decUserName: this.decUserName,
-				packageId: this.form.packageId,
-				goodsId: this.form.goodsId,
-				goodsNum: this.form.goodsNum,
-				location: this.form.location,
-				decWay: this.decWay,
-				decLv: this.toLevel,
-				insertUserName: this.form.insertUserName,
-				remark: this.form.remark,
-				address: this.form.address,
-				consignee: this.form.consignee,
-				acceptMobile: this.form.acceptMobile,
-				province: this.form.areaSelected[0] ? this.form.areaSelected[0] : '',
-				lgaName: this.form.lgaName,
-				cityName: this.form.cityName,
-				nowPerf: this.nowPerf,
-				nextPerf: this.nextPerf,
-				payType: this.form.payType,
-			}
-			fetchSendUpgrade(params).then(response => {
-				if (this.form.payType !== 'pay_stack') {
-					// 余额支付
-					this.$message({
-						message: this.$t('common.successfully'),
-						type: 'success'
-					})
-					this.submitButtonStat = false
-					this.$router.push({path: `/shop/order-list`})
-				} else {
-					// PayStack支付
-					this.submitButtonStat = false
-					this.payForm.orderSn = response.data.SN
-					this.payForm.amount = response.data.ORDER_AMOUNT
-					this.payForm.metadata.custom_fields[0].value = response.data.SN
-					this.visible = true
-				}
-			}).catch(err => {
-				this.$message({
-					message: err,
-					type: 'error'
-				})
-				this.submitButtonStat = false
-			})
-		},
-		// 已选择商品
-		selectProduct() {
-			this.payAmount = 0
-			this.form.goodsId = []
-			this.form.goodsNum = []
-			this.multipleSelection.map((item) => {
-				this.form.goodsId.push(item.ID)
-				this.form.goodsNum.push(item.goodsNum)
-				this.payAmount += item.goodsNum * item.SELL_PRICE
-			})
-		},
-		// 等级变更
-		handleChangeLevel(data) {
-			let { value, diffPv } = data
-			this.needDiffPv = diffPv
-			this.toLevel = value
-		},
+      const params = {
+        decUserName: this.decUserName,
+        packageId: this.form.packageId,
+        goodsId: this.form.goodsId,
+        goodsNum: this.form.goodsNum,
+        location: this.form.location,
+        decWay: this.decWay,
+        decLv: this.toLevel,
+        insertUserName: this.form.insertUserName,
+        remark: this.form.remark,
+        address: this.form.address,
+        consignee: this.form.consignee,
+        acceptMobile: this.form.acceptMobile,
+        province: this.form.areaSelected[0] ? this.form.areaSelected[0] : '',
+        lgaName: this.form.lgaName,
+        cityName: this.form.cityName,
+        nowPerf: this.nowPerf,
+        nextPerf: this.nextPerf,
+        payType: this.form.payType
+      }
+      fetchSendUpgrade(params).then(response => {
+        if (this.form.payType !== 'pay_stack') {
+          // 余额支付
+          this.$message({
+            message: this.$t('common.successfully'),
+            type: 'success'
+          })
+          this.submitButtonStat = false
+          this.$router.push({ path: `/shop/member-order` })
+        } else {
+          // PayStack支付
+          this.submitButtonStat = false
+          this.payForm.orderSn = response.data.SN
+          this.payForm.amount = response.data.ORDER_AMOUNT
+          this.payForm.metadata.custom_fields[0].value = response.data.SN
+          this.visible = true
+        }
+      }).catch(err => {
+        this.$message({
+          message: err,
+          type: 'error'
+        })
+        this.submitButtonStat = false
+      })
+    },
+    // 已选择商品
+    selectProduct() {
+      this.payAmount = 0
+      this.form.goodsId = []
+      this.form.goodsNum = []
+      this.multipleSelection.map((item) => {
+        this.form.goodsId.push(item.ID)
+        this.form.goodsNum.push(item.goodsNum)
+        this.payAmount += item.goodsNum * item.SELL_PRICE
+      })
+    },
+    // 等级变更
+    handleChangeLevel(data) {
+      const { value, diffPv } = data
+      this.needDiffPv = diffPv
+      this.toLevel = value
+    }
   }
 }
 </script>

+ 749 - 749
src/views/user/welcome-pack.vue

@@ -1,776 +1,776 @@
 <template>
-	<div v-loading="loading">
-		<div class="white-box" style="padding: 0 25px; margin-top: 25px;">
-			<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-divider content-position="left">{{ $t('user.accountInformation') }}</el-divider>
-						<el-form-item :label="$t('user.newMemberCode')">
-							<el-input v-model="form.insertUserName" @blur="checkBaUser" :readonly="userReadOnly"></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('user.entryLevel')">
-							<el-select v-model="form.decLv" :placeholder="$t('user.selectEntryLevel')" style="width: 100%;">
-								<el-option v-for="item in allDecLevel" :key="item.ID" :label="item.LEVEL_NAME" :value="item.ID"></el-option>
-							</el-select>
-						</el-form-item>
-						<el-form-item :label="$t('user.stockistCode')">
-							<el-input v-model="form.decUserName" readonly></el-input>
-						</el-form-item>
-
-						<el-form-item>
-							<template slot="label">
-								{{ $t('user.selectWelcomePack') }}
-							</template>
-							<el-tabs type="border-card" v-model="decWay" style="position: relative; width: 100%;">
-								<el-tab-pane :label="$t('shop.product')" name="2">
-									<el-collapse accordion v-model="activeName">
-										<el-collapse-item name="product">
-											<el-table :data="tableData" :show-header="false" @selection-change="handleSelectionChange">
-												<el-table-column type="selection" width="30" align="center" style="top: -30px;"></el-table-column>
-												<el-table-column align="center">
-													<template slot-scope="{row, $index}">
-														<el-container>
-															<el-aside width="80px" style=" padding: 0; margin-bottom: 0; background-color: #ffffff;">
-																<el-image style="width: 80px; height: 80px" :src="tool.getArImage(row.COVER, '/files/')"></el-image>
-															</el-aside>
-															<el-main style="padding: 0;">
-																<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>{{ $t('shop.productBV') }}:{{ row.PRICE_PV | toThousandFilter }}</span><br />
-																	<span style="display: inline-block; float: right; ">
-																	<el-input-number size="mini" v-model="storeNums[$index]" :min="1" :max="Number(row.STORE_NUMS)" @change="handleInputNumber($event, row)"></el-input-number>
-																</span>
-																	<br />
-																</div>
-															</el-main>
-														</el-container>
-													</template>
-												</el-table-column>
-											</el-table>
-										</el-collapse-item>
-									</el-collapse>
-
-									<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.productBV') }}:{{ pricePvSum | toThousandFilter }}</div>
-											<div style="display: inline-block;">{{ $t('shop.taxAmount') }}:{{ $t('currency.sign') }} {{ taxSum }}</div>
-										</div>
-									</div>
-								</el-tab-pane>
-							</el-tabs>
-						</el-form-item>
-
-						<el-divider content-position="left">{{ $t('atlas.networkInformation') }}</el-divider>
-						<el-form-item :label="$t('shop.sponsorCode')">
-							<el-input v-model="form.recUserName" @change="handleChkRecUser" :readonly="recReadOnly"></el-input>
-						</el-form-item>
-						<el-form-item>
-							<el-input v-model="recRealName" :disabled="true"></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('atlas.placementCode')">
-							<el-input v-model="form.conUserName" @change="handleChkConUser"></el-input>
-						</el-form-item>
-						<el-form-item>
-							<el-input type="textarea" :rows="2" v-model="conRealName" :disabled="true"></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('atlas.placementTree')">
-							<el-radio-group border v-model="form.location">
-								<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-input>
-						</el-form-item>
-						<el-form-item :label="$t('shop.phoneNumber')">
-							<el-input v-model="form.mobile"></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('user.email')">
-							<el-input v-model="form.email"></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('profile.loginPassword')">
-							<el-input v-model="form.password" maxlength="32" :placeholder="$t('profile.enterLoginPassword')"></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('profile.paymentPassword')">
-							<el-input v-model="form.payPassword" maxlength="32" :placeholder="$t('profile.enterPaymentPassword')"></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('shop.recipientName')">
-							<el-input v-model="form.consignee"></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('shop.phoneNumber')">
-							<el-input v-model="form.acceptMobile"></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('shop.shipping')">
-							<el-radio-group v-model="form.way" @change="wayChange">
-								<el-radio label="express">{{ $t('shop.delivery') }}</el-radio>
-								<el-radio label="pickup">{{ $t('shop.selfPickUp') }}</el-radio>
-							</el-radio-group>
-						</el-form-item>
-						<el-form-item prop="areaSelected" :label="$t('config.state')">
-							<el-cascader :disabled="areaDisabled" size="large" :placeholder="$t('shop.delivery')" :options="regionData" v-model="form.areaSelected" style="width: 100%;"></el-cascader>
-						</el-form-item>
-						<el-form-item :label="$t('config.detailedAddress')">
-							<el-input :disabled="addressDisabled" v-model="form.address"></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('config.city')">
-							<el-input :disabled="addressDisabled" v-model="form.cityName"></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('config.localGovernmentArea')">
-							<el-input :disabled="addressDisabled" v-model="form.lgaName"></el-input>
-						</el-form-item>
-
-						<el-divider content-position="left">{{ $t('finance.bankInformation') }}</el-divider>
-						<el-form-item :label="$t('finance.bankName')">
-							<el-select v-model="form.openBank" :placeholder="$t('finance.selectBank')" style="width: 100%;">
-								<el-option v-for="(item,index) in allOpenBank" :key="index" :label="item.BANK_NAME" :value="item.BANK_CODE"></el-option>
-							</el-select>
-						</el-form-item>
-						<el-form-item :label="$t('finance.accountName')">
-							<el-input v-model="form.bankAddress"></el-input>
-						</el-form-item>
-						<el-form-item :label="$t('finance.bankAccount')">
-							<el-input v-model="form.bankNo" maxlength="50"></el-input>
-						</el-form-item>
-
-						<el-divider content-position="left">{{ $t('user.payInfo') }}</el-divider>
-						<el-form-item :label="$t('shop.paymentMethod')" required>
-							<el-radio-group v-model="form.payType" @change="chosePayType">
-								<el-radio border v-for="(item, index) in payList" :key='index' :label="item.label" style="margin: 5px;">
-									{{ item.name }}<span v-if="item.label === 'cash'" style="color: tomato;">({{ $t('currency.sign') }} {{ userBalance.cash }})</span>
-								</el-radio>
-							</el-radio-group>
-						</el-form-item>
-
-						<el-form-item>
-							<el-button size="small" type="primary" @click="onSubmit" :loading="submitButtonStat">{{ $t('common.save') }}</el-button>
-						</el-form-item>
-					</el-form>
-				</el-col>
-			</el-row>
-		</div>
-
-		<!-- payStack模态框 -->
-		<el-dialog :title="$t('shop.goPay')" :visible.sync="visible" :width="payStackScreenWidth" v-loading="payStackLoading" :before-close="handleClose">
-			<section>
-				<el-form :model="payForm">
-					<el-form-item :label="$t('user.email')" label-width="100px" required>
-						<el-input v-model="payForm.email" autocomplete="off"></el-input>
-					</el-form-item>
-					<el-form-item :label="$t('shop.amount')" label-width="100px" required>
-						<el-input v-model="payForm.amount" autocomplete="off" readonly></el-input>
-					</el-form-item>
-				</el-form>
-			</section>
-			<paystack
-				:firstname="payForm.firstname"
-				:lastname="payForm.lastname"
-				:amount="payForm.amount * 100"
-				:email="payForm.email"
-				:metadata="payForm.metadata"
-				:currency="payForm.currency"
-				:paystackkey="payForm.publicKey"
-				:reference="reference"
-				:channels="channels"
-				:callback="processPayment"
-				:close="handleClose"
-			>
-				<el-button type="primary" size="small">{{ $t('shop.goPay') }}</el-button>
-			</paystack>
-			<el-button type="danger" size="small" class="cancelButton" @click="handleClose" style="margin-left: 10px;">{{ $t('common.cancel') }}</el-button>
-		</el-dialog>
-
-		<!-- 倒计时页面 -->
-		<el-dialog :title="$t('common.hint')" :visible.sync="payDialog" :width="payStackScreenWidth" :show-close="false" :close="handleOrderList">
-			<el-card shadow="always">
-				<el-result icon="success" :title="$t('common.successfully')" :subTitle="$t('shop.successOrderTips')">
-					<template slot="extra">
-						<el-button type="primary" size="medium" @click="handleOrderList">{{ $t('shop.goBack') }}({{ countdown }})</el-button>
-					</template>
-				</el-result>
-			</el-card>
-		</el-dialog>
-
-		<!-- 商品详情 -->
-		<el-dialog :title="product.GOODS_NO" :visible.sync="visibleProduct" :width="screenWidth" style="margin-top: -95px;">
-			<el-row :gutter="20">
-				<el-col :xs="24" :sm="12" :lg="12">
-					<el-image style="width: 100%; height: 100%" :style="imageStyle" :src="tool.getArImage(product.COVER, '/files/')"></el-image>
-				</el-col>
-				<el-col :xs="24" :sm="12" :lg="12">
-					<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>{{ $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.inventory') }}:{{ product.STORE_NUMS }}</span>
-					</div>
-				</el-col>
-			</el-row>
-		</el-dialog>
-	</div>
+  <div v-loading="loading">
+    <div class="white-box" style="padding: 0 25px; margin-top: 25px;">
+      <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-divider content-position="left">{{ $t('user.accountInformation') }}</el-divider>
+            <el-form-item :label="$t('user.newMemberCode')">
+              <el-input v-model="form.insertUserName" :readonly="userReadOnly" @blur="checkBaUser" />
+            </el-form-item>
+            <el-form-item :label="$t('user.entryLevel')">
+              <el-select v-model="form.decLv" :placeholder="$t('user.selectEntryLevel')" style="width: 100%;">
+                <el-option v-for="item in allDecLevel" :key="item.ID" :label="item.LEVEL_NAME" :value="item.ID" />
+              </el-select>
+            </el-form-item>
+            <el-form-item :label="$t('user.stockistCode')">
+              <el-input v-model="form.decUserName" readonly />
+            </el-form-item>
+
+            <el-form-item>
+              <template slot="label">
+                {{ $t('user.selectWelcomePack') }}
+              </template>
+              <el-tabs v-model="decWay" type="border-card" style="position: relative; width: 100%;">
+                <el-tab-pane :label="$t('shop.product')" name="2">
+                  <el-collapse v-model="activeName" accordion>
+                    <el-collapse-item name="product">
+                      <el-table :data="tableData" :show-header="false" @selection-change="handleSelectionChange">
+                        <el-table-column type="selection" width="30" align="center" style="top: -30px;" />
+                        <el-table-column align="center">
+                          <template slot-scope="{row, $index}">
+                            <el-container>
+                              <el-aside width="80px" style=" padding: 0; margin-bottom: 0; background-color: #ffffff;">
+                                <el-image style="width: 80px; height: 80px" :src="tool.getArImage(row.COVER, '/files/')" />
+                              </el-aside>
+                              <el-main style="padding: 0;">
+                                <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>{{ $t('shop.productBV') }}:{{ row.PRICE_PV | 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>
+                                  <br>
+                                </div>
+                              </el-main>
+                            </el-container>
+                          </template>
+                        </el-table-column>
+                      </el-table>
+                    </el-collapse-item>
+                  </el-collapse>
+
+                  <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.productBV') }}:{{ pricePvSum | toThousandFilter }}</div>
+                      <div style="display: inline-block;">{{ $t('shop.taxAmount') }}:{{ $t('currency.sign') }} {{ taxSum }}</div>
+                    </div>
+                  </div>
+                </el-tab-pane>
+              </el-tabs>
+            </el-form-item>
+
+            <el-divider content-position="left">{{ $t('atlas.networkInformation') }}</el-divider>
+            <el-form-item :label="$t('shop.sponsorCode')">
+              <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>
+            <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-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>
+            <el-form-item :label="$t('user.email')">
+              <el-input v-model="form.email" />
+            </el-form-item>
+            <el-form-item :label="$t('profile.loginPassword')">
+              <el-input v-model="form.password" maxlength="32" :placeholder="$t('profile.enterLoginPassword')" />
+            </el-form-item>
+            <el-form-item :label="$t('profile.paymentPassword')">
+              <el-input v-model="form.payPassword" maxlength="32" :placeholder="$t('profile.enterPaymentPassword')" />
+            </el-form-item>
+            <el-form-item :label="$t('shop.recipientName')">
+              <el-input v-model="form.consignee" />
+            </el-form-item>
+            <el-form-item :label="$t('shop.phoneNumber')">
+              <el-input v-model="form.acceptMobile" />
+            </el-form-item>
+            <el-form-item :label="$t('shop.shipping')">
+              <el-radio-group v-model="form.way" @change="wayChange">
+                <el-radio label="express">{{ $t('shop.delivery') }}</el-radio>
+                <el-radio label="pickup">{{ $t('shop.selfPickUp') }}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item prop="areaSelected" :label="$t('config.state')">
+              <el-cascader v-model="form.areaSelected" :disabled="areaDisabled" size="large" :placeholder="$t('shop.delivery')" :options="regionData" style="width: 100%;" />
+            </el-form-item>
+            <el-form-item :label="$t('config.detailedAddress')">
+              <el-input v-model="form.address" :disabled="addressDisabled" />
+            </el-form-item>
+            <el-form-item :label="$t('config.city')">
+              <el-input v-model="form.cityName" :disabled="addressDisabled" />
+            </el-form-item>
+            <el-form-item :label="$t('config.localGovernmentArea')">
+              <el-input v-model="form.lgaName" :disabled="addressDisabled" />
+            </el-form-item>
+
+            <el-divider content-position="left">{{ $t('finance.bankInformation') }}</el-divider>
+            <el-form-item :label="$t('finance.bankName')">
+              <el-select v-model="form.openBank" :placeholder="$t('finance.selectBank')" style="width: 100%;">
+                <el-option v-for="(item,index) in allOpenBank" :key="index" :label="item.BANK_NAME" :value="item.BANK_CODE" />
+              </el-select>
+            </el-form-item>
+            <el-form-item :label="$t('finance.accountName')">
+              <el-input v-model="form.bankAddress" />
+            </el-form-item>
+            <el-form-item :label="$t('finance.bankAccount')">
+              <el-input v-model="form.bankNo" maxlength="50" />
+            </el-form-item>
+
+            <el-divider content-position="left">{{ $t('user.payInfo') }}</el-divider>
+            <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>
+                </el-radio>
+              </el-radio-group>
+            </el-form-item>
+
+            <el-form-item>
+              <el-button size="small" type="primary" :loading="submitButtonStat" @click="onSubmit">{{ $t('common.save') }}</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
+      </el-row>
+    </div>
+
+    <!-- payStack模态框 -->
+    <el-dialog v-loading="payStackLoading" :title="$t('shop.goPay')" :visible.sync="visible" :width="payStackScreenWidth" :before-close="handleClose">
+      <section>
+        <el-form :model="payForm">
+          <el-form-item :label="$t('user.email')" label-width="100px" required>
+            <el-input v-model="payForm.email" autocomplete="off" />
+          </el-form-item>
+          <el-form-item :label="$t('shop.amount')" label-width="100px" required>
+            <el-input v-model="payForm.amount" autocomplete="off" readonly />
+          </el-form-item>
+        </el-form>
+      </section>
+      <paystack
+        :firstname="payForm.firstname"
+        :lastname="payForm.lastname"
+        :amount="payForm.amount * 100"
+        :email="payForm.email"
+        :metadata="payForm.metadata"
+        :currency="payForm.currency"
+        :paystackkey="payForm.publicKey"
+        :reference="reference"
+        :channels="channels"
+        :callback="processPayment"
+        :close="handleClose"
+      >
+        <el-button type="primary" size="small">{{ $t('shop.goPay') }}</el-button>
+      </paystack>
+      <el-button type="danger" size="small" class="cancelButton" style="margin-left: 10px;" @click="handleClose">{{ $t('common.cancel') }}</el-button>
+    </el-dialog>
+
+    <!-- 倒计时页面 -->
+    <el-dialog :title="$t('common.hint')" :visible.sync="payDialog" :width="payStackScreenWidth" :show-close="false" :close="handleOrderList">
+      <el-card shadow="always">
+        <el-result icon="success" :title="$t('common.successfully')" :sub-title="$t('shop.successOrderTips')">
+          <template slot="extra">
+            <el-button type="primary" size="medium" @click="handleOrderList">{{ $t('shop.goBack') }}({{ countdown }})</el-button>
+          </template>
+        </el-result>
+      </el-card>
+    </el-dialog>
+
+    <!-- 商品详情 -->
+    <el-dialog :title="product.GOODS_NO" :visible.sync="visibleProduct" :width="screenWidth" style="margin-top: -95px;">
+      <el-row :gutter="20">
+        <el-col :xs="24" :sm="12" :lg="12">
+          <el-image style="width: 100%; height: 100%" :style="imageStyle" :src="tool.getArImage(product.COVER, '/files/')" />
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12">
+          <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>{{ $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.inventory') }}:{{ product.STORE_NUMS }}</span>
+          </div>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-import {fetchFullInfo, fetchBrandAmbassadorInfo, fetchAutoPlace, fetchWelcomePack, createWelcomePack} from '@/api/user'
-import waves from '@/directive/waves'
-import {formatAmount, getScreenWidth} from "@/utils"
+import { deleteApproachOrder } from '@/api/shop'
+import { createWelcomePack, fetchAutoPlace, fetchBrandAmbassadorInfo, fetchFullInfo, fetchWelcomePack } from '@/api/user'
 import Pagination from '@/components/Pagination'
+import waves from '@/directive/waves'
+import region from '@/store/modules/region'
+import { getScreenWidth } from '@/utils'
+import tool from '@/utils/tool'
+import usersInfo from '@/utils/usersInfo'
 import paystack from 'vue-paystack'
-import tool from "@/utils/tool"
-import usersInfo from "@/utils/usersInfo"
-import {deleteApproachOrder} from "@/api/shop"
-import region from "@/store/modules/region"
 
 export default {
-  name: 'welcomePack',
+  name: 'WelcomePack',
   components: { Pagination, paystack },
   directives: { waves },
-	filters: {
-		bvFilter(row) {
-			return tool.calculateBV(row.REAL_PV, row.BUY_NUMS)
-		},
-		taxAmountFilter(row) {
-			return tool.calculateTax(row.REAL_PRICE, row.BUY_NUMS)
-		},
-		priceAmountFilter(row) {
-			return tool.formatPrice(row.REAL_PRICE * row.BUY_NUMS)
-		},
-		statusFilter(status) {
-			const statusMap = {
-				Unpaid: 'info',
-				Paid: 'success'
-			}
-			return statusMap[status]
-		}
-	},
-	computed: {
-		// PayStack混淆串
-		reference() {
-			let text = ''
-			let possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
-			for (let i = 0; i < 10; i++) {
-				text += possible.charAt(Math.floor(Math.random() * possible.length))
-			}
-			return text
-		}
-	},
+  filters: {
+    bvFilter(row) {
+      return tool.calculateBV(row.REAL_PV, row.BUY_NUMS)
+    },
+    taxAmountFilter(row) {
+      return tool.calculateTax(row.REAL_PRICE, row.BUY_NUMS)
+    },
+    priceAmountFilter(row) {
+      return tool.formatPrice(row.REAL_PRICE * row.BUY_NUMS)
+    },
+    statusFilter(status) {
+      const statusMap = {
+        Unpaid: 'info',
+        Paid: 'success'
+      }
+      return statusMap[status]
+    }
+  },
   data() {
     return {
-			loading: false,
-			tool: tool,
-
-			allGoods: [],
-			numList: [],
-			categoryType: '',
-			sellType: [],
-			payList: [],
-			screenWidth: getScreenWidth() > 600 ? '500px' : getScreenWidth() + 'px',
-			labelPosition: getScreenWidth() > 600 ? 'right' : 'top',
-			payStackScreenWidth: getScreenWidth() > 500 ? '450px' : getScreenWidth() + 'px',
-
-			dialog: false,
-			dialogLoading: false,
-
-			multipleSelection: [],
-			sellPriceSum: 0.00,
-			pricePvSum: 0.00,
-			taxSum: 0.00,
-			storeNums: [],
-			tableData: null,
-			payAmount: 0.00,
-
-			cashCurrency: '',
-			currency: {},
-			pointsSum: 0,
-			cashSum: 0,
-			pointFreight: 0,
-			freeShipping: '',
-			goodsId: '',
-			goodsNum: '',
-			payPassword: '',
-			submitButtonStat: false,
-			sn: '',
-			orderType: '',
-			payDialog: false,
-			countdown: 5,
-			visible: false,
-			totalAmount: 0.00,
-			freight: 0.00,
-			userBalance: {
-				cash: 0,
-			},
-
-			payType: 'cash',
-			payStackLoading: false,
-			channels: ["card", "bank", "ussd", "qr"],
-			payForm: {
-				publicKey: process.env.VUE_APP_BASE_PAY_STACK_PUBLIC_KEY,
-				currency: 'NGN',
-				firstname: usersInfo.userName(),
-				lastname: '',
-				email: usersInfo.userEmail(),
-				amount: 0,
-				orderSn: '',
-				metadata: {
-					cart_id: '',
-					custom_fields: [
-						{
-							display_name: 'orderSn',
-							variable_name: 'orderSn',
-							value: this.sn,
-						},
-						{
-							display_name: 'orderType',
-							variable_name: 'orderType',
-							value: 'baDec'
-						},
-					]
-				},
-			},
-
-			addressId: '',
-			selfPickUpAddressId: '100000000000000000',
-			shippingAddressList: [],
-
-			visibleProduct: false,
-			product: {
-				GOODS_NAME: '',
-				GOODS_NO: '',
-				COVER: '',
-				SELL_PRICE: 0,
-				PRICE_PV: 0,
-				TAX_RATE: 0,
-				taxAmount: 0,
-			},
-			imageStyle: 'margin-top: -50px;',
-
-			decWay: '2',
-			regionData: region.regionInfo.regionData,
-			form: {
-				decType: 'normal',
-				realName: '',
-				decLv: '',
-				insertUserName: '',
-				decUserName: usersInfo.userName(),
-				recUserName: '',
-				conUserName: '',
-				insertUserIdCard: '',
-				consignee: '',
-				acceptMobile: '',
-				areaSelected: [],
-				address: '',
-				openBank: '',
-				bankAddress: '',
-				bankProvince: '',
-				bankCity: '',
-				bankCounty: '',
-				bankNo: '',
-				bankAreaSelected: [],
-				password: '111111',
-				payPassword: '111111',
-				mobile: '',
-				email: '',
-				packageId: '',
-				goodsId: [],
-				goodsNum: [],
-				province: '',
-				cityName: '',
-				lgaName: '',
-				way: 'express',
-				payType: '',
-				autoPlace: '',
-				location: ''
-			},
-
-			conRealName: '-',
-			recRealName: '-',
-			areaDisabled: false,
-			addressDisabled: false,
-
-			userReadOnly: true,
-			recReadOnly: false,
-			allDecLevel: usersInfo.getBaseInfo().decLevels,
-			allOpenBank: [],
-
-			activeName: 'product',
+      loading: false,
+      tool: tool,
+
+      allGoods: [],
+      numList: [],
+      categoryType: '',
+      sellType: [],
+      payList: [],
+      screenWidth: getScreenWidth() > 600 ? '500px' : getScreenWidth() + 'px',
+      labelPosition: getScreenWidth() > 600 ? 'right' : 'top',
+      payStackScreenWidth: getScreenWidth() > 500 ? '450px' : getScreenWidth() + 'px',
+
+      dialog: false,
+      dialogLoading: false,
+
+      multipleSelection: [],
+      sellPriceSum: 0.00,
+      pricePvSum: 0.00,
+      taxSum: 0.00,
+      storeNums: [],
+      tableData: null,
+      payAmount: 0.00,
+
+      cashCurrency: '',
+      currency: {},
+      pointsSum: 0,
+      cashSum: 0,
+      pointFreight: 0,
+      freeShipping: '',
+      goodsId: '',
+      goodsNum: '',
+      payPassword: '',
+      submitButtonStat: false,
+      sn: '',
+      orderType: '',
+      payDialog: false,
+      countdown: 5,
+      visible: false,
+      totalAmount: 0.00,
+      freight: 0.00,
+      userBalance: {
+        cash: 0
+      },
+
+      payType: 'cash',
+      payStackLoading: false,
+      channels: ['card', 'bank', 'ussd', 'qr'],
+      payForm: {
+        publicKey: process.env.VUE_APP_BASE_PAY_STACK_PUBLIC_KEY,
+        currency: 'NGN',
+        firstname: usersInfo.userName(),
+        lastname: '',
+        email: usersInfo.userEmail(),
+        amount: 0,
+        orderSn: '',
+        metadata: {
+          cart_id: '',
+          custom_fields: [
+            {
+              display_name: 'orderSn',
+              variable_name: 'orderSn',
+              value: this.sn
+            },
+            {
+              display_name: 'orderType',
+              variable_name: 'orderType',
+              value: 'baDec'
+            }
+          ]
+        }
+      },
+
+      addressId: '',
+      selfPickUpAddressId: '100000000000000000',
+      shippingAddressList: [],
+
+      visibleProduct: false,
+      product: {
+        GOODS_NAME: '',
+        GOODS_NO: '',
+        COVER: '',
+        SELL_PRICE: 0,
+        PRICE_PV: 0,
+        TAX_RATE: 0,
+        taxAmount: 0
+      },
+      imageStyle: 'margin-top: -50px;',
+
+      decWay: '2',
+      regionData: region.regionInfo.regionData,
+      form: {
+        decType: 'normal',
+        realName: '',
+        decLv: '',
+        insertUserName: '',
+        decUserName: usersInfo.userName(),
+        recUserName: '',
+        conUserName: '',
+        insertUserIdCard: '',
+        consignee: '',
+        acceptMobile: '',
+        areaSelected: [],
+        address: '',
+        openBank: '',
+        bankAddress: '',
+        bankProvince: '',
+        bankCity: '',
+        bankCounty: '',
+        bankNo: '',
+        bankAreaSelected: [],
+        password: '111111',
+        payPassword: '111111',
+        mobile: '',
+        email: '',
+        packageId: '',
+        goodsId: [],
+        goodsNum: [],
+        province: '',
+        cityName: '',
+        lgaName: '',
+        way: 'express',
+        payType: '',
+        autoPlace: '',
+        location: ''
+      },
+
+      conRealName: '-',
+      recRealName: '-',
+      areaDisabled: false,
+      addressDisabled: false,
+
+      userReadOnly: true,
+      recReadOnly: false,
+      allDecLevel: usersInfo.getBaseInfo().decLevels,
+      allOpenBank: [],
+
+      activeName: 'product'
+    }
+  },
+  computed: {
+    // PayStack混淆串
+    reference() {
+      let text = ''
+      const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
+      for (let i = 0; i < 10; i++) {
+        text += possible.charAt(Math.floor(Math.random() * possible.length))
+      }
+      return text
     }
   },
   created() {
-			let regionInfo = this.$store.getters.regionInfo
-		// console.log(this.$store.state.region)
+    const regionInfo = this.$store.getters.regionInfo
+    // console.log(this.$store.state.region)
     this.fetchWelcomePack()
   },
   methods: {
-		// 会员报单/BA升级
-		fetchWelcomePack() {
-			this.loading = true
-			fetchWelcomePack().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.categoryType = 1
-
-				let settingObj = this.allGoods
-				for (let i in this.allGoods) {
-					this.storeNums[i] = 1
-					settingObj[i].goodsNum = 0
-				}
-
-				this.tableData = Object.values(settingObj)
-				let pageList = this.multipleSelection
-				this.$nextTick(function () {
-					for (let i in this.tableData) {
-						for( let j in  pageList) {
-							if( pageList[j].ID === this.tableData[i].ID ) {
-								this.$data.storeNums[i] = pageList[j].goodsNum
-								this.tableData[i].goodsNum = pageList[j].goodsNum
-								break
-							}
-						}
-					}
-				})
-
-				// 支付方式
-				this.payList = response.data.sellType[0]['sell_type']
-				// 支付方式的第一项默认选中
-				this.form.payType = Object.values(this.payList)[1]['label']
+    // 会员报单/BA升级
+    fetchWelcomePack() {
+      this.loading = true
+      fetchWelcomePack().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.categoryType = 1
+
+        const settingObj = this.allGoods
+        for (const i in this.allGoods) {
+          this.storeNums[i] = 1
+          settingObj[i].goodsNum = 0
+        }
+
+        this.tableData = Object.values(settingObj)
+        const pageList = this.multipleSelection
+        this.$nextTick(function() {
+          for (const i in this.tableData) {
+            for (const j in pageList) {
+              if (pageList[j].ID === this.tableData[i].ID) {
+                this.$data.storeNums[i] = pageList[j].goodsNum
+                this.tableData[i].goodsNum = pageList[j].goodsNum
+                break
+              }
+            }
+          }
+        })
+
+        // 支付方式
+        this.payList = response.data.sellType[0]['sell_type']
+        // 支付方式的第一项默认选中
+        this.form.payType = Object.values(this.payList)[1]['label']
 
         setTimeout(() => {
           this.loading = false
         }, 0.5 * 1000)
       })
     },
-		// 商品详情
-		handleProduct(row) {
-			this.product = row
-			this.product.taxAmount = tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
-			this.visibleProduct = true
-		},
-		// 选择商品计数
-		handleInputNumber(current, row){
-			let pageList = this.multipleSelection
-			let selectStatus = false
-			for (let i in pageList) {
-				if (pageList[i].ID === row.ID) {
-					pageList[i].goodsNum = current
-					selectStatus = true
-					break
-				}
-			}
-			if (selectStatus) {
-				this.multipleSelection = pageList
-				this.handleSureChange()
-			}
-		},
-		// 统计商品
-		handleSureChange() {
-			if (this.multipleSelection.length > 0) {
-				let accumulatorSellPrice = 0, accumulatorPricePv = 0, accumulatorTax = 0
-				this.multipleSelection.forEach(accumulator => {
-					accumulatorSellPrice += accumulator.SELL_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));
-				})
-
-				this.sellPriceSum = tool.formatPrice(accumulatorSellPrice)
-				this.pricePvSum = tool.formatPrice(accumulatorPricePv)
-				this.taxSum = tool.formatPrice(accumulatorTax)
-
-				this.display = true
-			} else {
-				this.sellPriceSum = this.pricePvSum = this.taxSum = 0.00
-				this.display = true
-			}
-		},
-		// 选择商品
-		handleSelectionChange(val) {
-			let idx = -1, num
-			for (let i in this.tableData) {
-				for (let v in val){
-					if (val[v].ID === this.tableData[i].ID) {
-						idx = i
-						num = this.storeNums[idx]
-						val[v]['goodsNum'] = num
-						break
-					}
-				}
-			}
-			this.multipleSelection = val
-			// 计算统计
-			this.handleSureChange()
-		},
-		// 选择收货地址
-		choseAddress (addressId) {
-			this.addressId = addressId
-			// 设置运费
-			this.setFreight()
-			// 计算价格
-			this.getSumMoney()
-		},
-		// 切换支付方式
-		chosePayType(type) {
-			this.payType = type
-		},
-		// 关闭支付回调
-		handleClose() {
-			this.$confirm(this.$t('shop.confirmClose')).then(_ => {
-				deleteApproachOrder({ orderSn: this.form.orderSn }).then(() => {
-					// 关闭支付模态框
-					this.visible = false
-					// 关闭购物车
-					this.visibleShoppingCart = false
-					this.submitButtonStat = false
-				})
-			})
-		},
-		// 支付成功回调
-		processPayment() {
-			// 关闭支付页面
-			this.visible = false
-			this.payStackLoading = false
-			// 显示支付成功模态框
-			this.payDialog = true;
-			// 启动支付成功倒计时
-			this.handleCountdown()
-		},
-		// 倒计时结束跳转
-		handleOrderList () {
-			this.$router.push({path: `/shop/dec-order-list`})
-		},
-		// 启动倒计时
-		handleCountdown () {
-			// 创建定时器
-			setInterval(() => {
-				// 每隔1秒把time的值减一,赋值给span标签
-				this.countdown--
-				if (this.countdown === 0) {
-					// 倒计时结束,跳转到订单列表
-					this.$router.push({path: `/shop/dec-order-list`});
-				}
-			}, 1000)
-		},
-		// 会员查询
-		handleChkRecUser() {
-			this.form.conUserName = ''
-			this.conRealName = '-'
-			this.form.autoPlace = ''
-			if (this.form.recUserName) {
-				this.loading = true
-				fetchFullInfo({ userName: this.form.recUserName }).then(response => {
-					this.recRealName = response.data.REAL_NAME
-					this.loading = false
-				}).catch(() => {
-					this.recRealName = '-'
-					this.loading = false
-				})
-			}
-		},
-		// 返回方式
-		wayChange () {
-			if (this.form.way === 'pickup') {
-				this.areaDisabled = true
-				this.addressDisabled = true
-			} else {
-				this.areaDisabled = false
-				this.addressDisabled = false
-			}
-		},
-		// 会员报单/BA升级
-		onSubmit() {
-			if (!this.form.decLv) {
-				this.$message({
-					message: this.$t('profile.selectLevel'),
-					type: 'error'
-				})
-				return false
-			}
-			// 已选择商品
-			this.selectProduct()
-			if (this.multipleSelection.length <= 0) {
-				this.$message.error(this.$t('shop.chooseTips'))
-				return false
-			}
-			// 余额
-			let amountBalance = this.userBalance[this.form.payType] || 0
-			// 余额是否充足
-			if ((this.form.payType === 'cash') && ((amountBalance - this.payAmount) < 0)) {
-				// 账户类型提示信息
-				let account = this.payList.filter(item => {
-					return this.form.payType === item.label;
-				})
-				let accountType = account[0] && account[0].name || ''
-				this.$message({
-					message: accountType + this.$t('shop.balanceNotAllow'),
-					type: 'error'
-				})
-				return false
-			}
-
-			this.submitButtonStat = true
-
-			let params = {
-				consignee: this.form.consignee,
-				acceptMobile: this.form.acceptMobile,
-				province: this.form.areaSelected[0] ? this.form.areaSelected[0] : '',
-				city: this.form.areaSelected[1] ? this.form.areaSelected[1] : '',
-				county: this.form.areaSelected[2] ? this.form.areaSelected[2] : '',
-				address: this.form.address,
-				decType: this.form.decType,
-				insertUserName: this.form.insertUserName,
-				decLv: this.form.decLv,
-				realName: this.form.realName,
-				decUserName: this.form.decUserName,
-				conUserName: this.form.conUserName,
-				recUserName: this.form.recUserName,
-				insertUserIdCard: this.form.insertUserIdCard,
-				openBank: this.form.openBank,
-				bankAddress: this.form.bankAddress,
-				mobile: this.form.mobile,
-				email: this.form.email,
-				cityName: this.form.cityName,
-				lgaName: this.form.lgaName,
-
-				bankProvince: this.form.bankAreaSelected[0] ? this.form.bankAreaSelected[0] : '',
-				bankCity: this.form.bankAreaSelected[1] ? this.form.bankAreaSelected[1] : '',
-				bankCounty: this.form.bankAreaSelected[2] ? this.form.bankAreaSelected[2] : '',
-
-				bankNo: this.form.bankNo,
-				password: this.form.password,
-				payPassword: this.form.payPassword,
-				packageId: this.form.packageId,
-				goodsId: this.form.goodsId,
-				goodsNum: this.form.goodsNum,
-				location: this.form.location,
-				decWay: this.decWay,
-				payType: this.form.payType
-			}
-			createWelcomePack(params).then(response => {
-				if (this.form.payType !== 'pay_stack') {
-					// 余额支付
-					this.$message({
-						message: this.$t('common.successfully'),
-						type: 'success'
-					})
-					this.submitButtonStat = false
-					this.$router.push({path: `/shop/order-list`})
-				} else {
-					this.submitButtonStat = false
-					this.payForm.orderSn = response.data.SN
-					this.payForm.amount = response.data.ORDER_AMOUNT
-					this.payForm.metadata.custom_fields[0].value = response.data.SN
-					if (this.form.decType === 'ba') {
-						this.payForm.metadata.custom_fields[1].value = 'baUpgrade';
-					} else {
-						this.payForm.metadata.custom_fields[1].value = 'userDec';
-					}
-					this.visible = true
-				}
-			}).catch(err => {
-				this.$message({
-					message: err,
-					type: 'error'
-				})
-				this.submitButtonStat = false
-			})
-		},
-		// 已选择商品
-		selectProduct() {
-			this.payAmount = 0
-			this.form.goodsId = []
-			this.form.goodsNum = []
-			this.multipleSelection.map((item) => {
-				this.form.goodsId.push(item.ID)
-				this.form.goodsNum.push(item.goodsNum)
-				this.payAmount += item.goodsNum * item.SELL_PRICE
-			})
-		},
-		// 报单方式
-		decTypeChange() {
-			if (this.form.decType === 'ba') {
-				this.form.insertUserName = ''
-				this.userReadOnly = false
-			} else {
-				this.form.recUserName = ''
-				this.recRealName = '-'
-				this.recReadOnly = false
-				this.userReadOnly = true
-				this.fetchWelcomePack()
-			}
-		},
-		// BA会员查询
-		checkBaUser() {
-			if (this.form.decType === 'ba' && this.form.insertUserName !== '') {
-				this.loading = true
-				fetchBrandAmbassadorInfo({ userName: this.form.insertUserName }).then(response => {
-					this.form.recUserName = response.data.REC_USER_NAME
-					this.form.realName = response.data.REAL_NAME
-					this.handleChkRecUser()
-					this.recReadOnly = true
-					this.loading = false
-				}).catch(() => {
-					this.loading = false
-				})
-			}
-		},
-		// 查询安置人
-		handleChkConUser() {
-			if (this.form.conUserName) {
-				this.loading = true
-				fetchFullInfo( { userName: this.form.conUserName }).then(response => {
-					this.conRealName = response.data.REAL_NAME + response.data.isLocation
-					this.loading = false
-				}).catch(() => {
-					this.conRealName = '-'
-					this.loading = false
-				})
-			}
-		},
-		// 自动设置区位
-		setAutoPlace(side) {
-			if (this.recRealName !== '-') {
-				this.loading = true
-				fetchAutoPlace( { userName: this.form.recUserName, side: side }).then(response => {
-					this.form.conUserName = response.data.USER_NAME
-					this.handleChkConUser()
-					this.form.location = 1
-					this.form.autoPlace = side
-					this.loading = false
-				}).catch(() => {
-					this.conRealName = '-'
-					this.loading = false
-				})
-			} else {
-				this.form.autoPlace = ''
-				return false
-			}
-		},
+    // 商品详情
+    handleProduct(row) {
+      this.product = row
+      this.product.taxAmount = tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
+      this.visibleProduct = true
+    },
+    // 选择商品计数
+    handleInputNumber(current, row) {
+      const pageList = this.multipleSelection
+      let selectStatus = false
+      for (const i in pageList) {
+        if (pageList[i].ID === row.ID) {
+          pageList[i].goodsNum = current
+          selectStatus = true
+          break
+        }
+      }
+      if (selectStatus) {
+        this.multipleSelection = pageList
+        this.handleSureChange()
+      }
+    },
+    // 统计商品
+    handleSureChange() {
+      if (this.multipleSelection.length > 0) {
+        let accumulatorSellPrice = 0; let accumulatorPricePv = 0; let accumulatorTax = 0
+        this.multipleSelection.forEach(accumulator => {
+          accumulatorSellPrice += accumulator.SELL_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))
+        })
+
+        this.sellPriceSum = tool.formatPrice(accumulatorSellPrice)
+        this.pricePvSum = tool.formatPrice(accumulatorPricePv)
+        this.taxSum = tool.formatPrice(accumulatorTax)
+
+        this.display = true
+      } else {
+        this.sellPriceSum = this.pricePvSum = this.taxSum = 0.00
+        this.display = true
+      }
+    },
+    // 选择商品
+    handleSelectionChange(val) {
+      let idx = -1; let num
+      for (const i in this.tableData) {
+        for (const v in val) {
+          if (val[v].ID === this.tableData[i].ID) {
+            idx = i
+            num = this.storeNums[idx]
+            val[v]['goodsNum'] = num
+            break
+          }
+        }
+      }
+      this.multipleSelection = val
+      // 计算统计
+      this.handleSureChange()
+    },
+    // 选择收货地址
+    choseAddress(addressId) {
+      this.addressId = addressId
+      // 设置运费
+      this.setFreight()
+      // 计算价格
+      this.getSumMoney()
+    },
+    // 切换支付方式
+    chosePayType(type) {
+      this.payType = type
+    },
+    // 关闭支付回调
+    handleClose() {
+      this.$confirm(this.$t('shop.confirmClose')).then(_ => {
+        deleteApproachOrder({ orderSn: this.form.orderSn }).then(() => {
+          // 关闭支付模态框
+          this.visible = false
+          // 关闭购物车
+          this.visibleShoppingCart = false
+          this.submitButtonStat = false
+        })
+      })
+    },
+    // 支付成功回调
+    processPayment() {
+      // 关闭支付页面
+      this.visible = false
+      this.payStackLoading = false
+      // 显示支付成功模态框
+      this.payDialog = true
+      // 启动支付成功倒计时
+      this.handleCountdown()
+    },
+    // 倒计时结束跳转
+    handleOrderList() {
+      this.$router.push({ path: `/shop/member-order` })
+    },
+    // 启动倒计时
+    handleCountdown() {
+      // 创建定时器
+      setInterval(() => {
+        // 每隔1秒把time的值减一,赋值给span标签
+        this.countdown--
+        if (this.countdown === 0) {
+          // 倒计时结束,跳转到订单列表
+          this.$router.push({ path: `/shop/member-order` })
+        }
+      }, 1000)
+    },
+    // 会员查询
+    handleChkRecUser() {
+      this.form.conUserName = ''
+      this.conRealName = '-'
+      this.form.autoPlace = ''
+      if (this.form.recUserName) {
+        this.loading = true
+        fetchFullInfo({ userName: this.form.recUserName }).then(response => {
+          this.recRealName = response.data.REAL_NAME
+          this.loading = false
+        }).catch(() => {
+          this.recRealName = '-'
+          this.loading = false
+        })
+      }
+    },
+    // 返回方式
+    wayChange() {
+      if (this.form.way === 'pickup') {
+        this.areaDisabled = true
+        this.addressDisabled = true
+      } else {
+        this.areaDisabled = false
+        this.addressDisabled = false
+      }
+    },
+    // 会员报单/BA升级
+    onSubmit() {
+      if (!this.form.decLv) {
+        this.$message({
+          message: this.$t('profile.selectLevel'),
+          type: 'error'
+        })
+        return false
+      }
+      // 已选择商品
+      this.selectProduct()
+      if (this.multipleSelection.length <= 0) {
+        this.$message.error(this.$t('shop.chooseTips'))
+        return false
+      }
+      // 余额
+      const amountBalance = this.userBalance[this.form.payType] || 0
+      // 余额是否充足
+      if ((this.form.payType === 'cash') && ((amountBalance - this.payAmount) < 0)) {
+        // 账户类型提示信息
+        const account = this.payList.filter(item => {
+          return this.form.payType === item.label
+        })
+        const accountType = account[0] && account[0].name || ''
+        this.$message({
+          message: accountType + this.$t('shop.balanceNotAllow'),
+          type: 'error'
+        })
+        return false
+      }
+
+      this.submitButtonStat = true
+
+      const params = {
+        consignee: this.form.consignee,
+        acceptMobile: this.form.acceptMobile,
+        province: this.form.areaSelected[0] ? this.form.areaSelected[0] : '',
+        city: this.form.areaSelected[1] ? this.form.areaSelected[1] : '',
+        county: this.form.areaSelected[2] ? this.form.areaSelected[2] : '',
+        address: this.form.address,
+        decType: this.form.decType,
+        insertUserName: this.form.insertUserName,
+        decLv: this.form.decLv,
+        realName: this.form.realName,
+        decUserName: this.form.decUserName,
+        conUserName: this.form.conUserName,
+        recUserName: this.form.recUserName,
+        insertUserIdCard: this.form.insertUserIdCard,
+        openBank: this.form.openBank,
+        bankAddress: this.form.bankAddress,
+        mobile: this.form.mobile,
+        email: this.form.email,
+        cityName: this.form.cityName,
+        lgaName: this.form.lgaName,
+
+        bankProvince: this.form.bankAreaSelected[0] ? this.form.bankAreaSelected[0] : '',
+        bankCity: this.form.bankAreaSelected[1] ? this.form.bankAreaSelected[1] : '',
+        bankCounty: this.form.bankAreaSelected[2] ? this.form.bankAreaSelected[2] : '',
+
+        bankNo: this.form.bankNo,
+        password: this.form.password,
+        payPassword: this.form.payPassword,
+        packageId: this.form.packageId,
+        goodsId: this.form.goodsId,
+        goodsNum: this.form.goodsNum,
+        location: this.form.location,
+        decWay: this.decWay,
+        payType: this.form.payType
+      }
+      createWelcomePack(params).then(response => {
+        if (this.form.payType !== 'pay_stack') {
+          // 余额支付
+          this.$message({
+            message: this.$t('common.successfully'),
+            type: 'success'
+          })
+          this.submitButtonStat = false
+          this.$router.push({ path: `/shop/member-order` })
+        } else {
+          this.submitButtonStat = false
+          this.payForm.orderSn = response.data.SN
+          this.payForm.amount = response.data.ORDER_AMOUNT
+          this.payForm.metadata.custom_fields[0].value = response.data.SN
+          if (this.form.decType === 'ba') {
+            this.payForm.metadata.custom_fields[1].value = 'baUpgrade'
+          } else {
+            this.payForm.metadata.custom_fields[1].value = 'userDec'
+          }
+          this.visible = true
+        }
+      }).catch(err => {
+        this.$message({
+          message: err,
+          type: 'error'
+        })
+        this.submitButtonStat = false
+      })
+    },
+    // 已选择商品
+    selectProduct() {
+      this.payAmount = 0
+      this.form.goodsId = []
+      this.form.goodsNum = []
+      this.multipleSelection.map((item) => {
+        this.form.goodsId.push(item.ID)
+        this.form.goodsNum.push(item.goodsNum)
+        this.payAmount += item.goodsNum * item.SELL_PRICE
+      })
+    },
+    // 报单方式
+    decTypeChange() {
+      if (this.form.decType === 'ba') {
+        this.form.insertUserName = ''
+        this.userReadOnly = false
+      } else {
+        this.form.recUserName = ''
+        this.recRealName = '-'
+        this.recReadOnly = false
+        this.userReadOnly = true
+        this.fetchWelcomePack()
+      }
+    },
+    // BA会员查询
+    checkBaUser() {
+      if (this.form.decType === 'ba' && this.form.insertUserName !== '') {
+        this.loading = true
+        fetchBrandAmbassadorInfo({ userName: this.form.insertUserName }).then(response => {
+          this.form.recUserName = response.data.REC_USER_NAME
+          this.form.realName = response.data.REAL_NAME
+          this.handleChkRecUser()
+          this.recReadOnly = true
+          this.loading = false
+        }).catch(() => {
+          this.loading = false
+        })
+      }
+    },
+    // 查询安置人
+    handleChkConUser() {
+      if (this.form.conUserName) {
+        this.loading = true
+        fetchFullInfo({ userName: this.form.conUserName }).then(response => {
+          this.conRealName = response.data.REAL_NAME + response.data.isLocation
+          this.loading = false
+        }).catch(() => {
+          this.conRealName = '-'
+          this.loading = false
+        })
+      }
+    },
+    // 自动设置区位
+    setAutoPlace(side) {
+      if (this.recRealName !== '-') {
+        this.loading = true
+        fetchAutoPlace({ userName: this.form.recUserName, side: side }).then(response => {
+          this.form.conUserName = response.data.USER_NAME
+          this.handleChkConUser()
+          this.form.location = 1
+          this.form.autoPlace = side
+          this.loading = false
+        }).catch(() => {
+          this.conRealName = '-'
+          this.loading = false
+        })
+      } else {
+        this.form.autoPlace = ''
+        return false
+      }
+    }
   }
 }
 </script>