Commit 9f2b0389 authored by Mac's avatar Mac

订单修改

parent 7a821cc5
......@@ -167,7 +167,7 @@
</q-td>
</template>
<template v-slot:body-cell-CostTypeList="props">
<q-td :props="props" v-for="(s,si) in props.row.CostTypeList">
<q-td :props="props" v-for="(s,si) in props.row.CostTypeList" :index="si">
<span style="background-color: rgba(64,158,255,.1);display: inline-block;padding: 0 5px;height: 22px;line-height: 20px;font-size: 12px;color: #646464;border-radius: 4px;box-sizing: border-box;border: 1px solid rgba(64,158,255,.2);white-space: nowrap;margin-bottom: 4px;margin-right: 4px;">{{s}}</span>
</q-td>
</template>
......@@ -228,7 +228,7 @@
</q-td>
</template>
<template v-slot:body-cell-CostTypeList="props">
<q-td :props="props" v-for="(s,si) in props.row.CostTypeList">
<q-td :props="props" v-for="(s,si) in props.row.CostTypeList" :index="si">
<span style="background-color: rgba(64,158,255,.1);display: inline-block;padding: 0 5px;height: 22px;line-height: 20px;font-size: 12px;color: #646464;border-radius: 4px;box-sizing: border-box;border: 1px solid rgba(64,158,255,.2);white-space: nowrap;margin-bottom: 4px;margin-right: 4px;">{{s}}</span>
</q-td>
</template>
......
......@@ -24,7 +24,8 @@
@click="goOrderdetails(item,1)">{{item.OrderId}}</div>
<div>{{item.EnterName}}</div>
<div style="margin-top: 10px">{{item.CreateTime}}</div>
<div style="margin-top: 30px;margin-bottom: 10px">班级</div>
<div style="font-weight: bold;color:#2961FE;" @click="getClassInfo(item)">{{item.ClassName}}</div>
</td>
<td style="border:none">{{item.GuestNum}}</td>
<td style="border:none">{{item.Class_Price.toFixed(2)}}</td>
......@@ -244,6 +245,8 @@
@click="goOrderdetails(item)">{{item.OrderId}}</div>
<div>{{item.EnterName}}</div>
<div style="margin-top: 10px">{{item.CreateTime}}</div>
<div style="margin-top: 30px;margin-bottom: 10px">班级</div>
<div style="font-weight: bold;color:#2961FE;" @click="getClassInfo(item)">{{item.ClassName}}</div>
</td>
<td style="border:none">{{item.GuestNum}}</td>
<td style="border:none">{{item.Class_Price.toFixed(2)}}</td>
......@@ -462,6 +465,8 @@
<transOrder-form v-if="isShowTransOrderForm" :save-obj="orderObj" @close="closeTransOrderForm"
@success="refreshClassOrder"></transOrder-form>
<myOrder-form v-if="isShowmyorderForm" :save-obj="myorderObjOption" @close="closeMOSaveForm"></myOrder-form>
<!-- 班级详情-->
<classinfo-form v-if="isShowClassInfo" :seting-obj="classObjOption" @close="closeClass" @success="refreshClass"></classinfo-form>
</div>
</template>
......@@ -474,12 +479,15 @@
cancelClassOrder, //取消订单
} from '../../api/sale/sale'
import myOrderForm from '../../components/sale/myOrder-form'
import classinfoForm from '../../components/course/classinfo-form';
export default {
components: {
editorderForm,
orderremarkForm,
transOrderForm,
myOrderForm
myOrderForm,
classinfoForm
},
props: {
//正常订单
......@@ -503,15 +511,53 @@
remarkType: 0, //备注类型
isShowmyorderForm:false,//显示详情
myorderObjOption:{},//详情的数据
classObjOption: null,
isShowClassInfo: false, //是否显示课程信息
}
},
created() {
console.log(this.dataList)
},
mounted() {
},
methods: {
getOrderFinanceList(msg,type){
this.apipost('sellorder_post_GetOrderFinanceListForEdu',{OrderIds:msg},res=>{
if(res.data.resultCode===1){
let data = res.data.data;
if(type==1){
if(this.dataList){
this.dataList.forEach(x=>{
data.forEach(j=>{
if(x.OrderId == j.OrderId){
x.FinanceList = j.FinanceList
x.RefundFinanceList = j.RefundFinanceList
}
})
})
}
}else if(type==2){
if(this.cancelList.length>0){
this.cancelList.forEach(x=>{
data.forEach(j=>{
if(x.OrderId == j.OrderId){
x.FinanceList = j.FinanceList
x.RefundFinanceList = j.RefundFinanceList
}
})
})
}
}
this.$forceUpdate()
}else{
this.$message.error(res.data.message);
}
},err=>{})
},
goOrderdetails(item,tab){
item.tab=tab
this.myorderObjOption= item;
......@@ -614,6 +660,18 @@
}
});
},
getClassInfo(obj) {//打开班级详情组件
this.classObjOption = obj;
this.isShowClassInfo = true;
},
//关闭班级信息弹窗
closeClass() {
this.isShowClassInfo = false
},
//刷新
refreshClass() {
},
}
}
</script>
......
<template>
<div class="page-body myOrder">
<div class="row col">
<div class="row tis">
<div class="tis-k" style="background: #2961FE"></div>
<span>
<div class="row col" style="height: 40px">
<div class="row col" style="justify-content: space-between;align-items: center;margin-bottom: 10px" >
<div>
<template v-if="data&& data.ClassInfo">
{{data.ClassInfo.ClassName}}
</template>
</span>
</div>
<div class="row tis">
<div class="tis-k" style="background: #02C499"></div>
<span>
<template v-if="data&& data.ClassInfo">
</div>
<div class="row" style="align-items: center">
<span>带班老师</span>
<img :src="data.ClassInfo&&data.ClassInfo.TeacherIcon?data.ClassInfo.TeacherIcon:''" style="width:30px;height: 30px;border-radius: 50%;margin: 0 10px" />
<span v-if="data&& data.ClassInfo" style="color:#2961FE;font-weight: bold">
{{data.ClassInfo.TeacherName}}
</template>
</span>
</div>
<div class="row tis">
<div class="tis-k" style="background: #F28C1D"></div>
<span>
<template v-if="data&& data.ClassInfo">
<img :src='data.ClassInfo.TeacherIcon' style="width:40px;height:40px;" />
</template>
</span>
</span>
</div>
</div>
</div>
<div class="page-content">
<orderlist :dataList="dataList" :cancelList="CancelList" @success="refreshClassOrder"></orderlist>
<orderlist :dataList="dataList" ref="orderL" :cancelList="CancelList" @success="refreshClassOrder"></orderlist>
</div>
</div>
</template>
......@@ -57,17 +48,19 @@
if (this.$route.query.ClassId) {
this.ClassId = this.$route.query.ClassId
this.msg.ClassId = this.ClassId;
}
this.getList();
},
mounted() {
this.getList();
},
methods: {
//获取菜单分页列表
getList() {
this.loading = true;
quertClassOrderList(this.msg).then(res => {
this.loading = false
this.data = res.Data;
if (this.data && this.data.OrderList && this.data.OrderList.NorList) {
this.dataList = this.data.OrderList.NorList;
......@@ -77,7 +70,9 @@
})
if(OrderIds.length>0){
OrderIds = OrderIds.join(',')
this.getOrderFinanceList(OrderIds,1)
// this.getOrderFinanceList(OrderIds,1)
this.$refs.orderL.getOrderFinanceList(OrderIds,1)
}
}
......@@ -89,9 +84,12 @@
})
if(OrderIds.length>0){
OrderIds = OrderIds.join(',')
this.getOrderFinanceList(OrderIds,2)
// this.getOrderFinanceList(OrderIds,2)
this.$refs.orderL.getOrderFinanceList(OrderIds,2)
}
}
this.loading = false
}).catch(() => {
this.loading = false
})
......@@ -120,8 +118,6 @@
})
})
}
}else{
this.loading = false;
this.$message.error(res.data.message);
......
......@@ -784,7 +784,7 @@
<el-table-column prop="dateRange" label="费用类型">
<template slot-scope="scope">
<div>
<div v-for="(s,si) in scope.row.CostTypeList">
<div v-for="(s,si) in scope.row.CostTypeList" :index="si">
<span style="background-color: rgba(64,158,255,.1);display: inline-block;padding: 0 5px;height: 22px;line-height: 20px;font-size: 12px;color: #646464;border-radius: 4px;box-sizing: border-box;border: 1px solid rgba(64,158,255,.2);white-space: nowrap;margin-bottom: 4px;">{{s}}</span></br>
</div>
</div>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment