淘宝退款‘

This commit is contained in:
wanyongkang
2020-10-16 14:31:19 +08:00
parent dfbfe1c60a
commit d87a76dbaa
5 changed files with 379 additions and 35 deletions

View File

@@ -1,11 +1,20 @@
<template>
<div style="height:95%">
<el-table :row-class-name="tableRowClassName" :show-overflow-tooltip="true" :data="tableData" height="calc(100% - 100px)" style="width: 100%">
<el-input
placeholder="请输入内容"
style="width:18%;"
size='small'
v-model="search_info">
<i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
<el-button size='small' @click="search()" type="primary" icon="el-icon-search">搜索</el-button>
<el-table :row-class-name="tableRowClassName" :show-overflow-tooltip="true" :data="tableData" height="calc(100% - 120px)" style="width: 100%">
<el-table-column prop="username" label="用户" width="180"> </el-table-column>
<el-table-column prop="money" label="提现金额" width="180"> </el-table-column>
<el-table-column prop="apply_reason" label="提现理由"> </el-table-column>
<el-table-column prop="alipay_account" label="支付宝账号"> </el-table-column>
<el-table-column prop="casn_no" label="账单号"> </el-table-column>
<el-table-column prop="alipay_no" label="支付宝转帐订单号"> </el-table-column>
<el-table-column prop="remark" label="备注"> </el-table-column>
<el-table-column prop="status" label="状态"> </el-table-column>
<el-table-column prop="op_user" label="处理人"> </el-table-column>
@@ -22,8 +31,9 @@
</el-table>
<el-pagination
background
v-if="count !== 0"
:current-page="pageNum"
style="top:90%"
style="top:91%"
layout="prev, pager, next"
:page-size = "50"
@prev-click="prev_page"
@@ -76,7 +86,8 @@ export default {
pageNum: 1,
dialogFormVisible: false,
form: {},
formLabelWidth: '120px'
formLabelWidth: '120px',
search_info: ''
}
},
@@ -98,36 +109,56 @@ export default {
return ''
},
getData () {
this.$api.get('http://autophp.wyk/order/admin/getData').then(res => {
this.$api.get('http://autophp.wyk/order/CashOutAdmin/getData').then(res => {
this.tableData = res.data
this.count = parseInt(res.count)
})
},
prev_page () {
this.$api.get('http://autophp.wyk/order/admin/pageList', {page: this.pageNum}).then(res => {
this.$api.get('http://autophp.wyk/order/CashOutAdmin/pageList', {page: this.pageNum}).then(res => {
this.tableData = res.data
})
},
next_page () {
this.$api.get('http://autophp.wyk/order/admin/pageList', {page: this.pageNum}).then(res => {
this.$api.get('http://autophp.wyk/order/CashOutAdmin/pageList', {page: this.pageNum}).then(res => {
this.tableData = res.data
})
},
handleCurrentChange: function (currentPage) {
this.pageNum = currentPage
this.$api.get('http://autophp.wyk/order/admin/pageList', {page: this.pageNum}).then(res => {
this.$api.get('http://autophp.wyk/order/CashOutAdmin/pageList', {page: this.pageNum}).then(res => {
this.tableData = res.data
})
},
filterTag (value, row) {
return row.user === value
},
submit (info) {
if (info.remark == null) {
this.$message.error('请填写备注')
return false
}
this.$api.post('http://autophp.wyk/order/admin/handle', {info}).then(res => {})
this.$api.post('http://autophp.wyk/order/CashOutAdmin/handle', {info}).then(res => {
this.dialogFormVisible = false
this.form.status = this.dealStatus(this.form.status)
})
},
search () {
this.$api.post('http://autophp.wyk/order/CashOutAdmin/search', {username: this.search_info}).then(res => {
this.tableData = res.data
this.count = parseInt(res.count)
})
},
dealStatus (info) {
switch (info) {
case '0':
info = '待处理'
break
case '1':
info = '同意'
break
case '2':
info = '拒绝'
break
}
return info
}
}
}

View File

@@ -0,0 +1,176 @@
<template>
<div style="height:95%">
<el-input
placeholder="请输入内容"
style="width:18%;"
size='small'
v-model="search_info">
<i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
<el-button size='small' @click="search()" type="primary" icon="el-icon-search">搜索</el-button>
<el-table :row-class-name="tableRowClassName" :show-overflow-tooltip="true" :data="tableData" height="calc(100% - 120px)" style="width: 100%">
<el-table-column prop="username" label="用户" width="180"> </el-table-column>
<el-table-column prop="money" label="提现金额" width="180"> </el-table-column>
<el-table-column prop="apply_reason" label="提现理由"> </el-table-column>
<el-table-column prop="alipay_account" label="支付宝账号"> </el-table-column>
<el-table-column prop="casn_no" label="账单号"> </el-table-column>
<el-table-column prop="alipay_no" label="支付宝转帐订单号"> </el-table-column>
<el-table-column prop="remark" label="备注"> </el-table-column>
<el-table-column prop="status" label="状态"> </el-table-column>
<el-table-column prop="op_user" label="处理人"> </el-table-column>
<el-table-column show-overflow-tooltip prop="create_time" label="提现时间"> </el-table-column>
<el-table-column show-overflow-tooltip prop="update_time" label="处理时间"> </el-table-column>
<el-table-column
fixed="right"
label="操作"
width="100">
<template slot-scope="scope">
<el-button @click="handleClick(scope.row)" type="text" size="small">处理</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
v-if="count !== 0"
:current-page="pageNum"
style="top:91%"
layout="prev, pager, next"
:page-size = "50"
@prev-click="prev_page"
@next-click="next_page"
@current-change="handleCurrentChange"
:total="count">
</el-pagination>
<el-dialog title="详细记录" :visible.sync="dialogFormVisible">
<el-form :model="form">
<el-form-item label="用户" :label-width="formLabelWidth">
<el-input disabled v-model="form.username" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="提现金额" :label-width="formLabelWidth">
<el-input disabled v-model="form.money" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="提现理由" :label-width="formLabelWidth">
<el-input disabled v-model="form.apply_reason" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="支付宝账号" :label-width="formLabelWidth">
<el-input disabled v-model="form.alipay_account" autocomplete="off"></el-input>
</el-form-item>
<el-form-item prop="remark" label="备注" :label-width="formLabelWidth" :rules="[
{ required: true, message: '备注不能为空'}
]">
<el-input v-model="form.remark" autocomplete="off"></el-input>
</el-form-item>
<el-form-item prop="status" label="处理结果" :label-width="formLabelWidth">
<el-select v-model="form.status" placeholder="请选择处理结果">
<el-option label="同意" value="1"></el-option>
<el-option label="拒绝" value="2"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="submit(form)"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data () {
return {
tableData: [],
count: 0,
pageNum: 1,
dialogFormVisible: false,
form: {},
formLabelWidth: '120px',
search_info: ''
}
},
created () {
this.$store.commit('setCurrentNav', '订单管理>>提现处理')
this.getData()
},
methods: {
handleClick (row) {
this.dialogFormVisible = true
this.form = row
},
tableRowClassName ({row, rowIndex}) {
if (row.status === '同意') {
return 'success-row'
} else if (row.status === '拒绝') {
return 'error-row'
}
return ''
},
getData () {
this.$api.get('http://autophp.wyk/order/CashOutAdmin/getData').then(res => {
this.tableData = res.data
this.count = parseInt(res.count)
})
},
prev_page () {
this.$api.get('http://autophp.wyk/order/CashOutAdmin/pageList', {page: this.pageNum}).then(res => {
this.tableData = res.data
})
},
next_page () {
this.$api.get('http://autophp.wyk/order/CashOutAdmin/pageList', {page: this.pageNum}).then(res => {
this.tableData = res.data
})
},
handleCurrentChange: function (currentPage) {
this.pageNum = currentPage
this.$api.get('http://autophp.wyk/order/CashOutAdmin/pageList', {page: this.pageNum}).then(res => {
this.tableData = res.data
})
},
submit (info) {
if (info.remark == null) {
this.$message.error('请填写备注')
return false
}
this.$api.post('http://autophp.wyk/order/CashOutAdmin/handle', {info}).then(res => {
this.dialogFormVisible = false
this.form.status = this.dealStatus(this.form.status)
})
},
search () {
this.$api.post('http://autophp.wyk/order/CashOutAdmin/search', {username: this.search_info}).then(res => {
this.tableData = res.data
this.count = parseInt(res.count)
})
},
dealStatus (info) {
switch (info) {
case '0':
info = '待处理'
break
case '1':
info = '同意'
break
case '2':
info = '拒绝'
break
}
return info
}
}
}
</script>
<style>
.el-table .success-row {
background: #d7f8c5;
}
.el-table .error-row {
background: #f1c6c6;
}
</style>

View File

@@ -0,0 +1,128 @@
<!--
* @Author: kangkang
* @Date: 2020-10-13 19:45:55
* @LastEditors: kangkang
* @LastEditTime: 2020-10-16 11:11:41
-->
<template>
<div style="height:95%">
<el-input
placeholder="请输入会员号"
style="width:18%;"
size='small'
v-model="search_info">
<i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
<el-button size='small' @click="search()" type="primary" icon="el-icon-search">搜索</el-button>
<el-table :row-class-name="tableRowClassName" :show-overflow-tooltip="true" :data="tableData" height="calc(100% - 120px)" style="width: 100%">
<el-table-column prop="BuyerNick" label="淘宝会员名" > </el-table-column>
<el-table-column prop="Phone" label="会员号" > </el-table-column>
<el-table-column prop="Tid" label="交易编号"> </el-table-column>
<el-table-column prop="Oid" label="子订单编号"> </el-table-column>
<el-table-column prop="SellerNick" label="商品"> </el-table-column>
<el-table-column prop="Modified" label="申请时间" width="150"> </el-table-column>
<el-table-column prop="handle_time" label="处理时间" width="150"> </el-table-column>
<el-table-column prop="handle_user" label="处理人"> </el-table-column>
<el-table-column prop="status" label="状态"> </el-table-column>
<el-table-column prop="account" label="用户现有余额"> </el-table-column>
<el-table-column prop="RefundFee" label="退款金额"> </el-table-column>
<el-table-column prop="f_balance" label="扣除前余额"> </el-table-column>
<el-table-column
fixed="right"
label="操作"
width="100">
<template slot-scope="scope">
<el-button v-show="!scope.row.f_balance" @click="handleClick(scope.row)" type="text" size="small">处理</el-button>
<el-button v-show="scope.row.f_balance" type="text" size="small">已处理</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
v-if="count !== 0"
:current-page="pageNum"
style="top:91%"
layout="prev, pager, next"
:page-size = "50"
@prev-click="prev_page"
@next-click="next_page"
@current-change="handleCurrentChange"
:total="count">
</el-pagination>
</div>
</template>
<script>
export default {
data () {
return {
tableData: [],
count: 0,
pageNum: 1,
search_info: '',
form: {}
}
},
created () {
this.$store.commit('setCurrentNav', '订单管理>>淘宝退款')
this.getData()
},
methods: {
handleClick (row) {
this.$api.get('http://autophp.wyk/order/TbRefund/getOneInfo', {id: row.Id}).then(res => {
this.form = res.data
})
this.$confirm('此操作只可进行一次, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$api.post('http://autophp.wyk/order/TbRefund/handle', {row}).then(res => {
if (res.balance) {
row.f_balance = res.balance
}
// alert()
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
},
getData () {
this.$api.get('http://autophp.wyk/order/TbRefund/refundList').then(res => {
this.tableData = res.data
this.count = parseInt(res.count)
})
},
prev_page () {
this.$api.get('http://autophp.wyk/order/TbRefund/pageList', {page: this.pageNum}).then(res => {
this.tableData = res.data
})
},
next_page () {
this.$api.get('http://autophp.wyk/order/TbRefund/pageList', {page: this.pageNum}).then(res => {
this.tableData = res.data
})
},
handleCurrentChange: function (currentPage) {
this.pageNum = currentPage
this.$api.get('http://autophp.wyk/order/TbRefund/pageList', {page: this.pageNum}).then(res => {
this.tableData = res.data
})
},
search () {
this.$api.post('http://autophp.wyk/order/TbRefund/search', {Phone: this.search_info}).then(res => {
this.tableData = res.data
this.count = parseInt(res.count)
})
},
submit (info) {
this.$api.post('http://autophp.wyk/order/TbRefund/handle', {info}).then(res => {})
this.dialogFormVisible = false
}
}
}
</script>