订单明细格式
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-dupe-keys */
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<div class="heior_box">
|
||||
@@ -101,20 +102,20 @@
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "treeTable",
|
||||
name: 'treeTable',
|
||||
components: {
|
||||
cutTip: () => import("@/components/common/cutTip"),
|
||||
phoneHide: () => import("@/components/common/phonehide")
|
||||
cutTip: () => import('@/components/common/cutTip'),
|
||||
phoneHide: () => import('@/components/common/phonehide')
|
||||
},
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
options: [],
|
||||
types: [
|
||||
{ text: "新开", value: "1" },
|
||||
{ text: "批量新开", value: "2" },
|
||||
{ text: "续费", value: "3" },
|
||||
{ text: "批量续费", value: "4" }
|
||||
{ text: '新开', value: '1' },
|
||||
{ text: '批量新开', value: '2' },
|
||||
{ text: '续费', value: '3' },
|
||||
{ text: '批量续费', value: '4' }
|
||||
],
|
||||
retData: { TotalCount: 0, Data: [] },
|
||||
dateRange: [],
|
||||
@@ -122,91 +123,91 @@ export default {
|
||||
searchModel: {
|
||||
PageIndex: 1,
|
||||
ProductId: null,
|
||||
PackageId:null,
|
||||
keyWord: "",
|
||||
PackageId: null,
|
||||
keyWord: '',
|
||||
Status: 0,
|
||||
PayType: 0,
|
||||
OrderTypes: [],
|
||||
Btime: "",
|
||||
Etime: "",
|
||||
pModel:[],
|
||||
Btime: '',
|
||||
Etime: '',
|
||||
pModel: []
|
||||
},
|
||||
types: [
|
||||
{ text: "新开", value: 1 },
|
||||
{ text: "批量新开", value: 2 },
|
||||
{ text: "续费", value: 3 },
|
||||
{ text: "批量续费", value: 4 },
|
||||
{ text: "老账号认证", value: 100 },
|
||||
{ text: "测试", value: 200 }
|
||||
{ text: '新开', value: 1 },
|
||||
{ text: '批量新开', value: 2 },
|
||||
{ text: '续费', value: 3 },
|
||||
{ text: '批量续费', value: 4 },
|
||||
{ text: '老账号认证', value: 100 },
|
||||
{ text: '测试', value: 200 }
|
||||
],
|
||||
typeFormat(row, column, cellValue, index) {
|
||||
typeFormat (row, column, cellValue, index) {
|
||||
switch (cellValue) {
|
||||
case 1:
|
||||
return "新开";
|
||||
return '新开'
|
||||
case 2:
|
||||
return "批量新开";
|
||||
return '批量新开'
|
||||
case 3:
|
||||
return "续费";
|
||||
return '续费'
|
||||
case 4:
|
||||
return "批量续费";
|
||||
return '批量续费'
|
||||
}
|
||||
return "";
|
||||
return ''
|
||||
},
|
||||
payTypeFormat(row, column, cellValue, index) {
|
||||
payTypeFormat (row, column, cellValue, index) {
|
||||
switch (cellValue) {
|
||||
case 10:
|
||||
return "余额";
|
||||
return '余额'
|
||||
case 70:
|
||||
return "微信";
|
||||
return '微信'
|
||||
case 100:
|
||||
return "支付宝";
|
||||
return '支付宝'
|
||||
}
|
||||
return "";
|
||||
return ''
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$store.commit("setCurrentNav", "订单管理>>订单明细");
|
||||
this.get();
|
||||
//this.getProduct();
|
||||
this.getProductWithPackage();
|
||||
created () {
|
||||
this.$store.commit('setCurrentNav', '订单管理>>订单明细')
|
||||
this.get()
|
||||
// this.getProduct()
|
||||
this.getProductWithPackage()
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
this.searchModel.PageIndex = 1;
|
||||
this.get();
|
||||
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];
|
||||
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.$api.get("course/v1/order/page", this.searchModel).then(res => {
|
||||
this.retData = res;
|
||||
});
|
||||
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.$api.get('course/v1/order/page', 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;
|
||||
});
|
||||
getProduct () {
|
||||
this.loading = true
|
||||
this.$api.get('course/v1/product/page', this.searchModel).then(res => {
|
||||
this.products = res.Data
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
getProductWithPackage() {
|
||||
this.loading = true;
|
||||
this.$api.get("course/v1/product/ProductWithPackage").then(res => {
|
||||
this.options = res.Data;
|
||||
var options = [];
|
||||
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 = {
|
||||
@@ -215,26 +216,26 @@ export default {
|
||||
}
|
||||
product.children.push(pkg)
|
||||
})
|
||||
options.push(product);
|
||||
});
|
||||
this.options=options;
|
||||
this.loading = false;
|
||||
});
|
||||
options.push(product)
|
||||
})
|
||||
this.options = options
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
filterHandler(filters) {
|
||||
console.log(filters);
|
||||
var values = Object.values(filters);
|
||||
console.log(...values);
|
||||
filterHandler (filters) {
|
||||
console.log(filters)
|
||||
var values = Object.values(filters)
|
||||
console.log(...values)
|
||||
values.forEach(m => {
|
||||
this.searchModel.OrderTypes.push(...m);
|
||||
});
|
||||
this.get();
|
||||
this.searchModel.OrderTypes.push(...m)
|
||||
})
|
||||
this.get()
|
||||
},
|
||||
dataExport() {
|
||||
this.$api.getDownloadFile("/course/v1/order/Export", this.searchModel);
|
||||
dataExport () {
|
||||
this.$api.getDownloadFile('/course/v1/order/Export', this.searchModel)
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user