Przeglądaj źródła

ngds开放工作室为所有人复消

theo 2 lat temu
rodzic
commit
da21dbb95d
6 zmienionych plików z 2143 dodań i 1238 usunięć
  1. 36 0
      src/api/shop.js
  2. 526 518
      src/lang/en.js
  3. 8 2
      src/router/modules/shop.js
  4. 855 0
      src/views/shop/reconsume.vue
  5. 717 717
      src/views/shop/standard-products.vue
  6. 1 1
      vue.config.js

+ 36 - 0
src/api/shop.js

@@ -107,3 +107,39 @@ export function deleteApproachOrder(data) {
     data
   })
 }
+
+// 复消商品列表
+export function fetchReconsumeProductList(query) {
+  return request({
+    url: '/v1/shop/reconsume',
+    method: 'get',
+    params: query
+  })
+}
+
+// 支付订单 复消
+export function createReconsumeOrder(data) {
+  return request({
+    url: '/v1/shop/reconsume-sure-order',
+    method: 'post',
+    data
+  })
+}
+
+// Paystack支付订单 复消
+export function createApproachReconsumeOrder(data) {
+  return request({
+    url: '/v1/shop/sure-approach-reconsume-order',
+    method: 'post',
+    data
+  })
+}
+
+// 删除订单中间表
+export function deleteApproachReconsumeOrder(data) {
+  return request({
+    url: '/v1/shop/delete-approach-reconsume-order',
+    method: 'post',
+    data
+  })
+}

+ 526 - 518
src/lang/en.js

@@ -1,518 +1,526 @@
-export default {
-  route: {
-    dashboard: 'Dashboard',
-    shop: 'Mall Management',
-    user: 'Mall Management',
-    bonus: 'Bonus Management',
-    atlas: 'Network Chart',
-    article: 'Article Management',
-    config: 'Setting',
-
-
-    indexShop: 'Products list',
-    shopReconsume: 'Reconsume List',
-    memberManagement: 'Member management',
-    personalInfo: 'Personal Info',
-    documentation: 'Documentation',
-    guide: 'Guide',
-    permission: 'Permission',
-    pagePermission: 'Page Permission',
-    rolePermission: 'Role Permission',
-    directivePermission: 'Directive Permission',
-    icons: 'Icons',
-    components: 'Components',
-    tinymce: 'Tinymce',
-    markdown: 'Markdown',
-    jsonEditor: 'JSON Editor',
-    dndList: 'Dnd List',
-    splitPane: 'SplitPane',
-    avatarUpload: 'Avatar Upload',
-    dropzone: 'Dropzone',
-    sticky: 'Sticky',
-    countTo: 'Count To',
-    componentMixin: 'Mixin',
-    backToTop: 'Back To Top',
-    dragDialog: 'Drag Dialog',
-    dragSelect: 'Drag Select',
-    dragKanban: 'Drag Kanban',
-    charts: 'Charts',
-    keyboardChart: 'Keyboard Chart',
-    lineChart: 'Line Chart',
-    mixChart: 'Mix Chart',
-    example: 'Example',
-    nested: 'Nested Routes',
-    menu1: 'Menu 1',
-    'menu1-1': 'Menu 1-1',
-    'menu1-2': 'Menu 1-2',
-    'menu1-2-1': 'Menu 1-2-1',
-    'menu1-2-2': 'Menu 1-2-2',
-    'menu1-3': 'Menu 1-3',
-    menu2: 'Menu 2',
-    Table: 'Table',
-    dynamicTable: 'Dynamic Table',
-    dragTable: 'Drag Table',
-    inlineEditTable: 'Inline Edit',
-    complexTable: 'Complex Table',
-    tab: 'Tab',
-    form: 'Form',
-    createArticle: 'Create Article',
-    editArticle: 'Edit Article',
-    articleList: 'Article List',
-    errorPages: 'Error Pages',
-    page401: '401',
-    page404: '404',
-    errorLog: 'Error Log',
-    excel: 'Excel',
-    exportExcel: 'Export Excel',
-    selectExcel: 'Export Selected',
-    mergeHeader: 'Merge Header',
-    uploadExcel: 'Upload Excel',
-    zip: 'Zip',
-    pdf: 'PDF',
-    exportZip: 'Export Zip',
-    theme: 'Theme',
-    clipboardDemo: 'Clipboard',
-    i18n: 'I18n',
-    externalLink: 'External Link',
-    profile: 'Profile'
-  },
-  navbar: {
-    dashboard: 'Dashboard',
-    shippingAddress: 'Shipping Address',
-    logOut: 'Log Out',
-    profile: 'Profile',
-    theme: 'Theme',
-    size: 'Global Size',
-    visitPreviousVersion: 'Visit Previous Version',
-  },
-  menu: {
-    // 一级菜单
-    dashboard: 'Dashboard',
-    shoppingMall: 'Shopping Mall',
-    memberManagement: 'Member Management',
-    networkChart: 'Network Chart',
-    bonusManagement: 'Bonus Management',
-    articleManagement: 'Article Management',
-    setting: 'Setting',
-    // 二级菜单/接口-dashboard
-    monthBonus: 'Month Bonus',
-    // 二级菜单/接口-shoppingMall
-    standardProducts: 'Standard Products',
-    carFundProducts: 'Car Fund Products',
-    villaFundProducts: 'Villa Fund Products',
-    welcomePack: 'Welcome Pack',
-    welcomePackList: 'Welcome Pack Listing',
-    memberUpgrade: 'Upgrade Management',
-    orderList: 'Order List',
-    brandAmbassador: 'Brand Ambassador',
-    BAOrderList: 'Brand Ambassador Order',
-    // 二级菜单/接口-memberManagement
-    personalInfo: 'Personal Info',
-    resetPassword: 'Reset Password',
-    // 二级菜单/接口-networkChart
-    placementNetwork: 'Placement Network',
-    sponsorNetwork: 'Sponsor Network',
-    brandAmbassadorList: 'Brand Ambassador List',
-    // 二级菜单/接口-bonusManagement
-    myAccount: 'My Account',
-    myBonus: 'My Bonus',
-    teamInquiry: 'Team Inquiry',
-    historicalCumulativeBonus: 'Historical Cumulative Bonus',
-    withdrawalDetails: 'Withdrawal Details',
-    applyWithdraw: 'Apply For Withdraw',
-    rechargeDetails: 'Recharge Details',
-    applyRecharge: 'Apply For Recharge',
-    transferDetails: 'Transfer Details',
-    applyTransfer: 'Apply For Transfer',
-    // 二级菜单/接口-articleManagement
-    systemNotification: 'System Notification',
-    // 二级菜单/接口-setting
-    shippingAddress: 'Shipping Address',
-  },
-  login: {
-    title: 'Welcome',
-    logIn: 'Login',
-    username: 'Username',
-    password: 'Password',
-    any: 'any',
-    thirdparty: 'Or connect with',
-    thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation! ! !',
-    verifyCode: 'Verification Code'
-  },
-  documentation: {
-    documentation: 'Documentation',
-    github: 'Github Repository'
-  },
-  permission: {
-    addRole: 'New Role',
-    editPermission: 'Edit',
-    roles: 'Your roles',
-    switchRoles: 'Switch roles',
-    tips: 'In some cases, using v-permission will have no effect. For example: Element-UI  el-tab or el-table-column and other scenes that dynamically render dom. You can only do this with v-if.',
-    delete: 'Delete',
-    confirm: 'Confirm',
-    cancel: 'Cancel'
-  },
-  guide: {
-    description: 'The guide page is useful for some people who entered the project for the first time. You can briefly introduce the features of the project. Demo is based on ',
-    button: 'Show Guide'
-  },
-  components: {
-    documentation: 'Documentation',
-    tinymceTips: 'Rich text is a core feature of the management backend, but at the same time it is a place with lots of pits. In the process of selecting rich texts, I also took a lot of detours. The common rich texts on the market have been basically used, and I finally chose Tinymce. See the more detailed rich text comparison and introduction.',
-    dropzoneTips: 'Because my business has special needs, and has to upload images to qiniu, so instead of a third party, I chose encapsulate it by myself. It is very simple, you can see the detail code in @/components/Dropzone.',
-    stickyTips: 'when the page is scrolled to the preset position will be sticky on the top.',
-    backToTopTips1: 'When the page is scrolled to the specified position, the Back to Top button appears in the lower right corner',
-    backToTopTips2: 'You can customize the style of the button, show / hide, height of appearance, height of the return. If you need a text prompt, you can use element-ui el-tooltip elements externally',
-    imageUploadTips: 'Since I was using only the vue@1 version, and it is not compatible with mockjs at the moment, I modified it myself, and if you are going to use it, it is better to use official version.'
-  },
-  table: {
-    dynamicTips1: 'Fixed header, sorted by header order',
-    dynamicTips2: 'Not fixed header, sorted by click order',
-    dragTips1: 'The default order',
-    dragTips2: 'The after dragging order',
-    title: 'Title',
-    importance: 'Imp',
-    type: 'Type',
-    remark: 'Remark',
-    search: 'Search',
-    add: 'Add',
-    export: 'Export',
-    reviewer: 'reviewer',
-    id: 'ID',
-    date: 'Date',
-    author: 'Author',
-    readings: 'Readings',
-    status: 'Status',
-    actions: 'Actions',
-    edit: 'Edit',
-    publish: 'Publish',
-    draft: 'Draft',
-    delete: 'Delete',
-    cancel: 'Cancel',
-    confirm: 'Confirm'
-  },
-  example: {
-    warning: 'Creating and editing pages cannot be cached by keep-alive because keep-alive include does not currently support caching based on routes, so it is currently cached based on component name. If you want to achieve a similar caching effect, you can use a browser caching scheme such as localStorage. Or do not use keep-alive include to cache all pages directly. See details'
-  },
-  errorLog: {
-    tips: 'Please click the bug icon in the upper right corner',
-    description: 'Now the management system are basically the form of the spa, it enhances the user experience, but it also increases the possibility of page problems, a small negligence may lead to the entire page deadlock. Fortunately Vue provides a way to catch handling exceptions, where you can handle errors or report exceptions.',
-    documentation: 'Document introduction'
-  },
-  excel: {
-    export: 'Export',
-    selectedExport: 'Export Selected Items',
-    placeholder: 'Please enter the file name (default excel-list)'
-  },
-  zip: {
-    export: 'Export',
-    placeholder: 'Please enter the file name (default file)'
-  },
-  pdf: {
-    tips: 'Here we use window.print() to implement the feature of downloading PDF.'
-  },
-  theme: {
-    change: 'Change Theme',
-    documentation: 'Theme documentation',
-    tips: 'Tips: It is different from the theme-pick on the navbar is two different skinning methods, each with different application scenarios. Refer to the documentation for details.'
-  },
-  tagsView: {
-    refresh: 'Refresh',
-    close: 'Close',
-    closeOthers: 'Close Others',
-    closeAll: 'Close All'
-  },
-  settings: {
-    title: 'Page style setting',
-    theme: 'Theme Color',
-    tagsView: 'Open Tags-View',
-    fixedHeader: 'Fixed Header',
-    sidebarLogo: 'Sidebar Logo'
-  },
-  empLevels: {
-    // 级别配置
-    '67BE1C6C21F81B32E055736AECE8644D':  'No Rank',
-    'E121497617216708615': '1-Star Director',
-    '67BE5FE7857C216AE055736AECE8644D': '2-Star Director',
-    'E121497617216708616': '3-Star Director',
-    '67BE6A4D03C52288E055736AECE8644D': '4-Star Director',
-    '67BE6EA2070D22EBE055736AECE8644D': '5-Star Director',
-    '67BE742A336F2370E055736AECE8644D': '6-Star Director',
-    '67BE805032C22492E055736AECE8644D': '7-Star Director'
-  },
-  crownLevels: {
-    // 级别配置
-    'DCBEDD8E0EAD3DF59D81CCC0C2ACAEFF': '0-Star Crown',
-    'E0B75B89C94F35EF8EE0054FA34B759C': '1-Star Crown',
-    '7FEBE5DE95D530578915F4072E7CD842': '2-Star Crown',
-    '391691E01CD5373F8D23F01FAD750222': '3-Star Crown',
-    '8ACAEA736F5331B79283C895F36084E5': '4-Star Crown',
-    'CE46B39D07633217AA5711438649D1D6': '5-Star Crown',
-    '24396B85E74A3005947F1F90EBA5F5CF': '6-Star Crown',
-    '8C253968EB6F3F3FA5BE84F63136FFFA': '7-Star Crown',
-  },
-  decLvs: {
-    // 等级配置
-    '67ABCB8C1F7D5519E055736AECE8644D': 'Elite',
-    '67ABCCE20A9F5553E055736AECE8644D': 'Pro',
-    '67ABCE0ECE705575E055736AECE8644D': 'VIP'
-  },
-  dashboard: {
-    highestDirector: 'Highest Director',
-    highestCrown: 'Highest Crown',
-    memberLevel: 'Member Level',
-    payCycle: 'Current Pay Cycle',
-    remainBv: 'Remain BV',
-    activeDeadline: 'Active Deadline Date',
-    more: 'more',
-    articleNotification: 'System Notification'
-  },
-  currency: {
-    unit: 'Naira',
-    sign: '₦',
-    naira: 'NGN',
-  },
-
-  common: {
-    save: 'Save',
-    modify: 'Modify',
-    submit: 'Submit',
-    delete: 'Delete',
-    edit: 'Edit',
-    action: 'Action',
-    yes: 'YES',
-    no: 'NO',
-    view: 'View',
-    select: 'Select',
-    reset: 'Reset',
-    startDate: 'Start Date',
-    endDate: 'End Date',
-    deleteTips: 'Are you sure you want to delete the selected data?',
-    hint: 'Hint',
-    cancel: 'Cancel',
-    confirm: 'Confirm',
-    successfully: 'Successfully',
-    close: 'Close',
-    note: 'Note',
-    awaitData: 'Retrieving data, please wait.',
-    switchLanguageHints: 'Switch Language Success',
-    websiteTitle: 'Member Management System',
-    uploadHints: 'Uploading, please hold on. Do not close the window!',
-    canNotBeBlank: ' cannot be blank',
-    require: 'is required',
-  },
-
-  shop: {
-    product: 'Product',
-    productCode: 'Product Code',
-    productName: 'Product',
-    productPicture: 'Picture',
-    productPrice: 'Price',
-    productBV: 'BV',
-    qty: 'Qty',
-    taxRate: 'Tax Rate',
-    taxAmount: 'Tax',
-    totalTaxAmount: 'Total Tax',
-    totalPrice: 'Total Price',
-    totalBV: 'Total BV',
-    orderCode: 'Order Code',
-    orderType: 'Order Type',
-    amount: 'Amount',
-    decCode: 'Code',
-    memberCode: 'Member Code',
-    memberName: 'Member Name',
-    recipientName: 'Recipient Name',
-    phoneNumber: 'Phone Number',
-    shippingAddress: 'Shipping Address',
-    shipping: 'Shipping',
-    payment: 'Payment',
-    createdTime: 'Created Time',
-    payTime: 'Pay Time',
-    payStatus: 'Pay Status',
-    action: 'Action',
-    download: 'Download',
-    sponsorCode: 'Sponsor Code',
-    inventory: 'Inventory',
-    checkOut: 'Check Out',
-    unPaid: 'Unpaid',
-    paid: 'Paid',
-    goBack: 'Go Back',
-    goPay: 'Pay',
-    orderDetail: 'Order Detail',
-    chooseTips: 'Please choose the products.',
-    confirmClose: 'Confirm to close?',
-    inputPasswordTips: 'Please enter your payment password',
-    selfPickUp: 'Self Pick-up',
-    delivery: 'Delivery',
-    selectAddress: 'Shipping Address',
-    selectPayment: 'Payment Method',
-    freight: 'Freight',
-    paidAmount: 'Amount Paid',
-    productsSettlement: 'Products Settlement',
-    total: 'Total',
-    totalOrders: 'Total Orders',
-    accountBalance: 'Account Balance',
-    balanceNotAllow: 'insufficient, unable to buy products',
-    paymentError: 'Payment or Account Balance error',
-    successOrderTips: 'The order is successful',
-    paymentMethod: 'Payment Method',
-  },
-
-  user: {
-    email: 'Email',
-    accountInformation: 'Account Information',
-    newMemberCode: 'New Member Code',
-    selectWelcomePack: 'Select Welcome Pack',
-    sponsorCode: 'Sponsor Code',
-    payInfo: 'Pay Info',
-    memberInformation: 'Member Information',
-    enterMemberCode: 'Please enter member code.',
-    welcomePackWay: 'Welcome Pack Way',
-    normal: 'Normal',
-    BAUpgrade: 'BA Upgrade',
-    entryLevel: 'Entry Level',
-    selectEntryLevel: 'Select entry level',
-    stockistCode: 'Stockist Code',
-  },
-
-  atlas: {
-    networkInformation: 'Network Information',
-    placementCode: 'Placement Code',
-    placementTree: 'Placement Tree',
-    left: 'Left',
-    right: 'Right',
-    placementAutoLeft: 'Placement Auto Location: L',
-    placementAutoRight: 'Placement Auto Location: R',
-    topMember: 'Top Member',
-    spreadDepth: 'Spread Depth',
-    periodNumber: 'Period number',
-    numberLayers: 'Number of Layers',
-    highest: 'Highest',
-    memberCode: 'Member Code',
-    name: 'Name',
-    level: 'Level',
-    location: 'Location',
-  },
-
-  config: {
-    consignee: 'Consignee',
-    detailedAddress: 'Detailed Address',
-    city: 'City',
-    localGovernmentArea: 'Local Government Area',
-    state: 'State',
-    default: 'Default Address',
-    createAddress: 'Add Shipping Address',
-    editAddress: 'Edit Shipping Address',
-  },
-
-  profile: {
-    personalInformation: 'Personal Information',
-    account: 'Account',
-    loginPassword: 'Login Password',
-    paymentPassword: 'Payment Password',
-    originalPassword: 'Original Password',
-    newPassword: 'New Password',
-    confirmPassword: 'Confirm Password',
-    memberLevel: 'Member Level',
-    highestDirector: 'Highest Director',
-    highestCrown: 'Highest Crown',
-    latestDirector: 'Latest Director',
-    latestCrown: 'Latest Crown',
-    currentPayCycle: 'Current Pay Cycle',
-    currentSystemTime: 'Current System Time',
-    memberJoinTime: 'Member Join Time',
-    joiningPeriod: 'Joining Period',
-    joiningDate: 'Joining Date',
-    whetherUpgrade: 'Whether Upgrade',
-    upgradeWay: 'Upgrade Way',
-    toUpgradeLevel: 'To Upgrade Level',
-    selectLevel: 'Please select a level',
-    topUpBV: 'Top Up(BV)',
-    upgradePurchaseProduct: 'Upgrade purchase product',
-    loginPasswordSuccessTips: 'User login password has been updated successfully.',
-    paymentPasswordSuccessTips: 'User payment password has been updated successfully.',
-    enterLoginPassword: 'Enter Login Password',
-    enterPaymentPassword: 'Enter Payment Password',
-  },
-  article: {
-    title: 'Title',
-    category: 'Category',
-    createTime: 'Create Time',
-    systemNotification: 'System Notification',
-  },
-  bonus: {
-    payCycle: 'Pay Cycle',
-    welcomeBonus: 'Welcome Bonus',
-    teamBonus: 'Team Bonus',
-    directorBonus: 'Director Bonus',
-    quarterlyBonus: 'Quarterly Bonus',
-    stockistCommission: 'Stockist Commission',
-    actualBonus: 'Actual Bonus',
-    totalBonus: 'Total Bonus',
-    leftNewlyIncreasedPerformance: 'Left Newly Increased Performance',
-    rightNewlyIncreasedPerformance: 'Right Newly Increased Performance',
-    leftSurplusPerformance: 'Left Surplus Performance',
-    rightSurplusPerformance: 'Right Surplus Performance',
-    periodBonus: 'Period %s Bonus',
-    viewRecord: 'View Record',
-    bonusFlowTitle: '%s Trading Record',
-    transTime: 'Trans Date',
-    transType: 'Trans Type',
-    preTransactionBalance: 'Pre Trans Balance',
-    transAmount: 'Trans Amount',
-    postTransactionBalance: 'Post Trans Balance',
-    remark: 'Remark',
-    whetherActive: 'Whether Active',
-    directorPGSPerformance: 'Director PGS Performance',
-    personalDetails: 'Personal Details',
-    status: 'Status',
-    personalBV: 'Personal BV',
-    PGS: 'PGS',
-    teamDetails: 'Team Details',
-    latestCalculationTime: 'Latest calculation time',
-    totalBV: 'Total BV',
-  },
-  finance: {
-    applyTransfer: 'Apply For Transfer',
-    transferOutAccountHint: 'Select transfer out of account',
-    transferInAccountHint: 'Select transfer in account',
-    receiveMemberCodeHint: 'Enter your receiving member code',
-    receiveMemberNameHint: 'Enter the name of receiving member',
-    transferAccounts: 'Transfer Accounts',
-    receivingMemberCode: 'Receiving Member Code',
-    receivingMemberName: 'Receiving Member Name',
-    transferIntoAccount: 'Transfer Into Account',
-    transferAmount: 'Amount',
-    serviceCharge: 'Service Charge',
-    actualAmountTransferredInto: 'Actual Amount Transferred Into',
-    transferTime: 'Transfer Time',
-    remark: 'Remark',
-    messageApplyTransfer: 'Are you sure you want to apply transfer?',
-    selectTransferType: 'Select transfer type',
-    transferType: 'Transfer Type',
-    currentAvailableBonus: 'Available Bonus',
-    currentAvailableEcoin: 'Available Ecoin',
-    currentTransferRatio: 'Transfer Ratio',
-    maximumTransferAmount: 'Maximum transfer amount',
-    memberCode: 'Member Code',
-    memberName: 'Member Name',
-    lessTransferHint: 'Each transfer shall not be less than %s',
-    transferNotAllow: 'Not allowed to transfer to yourself',
-    successTips: 'Successfully.',
-    enterPasswordTips: 'Please enter your payment password',
-    executing: 'executing...',
-    recharge: 'Recharge',
-    createdTime: 'Created Time',
-    rechargeAmount: 'Recharge Amount',
-    rechargeStatus: 'Recharge Status',
-    bankName: 'Bank Name',
-    bankAccount: 'Bank Account',
-    printVoucher: 'Recharge Voucher',
-    uploadVoucher: 'Upload',
-    viewVoucher: 'View',
-    bankInformation: 'Bank Info',
-    selectBank: 'Select Bank',
-    accountName: 'Account Name',
-  },
-}
+export default {
+  route: {
+    dashboard: 'Dashboard',
+    shop: 'Mall Management',
+    user: 'Mall Management',
+    bonus: 'Bonus Management',
+    atlas: 'Network Chart',
+    article: 'Article Management',
+    config: 'Setting',
+
+    indexShop: 'Products list',
+    shopReconsume: 'Reconsume List',
+    memberManagement: 'Member management',
+    personalInfo: 'Personal Info',
+    documentation: 'Documentation',
+    guide: 'Guide',
+    permission: 'Permission',
+    pagePermission: 'Page Permission',
+    rolePermission: 'Role Permission',
+    directivePermission: 'Directive Permission',
+    icons: 'Icons',
+    components: 'Components',
+    tinymce: 'Tinymce',
+    markdown: 'Markdown',
+    jsonEditor: 'JSON Editor',
+    dndList: 'Dnd List',
+    splitPane: 'SplitPane',
+    avatarUpload: 'Avatar Upload',
+    dropzone: 'Dropzone',
+    sticky: 'Sticky',
+    countTo: 'Count To',
+    componentMixin: 'Mixin',
+    backToTop: 'Back To Top',
+    dragDialog: 'Drag Dialog',
+    dragSelect: 'Drag Select',
+    dragKanban: 'Drag Kanban',
+    charts: 'Charts',
+    keyboardChart: 'Keyboard Chart',
+    lineChart: 'Line Chart',
+    mixChart: 'Mix Chart',
+    example: 'Example',
+    nested: 'Nested Routes',
+    menu1: 'Menu 1',
+    'menu1-1': 'Menu 1-1',
+    'menu1-2': 'Menu 1-2',
+    'menu1-2-1': 'Menu 1-2-1',
+    'menu1-2-2': 'Menu 1-2-2',
+    'menu1-3': 'Menu 1-3',
+    menu2: 'Menu 2',
+    Table: 'Table',
+    dynamicTable: 'Dynamic Table',
+    dragTable: 'Drag Table',
+    inlineEditTable: 'Inline Edit',
+    complexTable: 'Complex Table',
+    tab: 'Tab',
+    form: 'Form',
+    createArticle: 'Create Article',
+    editArticle: 'Edit Article',
+    articleList: 'Article List',
+    errorPages: 'Error Pages',
+    page401: '401',
+    page404: '404',
+    errorLog: 'Error Log',
+    excel: 'Excel',
+    exportExcel: 'Export Excel',
+    selectExcel: 'Export Selected',
+    mergeHeader: 'Merge Header',
+    uploadExcel: 'Upload Excel',
+    zip: 'Zip',
+    pdf: 'PDF',
+    exportZip: 'Export Zip',
+    theme: 'Theme',
+    clipboardDemo: 'Clipboard',
+    i18n: 'I18n',
+    externalLink: 'External Link',
+    profile: 'Profile'
+  },
+  navbar: {
+    dashboard: 'Dashboard',
+    shippingAddress: 'Shipping Address',
+    logOut: 'Log Out',
+    profile: 'Profile',
+    theme: 'Theme',
+    size: 'Global Size',
+    visitPreviousVersion: 'Visit Previous Version'
+  },
+  menu: {
+    // 一级菜单
+    dashboard: 'Dashboard',
+    shoppingMall: 'Shopping Mall',
+    memberManagement: 'Member Management',
+    networkChart: 'Network Chart',
+    bonusManagement: 'Bonus Management',
+    articleManagement: 'Article Management',
+    setting: 'Setting',
+    // 二级菜单/接口-dashboard
+    monthBonus: 'Month Bonus',
+    // 二级菜单/接口-shoppingMall
+    standardProducts: 'Standard Products',
+    carFundProducts: 'Car Fund Products',
+    villaFundProducts: 'Villa Fund Products',
+    welcomePack: 'Welcome Pack',
+    welcomePackList: 'Welcome Pack Listing',
+    memberUpgrade: 'Upgrade Management',
+    reconsume: 'Reconsume',
+    orderList: 'Order List',
+    brandAmbassador: 'Brand Ambassador',
+    BAOrderList: 'Brand Ambassador Order',
+    // 二级菜单/接口-memberManagement
+    personalInfo: 'Personal Info',
+    resetPassword: 'Reset Password',
+    // 二级菜单/接口-networkChart
+    placementNetwork: 'Placement Network',
+    sponsorNetwork: 'Sponsor Network',
+    brandAmbassadorList: 'Brand Ambassador List',
+    // 二级菜单/接口-bonusManagement
+    myAccount: 'My Account',
+    myBonus: 'My Bonus',
+    teamInquiry: 'Team Inquiry',
+    historicalCumulativeBonus: 'Historical Cumulative Bonus',
+    withdrawalDetails: 'Withdrawal Details',
+    applyWithdraw: 'Apply For Withdraw',
+    rechargeDetails: 'Recharge Details',
+    applyRecharge: 'Apply For Recharge',
+    transferDetails: 'Transfer Details',
+    applyTransfer: 'Apply For Transfer',
+    // 二级菜单/接口-articleManagement
+    systemNotification: 'System Notification',
+    // 二级菜单/接口-setting
+    shippingAddress: 'Shipping Address'
+  },
+  login: {
+    title: 'Welcome',
+    logIn: 'Login',
+    username: 'Username',
+    password: 'Password',
+    any: 'any',
+    thirdparty: 'Or connect with',
+    thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation! ! !',
+    verifyCode: 'Verification Code'
+  },
+  documentation: {
+    documentation: 'Documentation',
+    github: 'Github Repository'
+  },
+  permission: {
+    addRole: 'New Role',
+    editPermission: 'Edit',
+    roles: 'Your roles',
+    switchRoles: 'Switch roles',
+    tips: 'In some cases, using v-permission will have no effect. For example: Element-UI  el-tab or el-table-column and other scenes that dynamically render dom. You can only do this with v-if.',
+    delete: 'Delete',
+    confirm: 'Confirm',
+    cancel: 'Cancel'
+  },
+  guide: {
+    description: 'The guide page is useful for some people who entered the project for the first time. You can briefly introduce the features of the project. Demo is based on ',
+    button: 'Show Guide'
+  },
+  components: {
+    documentation: 'Documentation',
+    tinymceTips: 'Rich text is a core feature of the management backend, but at the same time it is a place with lots of pits. In the process of selecting rich texts, I also took a lot of detours. The common rich texts on the market have been basically used, and I finally chose Tinymce. See the more detailed rich text comparison and introduction.',
+    dropzoneTips: 'Because my business has special needs, and has to upload images to qiniu, so instead of a third party, I chose encapsulate it by myself. It is very simple, you can see the detail code in @/components/Dropzone.',
+    stickyTips: 'when the page is scrolled to the preset position will be sticky on the top.',
+    backToTopTips1: 'When the page is scrolled to the specified position, the Back to Top button appears in the lower right corner',
+    backToTopTips2: 'You can customize the style of the button, show / hide, height of appearance, height of the return. If you need a text prompt, you can use element-ui el-tooltip elements externally',
+    imageUploadTips: 'Since I was using only the vue@1 version, and it is not compatible with mockjs at the moment, I modified it myself, and if you are going to use it, it is better to use official version.'
+  },
+  table: {
+    dynamicTips1: 'Fixed header, sorted by header order',
+    dynamicTips2: 'Not fixed header, sorted by click order',
+    dragTips1: 'The default order',
+    dragTips2: 'The after dragging order',
+    title: 'Title',
+    importance: 'Imp',
+    type: 'Type',
+    remark: 'Remark',
+    search: 'Search',
+    add: 'Add',
+    export: 'Export',
+    reviewer: 'reviewer',
+    id: 'ID',
+    date: 'Date',
+    author: 'Author',
+    readings: 'Readings',
+    status: 'Status',
+    actions: 'Actions',
+    edit: 'Edit',
+    publish: 'Publish',
+    draft: 'Draft',
+    delete: 'Delete',
+    cancel: 'Cancel',
+    confirm: 'Confirm'
+  },
+  example: {
+    warning: 'Creating and editing pages cannot be cached by keep-alive because keep-alive include does not currently support caching based on routes, so it is currently cached based on component name. If you want to achieve a similar caching effect, you can use a browser caching scheme such as localStorage. Or do not use keep-alive include to cache all pages directly. See details'
+  },
+  errorLog: {
+    tips: 'Please click the bug icon in the upper right corner',
+    description: 'Now the management system are basically the form of the spa, it enhances the user experience, but it also increases the possibility of page problems, a small negligence may lead to the entire page deadlock. Fortunately Vue provides a way to catch handling exceptions, where you can handle errors or report exceptions.',
+    documentation: 'Document introduction'
+  },
+  excel: {
+    export: 'Export',
+    selectedExport: 'Export Selected Items',
+    placeholder: 'Please enter the file name (default excel-list)'
+  },
+  zip: {
+    export: 'Export',
+    placeholder: 'Please enter the file name (default file)'
+  },
+  pdf: {
+    tips: 'Here we use window.print() to implement the feature of downloading PDF.'
+  },
+  theme: {
+    change: 'Change Theme',
+    documentation: 'Theme documentation',
+    tips: 'Tips: It is different from the theme-pick on the navbar is two different skinning methods, each with different application scenarios. Refer to the documentation for details.'
+  },
+  tagsView: {
+    refresh: 'Refresh',
+    close: 'Close',
+    closeOthers: 'Close Others',
+    closeAll: 'Close All'
+  },
+  settings: {
+    title: 'Page style setting',
+    theme: 'Theme Color',
+    tagsView: 'Open Tags-View',
+    fixedHeader: 'Fixed Header',
+    sidebarLogo: 'Sidebar Logo'
+  },
+  empLevels: {
+    // 级别配置
+    '67BE1C6C21F81B32E055736AECE8644D': 'No Rank',
+    'E121497617216708615': '1-Star Director',
+    '67BE5FE7857C216AE055736AECE8644D': '2-Star Director',
+    'E121497617216708616': '3-Star Director',
+    '67BE6A4D03C52288E055736AECE8644D': '4-Star Director',
+    '67BE6EA2070D22EBE055736AECE8644D': '5-Star Director',
+    '67BE742A336F2370E055736AECE8644D': '6-Star Director',
+    '67BE805032C22492E055736AECE8644D': '7-Star Director'
+  },
+  crownLevels: {
+    // 级别配置
+    'DCBEDD8E0EAD3DF59D81CCC0C2ACAEFF': '0-Star Crown',
+    'E0B75B89C94F35EF8EE0054FA34B759C': '1-Star Crown',
+    '7FEBE5DE95D530578915F4072E7CD842': '2-Star Crown',
+    '391691E01CD5373F8D23F01FAD750222': '3-Star Crown',
+    '8ACAEA736F5331B79283C895F36084E5': '4-Star Crown',
+    'CE46B39D07633217AA5711438649D1D6': '5-Star Crown',
+    '24396B85E74A3005947F1F90EBA5F5CF': '6-Star Crown',
+    '8C253968EB6F3F3FA5BE84F63136FFFA': '7-Star Crown'
+  },
+  decLvs: {
+    // 等级配置
+    '67ABCB8C1F7D5519E055736AECE8644D': 'Elite',
+    '67ABCCE20A9F5553E055736AECE8644D': 'Pro',
+    '67ABCE0ECE705575E055736AECE8644D': 'VIP'
+  },
+  dashboard: {
+    highestDirector: 'Highest Director',
+    highestCrown: 'Highest Crown',
+    memberLevel: 'Member Level',
+    payCycle: 'Current Pay Cycle',
+    remainBv: 'Remain BV',
+    activeDeadline: 'Active Deadline Date',
+    more: 'more',
+    articleNotification: 'System Notification'
+  },
+  currency: {
+    unit: 'Naira',
+    sign: '₦',
+    naira: 'NGN'
+  },
+
+  common: {
+    save: 'Save',
+    modify: 'Modify',
+    submit: 'Submit',
+    delete: 'Delete',
+    edit: 'Edit',
+    action: 'Action',
+    yes: 'YES',
+    no: 'NO',
+    view: 'View',
+    select: 'Select',
+    reset: 'Reset',
+    startDate: 'Start Date',
+    endDate: 'End Date',
+    deleteTips: 'Are you sure you want to delete the selected data?',
+    hint: 'Hint',
+    cancel: 'Cancel',
+    confirm: 'Confirm',
+    successfully: 'Successfully',
+    close: 'Close',
+    note: 'Note',
+    awaitData: 'Retrieving data, please wait.',
+    switchLanguageHints: 'Switch Language Success',
+    websiteTitle: 'Member Management System',
+    uploadHints: 'Uploading, please hold on. Do not close the window!',
+    canNotBeBlank: ' cannot be blank',
+    require: 'is required'
+  },
+
+  shop: {
+    product: 'Product',
+    productCode: 'Product Code',
+    productName: 'Product',
+    productPicture: 'Picture',
+    productPrice: 'Price',
+    productBV: 'BV',
+    qty: 'Qty',
+    taxRate: 'Tax Rate',
+    taxAmount: 'Tax',
+    totalTaxAmount: 'Total Tax',
+    totalPrice: 'Total Price',
+    totalBV: 'Total BV',
+    orderCode: 'Order Code',
+    orderType: 'Order Type',
+    amount: 'Amount',
+    decCode: 'Code',
+    memberCode: 'Member Code',
+    memberName: 'Member Name',
+    recipientName: 'Recipient Name',
+    phoneNumber: 'Phone Number',
+    shippingAddress: 'Shipping Address',
+    shipping: 'Shipping',
+    payment: 'Payment',
+    createdTime: 'Created Time',
+    payTime: 'Pay Time',
+    payStatus: 'Pay Status',
+    action: 'Action',
+    download: 'Download',
+    sponsorCode: 'Sponsor Code',
+    inventory: 'Inventory',
+    checkOut: 'Check Out',
+    unPaid: 'Unpaid',
+    paid: 'Paid',
+    goBack: 'Go Back',
+    goPay: 'Pay',
+    orderDetail: 'Order Detail',
+    chooseTips: 'Please choose the products.',
+    confirmClose: 'Confirm to close?',
+    inputPasswordTips: 'Please enter your payment password',
+    selfPickUp: 'Self Pick-up',
+    delivery: 'Delivery',
+    selectAddress: 'Shipping Address',
+    selectPayment: 'Payment Method',
+    freight: 'Freight',
+    paidAmount: 'Amount Paid',
+    productsSettlement: 'Products Settlement',
+    total: 'Total',
+    totalOrders: 'Total Orders',
+    accountBalance: 'Account Balance',
+    balanceNotAllow: 'insufficient, unable to buy products',
+    paymentError: 'Payment or Account Balance error',
+    successOrderTips: 'The order is successful',
+    paymentMethod: 'Payment Method',
+    customerInfo: 'Customer Info',
+    reconsumeUserCode: 'Reconsume User Code',
+    mobile: 'Mobile',
+    province: 'State',
+    lgaName: 'Local Government Area',
+    cityName: 'City',
+    address: 'Detailed Address',
+    memberNotFound: 'Member Not Found'
+  },
+
+  user: {
+    email: 'Email',
+    accountInformation: 'Account Information',
+    newMemberCode: 'New Member Code',
+    selectWelcomePack: 'Select Welcome Pack',
+    sponsorCode: 'Sponsor Code',
+    payInfo: 'Pay Info',
+    memberInformation: 'Member Information',
+    enterMemberCode: 'Please enter member code.',
+    welcomePackWay: 'Welcome Pack Way',
+    normal: 'Normal',
+    BAUpgrade: 'BA Upgrade',
+    entryLevel: 'Entry Level',
+    selectEntryLevel: 'Select entry level',
+    stockistCode: 'Stockist Code'
+  },
+
+  atlas: {
+    networkInformation: 'Network Information',
+    placementCode: 'Placement Code',
+    placementTree: 'Placement Tree',
+    left: 'Left',
+    right: 'Right',
+    placementAutoLeft: 'Placement Auto Location: L',
+    placementAutoRight: 'Placement Auto Location: R',
+    topMember: 'Top Member',
+    spreadDepth: 'Spread Depth',
+    periodNumber: 'Period number',
+    numberLayers: 'Number of Layers',
+    highest: 'Highest',
+    memberCode: 'Member Code',
+    name: 'Name',
+    level: 'Level',
+    location: 'Location'
+  },
+
+  config: {
+    consignee: 'Consignee',
+    detailedAddress: 'Detailed Address',
+    city: 'City',
+    localGovernmentArea: 'Local Government Area',
+    state: 'State',
+    default: 'Default Address',
+    createAddress: 'Add Shipping Address',
+    editAddress: 'Edit Shipping Address'
+  },
+
+  profile: {
+    personalInformation: 'Personal Information',
+    account: 'Account',
+    loginPassword: 'Login Password',
+    paymentPassword: 'Payment Password',
+    originalPassword: 'Original Password',
+    newPassword: 'New Password',
+    confirmPassword: 'Confirm Password',
+    memberLevel: 'Member Level',
+    highestDirector: 'Highest Director',
+    highestCrown: 'Highest Crown',
+    latestDirector: 'Latest Director',
+    latestCrown: 'Latest Crown',
+    currentPayCycle: 'Current Pay Cycle',
+    currentSystemTime: 'Current System Time',
+    memberJoinTime: 'Member Join Time',
+    joiningPeriod: 'Joining Period',
+    joiningDate: 'Joining Date',
+    whetherUpgrade: 'Whether Upgrade',
+    upgradeWay: 'Upgrade Way',
+    toUpgradeLevel: 'To Upgrade Level',
+    selectLevel: 'Please select a level',
+    topUpBV: 'Top Up(BV)',
+    upgradePurchaseProduct: 'Upgrade purchase product',
+    loginPasswordSuccessTips: 'User login password has been updated successfully.',
+    paymentPasswordSuccessTips: 'User payment password has been updated successfully.',
+    enterLoginPassword: 'Enter Login Password',
+    enterPaymentPassword: 'Enter Payment Password'
+  },
+  article: {
+    title: 'Title',
+    category: 'Category',
+    createTime: 'Create Time',
+    systemNotification: 'System Notification'
+  },
+  bonus: {
+    payCycle: 'Pay Cycle',
+    welcomeBonus: 'Welcome Bonus',
+    teamBonus: 'Team Bonus',
+    directorBonus: 'Director Bonus',
+    quarterlyBonus: 'Quarterly Bonus',
+    stockistCommission: 'Stockist Commission',
+    actualBonus: 'Actual Bonus',
+    totalBonus: 'Total Bonus',
+    leftNewlyIncreasedPerformance: 'Left Newly Increased Performance',
+    rightNewlyIncreasedPerformance: 'Right Newly Increased Performance',
+    leftSurplusPerformance: 'Left Surplus Performance',
+    rightSurplusPerformance: 'Right Surplus Performance',
+    periodBonus: 'Period %s Bonus',
+    viewRecord: 'View Record',
+    bonusFlowTitle: '%s Trading Record',
+    transTime: 'Trans Date',
+    transType: 'Trans Type',
+    preTransactionBalance: 'Pre Trans Balance',
+    transAmount: 'Trans Amount',
+    postTransactionBalance: 'Post Trans Balance',
+    remark: 'Remark',
+    whetherActive: 'Whether Active',
+    directorPGSPerformance: 'Director PGS Performance',
+    personalDetails: 'Personal Details',
+    status: 'Status',
+    personalBV: 'Personal BV',
+    PGS: 'PGS',
+    teamDetails: 'Team Details',
+    latestCalculationTime: 'Latest calculation time',
+    totalBV: 'Total BV'
+  },
+  finance: {
+    applyTransfer: 'Apply For Transfer',
+    transferOutAccountHint: 'Select transfer out of account',
+    transferInAccountHint: 'Select transfer in account',
+    receiveMemberCodeHint: 'Enter your receiving member code',
+    receiveMemberNameHint: 'Enter the name of receiving member',
+    transferAccounts: 'Transfer Accounts',
+    receivingMemberCode: 'Receiving Member Code',
+    receivingMemberName: 'Receiving Member Name',
+    transferIntoAccount: 'Transfer Into Account',
+    transferAmount: 'Amount',
+    serviceCharge: 'Service Charge',
+    actualAmountTransferredInto: 'Actual Amount Transferred Into',
+    transferTime: 'Transfer Time',
+    remark: 'Remark',
+    messageApplyTransfer: 'Are you sure you want to apply transfer?',
+    selectTransferType: 'Select transfer type',
+    transferType: 'Transfer Type',
+    currentAvailableBonus: 'Available Bonus',
+    currentAvailableEcoin: 'Available Ecoin',
+    currentTransferRatio: 'Transfer Ratio',
+    maximumTransferAmount: 'Maximum transfer amount',
+    memberCode: 'Member Code',
+    memberName: 'Member Name',
+    lessTransferHint: 'Each transfer shall not be less than %s',
+    transferNotAllow: 'Not allowed to transfer to yourself',
+    successTips: 'Successfully.',
+    enterPasswordTips: 'Please enter your payment password',
+    executing: 'executing...',
+    recharge: 'Recharge',
+    createdTime: 'Created Time',
+    rechargeAmount: 'Recharge Amount',
+    rechargeStatus: 'Recharge Status',
+    bankName: 'Bank Name',
+    bankAccount: 'Bank Account',
+    printVoucher: 'Recharge Voucher',
+    uploadVoucher: 'Upload',
+    viewVoucher: 'View',
+    bankInformation: 'Bank Info',
+    selectBank: 'Select Bank',
+    accountName: 'Account Name'
+  }
+}

+ 8 - 2
src/router/modules/shop.js

@@ -17,13 +17,13 @@ const shopRouter = {
       meta: { title: 'Standard Products', icon: 'el-icon-goods' }
     },
     {
-      path: 'car-fund-products',  // 车奖商品列表
+      path: 'car-fund-products', // 车奖商品列表
       component: () => import('@/views/shop/car-fund-products'),
       name: 'CarFundProducts',
       meta: { title: 'Car Fund Products', icon: 'el-icon-goods' }
     },
     {
-      path: 'villa-fund-products',  // 房奖商品列表
+      path: 'villa-fund-products', // 房奖商品列表
       component: () => import('@/views/shop/villa-fund-products'),
       name: 'VillaFundProducts',
       meta: { title: 'Villa Fund Products', icon: 'el-icon-goods' }
@@ -34,6 +34,12 @@ const shopRouter = {
       name: 'DecOrderList',
       meta: { title: 'Welcome Pack Listing', icon: 'el-icon-goods' }
     },
+    {
+      path: 'reconsume', // 复消
+      component: () => import('@/views/shop/reconsume'),
+      name: 'reconsume',
+      meta: { title: 'Reconsume', icon: 'el-icon-goods' }
+    },
     {
       path: 'order-list', // 订单列表
       component: () => import('@/views/shop/order-list'),

+ 855 - 0
src/views/shop/reconsume.vue

@@ -0,0 +1,855 @@
+<template>
+  <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" type="index" width="50"></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-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('currency.sign') }} {{ row.SELL_PRICE | toThousandFilter }}
+                      <span style="font-weight:normal; color: #606266;">({{ row.PRICE_PV | toThousandFilter }}{{ $t('shop.productBV') }})</span>
+                    </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" />
+
+    <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="margin-right: 2rem; display: inline-block;">{{ $t('shop.productBV') }}:{{ pricePvSum | toThousandFilter }}</div>
+        <div style="display: inline-block;">{{ $t('shop.taxAmount') }}:{{ $t('currency.sign') }} {{ taxSum | toThousandFilter }}</div>
+      </div>
+    </div>
+
+    <!-- 购物车	-->
+    <el-dialog v-loading="shoppingCartLoading" :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;">{{ $t('currency.sign') }} {{ 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;">{{ $t('currency.sign') }} {{ 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') }}:{{ $t('currency.sign') }} {{ parseFloat(cashSum) | toThousandFilter }}</span><br>
+                  <span>{{ $t('shop.freight') }}:{{ $t('currency.sign') }} {{ pointFreight }}</span>
+                </el-col>
+              </el-row>
+            </div>
+            <el-divider />
+            <div class="" style="margin: 15px 0;">
+              <el-row :gutter="20">
+                <el-form>
+                  <el-col :xs="24" :sm="24" :lg="3">
+                    <span style="font-weight: bold; word-break: normal; white-space: normal; line-height: 28px;">{{ $t('shop.customerInfo') }}:</span>
+                  </el-col>
+                  <el-col :xs="24" :sm="24" :lg="5" style="word-break: normal; white-space: nowrap; line-height: 28px;">
+                    <el-form-item>
+                      <el-col :xs="24" :sm="24" :lg="15">
+                        <span>{{ $t('shop.reconsumeUserCode') }}</span>
+                      </el-col>
+                      <el-input v-model.trim="newOrder.userName" @change="handleChkRecUser" />
+                      <span style="margin-left: 10px">【{{ newOrder.recRealName }}】</span>
+                    </el-form-item>
+                    <el-form-item>
+                      <el-col :xs="24" :sm="24" :lg="15">
+                        <span>{{ $t('shop.recipientName') }}</span>
+                      </el-col>
+                      <el-input v-model.trim="newOrder.consignee" />
+                    </el-form-item>
+                    <el-form-item>
+                      <el-col :xs="24" :sm="24" :lg="15">
+                        <span>{{ $t('shop.mobile') }}</span>
+                      </el-col>
+                      <el-input v-model.trim="newOrder.mobile" />
+                    </el-form-item>
+                    <el-form-item>
+                      <el-col :xs="24" :sm="24" :lg="15">
+                        <span>{{ $t('shop.province') }}</span>
+                      </el-col>
+                      <el-cascader v-model="newOrder.areaSelected" :disabled="areaDisabled" size="large" :placeholder="$t('shop.delivery')" :options="regionData" style="width: 100%;" />
+                    </el-form-item>
+                    <el-form-item>
+                      <el-col :xs="24" :sm="24" :lg="15">
+                        <span>{{ $t('shop.lgaName') }}</span>
+                      </el-col>
+                      <el-input v-model.trim="newOrder.lgaName" />
+                    </el-form-item>
+                    <el-form-item>
+                      <el-col :xs="24" :sm="24" :lg="15">
+                        <span>{{ $t('shop.cityName') }}</span>
+                      </el-col>
+                      <el-input v-model.trim="newOrder.cityName" />
+                    </el-form-item>
+                    <el-form-item>
+                      <el-col :xs="24" :sm="24" :lg="15">
+                        <span>{{ $t('shop.address') }}</span>
+                      </el-col>
+                      <el-input v-model.trim="newOrder.address" />
+                    </el-form-item>
+                  </el-col>
+                </el-form>
+              </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 === 'cash'" style="color: tomato;">({{ $t('currency.sign') }} {{ userBalance.cash | toThousandFilter }})</span>
+                      </el-radio>
+                    </div>
+                  </el-radio-group>
+                </el-col>
+              </el-row>
+            </div>
+            <el-divider />
+          </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" :loading="submitButtonStat" @click="orderSubmit">{{ $t('shop.goPay') }}</el-button>
+              </el-col>
+            </el-row>
+          </div>
+        </div>
+      </div>
+    </el-dialog>
+
+    <!-- payStack模态框 -->
+    <el-dialog v-loading="payStackLoading" :title="$t('shop.goPay')" :visible.sync="visible" :width="payStackScreenWidth" :before-close="handleClose">
+      <section>
+        <el-form :model="form">
+          <el-form-item :label="$t('user.email')" label-width="100px" required>
+            <el-input v-model="form.email" autocomplete="off" />
+          </el-form-item>
+          <el-form-item :label="$t('shop.amount')" label-width="100px" required>
+            <el-input v-model="form.amount" autocomplete="off" readonly />
+          </el-form-item>
+        </el-form>
+      </section>
+      <paystack
+        :firstname="form.firstname"
+        :lastname="form.lastname"
+        :amount="form.amount * 100"
+        :email="form.email"
+        :metadata="form.metadata"
+        :currency="form.currency"
+        :paystackkey="form.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 | 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 {
+  fetchReconsumeProductList,
+  deleteApproachOrder,
+  fetchShoppingCart,
+  createReconsumeOrder,
+  createApproachReconsumeOrder
+} from '@/api/shop'
+import { fetchFullInfo } from '@/api/user'
+import waves from '@/directive/waves'
+import { getScreenWidth } from '@/utils'
+import tool from '@/utils/tool'
+import Pagination from '@/components/Pagination'
+import usersInfo from '@/utils/usersInfo'
+import paystack from 'vue-paystack'
+import region from '@/store/modules/region'
+
+export default {
+  name: 'StandardProducts',
+  components: { Pagination, paystack },
+  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: 1,
+        page: 1,
+        limit: 50
+      },
+      tool: tool,
+      multipleSelection: [],
+      sellPriceSum: 0.00,
+      pricePvSum: 0.00,
+      taxSum: 0.00,
+      storeNums: [],
+      display: false,
+      currentPage: 1,
+      shoppingCartGoods: [],
+
+      shoppingCartLoading: false,
+      visibleShoppingCart: false,
+      loading: false,
+
+      goods: [],
+      payList: [],
+      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: {},
+
+      payType: 'cash',
+      payStackLoading: false,
+      channels: ['card', 'bank', 'ussd', 'qr'],
+      regionData: region.regionInfo.regionData,
+      areaDisabled: false,
+      form: {
+        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: 'userOrder'
+            }
+          ]
+        }
+      },
+      newOrder: {
+        userName: '',
+        recRealName: '-',
+        consignee: '',
+        mobile: '',
+        areaSelected: [],
+        lgaName: '',
+        cityName: '',
+        address: ''
+      },
+      payStackScreenWidth: getScreenWidth() > 500 ? '450px' : getScreenWidth() + 'px',
+
+      addressId: '',
+      selfPickUpAddressId: '100000000000000000',
+      shippingAddressList: [],
+
+      screenWidth: getScreenWidth() > 600 ? '80%' : getScreenWidth() + 'px',
+      labelPosition: getScreenWidth() > 600 ? 'right' : 'top',
+      dialog: false,
+      dialogLoading: false,
+
+      visibleProduct: false,
+      product: {
+        GOODS_NAME: '',
+        GOODS_NO: '',
+        COVER: '',
+        SELL_PRICE: 0,
+        PRICE_PV: 0,
+        TAX_RATE: 0,
+        taxAmount: 0
+      },
+      imageStyle: 'margin-top: -50px;'
+    }
+  },
+  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.getList()
+  },
+  mounted() {
+    // 支付方式、账户信息、余额
+    this.getShoppingCart()
+  },
+  methods: {
+    // 商品列表
+    getList() {
+      this.listLoading = true
+      fetchReconsumeProductList(this.listQuery).then(response => {
+        this.list = response.data.list
+        this.total = response.data.totalCount
+
+        setTimeout(() => {
+          this.listLoading = false
+        }, 1.5 * 1000)
+
+        const settingObj = this.list
+        for (const i in this.list) {
+          this.storeNums[i] = 1
+          settingObj[i].chose_num = 0
+        }
+
+        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
+              }
+            }
+          }
+        })
+      })
+    },
+    // 会员查询
+    handleChkRecUser() {
+      if (this.newOrder.userName) {
+        this.loading = true
+        fetchFullInfo({ userName: this.newOrder.userName }).then(response => {
+          this.newOrder.recRealName = response.data.REAL_NAME
+          this.loading = false
+        }).catch(() => {
+          this.recRealName = '-'
+          this.loading = false
+        })
+      }
+    },
+    // 选择商品计数
+    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.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] = this.$t('currency.sign') + ' ' + 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 (const item of response.data.sellType) {
+          if (item.id === this.listQuery.categoryType) {
+            this.payList = item.sell_type
+            break
+          }
+        }
+        // 支付方式的第一项默认选中
+        this.payType = Object.values(this.payList)[1]['label']
+        // 免运费阈值
+        this.freeShipping = response.data.freeShipping
+        // 运费
+        this.freight = response.data.freight
+      })
+    },
+    // 支付
+    orderSubmit() {
+      // 账户余额
+      const 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 (['cash', 'pay_stack'].includes(this.payType)) {
+        const payObj = this.payList.find((item) => {
+          return item.label === this.payType
+        })
+        accountType = (payObj.length <= 0) ? '' : payObj.name
+      }
+
+      if (this.newOrder.recRealName === '-') {
+        this.$message({
+          message: this.$t('shop.memberNotFound'),
+          type: 'error'
+        })
+        return false
+      }
+
+      // 余额是否充足
+      if ((this.payType !== 'pay_stack') && ((amountBalance - this.cashSum) < 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
+        const params = {
+          goodsId: this.goodsId,
+          goodsNum: this.goodsNum,
+          payPassword: this.payPassword,
+          email: this.form.email,
+          addressId: this.addressId,
+          payType: this.payType,
+          userName: this.newOrder.userName,
+          consignee: this.newOrder.consignee,
+          acceptMobile: this.newOrder.mobile,
+          province: this.newOrder.areaSelected,
+          lgaName: this.newOrder.lgaName,
+          cityName: this.newOrder.cityName,
+          detailaddress: this.newOrder.address
+        }
+        if (this.payType === 'pay_stack') {
+          // PayStack支付
+          createApproachReconsumeOrder(params).then(response => {
+            this.visibleShoppingCart = false
+            this.submitButtonStat = false
+            this.visible = true
+            this.form.orderSn = response.data.SN
+            this.form.amount = this.cashSum
+            this.form.metadata.cart_id = response.data.SN
+            this.form.metadata.custom_fields[0].value = response.data.SN
+          }).catch(err => {
+            this.$message({
+              message: err,
+              type: 'error',
+              duration: 5 * 1000
+            })
+            this.submitButtonStat = false
+          })
+        } else {
+          console.log(params)
+          // 非PayStack支付
+          createReconsumeOrder(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: 'warning',
+              duration: 5 * 1000
+            })
+            this.submitButtonStat = false
+          })
+        }
+      }).catch(() => {
+        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 = this.cashSum = this.form.amount = 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) {
+            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.getSumMoney()
+    },
+    // 关闭时清空购物车等信息
+    cleanShowCart() {
+      this.visibleShoppingCart = false
+      this.goods = []
+      this.totalAmount = 0.00
+      this.goodsNum = ''
+      this.goodsId = ''
+      this.pointFreight = 0
+      this.pointsSum = 0
+    },
+    // 选择收货地址
+    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)
+    },
+    // 商品详情
+    handleProduct(row) {
+      this.product = row
+      this.product.taxAmount = tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
+      this.visibleProduct = true
+    }
+  }
+}
+</script>
+
+<style>
+.el-table--medium .el-table__cell {
+  padding: 3px 0;
+}
+
+.csClass{
+  width: 360px;
+}
+
+.address{
+  line-height: 2.5rem;
+}
+.address_box{
+  border-bottom: 1px solid #e3e3e3;
+}
+.sum{
+  display: inline-block;
+}
+.box{
+  margin: 1rem 0;
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+  padding-bottom: 1rem;
+}
+.sum_box{
+  display: flex;
+  margin-left: 1rem;
+}
+.sum_box > div{
+  line-height: 2rem;
+}
+.sum_box > div:nth-child(1){
+  margin-right: 1rem;
+}
+.payButton {
+  border: none;
+  padding: 0;
+}
+</style>

+ 717 - 717
src/views/shop/standard-products.vue

@@ -1,776 +1,776 @@
 <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" type="index" width="50"></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('currency.sign') }} {{ row.SELL_PRICE | toThousandFilter }}
-										<span style="font-weight:normal; color: #606266;">({{ row.PRICE_PV | toThousandFilter }}{{ $t('shop.productBV') }})</span>
-									</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" type="index" width="50"></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-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('currency.sign') }} {{ row.SELL_PRICE | toThousandFilter }}
+                      <span style="font-weight:normal; color: #606266;">({{ row.PRICE_PV | toThousandFilter }}{{ $t('shop.productBV') }})</span>
+                    </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="margin-right: 2rem; display: inline-block;">{{ $t('shop.productBV') }}:{{ pricePvSum | 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="margin-right: 2rem; display: inline-block;">{{ $t('shop.productBV') }}:{{ pricePvSum | 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" v-loading="shoppingCartLoading" 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;">{{ $t('currency.sign') }} {{ 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;">{{ $t('currency.sign') }} {{ row.member_price_plus | toThousandFilter }}</span>
-										</el-col>
-									</el-row>
-								</el-main>
-							</el-container>
-						</template>
-					</el-table-column>
-				</el-table>
+    <!-- 购物车  -->
+    <el-dialog v-loading="shoppingCartLoading" :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;">{{ $t('currency.sign') }} {{ 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;">{{ $t('currency.sign') }} {{ 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') }}:{{ $t('currency.sign') }} {{ parseFloat(cashSum) | toThousandFilter }}</span><br />
-								<span>{{ $t('shop.freight') }}:{{ $t('currency.sign') }} {{ 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 === 'cash'" style="color: tomato;">({{ $t('currency.sign') }} {{ userBalance.cash | 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') }}:{{ $t('currency.sign') }} {{ parseFloat(cashSum) | toThousandFilter }}</span><br>
+                  <span>{{ $t('shop.freight') }}:{{ $t('currency.sign') }} {{ 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 === 'cash'" style="color: tomato;">({{ $t('currency.sign') }} {{ userBalance.cash | 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>
 
-	<!-- payStack模态框 -->
-	<el-dialog :title="$t('shop.goPay')" :visible.sync="visible" :width="payStackScreenWidth" v-loading="payStackLoading" :before-close="handleClose">
-		<section>
-			<el-form :model="form">
-				<el-form-item :label="$t('user.email')" label-width="100px" required>
-					<el-input v-model="form.email" autocomplete="off"></el-input>
-				</el-form-item>
-				<el-form-item :label="$t('shop.amount')" label-width="100px" required>
-					<el-input v-model="form.amount" autocomplete="off" readonly></el-input>
-				</el-form-item>
-			</el-form>
-		</section>
-		<paystack
-			:firstname="form.firstname"
-			:lastname="form.lastname"
-			:amount="form.amount * 100"
-			:email="form.email"
-			:metadata="form.metadata"
-			:currency="form.currency"
-			:paystackkey="form.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="form">
+          <el-form-item :label="$t('user.email')" label-width="100px" required>
+            <el-input v-model="form.email" autocomplete="off" />
+          </el-form-item>
+          <el-form-item :label="$t('shop.amount')" label-width="100px" required>
+            <el-input v-model="form.amount" autocomplete="off" readonly />
+          </el-form-item>
+        </el-form>
+      </section>
+      <paystack
+        :firstname="form.firstname"
+        :lastname="form.lastname"
+        :amount="form.amount * 100"
+        :email="form.email"
+        :metadata="form.metadata"
+        :currency="form.currency"
+        :paystackkey="form.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 {fetchProductList, createApproachOrder, deleteApproachOrder, fetchShoppingCart, createOrder} from '@/api/shop'
-  import waves from '@/directive/waves'
-	import {formatAmount, getMedia, getScreenWidth} from '@/utils'
-	import tool from '@/utils/tool'
-  import Pagination from '@/components/Pagination'
-	import usersInfo from "@/utils/usersInfo"
-	import paystack from 'vue-paystack'
+<script>
+import { fetchProductList, createApproachOrder, deleteApproachOrder, fetchShoppingCart, createOrder } from '@/api/shop'
+import waves from '@/directive/waves'
+import { getScreenWidth } from '@/utils'
+import tool from '@/utils/tool'
+import Pagination from '@/components/Pagination'
+import usersInfo from '@/utils/usersInfo'
+import paystack from 'vue-paystack'
 
-  export default {
-    name: 'StandardProducts',
-    components: { Pagination, paystack },
-    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: 1,
-          page: 1,
-          limit: 50,
-        },
-				tool: tool,
-				multipleSelection: [],
-				sellPriceSum: 0.00,
-				pricePvSum: 0.00,
-				taxSum: 0.00,
-				storeNums: [],
-				display: false,
-				currentPage: 1,
-				shoppingCartGoods: [],
+export default {
+  name: 'StandardProducts',
+  components: { Pagination, paystack },
+  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: 1,
+        page: 1,
+        limit: 50
+      },
+      tool: tool,
+      multipleSelection: [],
+      sellPriceSum: 0.00,
+      pricePvSum: 0.00,
+      taxSum: 0.00,
+      storeNums: [],
+      display: false,
+      currentPage: 1,
+      shoppingCartGoods: [],
 
-				shoppingCartLoading: false,
-				visibleShoppingCart: false,
-				loading: false,
+      shoppingCartLoading: false,
+      visibleShoppingCart: false,
+      loading: false,
 
-				goods: [],
-				payList: [],
-				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: {},
+      goods: [],
+      payList: [],
+      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: {},
 
-				payType: 'cash',
-				payStackLoading: false,
-				channels: ["card", "bank", "ussd", "qr"],
-				form: {
-					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: 'userOrder'
-							},
-						]
-					},
-				},
-				payStackScreenWidth: getScreenWidth() > 500 ? '450px' : getScreenWidth() + 'px',
+      payType: 'cash',
+      payStackLoading: false,
+      channels: ['card', 'bank', 'ussd', 'qr'],
+      form: {
+        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: 'userOrder'
+            }
+          ]
+        }
+      },
+      payStackScreenWidth: getScreenWidth() > 500 ? '450px' : getScreenWidth() + 'px',
 
-				addressId: '',
-				selfPickUpAddressId: '100000000000000000',
-				shippingAddressList: [],
+      addressId: '',
+      selfPickUpAddressId: '100000000000000000',
+      shippingAddressList: [],
 
-				screenWidth: getScreenWidth() > 600 ? '80%' : getScreenWidth() + 'px',
-				labelPosition: getScreenWidth() > 600 ? 'right' : 'top',
-				dialog: false,
-				dialogLoading: false,
+      screenWidth: getScreenWidth() > 600 ? '80%' : getScreenWidth() + 'px',
+      labelPosition: getScreenWidth() > 600 ? 'right' : 'top',
+      dialog: false,
+      dialogLoading: false,
 
-				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;'
+    }
+  },
+  computed: {
+    // PayStack混淆串
+    reference() {
+      let text = ''
+      const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
+      for (let i = 0; i < 10; i++) {
+        text += possible.charAt(Math.floor(Math.random() * possible.length))
       }
-    },
-    created() {
-      this.getList()
-    },
-		mounted() {
-			// 支付方式、账户信息、余额
-			this.getShoppingCart()
-		},
-		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
-			}
-		},
-		methods: {
-			// 商品列表
-      getList() {
-        this.listLoading = true
-				fetchProductList(this.listQuery).then(response => {
-          this.list = response.data.list
-          this.total = response.data.totalCount
+      return text
+    }
+  },
+  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
-								}
-							}
-						}
-					})
+        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)) })
         })
-      },
-			// 选择商品计数
-			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.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] = this.$t('currency.sign') + ' ' + 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] = this.$t('currency.sign') + ' ' + 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.payType = Object.values(this.payList)[1]['label']
-					// 免运费阈值
-					this.freeShipping = response.data.freeShipping
-					// 运费
-					this.freight = response.data.freight
-					})
-			},
-			// 支付
-			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 (['cash', 'pay_stack'].includes(this.payType)) {
-					let payObj = this.payList.find((item) => {
-						return item.label === this.payType
-					})
-					accountType = (payObj.length <= 0) ? '' : payObj.name
-				}
+      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.payType = Object.values(this.payList)[1]['label']
+        // 免运费阈值
+        this.freeShipping = response.data.freeShipping
+        // 运费
+        this.freight = response.data.freight
+      })
+    },
+    // 支付
+    orderSubmit() {
+      // 账户余额
+      const 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 (['cash', 'pay_stack'].includes(this.payType)) {
+        const payObj = this.payList.find((item) => {
+          return item.label === this.payType
+        })
+        accountType = (payObj.length <= 0) ? '' : payObj.name
+      }
 
-				// 余额是否充足
-				if ((this.payType !== 'pay_stack') && ((amountBalance - this.cashSum) < 0)) {
-					this.$message({
-						message: accountType + this.$t('shop.balanceNotAllow'),
-						type: 'error'
-					})
-					this.submitButtonStat = false
-					return false
-				}
+      // 余额是否充足
+      if ((this.payType !== 'pay_stack') && ((amountBalance - this.cashSum) < 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: this.form.email,
-						addressId: this.addressId,
-						address: this.address,
-						payType: this.payType,
-					}
-					if (this.payType === 'pay_stack') {
-						// PayStack支付
-						createApproachOrder(params).then(response => {
-							this.visibleShoppingCart = false
-							this.submitButtonStat = false
-							this.visible = true
-							this.form.orderSn = response.data.SN
-							this.form.amount = this.cashSum
-							this.form.metadata.cart_id = response.data.SN
-							this.form.metadata.custom_fields[0].value = response.data.SN
-						}).catch(err => {
-							this.$message({
-								message: err,
-								type: 'error',
-								duration: 5 * 1000
-							})
-							this.submitButtonStat = false
-						})
-					} else {
-						// 非PayStack支付
-						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(() => {
-					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 = this.cashSum = this.form.amount = 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
+      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: this.form.email,
+          addressId: this.addressId,
+          address: this.address,
+          payType: this.payType
+        }
+        if (this.payType === 'pay_stack') {
+          // PayStack支付
+          createApproachOrder(params).then(response => {
+            this.visibleShoppingCart = false
+            this.submitButtonStat = false
+            this.visible = true
+            this.form.orderSn = response.data.SN
+            this.form.amount = this.cashSum
+            this.form.metadata.cart_id = response.data.SN
+            this.form.metadata.custom_fields[0].value = response.data.SN
+          }).catch(err => {
+            this.$message({
+              message: err,
+              type: 'error',
+              duration: 5 * 1000
+            })
+            this.submitButtonStat = false
+          })
+        } else {
+          // 非PayStack支付
+          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: 'warning',
+              duration: 5 * 1000
+            })
+            this.submitButtonStat = false
+          })
+        }
+      }).catch(() => {
+        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 = this.cashSum = this.form.amount = 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();
-			},
-			// 关闭时清空购物车等信息
-			cleanShowCart() {
-				this.visibleShoppingCart = false
-				this.goods = []
-				this.totalAmount = 0.00
-				this.goodsNum = ''
-				this.goodsId = ''
-				this.pointFreight = 0
-				this.pointsSum = 0
-			},
-			// 选择收货地址
-			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)
-			},
-			// 商品详情
-			handleProduct(row) {
-				this.product = row
-				this.product.taxAmount = tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
-				this.visibleProduct = true
-			},
+      // 计算价格
+      this.getSumMoney()
+    },
+    // 关闭时清空购物车等信息
+    cleanShowCart() {
+      this.visibleShoppingCart = false
+      this.goods = []
+      this.totalAmount = 0.00
+      this.goodsNum = ''
+      this.goodsId = ''
+      this.pointFreight = 0
+      this.pointsSum = 0
+    },
+    // 选择收货地址
+    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)
+    },
+    // 商品详情
+    handleProduct(row) {
+      this.product = row
+      this.product.taxAmount = tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
+      this.visibleProduct = true
+    }
   }
+}
 </script>
 
 <style>
 .el-table--medium .el-table__cell {
-	padding: 3px 0;
+  padding: 3px 0;
 }
 
 .csClass{
-	width: 360px;
+  width: 360px;
 }
 
 .address{
-	line-height: 2.5rem;
+  line-height: 2.5rem;
 }
 .address_box{
-	border-bottom: 1px solid #e3e3e3;
+  border-bottom: 1px solid #e3e3e3;
 }
 .sum{
-	display: inline-block;
+  display: inline-block;
 }
 .box{
-	margin: 1rem 0;
-	display: flex;
-	justify-content: flex-start;
-	align-items: center;
-	padding-bottom: 1rem;
+  margin: 1rem 0;
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+  padding-bottom: 1rem;
 }
 .sum_box{
-	display: flex;
-	margin-left: 1rem;
+  display: flex;
+  margin-left: 1rem;
 }
 .sum_box > div{
-	line-height: 2rem;
+  line-height: 2rem;
 }
 .sum_box > div:nth-child(1){
-	margin-right: 1rem;
+  margin-right: 1rem;
 }
 .payButton {
-	border: none;
-	padding: 0;
+  border: none;
+  padding: 0;
 }
 </style>

+ 1 - 1
vue.config.js

@@ -38,7 +38,7 @@ module.exports = {
     },
     proxy: {
       [process.env.VUE_APP_BASE_API]:{
-        target:"http://local.ng.frontend.api.com",
+        target:"http://localhost:8013",
         changeOrigin:true,
         pathRewrite:{
           ["^" + process.env.VUE_APP_BASE_API] : ""