Commit 82cd95d3 by 前端

一轮bug修复

1 parent f5b19666
......@@ -69,6 +69,7 @@ Page({
score += e.score
}
e.suggestions = e.suggestions.replace(/<\/br>/g, '\n')
e.hitText = e.hitText&&e.hitText.replace(/<\/br>/g, '\n')
})
return {
list: arr,
......
......@@ -98,4 +98,8 @@ page {
.red{
color: #F24724 !important;
}
.flex-start{
display:flex;
align-items:flex-start;
}
\ No newline at end of file
......@@ -25,7 +25,7 @@
<view class="label">是否命中</view>
<view class="value">{{hitEnum[item.hitResult]}}</view>
</view>
<view class="sub-item flex">
<view class="sub-item flex-start">
<view class="label">命中文本</view>
<text class="value">{{item.hitText || '-'}}</text>
</view>
......
......@@ -189,6 +189,7 @@
<block wx:if="{{item.orderStatus != '0'}}">
<view class="order-btn default-btn padding_20" bindtap="jumpReception" data-item="{{item}}">接待记录</view>
</block>
<block wx:if="{{!staffUuid}}">
<view wx:if="{{item.orderStatus == '-1' || item.orderStatus == '0'}}" class="order-btn" bindtap="handleClickBtn" data-target="{{item}}">
{{btnTxt[item.orderStatus]}}
</view>
......@@ -211,6 +212,7 @@
</view>
</block>
</block>
</block>
</view>
</block>
</view>
......
......@@ -87,17 +87,18 @@ Component({
},
choose(e) {
let {
index,item
index,
item
} = e.currentTarget.dataset
let {
active
} = item
let {
list
} = this.data,tmpTarget;
if (list[index].merchantName!=='全部') {
} = this.data, tmpTarget,res;
if (list[index].merchantName !== '全部') {
let target = `list[${index}].active`
if(list[0].merchantName=='全部') tmpTarget=`list[0].active`
if (list[0].merchantName == '全部') tmpTarget = `list[0].active`
this.setData({
[target]: !active,
[tmpTarget]: false
......@@ -117,19 +118,29 @@ Component({
this.setSelectedData()
})
}
wx.$router.getPageInstance().filterStore(list)
},
setSelectedData() {
let {
list,
selectedData
} = this.data
} = this.data,res;
if (list.length >0 && !list[0].merchantNo) {
res = list.some(val => val.active)
if (!res) {
list[0].active = true
}
}
selectedData = list.filter(val => {
if (val.active && val.merchantNo) return val
if (val.active) return val
})
this.setData({
selectedData
selectedData,
list
})
wx.$router.getPageInstance().filterStore(list)
},
hidePopup() {
this.triggerEvent('cancel')
......
......@@ -13,6 +13,7 @@ Component({
* 组件的初始数据
*/
data: {
isPack:false,
contentObject: [{
label: '工牌编号',
key: 'badgeId'
......@@ -42,7 +43,8 @@ Component({
{
label: '归属服务商',
key: 'serviceList',
addHtml: 'service'
addHtml: 'service',
tempKey:'tempServer'
},
]
},
......@@ -61,6 +63,20 @@ Component({
})
// this.restoreTabBar()
// wx.$router.go('aiInspectionDetail', item)
},
packHandle(){
this.setData({
isPack:!this.data.isPack
})
},
handleServer(data){
let {isPack}=this.data;
console.log(data.slice(0,10),111111111111111111111)
if(isPack) {
return data.slice(0,10)
}else{
return data
}
}
}
})
\ No newline at end of file
......@@ -78,8 +78,24 @@
.value {
font-size: var(--fontSize24);
color: #292D33;
position:relative;
width:calc(100% - 144rpx);
.s-name{
margin-bottom: var(--fontSize16);
overflow:hidden;
white-space:nowrap;
text-overflow: ellipsis;
}
.icon{
position:absolute;
width: var(--fontSize32);
height: var(--fontSize32);
right:0;
top:0;
}
.pack{
transform: rotate(90deg);
}
}
}
......
......@@ -19,7 +19,8 @@
</view>
<view class="value" wx:elif="{{i.addHtml=='service'}}">
<block wx-if="{{item[i.key].length>0}}">
<view class="s-name" wx:for="{{item[i.key]}}" wx:for-item="s">{{s}}</view>
<view class="s-name" wx:for="{{item[!isPack?i.key:i.tempKey]}}" wx:for-item="s">{{s}}</view>
<gl-image class="icon {{isPack?'pack':''}}" src="/equity/date-arrow.png" bind:tap="packHandle"/>
</block>
<view wx:else>-</view>
</view>
......
......@@ -50,7 +50,7 @@ Page({
searchdate,
keyword
}
if(RecMerchantNo) params.RecMerchantNo=RecMerchantNo
if (RecMerchantNo) params.RecMerchantNo = RecMerchantNo
if (nothing) return
carLifeApi.employeeBadgeReclistWithPage(params).then(res => {
let {
......@@ -62,6 +62,7 @@ Page({
let tempList = isReset ? data?.list : this.data.inspectList.concat(data?.list)
tempList.map(e => {
if (e.seconds) e._seconds = this.formatTime(e.seconds)
e.tempServer= e.serviceList.slice(0,5)
})
this.setData({
inspectList: tempList,
......@@ -91,12 +92,12 @@ Page({
} = res
if (code == 0) {
data?.unshift({
merchantNO: '',
merchantNo: '',
merchantName: '全部',
active: true
})
selectedYqMerchantList.unshift({
merchantNO: '',
merchantNo: '',
merchantName: '全部',
active: true
}),
......@@ -157,10 +158,11 @@ Page({
},
showStoreSelectPopup(e) {
let {
type
} = e.currentTarget.dataset
tempList
} = this.data;
this.setData({
showStoreSelectPopup: true
showStoreSelectPopup: true,
storeRangeList: tempList
})
},
scrollonReachBottom() {
......@@ -206,21 +208,28 @@ Page({
this.filterStore()
},
filterStore(arr) {
console.log(arr)
let {
selectedYqMerchantList,
tempList
} = this.data,
list = arr ? arr : selectedYqMerchantList;
let res= list.find(item=>!item.merchantNo)
if(!res){
tempList[0].active=false
}
tempList.forEach(val => {
list.forEach(v => {
if (list.length==1&&list[0].merchantName == '全部') {
val.active = false
}
// if (list.length == 1 && list[0].merchantName == '全部') {
// val.active = false
// }
if (v.merchantNo == val.merchantNo) {
val.active = v.active
}
})
})
if (arr) {
this.setData({
tempList
......
......@@ -20,7 +20,7 @@
</view>
<date-box bindchange="changeDate"></date-box>
</view>
<view class="search-info">当前{{inspectList.length}}条员工信息</view>
<view class="search-info">当前{{total}}条员工信息</view>
<scroll-view scroll-y style="height: calc(100vh - var(--fontSize248));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-top="{{scrollTop}}" bindscrolltolower="scrollonReachBottom">
<view class="content-box">
<block wx:if="{{flag}}">
......
......@@ -362,10 +362,10 @@ Component({
}
if (
(userInfo.isSuper) &&
menuList.every((item) => item.menuText != "话术质检")
menuList.every((item) => item.menuText != "质检管理")
) {
menuList.unshift({
menuText: "话术质检",
menuText: "质检管理",
icon: 's_ai_inspection',
path: 'packageEquity.employeeInspection',
default: true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!