Kaynağa Gözat

充值,凭证上传修改

theo 3 yıl önce
ebeveyn
işleme
46cbe48f01

+ 299 - 300
backendEle/src/views/finance/withdraw.vue

@@ -202,313 +202,312 @@ import baseInfo from '@/utils/baseInfo'
 import Pagination from '@/components/Pagination'
 import filterHelper from '../../utils/filterHelper'
 export default {
-    name: 'finance_withdraw',
-    components: {FilterUser, Pagination},
+  name: 'finance_withdraw',
+  components: {FilterUser, Pagination},
 
-    data() {
-        return {
-            activeName: 'all',
-            tableHeaders: null,
-            baseDecLevels: baseInfo.decLevels(),
+  data () {
+    return {
+      activeName: 'all',
+      tableHeaders: null,
+      baseDecLevels: baseInfo.decLevels(),
 
-            allData: null,
-            tableData: null,
-            loading: true,
-            multipleSelection: [],
-            currentPage: 1,
-            totalPages: 1,
-            totalCount: 1,
-            pageSize: 20,
-            tool: tool,
-            permission: permission,
-            regTypes: baseInfo.regTypes(),
-            dialogEditFormVisible: false,
-            dialogEditLoading: false,
-            dialogAuditFormVisible: false,
-            dialogAuditLoading: false,
-            dialogAddInvoiceVisible: false,
-            dialogAddInvoiceLoading: false,
-            auditId: null,
-            form: {
-                id: null,
-                baseInfo: {USER_NAME: null, REG_TYPE: null},
-                amount: null,
-                planPaidAt: null,
-                paidAt: new Date(),
-                createRemark: null,
-            },
-            invoiceForm: {
-                id: null,
-                withdrawId: null,
-                withdrawSn: null,
-                invoiceCode: null,
-                invoiceNum: null,
-                invoiceDate: null,
-                amount: null,
-                taxRate: null,
-                purchaserName: null,
-                purchaserRegisterNum: null,
-                purchaserAddress: null,
-                purchaserBank: null,
-                sellerName: null,
-                sellerRegisterNum: null,
-                sellerAddress: null,
-                sellerBank: null,
-                itemName: null,
-                invoiceRemark: null,
-                createRemark: null,
-            },
-            pickerOptions0: {
-                disabledDate(time) {
-                    return time.getTime() < Date.now();
-                }
-            },
-            pickerOptions1: {
-                disabledDate(time) {
-                    return time.getTime() < Date.now() - 8.64e7;
-                }
-            },
-            auditRemark: '',
-            auditForm: {
-                auditTips: '',
-                auditStatus: null,
-                selectedIds: [],
-                planPaidAt: null,
-                createRemark: null,
-                withdrawAudit: '',
-            },
-            auditTips: '',
-            filterTypes: {},
-            filterModel: {},
-            excelForm: {
-                rowCount: '',
-            },
-            filterStatus: '0',
+      allData: null,
+      tableData: null,
+      loading: true,
+      multipleSelection: [],
+      currentPage: 1,
+      totalPages: 1,
+      totalCount: 1,
+      pageSize: 20,
+      tool: tool,
+      permission: permission,
+      regTypes: baseInfo.regTypes(),
+      dialogEditFormVisible: false,
+      dialogEditLoading: false,
+      dialogAuditFormVisible: false,
+      dialogAuditLoading: false,
+      dialogAddInvoiceVisible: false,
+      dialogAddInvoiceLoading: false,
+      auditId: null,
+      form: {
+        id: null,
+        baseInfo: {USER_NAME: null, REG_TYPE: null},
+        amount: null,
+        planPaidAt: null,
+        paidAt: new Date(),
+        createRemark: null,
+      },
+      invoiceForm: {
+        id: null,
+        withdrawId: null,
+        withdrawSn: null,
+        invoiceCode: null,
+        invoiceNum: null,
+        invoiceDate: null,
+        amount: null,
+        taxRate: null,
+        purchaserName: null,
+        purchaserRegisterNum: null,
+        purchaserAddress: null,
+        purchaserBank: null,
+        sellerName: null,
+        sellerRegisterNum: null,
+        sellerAddress: null,
+        sellerBank: null,
+        itemName: null,
+        invoiceRemark: null,
+        createRemark: null,
+      },
+      pickerOptions0: {
+        disabledDate(time) {
+          return time.getTime() < Date.now();
         }
-    },
-  mounted () {
-      this.getData();
-   /* if (permission.hasPermission(`finance/withdraw-7`)) {
-      this.activeName = 'seven'
-    }
-    if (permission.hasPermission(`finance/withdraw-4`)) {
-      this.activeName = 'four'
-    }
-    if (permission.hasPermission(`finance/withdraw-6`)) {
-      this.activeName = 'six'
-    }
-    if (permission.hasPermission(`finance/withdraw-3`)) {
-      this.activeName = 'three'
-    }
-    if (permission.hasPermission(`finance/withdraw-2`)) {
-      this.activeName = 'two'
-    }
-    if (permission.hasPermission(`finance/withdraw-1`)) {
-      this.activeName = 'one'
-    }
-    if (permission.hasPermission(`finance/withdraw-0`)) {
-      this.activeName = 'zero'
+      },
+      pickerOptions1: {
+        disabledDate(time) {
+          return time.getTime() < Date.now() - 8.64e7;
+        }
+      },
+      auditRemark: '',
+      auditForm: {
+        auditTips: '',
+        auditStatus: null,
+        selectedIds: [],
+        planPaidAt: null,
+        createRemark: null,
+        withdrawAudit: '',
+      },
+      auditTips: '',
+      filterTypes: {},
+      filterModel: {},
+      excelForm: {
+        rowCount: '',
+      },
+      filterStatus: '0',
     }
-    if (permission.hasPermission(`finance/withdraw-0`) && permission.hasPermission(`finance/withdraw-1`) && permission.hasPermission(`finance/withdraw-2`) && permission.hasPermission(`finance/withdraw-3`) && permission.hasPermission(`finance/withdraw-6`) && permission.hasPermission(`finance/withdraw-4`) && permission.hasPermission(`finance/withdraw-7`)) {
-      this.activeName = 'all'
-    }*/
+  },
+  mounted () {
+    this.getData();
+    // if (permission.hasPermission(`finance/withdraw-7`)) {
+    //   this.activeName = 'seven'
+    // }
+    // if (permission.hasPermission(`finance/withdraw-4`)) {
+    //   this.activeName = 'four'
+    // }
+    // if (permission.hasPermission(`finance/withdraw-6`)) {
+    //   this.activeName = 'six'
+    // }
+    // if (permission.hasPermission(`finance/withdraw-3`)) {
+    //   this.activeName = 'three'
+    // }
+    // if (permission.hasPermission(`finance/withdraw-2`)) {
+    //   this.activeName = 'two'
+    // }
+    // if (permission.hasPermission(`finance/withdraw-1`)) {
+    //   this.activeName = 'one'
+    // }
+    // if (permission.hasPermission(`finance/withdraw-0`)) {
+    //   this.activeName = 'zero'
+    // }
+    // if (permission.hasPermission(`finance/withdraw-0`) && permission.hasPermission(`finance/withdraw-1`) && permission.hasPermission(`finance/withdraw-2`) && permission.hasPermission(`finance/withdraw-3`) && permission.hasPermission(`finance/withdraw-6`) && permission.hasPermission(`finance/withdraw-4`) && permission.hasPermission(`finance/withdraw-7`)) {
+    //   this.activeName = 'all'
+    // }
   },
 
-      methods: {
-          handleMuli(command) {
-              if (this.multipleSelection.length < 1) {
-                  this.$message({
-                      message: '请选择要操作的记录',
-                      type: 'warning'
-                  })
-                  return;
-              }
-              this.handleAudit(null, command)
-          },
-          handleAudit(row = null, status) {
-              let title = ''
-              if (status === '2') {
-                  title = '确定要通过审核?备注:'
-              }else if(status === '3'){
-                  title = '确定要设为待付款?备注:'
-              }else if(status === '4'){
-                  title = '确定要设为付款失败?备注:'
-              }else if(status === '6'){
-                  title = '确定要设为已付款?备注:'
-              }else if(status === '7'){
-                  title = '确定要设为已退回?备注:'
-              }
-              this.handleStatusShow(row,status,title);
-          },
-          handleExpand(row, event, column) {
-              this.$refs.multipleTable.toggleRowExpansion(row)
-          },
-          handleExport() {
-              let filterData = this.filterModel
-              // 如果有选中,导出选中ID,否则导出全部
-              if (this.multipleSelection.length > 0) {
-                  let selectedIds = []
-                  for (let val of this.multipleSelection) {
-                      selectedIds.push(val.ID)
-                  }
-
-                  filterData.selectedIds = selectedIds
-              }
-              this.$confirm('确定要导出当前表格中的提现数据吗?', 'Hint', {
-                  confirmButtonText: 'confirm', // 确定
-                  cancelButtonText: 'cancel', // 取消
-                  type: 'warning'
-              }).then(() => {
-                  return network.getData('finance/withdraw-export', filterData)
-              }).then(response => {
-                  this.$message({
-                      message: response,
-                      type: 'success'
-                  })
-              }).catch(response => {
-              })
-          },
-          handleAdd() {
-              this.$router.push({path: `/finance/withdraw-add`})
-          },
-          handleExcel() {
-          },
-          handleExcelPaidFalse() {
-              window.open(CDN_BASE_URL + `/files/bonus_withdraw_paid_false.xlsx`)
-          },
-          handleEditShow(row) {
-              this.dialogEditLoading = true
-              this.auditId = row.ID
-              this.dialogEditFormVisible = true
-              let vueObj = this
-              network.getData('finance/withdraw-get', {id: this.auditId}).then(response => {
-                  vueObj.dialogEditLoading = false
-                  vueObj.form = response
-              })
-          },
-          handleEdit() {
-              this.dialogEditFormVisible = false
-              this.$message({
-                  message: '正在修改数据',
-                  type: 'info'
-              })
-              this.loading = true
-              let path = 'finance/withdraw-edit'
-              network.postData(path, this.form).then(response => {
-                  this.$message({
-                      message: response,
-                      type: 'success'
-                  })
-                  this.getData(this.currentPage, this.pageSize)
-              }).catch(response => {
-              })
-          },
-          handleStatusShow(row, status, title, remark = 'Note') { // 备注
-              this.auditForm = {
-                  auditTips: '',
-                  auditStatus: null,
-                  selectedIds: [],
-                  planPaidAt: null,
-                  paidAt: new Date(),
-                  remark: null,
-              }
-              if (row === null) {
-                  for (let val of this.multipleSelection) {
-                      this.auditForm.selectedIds.push(val.ID)
-                  }
-              } else {
-                  this.auditForm.selectedIds.push(row.ID)
-              }
-              if (this.auditForm.selectedIds.length === 0) {
-                  this.$message({
-                      message: '请选择数据',
-                      type: 'warning'
-                  })
-                  return
-              }
-              this.auditRemark = remark
-              this.dialogAuditFormVisible = true
-              this.auditForm.auditTips = title
-              this.auditForm.auditStatus = status
-          },
-          handleStatus() {
-              network.postData('finance/mult-point', {opType: 2}).then(response => {
-                  this.auditForm.withdrawAudit = response.withdrawAudit
-                  this.$confirm('Are you sure to change the state of the selected data?', 'Hint', { // 确定要对所选数据修改状态吗?
-                      confirmButtonText: 'confirm', // 确定
-                      cancelButtonText: 'cancel', // 取消
-                      type: 'warning'
-                  }).then(() => {
-                      return network.postData('finance/withdraw-status', this.auditForm)
-                  }).then(response => {
-                      this.dialogAuditFormVisible = false
-                      this.$message({
-                          message: response,
-                          type: 'success'
-                      })
-                      this.getData(this.currentPage, this.pageSize)
-                  }).catch(response => {
-                      this.dialogAuditFormVisible = false
-                  })
-              })
-          },
-          handleAddInvoiceShow(row) {
-              this.dialogAddInvoiceVisible = true
-              this.auditId = row.INVOICE_ID
-              this.dialogAddInvoiceLoading = true
-              let vueObj = this
-              network.getData('finance/invoice-audit-get', {id: this.auditId}).then(response => {
-                  vueObj.dialogAddInvoiceLoading = false
-                  vueObj.invoiceForm = response
-                  this.invoiceForm.withdrawSn = row.SN
-                  this.invoiceForm.withdrawId = row.ID
-              })
-          },
-          handleAddInvoice() {
-              let path = 'finance/invoice-audit-add'
-              if (this.invoiceForm.id) path = 'finance/invoice-audit-edit'
-              network.postData(path, this.invoiceForm).then(response => {
-                  this.$message({
-                      message: response,
-                      type: 'success'
-                  })
-                  this.dialogAddInvoiceVisible = false
-                  this.getData(this.currentPage, this.pageSize)
-              }).catch(response => {
-              })
-          },
-          handleSelectionChange(val) {
-              this.multipleSelection = val
-          },
-          handleCurrentChange(page) {
-              this.getData(page, this.pageSize)
-          },
-          handleSizeChange(pageSize) {
-              this.getData(this.currentPage, pageSize)
-          },
-          handleFilterStatusClick(tab, event) {
-              filterHelper.clearFilterOption(this)
-              this.getData()
-          },
-          handleFilterUser(filterData) {
-              filterHelper.handleFilterUser(this, filterData)
-          },
-          handleFilter() {
-              this.getData()
-          },
-          getData(page, pageSize) {
-              let filterData = this.filterModel
-              filterData.filterStatus = this.filterStatus != '-1' ? `=,${this.filterStatus}` : ''
-              let vueObj = this
-              network.getPageData(this, 'finance/withdraw', page, pageSize, filterData, function (response) {
-                  vueObj.allData = response
-                  vueObj.filterTypes = response.filterTypes
-              })
-          },
-          onMessageCallback() {
-              this.getData(this.currentPage, this.pageSize)
-          },
+  methods: {
+    handleMuli (command) {
+      if (this.multipleSelection.length < 1) {
+        this.$message({
+          message: '请选择要操作的记录',
+          type: 'warning'
+        })
+        return;
+      }
+      this.handleAudit(null, command)
+    },
+    handleAudit (row = null, status) {
+      let title = ''
+      if (status === '2') {
+        title = '确定要通过审核?备注:'
+      }else if(status === '3') {
+        title = '确定要设为待付款?备注:'
+      }else if(status === '4') {
+        title = '确定要设为付款失败?备注:'
+      }else if(status === '6') {
+        title = '确定要设为已付款?备注:'
+      }else if(status === '7') {
+        title = '确定要设为已退回?备注:'
+      }
+      this.handleStatusShow(row,status,title);
+    },
+    handleExpand (row, event, column) {
+      this.$refs.multipleTable.toggleRowExpansion(row)
+    },
+    handleExport () {
+      let filterData = this.filterModel
+      // 如果有选中,导出选中ID,否则导出全部
+      if (this.multipleSelection.length > 0) {
+        let selectedIds = []
+        for (let val of this.multipleSelection) {
+          selectedIds.push(val.ID)
+        }
+        filterData.selectedIds = selectedIds
+      }
+      this.$confirm('确定要导出当前表格中的提现数据吗?', 'Hint', {
+        confirmButtonText: 'confirm', // 确定
+        cancelButtonText: 'cancel', // 取消
+        type: 'warning'
+      }).then(() => {
+        return network.getData('finance/withdraw-export', filterData)
+      }).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
+        })
+      }).catch(response => {
+      })
+    },
+    handleAdd () {
+      this.$router.push({path: `/finance/withdraw-add`})
+    },
+    handleExcel () {
+    },
+    handleExcelPaidFalse () {
+      window.open(CDN_BASE_URL + `/files/bonus_withdraw_paid_false.xlsx`)
+    },
+    handleEditShow (row) {
+      this.dialogEditLoading = true
+      this.auditId = row.ID
+      this.dialogEditFormVisible = true
+      let vueObj = this
+      network.getData('finance/withdraw-get', {id: this.auditId}).then(response => {
+        vueObj.dialogEditLoading = false
+        vueObj.form = response
+      })
+    },
+    handleEdit () {
+      this.dialogEditFormVisible = false
+      this.$message({
+        message: '正在修改数据',
+        type: 'info'
+      })
+      this.loading = true
+      let path = 'finance/withdraw-edit'
+      network.postData(path, this.form).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
+        })
+        this.getData(this.currentPage, this.pageSize)
+      }).catch(response => {
+      })
+    },
+    handleStatusShow(row, status, title, remark = 'Note') { // 备注
+      this.auditForm = {
+        auditTips: '',
+        auditStatus: null,
+        selectedIds: [],
+        planPaidAt: null,
+        paidAt: new Date(),
+        remark: null,
       }
+      if (row === null) {
+        for (let val of this.multipleSelection) {
+          this.auditForm.selectedIds.push(val.ID)
+        }
+      } else {
+        this.auditForm.selectedIds.push(row.ID)
+      }
+      if (this.auditForm.selectedIds.length === 0) {
+        this.$message({
+          message: '请选择数据',
+          type: 'warning'
+        })
+        return
+      }
+      this.auditRemark = remark
+      this.dialogAuditFormVisible = true
+      this.auditForm.auditTips = title
+      this.auditForm.auditStatus = status
+    },
+    handleStatus () {
+      network.postData('finance/mult-point', {opType: 2}).then(response => {
+        this.auditForm.withdrawAudit = response.withdrawAudit
+        this.$confirm('Are you sure to change the state of the selected data?', 'Hint', { // 确定要对所选数据修改状态吗?
+          confirmButtonText: 'confirm', // 确定
+          cancelButtonText: 'cancel', // 取消
+          type: 'warning'
+        }).then(() => {
+          return network.postData('finance/withdraw-status', this.auditForm)
+        }).then(response => {
+          this.dialogAuditFormVisible = false
+          this.$message({
+            message: response,
+            type: 'success'
+          })
+          this.getData(this.currentPage, this.pageSize)
+        }).catch(response => {
+          this.dialogAuditFormVisible = false
+        })
+      })
+    },
+    handleAddInvoiceShow (row) {
+      this.dialogAddInvoiceVisible = true
+      this.auditId = row.INVOICE_ID
+      this.dialogAddInvoiceLoading = true
+      let vueObj = this
+      network.getData('finance/invoice-audit-get', {id: this.auditId}).then(response => {
+        vueObj.dialogAddInvoiceLoading = false
+        vueObj.invoiceForm = response
+        this.invoiceForm.withdrawSn = row.SN
+        this.invoiceForm.withdrawId = row.ID
+      })
+    },
+    handleAddInvoice () {
+      let path = 'finance/invoice-audit-add'
+      if (this.invoiceForm.id) path = 'finance/invoice-audit-edit'
+      network.postData(path, this.invoiceForm).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
+        })
+        this.dialogAddInvoiceVisible = false
+        this.getData(this.currentPage, this.pageSize)
+      }).catch(response => {
+      })
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val
+    },
+    handleCurrentChange(page) {
+      this.getData(page, this.pageSize)
+    },
+    handleSizeChange(pageSize) {
+      this.getData(this.currentPage, pageSize)
+    },
+    handleFilterStatusClick(tab, event) {
+      filterHelper.clearFilterOption(this)
+      this.getData()
+    },
+    handleFilterUser(filterData) {
+      filterHelper.handleFilterUser(this, filterData)
+    },
+    handleFilter() {
+      this.getData()
+    },
+    getData(page, pageSize) {
+      let filterData = this.filterModel
+      filterData.filterStatus = this.filterStatus != '-1' ? `=,${this.filterStatus}` : ''
+      let vueObj = this
+      network.getPageData(this, 'finance/withdraw', page, pageSize, filterData, function (response) {
+        vueObj.allData = response
+        vueObj.filterTypes = response.filterTypes
+      })
+    },
+    onMessageCallback() {
+      this.getData(this.currentPage, this.pageSize)
+    },
+  }
 }
 </script>
 

+ 2 - 2
common/models/forms/RechargeForm.php

@@ -75,8 +75,8 @@ class RechargeForm extends Model {
             'selectedIds' => '充值申请ID',
             'userName' => '会员编号',
             'applyAmount' => 'Apply Amount', // 申请充值的金额
-            'openBank' => '汇款银行',
-            'bankNo' => '汇款账号',
+            'openBank' => 'Bank', // 汇款银行
+            'bankNo' => 'Bank Account', // 汇款账号
 //            'bankAddress' => '银行支行',
 //            'bankProvince' => '银行省',
 //            'bankCity' => '银行市',

+ 74 - 74
frontendEle/src/views/config/receive-address-edit.vue

@@ -63,41 +63,55 @@
 </template>
 
 <script>
-  import Vue from 'vue'
-  import store from '@/utils/vuexStore'
-  import network from '@/utils/network'
-  import tool from '@/utils/tool'
-  import userInfo from '@/utils/userInfo'
+import Vue from 'vue'
+import store from '@/utils/vuexStore'
+import network from '@/utils/network'
+import tool from '@/utils/tool'
+import userInfo from '@/utils/userInfo'
 
-  export default {
-    name: 'config_receive-address-edit',
-    mounted() {
-      if (this.$route.name === 'config_receive-address-add'){
-        this.loading = false
-      } else {
-        this.getData()
-      }
-      console.log(this.regionData)
-    },
-    data() {
-      return {
-        regionData: store.state.regionInfo.regionData,
-        form: {
-          consignee: '',
-          mobile: '',
-          areaSelected: [],
-          address: '',
-          isDefault: false,
-        },
-        loading: true,
-        submitButtonStat: false,
+export default {
+  name: 'config_receive-address-edit',
+  mounted () {
+    if (this.$route.name === 'config_receive-address-add') {
+      this.loading = false
+    } else {
+      this.getData()
+    }
+    console.log(this.regionData)
+  },
+  data () {
+    return {
+      regionData: store.state.regionInfo.regionData,
+      form: {
+        consignee: '',
+        mobile: '',
+        areaSelected: [],
+        address: '',
+        isDefault: false,
+      },
+      loading: true,
+      submitButtonStat: false,
+    }
+  },
+  methods: {
+    onSubmit () {
+      this.submitButtonStat = true
+      let path = 'config/receive-address-add'
+      let postData = {
+        consignee: this.form.consignee,
+        mobile: this.form.mobile,
+        province: this.form.areaSelected[0] ? this.form.areaSelected[0] : '',
+        // city: this.form.areaSelected[1] ? this.form.areaSelected[1] : '',
+        // county: this.form.areaSelected[2] ? this.form.areaSelected[2] : '',
+        lgaName: this.form.lgaName,
+        cityName: this.form.cityName,
+        address: this.form.address,
+        isDefault: this.form.isDefault,
       }
-    },
-    methods: {
-      onSubmit() {
-        this.submitButtonStat = true
-        let path = 'config/receive-address-add'
-        let postData = {
+      if (this.$route.name === 'config_receive-address-edit'){
+        path = 'config/receive-address-edit'
+        postData = {
+          id: this.$route.params.id,
           consignee: this.form.consignee,
           mobile: this.form.mobile,
           province: this.form.areaSelected[0] ? this.form.areaSelected[0] : '',
@@ -108,49 +122,35 @@
           address: this.form.address,
           isDefault: this.form.isDefault,
         }
-        if (this.$route.name === 'config_receive-address-edit'){
-          path = 'config/receive-address-edit'
-          postData = {
-            id: this.$route.params.id,
-            consignee: this.form.consignee,
-            mobile: this.form.mobile,
-            province: this.form.areaSelected[0] ? this.form.areaSelected[0] : '',
-            // city: this.form.areaSelected[1] ? this.form.areaSelected[1] : '',
-            // county: this.form.areaSelected[2] ? this.form.areaSelected[2] : '',
-            lgaName: this.form.lgaName,
-            cityName: this.form.cityName,
-            address: this.form.address,
-            isDefault: this.form.isDefault,
-          }
-        }
-        return network.postData(path, postData).then(response => {
-          this.$message({
-            message: response,
-            type: 'success'
-          })
-          this.submitButtonStat = false
-          this.$router.go(-1)
-        }).catch(() => {
-          this.submitButtonStat = false
-        })
-      },
-      getData() {
-        network.getData(`config/receive-address-one/${this.$route.params.id}`).then(response=>{
-          console.log(response)
-          this.form.consignee = response.CONSIGNEE
-          this.form.mobile = response.MOBILE
-          this.form.areaSelected[0] = response.PROVINCE
-          // this.form.areaSelected[1] = response.CITY
-          // this.form.areaSelected[2] = response.COUNTY
-          this.form.lgaName = response.LGA_NAME
-          this.form.cityName = response.CITY_NAME
-          this.form.address = response.ADDRESS
-          this.form.isDefault = response.IS_DEFAULT === '1' ? true : false
-          this.loading = false
+      }
+      return network.postData(path, postData).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
         })
-      },
-    }
+        this.submitButtonStat = false
+        this.$router.go(-1)
+      }).catch(() => {
+        this.submitButtonStat = false
+      })
+    },
+    getData () {
+      network.getData(`config/receive-address-one/${this.$route.params.id}`).then(response => {
+        console.log(response)
+        this.form.consignee = response.CONSIGNEE
+        this.form.mobile = response.MOBILE
+        this.form.areaSelected[0] = response.PROVINCE
+        // this.form.areaSelected[1] = response.CITY
+        // this.form.areaSelected[2] = response.COUNTY
+        this.form.lgaName = response.LGA_NAME
+        this.form.cityName = response.CITY_NAME
+        this.form.address = response.ADDRESS
+        this.form.isDefault = response.IS_DEFAULT === '1' ? true : false
+        this.loading = false
+      })
+    },
   }
+}
 </script>
 
 <style scoped>

+ 193 - 205
frontendEle/src/views/finance/recharge.vue

@@ -1,215 +1,203 @@
 <template>
+  <div v-loading="loading">
+    <div class="white-box">
+      <el-table class="withdraw-table" :data="tableData" stripe style="width: 100%;">
+        <el-table-column label="Created Time">
+          <template slot-scope="scope">
+            {{tool.formatDate(scope.row.CREATED_AT)}}
+          </template>
+        </el-table-column>
+
+        <el-table-column label="Recharge Amount" prop="AMOUNT">
+        </el-table-column>
+
+        <el-table-column label="Recharge Status">
+          <template slot-scope="scope">
+          <el-tag :type="tool.statusType(scope.row.AUDIT_STATUS)">{{scope.row.STATUS_NAME}}</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column label="Bank name" prop="OPEN_BANK_NAME">
+        </el-table-column>
+
+        <el-table-column label="Bank account" prop="BANK_NO">
+        </el-table-column>
+
+        <el-table-column label="Print voucher" width="200">
+          <template slot-scope="scope">
+            <el-button type="primary" size="small" @click="handleAddInvoiceShow(scope.row)"
+                       v-if="scope.row.AUDIT_STATUS==='0'" icon="el-icon-upload">Upload voucher
+            </el-button>
+
+            <el-button type="success" size="small" @click="handleInvoiceShow(scope.row)"
+                       v-if="scope.row.AUDIT_STATUS!=='0'" icon="el-icon-view">View voucher
+            </el-button>
+          </template>
+        </el-table-column>
+
+      </el-table>
+      <div class="white-box-footer">
+        <el-button type="primary" size="small" @click="handleAdd">Recharge</el-button><!-- 充值 -->
+        <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
+      </div>
+      <el-dialog title="Upload voucher" :visible.sync="dialogAddInvoiceVisible"><!-- 上传凭证 -->
+        <div v-loading="dialogAddInvoiceLoading">
+          <el-alert type="warning" :closable="false">
+            <slot name="title">
+              <pre v-html="message"></pre>
+            </slot>
+          </el-alert>
+
+          <leo-uploader :requestRoute="'finance/prove-add?id='+auditId" :defaultImageUrl="defaultImageUrl" width="160px" height="160px"
+                        :uploaderSuccessCanChange="false" @on-success="handleSuccess"></leo-uploader>
+        </div>
+      </el-dialog>
 
-        <div v-loading="loading">
-            <div class="white-box">
-                <el-table class="withdraw-table" :data="tableData" stripe style="width: 100%;">
-
-                    <el-table-column label="Created Time">
-                        <template slot-scope="scope">
-                            {{tool.formatDate(scope.row.CREATED_AT)}}
-                        </template>
-                    </el-table-column>
-
-                    <el-table-column label="Recharge Amount" prop="AMOUNT">
-
-                    </el-table-column>
-
-                    <el-table-column label="Recharge Status">
-                        <template slot-scope="scope">
-                        <el-tag :type="tool.statusType(scope.row.AUDIT_STATUS)">{{scope.row.STATUS_NAME}}</el-tag>
-                        </template>
-                    </el-table-column>
-                    <el-table-column label="Bank name" prop="OPEN_BANK_NAME">
-
-                    </el-table-column>
-
-                    <el-table-column label="Bank account" prop="BANK_NO">
-
-                    </el-table-column>
-
-                    <el-table-column label="Print voucher" width="200">
-                        <template slot-scope="scope">
-                            <el-button type="primary" size="small" @click="handleAddInvoiceShow(scope.row)"
-                                       v-if="scope.row.AUDIT_STATUS==='0'" icon="el-icon-upload">Upload voucher
-                            </el-button>
-
-                            <el-button type="success" size="small" @click="handleInvoiceShow(scope.row)"
-                                       v-if="scope.row.AUDIT_STATUS!=='0'" icon="el-icon-view">View voucher
-                            </el-button>
-                        </template>
-                    </el-table-column>
-
-                </el-table>
-                <div class="white-box-footer">
-                    <el-button type="primary" size="small" @click="handleAdd">Recharge</el-button><!-- 充值 -->
-                    <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
-                </div>
-                <el-dialog title="Upload voucher" :visible.sync="dialogAddInvoiceVisible"><!-- 上传凭证 -->
-                    <div v-loading="dialogAddInvoiceLoading">
-                        <el-alert type="warning" :closable="false">
-                            <slot name="title">
-                                <pre v-html="message"></pre>
-                            </slot>
-                        </el-alert>
-
-                        <leo-uploader :requestRoute="'finance/prove-add?id='+auditId" :defaultImageUrl="defaultImageUrl" width="480px" height="320px"
-                                      :uploaderSuccessCanChange="false" @on-success="handleSuccess"></leo-uploader>
-                    </div>
-                </el-dialog>
-
-                <el-dialog title="View voucher" :visible.sync="dialogInvoiceVisible"><!-- 查看充值凭证 -->
-                    <div v-loading="dialogInvoiceLoading">
-                        <a :href="invoiceUrl" target="_blank"><img :src="urlimg" alt="" style="max-width: 100%"></a>
-                    </div>
-                    <div slot="footer" class="dialog-footer">
-                        <el-button @click="dialogInvoiceVisible = false">Confirm</el-button><!-- 确定 -->
-                    </div>
-                </el-dialog>
-            </div>
+      <el-dialog title="View voucher" :visible.sync="dialogInvoiceVisible"><!-- 查看充值凭证 -->
+        <div v-loading="dialogInvoiceLoading" style="">
+          <a :href="urlimg" target="_blank"><img :src="urlimg" alt="" style="min-height: 200px;max-height: 200px;min-width: 200px; max-width: 200px"></a>
+        </div>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="uploadAgain">Upload Again</el-button><!-- 确定 -->
+          <el-button @click="dialogInvoiceVisible = false">Confirm</el-button><!-- 确定 -->
         </div>
+      </el-dialog>
+    </div>
+  </div>
 </template>
 
 <script>
-
-    import network from '@/utils/network'
-    import baseInfo from '@/utils/baseInfo'
-    import store from '@/utils/vuexStore'
-    import tool from '@/utils/tool'
-    import LeoFilter from '@/components/Filter'
-    import LeoUploader from '@/components/Uploader'
-    import Pagination from '@/components/Pagination'
-    export default {
-        name: "recharge",
-        components: {LeoFilter, LeoUploader,Pagination},
-        mounted() {
-            this.getData();
-        },
-
-        data() {
-            return {
-                loading: false,
-                form:{
-
-                },
-                tableData:null,
-                list: null,
-                currentPage: 1,
-                totalPages: 1,
-                totalCount: 1,
-                pageSize: 20,
-                tool: tool,
-                dialogAddInvoiceVisible: false,
-                dialogAddInvoiceLoading: false,
-                dialogInvoiceVisible: false,
-                dialogInvoiceLoading: false,
-                defaultImageUrl: null,
-                addInvoiceTips: '',
-                requestRoute: '',
-                uploadId: null,
-                invoiceUrl:[],
-                auditId: null,
-                message:'',
-                submitButtonStat: false,
-                id:'',
-                dialogImageUrl: '',
-                dialogVisible: false,
-                disabled: false,
-                file:null,
-                urlimg:'',
-                postid:''
-            }
-        },
-        methods:{
-            handleCurrentChange (page) {
-                this.getData(page, this.pageSize)
-            },
-            handleSizeChange (pageSize) {
-                this.getData(this.currentPage, pageSize)
-            },
-            getData (page, pageSize) {
-                network.getPageData(this, '/finance/recharge', page, pageSize, {type: this.type}, function (response) {
-                    this.loading = false;
-                    this.list = response.list;
-                    let settingObj=this.list;
-                    let settingArr = Object.keys(settingObj).map(key => {
-                        //console.log(key); //为每个键名
-                        return settingObj[key];  //把每个对象返回出去生成一个新的数组中相当于0:{id:1}
-                    } );
-                    this.tableData=settingArr;
-
-                    console.log(this.tableData)
-
-                });
-            },
-            handleAdd() {
-                this.$router.push({path: `/finance/recharge-add`})
-            },
-            handlePictureCardPreview(file) {
-                this.dialogImageUrl = file.url;
-                this.dialogVisible = true;
-                this.file=file;
-                // console.log(file);
-
-            },
-            getFile(){
-                let data={
-                    uploadToken:this.uploadToken,
-                    file:this.file,
-                    id:this.auditId
-
-                }
-                console.log(data)
-                if(this.uploadToken){
-                    network.postData('finance/prove-add',data)
-                        .then(response=>{
-                            console.log(response);
-                        })
-                }
-            },
-            handleAddInvoiceShow(row) {
-
-                this.dialogAddInvoiceLoading = true
-                this.auditId = row.ID
-                console.log(this.auditId)
-                //this.requestRoute = 'finance/prove-add/' + this.auditId
-                this.dialogAddInvoiceVisible = true
-                this.loading = false;
-                let vueObj = this
-                network.getData('finance/prove-add',{id: this.auditId}).then(response => {
-                    console.log(response)
-                    vueObj.dialogAddInvoiceLoading = false
-                    //vueObj.invoiceUrl = response
-                    vueObj.uploadToken=response;
-                })
-
-
-            },
-            handleSuccess(response, file) {
-                this.getData()
-                this.$message({
-                    message: 'Successful!',
-                    type: 'success'
-                })
-                //this.form.image = imageUrl;
-            },
-            handleInvoiceShow(row) {
-                this.dialogInvoiceLoading = true
-                this.uploadId = row.ID
-                this.dialogInvoiceVisible = true
-
-                network.getData('finance/recharge', {id: this.uploadId}).then(response => {
-                    console.log(response)
-                    this.dialogInvoiceLoading = false
-                    let invoiceUrl = response.list;
-                    console.log(row)
-                    this.urlimg=row.BANK_PROVE
-
-
-                })
-            },
-
-        }
+import network from '@/utils/network'
+import baseInfo from '@/utils/baseInfo'
+import store from '@/utils/vuexStore'
+import tool from '@/utils/tool'
+import LeoFilter from '@/components/Filter'
+import LeoUploader from '@/components/Uploader'
+import Pagination from '@/components/Pagination'
+export default {
+  name: 'recharge',
+  components: {LeoFilter, LeoUploader,Pagination},
+  mounted () {
+    this.getData();
+  },
+
+  data () {
+    return {
+      loading: false,
+      form: {
+      },
+      tableData: null,
+      list: null,
+      currentPage: 1,
+      totalPages: 1,
+      totalCount: 1,
+      pageSize: 20,
+      tool: tool,
+      dialogAddInvoiceVisible: false,
+      dialogAddInvoiceLoading: false,
+      dialogInvoiceVisible: false,
+      dialogInvoiceLoading: false,
+      defaultImageUrl: null,
+      addInvoiceTips: '',
+      requestRoute: '',
+      uploadId: null,
+      invoiceUrl: [],
+      auditId: null,
+      message: '',
+      submitButtonStat: false,
+      id: '',
+      dialogImageUrl: '',
+      dialogVisible: false,
+      disabled: false,
+      file: null,
+      urlimg: '',
+      postid: ''
     }
+  },
+  methods: {
+    handleCurrentChange (page) {
+      this.getData(page, this.pageSize)
+    },
+    handleSizeChange (pageSize) {
+      this.getData(this.currentPage, pageSize)
+    },
+    getData (page, pageSize) {
+      network.getPageData(this, '/finance/recharge', page, pageSize, {type: this.type}, function (response) {
+        this.loading = false;
+        this.list = response.list;
+        let settingObj = this.list;
+        let settingArr = Object.keys(settingObj).map(key => {
+          // console.log(key); // 为每个键名
+          return settingObj[key]; // 把每个对象返回出去生成一个新的数组中相当于0:{id:1}
+        } );
+        this.tableData = settingArr;
+        console.log(this.tableData)
+      });
+    },
+    uploadAgain () {
+      this.dialogInvoiceVisible = false
+      this.dialogAddInvoiceVisible = true
+    },
+    handleAdd () {
+      this.$router.push({path: `/finance/recharge-add`})
+    },
+    handlePictureCardPreview (file) {
+      this.dialogImageUrl = file.url;
+      this.dialogVisible = true;
+      this.file = file;
+      // console.log(file);
+    },
+    getFile () {
+      let data = {
+        uploadToken: this.uploadToken,
+        file: this.file,
+        id: this.auditId
+      }
+      // console.log(data)
+      if (this.uploadToken) {
+        network.postData('finance/prove-add', data)
+          .then(response => {
+            console.log(response);
+          })
+      }
+    },
+    handleAddInvoiceShow: function (row) {
+      this.dialogAddInvoiceLoading = true
+      this.auditId = row.ID
+      // console.log(this.auditId)
+      // this.requestRoute = 'finance/prove-add/' + this.auditId
+      this.dialogAddInvoiceVisible = true
+      this.loading = false;
+      let vueObj = this
+      network.getData('finance/prove-add', {id: this.auditId}).then(response => {
+        // console.log(response)
+        vueObj.dialogAddInvoiceLoading = false
+        // vueObj.invoiceUrl = response
+        vueObj.uploadToken = response;
+      })
+    },
+    handleSuccess (response, file) {
+      this.getData()
+      this.$message({
+        message: 'Successful!',
+        type: 'success'
+      })
+      // this.form.image = imageUrl;
+    },
+    handleInvoiceShow (row) {
+      this.dialogInvoiceLoading = true
+      this.uploadId = row.ID
+      this.dialogInvoiceVisible = true
+
+      network.getData('finance/recharge', {id: this.uploadId}).then(response => {
+        // console.log(response)
+        this.dialogInvoiceLoading = false
+        let invoiceUrl = response.list;
+        // console.log(row)
+        this.urlimg = row.BANK_PROVE
+      })
+    },
+  }
+}
 </script>
 
 <style scoped>

+ 176 - 178
frontendEle/src/views/shop/order.vue

@@ -1,193 +1,191 @@
 <template>
   <div>
-      <div v-loading="loading">
-          <div class="white-box">
-              <div class="table">
-                  <el-table
-                    :data="goods"
-                    style="width: 100%"
-                    show-summary
-                    :summary-method="getSummaries">
-                     <el-table-column label="Product Name" prop="GOODS_NAME"><!--商品名称-->
-                    </el-table-column>
+    <div v-loading="loading">
+      <div class="white-box">
+        <div class="table">
+          <el-table
+            :data="goods"
+            style="width: 100%"
+            show-summary
+            :summary-method="getSummaries">
+             <el-table-column label="Product Name" prop="GOODS_NAME"><!--商品名称-->
+            </el-table-column>
 
-                    <el-table-column label="Product picture" ><!--图片-->
-                        <template slot-scope="scope">
-                            <img :src="scope.row.COVER" alt="" style="width:100%">
-                        </template>
-                    </el-table-column>
+            <el-table-column label="Product picture" ><!--图片-->
+              <template slot-scope="scope">
+                <img :src="scope.row.COVER" alt="" style="width:100%">
+              </template>
+            </el-table-column>
 
-                    <el-table-column label="Product price" prop="member_price"><!--商品价格-->
-                        <template slot-scope="scope">
-                            <span>{{ Math.round(scope.row.member_price * 100) / 100 }}</span>
-                        </template>
-                    </el-table-column>
-                    <el-table-column label="Member BV" prop="member_pv" v-if="category_type === 1"><!--会员PV-->
-                        <template slot-scope="scope">
-                            <span>{{ Math.round(scope.row.member_pv * 100) / 100 }}</span>
-                        </template>
-                    </el-table-column>
-                    <el-table-column label="Tax rate" prop="TAX_RATE"><!--税率-->
-                        <template slot-scope="scope">
-                            <span>{{ Math.round(scope.row.TAX_RATE * 100) / 100 }}</span>
-                        </template>
-                    </el-table-column>
+            <el-table-column label="Product price" prop="member_price"><!--商品价格-->
+              <template slot-scope="scope">
+                <span>{{ Math.round(scope.row.member_price * 100) / 100 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="Member BV" prop="member_pv" v-if="category_type === 1"><!--会员PV-->
+              <template slot-scope="scope">
+                <span>{{ Math.round(scope.row.member_pv * 100) / 100 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="Tax rate" prop="TAX_RATE"><!--税率-->
+              <template slot-scope="scope">
+                <span>{{ Math.round(scope.row.TAX_RATE * 100) / 100 }}</span>
+              </template>
+            </el-table-column>
 
-                    <el-table-column label="Tax" prop="tax_amount_plus"><!--税额-->
-                      <template slot-scope="scope">
-                        <span>{{ Math.round(scope.row.tax_amount_plus * 100) / 100 }}</span>
-                      </template>
-                    </el-table-column>
+            <el-table-column label="Tax" prop="tax_amount_plus"><!--税额-->
+              <template slot-scope="scope">
+                <span>{{ Math.round(scope.row.tax_amount_plus * 100) / 100 }}</span>
+              </template>
+            </el-table-column>
 <!--                    <el-table-column label="库存" prop="STORE_NUMS">-->
 <!--                    </el-table-column>-->
 
-                    <el-table-column label="Quantity" prop="chose_num"><!--数量-->
+            <el-table-column label="Quantity" prop="chose_num"><!--数量-->
 
-                    </el-table-column>
-                    <el-table-column label="Total Amount" prop="member_price_plus"><!--合计金额-->
-                        <template slot-scope="scope">
-                            <span>{{ Math.round(scope.row.member_price_plus * 100) / 100 }}</span>
-                        </template>
-                    </el-table-column>
-                    <el-table-column label="Total BV" prop="member_pv_plus" v-if="category_type === 1"><!--合计PV-->
-                        <template slot-scope="scope">
-                            <span>{{ Math.round(scope.row.member_pv_plus * 100) / 100 }}</span>
-                        </template>
-                    </el-table-column>
-                  </el-table>
-              </div>
-              <div class="address_box">
-                Please select the shipping address:	<!--  请选择收货地址 -->
-                <el-radio-group v-model="addressId" @change='choseAddress'>
-                    <div v-for="(item , index) in all_address" :key='index' class="address">
-                        <el-radio :label="item.ID" >
-                          Full address:{{item.ADDRESS}}, {{item.CITY_NAME}}, {{item.LGA_NAME}}, {{item.PROVINCE_NAME}}  &nbsp;&nbsp;&nbsp;&nbsp;
-                          <!-- 详细地址 -->  &nbsp;&nbsp;
-                          <!-- 收件人姓名 -->  Recipient name:{{item.CONSIGNEE}}&nbsp;&nbsp;&nbsp;&nbsp;
-                           <!-- 手机号码 --> Phone number:{{item.MOBILE}}
-                        </el-radio>
-                    </div>
-                    <div class="address">
-                      <el-radio label="100000000000000000">Self Pick-up</el-radio><!--自提-->
-                    </div>
-                </el-radio-group>
-              </div>
-              <div class="address_box">
-                Please select payment method:<!-- 请选择支付方式 -->
-                <el-radio-group v-model="payType" @change='chosePayType'>
-                    <div v-for="(item, index) in payList" :key='index' class="address">
-                        <el-radio :label="item.label">{{ item.name }}</el-radio>
-                    </div>
-                </el-radio-group>
-              </div>
-
-              <div class="box address_box">
-                Total orders:<!-- 订单合计 -->
-                  <div class="sum">
-                    <div class="sum_box" v-if="category_type === 1">
-                        <div>Freight</div><!-- 运费 -->
-                        <div>
-                            <span v-if="category_type === 1">{{ prefixSign }}</span>
-                              {{ pointFreight }}
-                            <span v-if="category_type === 1">{{ unit }}</span>
-                        </div>
-                    </div>
-                    <div class="sum_box">
-                        <div>Amount paid</div><!-- 实付金额 -->
-                        <div>
-                            <span v-if="category_type === 1">{{ prefixSign }}</span>
-                              {{ payType === "cash" ? cashSum : pointsSum }}
-                            <span v-if="category_type === 1">{{ unit }}</span>
-                        </div>
-                    </div>
-                  </div>
+            </el-table-column>
+            <el-table-column label="Total Amount" prop="member_price_plus"><!--合计金额-->
+              <template slot-scope="scope">
+                <span>{{ Math.round(scope.row.member_price_plus * 100) / 100 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="Total BV" prop="member_pv_plus" v-if="category_type === 1"><!--合计PV-->
+              <template slot-scope="scope">
+                <span>{{ Math.round(scope.row.member_pv_plus * 100) / 100 }}</span>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="address_box">
+          Please select the shipping address:	<!--  请选择收货地址 -->
+          <el-radio-group v-model="addressId" @change='choseAddress'>
+            <div v-for="(item , index) in all_address" :key='index' class="address">
+              <el-radio :label="item.ID" >
+                Full address:{{item.ADDRESS}}, {{item.CITY_NAME}}, {{item.LGA_NAME}}, {{item.PROVINCE_NAME}}  &nbsp;&nbsp;&nbsp;&nbsp;
+                <!-- 详细地址 -->  &nbsp;&nbsp;
+                <!-- 收件人姓名 -->  Recipient name:{{item.CONSIGNEE}}&nbsp;&nbsp;&nbsp;&nbsp;
+                <!-- 手机号码 --> Phone number:{{item.MOBILE}}
+              </el-radio>
+            </div>
+            <div class="address">
+              <el-radio label="100000000000000000">Self Pick-up</el-radio><!--自提-->
+            </div>
+          </el-radio-group>
+          </div>
+          <div class="address_box">
+            Please select payment method:<!-- 请选择支付方式 -->
+            <el-radio-group v-model="payType" @change='chosePayType'>
+              <div v-for="(item, index) in payList" :key='index' class="address">
+                <el-radio :label="item.label">{{ item.name }}</el-radio>
               </div>
+            </el-radio-group>
+          </div>
 
-              <div class="box address_box">
-                Account Balance:	<!-- 账户余额 -->
-                <div class="sum">
-                    <div v-if="category_type === 1">
-<!--                        <div class="sum_box">-->
-<!--                            <div>账户积分</div>-->
-<!--                            <div>{{ balance.points }}</div>-->
-<!--                        </div>-->
-                        <div class="sum_box">
-                            <div>Account Balance</div><!-- 账户余额 -->
-                            <div>₦ {{ balance.cash }} NGN</div>
-                        </div>
-<!--                        <div class="sum_box">-->
-<!--                            <div>Exchange points</div>&lt;!&ndash; 兑换点数 &ndash;&gt;-->
-<!--                            <div>{{ balance.exchange }}</div>-->
-<!--                        </div>-->
-                    </div>
-
-                    <div v-if="category_type === 4">
-                        <div class="sum_box">
-                            <div>Travel bonus</div><!-- 旅游积分 -->
-                            <div>{{ balance.tourism_points }}</div>
-                        </div>
-                    </div>
-
-                    <div v-if="category_type === 5">
-                        <div class="sum_box">
-                            <div>Car House bonus</div><!-- 名车积分 -->
-                            <div>{{ balance.garage_points }}</div>
-                        </div>
-                    </div>
+          <div class="box address_box">
+            Total orders:<!-- 订单合计 -->
+              <div class="sum">
+                <div class="sum_box" v-if="category_type === 1">
+                  <div>Freight</div><!-- 运费 -->
+                  <div>
+                    <span v-if="category_type === 1">{{ prefixSign }}</span>
+                      {{ pointFreight }}
+                    <span v-if="category_type === 1">{{ unit }}</span>
                   </div>
                 </div>
-
-                <div>
-                    <el-button type="danger" @click="cancelOrder()">Go Back</el-button>
-                    <el-button type="primary" @click="goToAccounts()" :loading="submitButtonStat">Pay</el-button><!--去结算-->
+                <div class="sum_box">
+                  <div>Amount paid</div><!-- 实付金额 -->
+                  <div>
+                    <span v-if="category_type === 1">{{ prefixSign }}</span>
+                      {{ payType === "cash" ? cashSum : pointsSum }}
+                    <span v-if="category_type === 1">{{ unit }}</span>
+                  </div>
                 </div>
               </div>
           </div>
 
-        <el-dialog title="Pay" v-if="visible" :visible.sync="visible" width="30%" v-loading="payStackLoading" :before-close="handleClose">
-            <section>
-<!--                <h1>Lorem Ipsum Dolor Sit Amet</h1>-->
-                <div class="formcontainer">
-                    <el-divider></el-divider>
-                    <div class="container">
-                        <el-form :model="form">
-                            <el-form-item label="Email" label-width="100px" required>
-                                <el-input v-model="form.email" autocomplete="off"></el-input>
-                            </el-form-item>
-                            <el-form-item label="Amount" label-width="100px" required>
-                                <el-input v-model="form.amount" autocomplete="off" readonly></el-input>
-                            </el-form-item>
-                        </el-form>
-                    </div>
-                </div>
-            </section>
+          <div class="box address_box">
+            Account Balance:	<!-- 账户余额 -->
+            <div class="sum">
+              <div v-if="category_type === 1">
+  <!--              <div class="sum_box">-->
+  <!--                  <div>账户积分</div>-->
+  <!--                  <div>{{ balance.points }}</div>-->
+  <!--              </div>-->
+              <div class="sum_box">
+                <div>Account Balance</div><!-- 账户余额 -->
+                <div>₦ {{ balance.cash }} NGN</div>
+              </div>
+  <!--            <div class="sum_box">-->
+  <!--              <div>Exchange points</div>&lt;!&ndash; 兑换点数 &ndash;&gt;-->
+  <!--              <div>{{ balance.exchange }}</div>-->
+  <!--            </div>-->
+            </div>
 
-            <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"
-                :callback="processPayment"
-                :close="processClose"
-            >
-                <el-button type="primary" size="small">Pay</el-button>
+            <div v-if="category_type === 4">
+              <div class="sum_box">
+                <div>Travel bonus</div><!-- 旅游积分 -->
+                <div>{{ balance.tourism_points }}</div>
+              </div>
+            </div>
 
-            </paystack>
-            <el-button type="danger" size="small" class="cancelButton" @click="handleClose">Cancel</el-button>
-        </el-dialog>
+            <div v-if="category_type === 5">
+              <div class="sum_box">
+                <div>Car House bonus</div><!-- 名车积分 -->
+                <div>{{ balance.garage_points }}</div>
+              </div>
+            </div>
+          </div>
+        </div>
 
-        <el-dialog title="Tips" :visible.sync="payDialog" :show-close="false" width="350px" :close="handleOrderList">
-          <el-result icon="success" title="the order is successful">
-            <template slot="extra">
-              <span style="color: #008efa; font-size: 30px;">{{ countdown }}</span>
-            </template>
-          </el-result>
-        </el-dialog>
+        <div>
+          <el-button type="danger" @click="cancelOrder()">Go Back</el-button>
+          <el-button type="primary" @click="goToAccounts()" :loading="submitButtonStat">Pay</el-button><!--去结算-->
+        </div>
+      </div>
     </div>
+
+    <el-dialog title="Pay" v-if="visible" :visible.sync="visible" width="30%" v-loading="payStackLoading" :before-close="handleClose">
+      <section>
+  <!--      <h1>Lorem Ipsum Dolor Sit Amet</h1>-->
+        <div class="formcontainer">
+          <el-divider></el-divider>
+          <div class="container">
+            <el-form :model="form">
+              <el-form-item label="Email" label-width="100px" required>
+                <el-input v-model="form.email" autocomplete="off"></el-input>
+              </el-form-item>
+              <el-form-item label="Amount" label-width="100px" required>
+                <el-input v-model="form.amount" autocomplete="off" readonly></el-input>
+              </el-form-item>
+            </el-form>
+          </div>
+        </div>
+      </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"
+          :callback="processPayment"
+          :close="processClose"
+      >
+        <el-button type="primary" size="small">Pay</el-button>
+      </paystack>
+      <el-button type="danger" size="small" class="cancelButton" @click="handleClose">Cancel</el-button>
+    </el-dialog>
+
+    <el-dialog title="Tips" :visible.sync="payDialog" :show-close="false" width="350px" :close="handleOrderList">
+      <el-result icon="success" title="the order is successful">
+        <template slot="extra">
+          <span style="color: #008efa; font-size: 30px;">{{ countdown }}</span>
+        </template>
+      </el-result>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
@@ -199,7 +197,7 @@ import paystack from 'vue-paystack'
 
 export default{
   name: 'order',
-  data (){
+  data: function () {
     return {
       loading: true,
       goods: [],
@@ -254,11 +252,11 @@ export default{
     let option = sessionStorage.getItem('order_goods');
     this.category_type = parseInt(sessionStorage.getItem('category_type'))
     await this.getShowCart();
-    if (option){
+    if (option) {
       let pageGoodsList = JSON.parse(option);
       // console.log(pageGoodsList);
       let pageList;
-      for ( let i in pageGoodsList ) {
+      for (let i in pageGoodsList) {
         pageList = pageGoodsList[i];
         if (!pageList) continue;
 
@@ -289,12 +287,12 @@ export default{
     }
   },
   methods:{
-    cancelOrder(){
+    cancelOrder () {
       history.go(-1)
     },
     setFreight () {
       // 如果地址为自提,则运费为0
-      if (this.addressId == '100000000000000000') {
+      if (this.addressId === '100000000000000000') {
         this.pointFreight = Number(0)
       } else {
         this.pointFreight = Number(this.freight)
@@ -360,12 +358,12 @@ export default{
 
       this.submitButtonStat = true
       // let path = 'sure-order'
-      this.$prompt('Please enter your payment password', 'Hint', {//'请输入支付密码', '提示'
-        confirmButtonText: 'Confirm',//确定
-        cancelButtonText: 'Cancel',//取消
+      this.$prompt('Please enter your payment password', 'Hint', { // '请输入支付密码', '提示'
+        confirmButtonText: 'Confirm', // 确定
+        cancelButtonText: 'Cancel', // 取消
         inputType: 'password',
         inputPattern: /\S+/,
-        inputErrorMessage: 'Please enter your payment password'//请输入支付密码
+        inputErrorMessage: 'Please enter your payment password' // 请输入支付密码
       }).then(({value}) => {
         this.payPassword = value
         let params = {