Commit be01414f authored by rencs's avatar rencs

9.10

parent e9b9d758
......@@ -354,6 +354,26 @@ export const asyncRouterMap = [{
}
]
},
{
path: '/revenue',
component: Layout,
name: '营地管理',
icon: 'setting',
authority: 'revenue',
children: [{
path: 'revenue_sum',
component: _import('revenue/revenue_sum'),
name: '营收概况',
authority: 'revenue_sum'
},
{
path: 'revenue_withdraw',
component: _import('revenue/revenue_withdraw'),
name: '提现列表',
authority: 'revenue_withdraw'
}
]
},
{
path: '/vehicle',
component: Layout,
......
......@@ -109,7 +109,7 @@
</div>
<el-dialog
:title="title_text"
width="50%"
width="50%;"
:visible.sync="add_edit_dialog"
@close="add_edit_dialog=false"
>
......@@ -376,9 +376,10 @@ export default {
location: "",
clientHeight: 500, // 屏幕高度
btn_disable: null,
move_center: { lng: 113.75179, lat: 23.02067 },
};
},
mounted() {},
created() {
this.getList();
this.get_all_companys();
......@@ -688,6 +689,7 @@ export default {
// _this.listQuery.address = rs.address;
}
});
this.store_form.longitude = e.point.lng;
this.store_form.latitude = e.point.lat;
},
......@@ -832,14 +834,20 @@ export default {
margin-bottom: 20px;
}
.form_box1 {
height: 60vh;
overflow-y: scroll;
display: flex;
flex-direction: column;
}
.map {
position: relative;
width: 100%;
height: 500px;
}
.map_box {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
height: 500px;
}
</style>
<template>
<div class="app-container calendar-list-container">
<div>
<div class="filter-container" ref="filter-container">
<el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="80px">
<el-row>
<el-form-item label="所属公司">
<el-select v-model="listQuery.corporationId" placeholder="请选择">
<el-option label="全部" :key="undefined" :value="undefined"></el-option>
<el-option
v-for="val in companys_list"
:key="val.id"
:label="val.name"
:value="val.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="所属门店">
<el-select
class="filter-item"
v-model="listQuery.companyId"
clearable
placeholder="请选择"
>
<el-option label="全部" :key="undefined" :value="undefined"></el-option>
<el-option
v-for="val in branchCompany_list"
:key="val.id"
:label="val.name"
:value="val.id"
></el-option>
</el-select>
</el-form-item>
<el-button
class="filter-item"
type="primary"
v-waves
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
<el-button class="filter-item" @click="clear_handleFilter">清除搜索</el-button>
</el-row>
</el-form>
<div class="label_box">
<div class="label_item top_color_bule">
<p class="money_p">
<span></span>1,000,000.00
</p>
<p class="money_label">总营收金额</p>
</div>
<div class="label_item top_color_bule2">
<p class="money_p">
<span></span>1,000,000.00
</p>
<p class="money_label">订单&服务营收</p>
</div>
<div class="label_item top_color_origin">
<p class="money_p">
<span></span>1,000,000.00
</p>
<p class="money_label">额外赔偿(违约金等)</p>
</div>
<div class="label_item top_color_yellow">
<p class="money_p">
<span></span>1,000,000.00
</p>
<p class="money_label">已提现金额</p>
</div>
<div class="label_item top_color_red">
<p class="money_p">
<span></span>1,000,000.00
</p>
<p class="money_label">
可提现金额,
<a>立即提现 ></a>
</p>
</div>
</div>
<div class="label_filter">
<div>收支明细</div>
<div>
<el-form>
<el-form-item style="margin-bottom:0" label="时间筛选">
<el-date-picker
type="date"
placeholder="开始时间"
v-model="listQuery.daystart"
style="width: 40%;"
></el-date-picker>&nbsp;
<el-date-picker
type="date"
placeholder="结束时间"
v-model="listQuery.dayend"
style="width: 40%;"
></el-date-picker>
</el-form-item>
</el-form>
</div>
</div>
</div>
<el-table :key="tableKey" :data="list" border fit highlight-current-row style="width: 100%;">
<el-table-column align="center" label="公司名称" prop="name"></el-table-column>
<el-table-column align="center" label="联系人/电话">
<template slot-scope="{row}">
<span>{{row.contact}}/{{row.mobile}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="法人姓名" prop="legalPerson"></el-table-column>
<el-table-column align="center" label="法人身份证" prop="legalIdNumber"></el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="{row}">
<el-button type="text" @click="withdraw(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>
</div>
</div>
</div>
</template>
<script>
import { formatDate } from "utils/dateFormattor";
import {
toEast8Date,
deepCopyDate,
newEast8Date,
convertDate2Str,
timestamp2Date,
} from "utils/dateUtils";
import { mapGetters } from "vuex";
import {
company_list,
add_company,
del_company,
upd_company,
} from "api/company";
import { getAllZone } from "api/base_info/constant/";
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";
import { getToken } from "utils/auth";
import { company_all_list, branchCompany_all_list } from "api/company.js";
export default {
name: "carApplyList",
components: {
ElCol,
ElRow,
Element1,
},
data() {
return {
title_text: "",
BASE_API: process.env.BASE_API,
add_edit_dialog: false,
list: null,
total: null,
listLoading: true,
listQuery: {
page: 1,
limit: 10,
companyId: undefined,
corporationId: undefined,
daystart: "",
dayend: "",
},
inline: true,
tableKey: 0,
btn_disable: null,
companys_list: [],
branchCompany_list: [],
};
},
created() {
this.getList();
this.get_all_companys();
this.get_all_branchCompany();
},
computed: {
...mapGetters(["elements"]),
getHeaderWithToken() {
return { Authorization: getToken() };
},
},
methods: {
//所有公司
get_all_companys() {
company_all_list().then((res) => {
if (res.status == 200) {
this.companys_list = res.data;
}
});
},
//所有门店
get_all_branchCompany() {
branchCompany_all_list({ state: 1 }).then((res) => {
if (res.status == 200) {
this.branchCompany_list = res.data;
}
});
},
handleAvatarSuccess(res, file) {
this.company_form.businessLicense = res.data;
},
/**
* 获取列表
* */
getList() {
this.listLoading = true;
company_list(this.listQuery).then((response) => {
console.log(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;
}
this.listLoading = false;
this.list = listRs;
this.total = totalCountRs;
});
},
handleFilter() {
this.listQuery.page = 1;
this.$refs.queryForm.validate((valid) => {
if (valid) {
this.getList();
} else {
return false;
}
});
},
clear_handleFilter() {
this.listQuery = {
page: 1,
limit: 10,
companyId: undefined,
corporationId: undefined,
daystart: "",
dayend: "",
};
this.getList();
},
handleSizeChange(val) {
this.listQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.listQuery.page = val;
this.getList();
},
},
};
</script>
<style lang="scss" scoped>
.top_btn {
width: 100%;
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
.form_box {
width: 80%;
display: flex;
flex-direction: column;
align-items: center;
}
.customWidth1 {
width: 35%;
}
.label_box {
width: 100%;
display: flex;
flex-wrap: wrap;
}
.label_item {
width: 260px;
height: 130px;
margin-right: 20px;
margin-bottom: 20px;
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.3);
border: 1px solid rgba(255, 255, 255, 0);
border-radius: 4px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.top_color_bule {
border-top: 12px solid #3d5afe;
}
.top_color_bule2 {
border-top: 12px solid #00b0ff;
}
.top_color_origin {
border-top: 12px solid #ff9100;
}
.top_color_yellow {
border-top: 12px solid #ffea00;
}
.top_color_red {
border-top: 12px solid #ff3d00;
}
.money_p {
margin: 0;
color: rgba(66, 66, 66, 1);
font-size: 18px;
font-weight: 600;
span {
&:first-child {
color: rgba(97, 97, 97, 1);
font-size: 14px;
}
}
}
.money_label {
margin: 0;
color: rgba(189, 189, 189, 1);
font-size: 14px;
a {
&:first-child {
color: blue;
}
}
}
.label_filter {
div {
&:first-child {
margin-left: 10px;
color: #101010;
font-size: 15px;
font-weight: 600;
}
}
display: flex;
justify-content: space-between;
border-left: 5px solid #101010;
align-items: center;
height: fit-content;
}
</style>
<template>
<div class="app-container calendar-list-container">
<div>
<div class="filter-container" ref="filter-container">
<el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="80px">
<el-row>
<el-form-item label="状态">
<el-select v-model="listQuery.type" placeholder="请选择">
<el-option label="全部" value="0"></el-option>
<el-option label="公司" value="1"></el-option>
<el-option label="门店" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="发起时间">
<el-date-picker
type="date"
placeholder="开始时间"
v-model="listQuery.daystart"
style="width: 40%;"
></el-date-picker>&nbsp;
<el-date-picker
type="date"
placeholder="结束时间"
v-model="listQuery.dayend"
style="width: 40%;"
></el-date-picker>
</el-form-item>
<el-form-item label="提现号">
<el-input v-model="listQuery.number" placeholder="请输入提现号"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-button
class="filter-item"
type="primary"
v-waves
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button>
<el-button class="filter-item" @click="clear_handleFilter">清除搜索</el-button>
</el-row>
</el-form>
</div>
<el-table :key="tableKey" :data="list" border fit highlight-current-row style="width: 100%;">
<el-table-column align="center" label="提现号" prop="name"></el-table-column>
<el-table-column align="center" label="所属公司" prop="name"></el-table-column>
<el-table-column align="center" label="所属门店" prop="name"></el-table-column>
<el-table-column align="center" label="提现金额" prop="name"></el-table-column>
<el-table-column align="center" label="发起时间" prop="name"></el-table-column>
<el-table-column align="center" label="状态" prop="name"></el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="{row}">
<el-button type="text" @click="vailde_now(row)">立即审核</el-button>
<el-button type="text" @click="vailde_check(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>
</div>
</div>
<el-dialog
title="上传凭证"
:visible.sync="update_vailed_dialog"
width="30%"
@close="update_vailed_dialog=false"
>
<el-form>
<el-form-item label="凭证" style="margin-left: 100px;">
<el-upload
class="avatar-uploader"
action="https://jsonplaceholder.typicode.com/posts/"
:show-file-list="false"
:on-success="handleAvatarSuccess"
>
<img v-if="imageUrl" :src="imageUrl" class="avatar" style="width:150px;height:150px" />
<i
v-else
class="el-icon-plus avatar-uploader-icon"
style="width:150px;height:150px;display:flex;align-items: center;justify-content: center;"
></i>
</el-upload>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="update_vailed_dialog = false">取 消</el-button>
<el-button type="primary">确 定</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="show_vailed_dialog" width="30%" @close="show_vailed_dialog=false">
<img src alt />
</el-dialog>
</div>
</template>
<script>
import { formatDate } from "utils/dateFormattor";
import {
toEast8Date,
deepCopyDate,
newEast8Date,
convertDate2Str,
timestamp2Date,
} from "utils/dateUtils";
import { mapGetters } from "vuex";
import {
company_list,
add_company,
del_company,
upd_company,
} from "api/company";
import { getAllZone } from "api/base_info/constant/";
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";
import { getToken } from "utils/auth";
import { company_all_list, branchCompany_all_list } from "api/company.js";
export default {
name: "carApplyList",
components: {
ElCol,
ElRow,
Element1,
},
data() {
return {
title_text: "",
BASE_API: process.env.BASE_API,
add_edit_dialog: false,
list: null,
total: null,
listLoading: true,
listQuery: {
page: 1,
limit: 10,
type: "0",
number: "",
daystart: "",
dayend: "",
},
inline: true,
tableKey: 0,
btn_disable: null,
companys_list: [], //门店列表
update_vailed_dialog: false,
show_vailed_dialog: false,
vailde_item: {},
imageUrl: undefined,
show_image: undefined,
};
},
created() {
this.getList();
this.get_all_companys();
},
computed: {
...mapGetters(["elements"]),
getHeaderWithToken() {
return { Authorization: getToken() };
},
},
methods: {
handleAvatarSuccess(res, file) {
this.imageUrl = URL.createObjectURL(file.raw);
},
//所有公司
get_all_companys() {
company_all_list().then((res) => {
if (res.status == 200) {
this.companys_list = res.data;
}
});
},
handleAvatarSuccess(res, file) {
this.company_form.businessLicense = res.data;
},
/**
* 获取列表
* */
getList() {
this.listLoading = true;
company_list(this.listQuery).then((response) => {
console.log(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;
}
this.listLoading = false;
this.list = listRs;
this.total = totalCountRs;
});
},
handleFilter() {
this.listQuery.page = 1;
this.$refs.queryForm.validate((valid) => {
if (valid) {
this.getList();
} else {
return false;
}
});
},
clear_handleFilter() {
this.listQuery = {
page: 1,
limit: 10,
type: "0",
number: "",
daystart: "",
dayend: "",
};
this.getList();
},
handleSizeChange(val) {
this.listQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.listQuery.page = val;
this.getList();
},
// 立即审核
vailde_now(row) {
this.update_vailed_dialog = true;
this.vailde_item = row;
},
//查看凭证
vailde_check(row) {
this.show_vailed_dialog = true;
this.show_image = row;
},
},
};
</script>
<style>
.top_btn {
width: 100%;
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
.form_box {
width: 80%;
display: flex;
flex-direction: column;
align-items: center;
}
.customWidth1 {
width: 35%;
}
</style>
......@@ -178,11 +178,13 @@
},
longitude:{
required: true,
message: '请选择经纬度'
message: '请选择经纬度',
trigger: 'blur'
},
latitude:{
required: true,
message: '请选择经纬度'
message: '请选择经纬度',
trigger: 'blur'
}
},
allCompanies: {},
......@@ -356,6 +358,7 @@
addrProvince: undefined,
addrCity: undefined,
}
},
getPoint(e){ //点击地图获取一些信息,
this.show = true;
......
<template>
<el-dialog title="活动日期" :visible.sync="isVisible">
<el-button size="small" class="el-button el-button--primary" type="button" icon="plus" @click="addTime()">添加</el-button>
<el-button
size="small"
class="el-button el-button--primary"
type="button"
icon="plus"
@click="addTime()"
>添加</el-button>
<el-form>
<el-row>
<el-col :span="24">
<el-form-item label="活动天数">
<el-input style="width: 200px;" v-model="num" type="number" min="1" placeholder="请输入活动天数" @change="changeNum()"></el-input>
<el-input
style="width: 200px;"
v-model="num"
type="number"
min="1"
placeholder="请输入活动天数"
@change="changeNum()"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-for="item in list"
style="margin: 10px 0;"
:key="item.id">
<el-row v-for="item in list" style="margin: 10px 0;" :key="item.id">
<el-col :span="8">
<el-form-item label="开始时间">
<el-date-picker
......@@ -20,8 +31,8 @@
:disabled="!item.dis"
@change="changeStartTime(item)"
format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
placeholder="选择日期"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -31,8 +42,8 @@
v-model="item.endTime"
type="date"
format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
placeholder="选择日期"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -51,179 +62,174 @@
</el-dialog>
</template>
<script>
import {
getSonRegionByCodes,
getRegionByCodes,
} from 'api/base_info/region/';
import rsCode from '../../../utils/rsCode';
import {mapGetters} from 'vuex';
import {
formatDate
} from 'utils/dateFormattor';
import {
getAllCompany,
getAll
} from 'api/base_info/branch_company/';
import ElRow from "element-ui/packages/row/src/row";
import ElInput from "../../../../node_modules/element-ui/packages/input/src/input.vue";
import ElCol from "element-ui/packages/col/src/col";
import ElFormItem from "../../../../node_modules/element-ui/packages/form/src/form-item.vue";
import ElForm from "../../../../node_modules/element-ui/packages/form/src/form.vue";
export default {
props: ["list", "number"],
name: 'destinationDialog',
components: {
ElForm,
ElFormItem,
ElCol,
ElInput,
ElRow
},
data() {
return {
isVisible: false,
time:"",
lists: [],
t: {},
num: 0
import { getSonRegionByCodes, getRegionByCodes } from "api/base_info/region/";
import rsCode from "../../../utils/rsCode";
import { mapGetters } from "vuex";
import { formatDate } from "utils/dateFormattor";
import { getAllCompany, getAll } from "api/base_info/branch_company/";
import ElRow from "element-ui/packages/row/src/row";
import ElInput from "../../../../node_modules/element-ui/packages/input/src/input.vue";
import ElCol from "element-ui/packages/col/src/col";
import ElFormItem from "../../../../node_modules/element-ui/packages/form/src/form-item.vue";
import ElForm from "../../../../node_modules/element-ui/packages/form/src/form.vue";
export default {
props: ["list", "number"],
name: "destinationDialog",
components: {
ElForm,
ElFormItem,
ElCol,
ElInput,
ElRow,
},
data() {
return {
isVisible: false,
time: "",
lists: [],
t: {},
num: 0,
};
},
created() {},
watch: {
isVisible(newValue, oldValue) {
if (!newValue) {
let arr = [];
this.list.map(function (item) {
if (item.startTime) {
arr.push(item);
}
});
let params = {
priceDTOS: arr,
};
this.$emit("tourDepartTimeEvent", params);
}
},
created() {
},
mounted() {
let that = this;
this.num = this.number;
this.list.map(function (item) {
let arr = [];
arr.push(item.startTime);
arr.push(item.endTime);
item.visible2 = false;
item.time = arr;
});
// this.lists = this.list;
this.isVisible = true;
},
computed: {
...mapGetters(["elements"]),
},
methods: {
/**
* 删除时间
* */
deleteItem(obj) {
this.list.splice(this.list.indexOf(obj), 1);
console.log(obj);
},
watch: {
isVisible(newValue, oldValue){
if(!newValue){
let arr = [];
this.list.map(function(item){
if(item.startTime){
arr.push(item);
}
});
let params = {
priceDTOS: arr
};
this.$emit('tourDepartTimeEvent', params);
}
},
deleteHandler() {},
addTime() {
this.t = {
startTime: "",
endTime: "",
stock: 0,
};
this.list.push(this.t);
this.list[this.list.length - 1].dis = "dis";
console.log(this.list);
},
mounted() {
let that = this;
this.num = this.number;
this.list.map(function(item){
let arr = [];
arr.push(item.startTime);
arr.push(item.endTime);
item.visible2 = false;
item.time = arr;
/**
* 确定
* */
okHandler() {
if (this.num * 1 <= 0) {
this.$notify({
title: "失败",
message: "活动时间必须大于0",
type: "warning",
duration: 2000,
});
return false;
}
let arr = [];
this.list.map(function (item) {
let t = {
id: item.id ? item.id : undefined,
startTime: item.startTime,
endTime: item.endTime,
stock: item.stock,
};
arr.push(t);
});
// this.lists = this.list;
this.isVisible = true;
},
computed: {
...mapGetters([
'elements',
])
let params = {
priceDTOS: arr,
num: this.num * 1,
};
this.$emit("tourDepartTimeEvent", params);
console.log(params);
},
methods: {
/**
* 删除时间
* */
deleteItem(obj){
this.list.splice(this.list.indexOf(obj),1);
console.log(obj);
},
deleteHandler(){},
addTime(){
this.t = {
startTime:"",
endTime: "",
stock: 0
};
this.list.push(this.t);
this.list[this.list.length-1].dis = 'dis'
console.log(this.list)
},
/**
* 确定
* */
okHandler() {
if(this.num*1<=0){
this.$notify({
title: '失败',
message: '活动时间必须大于0',
type: 'warning',
duration: 2000
});
return false;
/**
* 弹框-取消
* */
cancel() {
let arr = [];
this.list.map(function (item) {
if (item.startTime) {
arr.push(item);
}
let arr = [];
this.list.map(function(item){
let t = {
id: item.id?item.id:undefined,
startTime: item.startTime,
endTime: item.endTime,
stock: item.stock
};
arr.push(t);
});
let params = {
priceDTOS: arr,
};
this.$emit("tourDepartTimeEvent", params);
},
dateChange1(val) {
this.filters.startDate = val;
},
/**
* 改变时间
* */
changeStartTime(d) {
if (this.num <= 0) {
this.$notify({
title: "失败",
message: "活动时间必须大于0",
type: "warning",
duration: 2000,
});
let params = {
priceDTOS: arr,
num: this.num*1
};
this.$emit('tourDepartTimeEvent', params);
console.log(params)
},
/**
* 弹框-取消
* */
cancel() {
let arr = [];
this.list.map(function(item){
if(item.startTime){
arr.push(item);
}
return false;
} else {
}
d.endTime = formatDate(
new Date(d.startTime.getTime() + 3600 * 1000 * 24 * this.num),
"yyyy-MM-dd"
);
d.startTime = formatDate(d.startTime, "yyyy-MM-dd");
},
/**
* 改变活动天数-重新计算结束时间
* */
changeNum() {
console.log(this.num);
let that = this;
this.num = this.num * 1;
if (this.num > 0) {
this.list.map(function (item) {
let t = new Date(
new Date(item.startTime).getTime() +
3600 * 1000 * 24 * (that.num - 1)
);
item.startTime = formatDate(new Date(item.startTime), "yyyy-MM-dd");
item.endTime = formatDate(t, "yyyy-MM-dd");
});
let params = {
priceDTOS: arr
};
this.$emit('tourDepartTimeEvent', params);
},
dateChange1(val) { this.filters.startDate = val; },
/**
* 改变时间
* */
changeStartTime(d){
if(this.num<=0){
this.$notify({
title: '失败',
message: '活动时间必须大于0',
type: 'warning',
duration: 2000
});
return false;
} else {
}
d.endTime = formatDate(new Date(d.startTime.getTime() + 3600 * 1000 * 24 * this.num), 'yyyy-MM-dd');
d.startTime = formatDate(d.startTime, 'yyyy-MM-dd');
},
/**
* 改变活动天数-重新计算结束时间
* */
changeNum(){
console.log(this.num);
let that = this;
this.num = this.num*1;
if(this.num>0){
this.list.map(function(item){
let t = new Date(new Date(item.startTime).getTime() + 3600 * 1000 * 24 * (that.num-1));
item.startTime = formatDate(new Date(item.startTime), 'yyyy-MM-dd');
item.endTime = formatDate(t, 'yyyy-MM-dd');
});
console.log(this.list);
}
console.log(this.list);
}
}
}
},
},
};
</script>
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