Commit ddf52827 authored by 陈红林's avatar 陈红林

'销售折扣查询特殊活动优化'

parent a4df3401
...@@ -204,7 +204,11 @@ export default { ...@@ -204,7 +204,11 @@ export default {
}); });
}, },
async changeStatus(mode) { async changeStatus(mode) {
const str = '终端:' + this.orderDetail.INFO.terminal_name + ' ,折扣金额为:' + this.orderDetail.INFO.total_amount+'元。'; let end_ = '';
if(mode == 'SUBMIT' && this.orderDetail.INFO.flag){
end_ = '\r\n该终端本次申请使用'+ this.orderDetail.INFO.sheet_num+'张进货折扣券,需进货'+ this.orderDetail.INFO.sheet_num+'件使用。'
}
const str = '终端:' + this.orderDetail.INFO.terminal_name + ' ,折扣金额为:' + this.orderDetail.INFO.total_amount+'元。'+end_;
this.showConfirmation( this.showConfirmation(
str, str,
() => { () => {
......
...@@ -3,7 +3,16 @@ ...@@ -3,7 +3,16 @@
<view class="status_bar" :style="navHeight"></view> <view class="status_bar" :style="navHeight"></view>
<view class="tabs"> <view class="tabs">
<scroll-view ref="tabbar1" id="tab-bar" class="tab-bar" :scroll="false" :scroll-x="true" :scroll-into-view="scrollInto"> <scroll-view ref="tabbar1" id="tab-bar" class="tab-bar" :scroll="false" :scroll-x="true" :scroll-into-view="scrollInto">
<view style="display: flex;">
<view class="tab-bar-list"> <view class="tab-bar-list">
<view style="position: absolute;left: 0;top: 0;">
<picker mode="selector" :range="typeArr" @change="typeChange">
<view class="uni-tab-item-title-picker">{{ typeArr[typeIndex] }} <image src="/static/image/arrow_down@3x.png" mode="widthFix"></image></view>
</picker>
</view>
<view class="tab-bar-list-wrapper"> <view class="tab-bar-list-wrapper">
<view class="uni-tab-item" v-for="(tab, index) in tabList" :key="tab.id" :ref="'tabitem' + index"> <view class="uni-tab-item" v-for="(tab, index) in tabList" :key="tab.id" :ref="'tabitem' + index">
<text <text
...@@ -22,6 +31,7 @@ ...@@ -22,6 +31,7 @@
<view ref="underline" class="scroll-view-underline" :class="{ 'scroll-view-animation': isTap }" :style="underlineStyle"></view> <view ref="underline" class="scroll-view-underline" :class="{ 'scroll-view-animation': isTap }" :style="underlineStyle"></view>
</view> </view>
</view> </view>
</view>
</scroll-view> </scroll-view>
<view class="main" :class="{ height25: !ishowDetail }"> <view class="main" :class="{ height25: !ishowDetail }">
<view class="middle view planout-block-item" v-if="ishowDetail"> <view class="middle view planout-block-item" v-if="ishowDetail">
...@@ -69,7 +79,7 @@ ...@@ -69,7 +79,7 @@
@onAnimationEnd="animationfinish" @onAnimationEnd="animationfinish"
> >
<swiper-item class="swiper-item" v-for="(page, index) in tabList" :key="index"> <swiper-item class="swiper-item" v-for="(page, index) in tabList" :key="index">
<orderPage :ref="'page' + index" class="page-item" :tabIndex="tabIndex" :nid="page.newsid" :conditions="condition"></orderPage> <orderPage :ref="'page' + index" class="page-item" :tabIndex="tabIndex" :nid="page.newsid" :conditions="condition" :typeIndex="typeIndex"></orderPage>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
...@@ -126,6 +136,8 @@ export default { ...@@ -126,6 +136,8 @@ export default {
newsid: '3' newsid: '3'
} }
], ],
typeArr: ['全部活动', '特殊活动'],
typeIndex: 0,
tabIndex: 0, tabIndex: 0,
cacheTab: [], cacheTab: [],
scrollInto: '', scrollInto: '',
...@@ -153,7 +165,7 @@ export default { ...@@ -153,7 +165,7 @@ export default {
computed: { computed: {
underlineStyle() { underlineStyle() {
return { return {
left: this.indicatorLineLeft + 'px', left: this.indicatorLineLeft - uni.upx2px(170) + 'px',
width: this.indicatorLineWidth + 'px' width: this.indicatorLineWidth + 'px'
}; };
}, },
...@@ -191,6 +203,13 @@ export default { ...@@ -191,6 +203,13 @@ export default {
this.selectorQuery(); this.selectorQuery();
}, },
methods: { methods: {
typeChange(e){
console.log(e.detail.value);
this.typeIndex = e.detail.value;
this.$nextTick(() => {
this.search();
})
},
handleShowDetail() { handleShowDetail() {
this.ishowDetail = !this.ishowDetail; this.ishowDetail = !this.ishowDetail;
}, },
...@@ -216,10 +235,14 @@ export default { ...@@ -216,10 +235,14 @@ export default {
// #ifdef APP-PLUS || H5 || MP-WEIXIN || MP-QQ // #ifdef APP-PLUS || H5 || MP-WEIXIN || MP-QQ
this.isTap = true; this.isTap = true;
var currentSize = this.tabListSize[index]; var currentSize = this.tabListSize[index];
console.log(currentSize)
this.updateIndicator(currentSize.left, currentSize.width); this.updateIndicator(currentSize.left, currentSize.width);
this._touchTabIndex = index; this._touchTabIndex = index;
// #endif // #endif
this.switchTab(index); this.switchTab(index);
this.$nextTick(() => {
this.search();
})
}, },
onswiperchange(e) { onswiperchange(e) {
// 注意:百度小程序会触发2次 // 注意:百度小程序会触发2次
...@@ -346,7 +369,7 @@ export default { ...@@ -346,7 +369,7 @@ export default {
// #endif // #endif
// #ifndef APP-NVUE // #ifndef APP-NVUE
this.scrollInto = this.tabList[index].id; // this.scrollInto = this.tabList[index].id;
// #endif // #endif
// 释放 tabId // 释放 tabId
...@@ -431,10 +454,11 @@ page { ...@@ -431,10 +454,11 @@ page {
.tab-bar-list { .tab-bar-list {
flex-direction: column; flex-direction: column;
padding-left: 170rpx;
} }
.tab-bar-list-wrapper { .tab-bar-list-wrapper {
width: 750rpx; width: 580rpx;
flex-direction: row; flex-direction: row;
} }
...@@ -568,6 +592,20 @@ uni-button:after { ...@@ -568,6 +592,20 @@ uni-button:after {
white-space: nowrap; white-space: nowrap;
/* #endif */ /* #endif */
} }
.uni-tab-item-title-picker{
width: 170rpx;
justify-content: center;
color: $text-base-color;
font-size: 28rpx;
height: 40px;
line-height: 40px;
font-weight: 400;
align-items: center;
image{
width: 28rpx;
margin-left: 10rpx;
}
}
.uni-tab-item-title-active { .uni-tab-item-title-active {
color: $tabbar-color; color: $tabbar-color;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="order view"> <view class="order view">
<view class="top" @click="handleDetail(newsItem)"> <view class="top" @click="handleDetail(newsItem)">
<text class="dot" v-if="!newsItem.new_flag && newsItem.state == '0'"></text> <text class="dot" v-if="!newsItem.new_flag && newsItem.state == '0'"></text>
<text class="title-no">{{ newsItem.fee_code }}</text> <text class="title-no" :class="newsItem.flag?'redColor':''">{{ newsItem.fee_code }}</text>
<view class="title-info" v-if="newsItem.state_text"> <view class="title-info" v-if="newsItem.state_text">
<button class="title-info__status" type="default"> <button class="title-info__status" type="default">
<text class="item-block-btn__text">{{ newsItem.state_text }}</text> <text class="item-block-btn__text">{{ newsItem.state_text }}</text>
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
</view> </view>
<view class="middle view"> <view class="middle view">
<view class="middle-title" @click="handleDetail(newsItem)"> <view class="middle-title" @click="handleDetail(newsItem)">
<text class="middle-title__text flex1">终端:</text> <text class="middle-title__text flex1" :class="newsItem.flag?'redColor':''">终端:</text>
<text class="middle-title__text flex6">{{ newsItem.terminal_name }}</text> <text class="middle-title__text flex6" :class="newsItem.flag?'redColor':''">{{ newsItem.terminal_name }}</text>
</view> </view>
<view class="middle-title" @click="handleDetail(newsItem)"> <view class="middle-title" @click="handleDetail(newsItem)">
<text class="middle-title__text flex1">产品:</text> <text class="middle-title__text flex1" :class="newsItem.flag?'redColor':''">产品:</text>
<text class="middle-title__text flex6">{{ newsItem.product_name }}</text> <text class="middle-title__text flex6" :class="newsItem.flag?'redColor':''">{{ newsItem.product_name }}</text>
</view> </view>
<view class="check-box"> <view class="check-box">
<radio-group @change="handleCheck(idx)"> <radio-group @change="handleCheck(idx)">
...@@ -28,11 +28,13 @@ ...@@ -28,11 +28,13 @@
<button class="title-info__status blue" type="default" @click="goActDetail(newsItem.acts)"> <button class="title-info__status blue" type="default" @click="goActDetail(newsItem.acts)">
<text class="item-block-btn__text">活动明细</text> <text class="item-block-btn__text">活动明细</text>
</button> </button>
<view>
<text class="middle-title__text">总金额:</text> <text class="middle-title__text">总金额:</text>
<text class="middle-title__text red">{{ newsItem.total_amount }}</text> <text class="middle-title__text red">{{ newsItem.total_amount }}</text>
</view> </view>
</view> </view>
</view> </view>
</view>
<uni-popup ref="popup" type="center"> <uni-popup ref="popup" type="center">
<scroll-view scroll-x scroll-y class="popup-content"> <scroll-view scroll-x scroll-y class="popup-content">
<view class="view planout-block-item" v-for="(item,index) in actArr" > <view class="view planout-block-item" v-for="(item,index) in actArr" >
...@@ -45,6 +47,10 @@ ...@@ -45,6 +47,10 @@
<text class="middle-date middle-date-select">活动金额:</text> <text class="middle-date middle-date-select">活动金额:</text>
<text class="middle-date-des middle-date-des-select">{{ item.amount }}</text> <text class="middle-date-des middle-date-des-select">{{ item.amount }}</text>
</view> </view>
<view class="text-block">
<text class="middle-date middle-date-select">张数:</text>
<text class="middle-date-des middle-date-des-select">{{ item.sheet_num }}</text>
</view>
</view> </view>
</scroll-view> </scroll-view>
</uni-popup> </uni-popup>
...@@ -417,7 +423,8 @@ export default { ...@@ -417,7 +423,8 @@ export default {
flex-direction: column; flex-direction: column;
} }
.total-amount { .total-amount {
justify-content: end; flex: 1;
justify-content: space-between;
} }
.red { .red {
color: #f61d30; color: #f61d30;
...@@ -459,4 +466,11 @@ export default { ...@@ -459,4 +466,11 @@ export default {
border-bottom: 1px solid #999; border-bottom: 1px solid #999;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.redColor{
color: red;
}
.middle-date-des-select{
flex: 1;
flex-wrap: wrap;
}
</style> </style>
\ No newline at end of file
...@@ -72,6 +72,10 @@ export default { ...@@ -72,6 +72,10 @@ export default {
conditions: { conditions: {
type: Object, type: Object,
default: () => {} default: () => {}
},
typeIndex:{
type: Number,
default: 0
} }
}, },
data() { data() {
...@@ -160,7 +164,11 @@ export default { ...@@ -160,7 +164,11 @@ export default {
}, },
async changeStatus(mode) { async changeStatus(mode) {
const data = this.dataList.filter((v) => v.checked); const data = this.dataList.filter((v) => v.checked);
const str = '终端:' + data[0].terminal_name +'\r\n' +'折扣金额为:' + data[0].total_amount+'元。'; let end_ = '';
if(mode == 'SUBMIT' && data[0].flag){
end_ = '\r\n该终端本次申请使用'+data[0].acts[0].sheet_num+'张进货折扣券,需进货'+data[0].acts[0].sheet_num+'件使用。'
}
const str = '终端:' + data[0].terminal_name +'\r\n' +'折扣金额为:' + data[0].total_amount+'元。'+end_;
this.showConfirmation( this.showConfirmation(
str, str,
() => { () => {
...@@ -227,7 +235,8 @@ export default { ...@@ -227,7 +235,8 @@ export default {
...this.condition, ...this.condition,
...obj, ...obj,
user_bp: this.userInfo.code, user_bp: this.userInfo.code,
role: 'WLY001' role: 'WLY001',
flag:this.typeIndex == 0?'':this.typeIndex == 1?'X':''
}; };
params.fee_code[0].low = params.fee_code[0].low ? '*' + params.fee_code[0].low + '*' : delete params.fee_code; params.fee_code[0].low = params.fee_code[0].low ? '*' + params.fee_code[0].low + '*' : delete params.fee_code;
params.terminal_code[0].low = params.terminal_code[0].low ? '*' + params.terminal_code[0].low + '*' : delete params.terminal_code; params.terminal_code[0].low = params.terminal_code[0].low ? '*' + params.terminal_code[0].low + '*' : delete params.terminal_code;
......
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