Commit 57fe2206 authored by Z's avatar Z

Merge branch 'master' of http://114.67.93.201/xulili/ybf

parents 85bb601a d0c50363
......@@ -215,13 +215,16 @@
</van-radio-group>
</div>
<div class="mj">
<div class="l-yh">
<div class="je">
<van-field
class="tm"
readonly
clickable
:value="prizeList[index].discountsMoney"
@touchstart.native.stop="prizeList[index].discountsShow = true"
@touchstart.native.stop="
prizeList[index].discountsShow = true
"
placeholder="输入金额"
/>
<van-number-keyboard
......@@ -231,7 +234,10 @@
/>
</div>
<span class="word">元优惠</span>
</div>
<div class="r-yh">
<van-checkbox v-model="prizeList[index].full"></van-checkbox>
<span class="word"></span>
<div class="je">
<van-field
......@@ -252,6 +258,7 @@
</div>
</div>
</div>
</div>
<van-cell title="开始时间" style="font-size:14px;">
<template slot="default">
......@@ -272,7 +279,7 @@
v-model="prizeList[index].startTime"
type="date"
@cancel="prizeList[index].startShow = false"
@confirm="prizeList[index].startShow = false"
@confirm="handleStartTime(prizeList[index].startTime,index)"
@change="startTimeChange2(prizeList[index].startTime, index)"
/>
</van-popup>
......@@ -298,7 +305,7 @@
v-model="prizeList[index].endTime"
type="date"
@cancel="prizeList[index].endShow = false"
@confirm="prizeList[index].endShow = false"
@confirm="handleEndTime(prizeList[index].endTime,index)"
@change="endTimeChange2(prizeList[index].endTime, index)"
/>
</van-popup>
......@@ -406,10 +413,10 @@ export default {
fullMoney: "",
fullShow: false,
validity: "",
startTime: "",
startTime: new Date(),
startTime1: "",
startShow: false,
endTime: "",
endTime: new Date(),
endTime1: "",
endShow: false,
prize: "",
......@@ -438,35 +445,58 @@ export default {
this.basicInfo.startTime1 = `${startTimeArr[0]}-${startTimeArr[1]}-${startTimeArr[2]}`;
},
startTimeChange2(e, index) {
console.log(111);
this.prizeList[index].startTime1 = this.timeFormat(e);
console.log(this.prizeList[index].startTime1,"2222");
},
////////
handlePSTime(index) {
this.prizeList[index].startTime1 = this.timeFormat(this.confirmTime)
this.prizeList[index].startShow=false
this.prizeList[index].startTime1 = this.timeFormat(this.confirmTime);
this.prizeList[index].startShow = false;
},
timeFormat(time) {
let year = 1900 + time.getYear();
let month = "0" + (time.getMonth() + 1);
let date = "0" + time.getDate();
return year + "-" + month.substring(month.length-2, month.length) + "-" + date.substring(date.length-2, date.length)
+ " "
return (
year +
"-" +
month.substring(month.length - 2, month.length) +
"-" +
date.substring(date.length - 2, date.length) +
" "
);
},
endTimeChange(e) {
let endTimeArr = e.getValues();
this.basicInfo.endTime1 = `${endTimeArr[0]}-${endTimeArr[1]}-${endTimeArr[2]}`;
},
handleBasicETime(value) {
this.basicInfo.endShow=false
this.basicInfo.endTime1 = this.timeFormat(value)
this.basicInfo.endShow = false;
this.basicInfo.endTime1 = this.timeFormat(value);
},
endTimeChange2(e, index) {
this.prizeList[index].endTime1 = this.timeFormat(e);
},
///点击确定不修改处理
handleStartTime(e,index) {
console.log(e,"e");
this.prizeList[index].startTime1 = this.timeFormat(e)
this.prizeList[index].startShow = false
},
handleEndTime(e,index) {
console.log(e,"e");
this.prizeList[index].endTime1 = this.timeFormat(e)
this.prizeList[index].endShow = false
},
//////
handlePETime(index) {
this.prizeList[index].endTime1 = this.timeFormat(this.confirmTime)
this.prizeList[index].endShow=false
this.prizeList[index].endTime1 = this.timeFormat(this.confirmTime);
this.prizeList[index].endShow = false;
},
// 数字大写转小写
numberToUpperCase(textIndex) {
......@@ -531,10 +561,10 @@ export default {
fullMoney: "",
fullShow: false,
validity: "",
startTime: "",
startTime: new Date(),
startTime1: "",
startShow: false,
endTime: "",
endTime: new Date(),
endTime1: "",
endShow: false,
prize: "",
......@@ -547,21 +577,27 @@ export default {
this.prizeList.splice(index, 1);
},
handleBasicSTime(value) {
this.basicInfo.startShow=false
this.basicInfo.startTime1 = this.timeFormat(value)
},
this.basicInfo.startShow = false;
this.basicInfo.startTime1 = this.timeFormat(value);
}
},
mounted() {
this.pTime = this.timeFormat(this.pTime)
console.log(this.pTime,"time");
this.pTime = this.timeFormat(this.pTime);
console.log(this.pTime, "time");
}
};
</script>
<style></style>
<style scoped>
.l-yh,.r-yh {
width: 55%;
display: flex;
align-items: center;
}
.l-yh {
width: 45%;
}
.bfb {
position: absolute;
right: 3px;
......@@ -664,7 +700,7 @@ export default {
.mj {
height: 40px;
display: flex;
justify-content: flex-end;
justify-content: space-between;
align-items: center;
margin: 10px 0;
}
......
......@@ -20,8 +20,8 @@
<van-radio name="1" style="float:left;">固定金额</van-radio>
<van-radio name="2" style="float:right;">成交价比例</van-radio>
</van-radio-group>
<div class="fr">
<span class="fr" style="margin-top:16px;"></span>
<div class="fr" v-if="type == 1">
<span class="fr" style="margin-top:18px;"></span>
<van-field
class="price"
readonly
......@@ -36,6 +36,22 @@
@blur="show2 = false"
/>
</div>
<div class="fr" v-if="type == 2">
<span class="fr" style="margin-top:18px;">%</span>
<van-field
class="price"
readonly
clickable
:value="percent"
placeholder="请输入百分比"
@touchstart.native.stop="show3 = true"
/>
<van-number-keyboard
v-model="percent"
:show="show3"
@blur="show3 = false"
/>
</div>
</div>
</div>
</van-cell>
......@@ -43,7 +59,7 @@
<template slot="default">
<van-field
v-model="startTime1"
placeholder="选择活动结束时间"
placeholder="选择活动开始时间"
readonly="readonly"
@click="startShow = true"
class="nop"
......@@ -53,7 +69,7 @@
v-model="startTime"
type="datetime"
@cancel="startShow = false"
@confirm="startShow = false"
@confirm="handleStartTime"
@change="startTimeChange"
/>
</van-popup>
......@@ -73,7 +89,7 @@
v-model="endTime"
type="datetime"
@cancel="endShow = false"
@confirm="endShow = false"
@confirm="handleEndTime"
@change="endTimeChange"
/>
</van-popup>
......@@ -107,26 +123,43 @@ export default {
return {
startTime: new Date(),
startTime1: "",
endTime: "",
endTime: new Date(),
endTime1: "",
startShow: false,
endShow: false,
number: "",
type: "",
type: '1',
show: false,
show2: false,
price: ""
show3: false,
price: "",
percent: ""
};
},
methods: {
timeFormat(time) {
let year = 1900 + time.getYear();
let month = "0" + (time.getMonth() + 1);
let date = "0" + time.getDate();
return year + "-" + month.substring(month.length-2, month.length) + "-" + date.substring(date.length-2, date.length)
+ " "
},
startTimeChange(e) {
let startTimeArr = e.getValues();
this.startTime1 = `${startTimeArr[0]}-${startTimeArr[1]}-${startTimeArr[2]} ${startTimeArr[3]}:${startTimeArr[4]}:00`;
this.startTime1 = `${startTimeArr[0]}-${startTimeArr[1]}-${startTimeArr[2]}`;
},
endTimeChange(e) {
let endTimeArr = e.getValues();
this.endTime1 = `${endTimeArr[0]}-${endTimeArr[1]}-${endTimeArr[2]} ${endTimeArr[3]}:${endTimeArr[4]}:00`;
}
this.endTime1 = `${endTimeArr[0]}-${endTimeArr[1]}-${endTimeArr[2]}`;
},
handleStartTime(value) {
this.startTime1 = this.timeFormat(value)
this.startShow = false
},
handleEndTime(value) {
this.endTime1 = this.timeFormat(value)
this.endShow = false
},
}
};
</script>
......@@ -215,6 +248,9 @@ h3 {
.phone {
float: left;
}
.option {
margin-top: 10px;
}
.option >>> .van-field__control {
text-align: right;
}
......
......@@ -24,7 +24,7 @@
</van-cell>
</van-list>
</van-tab>
<van-tab title="顾客流失">
<van-tab title="复购">
<van-list v-model="writeOff" :finished="finished" @load="onLoad">
<van-cell
:value="item.number"
......@@ -40,7 +40,7 @@
</van-cell>
</van-list>
</van-tab>
<van-tab title="接受问询">
<van-tab title="接受问询">
<van-list v-model="writeOff" :finished="finished" @load="onLoad">
<van-cell
:value="item.number"
......
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