Commit 72c300d0 authored by 罗超's avatar 罗超

1

parent f28105ab
......@@ -17,85 +17,17 @@
<q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog">
<div class="editOrderDrawerTop">
<div style="display:flex;align-items:center;margin-left:10px;">
<span class="drawer_Span">{{OrderMsg.OrderId>0?"修改订单":"立即下单"}}</span>
<span class="drawer_Span">{{OrderMsg.Id>0?"修改订单":"立即下单"}}</span>
</div>
</div>
<div style="padding:20px 15px;">
<q-input filled stack-label maxlength="100" :dense="false" @keyup.native="checkInteger(OrderMsg,'GuestNum')"
v-model="OrderMsg.GuestNum" @input="changePrice(),countPrice()" class="col-12" label="人数"
:rules="[val => !!val || '请填写人数']" :disable="modityOrderType==2" />
<template v-if="isChaBan==1">
<q-select filled option-value="CourseId" :disable="modityOrderType==2" option-label="CourseName"
ref="CourseId" v-model="OrderMsg.CourseId" :options="CourseList" emit-value map-options class="q-pb-lg"
:rules="[val => !!val || '请选择课程']" label="选择课程" @input="changePrice" />
<q-input filled stack-label :dense="false" v-model="OrderMsg.StartClassHours" :disable="modityOrderType==2"
@keyup.native="checkInteger(OrderMsg,'StartClassHours')" ref="StartClassHours" @input="countPrice"
class="col-12 q-pb-lg" label="起始课时" />
<q-input filled v-model="OrderMsg.EffectTime" ref="EffectTime" :rules="[val => !!val || '请填生效时间']"
class="col-6 q-pb-lg" :disable="modityOrderType==2" mask="date" label="生效时间">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy1" transition-show="scale" transition-hide="scale">
<q-date v-model="OrderMsg.EffectTime" @input="() => $refs.qDateProxy1.hide()" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
<q-select filled option-value="OrderId" option-label="CourseName" class="q-pb-lg"
:disable="modityOrderType==2" v-model="OrderMsg.UpOrderId" :options="beforeOrderList" emit-value map-options
label="前置订单">
<template v-slot:option="{ itemProps, itemEvents, opt, selected, toggleOption }">
<q-item v-bind="itemProps" v-on="itemEvents">
<q-item-section>
<q-item-label><span style="color:blue">{{opt.OrderId}}</span> {{opt.CourseName}} {{opt.ClassName}}
{{getStudent(opt.GuestList)}}</q-item-label>
</q-item-section>
</q-item>
</template>
</q-select>
</template>
<template v-if="modityOrderType==1">
<q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price"
:disable="IsShowUpPrice==true?false:true" @blur="countPrice" class="col-12" label="成交单价"
:rules="[val => !!val || '请填成交单价']" />
<q-toggle v-model="IsShowUpPrice" label="高于定价收生" class="q-mb-md" />
</template>
<template v-if="modityOrderType==2">
<q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" :disable="true" @input="countPrice"
class="col-12" label="成交单价" :rules="[val => !!val || '请填成交单价']" />
</template>
<template v-if="modityOrderType==3">
<q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" @input="countPrice" class="col-12"
label="成交单价" :rules="[val => !!val || '请填成交单价']" />
</template>
<q-input filled stack-label :disable="modityOrderType!=3" :dense="false" maxlength="10"
@keyup.native="checkPrice(OrderMsg,'PreferPrice')" v-model="OrderMsg.PreferPrice" class="col-12 q-pb-lg"
label="应收" />
<q-select :disable="modityOrderType==2" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="OrderMsg.OrderSource" :options="SourceEnumList" emit-value map-options class="q-pb-lg"
label="客人来源" />
<q-select :disable="(modityOrderType==2)" v-model="OrderMsg.HelpEnterId" :options="EmployeeList" filled
use-input label="协助老师" option-label="EmployeeName" option-value="Id" ref="EmployeeName" class="col-6 q-pb-lg"
emit-value map-options @filter="filterFn">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
<q-input :disable="(modityOrderType==2)" v-if="OrderMsg.OrderSource==3" filled stack-label :dense="false"
maxlength="50" v-model="OrderMsg.GeneralOccupation" class="col-12 q-pb-lg" label="一般同行" />
<q-input :disable="(modityOrderType==2)" v-if="OrderMsg.OrderSource==7" filled stack-label :dense="false"
maxlength="50" v-model="OrderMsg.EduOccupation" class="col-12 q-pb-lg" label="教育同行" />
<q-toggle :disable="(modityOrderType==2)" v-model="OrderMsg.IsLessPrice" :false-value="0" :true-value="1"
label="是否少价" class="q-mb-md" />
<q-input :disable="(modityOrderType==2)" v-if="OrderMsg.IsLessPrice==1"
@keyup.native="checkPrice(OrderMsg,'LessPrice')" maxlength="10" filled stack-label :dense="false"
v-model="OrderMsg.LessPrice" class="col-12" label="少价金额" />
<q-input filled stack-label :dense="false" v-model="OrderMsg.SaleRemark" style="margin-top: 20px"
<q-input filled stack-label maxlength="30" :dense="false"
v-model="OrderMsg.LinkMan" class="col-12" label="姓名"
:rules="[val => !!val || '请填写姓名']" />
<q-input filled stack-label maxlength="30" :dense="false"
v-model="OrderMsg.LinkTel" class="col-12" label="联系电话"
:rules="[val => !!val || '请填写联系电话']" />
<q-input filled stack-label :dense="false" v-model="OrderMsg.Remark" style="margin-top: 20px"
type="textarea" class="col-12" label="备注" />
<div style="margin:30px 10px 70px 0;">
<q-btn class="q-mr-md" label="取消" @click="closeEditOrder" />
......@@ -110,375 +42,41 @@
</q-dialog>
</template>
<script>
import {
getClassOrderInfo, //获取订单操作日志列表
getOrderSourceEnumList, //获取订单来源 枚举
setClassOrder, //修改订单
queryChaClassInfo,
GetSelectClassOrderList //获取前置下拉
} from '../../api/sale/sale'
import {
queryEmployee
} from '../../api/users/user'; //获取员工
import {
mapState
} from "vuex";
export default {
name: "editOrder-form",
props: {
saveObj: {
type: Object,
default: null,
},
//订单类型
orderType: {
type: Number,
default: 1,
},
//修改订单类型
modityOrderType: {
type: Number,
default: 0, //1-销售修改,2-OP修改,3-总经理修改
},
isChaBan: {
type: Number,
default: 0, //1-是插班报入
}
},
data() {
return {
IsShowEditOrder: true,
OrderMsg: {
ClassId: 0, //班级编号
GuestNum: 0, //人数
Unit_Price: 0,
PreferPrice: 0,
OrderSource: 0,
SaleRemark: "",
Class_Price: 0,
OrderId: 0,
OrderType: 0, //订单类型(1-班级课程订单,2-留学就业订单)
SourceId: 0, //来源编号
HelpEnterId: 0, //协助老师编号
GeneralOccupation: "", //一般同行
EduOccupation: "", //教育同行
IsLessPrice: 0, //是否少价 0 不少 1 少
LessPrice: 0, //少价金额
OrderNature: 1, //订单性质
OldPreferPrice: 0, //原实际应收
IsChaBan: 0, //是否插班报入(1-是)
CourseId: '', //课程编号
StartClassHours: 0, //已上课时
EffectTime: '', //生效时间
UpOrderId: 0, //前置订单编号
Id:0,
LinkMan:"",
LinkTel:"",
Remark:""
},
IsShowUpPrice: false, //是否显示高于定价
UnitPrice: 0,
SourceEnumList: [], //订单来源
EmployeeList: [], //员工列表
AllemployeeList: [], //所有员工列表
CourseList: [], //课程列表
courseObj: {}, //选择的课程
beforeOrderList: [], //前置订单数据
}
},
created() {
this.OrderMsg.IsChaBan = this.isChaBan;
this.initConfig();
this.getOrderSEList();
this.getEmployee();
this.getSelectClass();
var localStorageData = window.localStorage["loginUserInfo"];
let ActionMenuList = JSON.parse(localStorageData).data.ActionMenuList
if (ActionMenuList && ActionMenuList.length > 0) {
ActionMenuList.forEach(x => {
if (x.FunctionCode == 'E_ModifyStudyOrderPrice') {
}
})
}
},
mounted() {
this.initData()
this.OrderMsg.Id=this.saveObj.Id
},
watch: {
},
methods: {
//获取插班报入配置信息
initConfig() {
var qMsg = {
ClassId: 0
};
if (this.saveObj.ClassId) {
qMsg.ClassId = this.saveObj.ClassId;
}
queryChaClassInfo(qMsg).then(res => {
if (res.Code == 1) {
this.CourseList = res.Data.otherCourse;
if (this.saveObj && this.saveObj.OrderId > 0) {} else {
this.OrderMsg.StartClassHours = res.Data.finishHours;
}
if (this.OrderMsg && this.OrderMsg.CourseId) {
this.courseObj = this.CourseList.find(x => x.CourseId == this.OrderMsg.CourseId);
}
}
});
},
//选择课程切换价格
changePrice() {
let temp = this.CourseList.find(x => x.CourseId == this.OrderMsg.CourseId);
if (temp) {
this.courseObj = temp;
if (this.OrderMsg.GuestNum == 1) {
if (temp.CoursePriceList && temp.CoursePriceList.length > 0) {
if (temp.CoursePriceList[0].PriceType == 0) {
let DisCount = (100 - temp.CoursePriceList[0].PriceMoney) / 100;
this.OrderMsg.Unit_Price = temp.SellPrice * DisCount;
this.UnitPrice = temp.SellPrice * DisCount;
} else {
this.OrderMsg.Unit_Price = temp.SellPrice - item.CoursePriceList[0].PriceMoney;
this.UnitPrice = temp.SellPrice - item.CoursePriceList[0].PriceMoney;
}
} else {
this.OrderMsg.Unit_Price = temp.SellPrice;
this.UnitPrice = temp.SellPrice;
}
}
if (this.OrderMsg.GuestNum > 1) {
if (temp.CoursePriceList && temp.CoursePriceList.length > 0) {
if (temp.CoursePriceList[1].PriceType == 0) {
let DisCount = (100 - temp.CoursePriceList[1].PriceMoney) / 100;
this.OrderMsg.Unit_Price = temp.SellPrice * DisCount;
this.UnitPrice = temp.SellPrice * DisCount;
} else {
this.OrderMsg.Unit_Price = temp.SellPrice - item.CoursePriceList[1].PriceMoney;
this.UnitPrice = temp.SellPrice - item.CoursePriceList[1].PriceMoney;
}
} else {
this.OrderMsg.Unit_Price = temp.SellPrice;
this.UnitPrice = temp.SellPrice;
}
}
} else {
if (this.saveObj.ClassId) {
this.OrderMsg.ClassId = this.saveObj.ClassId;
}
if (this.saveObj.Unit_Price) {
this.OrderMsg.Unit_Price = this.saveObj.Unit_Price;
this.UnitPrice = this.saveObj.Unit_Price;
}
if (this.saveObj.SourceId) {
this.OrderMsg.SourceId = this.saveObj.SourceId;
}
this.courseObj = {};
}
this.countPrice();
},
initData() {
if (this.saveObj && this.saveObj.OrderId > 0) {
getClassOrderInfo({
OrderId: this.saveObj.OrderId
}).then(res => {
if (res.Code == 1) {
var tempData = res.Data.OrderInfo;
this.OrderMsg.ClassId = tempData.ClassId;
this.OrderMsg.GuestNum = tempData.GuestNum;
this.OrderMsg.Unit_Price = tempData.Unit_Price;
this.OrderMsg.PreferPrice = tempData.PreferPrice;
this.OrderMsg.OrderSource = tempData.OrderSource;
this.OrderMsg.SaleRemark = tempData.SaleRemark;
this.OrderMsg.Class_Price = tempData.Class_Price;
this.OrderMsg.OrderId = tempData.OrderId;
this.OrderMsg.OrderType = tempData.OrderType;
this.OrderMsg.SourceId = tempData.SourceId;
this.OrderMsg.HelpEnterId = tempData.HelpEnterId;
this.OrderMsg.GeneralOccupation = tempData.GeneralOccupation;
this.OrderMsg.EduOccupation = tempData.EduOccupation;
this.OrderMsg.IsLessPrice = tempData.IsLessPrice;
this.OrderMsg.LessPrice = tempData.LessPrice;
this.OrderMsg.OrderNature = tempData.OrderNature;
this.OrderMsg.OldPreferPrice = tempData.OldPreferPrice;
this.OrderMsg.CourseId = tempData.CourseId;
this.OrderMsg.StartClassHours = tempData.StartClassHours;
this.OrderMsg.IsChaBan = tempData.IsChaBan;
this.OrderMsg.EffectTime = tempData.EffectTime;
this.OrderMsg.UpOrderId = tempData.UpOrderId;
this.UnitPrice = this.OrderMsg.Unit_Price;
this.IsShowEditOrder = true;
}
})
} else {
this.OrderMsg.SaleRemark = ''; //清空备注
this.OrderMsg.HelpEnterId = 0;
this.OrderMsg.GeneralOccupation = '';
this.OrderMsg.EduOccupation = '';
this.OrderMsg.IsLessPrice = 0;
this.OrderMsg.LessPrice = 0;
this.OrderMsg.OrderNature = 0;
this.OrderMsg.OldPreferPrice = 0;
this.OrderMsg.GuestNum = 1;
this.OrderMsg.CourseId = '';
this.OrderMsg.StartClassHours = 0;
this.OrderMsg.IsChaBan = this.isChaBan;
this.OrderMsg.EffectTime = "";
this.OrderMsg.UpOrderId = 0;
this.OrderMsg.OrderType = this.orderType;
if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OrderNature = 1;
}
if (this.saveObj) {
if (this.saveObj.ClassId) {
this.OrderMsg.ClassId = this.saveObj.ClassId;
}
if (this.saveObj.Unit_Price) {
this.OrderMsg.Unit_Price = this.saveObj.Unit_Price;
this.UnitPrice = this.saveObj.Unit_Price;
}
if (this.saveObj.SourceId) {
this.OrderMsg.SourceId = this.saveObj.SourceId;
}
}
this.countPrice();
this.IsShowEditOrder = true;
}
},
//筛选员工
filterFn(val, update) {
update(() => {
if (val === '') {
this.EmployeeList = JSON.parse(JSON.stringify(this.AllemployeeList))
} else {
const needle = val.toLowerCase();
this.EmployeeList = this.AllemployeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1);
}
})
},
//获取业务员
getEmployee() {
var qMsg = {
Dept_Id: 0
}
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.EmployeeList = res.Data;
this.AllemployeeList = res.Data;
let obj = {
Id: 0,
EmployeeName: '不限'
}
this.EmployeeList.unshift(obj);
this.AllemployeeList.unshift(obj);
}
}).catch(() => {})
},
//关闭弹窗
closeEditOrder() {
this.IsShowEditOrder = false;
this.$emit('close')
},
//获取订单来源
getOrderSEList() {
getOrderSourceEnumList({}).then(res => {
if (res.Code == 1) {
var tempArray = res.Data;
this.SourceEnumList = tempArray;
this.OrderMsg.OrderSource = tempArray[0].Id;
}
})
},
//计算价格
countPrice() {
var guestNum = 0;
var unit_price = 0;
if (this.OrderMsg.GuestNum && this.OrderMsg.GuestNum > 0) {
guestNum = Number(this.OrderMsg.GuestNum);
}
if (this.OrderMsg.Unit_Price && this.OrderMsg.Unit_Price > 0) {
unit_price = Number(this.OrderMsg.Unit_Price);
}
//计算应收价格
if (this.OrderMsg.IsChaBan == 1) {
var newPreferPrice = 0;
if (this.courseObj && this.courseObj.CourseId && this.courseObj.CourseId > 0) {
newPreferPrice = (this.UnitPrice / this.courseObj.ClassHours) * (this.courseObj.ClassHours - this
.OrderMsg.StartClassHours) * guestNum
}
this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2);
} else {
this.OrderMsg.PreferPrice = Number(guestNum * unit_price).toFixed(2);
}
if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OldPreferPrice = Number(guestNum * unit_price).toFixed(2);
}
},
//修改订单
saveOrderInfo() {
if (this.isChaBan == 1) {
this.$refs.CourseId.validate();
this.$refs.EffectTime.validate();
if (this.$refs.CourseId.hasError || this.$refs.EffectTime.hasError) {
return;
}
}
//计算应收价格
if (this.OrderMsg.IsChaBan == 1) {
if (this.modityOrderType == 1 || this.modityOrderType == 2) {
var newPreferPrice = (this.UnitPrice / this.courseObj.ClassHours) * (this.courseObj.ClassHours -
this.OrderMsg.StartClassHours) * this.OrderMsg.GuestNum - this.OrderMsg.LessPrice;
this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2);
}
} else {
if (this.modityOrderType == 1 || this.modityOrderType == 2) {
this.OrderMsg.PreferPrice = (this.OrderMsg.GuestNum * this.OrderMsg.Unit_Price) - this.OrderMsg.LessPrice;
}
}
setClassOrder(this.OrderMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功!',
position: 'top'
})
//调用父页面成功方法
this.$emit('success');
this.IsShowEditOrder = false
} else {
this.$q.notify({
type: 'negative',
position: "top",
message: res.Message
})
}
}).catch(() => {})
},
//获取前置下拉数据
getSelectClass() {
var qMsg = {
ClassId: 0
};
if (this.saveObj.ClassId) {
qMsg.ClassId = this.saveObj.ClassId;
}
GetSelectClassOrderList(qMsg).then(res => {
if (res.Code == 1) {
this.beforeOrderList = res.Data;
}
})
},
getStudent(item) {
let str = ''
if (item && item.length > 1) {
str = item[0].GuestName + '等' + item.length + '人';
}
if (item.length == 1) {
str = item[0].GuestName;
}
return str
}
saveOrderInfo(){
},
}
}
......
<!--订单列表-->
<template>
<div class="classorder">
<div class="table-head">
<table class="enrollTotalSearchTable" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="12%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="6%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col>
</colgroup>
<thead>
<tr class="fix_th">
<th width="12%">单号</th>
<th width="7%">人数</th>
<th width="7%">单价</th>
<th width="7%">成交</th>
<th width="7%">应收总额</th>
<th width="7%">实收</th>
<th width="7%">优惠</th>
<th width="6%">少价金额</th>
<th width="7%">退款</th>
<th width="7%">平台税金</th>
<th width="7%">待收金额</th>
<th width="7%">状态</th>
<th>操作</th>
</tr>
</thead>
</table>
</div>
<div class="table-body">
<table class="enrollTotalSearchTable" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="12%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="6%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col width="7%" />
<col>
</colgroup>
<tr>
<td v-show="dataList && dataList.length==0" :colspan="12" align="center">暂无数据</td>
</tr>
<tbody v-for="(item,index) in dataList" :key="index">
<tr>
<td :rowspan="3" style="text-align: left">
<div class="order_OfferId" @click="goOrderdetails(item,1)">{{item.OrderId}}
</div>
<div>{{item.EnterName}}</div>
<div style="margin-top: 10px">{{item.CreateTime}}</div>
<template v-if="AuthorityObj.isShowName">
<div style="font-weight: bold;color:#2961FE;cursor:pointer;" @click="getClassInfo(item)">
{{item.ClassName}}</div>
<div v-if="item.HelpEnterName">
协助人员:{{item.HelpEnterName}}
</div>
<div v-if="item.OpenTime">
开班时间:{{item.OpenTime}}
</div>
<div>
<template v-if="item.OrderSource==3">
一般同行:{{item.GeneralOccupation}}
</template>
<template v-if="item.OrderSource==7">
教育同行:{{item.EduOccupation}}
</template>
</div>
</template>
<template v-if="item.OrderType==1">
<div v-if="item.CourseName">课程名称:{{item.CourseName}}</div>
<div v-if="item.IsChaBan==1" style="color:red;">
插班报入
  <q-tooltip :offset="[10, 10]">
              <div>开始课时:{{item.StartClassHours}}</div>
              <div>生效状态:{{item.EffectStatusStr}}</div>
              <div>生效时间:{{item.EffectTime}}</div>
              <template v-if="item.UpOrderId&&item.UpOrderId>0">
<div>前置订单:{{item.UpOrderId}}</div>
</template>
            </q-tooltip>
</div>
</template>
<div style="margin-top:10px;" v-if="item.OfferId>0">
报价单:<span class="order_OfferId" @click="goQuotation(item.OfferId)"
style="font-size:14px;">{{item.OfferId}}</span>
</div>
<div style="margin-top:10px;" v-if="item.VisitorReserveId>0">
预约单号:<span class="order_OfferId" @click="goVisitorReser(item.VisitorReserveId)"
style="font-size:14px;">{{item.VisitorReserveId}}</span>
</div>
<template v-if="item.IsCommissionGive==1">
<div style="color:red" v-if="item.YFCommissionMoney>0">应发提成:{{item.YFCommissionMoney}}</div>
<div style="color:red;cursor: pointer;text-decoration: underline;" @click='gourltx(item.OrderId)'>
已发提成:{{item.CommissionMoney}}</div>
<div style="color:red" v-if="item.ExtraCommissionMoney>0">额外奖励实发:{{item.ExtraCommissionMoney}}</div>
<div style="color:red;" v-if="item.ExtraRewardMoney>0">额外奖励:{{item.ExtraRewardMoney}}</div>
<div style="color:red" v-if="item.ExtraDeductMoney>0">额外扣除:{{item.ExtraDeductMoney}}</div>
<div style="color:red" v-if="item.CommissionBack>0">补交提成:{{item.CommissionBack}}</div>
</template>
</td>
<td style="border:none">{{item.GuestNum}}人</td>
<td style="border:none">
<template v-if="item.Class_Price>=0">
{{item.Class_Price.toFixed(2)}}
</template>
</td>
<td :style="{color:item.Class_Price!=item.Unit_Price?'var(--q-color-negative)':'','border':'none'}">
<template v-if="item.Unit_Price>=0">
{{item.Unit_Price.toFixed(2)}}
</template>
<template v-else>
<span class="redstyle">{{item.Unit_Price.toFixed(2)}}</span>
</template>
</td>
<td style="border:none">
<template v-if="item.PreferPrice>=0">
{{item.PreferPrice.toFixed(2)}}
</template>
<template v-else>
<span class="redstyle">{{item.PreferPrice.toFixed(2)}}</span>
</template>
</td>
<td style="border:none">
<template v-if="item.Income>=0">
{{item.Income.toFixed(2)}}
</template>
<template v-else>
<span class="redstyle">{{item.Income.toFixed(2)}}</span>
</template>
</td>
<td style="color:var(--q-color-negative);border:none">
<template v-if="item.DiscountMoney>=0">
{{item.DiscountMoney.toFixed(2)}}
</template>
<template v-else>
<span class="redstyle">{{item.DiscountMoney.toFixed(2)}}</span>
</template>
</td>
<td style="border:none">
<template v-if="item.LessPrice>=0">
{{item.LessPrice.toFixed(2)}}
</template>
<template v-else>
<span class="redstyle">{{item.LessPrice.toFixed(2)}}</span>
</template>
</td>
<td style="border:none">
<template v-if="item.Refund>=0">
{{item.Refund.toFixed(2)}}
</template>
<template v-else>
<span class="redstyle">{{item.Refund.toFixed(2)}}</span>
</template>
</td>
<td style="border:none">
<template v-if="item.PlatformTax>=0">
{{item.PlatformTax.toFixed(2)}}
</template>
<template v-else>
<span class="redstyle">{{item.PlatformTax.toFixed(2)}}</span>
</template>
</td>
<td style="color:#2961FE;border:none">
<template v-if="item.DueInMoney>=0">
{{item.DueInMoney.toFixed(2)}}
</template>
<template v-else>
<span class="redstyle">{{item.DueInMoney.toFixed(2)}}</span>
</template>
</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">
<template v-if="isEditOrder||AuthorityObj.isShowEdit">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="editOrder(item)" />
</template>
<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 v-if="AuthorityObj.isShowTransOrder">
<q-item-section @click="transferOrder(item,1)">
<q-item-label>转交订单</q-item-label>
</q-item-section>
</q-item> -->
<!-- <q-item clickable v-close-popup v-if="AuthorityObj.isShowEditSale">
<q-item-section @click="transferOrder(item,2)">
<q-item-label>修改销售</q-item-label>
</q-item-section>
</q-item> -->
<!-- <q-item clickable v-close-popup v-if="AuthorityObj.isShowSaleRemark">
<q-item-section @click="editOrderRemark(item,1)">
<q-item-label>销售备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup v-if="AuthorityObj.isShowEducationRemark">
<q-item-section @click="editOrderRemark(item,2)">
<q-item-label>教务备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup v-if="AuthorityObj.isShowPrincipalRemark">
<q-item-section @click="editOrderRemark(item,3)">
<q-item-label>校长备注</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup v-if="isEditOrder">
<q-item-section @click="editOrder(item)">
<q-item-label>总经理修改</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup v-if="AuthorityObj.isShowManagerRemark">
<q-item-section @click="editOrderRemark(item,4)">
<q-item-label>总经理备注</q-item-label>
</q-item-section>
</q-item> -->
<!-- <q-item clickable v-close-popup v-if="AuthorityObj.isShowCommissionEdit&&item.IsCommissionGive==1">
<q-item-section @click="upDateMoney(item,1)">
<q-item-label>修改提成</q-item-label>
</q-item-section>
</q-item> -->
<!-- <q-item clickable v-close-popup v-if="AuthorityObj.isShowRewardEdit&&isShowReward">
<q-item-section @click="upDateMoney(item,2)">
<q-item-label>额外奖励</q-item-label>
</q-item-section>
</q-item> -->
<q-item clickable v-close-popup disabled
v-if="(item.FinanceList&&item.FinanceList.length>0)||(item.RefundFinanceList&&item.RefundFinanceList.length>0)">
<q-item-section>
<q-item-label>
取消订单
</q-item-label>
<q-tooltip anchor="center left" self="center right" content-class="bg-red">
已有财务单据无法取消
</q-tooltip>
</q-item-section>
</q-item>
<q-item clickable v-close-popup v-else>
<q-item-section @click="CancelOrder(item)">
<q-item-label>取消订单</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup v-close-popup v-if="AuthorityObj.isShowBackClass">
<q-item-section>
<q-item-label @click="showBackClassForm(item)">退课</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup v-close-popup v-if="AuthorityObj.isShowRenewClass">
<q-item-section>
<q-item-label @click="showContinueClass(item)">续课</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</td>
</tr>
<tr>
<td :colspan="12" style="text-align: left">
<div class="row" v-if="item.GuestList&&item.GuestList.length>0">
学生名单:
<template v-for="(x,j) in item.GuestList" :index="j">
<span v-if="x.GuestState==1" style="color:#2961FE;margin-right: 5px">{{x.GuestName}} </span>
<span v-else style="color:red;margin-right: 5px">
{{x.GuestName}}
<q-tooltip :offset="[10, 10]">
{{x.GuestStateStr}}
</q-tooltip>
</span>
</template>
</div>
<div v-if="AuthorityObj.isShowContract&&item.GuestList&&item.GuestList.length>0" class="takeContract">
<span @click="isShowPop=true">查看合同</span>
<q-popup-proxy v-if="isShowPop">
<q-banner>
<div style="width: 520px;max-height:220px;overflow:auto;">
<table class="Contract_Table">
<tr>
<th>姓名</th>
<th style="width:180px;">合同编号</th>
<th>状态</th>
<th width="170px;">操作</th>
</tr>
<tr v-for="subItem in item.GuestList">
<td>{{subItem.GuestName}}</td>
<td>{{subItem.ContractNo}}</td>
<td>{{subItem.ContractStatusStr}}</td>
<td>
<template v-if="subItem.ContractId==0">
<q-btn v-if="AuthorityObj.isShowEdit" color="accent" size="sm"
@click="takeContractTwo(item,subItem)" label="领取合同" />
</template>
<template v-else>
<q-btn color="secondary" size="sm" @click="goContractMannage(subItem)" label="查看合同" />
</template>
</td>
</tr>
</table>
</div>
</q-banner>
</q-popup-proxy>
</div>
<div class="row" v-if="item.GuestList&&item.GuestList.length>0&&getTkshow(item.GuestList)">
退课名单:
<span v-for="(x,j) in item.GuestList" :index="j" v-if="x.GuestState==2"
style="color:var(--q-color-negative);margin-right: 5px">{{x.GuestName}} </span>
</div>
<span v-if="item.GuestList&&item.GuestList.length==0">暂无</span>
</td>
</tr>
<tr>
<td :colspan="12" 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 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"
v-if="AuthorityObj.isShowFinanceBtn&&AuthorityObj.isShowEdit&&item.OrderType==2"
style="font-weight:400;color: #02C499" label="修改" @click="chanceType(item,1)" />
<template v-if="AuthorityObj.isShowFinanceBtn&&AuthorityObj.isShowEdit&&item.OrderType==1">
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #02C499" label="修改"
@click="showChooseStudent=true" />
<q-popup-proxy v-if="showChooseStudent">
<q-banner>
<div style="width:500px;max-height:400px;overflow-y:auto;">
<table class="Contract_Table">
<tr>
<th>选择</th>
<th>姓名</th>
<th style="width:180px;">合同编号</th>
<th>状态</th>
</tr>
<tr v-for="subItem in item.GuestList">
<td>
<q-radio dense v-model="chooseStudent" :val="subItem.Id" />
<td>{{subItem.GuestName}}</td>
<td>{{subItem.ContractNo}}</td>
<td>{{subItem.ContractStatusStr}}</td>
</tr>
</table>
</div>
<q-btn color="accent" size="sm" class="q-mr-md" @click="chanceType(item,1)" label="制单"
style="min-width:70px;float:right;margin-top:10px" />
</q-banner>
</q-popup-proxy>
</template>
</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"
v-if="AuthorityObj.isShowFinanceBtn&&AuthorityObj.isShowEdit&&item.OrderType==2"
style="font-weight:400;color: #02C499" label="修改" @click="chanceType(item,2)" />
<template v-if="AuthorityObj.isShowFinanceBtn&&AuthorityObj.isShowEdit&&item.OrderType==1">
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #02C499" label="修改"
@click="showChooseStudent=true" />
<q-popup-proxy v-if="showChooseStudent">
<q-banner>
<div style="width:500px;max-height:400px;overflow-y:auto;">
<table class="Contract_Table">
<tr>
<th>选择</th>
<th>姓名</th>
<th style="width:180px;">合同编号</th>
<th>状态</th>
</tr>
<tr v-for="subItem in item.GuestList">
<td>
<q-radio dense v-model="chooseStudent" :val="subItem.Id" />
<td>{{subItem.GuestName}}</td>
<td>{{subItem.ContractNo}}</td>
<td>{{subItem.ContractStatusStr}}</td>
</tr>
</table>
</div>
<q-btn color="accent" size="sm" class="q-mr-md" @click="chanceType(item,2)" label="制单"
style="min-width:70px;float:right;margin-top:10px" />
</q-banner>
</q-popup-proxy>
</template>
</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>
<tbody v-if="cancelList&&cancelList.length>0">
<tr>
<td :colspan="13">
<span style="color:red;cursor:pointer;font-weight:bold;" @click='isShowCancel=!isShowCancel'>取消订单</span>
</td>
</tr>
</tbody>
<tbody v-if="cancelList&&cancelList.length>0 && isShowCancel" v-for="(item,index) in cancelList"
:key="index+10000">
<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;" @click="getClassInfo(item)">{{item.ClassName}}</div>
</td>
<td style="border:none">{{item.GuestNum}}人</td>
<td style="border:none">
<template v-if="item.Class_Price>=0">
{{item.Class_Price.toFixed(2)}}
</template>
</td>
<td :style="{color:item.Class_Price!=item.Unit_Price?'var(--q-color-negative)':'','border':'none'}">
<template v-if="item.Unit_Price>=0">
{{item.Unit_Price.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.PreferPrice>=0">
{{item.PreferPrice.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.Income>=0">
{{item.Income.toFixed(2)}}
</template>
</td>
<td style="color:var(--q-color-negative);border:none">
<template v-if="item.DiscountMoney>=0">
{{item.DiscountMoney.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.LessPrice>=0">
{{item.LessPrice.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.Refund>=0">
{{item.Refund.toFixed(2)}}
</template>
</td>
<td style="border:none">
<template v-if="item.PlatformTax>=0">
{{item.PlatformTax.toFixed(2)}}
</template>
</td>
<td style="color:#2961FE;border:none">
<template v-if="item.DueInMoney&&item.DueInMoney>=0">
{{item.DueInMoney.toFixed(2)}}
</template>
</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;" v-if="AuthorityObj.isShowEdit">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400;display:none;" label="编辑"
@click="editOrder(item)" />
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;display:none;">
<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-list>
</q-btn-dropdown>
</td>
</tr>
<tr>
<td :colspan="12" style="text-align: left">
<div class="row" v-if="item.GuestList&&item.GuestList.length>0">
学生名单:
<span v-for="(x,j) in item.GuestList" :index="j" v-if="x.GuestState==1"
style="color:#2961FE;margin-right: 5px">{{x.GuestName}} </span>
</div>
<div class="row" v-if="item.GuestList&&item.GuestList.length>0&&getTkshow(item.GuestList)">
退课名单:
<span v-for="(x,j) in item.GuestList" :index="j" v-if="x.GuestState==2"
style="color:var(--q-color-negative);margin-right: 5px">{{x.GuestName}} </span>
</div>
<span v-if="item.GuestList&&item.GuestList.length==0">暂无</span>
</td>
</tr>
<tr>
<td :colspan="12" 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>
</div>
<div class="row wrap">
</div>
<div class="row" style="justify-content: space-between">
<span>付款单据:</span>
</div>
<div class="row wrap">
</div>
</div>
</div>
</td>
</tr>
</tbody>
<!--取消订单-->
</table>
</div>
<!--修改课程订单-->
<editorder-form v-if="isShowEditOrderForm" :save-obj="orderObj" :orderType="orderObj.OrderType"
@close="closeOrderSaveForm" @success="refreshOrder" :isChaBan="isChaBan" :modityOrderType="newModityOrderType">
</editorder-form>
<!--修改留学就业订单-->
<studyorder-form v-if="isShowStudyOrderForm" :save-obj="orderObj" :orderType="orderObj.OrderType"
@close="closeOrderSaveForm" @success="refreshOrder" :modityOrderType="newModityOrderType">
</studyorder-form>
<!--修改订单备注-->
<orderremark-form v-if="isShowRemarkOrderForm" :save-obj="orderObj" :remarkType="remarkType"
@close="closeRemarkForm" @success="refreshOrder"></orderremark-form>
<!--转交订单-->
<transOrder-form v-if="isShowTransOrderForm" :save-obj="orderObj" :employeeList="EmployeeList"
@close="closeTransOrderForm" @success="refreshOrder"></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="refreshOrder">
</classinfo-form>
<!--退课申请-->
<backclass-form v-if="isShowBackClassForm" :save-obj="orderObj" @close="closeBackClassForm" @success="refreshOrder">
</backclass-form>
<!-- 修改提成和额外奖励 -->
<money-form v-if="isShowMoney" :data="moneyObj" :type="CommonType" @close="closeMoneyForm" @success="refreshOrder">
</money-form>
<!--续课申请-->
<continueclass-form v-if="isShowContinueClass" :save-obj="orderObj" @close="closeContinueClassForm"
@success="refreshOrder"></continueclass-form>
<!-- 查看报价单 -->
<viewquotation-form v-if="isShowviewQuo" :rId="offerId" :isShowCancle="1" @close="closeQuota"
@success="refreshOrder">
</viewquotation-form>
<!--合同信息-->
<eduinfo-form v-if="isShowEduForm" :seting-obj="eduObj" @close="closeEdudia" @success="refreshPage">
</eduinfo-form>
</div>
</template>
<script>
import editorderForm from '../sale/activeOrder-form' //修改订单
import studyorderForm from '../sale/studyOrder-form' //留学就业订单
import orderremarkForm from '../sale/orderremark-form' //订单备注
import transOrderForm from '../sale/transOrder-form' //转交订单
import backclassForm from '../sale/backclass-form' //退课申请
import moneyForm from '../sale/money-form' //修改提成和额外奖励
import myOrderForm from '../../components/sale/myOrder-form'
import classinfoForm from '../../components/course/classinfo-form'; //班级信息
import continueclassForm from '../sale/continueclass-form' //续课申请
import viewquotationForm from '../sale/viewquotation-form' //报价单信息
import eduinfoForm from '../sale/eduinfo-form'
import {
cancelClassOrder, //取消订单
} from '../../api/sale/sale'
import {
queryEmployee //员工列表
} from '../../api/users/user'
import {
SetOrderReceiveContract //领取合同
} from '../../api/sale/contract'
export default {
components: {
editorderForm,
orderremarkForm,
transOrderForm,
myOrderForm,
classinfoForm,
backclassForm,
moneyForm,
continueclassForm,
viewquotationForm,
eduinfoForm,
studyorderForm
},
props: {
//正常订单
dataList: {
type: Array,
default: null
},
//取消订单
cancelList: {
type: Array,
default: null
},
//权限数据
authObj: {
type: Object,
},
//修改订单类型
modityOrderType: {
type: Number,
default: 0, //1-销售修改,2-OP修改,3-总经理修改
}
},
data() {
return {
isShowEditOrderForm: false, //是否显示订单修改
isShowStudyOrderForm: false, //是否显示留学就业订单
isShowRemarkOrderForm: false, //是否线下修改订单备注
isShowTransOrderForm: false, //是否显示转交订单
isShowBackClassForm: false, //是否显示退课申请
isShowContinueClass: false, //是否显示续课申请
orderObj: {}, //订单信息
isShowCancel: false, //是否显示取消订单
remarkType: 0, //备注类型
isShowmyorderForm: false, //显示详情
myorderObjOption: {}, //详情的数据
classObjOption: null,
isShowClassInfo: false, //是否显示课程信息
isShowMoney: false, //是否显示修改提成和额外奖励
moneyObj: {}, //额外提成
CommonType: -1, //用于判断是修改提成还是额外奖励
EmployeeList: [], //员工列表
isShowviewQuo: false, //是否显示报价单
offerId: 0, //报价单编号
//权限显示对象
AuthorityObj: {
isShowName: true, //是否显示班级、留学就业产品名称【默认显示】
isShowGuestBtn: 0, //是否显示学员名单新增按钮【0-不显示,1-显示】
isShowFinanceBtn: false, //是否显示财务单据录入按钮【true显示,false不显示】
isShowTransOrder: false, //是否显示转交订单【true显示,false不显示】
isShowEditSale: false, //是否显示修改销售按钮【true显示,false不显示】
isShowSaleRemark: false, //是否显示修改销售备注按钮
isShowEducationRemark: false, //是否显示修改教务备注按钮
isShowPrincipalRemark: false, //是否显示修改校长备注按钮
isShowManagerRemark: false, //是都显示总经理备注
isShowCommissionEdit: false, //是否显示修改提成按钮
isShowRewardEdit: false, //是否显示修改额外提成按钮
isShowBackClass: false, //是否显示退课按钮
isShowRenewClass: false, //是否显示续课按钮
isShowContract: true, //是否显示合同
isShowEdit: true, //是否显示修改订单按钮
},
isShowEduForm: false, //是否显示新增修改合同弹窗
eduObj: {}, //合同信息
isShowPop: false, //是否显示查看合同
showChooseStudent: false, //收款单据,是否显示单选学生
chooseStudent: "", //收款单据,单选学生
isShowReward: false, // 是否可以修改额外金额
isEditOrder: false, //是否有【总经理】修改订单但权限
newModityOrderType: 0,
isChaBan: 0, //是否插班(0-正常报入,1-插班报入)
}
},
created() {
this.initAuth();
this.Employee();
var localStorageData = window.localStorage["loginUserInfo"];
let ActionMenuList = JSON.parse(localStorageData).data.ActionMenuList
if (ActionMenuList && ActionMenuList.length > 0) {
ActionMenuList.forEach(x => {
if (x.FunctionCode == 'Edit_OrderExtraMoney') {
this.isShowReward = true
}
if (x.FunctionCode == 'Edit_Order') {
this.isEditOrder = true
}
})
}
},
watch: {
modityOrderType: {
handler(newValue) {
var localStorageData = window.localStorage["loginUserInfo"];
let ActionMenuList = JSON.parse(localStorageData).data.ActionMenuList
var isNewEditOrder = false;
if (ActionMenuList && ActionMenuList.length > 0) {
ActionMenuList.forEach(x => {
if (x.FunctionCode == 'Edit_Order') {
isNewEditOrder = true
}
})
}
if (isNewEditOrder) {
this.newModityOrderType = 3;
} else {
this.newModityOrderType = newValue;
}
},
immediate: true
}
},
mounted() {},
methods: {
//初始化权限信息
initAuth() {
if (this.authObj) {
if (this.authObj.isShowName != null && !this.authObj.isShowName) {
this.AuthorityObj.isShowName = this.authObj.isShowName;
}
if (this.authObj.isShowGuestBtn != null && this.authObj.isShowGuestBtn > 0) {
this.AuthorityObj.isShowGuestBtn = this.authObj.isShowGuestBtn;
}
if (this.authObj.isShowFinanceBtn != null && this.authObj.isShowFinanceBtn) {
this.AuthorityObj.isShowFinanceBtn = this.authObj.isShowFinanceBtn;
}
if (this.authObj.isShowTransOrder != null && this.authObj.isShowTransOrder) {
this.AuthorityObj.isShowTransOrder = this.authObj.isShowTransOrder;
}
if (this.authObj.isShowEditSale != null && this.authObj.isShowEditSale) {
this.AuthorityObj.isShowEditSale = this.authObj.isShowEditSale;
}
if (this.authObj.isShowSaleRemark != null && this.authObj.isShowSaleRemark) {
this.AuthorityObj.isShowSaleRemark = this.authObj.isShowSaleRemark;
}
if (this.authObj.isShowEducationRemark != null && this.authObj.isShowEducationRemark) {
this.AuthorityObj.isShowEducationRemark = this.authObj.isShowEducationRemark;
}
if (this.authObj.isShowPrincipalRemark != null && this.authObj.isShowPrincipalRemark) {
this.AuthorityObj.isShowPrincipalRemark = this.authObj.isShowPrincipalRemark;
}
if (this.authObj.isShowManagerRemark != null && this.authObj.isShowManagerRemark) {
this.AuthorityObj.isShowManagerRemark = this.authObj.isShowManagerRemark;
}
if (this.authObj.isShowCommissionEdit != null && this.authObj.isShowCommissionEdit) {
this.AuthorityObj.isShowCommissionEdit = this.authObj.isShowCommissionEdit;
}
if (this.authObj.isShowRewardEdit != null && this.authObj.isShowRewardEdit) {
this.AuthorityObj.isShowRewardEdit = this.authObj.isShowRewardEdit;
}
if (this.authObj.isShowBackClass != null && this.authObj.isShowBackClass) {
this.AuthorityObj.isShowBackClass = this.authObj.isShowBackClass;
}
if (this.authObj.isShowRenewClass != null && this.authObj.isShowRenewClass) {
this.AuthorityObj.isShowRenewClass = this.authObj.isShowRenewClass;
}
if (this.authObj.isShowEdit != null && !this.authObj.isShowEdit) {
this.AuthorityObj.isShowEdit = this.authObj.isShowEdit;
}
}
},
//关闭报价单
closeQuota() {
this.isShowviewQuo = false;
},
//跳转到报价单
goQuotation(Id) {
this.OpenNewUrl("/sale/quotation", {
Id: Id
});
},
//跳转到预约单号
goVisitorReser(Id) {
this.OpenNewUrl("/sale/appointManagement", {
Id: Id
});
},
//弹出退课名单
getTkshow(data) {
let Tkshow = false;
if (data && data.length > 0) {
data.forEach(x => {
if (x.GuestState == 2) {
Tkshow = true
}
});
}
return Tkshow
},
//关闭退课申请
closeBackClassForm() {
this.orderObj = {};
this.isShowBackClassForm = false;
},
//显示退课申请
showBackClassForm(item) {
this.orderObj = item;
this.isShowBackClassForm = true;
},
//显示续课申请
showContinueClass(item) {
this.orderObj = item;
this.isShowContinueClass = true;
},
//关闭续课申请
closeContinueClassForm() {
this.orderObj = {};
this.isShowContinueClass = false;
},
//获取员工列表
Employee() {
var qMsg = {
EmployeeName: ''
}
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.EmployeeList = res.Data;
}
})
},
//获取财务单据
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 && 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;
this.isShowmyorderForm = true;
},
//关闭订单详情
closeMOSaveForm() {
this.isShowmyorderForm = false;
},
//订单转交
transferOrder(item, type) {
item.type = type
this.orderObj = item;
this.isShowTransOrderForm = true;
},
//关闭转订单弹窗
closeTransOrderForm() {
this.isShowTransOrderForm = false;
},
//跳转到学生名单
gostudent(item) {
var tempStr = '/sale/studentList';
this.$router.push({
path: tempStr,
query: {
OrderId: item.OrderId,
ClassId: item.ClassId,
SourceId: item.SourceId,
isShow: this.AuthorityObj.isShowGuestBtn
}
});
},
//修改订单备注
editOrderRemark(item, Type) {
this.orderObj = item;
this.remarkType = Type;
this.isShowRemarkOrderForm = true;
},
//关闭备注
closeRemarkForm() {
this.isShowRemarkOrderForm = false;
},
//关闭订单修改
closeOrderSaveForm() {
this.isShowEditOrderForm = false;
this.isShowStudyOrderForm = false;
},
//显示修改订单
editOrder(item) {
this.orderObj = item;
//课程订单
if (item.OrderType == 1) {
this.isShowEditOrderForm = true;
} else { //留学就业订单
this.isShowStudyOrderForm = true;
}
this.isChaBan = item.IsChaBan;
},
//刷新页面
refreshOrder() {
this.isShowEditOrderForm = false;
this.isShowMoney = false;
this.isShowStudyOrderForm = false;
//调用父页面成功方法
this.$emit('success');
},
//关闭修改提成和额外奖励
closeMoneyForm() {
this.moneyObj = {};
this.isShowMoney = false;
},
//取消订单
CancelOrder(item) {
let that = this
this.$q.dialog({
title: '提示信息',
message: '<span style="color: var(--q-color-negative)">是否取消此订单</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.$emit('success');
}
})
})
},
//财务单据
chanceType(obj, type) {
let TCIDARR = []
if (obj && obj.OrderType == 2) {
//留学就业订单
TCIDARR.push(obj.SourceId);
} else {
//班级课程订单
TCIDARR.push(obj.ClassId);
}
var orderObj = {
OrderID: obj.OrderId,
OrderSource: 17,
Obj: {},
SourceID: 0,
TCIDList: TCIDARR
}
if (obj.OfferId > 0) {
orderObj.OtherType = 29;
orderObj.ReFinanceId = obj.OfferId;
}
if (obj.OrderType == 1 && this.chooseStudent == "") {
this.$q.notify({
icon: 'close',
color: 'accent',
timeout: 2000,
message: '请选择学生',
position: 'top'
})
return
}
if (obj.OrderType == 1 && this.chooseStudent == "") {
this.$q.notify({
icon: 'close',
color: 'accent',
timeout: 2000,
message: '请选择学生',
position: 'top'
})
return
}
let ContractNo = ''
if (obj && obj.GuestList.length > 0) {
obj.GuestList.forEach(x => {
if (this.chooseStudent == x.Id) {
ContractNo = x.ContractNo
}
})
}
if (obj.OrderType == 1 && ContractNo == '') {
this.$q.notify({
icon: 'close',
color: 'accent',
timeout: 2000,
message: '请完善合同信息',
position: 'top'
})
return
}
//留学就业订单
if (obj && obj.OrderType == 2) {
//财务单据类型【教育留学】
orderObj.OrderSource = 18;
}
var guestId = 0;
if (this.chooseStudent != "") {
guestId = this.chooseStudent;
}
this.$router.push({
path: '/financial/financalDocument/ChoiceAddFinancialDocuments',
query: {
"Type": type,
"companyID": obj.ClassSchoolId,
"path": "",
'blank': 'y',
'orderObj': JSON.stringify(orderObj),
'tradeWay': obj.tradeWay,
"GuestId": guestId
}
});
},
//打开班级详情组件
getClassInfo(obj) {
this.classObjOption = obj;
this.classObjOption.School_Id = this.classObjOption.ClassSchoolId
this.isShowClassInfo = true;
},
//关闭班级信息弹窗
closeClass() {
this.isShowClassInfo = false
},
//修改提成-奖励
upDateMoney(item, type) {
this.moneyObj = item;
this.CommonType = type;
this.isShowMoney = true;
},
//关闭弹窗
closeEdudia() {
this.isShowEduForm = false
},
//刷新页面
refreshPage() {
this.refreshOrder();
},
//领取合同
takeContract(item) {
let msg = {
OrderId: item.OrderId,
GuestId: 0
}
SetOrderReceiveContract(msg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
})
//调用父页面成功方法
this.$emit('success');
}
}).catch(() => {})
},
takeContractTwo(item, subItem) {
let obj = {
OrderId: item.OrderId,
GuestId: subItem.Id,
ContractId: subItem.ContractId
}
this.eduObj = obj;
this.isShowPop = false;
this.isShowEduForm = true;
},
//跳转至合同管理
goContractMannage(subItem) {
this.OpenNewUrl("/contractView", {
ContractId: subItem.ContractId
});
},
gourltx(OrderId) {
this.OpenNewUrl("/financial/cycleOrderList", {
OrderId: OrderId
});
}
}
}
</script>
<style>
li {
list-style-type: none;
}
.classorder ul {
padding: 0px
}
.classorder .price-popup {
border-radius: 4px;
}
.classorder .el-range-editor .el-range-input {
background: none;
}
.classorder .el-range-editor.el-input__inner {
background-color: transparent;
}
.classorder .q-mb-md {
margin-bottom: 0;
}
.classorder .stics {
padding: 10px 20px;
background: #DDDEE0;
border-radius: 4px;
font-size: 14px;
color: #000000;
font-weight: bold
}
.classorder .stics .stics-name {
color: #2D2D2D;
font-weight: 600;
margin-right: 10px
}
.classorder .tis {
margin: 10px 0;
align-items: center
}
.classorder .tis .tis-k {
width: 10px;
height: 10px;
margin-right: 8px
}
.classorder .tis span {
font-size: 14px;
color: #2D2D2D;
font-weight: 600;
margin-right: 20px
}
.classorder table {
padding: 10px 0;
width: 100%;
background-color: #ededed;
border-collapse: collapse;
border: 1px solid #d2d2d2;
font-size: 12px;
}
.classorder table th {
background-color: #ededed;
height: 34px;
text-indent: 15px;
}
.classorder table td {
background-color: #ffffff;
padding: 9px 15px;
color: #333333;
border: 1px solid rgba(138, 138, 138, 0.09);
text-align: center;
}
.classorder table ._color_666 {
color: #666666;
}
.classorder table tr._color_666 th {
padding: 9px 15px;
}
.classorder table th {
background-color: #ededed;
height: 34px;
text-indent: 15px;
}
.classorder table td {
background-color: #ffffff;
padding: 9px 15px;
color: #333333;
/*border: 1px solid #d2d2d2;*/
}
.classorder table ._color_666 {
color: #666666;
}
.classorder table tr._color_666 th {
padding: 9px 15px;
}
.classorder .enrollTotalSearchTable {
width: 100%;
font-size: 14px;
color: #333;
border-bottom: 1px solid #cccccc;
border-right: 1px solid #cccccc;
border-collapse: collapse;
}
.classorder .enrollTotalSearchTable tr {
/* border-bottom: 2px solid #333; */
}
.classorder .enrollTotalSearchTable tr th {
background: #DDDEE0;
height: 30px;
font-size: 12px;
text-align: center;
}
.classorder .enrollTotalSearchTable tr {
background: #fff;
text-align: left;
}
.classorder .enrollTotalSearchTable tbody tr:last-child {
border-bottom: 2px solid #333;
}
.classorder .enrollTotalSearchTable tr:first-child td:first-child {
border-bottom: 2px solid #333;
}
.classorder .enrollTotalSearchTable tr td {
height: 66px;
padding: 10px;
/*border-top: 1px solid #cccccc;*/
/*border-left: 1px solid #cccccc;*/
}
.classorder .enrollTotalSearchTable tr td>img {
width: 32px;
height: 32px;
border-radius: 16px;
vertical-align: middle;
margin-right: 5px;
}
.classorder .enrollTotalSearchTable tr td p {
line-height: 20px;
}
.classorder .remarks {
font-size: 14px;
color: #2D2D2D;
}
.classorder .remarks-b {
width: 100%;
height: 94px;
background: #F0F5FB;
margin-top: 10px;
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;
}
.classorder .remarks-b-b {
text-align: right;
position: absolute;
right: 0px;
bottom: 0px
}
.classorder .on-left {
margin-right: 5px;
}
.classorder .finance {
padding: 1px 10px;
align-items: center;
justify-content: center;
border-radius: 4px;
margin: 5px 3px 3px 0;
}
.classorder .order_OfferId {
font-size: 18px;
color: #2961FE;
margin-bottom: 20px;
font-weight: bold;
text-decoration: underline;
cursor: pointer
}
.takeContract {
cursor: pointer;
color: rgb(41, 97, 254);
}
.Contract_Table {
width: 100%;
border-collapse: collapse;
}
.Contract_Table th,
.Contract_Table td {
padding: 5px;
color: #000;
text-align: center;
}
.table-body {
height: 590px;
overflow-x: hidden;
overflow-y: auto;
}
.classorder .redstyle {
color: var(--q-color-negative);
}
</style>
<template>
<div class="page-body myOrder">
<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>
</div>
<div class="row" style="align-items: center">
<span>带班老师</span>
<q-avatar size="sm" style="margin:0 5px;" v-if="data.ClassInfo&&data.ClassInfo.TeacherIcon">
<img :src="data.ClassInfo.TeacherIcon" />
</q-avatar>
<q-avatar style="margin:0 5px;" size="sm" color="teal-10" text-color="white" v-else>
<template
v-if="data.ClassInfo&&data.ClassInfo.TeacherName">{{data.ClassInfo.TeacherName.substring(0,1)}}</template>
</q-avatar>
<span v-if="data&& data.ClassInfo" style="color:#2961FE;font-weight: bold">
{{data.ClassInfo.TeacherName}}
</span>
</div>
</div>
</div>
<div class="page-content">
<OrderItem :dataList="dataList" ref="orderL" :authObj="authObj" :modityOrderType="2" :cancelList="CancelList"
@success="refreshClassOrder"></OrderItem>
</div>
</div>
</template>
<script>
import {
quertClassOrderList
} from '../../api/sale/sale';
import OrderItem from '../../components/sale/activeOrder-item.vue'
export default {
components: {
OrderItem
},
data() {
return {
data: {},
msg: {
Id: 0
},
//正常订单
dataList: [],
//取消订单
CancelList: [],
//权限判断
authObj: {
isShowName: true, //不显示班级名称
isShowEditSale: true, //显示修改销售按钮
isShowEducationRemark: true, //显示修改教务备注
isShowPrincipalRemark: true, //显示校长备注
isShowManagerRemark: true, //显示总经理备注
isShowCommissionEdit: true, //显示修改提成按钮
isShowRewardEdit: true, //显示修改额外提成按钮
}
}
},
created() {
if (this.$route.query.Id) {
this.msg.Id = this.$route.query.Id
}
// this.getList();
},
mounted() {
},
methods: {
//获取菜单分页列表
getList() {
this.loading = true;
quertClassOrderList(this.msg).then(res => {
this.data = res.Data;
if (this.data && this.data.OrderList && this.data.OrderList.NorList) {
this.dataList = this.data.OrderList.NorList;
let OrderIds = []
this.dataList.forEach(x => {
OrderIds.push(x.OrderId)
})
if (OrderIds.length > 0) {
OrderIds = OrderIds.join(',')
if (this.dataList.length > 0) {
this.$refs.orderL.getOrderFinanceList(OrderIds, 1)
}
}
}
if (this.data && this.data.OrderList && this.data.OrderList.CancelList) {
this.CancelList = this.data.OrderList.CancelList;
let OrderIds = []
this.CancelList.forEach(x => {
OrderIds.push(x.OrderId)
})
if (OrderIds.length > 0) {
OrderIds = OrderIds.join(',')
if (this.CancelList.length > 0) {
this.$refs.orderL.getOrderFinanceList(OrderIds, 2)
}
}
}
this.loading = false
}).catch(() => {
this.loading = false
})
},
//刷新页面
refreshClassOrder() {
this.getList();
}
}
}
</script>
<style>
</style>
<template>
<div class="page-body myOrder">
<div style="width: 100%;display: flex;justify-content: space-between">
<span style="font-size: 20px;font-weight: 400; ">活动报名订单</span>
</div>
<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="resetSearch" clearable standout="bg-primary text-white" v-model="msg.ActivityName"
label="活动名称" @clear="resetSearch" maxlength="20" />
</div>
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" type="number" v-model="msg.Id"
label="订单号" @clear="resetSearch" maxlength="20" />
</div>
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.LinkMan" label="联系人"
@clear="resetSearch" maxlength="20" />
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" option-label="EmployeeName"
v-model="msg.EduUserId" use-input clearable @filter="filterFn" :options="EmployeeList" emit-value map-options label="业务员">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.EnrollState" :options="EnrollStateOpt" emit-value map-options label="报名状态" />
</div>
<div class="col-3">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="dateList" @change="resetSearch()" value-format="yyyy-MM-dd" type="daterange" style="border:none;"
 range-separator="至"  start-placeholder="报名开始时间"  end-placeholder="报名结束时间">
 </el-date-picker>       
</template>
</q-field>
</div>
<div class="col-3">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="dateList2" @change="resetSearch()" value-format="yyyy-MM-dd" type="daterange" style="border:none;"
 range-separator="至"  start-placeholder="活动开始时间"  end-placeholder="活动结束时间">
 </el-date-picker>       
</template>
</q-field>
</div>
</div>
</div>
<div class="col row wrap q-gutter-x-md" v-if="data.Statistics">
<div class="col stics">
<span class="stics-name">应收款</span>
<span>{{data.Statistics.PreferPrice?data.Statistics.PreferPrice:0}}</span>
</div>
<div class="col stics">
<span class="stics-name">实收款</span>
<span>{{data.Statistics.Income}}</span>
</div>
<div class="col stics">
<span class="stics-name">待收款</span>
<span style="color: #F72E52">{{data.Statistics.DueInMoney}}</span>
</div>
<div class="col stics">
<span class="stics-name">收客人数</span>
<span style="color:#2961FE;">{{data.Statistics.GuestNum}}人</span>
</div>
<div class="col stics">
<span class="stics-name">取消人数</span>
<span>{{data.Statistics.CancelNum}}人</span>
</div>
<div class="col stics">
<span class="stics-name">提成金额</span>
<span>{{data.Statistics.CommissionMoney}}</span>
</div>
<div class="col stics">
<span class="stics-name">额外奖励</span>
<span>{{data.Statistics.ExtraRewardMoney}}</span>
</div>
</div>
<div class="row col" style="justify-content: flex-end">
<div class="row tis">
<div class="tis-k" style="background: #2961FE"></div>
<span>已打单</span>
</div>
<div class="row tis">
<div class="tis-k" style="background: #02C499"></div>
<span>平台出纳已审核</span>
</div>
<div class="row tis">
<div class="tis-k" style="background: #F28C1D"></div>
<span>银行出纳已审核</span>
</div>
<div class="row tis">
<div class="tis-k" style="background: #3FC4FF"></div>
<span>已通过</span>
</div>
</div>
<div class="page-content">
<activeOrder :dataList="data.List" :authObj="authObj" @success="refreshClassOrder" :modityOrderType="1"
ref="orderL">
</activeOrder>
<div class="row" style="justify-content: flex-end;padding: 5px 20px">
<q-pagination v-model="msg.pageIndex" :max="pageCount" @input="changePage" class="full-width justify-end"
color="primary" :input="true">
</q-pagination>
</div>
</div>
</div>
</template>
<script>
import {
queryEmployee
} from '../../api/users/user' //获取业务员列表
import myOrderForm from '../../components/sale/myOrder-form'
import activeOrder from '../../components/sale/activeOrder-item'
export default {
meta: {
title: "我的活动订单"
},
components: {
myOrderForm,
activeOrder
},
data() {
return {
dialog: false,
data: {},
loading: false,
dateList: [], //报名时间
dateList2: [], //开班时间
msg: {
pageIndex: 1,
pageSize: 8,
Id: "", //活动id
ActivityName: "", //活动名称
EduUserId: 0, //销售id
CreateStartTime: "", //报名开始时间
CreateEndTime: "", //报名结束时间
StartTime: "", //活动开始时间
EndTime: "", //活动结束时间
EnrollState: 3, //报名状态
LinkMan: "", //联系人
},
EnrollStateOpt: [ //报名状态列表
{
Name: "正常",
Id: 1
},
{
Name: "取消",
Id: 2
},
{
Name: "查询所有",
Id: 3
},
],
EmployeeList: [], //业务员
AllemployeeList: [], //业务员
//订单状态
OrderStateList: [],
pageCount: 1,
showone: false,
//权限判断
authObj: {
isShowGuestBtn: 1, //显示新增学员名单按钮
isShowFinanceBtn: true, //显示财务单据按钮
isShowTransOrder: true, //显示转交订单按钮
isShowSaleRemark: true, //显示修改销售备注
isShowBackClass: true, //显示退课按钮
isShowRenewClass: true, //显示续课按钮
}
}
},
created() {
if (this.$route.query.OrderId) {
this.msg.OrderId = this.$route.query.OrderId;
}
this.getEmployee(0);
},
mounted() {
this.getList();
},
methods: {
//筛选员工
filterFn(val, update) {
update(() => {
if (val === '') {
this.EmployeeList = JSON.parse(JSON.stringify(this.AllemployeeList))
} else {
const needle = val.toLowerCase();
this.EmployeeList = this.AllemployeeList.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1);
}
})
},
//获取业务员
getEmployee(id) {
var qMsg = {
Dept_Id: 0
}
qMsg.Dept_Id = id;
queryEmployee(qMsg).then(res => {
if (res.Code == 1) {
this.EmployeeList = res.Data;
let obj = {
Id: 0,
EmployeeName: "不限"
}
this.EmployeeList.unshift(obj)
this.AllemployeeList = JSON.parse(JSON.stringify(this.EmployeeList));
}
}).catch(() => {
})
},
//翻页
changePage(val) {
if (this.showone == true) {
this.msg.pageIndex = val;
this.getList()
} else {
this.showone = true
}
},
resetSearch() {
this.msg.pageIndex = 1;
this.getList()
},
//获取订单列表
getList() {
if (this.dateList && this.dateList.length > 0) {
this.msg.CreateStartTime = this.dateList[0];
this.msg.CreateEndTime = this.dateList[1];
} else {
this.msg.CreateStartTime = '';
this.msg.CreateEndTime = '';
}
if (this.dateList2 && this.dateList2.length > 0) {
this.msg.StartTime = this.dateList2[0];
this.msg.EndTime = this.dateList2[1];
} else {
this.msg.StartTime = '';
this.msg.EndTime = '';
}
let msg = JSON.parse(JSON.stringify(this.msg));
if (msg.Id == '' || msg.Id == null) {
msg.Id = 0
}
if (msg.EduUserId == '' || msg.EduUserId == null) {
msg.EduUserId = 0
}
this.loading = true;
this.apipostDS("/api/Education/GetConsultOrderStatisticsPage", msg, (res) => {
this.loading = false
if (res.data.resultCode === 1) {
console.log(319, res)
this.data = res.data.data;
let OrderIds = []
this.data.forEach(x => {
OrderIds.push(x.Id)
})
OrderIds = OrderIds.join(',')
if (this.data.length > 0) {
this.$refs.orderL.getOrderFinanceList(OrderIds, 1)
}
// this.pageCount = res.data.PageCount;
}
})
},
//刷新页面
refreshClassOrder() {
this.getList();
},
}
}
</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: transparent;
}
.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
}
</style>
......@@ -190,7 +190,7 @@
<div class="col-2 q-table__title">活动列表</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增" @click="editQuotation(null)" />
<!-- <q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增" @click="editQuotation(null)" /> -->
</div>
</template>
<template v-slot:body-cell-activeName="props">
......@@ -247,9 +247,10 @@
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<div>
<q-btn flat size="xs" icon="edit"
color="accent" style="font-weight:400" label="订单" @click=''/>
<q-btn size="xs" class="q-mb-xs"
color="accent" style="font-weight:400;display:block;" label="立即下单" @click='editQuotation(props.row)'/>
<q-btn size="xs"
color="accent" style="font-weight:400" label="订单中心" @click='goUrl(props.row)'/>
</div>
</q-td>
</template>
......@@ -260,8 +261,7 @@
</q-table>
</div>
<!-- 新增修改活动类型 -->
<ActiveOrderForm v-if="showForm" :save-obj="orderObj" :orderType="1" :modityOrderType="1" :isChaBan="isChaBan"
@close="closeOrderSaveForm" @success="refreshOrder">
<ActiveOrderForm v-if="showForm" :save-obj="orderObj" @close="closeruleset" @success="refreshPage">
</ActiveOrderForm>
</div>
......@@ -369,15 +369,6 @@ import ActiveOrderForm from '../../components/sale/activeOrder-form.vue'
align: "left"
}
],
// //报名列表
// dialogTableVisible: false, //是否显示弹窗
// joinData: [], //报名信息
// joinMsg: {
// LinkMan: '',
// EnrollState: 1,
// ActivityId: 0
// },
showForm:false,
typeObj:{}
}
......@@ -388,12 +379,6 @@ import ActiveOrderForm from '../../components/sale/activeOrder-form.vue'
this.getActiveTypeList();
},
methods: {
// getItem(item) {
// this.joinMsg.ActivityId = item.Id;
// this.getJoinData();
// },
//获取活动类型下拉
getActiveTypeList(){
this.apipostDS("/api/Education/GetCommerceActivityTypeList",{},(res)=>{
......@@ -440,14 +425,10 @@ import ActiveOrderForm from '../../components/sale/activeOrder-form.vue'
this.showForm = false;
this.getList();
},
//显示修改
//显示下单
editQuotation(item) {
this.showForm = true;
if (item) {
this.typeObj = item;
}else{
this.typeObj = {};
}
this.orderObj=item
},
//重新查询
resetSearch() {
......@@ -463,29 +444,17 @@ import ActiveOrderForm from '../../components/sale/activeOrder-form.vue'
closeruleset() {
this.showForm = false;
},
goUrl(url,item,type=0){
if(type===1){
this.$router.push({
path:url,
query:{
name:item.ActivityName
}
})
}else{
this.$router.push({
path:url,
query:{
Id:item.Id
}
})
}
}
//跳转到订单中心
goUrl(item) {
var tempStr = '/sale/activeOrderList?Id=' + item.Id;
this.$router.push({
path: tempStr
});
},
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
<template>
<div class="page-body myOrder">
<div style="width: 100%;display: flex;justify-content: space-between">
<span style="font-size: 20px;font-weight: 400; ">活动报名订单</span>
</div>
<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="resetSearch" clearable standout="bg-primary text-white" v-model="msg.ActivityName"
label="活动名称" @clear="resetSearch" maxlength="20" />
</div>
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" type="number" v-model="msg.Id"
label="订单号" @clear="resetSearch" maxlength="20" />
</div>
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.LinkMan" label="联系人"
@clear="resetSearch" maxlength="20" />
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.EnrollState" :options="EnrollStateOpt" emit-value map-options label="报名状态" />
</div>
<div class="col-3">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="dateList" @change="resetSearch()" value-format="yyyy-MM-dd" type="daterange" style="border:none;"
 range-separator="至"  start-placeholder="报名开始时间"  end-placeholder="报名结束时间">
 </el-date-picker>       
</template>
</q-field>
</div>
<div class="col-3">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="dateList2" @change="resetSearch()" value-format="yyyy-MM-dd" type="daterange" style="border:none;"
 range-separator="至"  start-placeholder="活动开始时间"  end-placeholder="活动结束时间">
 </el-date-picker>       
</template>
</q-field>
</div>
</div>
</div>
<div class="col row wrap q-gutter-x-md" v-if="data.Statistics">
<div class="col stics">
<span class="stics-name">应收款</span>
<span>{{data.Statistics.PreferPrice?data.Statistics.PreferPrice:0}}</span>
</div>
<div class="col stics">
<span class="stics-name">实收款</span>
<span>{{data.Statistics.Income}}</span>
</div>
<div class="col stics">
<span class="stics-name">待收款</span>
<span style="color: #F72E52">{{data.Statistics.DueInMoney}}</span>
</div>
<div class="col stics">
<span class="stics-name">收客人数</span>
<span style="color:#2961FE;">{{data.Statistics.GuestNum}}人</span>
</div>
<div class="col stics">
<span class="stics-name">取消人数</span>
<span>{{data.Statistics.CancelNum}}人</span>
</div>
<div class="col stics">
<span class="stics-name">提成金额</span>
<span>{{data.Statistics.CommissionMoney}}</span>
</div>
<div class="col stics">
<span class="stics-name">额外奖励</span>
<span>{{data.Statistics.ExtraRewardMoney}}</span>
</div>
</div>
<div class="row col" style="justify-content: flex-end">
<div class="row tis">
<div class="tis-k" style="background: #2961FE"></div>
<span>已打单</span>
</div>
<div class="row tis">
<div class="tis-k" style="background: #02C499"></div>
<span>平台出纳已审核</span>
</div>
<div class="row tis">
<div class="tis-k" style="background: #F28C1D"></div>
<span>银行出纳已审核</span>
</div>
<div class="row tis">
<div class="tis-k" style="background: #3FC4FF"></div>
<span>已通过</span>
</div>
</div>
<div class="page-content">
<activeOrder :dataList="data.List" :authObj="authObj" @success="refreshClassOrder" :modityOrderType="1"
ref="orderL">
</activeOrder>
<div class="row" style="justify-content: flex-end;padding: 5px 20px">
<q-pagination v-model="msg.pageIndex" :max="pageCount" @input="changePage" class="full-width justify-end"
color="primary" :input="true">
</q-pagination>
</div>
</div>
</div>
</template>
<script>
// import myOrderForm from '../../components/sale/myOrder-form'
import activeOrder from '../../components/sale/activeOrder-item'
export default {
meta: {
title: "我的活动订单"
},
components: {
// myOrderForm,
activeOrder
},
data() {
return {
dialog: false,
data: {},
loading: false,
dateList: [], //报名时间
dateList2: [], //开班时间
msg: {
pageIndex: 1,
pageSize: 8,
Id: "", //活动id
ActivityName: "", //活动名称
EduUserId: 0, //销售id
CreateStartTime: "", //报名开始时间
CreateEndTime: "", //报名结束时间
StartTime: "", //活动开始时间
EndTime: "", //活动结束时间
EnrollState: 3, //报名状态
LinkMan: "", //联系人
},
EnrollStateOpt: [ //报名状态列表
{
Name: "正常",
Id: 1
},
{
Name: "取消",
Id: 2
},
{
Name: "查询所有",
Id: 3
},
],
pageCount: 1,
showone: false,
//权限判断
authObj: {
isShowGuestBtn: 1, //显示新增学员名单按钮
isShowFinanceBtn: true, //显示财务单据按钮
isShowTransOrder: true, //显示转交订单按钮
isShowSaleRemark: true, //显示修改销售备注
isShowBackClass: true, //显示退课按钮
isShowRenewClass: true, //显示续课按钮
}
}
},
created() {
let data= JSON.parse(localStorage.getItem("loginUserInfo")).data
this.msg.EduUserId=data.Id
},
mounted() {
this.getList();
},
methods: {
//翻页
changePage(val) {
if (this.showone == true) {
this.msg.pageIndex = val;
this.getList()
} else {
this.showone = true
}
},
resetSearch() {
this.msg.pageIndex = 1;
this.getList()
},
//获取订单列表
getList() {
if (this.dateList && this.dateList.length > 0) {
this.msg.CreateStartTime = this.dateList[0];
this.msg.CreateEndTime = this.dateList[1];
} else {
this.msg.CreateStartTime = '';
this.msg.CreateEndTime = '';
}
if (this.dateList2 && this.dateList2.length > 0) {
this.msg.StartTime = this.dateList2[0];
this.msg.EndTime = this.dateList2[1];
} else {
this.msg.StartTime = '';
this.msg.EndTime = '';
}
let msg = JSON.parse(JSON.stringify(this.msg));
if (msg.Id == '' || msg.Id == null) {
msg.Id = 0
}
this.loading = true;
this.apipostDS("/api/Education/GetConsultOrderStatisticsPage", msg, (res) => {
this.loading = false
if (res.data.resultCode === 1) {
console.log(319, res.data)
this.data = res.data.pageData;
let OrderIds = []
// this.data.forEach(x => {
// OrderIds.push(x.Id)
// })
// OrderIds = OrderIds.join(',')
// if (this.data.length > 0) {
// this.$refs.orderL.getOrderFinanceList(OrderIds, 1)
// }
this.pageCount = res.data.pageCount;
}
})
},
//刷新页面
refreshClassOrder() {
this.getList();
},
}
}
</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: transparent;
}
.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
}
</style>
......@@ -676,6 +676,21 @@ const routes = [{
component: () =>
import("pages/sale/activityList.vue")
},
{
path: "/sale/activeOrderList", //销售 活动订单中心
component: () =>
import("pages/sale/activeOrderList.vue")
},
{
path: "/sale/myActiveOrder", //销售 我的活动订单
component: () =>
import("pages/sale/myActiveOrder.vue")
},
{
path: "/sale/activeOrderStatistics", //销售 活动订单统计
component: () =>
import("pages/sale/activeOrderStatistics.vue")
},
{
path: "/activity/activeType", //活动 活动类型
component: () =>
......@@ -771,7 +786,7 @@ const routes = [{
component: () =>
import("pages/user/personalData.vue")
},
{
path: "/course/questionlist", //题库列表
component: () =>
......
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