mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-25 03:42:53 +08:00
Merge branch 'event' into dev
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
@confirm="okTime"
|
||||
@cancel="cancelTime"
|
||||
:filter="filter"
|
||||
|
||||
/>
|
||||
</van-popup>
|
||||
</div>
|
||||
@@ -48,7 +49,10 @@ Vue.use(Field).use(CellGroup).use(DatetimePicker).use(Popup);
|
||||
timeShow:false,
|
||||
currentDate: new Date(),
|
||||
minDate:new Date(),
|
||||
currentTime: '12:00'
|
||||
currentTime: '12:00',
|
||||
date: '',
|
||||
minMinute: 0,
|
||||
minHour: 0
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
@@ -69,27 +73,28 @@ Vue.use(Field).use(CellGroup).use(DatetimePicker).use(Popup);
|
||||
let data = {
|
||||
token: localStorage.getItem('token'),
|
||||
eventDTO:{
|
||||
id: null, //事件id 新增传null 修改必传
|
||||
customerNumber: localStorage.getItem('customerNumber'),// 客户号
|
||||
eventContent: $this.eventContent,// 事件内容
|
||||
noticeDate: $this.noticeDate,//提示日期 yyyy-MM-dd
|
||||
noticeTime: $this.noticeTime,// 提示时间 HH:mm:ss
|
||||
noticeTime: $this.noticeTime+':00',// 提示时间 HH:mm:ss
|
||||
noticeStatus: "00"// 提示状态 00 未提醒(固定)
|
||||
}
|
||||
}
|
||||
console.log(123,data)
|
||||
|
||||
saveOrUpdate(data)
|
||||
.then(res => {
|
||||
if (res.result == 0) {
|
||||
$this.$toast('保存成功')
|
||||
setTimeout(()=>{
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
flag: 'goBack',
|
||||
extra: {
|
||||
url: location.origin + '/#/milestone/list'
|
||||
refresh: '1',
|
||||
index: '-1',
|
||||
},
|
||||
routerInfo: {
|
||||
type: 2,
|
||||
index: -1,
|
||||
path: '/milestone/list'
|
||||
}
|
||||
})
|
||||
@@ -114,11 +119,40 @@ Vue.use(Field).use(CellGroup).use(DatetimePicker).use(Popup);
|
||||
day = '0' + day
|
||||
}
|
||||
this.noticeDate = year + '-' + month + '-' + day
|
||||
this.date = date.getTime()
|
||||
if(date.getTime()==this.minDate.getTime()){
|
||||
this.getTime()
|
||||
if(this.noticeTime.split(':')[0]<this.minHour){
|
||||
this.noticeTime=''
|
||||
}else if(this.noticeTime.split(':')[0]=this.minHour){
|
||||
if(this.noticeTime.split(':')[1]<this.minMinute){
|
||||
this.noticeTime=''
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
okTime(value){
|
||||
console.log(value)
|
||||
this.timeShow = false;
|
||||
this.noticeTime = value
|
||||
console.log(value.split(':')[0])
|
||||
|
||||
if(this.date==this.minDate.getTime()){
|
||||
if(value.split(':')[0]<this.minHour){
|
||||
this.$toast('不能小于当前时间')
|
||||
}else if(value.split(':')[0]=this.minHour){
|
||||
if(value.split(':')[1]<this.minMinute){
|
||||
this.$toast('不能小于当前时间')
|
||||
}else{
|
||||
this.timeShow = false;
|
||||
this.noticeTime = value
|
||||
}
|
||||
}else{
|
||||
this.timeShow = false;
|
||||
this.noticeTime = value
|
||||
}
|
||||
}else{
|
||||
this.timeShow = false;
|
||||
this.noticeTime = value
|
||||
}
|
||||
|
||||
},
|
||||
cancelTime(){
|
||||
this.timeShow = false;
|
||||
@@ -138,6 +172,27 @@ Vue.use(Field).use(CellGroup).use(DatetimePicker).use(Popup);
|
||||
return options.filter(option => option % 15 === 0)
|
||||
}
|
||||
return options;
|
||||
},
|
||||
getTime(){
|
||||
let date=new Date();
|
||||
let hour=date.getHours();
|
||||
let minute=date.getMinutes();
|
||||
if (minute<15) {
|
||||
minute='15';
|
||||
}else if(minute>=15&&minute<30){
|
||||
minute='30'
|
||||
}else if(minute>=30&&minute<45){
|
||||
minute='45'
|
||||
}else if(minute>=45&&minute<60){
|
||||
minute='00'
|
||||
hour=hour+1
|
||||
}
|
||||
if (hour<10) {
|
||||
hour='0'+hour;
|
||||
}
|
||||
this.currentTime = hour+':'+minute
|
||||
this.minHour = hour
|
||||
this.minMinute = minute
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,10 @@ Vue.use(Field).use(CellGroup).use(DatetimePicker).use(Popup);
|
||||
currentDate: new Date(),
|
||||
minDate:new Date(),
|
||||
currentTime: '12:00',
|
||||
item: ''
|
||||
item: '',
|
||||
date: '',
|
||||
minMinute: 0,
|
||||
minHour: 0
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
@@ -80,7 +83,7 @@ Vue.use(Field).use(CellGroup).use(DatetimePicker).use(Popup);
|
||||
customerNumber: localStorage.getItem('customerNumber'),// 客户号
|
||||
eventContent: $this.eventContent,// 事件内容
|
||||
noticeDate: $this.noticeDate,//提示日期 yyyy-MM-dd
|
||||
noticeTime: $this.noticeTime,// 提示时间 HH:mm:ss
|
||||
noticeTime: $this.noticeTime+':00',// 提示时间 HH:mm:ss
|
||||
noticeStatus: "00"// 提示状态 00 未提醒(固定)
|
||||
}
|
||||
}
|
||||
@@ -92,11 +95,14 @@ Vue.use(Field).use(CellGroup).use(DatetimePicker).use(Popup);
|
||||
$this.$toast('保存成功')
|
||||
setTimeout(()=>{
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
flag: 'goBack',
|
||||
extra: {
|
||||
url: location.origin + '/#/milestone/list'
|
||||
refresh: '1',
|
||||
index: '-1',
|
||||
},
|
||||
routerInfo: {
|
||||
type: 2,
|
||||
index: -1,
|
||||
path: '/milestone/list'
|
||||
}
|
||||
})
|
||||
@@ -120,12 +126,41 @@ Vue.use(Field).use(CellGroup).use(DatetimePicker).use(Popup);
|
||||
if (day < 10) {
|
||||
day = '0' + day
|
||||
}
|
||||
this.date = year + '-' + month + '-' + day
|
||||
this.noticeDate = year + '-' + month + '-' + day
|
||||
this.date = date.getTime()
|
||||
if(date.getTime()==this.minDate.getTime()){
|
||||
this.getTime()
|
||||
if(this.noticeTime.split(':')[0]<this.minHour){
|
||||
this.noticeTime=''
|
||||
}else if(this.noticeTime.split(':')[0]=this.minHour){
|
||||
if(this.noticeTime.split(':')[1]<this.minMinute){
|
||||
this.noticeTime=''
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
okTime(value){
|
||||
console.log(value)
|
||||
this.timeShow = false;
|
||||
this.time = value
|
||||
console.log(value.split(':')[0])
|
||||
|
||||
if(this.date==this.minDate.getTime()){
|
||||
if(value.split(':')[0]<this.minHour){
|
||||
this.$toast('不能小于当前时间')
|
||||
}else if(value.split(':')[0]=this.minHour){
|
||||
if(value.split(':')[1]<this.minMinute){
|
||||
this.$toast('不能小于当前时间')
|
||||
}else{
|
||||
this.timeShow = false;
|
||||
this.noticeTime = value
|
||||
}
|
||||
}else{
|
||||
this.timeShow = false;
|
||||
this.noticeTime = value
|
||||
}
|
||||
}else{
|
||||
this.timeShow = false;
|
||||
this.noticeTime = value
|
||||
}
|
||||
|
||||
},
|
||||
cancelTime(){
|
||||
this.timeShow = false;
|
||||
@@ -145,6 +180,27 @@ Vue.use(Field).use(CellGroup).use(DatetimePicker).use(Popup);
|
||||
return options.filter(option => option % 15 === 0)
|
||||
}
|
||||
return options;
|
||||
},
|
||||
getTime(){
|
||||
let date=new Date();
|
||||
let hour=date.getHours();
|
||||
let minute=date.getMinutes();
|
||||
if (minute<15) {
|
||||
minute='15';
|
||||
}else if(minute>=15&&minute<30){
|
||||
minute='30'
|
||||
}else if(minute>=30&&minute<45){
|
||||
minute='45'
|
||||
}else if(minute>=45&&minute<60){
|
||||
minute='00'
|
||||
hour=hour+1
|
||||
}
|
||||
if (hour<10) {
|
||||
hour='0'+hour;
|
||||
}
|
||||
this.currentTime = hour+':'+minute
|
||||
this.minHour = hour
|
||||
this.minMinute = minute
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<div class="milestone pb45">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:immediate-check="false"
|
||||
:finished="finished"
|
||||
:finished-text="finishedText"
|
||||
@load="onLoad"
|
||||
class="pb45"
|
||||
@@ -72,13 +72,17 @@ import { Dialog, List,Toast,Row, Col,} from 'vant'
|
||||
.then(res => {
|
||||
if (res.result == 0) {
|
||||
$this.pageNum++
|
||||
$this.list = $this.list.concat(res.content.list)
|
||||
let list = res.content.list
|
||||
list.forEach(item => {
|
||||
item.noticeTime=item.noticeTime.split(':')[0]+':'+item.noticeTime.split(':')[1]
|
||||
});
|
||||
$this.list = $this.list.concat(list)
|
||||
if ($this.list.length < res.content.total) {
|
||||
that.loading = false
|
||||
that.finished = false
|
||||
$this.loading = false
|
||||
$this.finished = false
|
||||
} else {
|
||||
that.finished = true
|
||||
that.loading = false
|
||||
$this.finished = true
|
||||
$this.loading = false
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user