Commit 8861662a authored by 黄奎's avatar 黄奎

页面修改

parent 0d7265f5
<template>
<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="OrderMsg.GuestNum" type="number"
@input="peopleNumber" class="col-12" label="人数" :rules="[val => !!val || '请填写人数']" />
<q-input filled stack-label :dense="false" v-model="OrderMsg.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="OrderMsg.OrderSource"
:options="SourceEnumList" emit-value map-options label="客人来源" />
<q-input filled stack-label :dense="false" v-model="OrderMsg.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>
</template>
<script>
import {
getClassOrderInfo, //获取订单操作日志列表
} from '../../api/sale/sale'
export default {
name: "editorder-form",
props: {
saveObj: {
type: Object,
default: null,
}
},
data() {
return {
dialog: true,
tab: '1',
OrderMsg: {
ClassId: 0, //班级编号
GuestNum: 0, //人数
Unit_Price: 0,
PreferPrice: 0,
OrderSource: 0,
SaleRemark: "",
Class_Price: 0,
},
StepPriceList: [],
UnitPrice: 0,
}
},
created() {
},
methods: {
//获取订单信息
getOrderInfo() {
getClassOrderInfo({
OrderId: saveObj.OrderId
}).then(res => {
if (res.Code == 1) {
this.OrderMsg.ClassId = res.Data.OrderInfo.ClassId;
this.OrderMsg.GuestNum = res.Data.OrderInfo.GuestNum;
this.OrderMsg.Unit_Price = res.Data.OrderInfo.Unit_Price;
this.OrderMsg.PreferPrice = res.Data.OrderInfo.PreferPrice;
this.OrderMsg.OrderSource = res.Data.OrderInfo.OrderSource;
this.OrderMsg.SaleRemark = res.Data.OrderInfo.SaleRemark;
this.OrderMsg.Class_Price = res.Data.OrderInfo.Class_Price;
this.UnitPrice = this.OrderMsg.Unit_Price
this.StepPriceList = res.Data.StepPriceList;
this.dialog = true
}
})
}
}
}
</script>
<template>
<tbody>
</tbody>
</template>
<template>
<div>
<table class="enrollTotalSearchTable" border="0" cellspacing="0" cellpadding="0" style="">
<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="dataList && dataList.length==0" :colspan="11" align="center">暂无数据</td>
</tr>
<tbody v-for="(item,index) in dataList" :key="index">
<tr>
<td :rowspan="3" style="text-align: left">
<div style="font-size: 18px;color: #2961FE;margin-bottom: 20px;font-weight: bold"
@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;">{{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" color="accent" style="font-weight:400" label="编辑"
@click="editOrder(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>收款单据:</div>
</div>
</div>
</td>
</tr>
</tbody>
<tbody>
</tbody>
<!--取消订单-->
</table>
<!--修改订单-->
<editOrder-form v-if="isShowEditOrderForm" :save-obj="orderObj" @close="closeMOSaveForm"></editOrder-form>
</div>
</template>
<script>
import editOrderform from '../../components/sale/editOrder-form'
export default {
comments: {
editOrderform
},
props: {
//正常订单
dataList: {
type: Array,
default: null
},
//取消订单
cancelList: {
type: Array,
default: null
},
},
data() {
return {
isShowEditOrderForm: false, //是否显示订单修改
orderObj: {}, //订单信息
}
},
created() {
},
mounted() {
},
methods: {
//关闭订单详情
closeMOSaveForm() {
this.isShowEditOrderForm = false;
},
//显示修改订单
editOrder(item) {
this.orderObj = item;
this.isShowEditOrderForm = true;
}
}
}
</script>
......@@ -3,20 +3,20 @@
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.ClassName" label="班级名称"
@clear="getClassList" />
<q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.ClassName"
label="班级名称" @clear="getClassList" />
</div>
<div class="col-3">
<q-select @input="getClassList" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.ClassStatus" :options="classStatusList" emit-value map-options label="课程状态" />
</div>
<div class="col-3">
<q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.TeacherName" label="带班老师"
@clear="getClassList" />
<q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.TeacherName"
label="带班老师" @clear="getClassList" />
</div>
<div class="col-3">
<q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.CourseName" label="学习课程"
@clear="getClassList" />
<q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.CourseName"
label="学习课程" @clear="getClassList" />
</div>
<div class="col-3">
<q-select @input="getClassList" standout="bg-primary text-white" option-value="SId" option-label="SName"
......@@ -34,7 +34,8 @@
<q-td auto-width :props="props">
<q-avatar size="md" style="background:#d4dfff;color:#2961FE;font-weight:bold;" v-if="props.row.ClassName">
{{GetFirst(props.row.ClassName)}}</q-avatar>
<span style="color:#2961FE;margin-left:10px;cursor:pointer;" @click="getClassInfo(props.row)" title="点击查看详情">{{props.row.ClassName}}</span>
<span style="color:#2961FE;margin-left:10px;cursor:pointer;" @click="getClassInfo(props.row)"
title="点击查看详情">{{props.row.ClassName}}</span>
</q-td>
</template>
<template v-slot:body-cell-TeacherName="props">
......@@ -49,15 +50,15 @@
<i class="iconfont icon-ren-" style="color:#3FC4FF;margin-left:30px;"></i>当前 <span
style="color:#3FC4FF">{{props.row.OrderStudentCount}}</span>
<q-linear-progress rounded size="20px"
:value="getProgress(props.row.OrderStudentCount,props.row.ClassPersion)" style="background-color:#EEEEEF;color:#3FC4FF"
class="q-mt-sm" />
:value="getProgress(props.row.OrderStudentCount,props.row.ClassPersion)"
style="background-color:#EEEEEF;color:#3FC4FF" class="q-mt-sm" />
</q-td>
</template>
<template v-slot:body-cell-CompleteProgress="props">
<q-td auto-width :props="props">
已进行{{props.row.CompleteProgress}}%
<q-linear-progress rounded size="20px" :value="getProgress(props.row.CompleteProgress,100)" style="background-color:#EEEEEF;color:#3FC4FF"
class="q-mt-sm" />
<q-linear-progress rounded size="20px" :value="getProgress(props.row.CompleteProgress,100)"
style="background-color:#EEEEEF;color:#3FC4FF" class="q-mt-sm" />
</q-td>
</template>
<template v-slot:bottom>
......@@ -66,7 +67,7 @@
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="订单中心"></q-btn>
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="订单中心" @click="gotoOrder(props.row)"></q-btn>
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="收支明细"></q-btn>
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditCourse(props.row)" />
......@@ -162,7 +163,7 @@
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage:12,
rowsPerPage: 12,
ClassName: '', //班级名称
ClassStatus: 0, //班级状态
TeacherName: '', //带班老师
......@@ -175,7 +176,7 @@
schoolList: [],
pageCount: 0,
classObjOption: null,
isShowClassInfo:false, //是否显示课程信息
isShowClassInfo: false, //是否显示课程信息
}
},
created() {
......@@ -186,6 +187,13 @@
this.getClassList();
},
methods: {
gotoOrder(item) {
console.log("item", item);
var tempStr = '/course/classorder?ClassId=' + item.ClassId;
this.$router.push({
path: tempStr
});
},
//获取校区列表
getSchool() {
getSchoolDropdown({}).then(res => {
......@@ -251,23 +259,23 @@
},
//获取进度条
getProgress(num, total) {
if (num == 0 || total == 0){
return 0;
if (num == 0 || total == 0) {
return 0;
}
return (Math.round(num / total * 100) / 100.00);
},
//关闭班级信息弹窗
closeClass(){
closeClass() {
this.isShowClassInfo = false
},
//刷新
refreshClass(){
refreshClass() {
},
//点击班级名称
getClassInfo(obj){
this.classObjOption=obj;
this.isShowClassInfo=true;
getClassInfo(obj) {
this.classObjOption = obj;
this.isShowClassInfo = true;
}
}
}
......
......@@ -3,785 +3,86 @@
<div class="row col">
<div class="row tis">
<div class="tis-k" style="background: #2961FE"></div>
<span>班级名称</span>
<span>
<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>带班老师</span>
<span>
<template v-if="data&& data.ClassInfo">
{{data.ClassInfo.TeacherName}}
</template>
</span>
</div>
<div class="row tis">
<div class="tis-k" style="background: #F28C1D"></div>
<span>带班老师头像</span>
<span>
<template v-if="data&& data.ClassInfo">
<img :src='data.ClassInfo.TeacherIcon' style="width:40px;height:40px;" />
</template>
</span>
</div>
</div>
<div class="page-content">
<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"
@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;">{{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" color="accent" style="font-weight:400" 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>收款单据:</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<orderlist :dataList="dataList" :cancelList="CancelList" ></orderlist>
</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>
</div>
</template>
<script>
import {
quertClassOrderList
} from '../../api/sale/sale';
import {
queryEmployee
} from '../../api/users/user'
import {
queryCourseDropdownList,
} from '../../api/course/index'
import myOrderForm from '../../components/sale/myOrder-form'
export default {
import orderlist from '../../components/sale/orderlist'
export default {
components: {
myOrderForm
orderlist
},
data() {
return {
dialog: false,
data: {},
loading: false,
msg: {
ClassId: 1
ClassId: 0
},
alert: false,
CareOfmsg: {
model: '',
OrderId: 0,
},
saveLoading: false,
enrollMsg: {},
SourceEnumList: [],
StepPriceList: [],
UPrice: false,
UnitPrice: 0, //用于可以输入单价的验证
isShowmyorderForm: false,
myorderObjOption: {}
//正常订单
dataList: [],
//取消订单
CancelList: [],
}
},
created() {
if (this.$route.query.ClassId) {
this.ClassId = this.$route.query.ClassId
this.msg.ClassId = this.ClassId;
}
},
mounted() {
this.getList();
},
methods: {
goOrderdetails(item) {
this.myorderObjOption = item;
this.isShowmyorderForm = true;
},
closeMOSaveForm() {
this.isShowmyorderForm = false;
},
//获取菜单分页列表
getList() {
this.loading = true;
quertClassOrderList(this.msg).then(res => {
this.loading = false
this.data = res.Data
}).catch(() => {
this.loading = false
})
},
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
this.data = res.Data;
if (this.data && this.data.OrderList && this.data.OrderList.NorList) {
this.dataList = this.data.OrderList.NorList;
}
} 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
})
if (this.data && this.data.OrderList && this.data.OrderList.CancelList) {
this.CancelList = this.data.OrderList.CancelList;
}
console.log("data", this.data);
}).catch(() => {
this.loading = false
})
}
},
}
}
</script>
<style>
li {
list-style-type: none;
}
.myOrder ul {
padding: 0px
}
.myOrder .price-popup {
border-radius: 4px;
}
.myOrder .el-range-editor .el-range-input {
background: none;
}
.myOrder .el-range-editor.el-input__inner {
background-color: transparent;
}
.myOrder .q-mb-md {
margin-bottom: 0;
}
.myOrder .stics {
padding: 10px 20px;
background: #DDDEE0;
border-radius: 4px;
font-size: 14px;
color: #000000;
font-weight: bold
}
.myOrder .stics .stics-name {
color: #2D2D2D;
font-weight: 600;
margin-right: 10px
}
.myOrder .tis {
margin: 10px 0;
align-items: center
}
.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 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
}
</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