Commit be7e9635 authored by 罗超's avatar 罗超

2

parent d291084e
......@@ -2,7 +2,8 @@
<template>
<div>
<div class="q-mb-sm text-accent">
<span class="text-primary">班级:</span>{{ saveObj.ClassName }}
<span class="text-primary" v-if="mode === 1">班级:</span>
<span v-if="mode === 1">{{ saveObj.ClassName }}</span>
<span class="q-ml-md text-primary">课程:</span>{{ saveObj.CourseName }}
</div>
<div class="row q-mb-md">
......@@ -10,11 +11,11 @@
<div v-for="(item, index) in stuData.StuList">
<q-chip icon="person" class="primary"
>{{ item.StuName }}
<span v-if="item.IsRenewGuest == 1">(续费)</span>
<span v-if="item.IsRenewGuest === 1">(续费)</span>
</q-chip>
</div>
</div>
<div class="col-2">
<div class="col-2" v-if="mode == 1">
<q-toggle
v-model="OrderMsg.IsChaBan"
:true-value="1"
......@@ -200,7 +201,18 @@
class="col-6 q-py-sm"
label="应收"
/>
<q-select
v-if="mode == 2"
standout="bg-primary text-white"
option-value="SId"
option-label="SName"
v-model="OrderMsg.ScrollSchoolId"
:options="newSchoolList"
emit-value
map-options
class="col-6 q-py-sm"
label="校区"
/>
<q-select
:disable="modityOrderType == 2"
standout="bg-primary text-white"
......@@ -338,16 +350,21 @@
</q-card-section>
<q-card-section class="q-pt-none">
{{inceptionData.Message}}
{{ inceptionData.Message }}
</q-card-section>
<q-card-actions align="right" class="text-primary">
<q-btn flat label="取消" size="sm" v-close-popup />
<q-btn label="立即查看" size="sm" color="accent q-px-md" style="font-weight:400 !important" @click="goorder" />
<q-btn
label="立即查看"
size="sm"
color="accent q-px-md"
style="font-weight:400 !important"
@click="goorder"
/>
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
......@@ -366,6 +383,10 @@ export default {
type: Object,
default: null
},
mode: {
type: Number, //1:约课,2:班课
default: 1
},
//订单类型
orderType: {
type: Number,
......@@ -380,6 +401,10 @@ export default {
//学生是否续费
type: Object,
default: null
},
schoolList: {
type: Array,
default: () => []
}
},
data() {
......@@ -419,10 +444,12 @@ export default {
CustomerId: 0, //同行
OrderIdentify: 2, //标识参数, 1产品下单 2客户转订单
StuIds: "",
EnterId: 0 //市场人员
EnterId: 0, //市场人员
// NormalCommission:'',//正常返佣金额
// RenewCommission:"",// 预计返佣金额
ScrollSchoolId: -1
},
newSchoolList: [],
EnterName: "", //市场人员
Unit_PriceRemark: "", //单价规则
IsShowUpPrice: false, //是否显示高于定价
......@@ -437,8 +464,8 @@ export default {
beforeOrderList: [], //前置订单数据
HelpEnterDisable: false, //是否可选择协助教师
CourseConsultantDisable: false, //是否可选择课程顾问
inception:false,
inceptionData:null,
inception: false,
inceptionData: null
};
},
created() {
......@@ -452,6 +479,12 @@ export default {
this.getSelectClass();
},
mounted() {
this.newSchoolList = [];
this.newSchoolList = JSON.parse(JSON.stringify(this.schoolList));
this.newSchoolList.unshift({
SName: "不限",
SId: -1
});
this.initData();
this.getAssistList();
this.OrderMsg.EnterId = this.stuData.EnterId;
......@@ -503,11 +536,11 @@ export default {
//计算课程单价和应收金额
calcPrice() {
var guestNum = 0;
if (this.OrderMsg.GuestNum && this.OrderMsg.GuestNum > 0) {
guestNum = Number(this.OrderMsg.GuestNum);
}
let temp = this.CourseList.find(
x => x.CourseId == this.OrderMsg.CourseId
);
......@@ -620,12 +653,15 @@ export default {
if (e.IsRenewGuest == 0) {
this.OrderMsg.DiscountMoney = this.accAdd(
this.OrderMsg.DiscountMoney,
this.accMul(this.OrderMsg.Class_Price, this.OrderMsg.B2CRatio/100)
this.accMul(this.OrderMsg.Class_Price, this.OrderMsg.B2CRatio / 100)
);
} else {
this.OrderMsg.DiscountMoney = this.accAdd(
this.OrderMsg.DiscountMoney,
this.accMul(this.OrderMsg.Class_Price, this.OrderMsg.B2CReNewRatio/100)
this.accMul(
this.OrderMsg.Class_Price,
this.OrderMsg.B2CReNewRatio / 100
)
);
}
});
......@@ -673,10 +709,10 @@ export default {
this.OrderMsg.CourseId = "";
}
if (this.saveObj.B2CRatio) {
this.OrderMsg.B2CRatio = this.saveObj.B2CRatio
this.OrderMsg.B2CRatio = this.saveObj.B2CRatio;
}
if (this.saveObj.B2CReNewRatio) {
this.OrderMsg.B2CReNewRatio = this.saveObj.B2CReNewRatio
this.OrderMsg.B2CReNewRatio = this.saveObj.B2CReNewRatio;
}
}
this.IsShowEditOrder = true;
......@@ -789,40 +825,41 @@ export default {
}
this.OrderMsg.StuIds = this.stuData.StuList.map(e => e.StuId).toString();
this.OrderMsg.CustomerId = this.stuData.CustomerId;
setClassOrder(this.OrderMsg).then(res => {
this.$emit("cancelloading");//取消按钮的加载
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(err=>{
this.$emit("cancelloading");//取消按钮的加载
if(err.Code==2){
this.inceptionData = err
setClassOrder(this.OrderMsg)
.then(res => {
this.$emit("cancelloading"); //取消按钮的加载
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(err => {
this.$emit("cancelloading"); //取消按钮的加载
if (err.Code == 2) {
this.inceptionData = err;
this.inception = true;
}
});
},
goorder(){
this.OpenNewUrl('/sale/myOrder', {
OrderId: this.inceptionData.Data,
}
});
this.inception = false;
},
goorder() {
this.OpenNewUrl("/sale/myOrder", {
OrderId: this.inceptionData.Data
});
this.inception = false;
},
//获取前置下拉数据
getSelectClass() {
......
This diff is collapsed.
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