Commit 62f26b70 authored by Mac's avatar Mac

1

parent 15ad4224
......@@ -83,7 +83,7 @@
<el-input v-model="msg.IndateDay" class="el-input--small" step="1" min="0" onkeyup="this.value= this.value.match(/\d+(\d{0,2})?/) ? this.value.match(/\d+(\d{0,2})?/)[0] : ''"/>
</el-form-item>
<el-form-item label="有效期范围" prop="value" class="is-required" v-if="msg.IndateType==2" >
<el-form-item label="有效期范围" class="is-required" v-if="msg.IndateType==2" >
<el-date-picker
@input="daterangeChange"
style="padding: 3px 10px;width: 450px;height: 32px"
......@@ -603,10 +603,17 @@
},
daterangeChange(e){
let _this =this
_this.$nextTick(() => {
_this.$set(_this.msg, "value", [e[0], e[1]]);
_this.$forceUpdate();
});
if(e==null){
_this.msg.value = []
}else {
_this.$nextTick(() => {
_this.$set(_this.msg, "value", [e[0], e[1]]);
});
}
_this.$forceUpdate();
},
getUseType2(){
this.checkedkeys=[]
......@@ -629,11 +636,16 @@
preserve(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.loading= true
if(this.msg.IndateType==2){
this.msg.StartDate=this.msg.value[0];
this.msg.EndDate=this.msg.value[1];
this.msg.IndateDay=0
if(this.msg.value.length>0){
this.msg.StartDate=this.msg.value[0];
this.msg.EndDate=this.msg.value[1];
this.msg.IndateDay=0
}else {
this.Error('课程卡有效期不能为空')
return false
}
}
if(this.msg.UseType==2){
let ProductList= []
......@@ -648,6 +660,7 @@
}
this.msg.ProductList =ProductList
}
this.loading= true
this.apipost("/api/Education/AddOrUpdateDiscountCoupon",this.msg , res => {
this.loading= false
if (res.data.resultCode == 1) {
......
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