|
|
@@ -2,102 +2,127 @@
|
|
|
<view class="page">
|
|
|
<u-sticky :h5-nav-height="0" z-index="9099" :offset-top='0'>
|
|
|
<uni-NavBar :headerTitle="`${headerTitle}详情`" background="#fff" :isSlot="false"></uni-NavBar>
|
|
|
- <view class="status-message dis a-c " :style="{background:detailsInfo.styleCOlor.backcolor}">
|
|
|
- <text>{{adTypeMap}}</text>
|
|
|
+ <!-- <view class="status-message dis a-c module " :style="{background:detailsInfo.styleCOlor.backcolor}">
|
|
|
+ <text>{{adPositionName}}</text>
|
|
|
+
|
|
|
<view class="status"
|
|
|
:style="{background:detailsInfo.styleCOlor.backcolor1,color:detailsInfo.styleCOlor.color}">
|
|
|
- {{statusTypeMap}}
|
|
|
- </view>
|
|
|
- <text class="error" v-if="detailsInfo.status=='1'" @click="rejectReasonShow=true">查看驳回原因</text>
|
|
|
- </view>
|
|
|
+ {{detailsInfo.statusName}}
|
|
|
+ </view>
|
|
|
+ </view>-->
|
|
|
</u-sticky>
|
|
|
<view class="body">
|
|
|
+ <view class="module dis f-c ">
|
|
|
+ <text class="module-title ">投放状态:</text>
|
|
|
+ <view class="views dis a-c j-s ">
|
|
|
+ <text>{{detailsInfo.statusName}}</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
<view class="module dis f-c ">
|
|
|
<text class="module-title ">基本信息</text>
|
|
|
<view class="views dis a-c j-s ">
|
|
|
<text>投放计划名称</text>
|
|
|
- <text>{{detailsInfo.name}}</text>
|
|
|
+ <text>{{detailsInfo.merchantAdDeliveryPlanDTO.planName}}</text>
|
|
|
</view>
|
|
|
<view class="views dis a-c j-s ">
|
|
|
<text>位置名称</text>
|
|
|
- <text>{{detailsInfo.positionName}}</text>
|
|
|
- </view>
|
|
|
- <view class="views dis a-c j-s ">
|
|
|
- <text>广告类型</text>
|
|
|
- <text>{{adTypeMap}}</text>
|
|
|
+ <text>{{detailsInfo.merchantAdDeliveryPlanDTO.positionName}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="module dis f-c ">
|
|
|
<text class="module-title ">投放区域</text>
|
|
|
- <text class="address">{{detailsInfo.address}}</text>
|
|
|
+ <text class="address">{{detailsInfo.merchantAdDeliveryPlanDTO.coverageArea}}公里(半径)</text>
|
|
|
</view>
|
|
|
<view class="module dis f-c ">
|
|
|
<text class="module-title ">投放时间</text>
|
|
|
<view class="views dis a-c j-s ">
|
|
|
<text>投放开始日期</text>
|
|
|
- <text>{{detailsInfo.startDate}}</text>
|
|
|
+ <text>{{detailsInfo.merchantAdDeliveryPlanDTO.planStartTime}}</text>
|
|
|
</view>
|
|
|
<view class="views dis a-c j-s ">
|
|
|
<text>投放结束日期</text>
|
|
|
- <text>{{detailsInfo.endDate}}</text>
|
|
|
+ <text>{{detailsInfo.merchantAdDeliveryPlanDTO.planEndTime}}</text>
|
|
|
</view>
|
|
|
<view class="views dis a-c j-s ">
|
|
|
<text>生效周期</text>
|
|
|
- <text>{{detailsInfo.validPeriodType==0?'每天':detailsInfo.validPeriodType==1 ? '每周':'每月'}}</text>
|
|
|
+ <text v-if="detailsInfo.merchantAdDeliveryPlanDTO.cycleType==1">每天</text>
|
|
|
+ <text v-else>
|
|
|
+ {{
|
|
|
+ detailsInfo.merchantAdDeliveryPlanDTO.cycleStrategy
|
|
|
+ .split(',')
|
|
|
+ .map(num => {
|
|
|
+ const week = ['周一','周二','周三','周四','周五','周六','周日'];
|
|
|
+ return week[Number(num)-1] || '';
|
|
|
+ })
|
|
|
+ .join('、')
|
|
|
+ }}
|
|
|
+ </text>
|
|
|
</view>
|
|
|
- <view class="extendArea dis a-c f-wrap mt-2" style="padding-bottom: 0;"
|
|
|
+ <!-- <view class="extendArea dis a-c f-wrap mt-2" style="padding-bottom: 0;"
|
|
|
v-if="detailsInfo.validPeriodType!='0'">
|
|
|
<view class="cycleStrategy dis a-c j-c" v-for="(item,index) in cycleStrategylist" :key="index"
|
|
|
:class="{ 'tcycleStrategy-active': selectedDays.includes(item.value) }">
|
|
|
<text>{{item.label}}</text>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="views dis a-c j-s ">
|
|
|
<text>生效时段</text>
|
|
|
- <text>{{detailsInfo.validTimeRangeType==0?'全天':'指定时间段'}}</text>
|
|
|
+ <text>{{detailsInfo.merchantAdDeliveryPlanDTO.validTimeRangeType==0?'全天':'指定时间段'}}</text>
|
|
|
</view>
|
|
|
- <view class="extendArea mt-2" style="font-size: 26rpx;" v-if="detailsInfo.validTimeRangeType=='1'">
|
|
|
- <view class=" dis a-c j-s mb-3">
|
|
|
- <text style="color: #333;">开始时间</text>
|
|
|
- <text style="color: #aaa;" class="mr-1">{{timeSegmentStart}}</text>
|
|
|
- </view>
|
|
|
- <view class=" dis a-c j-s ">
|
|
|
- <text style="color: #333;">开始时间</text>
|
|
|
- <text style="color: #aaa;" class="mr-1">{{timeSegmentEnd }}</text>
|
|
|
+ <view class="extendArea mt-2" style="font-size: 26rpx;"
|
|
|
+ v-if="detailsInfo.merchantAdDeliveryPlanDTO.validTimeRangeType=='1'">
|
|
|
+ <view class="" v-for="(item,index) in detailsInfo.merchantAdDeliveryPlanDTO.localAdvertPlanTimeDTOS"
|
|
|
+ :key="index">
|
|
|
+ <span class=" a-c j-s mb-3">
|
|
|
+ <text style="color: #333;">开始时间:</text>
|
|
|
+ <text style="color: #333;" class="mr-1"> {{item.startTime}}</text>
|
|
|
+ </span> --
|
|
|
+ <span class=" a-c j-s ">
|
|
|
+ <text style="color: #333;">结束时间:</text>
|
|
|
+ <text style="color: #333;" class="mr-1"> {{item.endTime }}</text>
|
|
|
+ </span>
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="module dis f-c ">
|
|
|
<text class="module-title ">投放内容</text>
|
|
|
<view class="admaterial mt-3 ">
|
|
|
- <u-swiper :list="imagelist" mode="number" indicator-pos="bottomRight" height="330"
|
|
|
- v-if="detailsInfo.imageType=='1'"></u-swiper>
|
|
|
+ <!-- <u-swiper :list="imagelist" mode="number" indicator-pos="bottomRight" height="330"
|
|
|
+ v-if="detailsInfo.imageType=='0'"></u-swiper> -->
|
|
|
+ <image :src="detailsInfo.taskImage" mode="" v-if="detailsInfo.imageType=='0'" style="width: 100%;"></image>
|
|
|
<video v-else id="myVideo" :src="detailsInfo.taskImage"
|
|
|
- :style="{height:'330rpx',width:'100%',borderRadius:'10rpx'}" :muted="false"
|
|
|
- :enable-progress-gesture="true">
|
|
|
+ :style="{height:'330rpx',width:'100%',borderRadius:'10rpx'}" :muted="false" :enable-progress-gesture="true">
|
|
|
</video>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="module dis f-c ">
|
|
|
<text class="module-title ">计费方式</text>
|
|
|
- <view class="views dis a-c j-s " v-for="(item,index) in adPricingModelList" :key="index">
|
|
|
- <text>{{item.pricingName}}</text>
|
|
|
- <text>{{item.amount}} {{item.pricingUnit}}</text>
|
|
|
- </view>
|
|
|
+ <view class="views dis a-c j-s"
|
|
|
+ v-for="item in adPricingModelList.filter(item => detailsInfo.merchantAdDeliveryPlanDTO.adPositionPriceRelId == item.id)"
|
|
|
+ :key="item.id"
|
|
|
+ >
|
|
|
+ <text>{{ item.pricingName }}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="module dis f-c ">
|
|
|
<text class="module-title ">投放频次</text>
|
|
|
<view class="views dis a-c j-s ">
|
|
|
<text>每人每天展示次数</text>
|
|
|
- <text>{{detailsInfo.userDailyDisplayLimit || '不限'}}次</text>
|
|
|
+ <text v-if="detailsInfo.merchantAdDeliveryPlanDTO.userDailyImpCount=='-1'">不限</text>
|
|
|
+ <text v-else>{{detailsInfo.userDailyDisplayLimit}} 次</text>
|
|
|
+
|
|
|
</view>
|
|
|
<view class="views dis a-c j-s ">
|
|
|
<text>每人展示总次数</text>
|
|
|
- <text>{{detailsInfo.userTotalDisplayLimit || '不限'}}次</text>
|
|
|
+ <text v-if="detailsInfo.merchantAdDeliveryPlanDTO.userImpCount=='-1'">不限</text>
|
|
|
+ <text v-else>{{detailsInfo.userTotalDisplayLimit}} 次</text>
|
|
|
</view>
|
|
|
<view class="views dis a-c j-s ">
|
|
|
<text>展示时间间隔</text>
|
|
|
- <text>{{detailsInfo.showInterval || '不限'}}分钟</text>
|
|
|
+ <text v-if="detailsInfo.merchantAdDeliveryPlanDTO.displayTimeInterval=='-1'">不限</text>
|
|
|
+ <text v-else>{{detailsInfo.showInterval}} 分钟</text>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
@@ -109,14 +134,14 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="footer-view dis a-c j-s ">
|
|
|
+ <!-- <view class="footer-view dis a-c j-s ">
|
|
|
<view class="dis a-c j-c " @click="adEdit">
|
|
|
编辑
|
|
|
</view>
|
|
|
<view class="dis a-c j-c " @click="delShow=true">
|
|
|
作废
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<u-popup v-model="rejectReasonShow" mode="center" width="580rpx" :closeable="false" border-radius="20">
|
|
|
<view class="popup">
|
|
|
<view class="header dis a-c j-c ">
|
|
|
@@ -161,6 +186,7 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ id: '',
|
|
|
rejectReasonShow: false, //驳回弹窗
|
|
|
delShow: false, //作废弹窗
|
|
|
timeSegmentStart: "", //生效开始时间
|
|
|
@@ -240,9 +266,6 @@
|
|
|
//状态
|
|
|
statusTypeMap() {
|
|
|
const map = {
|
|
|
- 0: '待审核',
|
|
|
- 1: '审核驳回',
|
|
|
- 2: '审核通过',
|
|
|
3: '未开始',
|
|
|
4: '已生效',
|
|
|
5: '已作废',
|
|
|
@@ -252,21 +275,23 @@
|
|
|
}
|
|
|
},
|
|
|
async onLoad(options) {
|
|
|
+ this.id = options.id
|
|
|
this.generateWeek();
|
|
|
this.generatemonth();
|
|
|
- this.detailsInfo = JSON.parse(options.info);
|
|
|
+ this.getDetail()
|
|
|
+
|
|
|
this.colorList.map(val => {
|
|
|
- if (val.id == this.detailsInfo.status) {
|
|
|
+ if (val.id == this.detailsInfo.status || 4) {
|
|
|
this.detailsInfo.styleCOlor = val;
|
|
|
}
|
|
|
return val;
|
|
|
})
|
|
|
await this.getadBillingModel();
|
|
|
- this.imagelist = this.detailsInfo.taskImage.split(',');
|
|
|
- this.selectedDays = this.detailsInfo.validPeriodValue.split(',');
|
|
|
- let list = this.detailsInfo.validTimeRangeValue.split(',');
|
|
|
- this.timeSegmentStart = list[0];
|
|
|
- this.timeSegmentEnd = list[1];
|
|
|
+ // this.imagelist = this.detailsInfo.taskImage.split(',');
|
|
|
+ // this.selectedDays = this.detailsInfo?.validPeriodValue.split(',');
|
|
|
+ // let list = this.detailsInfo?.validTimeRangeValue?.split(',');
|
|
|
+ // this.timeSegmentStart = list[0];
|
|
|
+ // this.timeSegmentEnd = list[1];
|
|
|
const map = {
|
|
|
'0': '全屏广告',
|
|
|
'1': '弹窗广告',
|
|
|
@@ -281,6 +306,14 @@
|
|
|
url: '/pages/adManagement/createFullscreenAd?id=' + this.detailsInfo.id,
|
|
|
})
|
|
|
},
|
|
|
+ getDetail() {
|
|
|
+ this.$http.post('/advert/localAdvertTask/getQueryById', {
|
|
|
+ id: this.id,
|
|
|
+ }).then(res => {
|
|
|
+ this.detailsInfo = res.data.result
|
|
|
+ console.log(this.detailsInfo)
|
|
|
+ })
|
|
|
+ },
|
|
|
//作废操作
|
|
|
markAsInvalid() {
|
|
|
this.$http.delete('advert/localAdvertTask/cancelDispatch?id=' + this.detailsInfo.id).then(res => {
|
|
|
@@ -316,28 +349,8 @@
|
|
|
"3": "元/笔销售",
|
|
|
"4": "元/千次曝光",
|
|
|
}
|
|
|
- this.adPricingModelList = res.data.result.records.map(val => {
|
|
|
- return {
|
|
|
- adPricingModelId: val.id,
|
|
|
- pricingName: val.pricingName,
|
|
|
- pricingUnit: pricingUnitMap[val.pricingUnit],
|
|
|
- checked: false,
|
|
|
- amount: "",
|
|
|
- }
|
|
|
- })
|
|
|
- const result = this.adPricingModelList.map(model => {
|
|
|
- const matchedPrice = this.adSlotPriceList.find(price => price
|
|
|
- .adPricingModelId === model.adPricingModelId);
|
|
|
- return {
|
|
|
- ...model,
|
|
|
- amount: matchedPrice ? matchedPrice.amount : model.amount,
|
|
|
- checked: false,
|
|
|
- id: matchedPrice?.id,
|
|
|
- };
|
|
|
- }).filter(val => val.amount).filter(val => val.id == this.detailsInfo
|
|
|
- .relId)
|
|
|
- this.adPricingModelList = result;
|
|
|
- console.log(this.adPricingModelList);
|
|
|
+ this.adPricingModelList = res.data.result.records
|
|
|
+ console.log(this.adPricingModelList)
|
|
|
})
|
|
|
} else {
|
|
|
uni.showToast({
|