Commit 9f2b0389 authored by Mac's avatar Mac

订单修改

parent 7a821cc5
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-CostTypeList="props"> <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> <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> </q-td>
</template> </template>
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-CostTypeList="props"> <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> <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> </q-td>
</template> </template>
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
@click="goOrderdetails(item,1)">{{item.OrderId}}</div> @click="goOrderdetails(item,1)">{{item.OrderId}}</div>
<div>{{item.EnterName}}</div> <div>{{item.EnterName}}</div>
<div style="margin-top: 10px">{{item.CreateTime}}</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>
<td style="border:none">{{item.GuestNum}}</td> <td style="border:none">{{item.GuestNum}}</td>
<td style="border:none">{{item.Class_Price.toFixed(2)}}</td> <td style="border:none">{{item.Class_Price.toFixed(2)}}</td>
...@@ -244,6 +245,8 @@ ...@@ -244,6 +245,8 @@
@click="goOrderdetails(item)">{{item.OrderId}}</div> @click="goOrderdetails(item)">{{item.OrderId}}</div>
<div>{{item.EnterName}}</div> <div>{{item.EnterName}}</div>
<div style="margin-top: 10px">{{item.CreateTime}}</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>
<td style="border:none">{{item.GuestNum}}</td> <td style="border:none">{{item.GuestNum}}</td>
<td style="border:none">{{item.Class_Price.toFixed(2)}}</td> <td style="border:none">{{item.Class_Price.toFixed(2)}}</td>
...@@ -462,6 +465,8 @@ ...@@ -462,6 +465,8 @@
<transOrder-form v-if="isShowTransOrderForm" :save-obj="orderObj" @close="closeTransOrderForm" <transOrder-form v-if="isShowTransOrderForm" :save-obj="orderObj" @close="closeTransOrderForm"
@success="refreshClassOrder"></transOrder-form> @success="refreshClassOrder"></transOrder-form>
<myOrder-form v-if="isShowmyorderForm" :save-obj="myorderObjOption" @close="closeMOSaveForm"></myOrder-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> </div>
</template> </template>
...@@ -474,12 +479,15 @@ ...@@ -474,12 +479,15 @@
cancelClassOrder, //取消订单 cancelClassOrder, //取消订单
} from '../../api/sale/sale' } from '../../api/sale/sale'
import myOrderForm from '../../components/sale/myOrder-form' import myOrderForm from '../../components/sale/myOrder-form'
import classinfoForm from '../../components/course/classinfo-form';
export default { export default {
components: { components: {
editorderForm, editorderForm,
orderremarkForm, orderremarkForm,
transOrderForm, transOrderForm,
myOrderForm myOrderForm,
classinfoForm
}, },
props: { props: {
//正常订单 //正常订单
...@@ -503,15 +511,53 @@ ...@@ -503,15 +511,53 @@
remarkType: 0, //备注类型 remarkType: 0, //备注类型
isShowmyorderForm:false,//显示详情 isShowmyorderForm:false,//显示详情
myorderObjOption:{},//详情的数据 myorderObjOption:{},//详情的数据
classObjOption: null,
isShowClassInfo: false, //是否显示课程信息
} }
}, },
created() { created() {
console.log(this.dataList)
}, },
mounted() { mounted() {
}, },
methods: { 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){ goOrderdetails(item,tab){
item.tab=tab item.tab=tab
this.myorderObjOption= item; this.myorderObjOption= item;
...@@ -614,6 +660,18 @@ ...@@ -614,6 +660,18 @@
} }
}); });
}, },
getClassInfo(obj) {//打开班级详情组件
this.classObjOption = obj;
this.isShowClassInfo = true;
},
//关闭班级信息弹窗
closeClass() {
this.isShowClassInfo = false
},
//刷新
refreshClass() {
},
} }
} }
</script> </script>
......
<template> <template>
<div class="page-body myOrder"> <div class="page-body myOrder">
<div class="row col"> <div class="row col" style="height: 40px">
<div class="row tis"> <div class="row col" style="justify-content: space-between;align-items: center;margin-bottom: 10px" >
<div class="tis-k" style="background: #2961FE"></div>
<span> <div>
<template v-if="data&& data.ClassInfo"> <template v-if="data&& data.ClassInfo">
{{data.ClassInfo.ClassName}} {{data.ClassInfo.ClassName}}
</template> </template>
</span> </div>
</div> <div class="row" style="align-items: center">
<div class="row tis"> <span>带班老师</span>
<div class="tis-k" style="background: #02C499"></div> <img :src="data.ClassInfo&&data.ClassInfo.TeacherIcon?data.ClassInfo.TeacherIcon:''" style="width:30px;height: 30px;border-radius: 50%;margin: 0 10px" />
<span> <span v-if="data&& data.ClassInfo" style="color:#2961FE;font-weight: bold">
<template v-if="data&& data.ClassInfo">
{{data.ClassInfo.TeacherName}} {{data.ClassInfo.TeacherName}}
</template> </span>
</span> </div>
</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>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<orderlist :dataList="dataList" :cancelList="CancelList" @success="refreshClassOrder"></orderlist> <orderlist :dataList="dataList" ref="orderL" :cancelList="CancelList" @success="refreshClassOrder"></orderlist>
</div> </div>
</div> </div>
</template> </template>
...@@ -57,17 +48,19 @@ ...@@ -57,17 +48,19 @@
if (this.$route.query.ClassId) { if (this.$route.query.ClassId) {
this.ClassId = this.$route.query.ClassId this.ClassId = this.$route.query.ClassId
this.msg.ClassId = this.ClassId; this.msg.ClassId = this.ClassId;
} }
this.getList();
}, },
mounted() { mounted() {
this.getList();
}, },
methods: { methods: {
//获取菜单分页列表 //获取菜单分页列表
getList() { getList() {
this.loading = true; this.loading = true;
quertClassOrderList(this.msg).then(res => { quertClassOrderList(this.msg).then(res => {
this.loading = false
this.data = res.Data; this.data = res.Data;
if (this.data && this.data.OrderList && this.data.OrderList.NorList) { if (this.data && this.data.OrderList && this.data.OrderList.NorList) {
this.dataList = this.data.OrderList.NorList; this.dataList = this.data.OrderList.NorList;
...@@ -77,7 +70,9 @@ ...@@ -77,7 +70,9 @@
}) })
if(OrderIds.length>0){ if(OrderIds.length>0){
OrderIds = OrderIds.join(',') OrderIds = OrderIds.join(',')
this.getOrderFinanceList(OrderIds,1) // this.getOrderFinanceList(OrderIds,1)
this.$refs.orderL.getOrderFinanceList(OrderIds,1)
} }
} }
...@@ -89,9 +84,12 @@ ...@@ -89,9 +84,12 @@
}) })
if(OrderIds.length>0){ if(OrderIds.length>0){
OrderIds = OrderIds.join(',') OrderIds = OrderIds.join(',')
this.getOrderFinanceList(OrderIds,2) // this.getOrderFinanceList(OrderIds,2)
this.$refs.orderL.getOrderFinanceList(OrderIds,2)
} }
} }
this.loading = false
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
...@@ -120,8 +118,6 @@ ...@@ -120,8 +118,6 @@
}) })
}) })
} }
}else{ }else{
this.loading = false; this.loading = false;
this.$message.error(res.data.message); this.$message.error(res.data.message);
......
...@@ -784,7 +784,7 @@ ...@@ -784,7 +784,7 @@
<el-table-column prop="dateRange" label="费用类型"> <el-table-column prop="dateRange" label="费用类型">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <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> <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>
</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