Commit 8652627c authored by 罗超's avatar 罗超

1

parent cd617656
...@@ -115,10 +115,10 @@ ...@@ -115,10 +115,10 @@
</q-step> </q-step>
<q-step :name="2" title="确认" icon="settings" :done="step > 2"> <q-step :name="2" title="确认" icon="settings" :done="step > 2">
<orderForm <orderForm
ref="orderForm" ref="orderForm"
:save-obj="saveObj" :save-obj="saveObj"
:stuData="stuData" :stuData="stuData"
:isChaBan="isChaBan" :modityOrderType="1"
@success="$emit('close')" @success="$emit('close')"
></orderForm> ></orderForm>
</q-step> </q-step>
...@@ -226,7 +226,6 @@ export default { ...@@ -226,7 +226,6 @@ export default {
courseData: [], //课程列表 courseData: [], //课程列表
coursePageCount: 0, //课程页数 coursePageCount: 0, //课程页数
saveObj: {}, //所选课程 saveObj: {}, //所选课程
isChaBan: 0, //是否插班
//关联校区列表 //关联校区列表
schoolList: [], schoolList: [],
ClassList: [], //关联课程下拉数据 ClassList: [], //关联课程下拉数据
...@@ -250,11 +249,6 @@ export default { ...@@ -250,11 +249,6 @@ export default {
const ids = this.select.map(e => e.StuId).toString(); const ids = this.select.map(e => e.StuId).toString();
getOrderGuestRenewState({ StuIds: ids }).then(res => { getOrderGuestRenewState({ StuIds: ids }).then(res => {
this.stuData = res.Data; this.stuData = res.Data;
if (res.Data.RenewNum == 0) {
this.isChaBan = 0;
} else {
this.isChaBan = 1;
}
}); });
}, },
//获取课程分页列表 //获取课程分页列表
......
<style> <style>
.editOrderDrawerTop { .field {
width: 100%; height: 60px;
height: 50px;
display: flex;
justify-content: space-between;
background-color: #f0f5fb;
padding: 5px 10px;
align-items: center;
} }
</style> </style>
<!--订单操作--> <!--订单操作-->
<template> <template>
<div> <div>
<!-- <div class="editOrderDrawerTop">
<div style="display:flex;align-items:center;margin-left:10px;">
<span class="drawer_Span">{{
OrderMsg.OrderId > 0 ? "修改订单" : "立即下单"
}}</span>
</div>
</div> -->
<div class="row q-mb-md"> <div class="row q-mb-md">
<div class="col-10"> <div class="col-10">
<div v-for="(item, index) in stuData.StuList"> <div v-for="(item, index) in stuData.StuList">
...@@ -29,25 +16,31 @@ ...@@ -29,25 +16,31 @@
</div> </div>
</div> </div>
<div class="col-2"> <div class="col-2">
<q-toggle v-model="OrderMsg.isChaBan" :true-value="1" :false-value='0' label="插班报入" /> <q-toggle
v-model="OrderMsg.isChaBan"
:true-value="1"
:false-value="0"
label="插班报入"
/>
</div> </div>
</div> </div>
<div style="row items-center"> <div style="row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<q-input <div class="col-6 field">
filled <q-input
stack-label filled
maxlength="3" stack-label
:dense="false" maxlength="3"
@keyup.native="checkInteger(OrderMsg, 'GuestNum')" :dense="false"
v-model="OrderMsg.GuestNum" @keyup.native="checkInteger(OrderMsg, 'GuestNum')"
@input="calcPrice()" v-model="OrderMsg.GuestNum"
class="col-6" @input="calcPrice()"
label="人数" label="人数"
:rules="[val => !!val || '请填写人数']" :rules="[val => !!val || '请填写人数']"
disable disable
/> />
<template v-if="isChaBan == 1"> </div>
<template v-if="OrderMsg.isChaBan == 1">
<q-select <q-select
filled filled
option-value="CourseId" option-value="CourseId"
...@@ -268,7 +261,7 @@ ...@@ -268,7 +261,7 @@
</q-item> </q-item>
</template> </template>
</q-select> </q-select>
<q-select <!-- <q-select
:disable="modityOrderType == 2 || OrderMsg.JoinType == 3" :disable="modityOrderType == 2 || OrderMsg.JoinType == 3"
v-model="OrderMsg.CustomerId" v-model="OrderMsg.CustomerId"
:options="myCustomerList" :options="myCustomerList"
...@@ -290,7 +283,7 @@ ...@@ -290,7 +283,7 @@
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
</q-select> </q-select> -->
<q-input <q-input
:disable="modityOrderType == 2" :disable="modityOrderType == 2"
v-if="OrderMsg.OrderSource == 3" v-if="OrderMsg.OrderSource == 3"
...@@ -401,13 +394,12 @@ export default { ...@@ -401,13 +394,12 @@ export default {
data() { data() {
return { return {
IsShowEditOrder: true, IsShowEditOrder: true,
OrderMsg: { OrderMsg: {
ClassId: 0, //班级编号 ClassId: 0, //班级编号
GuestNum: 0, //人数 GuestNum: 0, //人数
B2CRatio: 0, B2CRatio: 0,
B2CReNewRatio: 0, B2CReNewRatio: 0,
CustomerId: 0, //市场专员
Unit_Price: 0, Unit_Price: 0,
PreferPrice: 0, //应收 PreferPrice: 0, //应收
OrderSource: 0, OrderSource: 0,
...@@ -438,7 +430,7 @@ export default { ...@@ -438,7 +430,7 @@ export default {
StuIds: "", StuIds: "",
// NormalCommission:'',//正常返佣金额 // NormalCommission:'',//正常返佣金额
// RenewCommission:"",// 预计返佣金额 // RenewCommission:"",// 预计返佣金额
isChaBan:0, isChaBan: 0
}, },
Unit_PriceRemark: "", //单价规则 Unit_PriceRemark: "", //单价规则
IsShowUpPrice: false, //是否显示高于定价 IsShowUpPrice: false, //是否显示高于定价
...@@ -611,8 +603,8 @@ export default { ...@@ -611,8 +603,8 @@ export default {
if (this.OrderMsg.OrderType == 2) { if (this.OrderMsg.OrderType == 2) {
this.OrderMsg.OldPreferPrice = Number(guestNum * unit_price).toFixed(2); this.OrderMsg.OldPreferPrice = Number(guestNum * unit_price).toFixed(2);
} }
this.OrderMsg.GuestNum = this.stuData.StuList.length; this.OrderMsg.GuestNum = this.stuData.StuList.length;
console.log("tag551", this.OrderMsg.GuestNum);
this.OrderMsg.DiscountMoney = 0; this.OrderMsg.DiscountMoney = 0;
this.stuData.StuList.map(e => { this.stuData.StuList.map(e => {
if (e.IsRenewGuest == 0) { if (e.IsRenewGuest == 0) {
...@@ -625,7 +617,7 @@ export default { ...@@ -625,7 +617,7 @@ export default {
}); });
}, },
initData() { initData() {
console.log("tag", "init", this.saveObj); console.log("init", this.saveObj);
if (this.saveObj && this.saveObj.OrderId > 0) { if (this.saveObj && this.saveObj.OrderId > 0) {
getClassOrderInfo({ getClassOrderInfo({
OrderId: this.saveObj.OrderId OrderId: this.saveObj.OrderId
...@@ -731,8 +723,6 @@ export default { ...@@ -731,8 +723,6 @@ export default {
} }
this.IsShowEditOrder = true; this.IsShowEditOrder = true;
this.calcPrice(); this.calcPrice();
// console.log("this.saveObj", this.saveObj);
} }
}, },
//筛选员工 //筛选员工
...@@ -798,7 +788,7 @@ export default { ...@@ -798,7 +788,7 @@ export default {
//修改订单 //修改订单
saveOrderInfo() { saveOrderInfo() {
//插班验证课程和生效时间 //插班验证课程和生效时间
if (this.isChaBan == 1) { if (this.OrderMsg.isChaBan == 1) {
this.$refs.CourseId.validate(); this.$refs.CourseId.validate();
this.$refs.EffectTime.validate(); this.$refs.EffectTime.validate();
if (this.$refs.CourseId.hasError) { if (this.$refs.CourseId.hasError) {
...@@ -853,6 +843,7 @@ export default { ...@@ -853,6 +843,7 @@ export default {
} }
} }
this.OrderMsg.StuIds = this.stuData.StuList.map(e => e.StuId).toString(); this.OrderMsg.StuIds = this.stuData.StuList.map(e => e.StuId).toString();
this.OrderMsg.CustomerId = this.stuData.CustomerId;
setClassOrder(this.OrderMsg).then(res => { setClassOrder(this.OrderMsg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
...@@ -911,10 +902,3 @@ export default { ...@@ -911,10 +902,3 @@ export default {
} }
}; };
</script> </script>
<style>
.savebtn {
position: absolute;
bottom: 0;
right: 0;
}
</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