This commit is contained in:
180
src/components/order/refundsearch.vue
Normal file
180
src/components/order/refundsearch.vue
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
<template>
|
||||||
|
<div v-loading="loading">
|
||||||
|
<div class="heior_box">
|
||||||
|
<div class="search-box">
|
||||||
|
|
||||||
|
<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-table :data="retData.Data" @filter-change="filterHandler" row-key="Id" border size="medium" :height="$getHeight(100)">
|
||||||
|
<el-table-column prop="CreateTime" label="创建日期" width="180"></el-table-column>
|
||||||
|
<el-table-column prop="OrderNo" label="订单号" width="220"></el-table-column>
|
||||||
|
<!-- <el-table-column prop="OrderType" label="类型" :formatter="typeFormat"></el-table-column> -->
|
||||||
|
<el-table-column prop="UserName" label="用户" >
|
||||||
|
<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="连接数"></el-table-column>
|
||||||
|
<el-table-column prop="Accounts" 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="RefundRestTime" label="剩余时间"></el-table-column>
|
||||||
|
<el-table-column prop="IsAutoRefund" label="自动退款" :formatter="autoFormat"></el-table-column>
|
||||||
|
<el-table-column prop="BackAmount" label="返点"></el-table-column>
|
||||||
|
<el-table-column prop="RefundReason" label="退款原因"></el-table-column>
|
||||||
|
<el-table-column prop="OrderState" label="退款状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span :class="{red:scope.row.OrderState==30}"> {{refundTypeFormat(scope.row.OrderState)}}</span>
|
||||||
|
<span v-if="scope.row.OrderState==30" class="handel cursor edit" @click="showRefund(scope.row)">处理</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
<div class="block">
|
||||||
|
<el-pagination
|
||||||
|
v-if="retData.Data.length>0"
|
||||||
|
@current-change="get"
|
||||||
|
:current-page.sync="searchModel.PageIndex"
|
||||||
|
:page-size="50"
|
||||||
|
layout="total,prev, pager, next"
|
||||||
|
:total="retData.TotalCount"
|
||||||
|
></el-pagination>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-dialog title="退款处理" :visible.sync="refundModel.Show" width="300px">
|
||||||
|
<el-form :model="refundModel" ref="inputForm" label-width="80px">
|
||||||
|
<el-form-item prop="Remark" label="备注说明">
|
||||||
|
<el-input v-model="refundModel.Remark" size="small"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="BackAmount" label="返点">
|
||||||
|
<el-input v-model="refundModel.BackAmount" size="small" type="number"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="resetForm('inputForm')">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="doRefund('inputForm')">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "treeTable",
|
||||||
|
components: {
|
||||||
|
phoneHide: () => import("@/components/common/phonehide")
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
retData: { TotalCount: 0, Data: [] },
|
||||||
|
dateRange:[],
|
||||||
|
searchModel: {
|
||||||
|
PageIndex: 1,
|
||||||
|
keyWord: "",
|
||||||
|
Status: 0,
|
||||||
|
PayType: 0,
|
||||||
|
OrderTypes:[],
|
||||||
|
ProductId:null,
|
||||||
|
Btime: "",
|
||||||
|
Etime: ""
|
||||||
|
},
|
||||||
|
refundModel:{
|
||||||
|
Id:0,
|
||||||
|
BackAmount:0,
|
||||||
|
Remark:'',
|
||||||
|
Show:false,
|
||||||
|
},
|
||||||
|
types: [
|
||||||
|
{ text: "新开", value: 1 },
|
||||||
|
{ text: "批量新开", value: 2 },
|
||||||
|
{ text: "续费", value: 3 },
|
||||||
|
{ text: "批量续费", value: 4 },
|
||||||
|
{ text: "老账号认证", value: 100 },
|
||||||
|
{ text: "测试", value: 200 }
|
||||||
|
],
|
||||||
|
typeFormat(row, column, cellValue, index){
|
||||||
|
return "退款"
|
||||||
|
},
|
||||||
|
autoFormat(row, column, cellValue, index){
|
||||||
|
return cellValue&&cellValue==1?"是":"否";
|
||||||
|
},
|
||||||
|
refundTypeFormat(orderStatus){
|
||||||
|
switch (orderStatus) {
|
||||||
|
case 30:
|
||||||
|
return "未自动退款";
|
||||||
|
case 40:
|
||||||
|
return "已人工处理";
|
||||||
|
case 50:
|
||||||
|
return "已自动退款";
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$store.commit("setCurrentNav","订单管理>>退款订单")
|
||||||
|
this.getProduct();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
search(){
|
||||||
|
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];
|
||||||
|
}
|
||||||
|
this.$api.get("course/v1/order/RefundOrders", this.searchModel).then(res => {
|
||||||
|
this.retData = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getProduct() {
|
||||||
|
this.loading = true;
|
||||||
|
this.$api.get("course/v1/product/page", this.searchModel).then(res => {
|
||||||
|
this.products = res.Data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
filterHandler(filters) {
|
||||||
|
console.log(filters)
|
||||||
|
var values=Object.values(filters);
|
||||||
|
console.log(...values)
|
||||||
|
values.forEach(m=>{
|
||||||
|
this.searchModel.OrderTypes.push(...m)
|
||||||
|
});
|
||||||
|
this.get();
|
||||||
|
},
|
||||||
|
dataExport(){
|
||||||
|
this.$api.getDownloadFile("/course/v1/order/ExportRefundOrders", this.searchModel);
|
||||||
|
},
|
||||||
|
showRefund(item){
|
||||||
|
this.refundModel.Show = true;
|
||||||
|
this.refundModel.Id=item.Id;
|
||||||
|
},
|
||||||
|
resetForm(formName) {
|
||||||
|
this.$refs[formName].resetFields();
|
||||||
|
this.refundModel.Show = false;
|
||||||
|
},
|
||||||
|
doRefund(formName){
|
||||||
|
this.$api.post("course/v1/order/RefundProcess", this.refundModel).then(res => {
|
||||||
|
this.get();
|
||||||
|
this.resetForm(formName)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.red{
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<div class="heior_box">
|
<div class="heior_box">
|
||||||
|
<el-button size="small" type="primary" icon="el-icon-sold-out" @click="showDialog=true">认领</el-button>
|
||||||
<div class="search-box">
|
<div class="search-box">
|
||||||
|
<el-input v-model="searchModel.Channel" size="small" placeholder="请输入销售员"></el-input>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
size="small"
|
size="small"
|
||||||
v-model="dateRange"
|
v-model="dateRange"
|
||||||
@@ -35,6 +37,20 @@
|
|||||||
<!-- <el-table-column prop="PaymentAmount" label="换货个数"></el-table-column>
|
<!-- <el-table-column prop="PaymentAmount" label="换货个数"></el-table-column>
|
||||||
<el-table-column prop="PaymentAmount" label="换货金额"></el-table-column>-->
|
<el-table-column prop="PaymentAmount" label="换货金额"></el-table-column>-->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<el-dialog title="认领订单" :visible.sync="showDialog" width="300px">
|
||||||
|
<el-form :model="takeModel" ref="inputForm" label-width="80px">
|
||||||
|
<el-form-item prop="phone" label="手机号">
|
||||||
|
<el-input v-model="takeModel.phone" size="small"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="amount" label="订单金额">
|
||||||
|
<el-input v-model="takeModel.amount" size="small" type="number"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="resetForm('inputForm')">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="take()">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -44,9 +60,17 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
|
showDialog:false,
|
||||||
retData:[],
|
retData:[],
|
||||||
|
seller:'',
|
||||||
|
|
||||||
|
takeModel:{
|
||||||
|
phone:'',
|
||||||
|
amount:''
|
||||||
|
},
|
||||||
searchModel: {
|
searchModel: {
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
|
Channel:'',
|
||||||
keyWord: "",
|
keyWord: "",
|
||||||
Status: 0,
|
Status: 0,
|
||||||
PayType: 0,
|
PayType: 0,
|
||||||
@@ -84,6 +108,15 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
resetForm(formName) {
|
||||||
|
this.$refs[formName].resetFields();
|
||||||
|
this.showDialog = false;
|
||||||
|
},
|
||||||
|
take(){
|
||||||
|
this.$api.get("course/v1/order/TakeOrder", this.takeModel).then(res => {
|
||||||
|
this.resetForm('inputForm')
|
||||||
|
});
|
||||||
|
},
|
||||||
mergeSpan({row, column, rowIndex, columnIndex}){
|
mergeSpan({row, column, rowIndex, columnIndex}){
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
console.log(`${row.rSpan}-${row.cSpan}`)
|
console.log(`${row.rSpan}-${row.cSpan}`)
|
||||||
|
|||||||
@@ -2,6 +2,19 @@
|
|||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<div class="heior_box">
|
<div class="heior_box">
|
||||||
<div class="search-box">
|
<div class="search-box">
|
||||||
|
<el-select
|
||||||
|
v-model="searchModel.ProductId"
|
||||||
|
collapse-tags
|
||||||
|
style="width:200px;"
|
||||||
|
size=small
|
||||||
|
placeholder="请选择产品">
|
||||||
|
<el-option
|
||||||
|
v-for="item in products"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
size="small"
|
size="small"
|
||||||
v-model="dateRange"
|
v-model="dateRange"
|
||||||
@@ -45,8 +58,10 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
retData: [],
|
retData: [],
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
|
products: [],
|
||||||
searchModel: {
|
searchModel: {
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
|
ProductId: '',
|
||||||
keyWord: '',
|
keyWord: '',
|
||||||
Status: 0,
|
Status: 0,
|
||||||
PayType: 0,
|
PayType: 0,
|
||||||
@@ -59,9 +74,19 @@ export default {
|
|||||||
mounted () {
|
mounted () {
|
||||||
this.$store.commit('setCurrentNav', '销售管理>>统计分析')
|
this.$store.commit('setCurrentNav', '销售管理>>统计分析')
|
||||||
this.get()
|
this.get()
|
||||||
|
this.$api.get('course/v1/product/page', this.searchModel).then(res => {
|
||||||
|
res.Data.forEach(m => {
|
||||||
|
var product = {
|
||||||
|
label: m.Name,
|
||||||
|
value: m.Id
|
||||||
|
}
|
||||||
|
this.products.push(product)
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
get () {
|
get () {
|
||||||
|
|
||||||
this.flagMap = {}
|
this.flagMap = {}
|
||||||
if (this.dateRange && this.dateRange.length === 2) {
|
if (this.dateRange && this.dateRange.length === 2) {
|
||||||
this.searchModel.Btime = this.dateRange[0]
|
this.searchModel.Btime = this.dateRange[0]
|
||||||
|
|||||||
@@ -43,9 +43,6 @@
|
|||||||
<el-table-column label="操作" width="400px">
|
<el-table-column label="操作" width="400px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span class="handel cursor edit" @click="showUpdateTest(scope.row)">设置测试</span>
|
<span class="handel cursor edit" @click="showUpdateTest(scope.row)">设置测试</span>
|
||||||
<router-link :to="{name:'account',query:{userId:scope.row.Id}}">
|
|
||||||
<span class="handel cursor edit">账号</span>
|
|
||||||
</router-link>
|
|
||||||
<router-link :to="{name:'userprice',query:{id:scope.row.Id}}">
|
<router-link :to="{name:'userprice',query:{id:scope.row.Id}}">
|
||||||
<span class="handel cursor edit">专项价</span>
|
<span class="handel cursor edit">专项价</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|||||||
@@ -187,6 +187,11 @@ let router = new Router({
|
|||||||
name: 'refundOrderItems',
|
name: 'refundOrderItems',
|
||||||
component: resolve => require(['@/components/order/refunds'], resolve)
|
component: resolve => require(['@/components/order/refunds'], resolve)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'order/refundsearch',
|
||||||
|
name: 'refundsearch',
|
||||||
|
component: resolve => require(['@/components/order/refundsearch'], resolve)
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'order/amountdetails',
|
path: 'order/amountdetails',
|
||||||
name: 'amountdetails',
|
name: 'amountdetails',
|
||||||
|
|||||||
Reference in New Issue
Block a user