失败的订单
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
<!--
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kangkang
|
||||
* @Date: 2020-10-04 09:57:46
|
||||
* @LastEditors: kangkang
|
||||
* @LastEditTime: 2020-10-16 17:42:26
|
||||
-->
|
||||
<template>
|
||||
<div style="height:95%">
|
||||
<el-table :show-overflow-tooltip="true" :data="tableData" height="calc(100% - 100px)" style="width: 100%">
|
||||
|
||||
@@ -1,176 +1,216 @@
|
||||
<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>
|
||||
<div v-loading="loading">
|
||||
<div class="heior_box">
|
||||
<div class="search-box">
|
||||
<el-cascader
|
||||
placeholder="选择产品/套餐"
|
||||
size="small"
|
||||
v-model="searchModel.pModel"
|
||||
:options="options"
|
||||
:props="{ checkStrictly: true}"
|
||||
clearable
|
||||
></el-cascader>
|
||||
<!-- <el-select v-model="searchModel.ProductId" placeholder="选择产品" clearable size="small">
|
||||
<el-option v-for="item in products" :key="item.Name" :label="item.Name" :value="item.Id"></el-option>
|
||||
</el-select> -->
|
||||
<!-- <el-select
|
||||
v-model="searchModel.OrderTypes"
|
||||
multiple
|
||||
collapse-tags
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="选择类型"
|
||||
>
|
||||
<el-option v-for="item in types" :key="item.text" :label="item.text" :value="item.value"></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>
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker> -->
|
||||
<el-input
|
||||
v-model="searchModel.keyWord"
|
||||
placeholder="请输入订单号、订单名称、用户名"
|
||||
clearable
|
||||
size="small"
|
||||
>
|
||||
<el-button slot="append" icon="el-icon-search" @click="search"></el-button>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
<el-table :data="retData.Data" row-key="Id" border size="medium" :height="$getHeight(100)">
|
||||
<el-table-column prop="CreateTime" label="创建日期" width="180"></el-table-column>
|
||||
<el-table-column prop="UpdateTime" label="支付日期" width="180"></el-table-column>
|
||||
<el-table-column prop="OrderNo" label="订单号" width="215"></el-table-column>
|
||||
<el-table-column prop="OrderType" label="类型" :formatter="typeFormat"></el-table-column>
|
||||
<el-table-column prop="UserName" label="用户" width="120">
|
||||
<template slot-scope="scope">
|
||||
<phoneHide :text="scope.row.UserName"></phoneHide>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="ProductName" label="产品"></el-table-column>
|
||||
<el-table-column prop="PackageName" label="套餐"></el-table-column>
|
||||
<el-table-column prop="DayPrice" label="单价"></el-table-column>
|
||||
<el-table-column prop="ConnectCount" label="连接数">
|
||||
<template slot-scope="scope">{{scope.row.ConnectCount*scope.row.AccountCount}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Accounts" label="账号">
|
||||
<template slot-scope="scope">
|
||||
<cutTip :text="scope.row.Accounts"></cutTip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="OrderAmount" label="订单金额"></el-table-column>
|
||||
<el-table-column prop="CouponAmount" label="优惠金额"></el-table-column>
|
||||
<el-table-column prop="AccountPayAmount" label="余额支付"></el-table-column>
|
||||
<el-table-column prop="OtherPayAmount" label="在线支付"></el-table-column>
|
||||
<el-table-column prop="PaymentAmount" label="实付"></el-table-column>
|
||||
<!-- <el-table-column prop="RefundAmount" label="退款"></el-table-column> -->
|
||||
<el-table-column prop="PayType" label="付款方式" :formatter="payTypeFormat"></el-table-column>
|
||||
<el-table-column prop="TradeNo" label="支付流水号" width="140">
|
||||
<template slot-scope="scope">
|
||||
<cutTip :text="scope.row.TradeNo"></cutTip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Remark" label="备注" width="140">
|
||||
<template slot-scope="scope">
|
||||
<cutTip :text="scope.row.Remark"></cutTip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
@current-change="get"
|
||||
:current-page.sync="searchModel.PageIndex"
|
||||
:page-size="50"
|
||||
layout="total,prev, pager, next"
|
||||
:total="retData.TotalCount"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'treeTable',
|
||||
components: {
|
||||
cutTip: () => import('@/components/common/cutTip'),
|
||||
phoneHide: () => import('@/components/common/phonehide')
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
tableData: [],
|
||||
count: 0,
|
||||
pageNum: 1,
|
||||
dialogFormVisible: false,
|
||||
form: {},
|
||||
formLabelWidth: '120px',
|
||||
search_info: ''
|
||||
loading: false,
|
||||
options: [],
|
||||
types: [
|
||||
{ text: '新开', value: '1' },
|
||||
{ text: '批量新开', value: '2' },
|
||||
{ text: '续费', value: '3' },
|
||||
{ text: '批量续费', value: '4' }
|
||||
],
|
||||
retData: { TotalCount: 0, Data: [] },
|
||||
dateRange: [],
|
||||
products: [],
|
||||
searchModel: {
|
||||
PageIndex: 1,
|
||||
ProductId: null,
|
||||
PackageId: null,
|
||||
keyWord: '',
|
||||
Status: 0,
|
||||
PayType: 0,
|
||||
OrderTypes: [],
|
||||
Btime: '',
|
||||
Etime: '',
|
||||
pModel: []
|
||||
},
|
||||
types: [
|
||||
{ text: '新开', value: 1 },
|
||||
{ text: '批量新开', value: 2 },
|
||||
{ text: '续费', value: 3 },
|
||||
{ text: '批量续费', value: 4 },
|
||||
{ text: '老账号认证', value: 100 },
|
||||
{ text: '测试', value: 200 }
|
||||
],
|
||||
typeFormat (row, column, cellValue, index) {
|
||||
switch (cellValue) {
|
||||
case '1':
|
||||
return '新开'
|
||||
case '2':
|
||||
return '批量新开'
|
||||
case '3':
|
||||
return '续费'
|
||||
case '4':
|
||||
return '批量续费'
|
||||
}
|
||||
return ''
|
||||
},
|
||||
payTypeFormat (row, column, cellValue, index) {
|
||||
switch (cellValue) {
|
||||
case '10':
|
||||
return '余额'
|
||||
case '70':
|
||||
return '微信'
|
||||
case '100':
|
||||
return '支付宝'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.$store.commit('setCurrentNav', '订单管理>>提现处理')
|
||||
this.getData()
|
||||
this.$store.commit('setCurrentNav', '订单管理>>失败订单')
|
||||
this.get()
|
||||
// this.getProduct();
|
||||
this.getProductWithPackage()
|
||||
},
|
||||
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)
|
||||
this.searchModel.PageIndex = 1
|
||||
this.get()
|
||||
},
|
||||
get () {
|
||||
if (this.dateRange && this.dateRange.length === 2) {
|
||||
this.searchModel.Btime = this.dateRange[0]
|
||||
this.searchModel.Etime = this.dateRange[1]
|
||||
}
|
||||
if (this.searchModel.pModel.length > 0) {
|
||||
this.searchModel.ProductId = this.searchModel.pModel[0]
|
||||
}
|
||||
if (this.searchModel.pModel.length > 0) {
|
||||
this.searchModel.PackageId = this.searchModel.pModel[1]
|
||||
}
|
||||
this.searchModel.OrderTypes = this.searchModel.OrderTypes.toString()
|
||||
this.$api.get('http://autophp.wyk/order/failed/getFailedList', this.searchModel).then(res => {
|
||||
this.retData = res
|
||||
})
|
||||
},
|
||||
dealStatus (info) {
|
||||
switch (info) {
|
||||
case '0':
|
||||
info = '待处理'
|
||||
break
|
||||
case '1':
|
||||
info = '同意'
|
||||
break
|
||||
case '2':
|
||||
info = '拒绝'
|
||||
break
|
||||
}
|
||||
return info
|
||||
getProductWithPackage () {
|
||||
this.loading = true
|
||||
this.$api.get('course/v1/product/ProductWithPackage').then(res => {
|
||||
this.options = res.Data
|
||||
var options = []
|
||||
res.Data.forEach(m => {
|
||||
var product = {
|
||||
label: m.Product.Name,
|
||||
value: m.Product.Id,
|
||||
children: []
|
||||
}
|
||||
|
||||
m.Packages.forEach(p => {
|
||||
var pkg = {
|
||||
label: p.Name,
|
||||
value: p.Id
|
||||
}
|
||||
product.children.push(pkg)
|
||||
})
|
||||
options.push(product)
|
||||
})
|
||||
this.options = options
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.el-table .success-row {
|
||||
background: #d7f8c5;
|
||||
}
|
||||
|
||||
.el-table .error-row {
|
||||
background: #f1c6c6;
|
||||
}
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user