Commit 04e21fba authored by guoyou's avatar guoyou

租车价格日历,筛选样式调整

parent 27ae43ee
......@@ -3,7 +3,7 @@
<div class="filter-container" ref="filter-container">
<el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="60px">
<el-row>
<el-col :span="4">
<el-col :span="6">
<el-form-item label="描述">
<el-input v-model.number="listQuery.popupName" placeholder="请输入描述"></el-input>
</el-form-item>
......
......@@ -3,7 +3,7 @@
<div class="filter-container" ref="filter-container">
<el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="60px">
<el-row>
<el-col :span="4">
<el-col :span="6">
<el-form-item label="描述">
<el-input v-model.number="listQuery.activitiesName" placeholder="请输入描述"></el-input>
</el-form-item>
......
......@@ -4,39 +4,44 @@
<div class="filter-container" ref="filter-container">
<el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="60px">
<el-row>
<el-col :span="4">
<el-form-item label="手机号">
<el-input v-model.number="listQuery.phone" placeholder="请输入手机号"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="">
<el-form-item label="优惠券">
<el-select class="filter-item" v-model="listQuery.couponId" placeholder="请选择优惠券标题">
<el-option key="" label="" value=""> </el-option>
<el-option v-for="(item,index) in titleList" :key="index" :label="item.title" :value="item.id"> </el-option>
<el-option key label value></el-option>
<el-option
v-for="(item,index) in titleList"
:key="index"
:label="item.title"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="金额">
<el-input v-model.number="listQuery.usedAmount" placeholder="请输入金额"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="">
<el-form-item label="状态">
<el-select class="filter-item" v-model="listQuery.status" placeholder="请输入状态">
<el-option v-for="(item,index) in typeOptions" :key="index" :label="item.name" :value="item.val"> </el-option>
<el-option
v-for="(item,index) in typeOptions"
:key="index"
:label="item.name"
:value="item.val"
></el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="4"></el-col>
<el-col :span="3"></el-col>
<el-col :span="4"></el-col>
<el-col :span="4"></el-col> -->
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" @click="giveCunpon" style="float: right;">+ 发券</el-button>
<!-- <el-button class="filter-item" type="primary" style="float: right;">+ 批量发券</el-button> -->
</el-row>
</el-form>
</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%;">
<el-table-column type="index" align="center" label="ID" width="200">
<template scope="scope">
<span>{{scope.row.id}}</span>
......@@ -78,14 +83,25 @@
</el-table-column>
<el-table-column align="center" label="操作" width="150" fixed="right">
<template scope="scope">
<el-button class="el-button el-button--text el-button--small" style="color:red;" size="small" @click="deleteHandler(scope.row)">删除</el-button>
<el-button
class="el-button el-button--text el-button--small"
style="color:red;"
size="small"
@click="deleteHandler(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<div v-show="!listLoading" class="pagination-container">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="listQuery.page" :page-sizes="[10,20,30,40,50]" :page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="listQuery.page"
:page-sizes="[10,20,30,40,50]"
:page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination>
</div>
</div>
<el-dialog title="发券" :visible.sync="giveDialogVisible">
......@@ -101,8 +117,13 @@
<el-col :span="12">
<el-form-item label="选择优惠券" prop="couponId">
<el-select class="filter-item" v-model="formdata.couponId" placeholder="请选择优惠券">
<el-option key="" label="" value=""> </el-option>
<el-option v-for="(item,index) in titleList" :key="index" :label="item.title" :value="item.id"> </el-option>
<el-option key label value></el-option>
<el-option
v-for="(item,index) in titleList"
:key="index"
:label="item.title"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -123,45 +144,41 @@
</template>
<script>
import {
formatDate
} from 'utils/dateFormattor';
import { formatDate } from 'utils/dateFormattor'
import {
import {
toEast8Date,
deepCopyDate,
newEast8Date,
convertDate2Str,
timestamp2Date
} from 'utils/dateUtils';
} from 'utils/dateUtils'
import rsCode from '../../utils/rsCode';
import rsCode from '../../utils/rsCode'
import {mapGetters} from 'vuex';
import {
getToken
} from 'utils/auth';
import {
import { mapGetters } from 'vuex'
import { getToken } from 'utils/auth'
import {
getTitle,
getCouponList,
giveObj,
delObjOne
} from 'api/cunponManagements';
import Element1 from "../admin/menu/components/element";
import ElRow from "element-ui/packages/row/src/row";
import ElCol from "element-ui/packages/col/src/col";
} from 'api/cunponManagements'
import Element1 from '../admin/menu/components/element'
import ElRow from 'element-ui/packages/row/src/row'
import ElCol from 'element-ui/packages/col/src/col'
export default {
export default {
name: 'conponList',
components: {
ElCol,
ElRow,
Element1,
Element1
},
data() {
return {
titleList:[],
rules:{
titleList: [],
rules: {
phone: [
{
type: 'string',
......@@ -177,21 +194,21 @@
message: '请输入添加张数',
trigger: 'blur'
},
couponId:{
couponId: {
required: true,
message: '请选择优惠券',
message: '请选择优惠券'
}
},
giveDialogVisible:false,
giveDialogVisible: false,
typeOptions: [
{
"name":'已使用',
"val":'1'
name: '已使用',
val: '1'
},
{
"name":'未使用',
"val":'0'
},
name: '未使用',
val: '0'
}
],
BASE_API: process.env.BASE_API,
showLoadingBody: false,
......@@ -201,106 +218,107 @@
listQuery: {
page: 1,
limit: 20,
couponId:'',//优惠券id
phone: '',//手机号
usedAmount: '',//金额
status:'0',//状态
couponId: '', //优惠券id
phone: '', //手机号
usedAmount: '', //金额
status: '0' //状态
},
inline: true,
tableKey: 0,
formdata:{
phone:'',
couponNum:'',
couponId:''
formdata: {
phone: '',
couponNum: '',
couponId: ''
}
}
},
created() {
this.getList();
this.get_title();
this.getList()
this.get_title()
},
computed: {
...mapGetters([
'elements'
])
...mapGetters(['elements'])
},
methods: {
get_title(){
get_title() {
getTitle().then(response => {
this.titleList = response.data;
this.titleList = response.data
})
},
/**
* 获取列表
* */
getList() {
this.listLoading = true;
this.listLoading = true
getCouponList(this.listQuery).then(response => {
let totalCountRs = undefined;
let listRs = undefined;
if (!this.$utils.isEmpty(response.data.data) && this.$utils.isInteger(response.data.totalCount)) {
listRs = response.data.data;
totalCountRs = response.data.totalCount;
listRs.map(function(item){
item.crtTimeStr = timestamp2Date(item.crtTime);
item.expireTimeStr = timestamp2Date(item.expireTime);
});
let totalCountRs = undefined
let listRs = undefined
if (
!this.$utils.isEmpty(response.data.data) &&
this.$utils.isInteger(response.data.totalCount)
) {
listRs = response.data.data
totalCountRs = response.data.totalCount
listRs.map(function(item) {
item.crtTimeStr = timestamp2Date(item.crtTime)
item.expireTimeStr = timestamp2Date(item.expireTime)
})
}
this.listLoading = false;
this.list = listRs;
this.total = totalCountRs;
this.listLoading = false
this.list = listRs
this.total = totalCountRs
})
},
handleFilter() {
this.listQuery.page = 1;
this.listQuery.page = 1
this.$refs.queryForm.validate(valid => {
if (valid) {
this.getList();
this.getList()
} else {
return false;
return false
}
});
})
},
handleSizeChange(val) {
this.listQuery.limit = val;
this.getList();
this.listQuery.limit = val
this.getList()
},
handleCurrentChange(val) {
this.listQuery.page = val;
this.getList();
this.listQuery.page = val
this.getList()
},
add(formName) {
var that = this;
const set = this.$refs;
var that = this
const set = this.$refs
set[formName].validate(valid => {
if (valid) {
giveObj(that.formdata)
.then(response => {
giveObj(that.formdata).then(response => {
if (response.status === 200) {
this.giveDialogVisible = false;
this.getList();
this.giveDialogVisible = false
this.getList()
this.$notify({
title: '成功',
message: '发券成功',
type: 'success',
duration: 2000
});
})
} else {
this.$notify({
title: '失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
message: rsCode.msg[response.code]
? rsCode.msg[response.code]
: '操作失败!',
type: 'error',
duration: 2000
});
})
}
});
})
} else {
return false;
return false
}
});
})
},
deleteHandler(row){
deleteHandler(row) {
this.$confirm('确定删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -313,22 +331,22 @@
message: '删除成功',
type: 'success',
duration: 2000
});
this.getList();
}else{
})
this.getList()
} else {
this.$notify({
title: '失败',
message: response.message,
type: 'error',
duration: 2000
});
})
}
});
})
})
},
giveCunpon(){
this.giveDialogVisible = true;
}
giveCunpon() {
this.giveDialogVisible = true
}
}
}
</script>
......@@ -28,7 +28,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-col :span="6">
<el-form-item label="创建时间">
<el-date-picker
v-model="createTime"
......@@ -39,7 +39,7 @@
<!-- <el-date-picker v-model="createTime" type="datetimerange" placeholder="选择时间范围" @change="changeCreate"></el-date-picker> -->
</el-form-item>
</el-col>
<el-col :span="5">
<el-col :span="6">
<el-form-item label="支付时间">
<!-- <el-date-picker v-model="aplyTime" type="datetimerange" placeholder="选择支付时间范围" @change="changePay"></el-date-picker> -->
<el-date-picker
......
......@@ -4,7 +4,7 @@
<div class="filter-container">
<el-form ref="queryForm" :model="listQuery" label-width="100px">
<el-row>
<el-col :span="5">
<el-col :span="6">
<el-form-item label="统计时间:">
<el-date-picker
v-model="listQuery.time"
......@@ -17,7 +17,7 @@
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="5">
<el-col :span="6">
<el-form-item label="统计方式:" class="wayMsg">
<span
v-for="(item,index) in way"
......
......@@ -4,16 +4,14 @@
<div class="filter-container" ref="filter-container">
<el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="100px">
<el-row>
<el-col :span="5">
<el-form-item label="姓名">
<el-input v-model="listQuery.username" placeholder="请输入姓名"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="手机号">
<el-input v-model.number="listQuery.phone" placeholder="请输入手机号"></el-input>
</el-form-item>
</el-col>
<el-col :span="5"></el-col>
<el-col :span="5"></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="clearFilter">清除搜索</el-button>
</el-row>
......@@ -36,7 +34,7 @@
<template scope="scope">
<span>{{scope.row.commissionRate+'%'}}</span>
</template>
</el-table-column> -->
</el-table-column>-->
<el-table-column width="200" align="center" label="总收益">
<template scope="scope">
......@@ -50,7 +48,6 @@
</template>
</el-table-column>
<el-table-column align="center" label="总提现">
<template scope="scope">
<span>{{scope.row.withdrawals}}</span>
......@@ -71,7 +68,7 @@
<template scope="scope">
<span>{{scope.row.balance}}</span>
</template>
</el-table-column> -->
</el-table-column>-->
<!-- <el-table-column align="center" label="操作" fixed="right">
<template scope="scope">
<el-button
......@@ -80,7 +77,7 @@
@click="deposit(scope.row)"
>{{scope.row.isFrozen == 0 ? '禁止提现' : '允许提现'}}</el-button>
</template>
</el-table-column> -->
</el-table-column>-->
</el-table>
<div v-show="!listLoading" class="pagination-container">
<el-pagination
......@@ -151,8 +148,8 @@ export default {
},
methods: {
//清除搜索
clearFilter(){
this.listQuery.username = this.listQuery.phone = null;
clearFilter() {
this.listQuery.username = this.listQuery.phone = null
this.getList()
},
//提现
......
......@@ -3,12 +3,12 @@
<div class="filter-container">
<el-form ref="queryForm" :model="listQuery" label-width="100px">
<el-row>
<el-col :span="4">
<el-col :span="6">
<el-form-item label="手机号">
<el-input v-model.number="listQuery.username" placeholder="请输入手机号"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="16">
<el-form-item label="导入时间">
<el-date-picker
v-model="listQuery.startTime"
......
......@@ -861,6 +861,9 @@
if(queryJson.mobile){
t.listQuery.mobile = queryJson.mobile;
}
if(queryJson.realName){
t.listQuery.realName = queryJson.realName;
}
if(queryJson.memberLevel){
t.listQuery.memberLevel = queryJson.memberLevel;
}
......
......@@ -3,25 +3,18 @@
<div class="filter-container" ref="filter-container">
<el-form :rules="rules4Query" ref="queryForm" :inline="inline" :model="listQuery">
<el-row>
<el-col :span="5">
<el-form-item label="用途">
<el-select class="filter-item" v-model="listQuery.bookType" placeholder="请选择">
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option v-for="val in bookTypeList" :key="val.id" :label="val.name" :value="val.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="车辆编码">
<el-input type="number" v-model.number="listQuery.code" placeholder="请输入车辆编码"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="车牌号">
<el-input v-model="listQuery.numberPlate" placeholder="请输入车牌号"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="申请状态">
<el-select class="filter-item" v-model="listQuery.status" placeholder="请选择申请状态">
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
......@@ -35,10 +28,12 @@
></el-option>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="5"></el-col>
<el-col :span="5"></el-col>
<el-col :span="5"></el-col>
<el-col :span="5"></el-col> -->
</el-row>
<el-row>
<el-col :span="5">
<el-form-item label="所属大区">
<el-select
class="filter-item"
......@@ -50,8 +45,6 @@
<el-option v-for="val in getAllZoneList" :key="val.id" :label="val.name" :value="val.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="提车公司" prop="subordinateBranch">
<el-autocomplete
class="inline-input"
......@@ -61,8 +54,6 @@
@select="handleSelect"
></el-autocomplete>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="提车时间" prop="bookStartDate4Query">
<el-date-picker
v-model="bookStartDate4Query"
......@@ -72,8 +63,6 @@
placeholder="请选择预约提车时间"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="还车时间" prop="bookEndDate4Query">
<el-date-picker
v-model="bookEndDate4Query"
......@@ -83,7 +72,10 @@
placeholder="请选择预约还车时间"
></el-date-picker>
</el-form-item>
</el-col>
<!-- <el-col :span="5"></el-col>
<el-col :span="5"></el-col>
<el-col :span="5"></el-col>
<el-col :span="5"></el-col> -->
</el-row>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
......@@ -438,7 +430,7 @@
<el-card>
<img :src="item" class="image" />
</el-card>
</el-col> -->
</el-col>-->
</el-row>
<hr />
<el-row>
......@@ -490,7 +482,7 @@
<el-card>
<img :src="item" class="image" />
</el-card>
</el-col> -->
</el-col>-->
</el-row>
<hr />
<el-row>
......@@ -720,7 +712,7 @@
</template>
<script>
import {
import {
page,
prove,
reject,
......@@ -732,33 +724,33 @@
saveOrderViolation,
departureVehicle,
arrivalVehicle
} from 'api/vehicle/bookRecord'
} from 'api/vehicle/bookRecord'
import {
import {
getAllCompany,
getAll,
updateById
} from 'api/base_info/branch_company/'
import { getAllZone } from 'api/base_info/constant/'
import { getAllBranchCompanyByZoneId } from 'api/order/rentVehicle'
import { formatDate } from 'utils/dateFormattor'
} from 'api/base_info/branch_company/'
import { getAllZone } from 'api/base_info/constant/'
import { getAllBranchCompanyByZoneId } from 'api/order/rentVehicle'
import { formatDate } from 'utils/dateFormattor'
import rsCode from '../../../utils/rsCode'
import rsCode from '../../../utils/rsCode'
import { mapGetters } from 'vuex'
import { mapGetters } from 'vuex'
import { toEast8Date, deepCopyDate, newEast8Date } from 'utils/dateUtils'
import { getToken } from '../../../utils/auth'
import {
import { toEast8Date, deepCopyDate, newEast8Date } from 'utils/dateUtils'
import { getToken } from '../../../utils/auth'
import {
BOOK_RECORD_STATUS_APPLY,
BOOK_RECORD_STATUS_PROVED,
BOOK_RECORD_STATUS_LIFT
} from '../../../store/modules/baseInfo'
} from '../../../store/modules/baseInfo'
import bookInfoViewer from '../bookInfoViewer'
import accItemSelector from '../accompanyingItem/accItemSelector.vue'
import bookInfoViewer from '../bookInfoViewer'
import accItemSelector from '../accompanyingItem/accItemSelector.vue'
export default {
export default {
name: 'bookRecord',
components: {
bookInfoViewer,
......@@ -957,7 +949,7 @@
flag: false,
zoneId: undefined,
liftCompany: undefined,
liftCompanyName: "",
liftCompanyName: '',
numberPlate: undefined,
selectedMonth: undefined,
status: undefined,
......@@ -1091,56 +1083,56 @@
}
},
created() {
let t = this;
let t = this
getAll().then(response => {
this.allCompaniesArr = response.data;
let query = localStorage.getItem("bookRecord");
if(query !="null" && query){
let queryJson = JSON.parse(query);
if(queryJson.page){
t.listQuery.page = queryJson.page;
this.allCompaniesArr = response.data
let query = localStorage.getItem('bookRecord')
if (query != 'null' && query) {
let queryJson = JSON.parse(query)
if (queryJson.page) {
t.listQuery.page = queryJson.page
}
if(queryJson.limit){
t.listQuery.limit = queryJson.limit;
if (queryJson.limit) {
t.listQuery.limit = queryJson.limit
}
if(queryJson.flag){
t.listQuery.flag = queryJson.flag;
if (queryJson.flag) {
t.listQuery.flag = queryJson.flag
}
if(queryJson.zoneId){
t.listQuery.zoneId = queryJson.zoneId;
if (queryJson.zoneId) {
t.listQuery.zoneId = queryJson.zoneId
}
if(queryJson.liftCompany){
t.listQuery.liftCompany = queryJson.liftCompany;
if (queryJson.liftCompany) {
t.listQuery.liftCompany = queryJson.liftCompany
}
if(queryJson.liftCompanyName){
t.listQuery.liftCompanyName = queryJson.liftCompanyName;
if (queryJson.liftCompanyName) {
t.listQuery.liftCompanyName = queryJson.liftCompanyName
}
if(queryJson.numberPlate){
t.listQuery.numberPlate = queryJson.numberPlate;
if (queryJson.numberPlate) {
t.listQuery.numberPlate = queryJson.numberPlate
}
if(queryJson.selectedMonth){
t.listQuery.selectedMonth = queryJson.selectedMonth;
if (queryJson.selectedMonth) {
t.listQuery.selectedMonth = queryJson.selectedMonth
}
if(queryJson.status){
t.listQuery.status = queryJson.status;
if (queryJson.status) {
t.listQuery.status = queryJson.status
}
if(queryJson.bookType){
t.listQuery.bookType = queryJson.bookType;
if (queryJson.bookType) {
t.listQuery.bookType = queryJson.bookType
}
// if(queryJson.liftCompany){
// t.allCompaniesArr.map(function (item) {
// if(item.id == queryJson.liftCompany){
// t.listQuery.liftCompanyName = item.name;
// }
// });
// }
// if(queryJson.liftCompany){
// t.allCompaniesArr.map(function (item) {
// if(item.id == queryJson.liftCompany){
// t.listQuery.liftCompanyName = item.name;
// }
// });
// }
}
this.getList()
});
})
getAllCompany(codeAndBranchCompany => {
//初始化公司列表
this.allCompanies = codeAndBranchCompany
});
})
this.bookRecord_btn_prove = this.elements['bookRecord:btn_prove']
this.bookRecord_btn_reject = this.elements['bookRecord:btn_reject']
this.bookRecord_btn_unbook = this.elements['bookRecord:btn_unbook']
......@@ -1222,18 +1214,21 @@
flag: false,
zoneId: undefined,
liftCompany: undefined,
liftCompanyName: "",
liftCompanyName: '',
numberPlate: undefined,
selectedMonth: undefined,
status: undefined,
bookType: undefined,
bookStartDate: undefined,
bookEndDate: undefined
};
if(this.listQuery){
localStorage.setItem("bookRecord", JSON.stringify(this.listQuery));
}
this.getList();
if (this.listQuery) {
localStorage.setItem(
'bookRecord',
JSON.stringify(this.listQuery)
)
}
this.getList()
},
confirm() {
if (this.returnForm.retCompany == '') {
......@@ -1253,9 +1248,9 @@
type: 'success',
duration: 2000
})
this.resetReturn = false;
this.dialogDetailVisible = false;
this.getList();
this.resetReturn = false
this.dialogDetailVisible = false
this.getList()
} else {
this.$notify({
title: '失败',
......@@ -1416,10 +1411,10 @@
getProvinceRegions(item) {
this.listQuery.zoneId = item
this.baranchQuery.zoneId = item
// this.listQuery.liftCompany = undefined
// getAllBranchCompanyByZoneId(this.baranchQuery).then(response => {
// this.allBranchCompany = response.data
// })
// this.listQuery.liftCompany = undefined
// getAllBranchCompanyByZoneId(this.baranchQuery).then(response => {
// this.allBranchCompany = response.data
// })
},
getAllBranchCompanyChange(item) {
this.listQuery.liftCompany = item
......@@ -1451,10 +1446,10 @@
* 提车分公司
* */
handleSelect(item) {
if (item.value == "全部") {
this.listQuery.liftCompany = undefined;
if (item.value == '全部') {
this.listQuery.liftCompany = undefined
} else {
this.listQuery.liftCompany = item.id;
this.listQuery.liftCompany = item.id
}
},
cancelDialog4Lift(formName) {
......@@ -1664,8 +1659,11 @@
this.listQuery.page = 1
this.$refs.queryForm.validate(valid => {
if (valid) {
if(this.listQuery){
localStorage.setItem("bookRecord", JSON.stringify(this.listQuery));
if (this.listQuery) {
localStorage.setItem(
'bookRecord',
JSON.stringify(this.listQuery)
)
}
this.getList()
} else {
......@@ -1909,30 +1907,30 @@
})
}
}
}
}
</script>
<style scoped>
.order-details .el-form-item {
.order-details .el-form-item {
margin-bottom: 0px !important;
}
.order-details hr {
}
.order-details hr {
height: 1px;
background-color: #ccc;
border: none;
}
.image {
}
.image {
width: 100%;
height: 110px;
display: block;
}
.el-card__body,
.el-card {
}
.el-card__body,
.el-card {
padding: 0px !important;
width: 150px;
text-align: center;
}
.modal_modal {
}
.modal_modal {
position: fixed;
left: 0;
top: 0;
......@@ -1941,9 +1939,9 @@
opacity: 0.5;
background: #000;
z-index: 2001;
}
.voucher{
}
.voucher {
width: 100px;
height: 100px;
}
}
</style>
......@@ -66,7 +66,7 @@
@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> -->
<!--本月-->
......@@ -77,7 +77,7 @@
>{{ dayobject.day.getDate() }}</span>
<!--如果是本月 还需要判断是不是这一天-->
<span v-else ref="allDays">
<span v-else>
<span
v-if="dayobject.day.getFullYear() == new Date().getFullYear() && dayobject.day.getMonth() == new Date().getMonth() && dayobject.day.getDate() == new Date().getDate()"
class="active"
......@@ -229,6 +229,7 @@ export default {
this.levelsFn()
},
methods: {
//通用规则设置
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
......@@ -249,8 +250,9 @@ export default {
}
})
},
//清空设置样式
changeIsGlobal(val) {
let activeStatus = this.$refs.activeDay
let activeStatus = this.$refs.activeDay || ''
if (val == 0) {
for (let index = 0; index < activeStatus.length; index++) {
activeStatus[index].className = ''
......@@ -353,7 +355,6 @@ export default {
})
} else {
// console.log(params);
add_edit(params, this.activeTime).then(data => {
if (data.status == 200) {
this.$message.success('设置成功')
......@@ -439,6 +440,8 @@ export default {
let date = new Date(time)
let year = date.getFullYear()
let month = date.getMonth() + 1
month = month.toString().length == 1 ? '0' + month : month
// console.log(month);
let datas =
date.getDate().toString().length == 1
? '0' + date.getDate()
......@@ -450,6 +453,7 @@ export default {
let date = new Date(time)
let year = date.getFullYear()
let month = date.getMonth() + 1
month = month.toString().length == 1 ? '0' + month : month
let datas =
date.getDate().toString().length == 1
? '0' + date.getDate()
......@@ -559,6 +563,7 @@ export default {
}
},
pickPre: function(year, month) {
var activeStatus = this.$refs.activeDay || ''
// setDate(0); 上月最后一天
// setDate(-1); 上月倒数第二天
// setDate(dx) 参数dx为 上月最后一天的前后dx天
......@@ -567,33 +572,49 @@ export default {
this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
this.getList()
if (this.calendarStatus == 1) {
this.changeIsGlobal(0)
this.chooseData = []
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) {
var activeStatus = this.$refs.activeDay || ''
var d = new Date(this.formatDate(year, month, 1))
d.setDate(35)
this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
this.getList()
this.changeIsGlobal(0)
this.chooseData = []
// this.reset()
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'
}
}
}
},
// reset() {
// if ((this.calendarStatus = 1)) {
// let activeStatus = this.$refs.activeDay
// let allDays = this.$refs.allDays
// for (let index = 0; index < activeStatus.length; index++) {
// if (
// this.days[index].day.getMonth() + 1 !=
// this.currentMonth
// ) {
// activeStatus[index].className = '';
// }
// }
// }
// },
// 返回 类似 2016-01-02 格式的字符串
formatDate: function(year, month, day) {
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