添加退款原因

This commit is contained in:
wanyongkang
2020-10-19 12:24:14 +08:00
parent 66d2a1661b
commit 69187ef7da
2 changed files with 41 additions and 40 deletions

View File

@@ -48,6 +48,7 @@
<el-table-column prop="RefundRestTime" 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="IsAutoRefund" label="自动退款" :formatter="autoFormat"></el-table-column>
<el-table-column prop="BackAmount" label="返点"></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="退款状态"> <el-table-column prop="OrderState" label="退款状态">
<template slot-scope="scope"> <template slot-scope="scope">
<span :class="{red:scope.row.OrderState==30}"> {{refundTypeFormat(scope.row.OrderState)}}</span> <span :class="{red:scope.row.OrderState==30}"> {{refundTypeFormat(scope.row.OrderState)}}</span>

View File

@@ -38,62 +38,62 @@
</template> </template>
<script> <script>
export default { export default {
name: "treeTable", name: 'treeTable',
components: {}, components: {},
data() { data () {
return { return {
loading: false, loading: false,
retData:[], retData: [],
dateRange:[], dateRange: [],
searchModel: { searchModel: {
PageIndex: 1, PageIndex: 1,
keyWord: "", keyWord: '',
Status: 0, Status: 0,
PayType: 0, PayType: 0,
Btime: "", Btime: '',
Etime: "" Etime: ''
}, },
flagMap:{} flagMap: {}
}; }
}, },
mounted(){ mounted () {
this.$store.commit("setCurrentNav","销售管理>>统计分析") this.$store.commit('setCurrentNav', '销售管理>>统计分析')
this.get(); this.get()
}, },
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]
this.searchModel.Etime = this.dateRange[1]; this.searchModel.Etime = this.dateRange[1]
} }
this.$api.get("course/v1/order/Statistics", this.searchModel).then(res => { this.$api.get('course/v1/order/Statistics', this.searchModel).then(res => {
this.retData = res.Data; this.retData = res.Data
this.retData.forEach(item=>{ this.retData.forEach(item => {
var flag=this.flagMap[item.ProductName]; var flag = this.flagMap[item.ProductName]
if(!flag){ if (!flag) {
this.flagMap[item.ProductName]=true; this.flagMap[item.ProductName] = true
var count=this.retData.filter(m=>m.ProductName== item.ProductName).length; var count = this.retData.filter(m => m.ProductName === item.ProductName).length
item.rSpan=count; item.rSpan = count
item.cSpan=1; item.cSpan = 1
}else{ } else {
item.rSpan=0; item.rSpan = 0
item.cSpan=0; item.cSpan = 0
} }
}) })
}) })
}, },
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}`)
return { return {
rowspan: row.rSpan, rowspan: row.rSpan,
colspan: row.cSpan colspan: row.cSpan
} }
} }
} }
} }
}; }
</script> </script>
<style scoped> <style scoped>
.el-table{ .el-table{