Kaynağa Gözat

增加列表

david 2 yıl önce
ebeveyn
işleme
d01817b3f6
4 değiştirilmiş dosya ile 92 ekleme ve 49 silme
  1. 28 1
      src/api/finance.js
  2. 1 0
      src/lang/en.js
  3. 1 0
      src/lang/zh.js
  4. 62 48
      src/views/finance/balance-audit-list.vue

+ 28 - 1
src/api/finance.js

@@ -53,7 +53,7 @@ export function changeBalance(query) {
   })
 }
 
-//full-info
+// 用户信息
 export function userFullInfo(query) {
   return request({
     url: '/v1/user/full-info',
@@ -62,6 +62,33 @@ export function userFullInfo(query) {
   })
 }
 
+// 审核拒绝
+export function balanceAudit(query) {
+  return request({
+    url: '/v1/finance/balance-audit',
+    method: 'post',
+    data: query
+  })
+}
+
+// 审核通过-查看详情
+export function balanceAuditGet(query) {
+  return request({
+    url: '/v1/finance/balance-audit-get',
+    method: 'get',
+    params: query
+  })
+}
+
+// 审核通过
+export function balanceAuditPass(query) {
+  return request({
+    url: '/v1/finance/balance-audit-pass',
+    method: 'post',
+    data: query
+  })
+}
+
 
 // 删除角色
 export function deleteRole(id) {

+ 1 - 0
src/lang/en.js

@@ -366,6 +366,7 @@ export default {
     manuallyAdd:'Manually add',
     adjustAmount:'Adjust amount',
     ecoinInsufficientNotice:'Ecoin of member is insufficient, whether to continue to submit.',
+    reviewRemberEcoinInfo:'Review member Ecoin change information',
   },
 
   // 管理员管理

+ 1 - 0
src/lang/zh.js

@@ -369,6 +369,7 @@ export default {
     manuallyAdd:'手动添加',
     adjustAmount:'调整金额',
     ecoinInsufficientNotice:'会员账户余额不足,是否继续提交',
+    reviewRemberEcoinInfo:'审核会员余额变动信息',
   },
 
   // 管理员管理

+ 62 - 48
src/views/finance/balance-audit-list.vue

@@ -106,7 +106,7 @@
             <el-button type="primary" @click.native="handleEdit">{{ $t('table.edit') }}<!-- 修 改 --></el-button>
           </div>
         </el-dialog>
-        <el-dialog title="Review member Ecoin change information" :visible.sync="dialogAuditFormVisible"><!-- 审核会员余额变动信息 -->
+        <el-dialog :title="$t('financial.reviewRemberEcoinInfo')" :visible.sync="dialogAuditFormVisible"><!-- 审核会员余额变动信息 -->
           <el-form :model="form" label-width="250px" class="form-dialog" v-loading="dialogAuditLoading">
             <el-form-item :label="$t('financial.memberCode')"><!-- 会员编号 -->
               <el-input v-model="form.baseInfo.USER_NAME" :disabled="true"></el-input>
@@ -156,7 +156,7 @@
     import permission from '@/utils/permission'
     import Pagination from '@/components/Pagination'
     import filterHelper from '@/utils/filterHelper'
-    import { getChangeBalanceType, balanceAuditList, balanceAuditListExport, balanceAuditDelete } from '@/api/finance'
+    import { getChangeBalanceType, balanceAuditList, balanceAuditListExport, balanceAuditDelete, multPoint, balanceAudit, balanceAuditGet, balanceAuditPass } from '@/api/finance'
   
     export default {
       name: 'leo-balance-audit-table',
@@ -258,21 +258,27 @@
           this.auditId = row.ID
           this.dialogAuditFormVisible = true
           let vueObj = this
-          network.getData('finance/balance-audit-get', {id: this.auditId}).then(response => {
+          balanceAuditGet({id: this.auditId}).then(response => {
             vueObj.dialogAuditLoading = false
-            //vueObj.form = response
-            vueObj.form.id = response.id
-            vueObj.form.baseInfo = response.baseInfo
-            vueObj.form.dealType = response.dealType
-            vueObj.form.amount = response.amount
-            vueObj.form.remark = response.remark
-            vueObj.form.auditStatus = response.auditStatus
-            vueObj.form.type = String(response.type)
+            vueObj.form.id = response.data.id
+            vueObj.form.baseInfo = response.data.baseInfo
+            vueObj.form.dealType = response.data.dealType
+            vueObj.form.amount = response.data.amount
+            vueObj.form.remark = response.data.remark
+            vueObj.form.auditStatus = response.data.auditStatus
+            vueObj.form.type = String(response.data.type)
             vueObj.form.createRemark = vueObj.form.remark
+          }).catch(err => {
+            vueObj.dialogAuditLoading = false
           })
-          network.postData('finance/mult-point', {opType: 1}).then(response => {
-              this.form.balanceCode = response.balanceCode
-              this.auditPassButtonStat = false
+          multPoint({opType: 1}).then(response => {
+            this.form.balanceCode = response.data.balanceCode
+            this.auditPassButtonStat = false
+          }).catch(err => {
+            this.$message({
+              message: err,
+              type: 'error'
+            })
           })
         },
         handleAuditPass() {
@@ -302,16 +308,20 @@
             type: 'info'
           })
           this.form.auditStatus = 'true'
-          let path = 'finance/balance-audit-pass'
-          network.postData(path, this.form).then(response => {
+          balanceAuditPass(this.form).then(response => {
             this.$message({
-              message: response,
+              message: response.data,
               type: 'success'
             })
             this.getData(this.currentPage, this.pageSize)
-          }).catch(response => {
+          }).catch(err => {
+            this.$message({
+              message: err,
+              type: 'error'
+            })
           })
         },
+        // 审核拒绝
         handleAudit(row = null, status, minus = false) {
           let obj = this  
           let title = this.$t('financial.handleAuditDefaultNotice')  //确定要通过审核(会员账户不允许为负数)?备注:
@@ -320,39 +330,43 @@
           }else if(minus){
             title = this.$t('financial.handleAuditPassNotice') //确定要通过审核(会员账户允许为负数)?备注
           }
-            network.postData('finance/mult-point', {opType: 1}).then(response => {
-                this.form.balanceCode = response.balanceCode
-                this.$prompt(title, this.$t('common.hint'), {//提示
-                  confirmButtonText: this.$t('common.confirm'),//确定
-                  cancelButtonText: this.$t('common.cancel'),//取消
-                  inputValue: row ? row.REMARK : '',
+          multPoint({opType: 1}).then(response => {
+            this.form.balanceCode = response.data.balanceCode
+            this.$prompt(title, this.$t('common.hint'), {//提示
+              confirmButtonText: this.$t('common.confirm'),//确定
+              cancelButtonText: this.$t('common.cancel'),//取消
+              inputValue: row ? row.REMARK : '',
                   //type: 'warning',
-                }).then(({value}) => {
-                  let selectedIds = []
-                  if (row === null) {
-                    for (let val of obj.multipleSelection) {
-                      selectedIds.push(val.ID)
-                    }
-                  } else {
-                    selectedIds.push(row.ID)
-                  }
-                  return network.postData(`finance/balance-audit`, {
-                    selected: selectedIds,
-                    remark: value,
-                    allowMinus: minus,
-                    auditStatus: status,
-                    balanceCode: this.form.balanceCode
-                  })
-                }).then(response => {
-                  this.$message({
-                    message: response,
-                    type: 'success'
-                  })
-                  this.getData(this.currentPage, this.pageSize)
-                }).catch(response => {
-  
+            }).then(({value}) => {
+              let selectedIds = []
+              if (row === null) {
+                for (let val of obj.multipleSelection) {
+                  selectedIds.push(val.ID)
+                }
+              } else {
+                selectedIds.push(row.ID)
+              }
+              let requestParams = {
+                selected: selectedIds,
+                remark: value,
+                allowMinus: minus,
+                auditStatus: status,
+                balanceCode: this.form.balanceCode
+              }
+              balanceAudit(requestParams).then(response => {
+                this.$message({
+                  message: response.data,
+                  type: 'success'
+                })
+                this.getData(this.currentPage, this.pageSize)
+              }).catch(err => {
+                this.$message({
+                  message: err,
+                  type: 'error'
                 })
+              })
             })
+          })
         },
         handleDel(id = null) {
           let obj = this