草稿箱测试修改
This commit is contained in:
parent
3dbd59baa6
commit
8104c5df2f
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="long-data-picker">
|
<view class="long-data-picker">
|
||||||
<picker-view indicator-class="select-line" :immediate-change="true" :indicator-style="itemHeight" @change="bindDateChange">
|
<picker-view :value="valueDate" indicator-class="select-line" :immediate-change="true"
|
||||||
|
:indicator-style="itemHeight" @change="bindDateChange">
|
||||||
|
|
||||||
<picker-view-column>
|
<picker-view-column>
|
||||||
<view class="long-datetime-item" v-for="(item,index) in dates" :key="index">{{item}}</view>
|
<view class="long-datetime-item" v-for="(item,index) in dates" :key="index">{{item}}</view>
|
||||||
@ -27,10 +28,13 @@
|
|||||||
export default {
|
export default {
|
||||||
name: "long-date",
|
name: "long-date",
|
||||||
props: {
|
props: {
|
||||||
|
|
||||||
chooseNum: {
|
chooseNum: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 30
|
default: 30
|
||||||
|
},
|
||||||
|
defaultTime: {
|
||||||
|
type: Date,
|
||||||
|
default: null
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -43,7 +47,9 @@
|
|||||||
dates: [],
|
dates: [],
|
||||||
hours: [],
|
hours: [],
|
||||||
minutes: [],
|
minutes: [],
|
||||||
formatdates: []
|
formatdates: [],
|
||||||
|
currentTimePlus8Hours: null, // 新增属性
|
||||||
|
valueDate: [0, 0, 0]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -79,110 +85,301 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initDate();
|
// 获取当前时间
|
||||||
|
this.currentTime = new Date();
|
||||||
|
// 计算当前时间加8小时
|
||||||
|
this.currentTimePlus8Hours = new Date(this.currentTime);
|
||||||
|
this.currentTimePlus8Hours.setHours(this.currentTime.getHours());
|
||||||
|
|
||||||
|
// 使用传入的默认时间或当前时间加8小时作为基准
|
||||||
|
const baseTime = this.defaultTime || this.currentTimePlus8Hours;
|
||||||
|
this.initDate(baseTime);
|
||||||
|
// // 计算当前时间加8小时
|
||||||
|
// const now = new Date();
|
||||||
|
// now.setHours(now.getHours() + 8);
|
||||||
|
// this.currentTimePlus8Hours = now;
|
||||||
|
// this.initDate();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//初始化时间
|
//初始化时间
|
||||||
initDate() {
|
initDate(baseTime) {
|
||||||
let currentdate = moment().format("MMM Do");
|
// 设置日期数组
|
||||||
//设置日期数组
|
this.dates = [];
|
||||||
this.dates = []
|
this.formatdates = [];
|
||||||
//格式化日期数组
|
|
||||||
this.formatdates = []
|
|
||||||
|
|
||||||
|
|
||||||
|
// 生成日期选项(从今天开始)
|
||||||
for (let i = 0; i <= this.chooseNum; i++) {
|
for (let i = 0; i <= this.chooseNum; i++) {
|
||||||
this.formatdates.push(moment().add(i, 'days').format("YYYY-MM-DD"))
|
const date = moment(baseTime).add(i, 'days');
|
||||||
this.dates.push(moment().add(i, 'days').format("MMMDo dddd"))
|
this.formatdates.push(date.format("YYYY-MM-DD"));
|
||||||
|
this.dates.push(date.format("MMMDo dddd"));
|
||||||
}
|
}
|
||||||
|
|
||||||
let h = parseInt(moment().format("HH"))
|
// 设置时间选项
|
||||||
this.hours = []
|
this.updateTimeColumns(baseTime);
|
||||||
for (let i = h; i < 24; i++) {
|
|
||||||
let str = i;
|
|
||||||
if (i < 10) {
|
|
||||||
str = '0' + str;
|
|
||||||
} else {
|
|
||||||
str = '' + str;
|
|
||||||
}
|
|
||||||
this.hours.push(str);
|
|
||||||
}
|
|
||||||
this.minutes = []
|
|
||||||
let m = parseInt(moment().format("mm"))
|
|
||||||
console.log(m);
|
|
||||||
for (let i = 0; i < 60; i++) {
|
|
||||||
let str = i;
|
|
||||||
if (i < 10) {
|
|
||||||
str = '0' + str;
|
|
||||||
} else {
|
|
||||||
str = '' + str;
|
|
||||||
}
|
|
||||||
this.minutes.push(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// 使用$nextTick确保DOM更新后再设置默认值
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setDefaultValueDate();
|
||||||
|
}, 300)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 设置默认选中当前时间+8小时的选项
|
||||||
|
setDefaultValueDate() {
|
||||||
|
const now = new Date();
|
||||||
|
// 计算当前时间+8小时的小时值
|
||||||
|
let targetHourStr = now.getHours() + 8;
|
||||||
|
if (targetHourStr >= 24) {
|
||||||
|
targetHourStr -= 24;
|
||||||
|
}
|
||||||
|
console.log(this.hours);
|
||||||
|
console.log(targetHourStr);
|
||||||
|
|
||||||
|
let targetDayStr = now.getDay();
|
||||||
|
console.log('targetDayStr',targetDayStr);
|
||||||
|
if (targetHourStr >= 24) {
|
||||||
|
// targetHourStr -= 24;
|
||||||
|
this.valueDate = [0, 0, 0];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 在hours数组中查找对应的索引
|
||||||
|
const hourIndex = this.hours.findIndex(hour => hour == targetHourStr);
|
||||||
|
console.log(hourIndex);
|
||||||
|
// 设置valueDate,日期和分钟保持默认索引0,只设置小时索引
|
||||||
|
if (hourIndex !== -1) {
|
||||||
|
this.valueDate = [0, hourIndex, 0];
|
||||||
|
} else {
|
||||||
|
// 如果找不到对应小时(比如当前时间+8小时超过了今天的可选范围),保持默认
|
||||||
|
this.valueDate = [0, 0, 0];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
updateTimeColumns(selectedDate) {
|
||||||
|
const isToday = moment(selectedDate).isSame(this.currentTime, 'day');
|
||||||
|
const now = new Date();
|
||||||
|
|
||||||
|
// 如果是今天,小时从当前小时开始
|
||||||
|
if (isToday) {
|
||||||
|
// let currentHour = now.getHours() + 8;
|
||||||
|
let currentHour = now.getHours();
|
||||||
|
let currentMinute = now.getMinutes();
|
||||||
|
|
||||||
|
// 生成小时选项(从当前小时到23)
|
||||||
|
this.hours = [];
|
||||||
|
|
||||||
|
for (let i = currentHour; i < 24; i++) {
|
||||||
|
this.hours.push(i.toString().padStart(2, '0'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 生成分钟选项(如果是当前小时,分钟从当前分钟开始;否则从0开始)
|
||||||
|
this.minutes = [];
|
||||||
|
for (let i = currentMinute; i < 60; i++) {
|
||||||
|
this.minutes.push(i.toString().padStart(2, '0'));
|
||||||
|
}
|
||||||
|
// let startMinute = (i === currentHour) ? currentMinute : 0;
|
||||||
|
// for (let i = 0; i < 60; i++) {
|
||||||
|
// this.minutes.push(i.toString().padStart(2, '0'));
|
||||||
|
// }
|
||||||
|
} else {
|
||||||
|
// 如果不是今天,小时和分钟都从0开始
|
||||||
|
this.hours = [];
|
||||||
|
|
||||||
//滚动切换时间
|
|
||||||
bindDateChange(e) { //有效日期的滚动日期时间方法
|
|
||||||
let valueArr = e.detail.value
|
|
||||||
this.hours = []
|
|
||||||
this.minutes = []
|
|
||||||
if (valueArr[0] != 0) {
|
|
||||||
for (let i = 0; i < 24; i++) {
|
for (let i = 0; i < 24; i++) {
|
||||||
let str = i;
|
this.hours.push(i.toString().padStart(2, '0'));
|
||||||
if (i < 10) {
|
|
||||||
str = '0' + str;
|
|
||||||
} else {
|
|
||||||
str = '' + str;
|
|
||||||
}
|
|
||||||
this.hours.push(str);
|
|
||||||
}
|
|
||||||
for (let i = 0; i < 60; i++) {
|
|
||||||
let str = i;
|
|
||||||
if (i < 10) {
|
|
||||||
str = '0' + str;
|
|
||||||
} else {
|
|
||||||
str = '' + str;
|
|
||||||
}
|
|
||||||
this.minutes.push(str);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
let h = parseInt(moment().format("HH"))
|
|
||||||
this.hours = []
|
|
||||||
for (let i = h; i < 24; i++) {
|
|
||||||
let str = i;
|
|
||||||
if (i < 10) {
|
|
||||||
str = '0' + str;
|
|
||||||
} else {
|
|
||||||
str = '' + str;
|
|
||||||
}
|
|
||||||
this.hours.push(str);
|
|
||||||
}
|
|
||||||
this.minutes = []
|
|
||||||
let m = parseInt(moment().format("mm"))
|
|
||||||
for (let i = 0; i < 60; i++) {
|
|
||||||
let str = i;
|
|
||||||
if (i < 10) {
|
|
||||||
str = '0' + str;
|
|
||||||
} else {
|
|
||||||
str = '' + str;
|
|
||||||
}
|
|
||||||
this.minutes.push(str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.minutes = [];
|
||||||
|
for (let i = 0; i < 60; i++) {
|
||||||
|
this.minutes.push(i.toString().padStart(2, '0'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
bindDateChange(e) {
|
||||||
|
let valueArr = e.detail.value;
|
||||||
|
const selectedDate = this.formatdates[valueArr[0]];
|
||||||
|
const isToday = moment(selectedDate).isSame(this.currentTime, 'day');
|
||||||
|
|
||||||
|
// 更新时间列
|
||||||
|
this.updateTimeColumns(selectedDate);
|
||||||
|
|
||||||
|
// 获取选择的时间
|
||||||
let dateStr = this.formatdates[valueArr[0]];
|
let dateStr = this.formatdates[valueArr[0]];
|
||||||
let hourStr = this.hours[valueArr[1]];
|
let hourStr = this.hours[valueArr[1]];
|
||||||
let minuteStr = this.minutes[valueArr[2]];
|
let minuteStr = this.minutes[valueArr[2]];
|
||||||
console.log(dateStr + ' ' + hourStr + ':' + minuteStr)
|
|
||||||
|
// 验证时间是否在当前时间之后
|
||||||
|
const selectedTime = new Date(`${dateStr} ${hourStr}:${minuteStr}`);
|
||||||
|
if (selectedTime < this.currentTime) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '不能选择过去的时间',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 验证时间是否在当前时间8小时之内
|
||||||
|
if (selectedTime < this.currentTimePlus8Hours) {
|
||||||
|
// 允许选择,不做任何处理
|
||||||
|
}
|
||||||
|
|
||||||
|
// 触发事件
|
||||||
this.$emit("select", {
|
this.$emit("select", {
|
||||||
time: moment(dateStr + ' ' + hourStr + ':' + minuteStr).format("YYYY-MM-DD HH:mm")
|
time: moment(`${dateStr} ${hourStr}:${minuteStr}`).format("YYYY-MM-DD HH:mm")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
|
// initDate() {
|
||||||
|
// const baseTime = this.defaultTime || new Date();
|
||||||
|
// // 使用 currentTimePlus8Hours 作为基准时间
|
||||||
|
// const currentdate = moment(this.currentTimePlus8Hours).format("MMM Do");
|
||||||
|
|
||||||
|
// // 设置日期数组
|
||||||
|
// this.dates = [];
|
||||||
|
// this.formatdates = [];
|
||||||
|
|
||||||
|
// for (let i = 0; i <= this.chooseNum; i++) {
|
||||||
|
// this.formatdates.push(moment(baseTime).add(i, 'days').format("YYYY-MM-DD"));
|
||||||
|
// this.dates.push(moment(baseTime).add(i, 'days').format("MMMDo dddd"));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 设置小时数组(从当前时间加8小时的小时开始)
|
||||||
|
// let h = parseInt(moment(this.currentTimePlus8Hours).format("HH"));
|
||||||
|
// this.hours = [];
|
||||||
|
// for (let i = h; i < 24; i++) {
|
||||||
|
// let str = i;
|
||||||
|
// if (i < 10) {
|
||||||
|
// str = '0' + str;
|
||||||
|
// } else {
|
||||||
|
// str = '' + str;
|
||||||
|
// }
|
||||||
|
// this.hours.push(str);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 设置分钟数组(从0开始)
|
||||||
|
// this.minutes = [];
|
||||||
|
// let m = parseInt(moment(this.currentTimePlus8Hours).format("mm"));
|
||||||
|
// for (let i = 0; i < 60; i++) {
|
||||||
|
// let str = i;
|
||||||
|
// if (i < 10) {
|
||||||
|
// str = '0' + str;
|
||||||
|
// } else {
|
||||||
|
// str = '' + str;
|
||||||
|
// }
|
||||||
|
// this.minutes.push(str);
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
|
||||||
|
|
||||||
|
// // initDate() {
|
||||||
|
// // let currentdate = moment().format("MMM Do");
|
||||||
|
// // //设置日期数组
|
||||||
|
// // this.dates = []
|
||||||
|
// // //格式化日期数组
|
||||||
|
// // this.formatdates = []
|
||||||
|
|
||||||
|
|
||||||
|
// // for (let i = 0; i <= this.chooseNum; i++) {
|
||||||
|
// // this.formatdates.push(moment().add(i, 'days').format("YYYY-MM-DD"))
|
||||||
|
// // this.dates.push(moment().add(i, 'days').format("MMMDo dddd"))
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // let h = parseInt(moment().format("HH"))
|
||||||
|
// // this.hours = []
|
||||||
|
// // for (let i = h; i < 24; i++) {
|
||||||
|
// // let str = i;
|
||||||
|
// // if (i < 10) {
|
||||||
|
// // str = '0' + str;
|
||||||
|
// // } else {
|
||||||
|
// // str = '' + str;
|
||||||
|
// // }
|
||||||
|
// // this.hours.push(str);
|
||||||
|
// // }
|
||||||
|
// // this.minutes = []
|
||||||
|
// // let m = parseInt(moment().format("mm"))
|
||||||
|
// // console.log(m);
|
||||||
|
// // for (let i = 0; i < 60; i++) {
|
||||||
|
// // let str = i;
|
||||||
|
// // if (i < 10) {
|
||||||
|
// // str = '0' + str;
|
||||||
|
// // } else {
|
||||||
|
// // str = '' + str;
|
||||||
|
// // }
|
||||||
|
// // this.minutes.push(str);
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// //滚动切换时间
|
||||||
|
// bindDateChange(e) { //有效日期的滚动日期时间方法
|
||||||
|
// let valueArr = e.detail.value;
|
||||||
|
// this.hours = [];
|
||||||
|
// this.minutes = [];
|
||||||
|
|
||||||
|
// if (valueArr[0] != 0) {
|
||||||
|
// // 如果不是今天,小时从0开始
|
||||||
|
// for (let i = 0; i < 24; i++) {
|
||||||
|
// let str = i;
|
||||||
|
// if (i < 10) {
|
||||||
|
// str = '0' + str;
|
||||||
|
// } else {
|
||||||
|
// str = '' + str;
|
||||||
|
// }
|
||||||
|
// this.hours.push(str);
|
||||||
|
// }
|
||||||
|
// // 分钟从0开始
|
||||||
|
// for (let i = 0; i < 60; i++) {
|
||||||
|
// let str = i;
|
||||||
|
// if (i < 10) {
|
||||||
|
// str = '0' + str;
|
||||||
|
// } else {
|
||||||
|
// str = '' + str;
|
||||||
|
// }
|
||||||
|
// this.minutes.push(str);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// // 如果是今天,小时从当前时间加8小时的小时开始
|
||||||
|
// let h = parseInt(moment(this.currentTimePlus8Hours).format("HH"));
|
||||||
|
// this.hours = [];
|
||||||
|
// for (let i = h; i < 24; i++) {
|
||||||
|
// let str = i;
|
||||||
|
// if (i < 10) {
|
||||||
|
// str = '0' + str;
|
||||||
|
// } else {
|
||||||
|
// str = '' + str;
|
||||||
|
// }
|
||||||
|
// this.hours.push(str);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 分钟从0开始
|
||||||
|
// this.minutes = [];
|
||||||
|
// let m = parseInt(moment(this.currentTimePlus8Hours).format("mm"));
|
||||||
|
// for (let i = 0; i < 60; i++) {
|
||||||
|
// let str = i;
|
||||||
|
// if (i < 10) {
|
||||||
|
// str = '0' + str;
|
||||||
|
// } else {
|
||||||
|
// str = '' + str;
|
||||||
|
// }
|
||||||
|
// this.minutes.push(str);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// let dateStr = this.formatdates[valueArr[0]];
|
||||||
|
// let hourStr = this.hours[valueArr[1]];
|
||||||
|
// let minuteStr = this.minutes[valueArr[2]];
|
||||||
|
// console.log(dateStr + ' ' + hourStr + ':' + minuteStr);
|
||||||
|
// this.$emit("select", {
|
||||||
|
// time: moment(dateStr + ' ' + hourStr + ':' + minuteStr).format("YYYY-MM-DD HH:mm")
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
// },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1355,7 +1355,7 @@
|
|||||||
width: 288rpx;
|
width: 288rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
font-family: PingFang SC Bold, PingFang SC Bold;
|
font-family: PingFang SC Bold, PingFang SC Bold;
|
||||||
font-weight: 600;
|
font-weight: 900;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #202020;
|
color: #202020;
|
||||||
line-height: 36rpx;
|
line-height: 36rpx;
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<view style="width: 100%;">
|
<view style="width: 100%;">
|
||||||
<!-- 草稿箱列表 -->
|
<!-- 草稿箱列表 -->
|
||||||
<!-- <view v-if="draftShow === true"> -->
|
<!-- <view v-if="draftShow === true"> -->
|
||||||
<view v-if="status == 15" style="margin-top: 110rpx;width: 100%;min-height: 100vh;">
|
<view v-if="status == 15" style="margin-top: 110rpx;width: 100%;min-height: 100vh;height:auto;">
|
||||||
<!-- v-for="(item,index) in draftList" :key="index" @click="checkInvoice(item.invoiceCheck,index)"-->
|
<!-- v-for="(item,index) in draftList" :key="index" @click="checkInvoice(item.invoiceCheck,index)"-->
|
||||||
<view class="invoiceList" v-for="(item,index) in draftList" :key="index">
|
<view class="invoiceList" v-for="(item,index) in draftList" :key="index">
|
||||||
<view class="invoiceList-item">
|
<view class="invoiceList-item">
|
||||||
@ -45,16 +45,21 @@
|
|||||||
style="width: 170rpx;height: 170rpx;border-radius: 20rpx;" :src="item.images[0]"
|
style="width: 170rpx;height: 170rpx;border-radius: 20rpx;" :src="item.images[0]"
|
||||||
mode=""></image>
|
mode=""></image>
|
||||||
<image v-else style="width: 170rpx;height: 170rpx;border-radius: 20rpx;"
|
<image v-else style="width: 170rpx;height: 170rpx;border-radius: 20rpx;"
|
||||||
src="https://naweigetetest2.hschool.com.cn/miniapp/invoice/draftImgNo.png" mode=""></image>
|
src="https://naweigetetest2.hschool.com.cn/miniapp/invoice/draftImgNo.png"
|
||||||
|
mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-con">
|
<view class="item-con">
|
||||||
<view class="itenCon-actName" style="">{{item.title}}</view>
|
<view class="itenCon-actName" style="">{{item.title !='' ? item.title:'描述待补充' }}
|
||||||
<view class="itenCon-actCon" style="">{{item.content}}</view>
|
</view>
|
||||||
|
<view class="itenCon-actCon" style="">
|
||||||
|
{{item.content != '' ? item.content:'快来添加活动内容吧'}}
|
||||||
|
</view>
|
||||||
<view class="itenCon-actPrice" style="">保存时间: {{item.updatetime_text}}</view>
|
<view class="itenCon-actPrice" style="">保存时间: {{item.updatetime_text}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-draftBtns">
|
<view class="item-draftBtns">
|
||||||
<view class="part flex justify-center align-items" style="margin-right: 20rpx;" @click.stop="toEditDraft(item.id)">
|
<view class="part flex justify-center align-items" style="margin-right: 20rpx;"
|
||||||
|
@click.stop="toEditDraft(item.id)">
|
||||||
编辑
|
编辑
|
||||||
</view>
|
</view>
|
||||||
<view class="part flex justify-center align-items" @click.stop="toDeleteDraft(item.id)">
|
<view class="part flex justify-center align-items" @click.stop="toDeleteDraft(item.id)">
|
||||||
@ -143,7 +148,7 @@
|
|||||||
<view
|
<view
|
||||||
style="display: flex;align-items: center;justify-content: flex-end;gap: 20rpx;width: 96%;margin-bottom: 30rpx;"
|
style="display: flex;align-items: center;justify-content: flex-end;gap: 20rpx;width: 96%;margin-bottom: 30rpx;"
|
||||||
v-if="item.auth_status == 0">
|
v-if="item.auth_status == 0">
|
||||||
<view class="part flex justify-center align-items" v-if="item.auth_status == 0 "
|
<view class="part1 flex justify-center align-items" v-if="item.auth_status == 0 "
|
||||||
@click.stop="editItem(item.id)"> 修改 </view>
|
@click.stop="editItem(item.id)"> 修改 </view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view
|
<!-- <view
|
||||||
@ -192,10 +197,11 @@
|
|||||||
<view v-if="item.status == 3 || item.status == 4"
|
<view v-if="item.status == 3 || item.status == 4"
|
||||||
class="part1 flex justify-center align-items" @click.stop="toHexiao"> 核销
|
class="part1 flex justify-center align-items" @click.stop="toHexiao"> 核销
|
||||||
</view>
|
</view>
|
||||||
<view class="part flex justify-center align-items"
|
<view class="part flex justify-center align-items" v-if="item.auth_status == 0"
|
||||||
v-if="item.auth_status == 0 || item.status == 1"
|
|
||||||
@click.stop="editItem(item.id)"> 修改 </view>
|
@click.stop="editItem(item.id)"> 修改 </view>
|
||||||
<view class="part flex justify-center align-items"
|
<view class="part1 flex justify-center align-items" v-if="item.status == 1"
|
||||||
|
@click.stop="editItem(item.id)"> 修改 </view>
|
||||||
|
<view class="part1 flex justify-center align-items"
|
||||||
v-if="item.status == -1 && item.auth_status == 1"
|
v-if="item.status == -1 && item.auth_status == 1"
|
||||||
@click.stop="copyNewItem(item.id)"> 重发 </view>
|
@click.stop="copyNewItem(item.id)"> 重发 </view>
|
||||||
<view class="part flex justify-center align-items"
|
<view class="part flex justify-center align-items"
|
||||||
@ -220,10 +226,10 @@
|
|||||||
v-if="item.auth_status == 2 && item.status == -1">
|
v-if="item.auth_status == 2 && item.status == -1">
|
||||||
<view class="part1 flex justify-center align-items"
|
<view class="part1 flex justify-center align-items"
|
||||||
v-if="item.auth_status == 2 && item.status == -1"
|
v-if="item.auth_status == 2 && item.status == -1"
|
||||||
@click.stop="cancelsOpen(item.id)"> 取消 </view>
|
@click.stop="cancelsOpen(item.id)"> 删除 </view>
|
||||||
<view class="part flex justify-center align-items"
|
<view class="part flex justify-center align-items"
|
||||||
v-if="item.auth_status == 2 && item.status == -1"
|
v-if="item.auth_status == 2 && item.status == -1"
|
||||||
@click.stop="copyItem(item.id)"> 编辑 </view>
|
@click.stop="copyItem(item.id)"> 重发 </view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="status == -2" @click.stop="detail(item.activity_id)">
|
<view v-if="status == -2" @click.stop="detail(item.activity_id)">
|
||||||
@ -347,17 +353,17 @@
|
|||||||
@close="cancelsClose" @open="cancelsOpen" :safeAreaInsetBottom="false" :closeable="false">
|
@close="cancelsClose" @open="cancelsOpen" :safeAreaInsetBottom="false" :closeable="false">
|
||||||
<view class="popupBox flex justify-start align-items flex-column">
|
<view class="popupBox flex justify-start align-items flex-column">
|
||||||
<view class="pop-header flex align-items flex-column flex-start">
|
<view class="pop-header flex align-items flex-column flex-start">
|
||||||
<span class="name white-space">是否确认取消活动</span>
|
<span class="name white-space">是否确认删除活动</span>
|
||||||
<span class="price">
|
<span class="price">
|
||||||
取消活动即删除活动后,若再次举办活动,需重新设置活动内容,并提交平台审核
|
删除活动后,若再次举办活动,需重新设置活动内容,并提交平台审核
|
||||||
</span>
|
</span>
|
||||||
<!-- <image src="../../static/center/buy.png" mode="" style="width: 168rpx; height: 48rpx;">
|
<!-- <image src="../../static/center/buy.png" mode="" style="width: 168rpx; height: 48rpx;">
|
||||||
</image> -->
|
</image> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="popup-footer flex ">
|
<view class="popup-footer flex ">
|
||||||
<span @click="cancelsClose" class="span1">关闭</span>
|
<span @click="cancelsClose" class="span1">取消</span>
|
||||||
<span @click="deleteItem()">确认取消</span>
|
<span @click="deleteItem()">确认删除</span>
|
||||||
<!-- <image src="../../static/center/price.png" mode="" style="width: 642rpx;height: 80rpx;"></image> -->
|
<!-- <image src="../../static/center/price.png" mode="" style="width: 642rpx;height: 80rpx;"></image> -->
|
||||||
<!-- <u-loading-icon :vertical="true" v-if="uloadingShow"></u-loading-icon> -->
|
<!-- <u-loading-icon :vertical="true" v-if="uloadingShow"></u-loading-icon> -->
|
||||||
</view>
|
</view>
|
||||||
@ -482,6 +488,8 @@
|
|||||||
// this.getHotList(this.selected);
|
// this.getHotList(this.selected);
|
||||||
if (this.status == -2) {
|
if (this.status == -2) {
|
||||||
this.getAfterList();
|
this.getAfterList();
|
||||||
|
} else if (this.status == 15) {
|
||||||
|
this.getDraftList('15')
|
||||||
} else {
|
} else {
|
||||||
this.getHotList(this.selected);
|
this.getHotList(this.selected);
|
||||||
}
|
}
|
||||||
@ -541,6 +549,7 @@
|
|||||||
// url:"/pages/center/index?id=" + id,
|
// url:"/pages/center/index?id=" + id,
|
||||||
// })//跳转tabbar页面的
|
// })//跳转tabbar页面的
|
||||||
},
|
},
|
||||||
|
//重发活动
|
||||||
copyNewItem(id) {
|
copyNewItem(id) {
|
||||||
const type = 2
|
const type = 2
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -655,8 +664,12 @@
|
|||||||
console.log('跳转接口', val, this.auth_status);
|
console.log('跳转接口', val, this.auth_status);
|
||||||
var auth_status = '';
|
var auth_status = '';
|
||||||
if (val == 0) {
|
if (val == 0) {
|
||||||
// val = '1,2,3,4,5,-1';
|
if (this.auth_status == 0) {
|
||||||
val = '1,2,3,4,5';
|
val = '1,2,3,4,5';
|
||||||
|
} else {
|
||||||
|
val = '1,2,3,4,5,-1';
|
||||||
|
}
|
||||||
|
// val = '1,2,3,4,5';
|
||||||
auth_status = this.auth_status;
|
auth_status = this.auth_status;
|
||||||
console.log('val==0', this.auth_status);
|
console.log('val==0', this.auth_status);
|
||||||
} else {
|
} else {
|
||||||
@ -886,8 +899,9 @@
|
|||||||
console.log('draft1', res.data.list);
|
console.log('draft1', res.data.list);
|
||||||
this.draftList = res.data.list.data;
|
this.draftList = res.data.list.data;
|
||||||
console.log('draft', this.draftList);
|
console.log('draft', this.draftList);
|
||||||
for(let i = 0;i<this.draftList.length;i++) {
|
for (let i = 0; i < this.draftList.length; i++) {
|
||||||
this.draftList[i].createTime = dayjs.unix(this.draftList[i].createtime).format('YYYY-MM-DD HH:mm')
|
this.draftList[i].createTime = dayjs.unix(this.draftList[i].createtime).format(
|
||||||
|
'YYYY-MM-DD HH:mm')
|
||||||
}
|
}
|
||||||
if (this.draftList.length >= res.data.count) {
|
if (this.draftList.length >= res.data.count) {
|
||||||
this.loadStatus = "nomore";
|
this.loadStatus = "nomore";
|
||||||
@ -913,7 +927,7 @@
|
|||||||
console.log('编辑草稿');
|
console.log('编辑草稿');
|
||||||
const type = 3
|
const type = 3
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/packageB/editAct?draftId=' + id + '&type=' + type
|
url: '/packageB/editDraft?draftId=' + id + '&type=' + type
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toDeleteDraft(id) {
|
toDeleteDraft(id) {
|
||||||
@ -1379,13 +1393,19 @@
|
|||||||
// position: absolute;
|
// position: absolute;
|
||||||
// top: 0;
|
// top: 0;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 400;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itenCon-actCon {
|
.itenCon-actCon {
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// top: 50rpx;
|
// top: 50rpx;
|
||||||
// margin-top: 60rpx;
|
// margin-top: 60rpx;
|
||||||
|
width: 400rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
/* 禁止换行 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 隐藏超出部分 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
@ -1393,6 +1413,7 @@
|
|||||||
.itenCon-actPrice {
|
.itenCon-actPrice {
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// bottom: 0;
|
// bottom: 0;
|
||||||
|
color: #9c9c9c;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
@ -1582,6 +1603,7 @@
|
|||||||
|
|
||||||
.bottom {
|
.bottom {
|
||||||
margin: 0rpx 0rpx 30rpx 10rpx;
|
margin: 0rpx 0rpx 30rpx 10rpx;
|
||||||
|
// margin: 0rpx 0rpx 0rpx 10rpx;
|
||||||
|
|
||||||
.number {
|
.number {
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
@ -1686,7 +1708,7 @@
|
|||||||
width: 288rpx;
|
width: 288rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
font-family: PingFang SC Bold, PingFang SC Bold;
|
font-family: PingFang SC Bold, PingFang SC Bold;
|
||||||
font-weight: 600;
|
font-weight: 800;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #202020;
|
color: #202020;
|
||||||
line-height: 36rpx;
|
line-height: 36rpx;
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="first flex flex-column align-items justify-start" style="margin-top: 20rpx;">
|
<view class="first flex flex-column align-items justify-start" style="margin-top: 20rpx;">
|
||||||
<view class="row flex align-items" style="margin: 25rpx 0;">
|
<view class="row flex align-items" style="margin-top: 25rpx;">
|
||||||
<span class="label flex align-items ">
|
<span class="label flex align-items ">
|
||||||
<span style="color: #3D3D3D;">*</span>
|
<span style="color: #3D3D3D;">*</span>
|
||||||
报名时间
|
报名时间
|
||||||
@ -162,7 +162,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</view>
|
</view>
|
||||||
<span class="line-row"></span>
|
<span class="line-row"></span>
|
||||||
<view class="row flex align-items" style="margin-top: 25rpx;">
|
<view class="row flex align-items" style="margin-top: 25rpx;margin-bottom: 20rpx;">
|
||||||
<view class="label flex align-items ">
|
<view class="label flex align-items ">
|
||||||
<span style="color: #3D3D3D;">*</span>
|
<span style="color: #3D3D3D;">*</span>
|
||||||
活动价格
|
活动价格
|
||||||
@ -197,8 +197,8 @@
|
|||||||
@clickOne="protocolClick"></cc-protocolBox>
|
@clickOne="protocolClick"></cc-protocolBox>
|
||||||
</view>
|
</view>
|
||||||
<view class="btns">
|
<view class="btns">
|
||||||
<view class="saveDraft" @click="editDraft()">存草稿</view>
|
<view class="saveDraft" v-if="isFormValid" @click="addDraft()">存草稿</view>
|
||||||
<!-- <view class="draftBox">草稿箱</view> -->
|
<view class="draftBox" v-if="!isFormValid">草稿箱</view>
|
||||||
<view class="submitPublish" @click="apply()">确认发布</view>
|
<view class="submitPublish" @click="apply()">确认发布</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <span class="flex align-items justify-center" @click="apply()" v-if="agreeAdd == true">确认发布</span>
|
<!-- <span class="flex align-items justify-center" @click="apply()" v-if="agreeAdd == true">确认发布</span>
|
||||||
@ -428,6 +428,34 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
|
<!-- 保存草稿箱弹框 -->
|
||||||
|
<u-popup :show="baoDraftShow" mode="center" :round="10" :zIndex="99999" :custom-style="{
|
||||||
|
width: '600rpx',
|
||||||
|
padding: '24rpx 24rpx 20rpx 24rpx',
|
||||||
|
margin: '0 auto',
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'start',
|
||||||
|
alignItems: 'center',
|
||||||
|
flexColumn: 'column'
|
||||||
|
}"
|
||||||
|
@close="baoDraftClose" @open="baoDraftOpen" :safeAreaInsetBottom="false" :closeable="false">
|
||||||
|
<view style="text-align: center;margin-top: 30rpx;">
|
||||||
|
<image src="/static/fabu/renzheng.png" style="width: 140rpx;height: 140rpx;"></image>
|
||||||
|
</view>
|
||||||
|
<view style="font-size: 36rpx;color: #3D3D3D;margin-top: 30rpx;font-weight: 600;">草稿保存成功</view>
|
||||||
|
<view
|
||||||
|
style="padding: 40rpx 20rpx 10rpx 20rpx;;font-weight: 400;color: #3D3D3D;text-align: center;line-height: 44rpx;font-size: 28rpx;">
|
||||||
|
已存至「我的-我发布的」中
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
style="gap: 20px;width: 100%;display: flex;justify-content: center;align-items: center;padding-bottom: 30rpx;">
|
||||||
|
<view class="btn_2" @click="baoDraftShow = false">知道了</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<!-- <tab-bar :tabBarShow="2"></tab-bar> -->
|
<!-- <tab-bar :tabBarShow="2"></tab-bar> -->
|
||||||
</view>
|
</view>
|
||||||
@ -595,6 +623,7 @@
|
|||||||
birth1: dayjs().add(8, 'hour').valueOf(), //报名结束日期
|
birth1: dayjs().add(8, 'hour').valueOf(), //报名结束日期
|
||||||
},
|
},
|
||||||
draftId:null,
|
draftId:null,
|
||||||
|
baoDraftShow:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@ -602,17 +631,19 @@
|
|||||||
this.id = options.id
|
this.id = options.id
|
||||||
this.original_activity_id = options.original_activity_id
|
this.original_activity_id = options.original_activity_id
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
this.draftId = options.draftId
|
|
||||||
console.log('this.id', this.id);
|
console.log('this.id', this.id);
|
||||||
console.log('this.original_activity_id ', this.original_activity_id);
|
console.log('this.original_activity_id ', this.original_activity_id);
|
||||||
console.log('this.type', this.type);
|
console.log('this.type', this.type);
|
||||||
if (this.id || this.original_activity_id) {
|
if (this.id) {
|
||||||
this.agree = true
|
this.agree = true
|
||||||
|
this.isFormValid = true
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
}
|
}
|
||||||
if(this.draftId) {
|
if(this.original_activity_id){
|
||||||
this.getDraftDetail()
|
this.agree = true
|
||||||
|
this.isFormValid = false
|
||||||
|
this.getDetail()
|
||||||
}
|
}
|
||||||
// if(options.original_activity_id) {
|
// if(options.original_activity_id) {
|
||||||
// this.original_activity_id = options.original_activity_id
|
// this.original_activity_id = options.original_activity_id
|
||||||
@ -1699,47 +1730,67 @@
|
|||||||
address_detail: this.form.address_detail,
|
address_detail: this.form.address_detail,
|
||||||
image: this.qunQrcode
|
image: this.qunQrcode
|
||||||
}
|
}
|
||||||
|
if (typeof params.image === 'object' && params.image.url) {
|
||||||
|
params.image = params.image.url; // 如果是对象,取 url 字段
|
||||||
|
}
|
||||||
|
// 转换为相对路径
|
||||||
|
params.image = params.image.replace(/^https?:\/\/[^/]+/, '');
|
||||||
|
console.log('params', params.image);
|
||||||
|
|
||||||
console.log('草稿1');
|
console.log('草稿1');
|
||||||
|
for (let i = 0; i < params.images.length; i++) {
|
||||||
|
if (/^https?:\/\//i.test(params.images[i])) {
|
||||||
|
params.images[i] = params.images[i].replace(/^https?:\/\/[^/]+/, '');
|
||||||
|
console.log('params.images[i].url', params.images[i]);
|
||||||
|
} else {
|
||||||
|
params.images[i] = params.images[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log('params.images排查数组的url的路径', params.images);
|
||||||
|
params.images = params.images.join(',');
|
||||||
uni.$u.http.post(url, params).then(res => {
|
uni.$u.http.post(url, params).then(res => {
|
||||||
console.log('草稿2');
|
console.log('草稿2');
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
|
this.baoDraftShow = true
|
||||||
//置空
|
//置空
|
||||||
this.fileList1 = [];
|
// this.fileList1 = [];
|
||||||
this.agree = false;
|
// this.agree = false;
|
||||||
this.list1 = '';
|
// this.list1 = '';
|
||||||
this.list = [];
|
// this.list = [];
|
||||||
this.price = '';
|
// this.price = '';
|
||||||
this.priceName = '免费';
|
// this.priceName = '免费';
|
||||||
this.qunQrcode = '';
|
// this.qunQrcode = '';
|
||||||
this.form = {
|
// this.form = {
|
||||||
|
|
||||||
cate_ids: '',
|
// cate_ids: '',
|
||||||
// 活动分类名字
|
// // 活动分类名字
|
||||||
cate_idsName: "",
|
// cate_idsName: "",
|
||||||
content: '',
|
// content: '',
|
||||||
refund_id: '',
|
// refund_id: '',
|
||||||
refund_idn: '',
|
// refund_idn: '',
|
||||||
price: 1,
|
// price: 1,
|
||||||
stock: '',
|
// stock: '',
|
||||||
sign_time: '',
|
// sign_time: '',
|
||||||
time: '',
|
// time: '',
|
||||||
images: '',
|
// images: '',
|
||||||
title: '',
|
// title: '',
|
||||||
address: '',
|
// address: '',
|
||||||
latitude: '',
|
// latitude: '',
|
||||||
longitude: '',
|
// longitude: '',
|
||||||
address_detail: '', //详细位置
|
// address_detail: '', //详细位置
|
||||||
date: '', //活动开始时间
|
// date: '', //活动开始时间
|
||||||
date1: '', //活动结束时间
|
// date1: '', //活动结束时间
|
||||||
birth: '', //报名开始日期
|
// birth: '', //报名开始日期
|
||||||
birth1: '', //报名结束日期
|
// birth1: '', //报名结束日期
|
||||||
}
|
// }
|
||||||
|
|
||||||
uni.showToast({
|
|
||||||
title: '添加成功!',
|
|
||||||
icon: 'none',
|
// uni.showToast({
|
||||||
duration: 2000,
|
// title: '存草稿成功!',
|
||||||
});
|
// icon: 'none',
|
||||||
|
// duration: 2000,
|
||||||
|
// });
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url: "/packageA/my/orderList"
|
// url: "/packageA/my/orderList"
|
||||||
@ -1806,7 +1857,7 @@
|
|||||||
},
|
},
|
||||||
editDraft() {
|
editDraft() {
|
||||||
console.log('草稿');
|
console.log('草稿');
|
||||||
let url = '/api/school.newactivity.activity_drafts/add';
|
let url = '/api/school.newactivity.activity_drafts/edit';
|
||||||
let params = {};
|
let params = {};
|
||||||
let hdtime = ''
|
let hdtime = ''
|
||||||
let bmtime = ''
|
let bmtime = ''
|
||||||
@ -1820,6 +1871,7 @@
|
|||||||
// let hdtime = this.times_b_int + ' - ' + this.times_e_int;
|
// let hdtime = this.times_b_int + ' - ' + this.times_e_int;
|
||||||
// let bmtime = this.times_sinb_int + ' - ' + this.times_sine_int;
|
// let bmtime = this.times_sinb_int + ' - ' + this.times_sine_int;
|
||||||
params = {
|
params = {
|
||||||
|
ids: this.draftId,
|
||||||
title: this.form.title,
|
title: this.form.title,
|
||||||
cate_ids: this.form.cate_ids,
|
cate_ids: this.form.cate_ids,
|
||||||
content: this.form.content,
|
content: this.form.content,
|
||||||
@ -1840,6 +1892,7 @@
|
|||||||
uni.$u.http.post(url, params).then(res => {
|
uni.$u.http.post(url, params).then(res => {
|
||||||
console.log('草稿2');
|
console.log('草稿2');
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
|
this.baoDraftShow = true
|
||||||
//置空
|
//置空
|
||||||
this.fileList1 = [];
|
this.fileList1 = [];
|
||||||
this.agree = false;
|
this.agree = false;
|
||||||
@ -1873,16 +1926,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '编辑保存成功!',
|
title: '编辑草稿保存成功!',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000,
|
duration: 2000,
|
||||||
});
|
});
|
||||||
|
// uni.navigateBack()
|
||||||
|
setTimeout(function() {
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: "/packageA/my/orderList"
|
||||||
|
// })
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
// setTimeout(function() {
|
}, 1000);
|
||||||
// // uni.navigateTo({
|
|
||||||
// // url: "/packageA/my/orderList"
|
|
||||||
// // })
|
|
||||||
// }, 1000);
|
|
||||||
} else {
|
} else {
|
||||||
this.$u.toast(res.msg);
|
this.$u.toast(res.msg);
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
@ -2500,6 +2554,25 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.draftBox {
|
||||||
|
width: 235rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
position: relative;
|
||||||
|
top: 10rpx;
|
||||||
|
border: 2rpx solid #323232;
|
||||||
|
background-color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
color: #323232;
|
||||||
|
font-family: YouSheBiaoTiHei;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
.submitPublish {
|
.submitPublish {
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
width: 435rpx;
|
width: 435rpx;
|
||||||
@ -2835,12 +2908,18 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 400;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itenCon-actCon {
|
.itenCon-actCon {
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// top: 100rpx;
|
// top: 100rpx;
|
||||||
|
width: 400rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
/* 禁止换行 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 隐藏超出部分 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
margin-top: 60rpx;
|
margin-top: 60rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@ -2889,13 +2968,19 @@
|
|||||||
// position: absolute;
|
// position: absolute;
|
||||||
// top: 0;
|
// top: 0;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 400;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itenCon-actCon {
|
.itenCon-actCon {
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// top: 100rpx;
|
// top: 100rpx;
|
||||||
// margin-top: 60rpx;
|
// margin-top: 60rpx;
|
||||||
|
width: 400rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
/* 禁止换行 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 隐藏超出部分 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
2919
packageB/editDraft.vue
Normal file
2919
packageB/editDraft.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -359,6 +359,12 @@
|
|||||||
"navigationBarTitleText": "编辑活动信息"
|
"navigationBarTitleText": "编辑活动信息"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "editDraft",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "编辑草稿箱"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "invoice/invoiceCenter",
|
"path": "invoice/invoiceCenter",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="first flex flex-column align-items justify-start" style="margin-top: 20rpx;">
|
<view class="first flex flex-column align-items justify-start" style="margin-top: 20rpx;">
|
||||||
<view class="row flex align-items" style="margin: 25rpx 0;">
|
<view class="row flex align-items" style="margin-top: 25rpx;">
|
||||||
<span class="label flex align-items ">
|
<span class="label flex align-items ">
|
||||||
<span style="color: #3D3D3D;">*</span>
|
<span style="color: #3D3D3D;">*</span>
|
||||||
报名时间
|
报名时间
|
||||||
@ -336,7 +336,7 @@
|
|||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
<!-- 活动时间 -->
|
<!-- 活动时间 -->
|
||||||
<u-popup :show="dateShow" mode="bottom" round="20"
|
<u-popup :show="dateShow" mode="bottom" round="20" @open="dateShowHidden()"
|
||||||
:customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false"
|
:customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false"
|
||||||
@close="dateShow = false" :closeOnClickOverlay="false">
|
@close="dateShow = false" :closeOnClickOverlay="false">
|
||||||
<view style="display: flex;justify-content: space-between;align-items: center;padding: 30rpx;">
|
<view style="display: flex;justify-content: space-between;align-items: center;padding: 30rpx;">
|
||||||
@ -348,7 +348,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view style="height: 1px;background-color: #EEEEEE;width: 100%;"></view>
|
<view style="height: 1px;background-color: #EEEEEE;width: 100%;"></view>
|
||||||
<view style="height: 700rpx;">
|
<view style="height: 700rpx;">
|
||||||
<long-date v-if="dateShow" chooseNum="90" @select="datefirm($event, hdIndex)"></long-date>
|
<long-date v-if="dateShow" chooseNum="90"
|
||||||
|
@select="datefirm($event, hdIndex)"></long-date>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
@ -365,9 +366,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<view style="height: 1px;background-color: #EEEEEE;width: 100%;"></view>
|
<view style="height: 1px;background-color: #EEEEEE;width: 100%;"></view>
|
||||||
<view style="height: 700rpx;">
|
<view style="height: 700rpx;">
|
||||||
<long-date v-if="birthShow" chooseNum="90" @select="birthConfirm($event, bmIndex)"></long-date>
|
<long-date v-if="birthShow" chooseNum="90"
|
||||||
|
@select="birthConfirm($event, bmIndex)"></long-date>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
<!-- 价格 -->
|
||||||
<u-popup :show="priceShow" :round="20" :closeable="false" mode="bottom" @close="priceShow = false;">
|
<u-popup :show="priceShow" :round="20" :closeable="false" mode="bottom" @close="priceShow = false;">
|
||||||
<view style="display: flex;justify-content: space-between;align-items: center;padding: 0px 40rpx;">
|
<view style="display: flex;justify-content: space-between;align-items: center;padding: 0px 40rpx;">
|
||||||
<view style="color: #9C9C9C;font-size: 28rpx;" @click="priceShow = false">取消</view>
|
<view style="color: #9C9C9C;font-size: 28rpx;" @click="priceShow = false">取消</view>
|
||||||
@ -409,32 +412,71 @@
|
|||||||
:custom-style="popupStyletkDraft">
|
:custom-style="popupStyletkDraft">
|
||||||
<view class="popup_tkallDraft">
|
<view class="popup_tkallDraft">
|
||||||
<view class="popup_tkDraft" style="display: flex;justify-content: center;">
|
<view class="popup_tkDraft" style="display: flex;justify-content: center;">
|
||||||
<view style="font-weight: 400;font-size: 28rpx;margin-right: 220rpx;">取消</view>
|
<view style="font-weight: 400;font-size: 28rpx;margin-right: 220rpx;" @click="closeDraftShow()">取消</view>
|
||||||
<view style="font-weight: 800;">草稿箱</view>
|
<view style="font-weight: 800;">草稿箱</view>
|
||||||
<view style="font-weight: 400;font-size: 28rpx;margin-left: 220rpx;"
|
<view style="font-weight: 400;font-size: 28rpx;margin-left: 220rpx;" @click="selectSureDraft()">
|
||||||
@click="selectSureDraft()">确定</view>
|
确定</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y="true" class="popup-content">
|
<scroll-view scroll-y="true" class="popup-content">
|
||||||
<view class="invoiceList" v-for="(item,index) in draftList" :key="index">
|
<view class="invoiceList" v-for="(item,index) in draftList" :key="index">
|
||||||
<view :class="(draftSelectIndex === index ) ? 'invoiceList-itemSelect':'invoiceList-item'" @click="selectDraft(item,index)">
|
<view :class="(draftSelectIndex === index ) ? 'invoiceList-itemSelect':'invoiceList-item'"
|
||||||
<view class="item-img" style="margin-right: 40rpx;position: relative;right: 6rpx;">
|
@click="selectDraft(item,index)">
|
||||||
<image v-if="item.images.length > 0" style="width: 170rpx;height: 170rpx;border-radius: 20rpx;"
|
<view class="item-img">
|
||||||
:src="item.images[0]" mode=""></image>
|
<image v-if="item.images.length > 0"
|
||||||
|
style="width: 170rpx;height: 170rpx;border-radius: 20rpx;" :src="item.images[0]"
|
||||||
|
mode=""></image>
|
||||||
<image v-else style="width: 170rpx;height: 170rpx;border-radius: 20rpx;"
|
<image v-else style="width: 170rpx;height: 170rpx;border-radius: 20rpx;"
|
||||||
src="https://naweigetetest2.hschool.com.cn/miniapp/invoice/draftImgNo.png" mode=""></image>
|
src="https://naweigetetest2.hschool.com.cn/miniapp/invoice/draftImgNo.png"
|
||||||
|
mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-con" style="">
|
<view class="item-con" style="">
|
||||||
<view class="itenCon-actName" style="">{{item.title}}</view>
|
<view class="itenCon-actName" style="">{{item.title !='' ? item.title:'描述待补充' }}
|
||||||
<view class="itenCon-actCon" style="">{{item.content}}</view>
|
</view>
|
||||||
|
<view class="itenCon-actCon" style="">
|
||||||
|
{{item.content != '' ? item.content:'快来添加活动内容吧'}}
|
||||||
|
</view>
|
||||||
<view class="itenCon-actPrice" style="">保存时间: {{item.updatetime_text}}</view>
|
<view class="itenCon-actPrice" style="">保存时间: {{item.updatetime_text}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="bottom_box flex justify-center align-items" style="height: 780rpx;width: 100%;"
|
||||||
|
v-if="draftList.length == 0">
|
||||||
|
<view style="text-align: center;">
|
||||||
|
<image src="/static/no.png" style="width: 150rpx;height: 150rpx;"></image>
|
||||||
|
<view>暂无数据</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
|
<!-- 保存草稿箱弹框 -->
|
||||||
|
<u-popup :show="baoDraftShow" mode="center" :round="10" :zIndex="99999" :custom-style="{
|
||||||
|
width: '600rpx',
|
||||||
|
padding: '24rpx 24rpx 20rpx 24rpx',
|
||||||
|
margin: '0 auto',
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'start',
|
||||||
|
alignItems: 'center',
|
||||||
|
flexColumn: 'column'
|
||||||
|
}"
|
||||||
|
@close="baoDraftClose" @open="baoDraftOpen" :safeAreaInsetBottom="false" :closeable="false">
|
||||||
|
<view style="text-align: center;margin-top: 30rpx;">
|
||||||
|
<image src="/static/fabu/renzheng.png" style="width: 140rpx;height: 140rpx;"></image>
|
||||||
|
</view>
|
||||||
|
<view style="font-size: 36rpx;color: #3D3D3D;margin-top: 30rpx;font-weight: 600;">草稿保存成功</view>
|
||||||
|
<view
|
||||||
|
style="padding: 40rpx 20rpx 10rpx 20rpx;;font-weight: 400;color: #3D3D3D;text-align: center;line-height: 44rpx;font-size: 28rpx;">
|
||||||
|
已存至「我的-我发布的」中
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
style="gap: 20px;width: 100%;display: flex;justify-content: center;align-items: center;padding-bottom: 30rpx;">
|
||||||
|
<view class="btn_2" @click="baoDraftShow = false">知道了</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<tab-bar :tabBarShow="2"></tab-bar>
|
<tab-bar :tabBarShow="2"></tab-bar>
|
||||||
</view>
|
</view>
|
||||||
@ -595,7 +637,11 @@
|
|||||||
date1: dayjs().add(8, 'hour').valueOf(), //活动结束时间
|
date1: dayjs().add(8, 'hour').valueOf(), //活动结束时间
|
||||||
birth: dayjs().add(4, 'hour').valueOf(), //报名开始日期
|
birth: dayjs().add(4, 'hour').valueOf(), //报名开始日期
|
||||||
birth1: dayjs().add(8, 'hour').valueOf(), //报名结束日期
|
birth1: dayjs().add(8, 'hour').valueOf(), //报名结束日期
|
||||||
}
|
},
|
||||||
|
draftId: null,
|
||||||
|
defaultTime: null,
|
||||||
|
draftType: 0,
|
||||||
|
baoDraftShow: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -608,7 +654,7 @@
|
|||||||
this.getrefund_list();
|
this.getrefund_list();
|
||||||
this.getitembq();
|
this.getitembq();
|
||||||
this.selectItemTuikuan();
|
this.selectItemTuikuan();
|
||||||
this.getDraftList();
|
this.getDraftList('15');
|
||||||
//var c=uni.getSystemInfoSync();
|
//var c=uni.getSystemInfoSync();
|
||||||
//844-94-70-100 = 580
|
//844-94-70-100 = 580
|
||||||
//763-47-(100-47)-34-50
|
//763-47-(100-47)-34-50
|
||||||
@ -617,8 +663,10 @@
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
|
this.isFormValid = false
|
||||||
this.getCardInfo();
|
this.getCardInfo();
|
||||||
this.getDraftList();
|
this.getDraftList();
|
||||||
|
// this.checkFormValidity();
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// form: {
|
// form: {
|
||||||
@ -629,12 +677,12 @@
|
|||||||
// immediate: true
|
// immediate: true
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// 'form.title'(newVal) {
|
'form.title'(newVal) {
|
||||||
// this.isFormValid = newVal.length > 0 || this.form.content.length > 0;
|
this.isFormValid = newVal.length > 0 || this.form.content.length > 0;
|
||||||
// },
|
},
|
||||||
// 'form.content'(newVal) {
|
'form.content'(newVal) {
|
||||||
// this.isFormValid = this.form.title.length > 0 || newVal.length > 0;
|
this.isFormValid = this.form.title.length > 0 || newVal.length > 0;
|
||||||
// }
|
}
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
formatTimestamp(value) {
|
formatTimestamp(value) {
|
||||||
@ -883,23 +931,24 @@
|
|||||||
return now;
|
return now;
|
||||||
},
|
},
|
||||||
dateShowHidden() {
|
dateShowHidden() {
|
||||||
|
console.log('活动时间');
|
||||||
this.hdIndex = 1;
|
this.hdIndex = 1;
|
||||||
this.dateShow = true;
|
this.dateShow = true;
|
||||||
// 获取当前时间加8小时
|
// 计算当前时间加8小时
|
||||||
const defaultTime = this.getCurrentTimePlus8Hours();
|
const defaultTime = new Date();
|
||||||
// 这里假设long-date组件有一个setDefaultTime方法来设置默认时间
|
//defaultTime.setHours(defaultTime.getHours() + 8);
|
||||||
this.$nextTick(() => {
|
console.log('活动时间defaultTime',defaultTime);
|
||||||
this.$refs.longDate.setDefaultTime(defaultTime);
|
this.defaultTime = defaultTime;
|
||||||
});
|
|
||||||
},
|
},
|
||||||
birthShowHidden() {
|
birthShowHidden() {
|
||||||
|
console.log('报名时间');
|
||||||
this.bmIndex = 1;
|
this.bmIndex = 1;
|
||||||
this.birthShow = true;
|
this.birthShow = true;
|
||||||
// 获取当前时间加8小时
|
// 计算当前时间加8小时
|
||||||
const defaultTime = this.getCurrentTimePlus8Hours();
|
const defaultTime = new Date();
|
||||||
this.$nextTick(() => {
|
//defaultTime.setHours(defaultTime.getHours() + 8);
|
||||||
this.$refs.birthDate.setDefaultTime(defaultTime);
|
console.log('报名时间defaultTime',defaultTime);
|
||||||
});
|
this.defaultTime = defaultTime;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 活动开始时间
|
// 活动开始时间
|
||||||
@ -927,8 +976,11 @@
|
|||||||
hdnext() {
|
hdnext() {
|
||||||
//获取当前时间
|
//获取当前时间
|
||||||
const currentTime = dayjs().format('YYYY-MM-DD HH');
|
const currentTime = dayjs().format('YYYY-MM-DD HH');
|
||||||
|
// const currentTime = this.getCurrentTimePlus8Hours();
|
||||||
var b = currentTime + ':00';
|
var b = currentTime + ':00';
|
||||||
|
console.log('b', b);
|
||||||
if (this.times_b == '' || this.times_b == null) {
|
if (this.times_b == '' || this.times_b == null) {
|
||||||
|
console.log('判断是否this.times_b小于当前时间 用的是年月日而不是时间戳');
|
||||||
//判断是否this.times_b小于当前时间 用的是年月日而不是时间戳
|
//判断是否this.times_b小于当前时间 用的是年月日而不是时间戳
|
||||||
if (this.isBeforeNow(b)) {
|
if (this.isBeforeNow(b)) {
|
||||||
uni.$u.toast('活动开始时间不能小于当前时间');
|
uni.$u.toast('活动开始时间不能小于当前时间');
|
||||||
@ -936,6 +988,7 @@
|
|||||||
}
|
}
|
||||||
this.times_b = b;
|
this.times_b = b;
|
||||||
} else {
|
} else {
|
||||||
|
console.log('判断是否this.times_b小于当前时间 用的是年月日而不是时间戳');
|
||||||
if (this.isBeforeNow(this.times_b)) {
|
if (this.isBeforeNow(this.times_b)) {
|
||||||
uni.$u.toast('活动开始时间不能小于当前时间');
|
uni.$u.toast('活动开始时间不能小于当前时间');
|
||||||
return;
|
return;
|
||||||
@ -1388,8 +1441,9 @@
|
|||||||
this.count = res.data.count;
|
this.count = res.data.count;
|
||||||
console.log('getDraft', res.data.list);
|
console.log('getDraft', res.data.list);
|
||||||
this.draftList = res.data.list.data;
|
this.draftList = res.data.list.data;
|
||||||
for(let i = 0;i<this.draftList.length;i++) {
|
for (let i = 0; i < this.draftList.length; i++) {
|
||||||
this.draftList[i].createTime = dayjs.unix(this.draftList[i].createtime).format('YYYY-MM-DD HH:mm')
|
this.draftList[i].createTime = dayjs.unix(this.draftList[i].createtime).format(
|
||||||
|
'YYYY-MM-DD HH:mm')
|
||||||
}
|
}
|
||||||
if (this.draftList.length >= res.data.count) {
|
if (this.draftList.length >= res.data.count) {
|
||||||
this.loadStatus = "nomore";
|
this.loadStatus = "nomore";
|
||||||
@ -1445,6 +1499,13 @@
|
|||||||
image: this.qunQrcode
|
image: this.qunQrcode
|
||||||
}
|
}
|
||||||
console.log('草稿1');
|
console.log('草稿1');
|
||||||
|
// if (this.isFormValid) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
if(typeof params.image === 'object' && params.image == null ){
|
||||||
|
console.log('typeof', params.image);
|
||||||
|
params.image =''
|
||||||
|
}
|
||||||
uni.$u.http.post(url, params).then(res => {
|
uni.$u.http.post(url, params).then(res => {
|
||||||
console.log('草稿2');
|
console.log('草稿2');
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
@ -1464,7 +1525,7 @@
|
|||||||
content: '',
|
content: '',
|
||||||
refund_id: '',
|
refund_id: '',
|
||||||
refund_idn: '',
|
refund_idn: '',
|
||||||
price: 1,
|
price: 0,
|
||||||
stock: '',
|
stock: '',
|
||||||
sign_time: '',
|
sign_time: '',
|
||||||
time: '',
|
time: '',
|
||||||
@ -1479,12 +1540,17 @@
|
|||||||
birth: '', //报名开始日期
|
birth: '', //报名开始日期
|
||||||
birth1: '', //报名结束日期
|
birth1: '', //报名结束日期
|
||||||
}
|
}
|
||||||
|
this.baoDraftShow = true
|
||||||
|
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: '添加成功!',
|
// title: '存草稿成功!',
|
||||||
icon: 'none',
|
// icon: 'none',
|
||||||
duration: 2000,
|
// duration: 2000,
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
this.isFormValid = false
|
||||||
|
this.getDraftList();
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url: "/packageA/my/orderList"
|
// url: "/packageA/my/orderList"
|
||||||
@ -1506,6 +1572,10 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//保存草稿成功弹框
|
||||||
|
baoDraftOpen() {
|
||||||
|
this.baoDraftShow = true
|
||||||
|
},
|
||||||
//关闭草稿
|
//关闭草稿
|
||||||
closeDraftShow() {
|
closeDraftShow() {
|
||||||
this.draftShow = false
|
this.draftShow = false
|
||||||
@ -1516,37 +1586,122 @@
|
|||||||
},
|
},
|
||||||
selectDraft(item, index) {
|
selectDraft(item, index) {
|
||||||
console.log('index:', index, 'item:', item);
|
console.log('index:', index, 'item:', item);
|
||||||
|
this.draftId = item.id
|
||||||
this.draftSelectIndex = index
|
this.draftSelectIndex = index
|
||||||
this.selectDradtForm.title = item.title
|
|
||||||
this.selectDradtForm.content = item.content
|
|
||||||
this.selectDradtForm.images = item.images
|
|
||||||
this.selectDradtForm.address = item.address
|
|
||||||
this.selectDradtForm.address_detail = item.address_detail
|
|
||||||
this.selectDradtForm.stock = item.stock
|
|
||||||
this.selectDradtForm.price = item.price
|
|
||||||
this.selectDradtForm.time = item.time
|
|
||||||
this.selectDradtForm.sign_time = item.sign_time
|
|
||||||
this.selectDradtForm.title = item.title
|
|
||||||
this.selectDradtForm.cate_ids = item.cate_ids
|
|
||||||
this.selectDradtForm.refund_id = item.refund_id
|
|
||||||
console.log('5555');
|
|
||||||
// this.closeDraftShow();
|
|
||||||
},
|
},
|
||||||
selectSureDraft() {
|
selectSureDraft() {
|
||||||
console.log('366666');
|
console.log('selectSureDraft', this.draftId);
|
||||||
this.form.title = this.selectDradtForm.title
|
uni.$u.http.get('/api/school.newactivity.activity_drafts/detail', {
|
||||||
this.form.content = this.selectDradtForm.content
|
params: {
|
||||||
this.form.images = this.selectDradtForm.images
|
id: this.draftId,
|
||||||
this.form.address = this.selectDradtForm.address
|
}
|
||||||
this.form.address_detail = this.selectDradtForm.address_detail
|
}).then(res => {
|
||||||
this.form.stock = this.selectDradtForm.stock
|
if (res.code == 1) {
|
||||||
this.form.price = this.selectDradtForm.price
|
this.draftType = 1
|
||||||
this.form.time = this.selectDradtForm.time
|
this.form = res.data.detail
|
||||||
this.form.sign_time = this.selectDradtForm.sign_time
|
console.log('selectSureDraft', this.form.cate_ids);
|
||||||
this.form.title = this.selectDradtForm.title
|
|
||||||
this.form.cate_ids = this.selectDradtForm.cate_ids
|
console.log('cate_ids', this.form.cate_ids);
|
||||||
this.form.refund_id = this.selectDradtForm.refund_id
|
const idBqSet = new Set(this.form.cate_ids);
|
||||||
console.log('99999');
|
const bqArray = this.bqList.reduce((acc, obj) => {
|
||||||
|
if (this.form.cate_ids.includes(obj.id)) {
|
||||||
|
acc.push(obj);
|
||||||
|
}
|
||||||
|
return acc;
|
||||||
|
}, []);
|
||||||
|
console.log('bqArray', bqArray);
|
||||||
|
let arrIdsName = bqArray.map((item) => {
|
||||||
|
return item.name
|
||||||
|
})
|
||||||
|
this.form.cate_idsName = arrIdsName.join(',');
|
||||||
|
console.log('cate_idsName', this.form.cate_idsName);
|
||||||
|
this.list = bqArray
|
||||||
|
this.form.cate_ids = res.data.detail.cate_ids;
|
||||||
|
|
||||||
|
console.log('cate_ids', this.form.cate_ids);
|
||||||
|
|
||||||
|
this.form.refund_idn = this.form.refund_info.title;
|
||||||
|
console.log('refund_idn', this.form.refund_idn);
|
||||||
|
// 转换为 fileList 格式
|
||||||
|
if (this.form.images != '') {
|
||||||
|
this.fileList1 = this.form.images.map(url => ({
|
||||||
|
url: url,
|
||||||
|
status: 'success',
|
||||||
|
message: ''
|
||||||
|
}));
|
||||||
|
this.list1 = this.form.images
|
||||||
|
console.log('fileList1', this.fileList1);
|
||||||
|
}
|
||||||
|
if (this.form.image) {
|
||||||
|
this.qunQrcode = ({
|
||||||
|
url: this.form.image,
|
||||||
|
status: 'success',
|
||||||
|
message: ''
|
||||||
|
})
|
||||||
|
this.QunQrcode1 = this.qunQrcode
|
||||||
|
console.log('qunQrcode222', this.qunQrcode);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form.start_time_text != '' && this.form.end_time_text != '') {
|
||||||
|
const time_start = this.form.start_time_text.slice(5, 16)
|
||||||
|
const time_end = this.form.end_time_text.slice(5, 16)
|
||||||
|
this.form.time = time_start + ' - ' + time_end
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form.sign_start_time_text != '' && this.form.sign_end_time_text != '') {
|
||||||
|
const signTime_start = this.form.sign_start_time_text.slice(5, 16)
|
||||||
|
const signTime_end = this.form.sign_end_time_text.slice(5, 16)
|
||||||
|
this.form.sign_time = signTime_start + ' - ' + signTime_end
|
||||||
|
}
|
||||||
|
|
||||||
|
this.price = this.form.price
|
||||||
|
this.priceDo()
|
||||||
|
|
||||||
|
if (!this.original_activity_id) {
|
||||||
|
this.times_b_int = this.form.start_time_text
|
||||||
|
this.times_e_int = this.form.end_time_text
|
||||||
|
this.times_sinb_int = this.form.sign_start_time_text
|
||||||
|
this.times_sine_int = this.form.sign_end_time_text
|
||||||
|
} else {
|
||||||
|
this.times_b_int = ''
|
||||||
|
this.times_e_int = ''
|
||||||
|
this.times_sinb_int = ''
|
||||||
|
this.times_sine_int = ''
|
||||||
|
this.form.sign_time = ''
|
||||||
|
this.form.time = ''
|
||||||
|
}
|
||||||
|
if (this.type == 2) {
|
||||||
|
this.form.title = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
this.mobile = this.detail.user.mobile.slice(0, 3) + 'XXXX' + this.detail.user.mobile.slice(
|
||||||
|
7);
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(error => {});
|
||||||
|
// console.log('366666');
|
||||||
|
// this.form.title = this.selectDradtForm.title
|
||||||
|
// this.form.content = this.selectDradtForm.content
|
||||||
|
// this.form.images = this.selectDradtForm.images
|
||||||
|
// this.form.address = this.selectDradtForm.address
|
||||||
|
// this.form.address_detail = this.selectDradtForm.address_detail
|
||||||
|
// this.form.stock = this.selectDradtForm.stock
|
||||||
|
// this.form.price = this.selectDradtForm.price
|
||||||
|
// this.form.time = this.selectDradtForm.time
|
||||||
|
// this.form.sign_time = this.selectDradtForm.sign_time
|
||||||
|
// this.form.title = this.selectDradtForm.title
|
||||||
|
// this.form.cate_ids = this.selectDradtForm.cate_ids
|
||||||
|
// this.form.refund_id = this.selectDradtForm.refund_id
|
||||||
|
// console.log('99999',this.form);
|
||||||
|
// this.price = this.form.price
|
||||||
|
// // this.form.refund_idn = this.form.refund_info.title;
|
||||||
|
// this.priceDo()
|
||||||
this.closeDraftShow();
|
this.closeDraftShow();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1688,6 +1843,27 @@
|
|||||||
address_detail: this.form.address_detail,
|
address_detail: this.form.address_detail,
|
||||||
image: this.qunQrcode
|
image: this.qunQrcode
|
||||||
}
|
}
|
||||||
|
// 转换为相对路径
|
||||||
|
if (typeof params.image === 'object' && params.image.url) {
|
||||||
|
params.image = params.image.url; // 如果是对象,取 url 字段
|
||||||
|
}
|
||||||
|
params.image = params.image.replace(/^https?:\/\/[^/]+/, '');
|
||||||
|
console.log('params', params.image);
|
||||||
|
|
||||||
|
console.log('草稿1');
|
||||||
|
if(this.draftType == 1) {
|
||||||
|
for (let i = 0; i < params.images.length; i++) {
|
||||||
|
if (/^https?:\/\//i.test(params.images[i])) {
|
||||||
|
params.images[i] = params.images[i].replace(/^https?:\/\/[^/]+/, '');
|
||||||
|
console.log('params.images[i].url', params.images[i]);
|
||||||
|
} else {
|
||||||
|
params.images[i] = params.images[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log('params.images排查数组的url的路径', params.images);
|
||||||
|
params.images = params.images.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
uni.$u.http.post(url, params).then(res => {
|
uni.$u.http.post(url, params).then(res => {
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
//置空
|
//置空
|
||||||
@ -2272,7 +2448,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.popup-content {
|
.popup-content {
|
||||||
height: 900rpx;
|
height: 760rpx;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -2282,25 +2458,19 @@
|
|||||||
.invoiceList {
|
.invoiceList {
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
// padding: 0rpx 40rpx;
|
||||||
|
|
||||||
.invoiceList-item {
|
.invoiceList-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
width: 93%;
|
width: 91%;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
padding: 20rpx 20rpx;
|
padding: 20rpx 30rpx;
|
||||||
height: 220rpx;
|
height: 220rpx;
|
||||||
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
||||||
|
border: 2rpx solid #ffffff;
|
||||||
// &.active {
|
|
||||||
// background-color: ##F0FFDF;
|
|
||||||
// border: 2rpx solid #9CEAA2;
|
|
||||||
// border-image: linear-gradient(270deg, rgba(251.00000023841858, 246.0000005364418, 109.00000110268593, 1), rgba(156.00000590085983, 234.00000125169754, 162.00000554323196, 1)) 2 2;
|
|
||||||
// border-radius: 40rpx;
|
|
||||||
// // clip-path: inset(0px round 16rpx);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
.item-img {
|
.item-img {
|
||||||
@ -2311,32 +2481,39 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.item-con {
|
.item-con {
|
||||||
margin-left: 20rpx;
|
margin-left: 30rpx;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
color: #323232;
|
color: #323232;
|
||||||
|
display: grid;
|
||||||
|
|
||||||
.itenCon-actName {
|
.itenCon-actName {
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
top: 0;
|
// top: 0;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 400;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itenCon-actCon {
|
.itenCon-actCon {
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// top: 100rpx;
|
// top: 100rpx;
|
||||||
margin-top: 60rpx;
|
// margin-top: 60rpx;
|
||||||
|
width: 400rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
/* 禁止换行 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 隐藏超出部分 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itenCon-actPrice {
|
.itenCon-actPrice {
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
bottom: 0;
|
// bottom: 0;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: 900;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2345,12 +2522,12 @@
|
|||||||
|
|
||||||
.invoiceList-itemSelect {
|
.invoiceList-itemSelect {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #F0FFDF;
|
background-color: #F0FFDF;
|
||||||
width: 93%;
|
width: 91%;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
padding: 20rpx 20rpx;
|
padding: 20rpx 30rpx;
|
||||||
height: 220rpx;
|
height: 220rpx;
|
||||||
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
||||||
border: 2rpx solid #9CEAA2;
|
border: 2rpx solid #9CEAA2;
|
||||||
@ -2364,7 +2541,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.item-con {
|
.item-con {
|
||||||
margin-left: 20rpx;
|
margin-left: 30rpx;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -2375,13 +2552,19 @@
|
|||||||
// position: absolute;
|
// position: absolute;
|
||||||
// top: 0;
|
// top: 0;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 400;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itenCon-actCon {
|
.itenCon-actCon {
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// top: 100rpx;
|
// top: 100rpx;
|
||||||
// margin-top: 60rpx;
|
// margin-top: 60rpx;
|
||||||
|
width: 400rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
/* 禁止换行 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 隐藏超出部分 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
@ -2390,7 +2573,7 @@
|
|||||||
// position: absolute;
|
// position: absolute;
|
||||||
// bottom: 0;
|
// bottom: 0;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: 900;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user