Commit 88e8a800 authored by hanfeng's avatar hanfeng

Merge remote-tracking branch 'origin/base-modify' into base-modify-hf

parents 8ff39948 e99278af
...@@ -123,3 +123,11 @@ export function downloadExcel(query) { ...@@ -123,3 +123,11 @@ export function downloadExcel(query) {
responseType: 'blob' responseType: 'blob'
}); });
} }
export function exportExcel(query) {
return fetch({
url: '/vehicle/VehicleInformationDownload/app/unauth/export',
method: 'get',
responseType: 'blob'
});
}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="filter-container" ref="filter-container"> <div class="filter-container" ref="filter-container">
<el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="60px"> <el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="60px">
<el-row> <el-row>
<el-col :span="4"> <el-col :span="6">
<el-form-item label="描述"> <el-form-item label="描述">
<el-input v-model.number="listQuery.popupName" placeholder="请输入描述"></el-input> <el-input v-model.number="listQuery.popupName" placeholder="请输入描述"></el-input>
</el-form-item> </el-form-item>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="filter-container" ref="filter-container"> <div class="filter-container" ref="filter-container">
<el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="60px"> <el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="60px">
<el-row> <el-row>
<el-col :span="4"> <el-col :span="6">
<el-form-item label="描述"> <el-form-item label="描述">
<el-input v-model.number="listQuery.activitiesName" placeholder="请输入描述"></el-input> <el-input v-model.number="listQuery.activitiesName" placeholder="请输入描述"></el-input>
</el-form-item> </el-form-item>
......
This diff is collapsed.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="6">
<el-form-item label="创建时间"> <el-form-item label="创建时间">
<el-date-picker <el-date-picker
v-model="createTime" v-model="createTime"
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<!-- <el-date-picker v-model="createTime" type="datetimerange" placeholder="选择时间范围" @change="changeCreate"></el-date-picker> --> <!-- <el-date-picker v-model="createTime" type="datetimerange" placeholder="选择时间范围" @change="changeCreate"></el-date-picker> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="6">
<el-form-item label="支付时间"> <el-form-item label="支付时间">
<!-- <el-date-picker v-model="aplyTime" type="datetimerange" placeholder="选择支付时间范围" @change="changePay"></el-date-picker> --> <!-- <el-date-picker v-model="aplyTime" type="datetimerange" placeholder="选择支付时间范围" @change="changePay"></el-date-picker> -->
<el-date-picker <el-date-picker
......
...@@ -78,14 +78,14 @@ ...@@ -78,14 +78,14 @@
<p <p
v-if="orderDetailInfo.rentVehiclePriceVO && orderDetailInfo.rentVehiclePriceVO.vehicleDayNum > 0" v-if="orderDetailInfo.rentVehiclePriceVO && orderDetailInfo.rentVehiclePriceVO.vehicleDayNum > 0"
>¥{{orderDetailInfo.rentVehiclePriceVO.modelAmount}}*{{orderDetailInfo.rentVehiclePriceVO.vehicleNum}}/{{orderDetailInfo.rentVehiclePriceVO.vehicleDayNum}}</p> >¥{{orderDetailInfo.rentVehiclePriceVO.modelAmount}}*{{orderDetailInfo.rentVehiclePriceVO.vehicleNum}}/{{orderDetailInfo.rentVehiclePriceVO.vehicleDayNum}}</p>
<p v-else>{{orderDetailInfo.costDetail.children[0].key}} : {{orderDetailInfo.costDetail.children[0].detail}}</p> <!-- <p v-else-if="orderDetailInfo.costDetail.children[0]">{{orderDetailInfo.costDetail.children[0].key}} : {{orderDetailInfo.costDetail.children[0].detail}}</p> -->
</td> </td>
<td> <td>
<p v-if="orderDetailInfo.rentVehiclePriceVO && orderDetailInfo.rentVehiclePriceVO.couponAmount > 0"> <p v-if="orderDetailInfo.rentVehiclePriceVO && orderDetailInfo.rentVehiclePriceVO.couponAmount > 0">
<span>{{orderDetailInfo.rentVehiclePriceVO.couponDesc}}-{{orderDetailInfo.rentVehiclePriceVO.couponAmount}}</span> <span>{{orderDetailInfo.rentVehiclePriceVO.couponDesc}}-{{orderDetailInfo.rentVehiclePriceVO.couponAmount}}</span>
</p> </p>
<p v-else-if="orderDetailInfo.costDetail.children && orderDetailInfo.costDetail.children[2]">{{orderDetailInfo.costDetail.children[2].key}} : {{orderDetailInfo.costDetail.children[2].val}}</p> <!-- <p v-else-if="orderDetailInfo.costDetail.children && orderDetailInfo.costDetail.children[2]">{{orderDetailInfo.costDetail.children[2].key}} : {{orderDetailInfo.costDetail.children[2].val}}</p> -->
<p v-else></p> <p v-else></p>
</td> </td>
<td> <td>
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
</td> </td>
<td> <td>
<p v-if="orderDetailInfo.rentVehiclePriceVO">{{orderDetailInfo.rentVehiclePriceVO.deposit}}</p> <p v-if="orderDetailInfo.rentVehiclePriceVO">{{orderDetailInfo.rentVehiclePriceVO.deposit}}</p>
<p v-else>{{orderDetailInfo.costDetail.children[1].key}} : {{orderDetailInfo.costDetail.children[1].val}}</p> <!-- <p v-else-if="orderDetailInfo.costDetail.children[0]">{{orderDetailInfo.costDetail.children[1].key}} : {{orderDetailInfo.costDetail.children[1].val}}</p> -->
</td> </td>
<td> <td>
<p <p
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="filter-container"> <div class="filter-container">
<el-form ref="queryForm" :model="listQuery" label-width="100px"> <el-form ref="queryForm" :model="listQuery" label-width="100px">
<el-row> <el-row>
<el-col :span="5"> <el-col :span="6">
<el-form-item label="统计时间:"> <el-form-item label="统计时间:">
<el-date-picker <el-date-picker
v-model="listQuery.time" v-model="listQuery.time"
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="6">
<el-form-item label="统计方式:" class="wayMsg"> <el-form-item label="统计方式:" class="wayMsg">
<span <span
v-for="(item,index) in way" v-for="(item,index) in way"
......
...@@ -1036,7 +1036,7 @@ export default { ...@@ -1036,7 +1036,7 @@ export default {
} }
orderDetail(param).then(response => { orderDetail(param).then(response => {
this.orderDetailInfo = response.data this.orderDetailInfo = response.data
if(this.orderDetailInfo && this.orderDetailInfo.memberLevel) { if(this.orderDetailInfo) {
if(this.orderDetailInfo.memberLevel == 1) { if(this.orderDetailInfo.memberLevel == 1) {
this.orderDetailInfo.memberName = "普通会员" this.orderDetailInfo.memberName = "普通会员"
} }
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancelHandel">取 消</el-button> <el-button @click="cancelHandel">取 消</el-button>
<el-button type="primary" @click="edit('dialogFrom')">确 定</el-button> <el-button type="primary" @click="edit('dialogFrom')" :loading="submitBtn">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -155,6 +155,7 @@ export default { ...@@ -155,6 +155,7 @@ export default {
}, },
data() { data() {
return { return {
submitBtn:false,
time:[],//提现时间 time:[],//提现时间
typeOptions: [ typeOptions: [
{ {
...@@ -259,6 +260,7 @@ export default { ...@@ -259,6 +260,7 @@ export default {
this.dialogVisible = true this.dialogVisible = true
}, },
edit(formName) { edit(formName) {
var that = this var that = this
const set = this.$refs const set = this.$refs
set[formName].validate(valid => { set[formName].validate(valid => {
...@@ -285,6 +287,7 @@ export default { ...@@ -285,6 +287,7 @@ export default {
} }
} }
if (valid) { if (valid) {
this.submitBtn = true;
editObj(that.dialogFrom).then(response => { editObj(that.dialogFrom).then(response => {
if (response.status === 200) { if (response.status === 200) {
this.dialogVisible = false this.dialogVisible = false
...@@ -295,6 +298,7 @@ export default { ...@@ -295,6 +298,7 @@ export default {
type: 'success', type: 'success',
duration: 2000 duration: 2000
}) })
this.submitBtn = false;
} else { } else {
this.$notify({ this.$notify({
title: '失败', title: '失败',
...@@ -304,6 +308,7 @@ export default { ...@@ -304,6 +308,7 @@ export default {
type: 'error', type: 'error',
duration: 2000 duration: 2000
}) })
this.submitBtn = false;
} }
}) })
} else { } else {
......
...@@ -4,16 +4,14 @@ ...@@ -4,16 +4,14 @@
<div class="filter-container" ref="filter-container"> <div class="filter-container" ref="filter-container">
<el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="100px"> <el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="100px">
<el-row> <el-row>
<el-col :span="5"> <el-form-item label="姓名">
<el-form-item label="姓名"> <el-input v-model="listQuery.username" placeholder="请输入姓名"></el-input>
<el-input v-model="listQuery.username" placeholder="请输入姓名"></el-input> </el-form-item>
</el-form-item> <el-form-item label="手机号">
</el-col> <el-input v-model.number="listQuery.phone" placeholder="请输入手机号"></el-input>
<el-col :span="5"> </el-form-item>
<el-form-item label="手机号"> <el-col :span="5"></el-col>
<el-input v-model.number="listQuery.phone" placeholder="请输入手机号"></el-input> <el-col :span="5"></el-col>
</el-form-item>
</el-col>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="clearFilter">清除搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="search" @click="clearFilter">清除搜索</el-button>
</el-row> </el-row>
...@@ -32,11 +30,11 @@ ...@@ -32,11 +30,11 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column width="200" align="center" label="佣金比例"> <!-- <el-table-column width="200" align="center" label="佣金比例">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.commissionRate+'%'}}</span> <span>{{scope.row.commissionRate+'%'}}</span>
</template> </template>
</el-table-column> --> </el-table-column>-->
<el-table-column width="200" align="center" label="总收益"> <el-table-column width="200" align="center" label="总收益">
<template scope="scope"> <template scope="scope">
...@@ -44,19 +42,18 @@ ...@@ -44,19 +42,18 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200" align="center" label="当前余额"> <el-table-column width="200" align="center" label="当前余额">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.balance}}</span> <span>{{scope.row.balance}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="总提现"> <el-table-column align="center" label="总提现">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.withdrawals}}</span> <span>{{scope.row.withdrawals}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="提现中"> <el-table-column align="center" label="提现中">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.withdrawaling}}</span> <span>{{scope.row.withdrawaling}}</span>
...@@ -71,7 +68,7 @@ ...@@ -71,7 +68,7 @@
<template scope="scope"> <template scope="scope">
<span>{{scope.row.balance}}</span> <span>{{scope.row.balance}}</span>
</template> </template>
</el-table-column> --> </el-table-column>-->
<!-- <el-table-column align="center" label="操作" fixed="right"> <!-- <el-table-column align="center" label="操作" fixed="right">
<template scope="scope"> <template scope="scope">
<el-button <el-button
...@@ -80,7 +77,7 @@ ...@@ -80,7 +77,7 @@
@click="deposit(scope.row)" @click="deposit(scope.row)"
>{{scope.row.isFrozen == 0 ? '禁止提现' : '允许提现'}}</el-button> >{{scope.row.isFrozen == 0 ? '禁止提现' : '允许提现'}}</el-button>
</template> </template>
</el-table-column> --> </el-table-column>-->
</el-table> </el-table>
<div v-show="!listLoading" class="pagination-container"> <div v-show="!listLoading" class="pagination-container">
<el-pagination <el-pagination
...@@ -151,8 +148,8 @@ export default { ...@@ -151,8 +148,8 @@ export default {
}, },
methods: { methods: {
//清除搜索 //清除搜索
clearFilter(){ clearFilter() {
this.listQuery.username = this.listQuery.phone = null; this.listQuery.username = this.listQuery.phone = null
this.getList() this.getList()
}, },
//提现 //提现
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
<div class="filter-container"> <div class="filter-container">
<el-form ref="queryForm" :model="listQuery" label-width="100px"> <el-form ref="queryForm" :model="listQuery" label-width="100px">
<el-row> <el-row>
<el-col :span="4"> <el-col :span="6">
<el-form-item label="手机号"> <el-form-item label="手机号">
<el-input v-model.number="listQuery.username" placeholder="请输入手机号"></el-input> <el-input v-model.number="listQuery.username" placeholder="请输入手机号"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="16">
<el-form-item label="导入时间"> <el-form-item label="导入时间">
<el-date-picker <el-date-picker
v-model="listQuery.startTime" v-model="listQuery.startTime"
......
...@@ -861,6 +861,9 @@ ...@@ -861,6 +861,9 @@
if(queryJson.mobile){ if(queryJson.mobile){
t.listQuery.mobile = queryJson.mobile; t.listQuery.mobile = queryJson.mobile;
} }
if(queryJson.realName){
t.listQuery.realName = queryJson.realName;
}
if(queryJson.memberLevel){ if(queryJson.memberLevel){
t.listQuery.memberLevel = queryJson.memberLevel; t.listQuery.memberLevel = queryJson.memberLevel;
} }
......
This diff is collapsed.
...@@ -201,6 +201,12 @@ ...@@ -201,6 +201,12 @@
v-waves v-waves
@click="handleFilter('download')" @click="handleFilter('download')"
>下载车辆信息Excel表</el-button> >下载车辆信息Excel表</el-button>
<el-button
class="filter-item"
type="primary"
v-waves
@click="handleFilter('export')"
>导出分公司车辆信息</el-button>
</div> </div>
<el-table :key="tableKey" :data="list" border fit highlight-current-row style="width: 100%"> <el-table :key="tableKey" :data="list" border fit highlight-current-row style="width: 100%">
...@@ -970,7 +976,8 @@ import { ...@@ -970,7 +976,8 @@ import {
downloadExcel, downloadExcel,
checkVin, checkVin,
checkEngineNum, checkEngineNum,
getArea getArea,
exportExcel
} from '../../../api/vehicle/vehicleInfo/' } from '../../../api/vehicle/vehicleInfo/'
import { import {
...@@ -1986,7 +1993,27 @@ export default { ...@@ -1986,7 +1993,27 @@ export default {
} }
this.getList() this.getList()
}, },
exportExcelInfo() {
exportExcel().then(res => {
const content = res
const blob = new Blob([content])
const fileName = 'vehicle.xlsx'
if ('download' in document.createElement('a')) {
// 非IE下载
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href) // 释放URL 对象
document.body.removeChild(elink)
} else {
// IE10+下载
navigator.msSaveBlob(blob, fileName)
}
})
},
/** /**
* 下载车辆信息excel表 * 下载车辆信息excel表
* */ * */
...@@ -2727,6 +2754,9 @@ export default { ...@@ -2727,6 +2754,9 @@ export default {
if (p == 'download') { if (p == 'download') {
this.download() this.download()
} }
if (p == 'export') {
this.exportExcelInfo();
}
} else { } else {
return false return false
} }
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
@click="setVal(GMTToStrs(dayobject.day),index,dayobject.day.getMonth()+1 != currentMonth)" @click="setVal(GMTToStrs(dayobject.day),index,dayobject.day.getMonth()+1 != currentMonth)"
> >
<!-- 选中的状态 --> <!-- 选中的状态 -->
<span ref="activeDay"></span> <span ref="activeDay" v-show="dayobject.day.getMonth()+1 == currentMonth"></span>
<!-- <span :class="{isChosse:isChosses}" ref="activeDay"></span> --> <!-- <span :class="{isChosse:isChosses}" ref="activeDay"></span> -->
<!--本月--> <!--本月-->
...@@ -85,19 +85,6 @@ ...@@ -85,19 +85,6 @@
<span v-else>{{ dayobject.day.getDate() }}</span> <span v-else>{{ dayobject.day.getDate() }}</span>
</span> </span>
<p style="color:red">{{matching(GMTToStr(dayobject.day))}}</p> <p style="color:red">{{matching(GMTToStr(dayobject.day))}}</p>
<!-- <p style="color:red">{{GMTToStr(dayobject.day)}}</p> -->
<!-- <p
v-if="new Date(dayobject.day).getDay()+1 == 1 || new Date(dayobject.day).getDay()+1 == 7"
style="color:red"
>{{GMTToStr(dayobject.day)}}</p>-->
<!--显示剩余多少数量-->
<!-- <p v-if="leftobj[dayobject.index]">
剩余:
<span style="color: red">{{leftobj[dayobject.index].count}}</span>
</p>-->
<!---->
<!-- <button @click="order(dayobject)" v-if="leftobj[dayobject.index]">预定</button> -->
</li> </li>
</ul> </ul>
...@@ -242,6 +229,7 @@ export default { ...@@ -242,6 +229,7 @@ export default {
this.levelsFn() this.levelsFn()
}, },
methods: { methods: {
//通用规则设置
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
if (valid) { if (valid) {
...@@ -262,8 +250,9 @@ export default { ...@@ -262,8 +250,9 @@ export default {
} }
}) })
}, },
//清空设置样式
changeIsGlobal(val) { changeIsGlobal(val) {
let activeStatus = this.$refs.activeDay let activeStatus = this.$refs.activeDay || ''
if (val == 0) { if (val == 0) {
for (let index = 0; index < activeStatus.length; index++) { for (let index = 0; index < activeStatus.length; index++) {
activeStatus[index].className = '' activeStatus[index].className = ''
...@@ -327,10 +316,6 @@ export default { ...@@ -327,10 +316,6 @@ export default {
type: this.setForm.type type: this.setForm.type
}) })
} }
// else {
// this.$message.error('请设置不同车型不同价格1')
// return false
// }
} else if (this.setForm.type == 2) { } else if (this.setForm.type == 2) {
if (!!element.price || !!element.freeDays) { if (!!element.price || !!element.freeDays) {
params.push({ params.push({
...@@ -343,10 +328,6 @@ export default { ...@@ -343,10 +328,6 @@ export default {
type: this.setForm.type type: this.setForm.type
}) })
} }
// else {
// this.$message.error('请设置不同车型不同价格2')
// return false
// }
} else { } else {
if (!!element.level || !!element.freeDays) { if (!!element.level || !!element.freeDays) {
params.push({ params.push({
...@@ -359,25 +340,28 @@ export default { ...@@ -359,25 +340,28 @@ export default {
type: this.setForm.type type: this.setForm.type
}) })
} }
// else {
// this.$message.error('请设置不同车型不同价格3')
// return false
// }
} }
}) })
} }
if (params == '') { if (params == '') {
add_edit('',this.activeTime).then(data => { if (this.activeTime) {
if (data.status == 200) { add_edit('', this.activeTime).then(data => {
this.$message.success('设置成功') if (data.status == 200) {
this.chooseData = [] this.$message.success('设置成功')
this.getList() this.chooseData = []
} else { this.getList()
this.$message.error(data.message) } else {
} this.$message.error(data.message)
}) }
})
}else{
this.$message.error('请选择要设置的日期')
}
} else { } else {
add_edit(params,this.activeTime).then(data => { // console.log(params);
console.log(this.activeTime)
add_edit(params, this.activeTime).then(data => {
if (data.status == 200) { if (data.status == 200) {
this.$message.success('设置成功') this.$message.success('设置成功')
this.chooseData = [] this.chooseData = []
...@@ -398,8 +382,9 @@ export default { ...@@ -398,8 +382,9 @@ export default {
}) })
}, },
setVal(val, index, isClick) { setVal(val, index, isClick) {
//val:当前日期 index:当前索引 isClick:不置灰
if (!isClick) { if (!isClick) {
this.activeTime = val this.activeTime = val.length == 1 ? '0' + val : val
if (this.calendarStatus == 1 && this.setForm.isGlobal == 0) { if (this.calendarStatus == 1 && this.setForm.isGlobal == 0) {
dayList(val).then(data => { dayList(val).then(data => {
data.data.forEach(element => { data.data.forEach(element => {
...@@ -461,6 +446,8 @@ export default { ...@@ -461,6 +446,8 @@ export default {
let date = new Date(time) let date = new Date(time)
let year = date.getFullYear() let year = date.getFullYear()
let month = date.getMonth() + 1 let month = date.getMonth() + 1
month = month.toString().length == 1 ? '0' + month : month
// console.log(month);
let datas = let datas =
date.getDate().toString().length == 1 date.getDate().toString().length == 1
? '0' + date.getDate() ? '0' + date.getDate()
...@@ -472,6 +459,7 @@ export default { ...@@ -472,6 +459,7 @@ export default {
let date = new Date(time) let date = new Date(time)
let year = date.getFullYear() let year = date.getFullYear()
let month = date.getMonth() + 1 let month = date.getMonth() + 1
month = month.toString().length == 1 ? '0' + month : month
let datas = let datas =
date.getDate().toString().length == 1 date.getDate().toString().length == 1
? '0' + date.getDate() ? '0' + date.getDate()
...@@ -564,7 +552,7 @@ export default { ...@@ -564,7 +552,7 @@ export default {
this.days.push(dayobject) //将日期放入data 中的days数组 供页面渲染使用 this.days.push(dayobject) //将日期放入data 中的days数组 供页面渲染使用
} }
//其他周 //其他周
for (var i = 1; i <= 35 - this.currentWeek; i++) { for (var i = 1; i <= 35 - this.currentWeek + 7; i++) {
var d = new Date(str) var d = new Date(str)
d.setDate(d.getDate() + i) d.setDate(d.getDate() + i)
var dayobject = {} var dayobject = {}
...@@ -581,6 +569,7 @@ export default { ...@@ -581,6 +569,7 @@ export default {
} }
}, },
pickPre: function(year, month) { pickPre: function(year, month) {
var activeStatus = this.$refs.activeDay || ''
// setDate(0); 上月最后一天 // setDate(0); 上月最后一天
// setDate(-1); 上月倒数第二天 // setDate(-1); 上月倒数第二天
// setDate(dx) 参数dx为 上月最后一天的前后dx天 // setDate(dx) 参数dx为 上月最后一天的前后dx天
...@@ -588,14 +577,51 @@ export default { ...@@ -588,14 +577,51 @@ export default {
d.setDate(0) d.setDate(0)
this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1)) this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
this.getList() this.getList()
if (this.calendarStatus == 1) {
this.changeIsGlobal(0)
for (let index = 0; index < this.days.length; index++) {
if (
this.GMTToStr(
this.days[index] == this.chooseData[index]
)
) {
if (this.chooseData[index]) {
const indexs = this.days.findIndex(
item =>
this.GMTToStrs(item.day) ==
this.chooseData[index]
)
if (activeStatus[indexs])
activeStatus[indexs].className = 'isChosse'
}
}
}
}
}, },
pickNext: function(year, month) { pickNext: function(year, month) {
var activeStatus = this.$refs.activeDay || ''
var d = new Date(this.formatDate(year, month, 1)) var d = new Date(this.formatDate(year, month, 1))
d.setDate(35) d.setDate(35)
this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1)) this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
this.getList() this.getList()
},
this.changeIsGlobal(0)
for (let index = 0; index < this.days.length; index++) {
if (this.GMTToStr(this.days[index] == this.chooseData[index])) {
if (this.chooseData[index]) {
const indexs = this.days.findIndex(
item =>
this.GMTToStrs(item.day) ==
this.chooseData[index]
)
if (activeStatus[indexs])
activeStatus[indexs].className = 'isChosse'
// activeStatus[indexs].className = 'isChosse'
}
}
}
},
// 返回 类似 2016-01-02 格式的字符串 // 返回 类似 2016-01-02 格式的字符串
formatDate: function(year, month, day) { formatDate: function(year, month, day) {
var y = year var y = year
......
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