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 tis"> <div class="row" style="align-items: center">
<div class="tis-k" style="background: #02C499"></div> <span>带班老师</span>
<span> <img :src="data.ClassInfo&&data.ClassInfo.TeacherIcon?data.ClassInfo.TeacherIcon:''" style="width:30px;height: 30px;border-radius: 50%;margin: 0 10px" />
<template v-if="data&& data.ClassInfo"> <span v-if="data&& data.ClassInfo" style="color:#2961FE;font-weight: bold">
{{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>
......
...@@ -100,229 +100,7 @@ ...@@ -100,229 +100,7 @@
</div> </div>
<div class="page-content" > <div class="page-content" >
<orderlist :dataList="data.List" @success="refreshClassOrder" ref="orderL"></orderlist>
<table class="enrollTotalSearchTable" border="0" cellspacing="0" cellpadding="0" style="" v-loading='loading'>
<tr>
<th width="12%">单号</th>
<th width="8%">人数</th>
<th width="8%">单价</th>
<th width="8%">成交</th>
<th width="8%">应收总额</th>
<th width="8%">实收</th>
<th width="8%">优惠</th>
<th width="8%">退款</th>
<th width="8%">待收金额</th>
<th width="8%">状态</th>
<th >操作</th>
</tr>
<tr>
<td v-show="data.List && data.List.length==0" :colspan="11" align="center">暂无数据</td>
</tr>
<tbody v-for="(item,index) in data.List" :key="index">
<tr>
<td :rowspan="3" style="text-align: left">
<div style="font-size: 18px;color: #2961FE;margin-bottom: 20px;font-weight: bold;cursor: pointer;" @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;cursor: pointer;" @click="getClassInfo(item)">{{item.ClassName}}</div>
</td>
<td style="border:none">{{item.GuestNum}}人</td>
<td style="border:none">{{item.Class_Price.toFixed(2)}}</td>
<td :style="{color:item.Class_Price!=item.Unit_Price?'#f5576c':'','border':'none'}">{{item.Unit_Price.toFixed(2)}}</td>
<td style="border:none">{{item.PreferPrice.toFixed(2)}}</td>
<td style="border:none">{{item.Income.toFixed(2)}}</td>
<td style="color:#f5576c;border:none">{{item.DiscountMoney.toFixed(2)}}</td>
<td style="border:none">{{item.Refund.toFixed(2)}}</td>
<td style="color:#2961FE;border:none">{{item.DueInMoney.toFixed(2)}}</td>
<td style="border:none">
<div style="background: rgba(2, 196, 153, 0.2);width: 80px;border-radius: 2px;text-align: center">
<span style="color: #02C499">{{item.OrderStateName}}</span>
</div>
</td>
<td style="border:none">
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #02C499" label="编辑" @click="edit(item)"
/>
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;">
<q-list>
<q-item clickable v-close-popup >
<q-item-section @click="gostudent(item)">
<q-item-label>学生名单</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup >
<q-item-section @click="transfer(item)">
<q-item-label>转交订单</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup >
<q-item-section @click="alterremarks(item.SaleRemark,item,1)">
<q-item-label>销售备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup >
<q-item-section @click="alterremarks(item.TeacherRemark,item,2)">
<q-item-label>教务备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup >
<q-item-section @click="alterremarks(item.RectorRemark,item,3)">
<q-item-label>校长备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup >
<q-item-section @click="alterremarks(item.DirectorRemark,item,4)">
<q-item-label>经理备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup >
<q-item-section @click="cancel(item)">
<q-item-label>取消</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup >
<q-item-section>
<q-item-label>退课</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</td>
</tr>
<tr>
<td :colspan="11" style="text-align: left">
学生名单:
<span v-for="(x,j) in item.GuestList" :index="j" v-if="item.GuestList.length>0" style="color:#2961FE;">{{x.GuestName}} </span>
<span v-if="item.GuestList.length==0">暂无</span>
</td>
</tr>
<tr>
<td :colspan="11" style="height: 168px;text-align: left" >
<div class="col row remarks q-gutter-x-md">
<div class="col">
<div>销售备注:</div>
<div class="remarks-b">
<div v-if="item.SaleRemark!=null||item.SaleRemark!=''">
<div>{{item.SaleRemark}}</div>
<div class="remarks-b-b" >
<span class="iconfont icon-xiangxia" style="color: #2961FE;font-size: 10px" v-if="item.SaleRemarkList&&item.SaleRemarkList.length>0"></span>
<q-popup-proxy >
<q-banner>
<div style="width: 500px;" >
<div>销售备注</div>
<div v-for="(xq,jq) in item.SaleRemarkList" :index="jq" style=" margin-top: 10px;background: #e6e6e6;padding: 5px;font-size: 12px">
<div>{{xq.Content}}</div>
<div style="text-align: right">{{xq.CreateBy}} {{xq.CreateTime}}</div>
</div>
</div>
</q-banner>
</q-popup-proxy>
</div>
</div>
<span v-if="item.SaleRemark==null||item.SaleRemark==''">暂无</span>
</div>
</div>
<div class="col">
<div>教务备注:</div>
<div class="remarks-b ">
<div v-if="item.TeacherRemark!=null||item.TeacherRemark!=''">
<div>{{item.TeacherRemark}}</div>
<div class="remarks-b-b" >
<span class="iconfont icon-xiangxia" style="color: #2961FE;font-size: 10px" v-if="item.TeacherRemarkList&&item.TeacherRemarkList.length>0"></span>
<q-popup-proxy >
<q-banner>
<div style="width: 500px;" >
<div>教务备注</div>
<div v-for="(xq,jq) in item.TeacherRemarkList" :index="jq" style=" margin-top: 10px;background: #e6e6e6;padding: 5px;font-size: 12px">
<div>{{xq.Content}}</div>
<div style="text-align: right">{{xq.CreateBy}} {{xq.CreateTime}}</div>
</div>
</div>
</q-banner>
</q-popup-proxy>
</div>
</div>
<span v-if="item.TeacherRemark==null||item.TeacherRemark==''">暂无</span>
</div>
</div>
<div class="col">
<div>校长备注:</div>
<div class="remarks-b ">
<div v-if="item.RectorRemark!=null ||item.RectorRemark!=''">
<div>{{item.RectorRemark}}</div>
<div class="remarks-b-b" >
<span class="iconfont icon-xiangxia" style="color: #2961FE;font-size: 10px" v-if="item.RectorRemarkList&&item.RectorRemarkList.length>0"></span>
<q-popup-proxy >
<q-banner>
<div style="width: 500px;" >
<div>校长备注</div>
<div v-for="(xq,jq) in item.RectorRemarkList" :index="jq" style=" margin-top: 10px;background: #e6e6e6;padding: 5px;font-size: 12px">
<div>{{xq.Content}}</div>
<div style="text-align: right">{{xq.CreateBy}} {{xq.CreateTime}}</div>
</div>
</div>
</q-banner>
</q-popup-proxy>
</div>
</div>
<span v-if="item.RectorRemark==null||item.RectorRemark==''">暂无</span>
</div>
</div>
<div class="col">
<div>总经理备注:</div>
<div class="remarks-b ">
<div v-if="item.DirectorRemark!=null||item.DirectorRemark!=''">
<div>{{item.DirectorRemark}}</div>
<div class="remarks-b-b" >
<span class="iconfont icon-xiangxia" style="color: #2961FE;font-size: 10px" v-if="item.DirectorRemarkList&&item.DirectorRemarkList.length>0"></span>
<q-popup-proxy >
<q-banner>
<div style="width: 500px;" >
<div>总经理备注</div>
<div v-for="(xq,jq) in item.DirectorRemarkList" :index="jq" style=" margin-top: 10px;background: #e6e6e6;padding: 5px;font-size: 12px">
<div>{{xq.Content}}</div>
<div style="text-align: right">{{xq.CreateBy}} {{xq.CreateTime}}</div>
</div>
</div>
</q-banner>
</q-popup-proxy>
</div>
</div>
<span v-if="item.DirectorRemark==null||item.DirectorRemark==''">暂无</span>
</div>
</div>
<div class="col">
<div class="row" style="justify-content: space-between">
<span>收款单据:</span>
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #02C499" label="修改" @click="chanceType(item,1)"/>
</div>
<div class="row wrap" >
<div class="finance row" v-for="(x,j) in item.FinanceList" :index="j" :style="{
background:x.ColorState==1 ? 'rgba(41, 97, 254, 0.2)':(x.ColorState==2 ? 'rgba(2, 196, 153, 0.2)':(x.ColorState==3 ? 'rgba(242, 140, 29, 0.2)':'rgba(63, 196, 255, 0.2)')),
color: x.ColorState==1 ? '#2961FE':(x.ColorState==2 ? '#02C499':(x.ColorState==3 ? '#F28C1D':'#3FC4FF'))}">
<span style="cursor: pointer" @click="goOrderdetails(item,4)">{{x.FrID}}</span>
</div>
</div>
<div class="row" style="justify-content: space-between">
<span>付款单据:</span>
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #02C499" label="修改" @click="chanceType(item,2)"/>
</div>
<div class="row wrap" >
<div class="finance row" v-for="(x,j) in item.RefundFinanceList" :index="j" :style="{
background:x.ColorState==1 ? 'rgba(41, 97, 254, 0.2)':(x.ColorState==2 ? 'rgba(2, 196, 153, 0.2)':(x.ColorState==3 ? 'rgba(242, 140, 29, 0.2)':'rgba(63, 196, 255, 0.2)')),
color: x.ColorState==1 ? '#2961FE':(x.ColorState==2 ? '#02C499':(x.ColorState==3 ? '#F28C1D':'#3FC4FF'))}">
<span style="cursor: pointer" @click="goOrderdetails(item,4)">{{x.FrID}}</span>
</div>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div class="row" style="justify-content: flex-end;padding: 5px 20px"> <div class="row" style="justify-content: flex-end;padding: 5px 20px">
<q-pagination <q-pagination
v-model="msg.pageIndex" v-model="msg.pageIndex"
...@@ -333,78 +111,8 @@ ...@@ -333,78 +111,8 @@
</q-pagination> </q-pagination>
</div> </div>
</div> </div>
<q-dialog v-model="alert">
<q-card style="width: 400px;max-width:500px;">
<q-card-section>
<div class="text-h6">转交订单</div>
</q-card-section>
<q-card-section>
<div class="col row" style="justify-content: center;width: 100%">
<q-select
class=""
filled
label="转交人"
v-model="CareOfmsg.model"
use-input
hide-selected
fill-input
option-value="Id"
option-label="EmployeeName"
:options="options"
@filter="filterFn"
style="width: 250px; padding-bottom: 32px"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
No results
</q-item-section>
</q-item>
</template>
</q-select>
</div>
</q-card-section>
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="alert=false" />
<q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading"
@click="save_t()" />
</q-card-actions>
</q-card>
</q-dialog>
<q-dialog v-model="dialog" maximized full-height seamless position="right" >
<q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog">
<div class="drawerTop">
<div style="display:flex;align-items:center;margin:20px 0 0 20px;">
<span class="drawer_Span">修改订单</span>
</div>
</div>
<div style="padding:20px 15px;">
<q-input filled stack-label maxlength="100" :dense="false" v-model="enrollMsg.GuestNum" type="number" @input="peopleNumber"
class="col-12" label="人数" :rules="[val => !!val || '请填写人数']" />
<q-input filled stack-label :dense="false" v-model="enrollMsg.Unit_Price" :disable="UPrice==true?false:true" @blur="priceNumber"
class="col-12" label="成交单价" :rules="[val => !!val || '请填成交单价']" />
<q-toggle v-model="UPrice" label="高于定价收生" class="q-mb-md" @change="resetSearch"/>
<q-select standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="enrollMsg.OrderSource" :options="SourceEnumList" emit-value map-options label="客人来源" />
<q-input filled stack-label :dense="false" v-model="enrollMsg.SaleRemark" style="margin-top: 20px" type="textarea"
class="col-12" label="备注" />
<div style="margin:30px 10px 0 0;">
<q-btn class="q-mr-md" label="取消" @click="dialog=false" />
<q-btn color="accent" class="q-mr-md" label="保存" @click="saveSatMsg()" />
</div>
</div>
</q-card>
<div class="dialog-out-close" @click="dialog=false"
style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;">
<q-icon name="iconfont icon-jujue1" size="26px" />
</div>
</q-dialog>
<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> <classinfo-form v-if="isShowClassInfo" :seting-obj="classObjOption" @close="closeClass" @success="refreshClass"></classinfo-form>
</div> </div>
...@@ -428,12 +136,15 @@ ...@@ -428,12 +136,15 @@
} from '../../api/course/index' } from '../../api/course/index'
import myOrderForm from '../../components/sale/myOrder-form' import myOrderForm from '../../components/sale/myOrder-form'
import classinfoForm from '../../components/course/classinfo-form'; import classinfoForm from '../../components/course/classinfo-form';
import orderlist from '../../components/sale/orderlist'
export default { export default {
components: { components: {
myOrderForm, myOrderForm,
classinfoForm classinfoForm,
orderlist
}, },
data() { data() {
return { return {
...@@ -444,7 +155,7 @@ ...@@ -444,7 +155,7 @@
dateList2:[],//开班时间 dateList2:[],//开班时间
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 8,
OrderId:0,//订单号 OrderId:0,//订单号
GuestName:'',//客人名称 GuestName:'',//客人名称
ClassName: '', //班级名称 ClassName: '', //班级名称
...@@ -464,20 +175,7 @@ ...@@ -464,20 +175,7 @@
OrderState: [], OrderState: [],
pageCount: 0, pageCount: 0,
ClassList: [], //关联课程下拉数据 ClassList: [], //关联课程下拉数据
alert:false,
options:[], options:[],
CareOfmsg:{
model:'',
OrderId:0,
},
saveLoading:false,
enrollMsg:{},
SourceEnumList:[],
StepPriceList:[],
UPrice:false,
UnitPrice:0,//用于可以输入单价的验证
isShowmyorderForm:false,
myorderObjOption:{}, myorderObjOption:{},
classObjOption: null, classObjOption: null,
isShowClassInfo: false, //是否显示课程信息 isShowClassInfo: false, //是否显示课程信息
...@@ -486,30 +184,13 @@ ...@@ -486,30 +184,13 @@
created() { created() {
this.getOrderState(); this.getOrderState();
this.CourseList(); this.CourseList();
this.getOrderSEList()
}, },
mounted() { mounted() {
this.getList(); this.getList();
}, },
methods: { methods: {
goOrderdetails(item,tab){
item.tab=tab
this.myorderObjOption= item;
this.isShowmyorderForm = true;
},
closeMOSaveForm(){
this.isShowmyorderForm = false;
},
getOrderSEList(){
getOrderSourceEnumList({}).then(res => {
if (res.Code == 1) {
var tempArray = res.Data;
this.SourceEnumList = tempArray;
this.enrollMsg.OrderSource = tempArray[0].Id;
}
})
},
//订单状态 //订单状态
getOrderState() { getOrderState() {
getOrderStateEnumList({}).then(res => { getOrderStateEnumList({}).then(res => {
...@@ -570,12 +251,14 @@ ...@@ -570,12 +251,14 @@
getMyOrderPageList(this.msg).then(res => { getMyOrderPageList(this.msg).then(res => {
this.data = res.Data.PageData; this.data = res.Data.PageData;
let OrderIds=[] let OrderIds=[]
this.data.List.forEach(x=>{ this.data.List.forEach(x=>{
OrderIds.push(x.OrderId) OrderIds.push(x.OrderId)
}) })
OrderIds = OrderIds.join(',') OrderIds = OrderIds.join(',')
this.getOrderFinanceList(OrderIds) // this.getOrderFinanceList(OrderIds)
this.$refs.orderL.getOrderFinanceList(OrderIds,1)
this.pageCount = res.Data.PageCount; this.pageCount = res.Data.PageCount;
}).catch(() => { }).catch(() => {
...@@ -601,245 +284,12 @@ ...@@ -601,245 +284,12 @@
} }
},err=>{}) },err=>{})
}, },
gostudent(item){//跳转到学生名单
var tempStr = '/sale/studentList?OrderId='+item.OrderId+'&ClassId='+item.ClassId;
this.$router.push({
path: tempStr
});
},
transfer(item){//转交
this.alert =true;
this.CareOfmsg.OrderId = item.OrderId
},
alterremarks(remark,item,type){//修改销售备注
let msg={
OrderId:item.OrderId,
Type:type,
Remark:remark
}
let title=''
if(type==1){title='修改销售备注'}else if(type==2){title='修改教务备注'}else if(type==3){title='修改校长备注'}else if(type==4){title='修改总经理备注'}
this.$q.dialog({
title: title,
message: '',
prompt: {
model: remark,
type: 'textarea' // optional
},
cancel: true,
persistent: true
}).onOk(data => {
msg.Remark = data
updateOrderRemark(msg).then(res => {
if(res.Code==1){
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
})
this.getList()
}
}).catch(() => {
})
}).onCancel(() => {
}).onDismiss(() => {
})
},
filterFn(val,update){
var qMsg = {
EmployeeName: val
}
update(() => {
queryEmployee(qMsg).then(res => {
if(res.Code==1){
this.options = res.Data;
}
}).catch(() => {
})
})
},
save_t(){
let msg = {
OrderId:this.CareOfmsg.OrderId,
CareOfPeople:this.CareOfmsg.model.Id
}
setClassOrderCareOf(msg).then(res => {
if(res.Code==1){
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '转交成功',
position: 'top'
})
this.getList()
this.alert = false
}
}).catch(() => {
})
},
cancel(item){//取消订单
let that = this
this.$q.dialog({
title: '提示信息',
message: '<span style="color: #f5576c">是否取消此订单</span>',
cancel: true,
persistent: true,
html: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
cancelClassOrder({OrderId:item.OrderId}).then(res => {
if (res.Code == 1) {
that.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
})
this.getList()
}
})
}).onCancel(() => {
});
},
edit(item){
getClassOrderInfo({OrderId:item.OrderId}).then(res => {
if (res.Code == 1) {
this.enrollMsg.ClassId = res.Data.OrderInfo.ClassId;
this.enrollMsg.GuestNum = res.Data.OrderInfo.GuestNum;
this.enrollMsg.Unit_Price = res.Data.OrderInfo.Unit_Price ;
this.enrollMsg.PreferPrice = res.Data.OrderInfo.PreferPrice;
this.enrollMsg.OrderSource = res.Data.OrderInfo.OrderSource;
this.enrollMsg.SaleRemark = res.Data.OrderInfo.SaleRemark;
this.enrollMsg.Class_Price = res.Data.OrderInfo.Class_Price;
this.UnitPrice = this.enrollMsg.Unit_Price
this.StepPriceList = res.Data.StepPriceList;
this.dialog=true
}
})
},
priceNumber(val){//大于的时候赋值
if(this.enrollMsg.Unit_Price<this.UnitPrice ){
this.enrollMsg.Unit_Price = this.UnitPrice
}
},
peopleNumber(val){
if(val==''){
this.enrollMsg.GuestNum=1
}
this.enrollMsg.Unit_Price = this.countPrice(this.enrollMsg.GuestNum)
this.$forceUpdate()
this.UnitPrice = this.enrollMsg.Unit_Price
},
countPrice(num){
let array =[] ;
if(this.StepPriceList && this.StepPriceList.length){
this.StepPriceList.forEach(x=>{
let obj ={
PersionNum:x.PersionNum,
PersionPrice:x.PersionPrice,
}
array.push(obj)
})
let fz =false
let a =0;
array.forEach(x=>{
if(x.PersionNum==num){
fz=true;
a = x.PersionPrice
}
})
if(fz==false){
array.push({PersionNum:num})
array.sort(this.getSortFun('asc', 'PersionNum'));//升序排序
var idx;
for(var i=0;i<array.length;i++){
if(array[i].PersionNum == num){
idx = i;
}
}
idx = Math.max(0,idx - 1);
if(array[idx].PersionPrice){
return array[idx].PersionPrice
}else {
return this.enrollMsg.Class_Price
}
}else {
return a
}
}else {
return this.enrollMsg.Class_Price
}
},
getSortFun(order, sortBy){
var ordAlpah = (order == 'asc') ? '>' : '<';
var sortFun = new Function('a', 'b', 'return a.' + sortBy + ordAlpah + 'b.' + sortBy + '?1:-1');
return sortFun;
},
saveSatMsg(){//修改订单
this.enrollMsg.PreferPrice = this.enrollMsg.GuestNum*this.enrollMsg.Unit_Price
setClassOrder(this.enrollMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '修改成功!',
position: 'top'
})
this.getList()
this.dialog = false
}else {
this.$q.notify({
type: 'negative',
position: "top",
message: res.Message
})
}
}).catch(() => {
}) //刷新页面
refreshClassOrder() {
this.getList();
}, },
chanceType(obj,type){
let TCIDARR=[]
TCIDARR.push(obj.ClassId)
let orderObj = {
OrderID:obj.OrderId,
OrderSource:17,
Obj: {},
SourceID:0,
TCIDList: TCIDARR
}
this.$router.push({
path: '/financial/financalDocument/ChoiceAddFinancialDocuments',
query:{
"Type":type,
"companyID":this.getLocalStorage().School_Id,
"path": "",
'blank':'y',
'orderObj':JSON.stringify(orderObj),
'tradeWay':obj.tradeWay,
}
});
},
getClassInfo(obj) {//打开班级详情组件 getClassInfo(obj) {//打开班级详情组件
this.classObjOption = obj; this.classObjOption = obj;
this.isShowClassInfo = true; this.isShowClassInfo = true;
...@@ -877,139 +327,5 @@ ...@@ -877,139 +327,5 @@
.myOrder .tis {margin:10px 0;align-items: center} .myOrder .tis {margin:10px 0;align-items: center}
.myOrder .tis .tis-k{width: 10px;height: 10px;margin-right: 8px} .myOrder .tis .tis-k{width: 10px;height: 10px;margin-right: 8px}
.myOrder .tis span{font-size: 14px;color: #2D2D2D;font-weight: 600;margin-right: 20px} .myOrder .tis span{font-size: 14px;color: #2D2D2D;font-weight: 600;margin-right: 20px}
.myOrder table {
padding: 10px 0 ;
width: 100%;
background-color: #ededed;
border-collapse: collapse;
border: 1px solid #d2d2d2;
font-size: 12px;
}
.myOrder table th {
background-color: #ededed;
height: 34px;
text-indent: 15px;
}
.myOrder table td {
background-color: #ffffff;
padding: 9px 15px;
color: #333333;
border: 1px solid rgba(138, 138, 138, 0.09);
text-align: center;
}
.myOrder table ._color_666 {
color: #666666;
}
.myOrder table tr._color_666 th {
padding: 9px 15px;
}
.myOrder table th {
background-color: #ededed;
height: 34px;
text-indent: 15px;
}
.myOrder table td {
background-color: #ffffff;
padding: 9px 15px;
color: #333333;
/*border: 1px solid #d2d2d2;*/
}
.myOrder table ._color_666 {
color: #666666;
}
.myOrder table tr._color_666 th {
padding: 9px 15px;
}
.myOrder .enrollTotalSearchTable {
width: 100%;
font-size: 14px;
color: #333;
border-bottom: 1px solid #cccccc;
border-right: 1px solid #cccccc;
border-collapse: collapse;
}
.myOrder .enrollTotalSearchTable tr {
/* border-bottom: 2px solid #333; */
}
.myOrder .enrollTotalSearchTable tr th {
background: #bdbdbd;
height: 30px;
font-size: 12px;
text-align: center;
border-top: 1px solid #cccccc;
border-left: 1px solid #cccccc;
}
.myOrder .enrollTotalSearchTable tr {
background: #fff;
text-align: left;
}
.myOrder .enrollTotalSearchTable tbody tr:last-child {
border-bottom: 2px solid #333;
}
.myOrder .enrollTotalSearchTable tr:first-child td:first-child {
border-bottom: 2px solid #333;
}
.myOrder .enrollTotalSearchTable tr td {
height: 66px;
padding: 10px;
/*border-top: 1px solid #cccccc;*/
/*border-left: 1px solid #cccccc;*/
}
.myOrder .enrollTotalSearchTable tr td>img {
width: 32px;
height: 32px;
border-radius: 16px;
vertical-align: middle;
margin-right: 5px;
}
.myOrder .enrollTotalSearchTable tr td p {
line-height: 20px;
}
.myOrder .remarks{
font-size: 14px;
color: #2D2D2D;
}
.myOrder .remarks-b{
width: 100%;
height: 94px;
background: #F0F5FB;
margin-top: 20px;
padding: 15px;
font-size: 12px;
color: #999999;
position: relative;
overflow: hidden;
display:-webkit-box;
line-height: 20px;
-webkit-line-clamp:4;
-webkit-box-orient:vertical ;
}
.myOrder .remarks-b-b{
text-align: right;position: absolute;right: 0px;bottom: 0px
}
.myOrder .on-left{
margin-right: 5px;
}
.myOrder .finance{
padding: 1px 10px;
align-items: center;
justify-content: center;
border-radius: 4px;
margin: 5px 3px 3px 0;
}
</style> </style>
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