Commit 3ba5954c authored by 罗超's avatar 罗超

1

parent 652551f9
...@@ -21,27 +21,27 @@ ...@@ -21,27 +21,27 @@
</div> </div>
</div> </div>
<div style="padding:20px 15px;"> <div style="padding:20px 15px;">
<q-select standout="bg-primary text-white" v-model="OrderMsg.EduStudentId" class="col-12 q-mb-lg" :options="stuList" clearable <q-select standout="bg-primary text-white" v-model="OrderMsg.EduStudentId" class="col-12 q-mb-lg"
emit-value map-options label="学员" option-value="StuId" option-label="StuName" @input="stuChange"/> :options="stuList" clearable emit-value map-options label="学员" option-value="StuId" option-label="StuName"
<q-input filled stack-label maxlength="30" :dense="false" @input="stuChange" />
v-model="OrderMsg.LinkMan" class="col-12" ref="LinkMan" label="姓名" :disable="isdisable" <q-input filled stack-label maxlength="30" :dense="false" v-model="OrderMsg.LinkMan" class="col-12"
:rules="[val => !!val || '请填写姓名']" /> ref="LinkMan" label="姓名" :disable="isdisable" :rules="[val => !!val || '请填写姓名']" />
<q-input filled stack-label maxlength="30" :dense="false" type="number" :disable="isdisable" <q-input filled stack-label maxlength="30" :dense="false" type="number" :disable="isdisable"
v-model="OrderMsg.LinkTel" class="col-12" ref="LinkTel" label="联系电话" v-model="OrderMsg.LinkTel" class="col-12" ref="LinkTel" label="联系电话" :rules="[val => !!val || '请填写联系电话']" />
:rules="[val => !!val || '请填写联系电话']" /> <q-select standout="bg-primary text-white" v-model="OrderMsg.Sex" class="col-12 q-mb-lg" :options="sexList"
<q-select standout="bg-primary text-white" v-model="OrderMsg.Sex" class="col-12 q-mb-lg" :options="sexList" :disable="isdisable" :disable="isdisable" emit-value map-options label="性别" option-value="Id" option-label="name" />
emit-value map-options label="性别" option-value="Id" option-label="name"/>
<!-- <q-input filled stack-label maxlength="30" :dense="false" type="number" <!-- <q-input filled stack-label maxlength="30" :dense="false" type="number"
v-model="OrderMsg.PeopleNum" class="col-12" :min="1" label="人数" v-model="OrderMsg.PeopleNum" class="col-12" :min="1" label="人数"
:rules="[val => !!val || '请填写人数']" /> --> :rules="[val => !!val || '请填写人数']" /> -->
<q-input filled stack-label :dense="false" v-model="OrderMsg.Remark" style="margin-top: 20px" type="textarea"
class="col-12 q-mb-lg" ref="Remark" label="备注" />
<div> <div>
单价:{{OrderMsg.UnitPrice}} 单价:<span style="color:#f00" v-if="OrderMsg.UnitPrice">{{OrderMsg.UnitPrice}}</span>
</div> </div>
<div> <div>
总价:{{OrderMsg.UnitPrice*OrderMsg.PeopleNum}} 总价:<span style="color:#f00" v-if="OrderMsg.UnitPrice">{{OrderMsg.UnitPrice*OrderMsg.PeopleNum}}</span>
</div> </div>
<q-input filled stack-label :dense="false" v-model="OrderMsg.Remark" style="margin-top: 20px"
type="textarea" class="col-12" ref="Remark" label="备注" />
<div style="margin:30px 10px 70px 0;"> <div style="margin:30px 10px 70px 0;">
<q-btn class="q-mr-md" label="取消" @click="closeEditOrder" /> <q-btn class="q-mr-md" label="取消" @click="closeEditOrder" />
<q-btn color="accent" class="q-mr-md" label="保存" @click="saveOrderInfo()" /> <q-btn color="accent" class="q-mr-md" label="保存" @click="saveOrderInfo()" />
...@@ -55,78 +55,75 @@ ...@@ -55,78 +55,75 @@
</q-dialog> </q-dialog>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
saveObj: { saveObj: {
type: Object, type: Object,
default: null, default: null,
}, },
sourceType:{ sourceType: {
type:Number, type: Number,
default:1 default: 1
} }
}, },
data() { data() {
return { return {
IsShowEditOrder: true, IsShowEditOrder: true,
OrderMsg: { OrderMsg: {
Id:0,//订单id Id: 0, //订单id
LinkMan:"",//联系人 LinkMan: "", //联系人
LinkTel:"",//联系电话 LinkTel: "", //联系电话
Remark:"",//备注 Remark: "", //备注
ActivityId:0,//活动id ActivityId: 0, //活动id
PeopleNum:1,//人数 PeopleNum: 1, //人数
Sex:1,//性别 Sex: 1, //性别
EduStudentId:0,//学员id EduStudentId: 0, //学员id
UnitPrice:0,//单价 UnitPrice: 0, //单价
Money:0,//总价 Money: 0, //总价
EduUserId:0,//销售id EduUserId: 0, //销售id
PayWay:0,//付款方式 PayWay: 0, //付款方式
TenantId:0,//商户id TenantId: 0, //商户id
MallBaseId:0,//小程序id MallBaseId: 0, //小程序id
}, },
stuList:[],//学员列表 stuList: [], //学员列表
loginId:-1,//登录人id loginId: -1, //登录人id
sexList:[ sexList: [{
{ Id: 1,
Id:1, name: "男"
name:"男"
}, },
{ {
Id:2, Id: 2,
name:"女" name: "女"
} }
], ],
isdisable:false, isdisable: false,
} }
}, },
mounted() { mounted() {
let data=JSON.parse(localStorage.getItem("loginUserInfo")).data let data = JSON.parse(localStorage.getItem("loginUserInfo")).data
this.loginId=data.Id this.loginId = data.Id
this.OrderMsg.EduUserId=data.Id this.OrderMsg.EduUserId = data.Id
this.OrderMsg.TenantId=data.JHTenantId this.OrderMsg.TenantId = data.JHTenantId
this.OrderMsg.MallBaseId=data.JHMallBaseId this.OrderMsg.MallBaseId = data.JHMallBaseId
console.log(66,this.saveObj) console.log(66, this.saveObj)
if(this.saveObj){ if (this.saveObj) {
if(this.sourceType===1){ if (this.sourceType === 1) {
this.OrderMsg.ActivityId=this.saveObj.Id this.OrderMsg.ActivityId = this.saveObj.Id
this.OrderMsg.UnitPrice=this.saveObj.Price this.OrderMsg.UnitPrice = this.saveObj.Price
}else if(this.sourceType===2){ } else if (this.sourceType === 2) {
this.OrderMsg.Id=this.saveObj.Id this.OrderMsg.Id = this.saveObj.Id
this.OrderMsg.ActivityId=this.saveObj.ActivityId this.OrderMsg.ActivityId = this.saveObj.ActivityId
this.OrderMsg.UnitPrice=this.saveObj.UnitPrice this.OrderMsg.UnitPrice = this.saveObj.UnitPrice
this.OrderMsg.EduStudentId=this.saveObj.EduStudentId this.OrderMsg.EduStudentId = this.saveObj.EduStudentId
// this.OrderMsg.EduUserId=this.saveObj.EduUserIds // this.OrderMsg.EduUserId=this.saveObj.EduUserIds
} }
this.OrderMsg.LinkMan=this.saveObj.LinkMan this.OrderMsg.LinkMan = this.saveObj.LinkMan
this.OrderMsg.LinkTel=this.saveObj.LinkTel this.OrderMsg.LinkTel = this.saveObj.LinkTel
this.OrderMsg.Remark=this.saveObj.Remark this.OrderMsg.Remark = this.saveObj.Remark
} }
this.getStu(); this.getStu();
}, },
watch: { watch: {
...@@ -137,21 +134,21 @@ ...@@ -137,21 +134,21 @@
this.IsShowEditOrder = false; this.IsShowEditOrder = false;
this.$emit('close') this.$emit('close')
}, },
saveOrderInfo(){ saveOrderInfo() {
this.$refs.LinkMan.validate(); this.$refs.LinkMan.validate();
this.$refs.LinkTel.validate(); this.$refs.LinkTel.validate();
// this.$refs.Remark.validate(); // this.$refs.Remark.validate();
if (!this.$refs.LinkMan.hasError && if (!this.$refs.LinkMan.hasError &&
!this.$refs.LinkTel.hasError !this.$refs.LinkTel.hasError
){ ) {
// if(this.saveObj.LnsideLimit===1&&!this.OrderMsg.EduStudentId){ // if(this.saveObj.LnsideLimit===1&&!this.OrderMsg.EduStudentId){
// this.Error("请选择学员"); // this.Error("请选择学员");
// return // return
// } // }
if(this.OrderMsg.EduStudentId===null||!this.OrderMsg.EduStudentId){ if (this.OrderMsg.EduStudentId === null || !this.OrderMsg.EduStudentId) {
this.OrderMsg.EduStudentId=0 this.OrderMsg.EduStudentId = 0
} }
this.OrderMsg.Money= this.OrderMsg.UnitPrice*this.OrderMsg.PeopleNum this.OrderMsg.Money = this.OrderMsg.UnitPrice * this.OrderMsg.PeopleNum
this.apipostDS("/api/Education/SetActivityEnrollInfo", this.OrderMsg, (res) => { this.apipostDS("/api/Education/SetActivityEnrollInfo", this.OrderMsg, (res) => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.Success("操作成功"); this.Success("操作成功");
...@@ -161,32 +158,34 @@ ...@@ -161,32 +158,34 @@
this.Error(res.data.message); this.Error(res.data.message);
} }
}) })
} }
}, },
getStu(){ getStu() {
this.apipostDS("/api/Education/GetEduStudent", {EduUserId:this.loginId}, (res) => { this.apipostDS("/api/Education/GetEduStudent", {
if (res.data.resultCode === 1) { EduUserId: this.loginId
this.stuList=res.data.data }, (res) => {
} else { if (res.data.resultCode === 1) {
this.Error(res.data.message); this.stuList = res.data.data
} } else {
}) this.Error(res.data.message);
}, }
stuChange(val){ })
let res= this.stuList.filter(item=>{ },
return item.StuId==val stuChange(val) {
}) let res = this.stuList.filter(item => {
if(res.length>0){ return item.StuId == val
this.OrderMsg.LinkMan=res[0].StuName })
this.OrderMsg.LinkTel=res[0].StuTel if (res.length > 0) {
this.OrderMsg.Sex=res[0].StuSex this.OrderMsg.LinkMan = res[0].StuName
} this.OrderMsg.LinkTel = res[0].StuTel
if(val>0){ this.OrderMsg.Sex = res[0].StuSex
this.isdisable=true }
}else{ if (val > 0) {
this.isdisable=false this.isdisable = true
} } else {
} this.isdisable = false
}
}
} }
} }
......
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="props"> <q-td :props="props">
<div> <div>
<q-btn size="xs" class="q-mb-xs" <q-btn size="xs" class="q-mb-xs" v-if="props.row.ActivityStatus!==2"
color="accent" style="font-weight:400;display:block;" label="立即下单" @click='editQuotation(props.row)'/> color="accent" style="font-weight:400;display:block;" label="立即下单" @click='editQuotation(props.row)'/>
<q-btn size="xs" <q-btn size="xs"
color="accent" style="font-weight:400" label="订单中心" @click='goUrl(props.row)'/> color="accent" style="font-weight:400" label="订单中心" @click='goUrl(props.row)'/>
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<div class="col row wrap q-gutter-x-md" v-if="data.Statistics"> <div class="col row wrap q-gutter-x-md" v-if="data.Statistics">
<div class="col stics"> <div class="col stics">
<span class="stics-name">应收款</span> <span class="stics-name">应收款</span>
<span>{{data.Statistics.PreferPrice?data.Statistics.PreferPrice:0}}</span> <span>{{data.Statistics.Money}}</span>
</div> </div>
<div class="col stics"> <div class="col stics">
<span class="stics-name">实收款</span> <span class="stics-name">实收款</span>
......
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