Commit f4a717da authored by 黄奎's avatar 黄奎

页面修改

parent 78774455
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
</div> </div>
<div style="padding:20px 15px;"> <div style="padding:20px 15px;">
<q-input filled stack-label maxlength="100" :dense="false" @keyup.native="checkInteger(OrderMsg,'GuestNum')" <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="人数" v-model="OrderMsg.GuestNum" @input="calcPrice()" class="col-12" label="人数" :rules="[val => !!val || '请填写人数']"
:rules="[val => !!val || '请填写人数']" :disable="modityOrderType==2" /> :disable="modityOrderType==2" />
<template v-if="isChaBan==1"> <template v-if="isChaBan==1">
<q-select filled option-value="CourseId" :disable="modityOrderType==2" option-label="CourseName" <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" ref="CourseId" v-model="OrderMsg.CourseId" :options="CourseList" emit-value map-options class="q-pb-lg"
:rules="[val => !!val || '请选择课程']" label="选择课程" @input="changePrice" /> :rules="[val => !!val || '请选择课程']" label="选择课程" @input="calcPrice()" />
<q-input filled stack-label :dense="false" v-model="OrderMsg.StartClassHours" :disable="modityOrderType==2" <q-input filled stack-label :dense="false" v-model="OrderMsg.StartClassHours" :disable="modityOrderType==2"
@keyup.native="checkInteger(OrderMsg,'StartClassHours')" ref="StartClassHours" @input="countPrice" @keyup.native="checkInteger(OrderMsg,'StartClassHours')" ref="StartClassHours" @input="calcPrice()"
class="col-12 q-pb-lg" label="起始课时" /> class="col-12 q-pb-lg" label="起始课时" />
<q-input filled v-model="OrderMsg.EffectTime" ref="EffectTime" :rules="[val => !!val || '请填生效时间']" <q-input filled v-model="OrderMsg.EffectTime" ref="EffectTime" :rules="[val => !!val || '请填生效时间']"
class="col-6 q-pb-lg" :disable="modityOrderType==2" mask="date" label="生效时间"> class="col-6 q-pb-lg" :disable="modityOrderType==2" mask="date" label="生效时间">
...@@ -56,16 +56,16 @@ ...@@ -56,16 +56,16 @@
</template> </template>
<template v-if="modityOrderType==1"> <template v-if="modityOrderType==1">
<q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" <q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price"
:disable="IsShowUpPrice==true?false:true" @blur="countPrice" class="col-12" label="成交单价" :disable="IsShowUpPrice==true?false:true" @blur="calcPrice()" class="col-12" label="成交单价"
:rules="[val => !!val || '请填成交单价']" /> :rules="[val => !!val || '请填成交单价']" />
<q-toggle v-model="IsShowUpPrice" label="高于定价收生" class="q-mb-md" /> <q-toggle v-model="IsShowUpPrice" label="高于定价收生" class="q-mb-md" />
</template> </template>
<template v-if="modityOrderType==2"> <template v-if="modityOrderType==2">
<q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" :disable="true" @input="countPrice" <q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" :disable="true" @input="calcPrice()"
class="col-12" label="成交单价" :rules="[val => !!val || '请填成交单价']" /> class="col-12" label="成交单价" :rules="[val => !!val || '请填成交单价']" />
</template> </template>
<template v-if="modityOrderType==3"> <template v-if="modityOrderType==3">
<q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" @input="countPrice" class="col-12" <q-input filled stack-label :dense="false" v-model="OrderMsg.Unit_Price" @input="calcPrice()" class="col-12"
label="成交单价" :rules="[val => !!val || '请填成交单价']" /> label="成交单价" :rules="[val => !!val || '请填成交单价']" />
</template> </template>
<q-input filled stack-label :disable="modityOrderType!=3" :dense="false" maxlength="10" <q-input filled stack-label :disable="modityOrderType!=3" :dense="false" maxlength="10"
...@@ -186,19 +186,14 @@ ...@@ -186,19 +186,14 @@
}, },
created() { created() {
this.OrderMsg.IsChaBan = this.isChaBan; this.OrderMsg.IsChaBan = this.isChaBan;
this.initConfig(); //HK2021-08-06新增
if (this.saveObj && this.saveObj.CourseId) {
this.OrderMsg.CourseId = this.saveObj.CourseId;
}
this.getOrderSEList(); this.getOrderSEList();
this.getEmployee(); this.getEmployee();
this.initConfig();
this.getSelectClass(); 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() { mounted() {
this.initData() this.initData()
...@@ -207,7 +202,7 @@ ...@@ -207,7 +202,7 @@
}, },
methods: { methods: {
//获取插班报入配置信息 //获取班级课程信息
initConfig() { initConfig() {
var qMsg = { var qMsg = {
ClassId: 0 ClassId: 0
...@@ -224,11 +219,12 @@ ...@@ -224,11 +219,12 @@
if (this.OrderMsg && this.OrderMsg.CourseId) { if (this.OrderMsg && this.OrderMsg.CourseId) {
this.courseObj = this.CourseList.find(x => x.CourseId == this.OrderMsg.CourseId); this.courseObj = this.CourseList.find(x => x.CourseId == this.OrderMsg.CourseId);
} }
this.calcPrice();
} }
}); });
}, },
//选择课程切换价格 //计算课程单价和应收金额
changePrice() { calcPrice() {
let temp = this.CourseList.find(x => x.CourseId == this.OrderMsg.CourseId); let temp = this.CourseList.find(x => x.CourseId == this.OrderMsg.CourseId);
if (temp) { if (temp) {
this.courseObj = temp; this.courseObj = temp;
...@@ -238,9 +234,11 @@ ...@@ -238,9 +234,11 @@
let DisCount = (100 - temp.CoursePriceList[0].PriceMoney) / 100; let DisCount = (100 - temp.CoursePriceList[0].PriceMoney) / 100;
this.OrderMsg.Unit_Price = temp.SellPrice * DisCount; this.OrderMsg.Unit_Price = temp.SellPrice * DisCount;
this.UnitPrice = temp.SellPrice * DisCount; this.UnitPrice = temp.SellPrice * DisCount;
this.OrderMsg.SaleRemark = "单人报名优惠" + temp.CoursePriceList[0].PriceMoney + "%";
} else { } else {
this.OrderMsg.Unit_Price = temp.SellPrice - item.CoursePriceList[0].PriceMoney; this.OrderMsg.Unit_Price = temp.SellPrice - item.CoursePriceList[0].PriceMoney;
this.UnitPrice = temp.SellPrice - item.CoursePriceList[0].PriceMoney; this.UnitPrice = temp.SellPrice - item.CoursePriceList[0].PriceMoney;
this.OrderMsg.SaleRemark = "单人报名优惠" + temp.CoursePriceList[0].PriceMoney;
} }
} else { } else {
this.OrderMsg.Unit_Price = temp.SellPrice; this.OrderMsg.Unit_Price = temp.SellPrice;
...@@ -253,9 +251,11 @@ ...@@ -253,9 +251,11 @@
let DisCount = (100 - temp.CoursePriceList[1].PriceMoney) / 100; let DisCount = (100 - temp.CoursePriceList[1].PriceMoney) / 100;
this.OrderMsg.Unit_Price = temp.SellPrice * DisCount; this.OrderMsg.Unit_Price = temp.SellPrice * DisCount;
this.UnitPrice = temp.SellPrice * DisCount; this.UnitPrice = temp.SellPrice * DisCount;
this.OrderMsg.SaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney + "%";
} else { } else {
this.OrderMsg.Unit_Price = temp.SellPrice - item.CoursePriceList[1].PriceMoney; this.OrderMsg.Unit_Price = temp.SellPrice - item.CoursePriceList[1].PriceMoney;
this.UnitPrice = temp.SellPrice - item.CoursePriceList[1].PriceMoney; this.UnitPrice = temp.SellPrice - item.CoursePriceList[1].PriceMoney;
this.OrderMsg.SaleRemark = "双人报名优惠" + temp.CoursePriceList[1].PriceMoney;
} }
} else { } else {
this.OrderMsg.Unit_Price = temp.SellPrice; this.OrderMsg.Unit_Price = temp.SellPrice;
...@@ -275,7 +275,29 @@ ...@@ -275,7 +275,29 @@
} }
this.courseObj = {}; this.courseObj = {};
} }
this.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 = (unit_price / 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);
}
}, },
initData() { initData() {
if (this.saveObj && this.saveObj.OrderId > 0) { if (this.saveObj && this.saveObj.OrderId > 0) {
...@@ -321,7 +343,6 @@ ...@@ -321,7 +343,6 @@
this.OrderMsg.OrderNature = 0; this.OrderMsg.OrderNature = 0;
this.OrderMsg.OldPreferPrice = 0; this.OrderMsg.OldPreferPrice = 0;
this.OrderMsg.GuestNum = 1; this.OrderMsg.GuestNum = 1;
this.OrderMsg.CourseId = '';
this.OrderMsg.StartClassHours = 0; this.OrderMsg.StartClassHours = 0;
this.OrderMsg.IsChaBan = this.isChaBan; this.OrderMsg.IsChaBan = this.isChaBan;
this.OrderMsg.EffectTime = ""; this.OrderMsg.EffectTime = "";
...@@ -342,9 +363,15 @@ ...@@ -342,9 +363,15 @@
if (this.saveObj.SourceId) { if (this.saveObj.SourceId) {
this.OrderMsg.SourceId = this.saveObj.SourceId; this.OrderMsg.SourceId = this.saveObj.SourceId;
} }
if (this.saveObj.CourseId) {
this.OrderMsg.CourseId = this.saveObj.CourseId;
} else {
this.OrderMsg.CourseId = '';
}
} }
this.countPrice();
this.IsShowEditOrder = true; this.IsShowEditOrder = true;
this.calcPrice();
} }
}, },
//筛选员工 //筛选员工
...@@ -373,7 +400,7 @@ ...@@ -373,7 +400,7 @@
} }
this.EmployeeList.unshift(obj); this.EmployeeList.unshift(obj);
} }
}).catch(() => {}) })
}, },
//关闭弹窗 //关闭弹窗
closeEditOrder() { closeEditOrder() {
...@@ -390,42 +417,30 @@ ...@@ -390,42 +417,30 @@
} }
}) })
}, },
//计算价格
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() { saveOrderInfo() {
//插班验证课程和生效时间
if (this.isChaBan == 1) { if (this.isChaBan == 1) {
this.$refs.CourseId.validate(); this.$refs.CourseId.validate();
this.$refs.EffectTime.validate(); this.$refs.EffectTime.validate();
if (this.$refs.CourseId.hasError || this.$refs.EffectTime.hasError) { if (this.$refs.CourseId.hasError) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择课程!`
})
return;
}
if (this.$refs.EffectTime.hasError) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择生效时间!`
})
return; return;
} }
} }
//计算应收价格 //插班报名计算应收
if (this.OrderMsg.IsChaBan == 1) { if (this.OrderMsg.IsChaBan == 1) {
if (this.modityOrderType == 1 || this.modityOrderType == 2) { if (this.modityOrderType == 1 || this.modityOrderType == 2) {
if (!this.courseObj || (this.courseObj && !this.courseObj.ClassHours)) { if (!this.courseObj || (this.courseObj && !this.courseObj.ClassHours)) {
...@@ -437,7 +452,9 @@ ...@@ -437,7 +452,9 @@
this.OrderMsg.StartClassHours) * this.OrderMsg.GuestNum - this.OrderMsg.LessPrice; this.OrderMsg.StartClassHours) * this.OrderMsg.GuestNum - this.OrderMsg.LessPrice;
this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2); this.OrderMsg.PreferPrice = Number(newPreferPrice).toFixed(2);
} }
} else { }
//正常报名计算应收
if (this.OrderMsg.IsChaBan == 0) {
if (this.modityOrderType == 1 || this.modityOrderType == 2) { if (this.modityOrderType == 1 || this.modityOrderType == 2) {
this.OrderMsg.PreferPrice = (this.OrderMsg.GuestNum * this.OrderMsg.Unit_Price) - this.OrderMsg.LessPrice; this.OrderMsg.PreferPrice = (this.OrderMsg.GuestNum * this.OrderMsg.Unit_Price) - this.OrderMsg.LessPrice;
} }
...@@ -461,7 +478,7 @@ ...@@ -461,7 +478,7 @@
message: res.Message message: res.Message
}) })
} }
}).catch(() => {}) })
}, },
//获取前置下拉数据 //获取前置下拉数据
getSelectClass() { getSelectClass() {
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
<div class="row" style="align-items: center ;margin:0;padding:0;"> <div class="row" style="align-items: center ;margin:0;padding:0;">
<span class="d2-n">带课老师</span> <span class="d2-n">带课老师</span>
<template v-if="item.Teacher_Id==0"> <template v-if="item.Teacher_Id==0">
<span style="color:red">未指定</span> <span style="color:red">未指定</span>
</template> </template>
<template v-else> <template v-else>
<q-avatar rounded size="sm" v-if="item.TeacherHead&&item.TeacherHead!=''"> <q-avatar rounded size="sm" v-if="item.TeacherHead&&item.TeacherHead!=''">
...@@ -271,8 +271,6 @@ ...@@ -271,8 +271,6 @@
<div v-if="item.IsCanApply==0"> <div v-if="item.IsCanApply==0">
<img src="../../assets/images/administration/bmym.png" alt="" <img src="../../assets/images/administration/bmym.png" alt=""
style="width: 64px;height: 62px;margin:20px 15px 0 0" v-if="item.SurplusNum==0"> style="width: 64px;height: 62px;margin:20px 15px 0 0" v-if="item.SurplusNum==0">
<!-- <img src="../../assets/images/administration/guoqi.png" alt="" style="width: 64px;height: 62px"
v-if="getEXPDate(item.EndOrderTime)==true"> -->
</div> </div>
<div> <div>
<q-btn style="margin-top:10px;" size="sm" color="primary" label="订单中心" @click="goclassorder(item)" /> <q-btn style="margin-top:10px;" size="sm" color="primary" label="订单中心" @click="goclassorder(item)" />
...@@ -301,8 +299,8 @@ ...@@ -301,8 +299,8 @@
</ul> </ul>
<div v-else style="width: 100%;color: #999999;text-align: center;font-size: 15px">暂无数据</div> <div v-else style="width: 100%;color: #999999;text-align: center;font-size: 15px">暂无数据</div>
</div> </div>
<editorder-form v-if="isShowEditOrderForm" :save-obj="orderObj" :orderType="1" :modityOrderType="1" :isChaBan="isChaBan" <editorder-form v-if="isShowEditOrderForm" :save-obj="orderObj" :orderType="1" :modityOrderType="1"
@close="closeOrderSaveForm" @success="refreshOrder"> :isChaBan="isChaBan" @close="closeOrderSaveForm" @success="refreshOrder">
</editorder-form> </editorder-form>
</div> </div>
</div> </div>
...@@ -347,7 +345,7 @@ ...@@ -347,7 +345,7 @@
Q_CanApply: "0", //是否可以报名 1是 Q_CanApply: "0", //是否可以报名 1是
JoinStartTime: '', //报名截止日期开始 JoinStartTime: '', //报名截止日期开始
JoinEndTime: "", //报名截止日期结束 JoinEndTime: "", //报名截止日期结束
ClassNo:'',//班号 ClassNo: '', //班号
}, },
//关联校区列表 //关联校区列表
schoolList: [], schoolList: [],
...@@ -360,6 +358,7 @@ ...@@ -360,6 +358,7 @@
orderObj: { orderObj: {
ClassId: 0, ClassId: 0,
Unit_Price: 0, Unit_Price: 0,
CourseId: 0,
}, },
isChaBan: 0, //是否插班(0-正常报入,1-插班报入) isChaBan: 0, //是否插班(0-正常报入,1-插班报入)
} }
...@@ -369,7 +368,7 @@ ...@@ -369,7 +368,7 @@
this.CourseList(); this.CourseList();
this.GetTeacherList(); this.GetTeacherList();
if (this.$route.query && this.$route.query.ClassName) { if (this.$route.query && this.$route.query.ClassName) {
this.msg.ClassName = decodeURI(this.$route.query.ClassName) ; this.msg.ClassName = decodeURI(this.$route.query.ClassName);
} }
if (this.$route.query && this.$route.query.ClassNo) { if (this.$route.query && this.$route.query.ClassNo) {
this.msg.ClassNo = this.$route.query.ClassNo; this.msg.ClassNo = this.$route.query.ClassNo;
...@@ -525,7 +524,7 @@ ...@@ -525,7 +524,7 @@
}, },
//立即报名和插班报名 //立即报名和插班报名
placeAnorder(item, type) { placeAnorder(item, type) {
if(item.Teacher_Id==0){ if (item.Teacher_Id == 0) {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
...@@ -536,11 +535,12 @@ ...@@ -536,11 +535,12 @@
this.isChaBan = type; this.isChaBan = type;
this.orderObj.ClassId = item.ClassId; this.orderObj.ClassId = item.ClassId;
this.orderObj.Unit_Price = item.SellPrice; this.orderObj.Unit_Price = item.SellPrice;
this.orderObj.CourseId = item.CouseId;
this.isShowEditOrderForm = true; this.isShowEditOrderForm = true;
}, },
//跳转到课程大纲 //跳转到课程大纲
goChapter(CouseId){ goChapter(CouseId) {
this.OpenNewUrl('/course/chapter' , { this.OpenNewUrl('/course/chapter', {
CourseId: CouseId CourseId: CouseId
}); });
} }
...@@ -684,15 +684,18 @@ ...@@ -684,15 +684,18 @@
border: none !important; border: none !important;
background: transparent !important; background: transparent !important;
} }
.japanFeature{
font-size:14px; .japanFeature {
color:#111111; font-size: 14px;
color: #111111;
cursor: pointer; cursor: pointer;
margin-left:-1px; margin-left: -1px;
} }
.CourseFearure{
margin:10px; .CourseFearure {
width:500px; margin: 10px;
color:#000; width: 500px;
color: #000;
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment