Commit d46289da by cen

Merge branch 'SAAS+V5.5.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.5.0

2 parents 50166b1c 3415ea76

30.4 KB | W: | H:

41.2 KB | W: | H:

assets/images/studyCenter/Leaderboard-bg.png
assets/images/studyCenter/Leaderboard-bg.png
assets/images/studyCenter/Leaderboard-bg.png
assets/images/studyCenter/Leaderboard-bg.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -434,7 +434,9 @@ export default {
console.log(res,'res')
})
}
if (userInfo.sceneType == 7) {
this.tabs[2].hidden = true
}
if (userInfo.subLoginUser.channelType == 9) {
this.tabs[2].hidden = true
this.tabs[3].hidden = true
......
......@@ -101,7 +101,7 @@ export default {
examPopInfo: {
isExamLoading: false,
showError: false,
confirmText: '确认提交'
confirmText: '确认已提交'
},
currentExam: {}
}
......
......@@ -20,7 +20,7 @@
<!-- 考试次数 -->
<view class="exam-times">
<text class="times-value">剩余考试次数</text>
<template v-if="!item.examTimes">不限次数</template>
<template v-if="!item.examTimes">不限制</template>
<template v-else>
<text>{{ filterValue(item.remainingTimes) }}/{{ filterValue(item.examTimes) }}次</text>
</template>
......@@ -101,7 +101,7 @@ export default {
examPopInfo: {
isExamLoading: false,
showError: false,
confirmText: '确认提交'
confirmText: '确认已提交'
},
currentExam: {}
}
......
<template>
<view class="customer-list">
<template v-for="(i, index) in listData">
<view :key="index" @click="choose(i)" :class="['item flex', { active: checkActive(i) }]">
<view
:key="index"
@click="choose(i)"
:class="['item flex', { active: checkActive(i) }]"
>
<view class="sprite-icon icon-tag-checked"></view>
<template v-if="i.customerName || (i.customer && i.customer.customerName)">
{{ i.customerName || (i.customer && i.customer.customerName) }}
</template>
<template v-if="i.carSeriesName || i.carType">
<view class="car-model">({{ i.carType ? i.carType : i.carChildsBrandName + '-' + i.carSeriesName || '' }})</view>
</template>
<view class="info flex text-hide">
<template v-if="i.customerName || (i.customer && i.customer.customerName)">
{{ i.customerName || (i.customer && i.customer.customerName) }}
</template>
<template v-if="i.carSeriesName || i.carType">
<view class="car-model text-hide">({{ i.carType ? i.carType : i.carChildsBrandName + '-' + i.carSeriesName || '' }})</view>
</template>
</view>
<template v-if="i.customerPhone || i.customer.customerPhone">
<view class="phone">|{{ i.customerPhone || (i.customer && i.customer.customerPhone) }}</view>
</template>
......@@ -23,14 +29,14 @@ export default {
mixins: [popupmixin],
name: 'Customer',
inject: ['userInfo'],
data() {
data () {
return {
}
},
mounted() {
mounted () {
},
methods: {
async getList(searchValue, search) {
async getList (searchValue, search) {
const { userInfo, params } = this,
{ cacheData } = params
this.currentId = ''
......@@ -48,9 +54,9 @@ export default {
}
let apiTargetName = !params.defeat ? 'getQuotationCustomerList' : 'getWorkPackageGoodsList'
console.log(apiTargetName, 'apiTargetName')
if (params.defeat) {
apiParams.keyword=searchValue
}
if (params.defeat) {
apiParams.keyword = searchValue
}
const { list } = await uni.$api.popupApi[apiTargetName](apiParams)
let customerList = list
if (params.defeat) {
......@@ -65,7 +71,7 @@ export default {
console.log(customerList, 'customerList')
this.updateParams(params, customerList || [])
},
initData(list) {
initData (list) {
const { params: { idKey, defeat }, data } = this
let key = defeat ? 'id' : 'customerPhone'
console.log(data, idKey)
......@@ -77,17 +83,17 @@ export default {
this.list = list
this.$emit('onComplete')
},
handleSearch(searchValue) {
handleSearch (searchValue) {
this.list = []
this.getList(searchValue, true)
},
choose(i) {
choose (i) {
let { params } = this
let key = params.defeat ? 'id' : 'customerPhone'
this.currentId = i[key]
this.$emit('choose', i)
},
checkActive(i) {
checkActive (i) {
let { currentId, data, params } = this
let key = params.defeat ? 'id' : 'customerPhone'
return currentId ? (i[key] == currentId) : (i[key]) == data[params.idKey]
......@@ -99,7 +105,7 @@ export default {
<style scoped lang="scss">
.customer-list {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: toRpx(32);
margin: 0 toRpx(48);
......@@ -119,6 +125,12 @@ export default {
top: 0;
right: 0;
}
.info{
max-width: 70%;
}
.phone{
flex-shrink: 0;
}
}
.active {
......
<template>
<view class="employee-list">
<template v-for="(i, index) in list">
<view :key="index" @click="choose(i)" :class="['item flex', { active: checkActive(i) }]">
<template v-for="(i, index) in listData">
<view
:key="index"
@click="choose(i)"
:class="['item flex', { active: checkActive(i) }]"
>
<view class="sprite-icon icon-tag-checked"></view>
{{ i.staffName }}
</view>
......@@ -35,11 +39,12 @@ export default {
this.currentId = ''
if (!search && cacheData && cacheData.length) {
this.initData(cacheData)
if (searchValue) this.handleSearch(searchValue)
return
}
this.componentLoading(params)
const { shopMerchantId, sceneType, merchantId } = userInfo,
apiTargetName = sceneType == 1||params.defeat ? 'getEmployeeList' : 'getOrderScreenEmployeeList',
apiTargetName = sceneType == 1 || params.defeat ? 'getEmployeeList' : 'getOrderScreenEmployeeList',
apiParams = {
merchantId: params.idKey == 'sellerUserId' ? merchantId : shopMerchantId,
sceneList: params.idKey == 'sellerUserId' ? '' : [sceneType],
......@@ -49,12 +54,10 @@ export default {
this.updateParams(params, data || [])
},
initData (list) {
const { idKey, data,params } = this
console.log(idKey,data)
const { idKey, data } = this
if (data[idKey]) {
this.currentId = data[idKey]
let item = list.find(i => i.uuid == this.currentId)
console.log(item)
this.$emit('choose', item)
}
......@@ -62,8 +65,26 @@ export default {
this.$emit('onComplete')
},
handleSearch (searchValue) {
this.list = []
this.getList(searchValue, true)
const { sceneType } = this
if (sceneType == 1) {
this.list = []
this.getList(searchValue, true)
} else this.originalDataSearch(searchValue)
},
originalDataSearch (searchValue) {
console.log(searchValue, '===')
if (!searchValue) this.searchStatus = false
else {
searchValue = searchValue.toUpperCase()
let { list } = this,
employeeList = JSON.parse(JSON.stringify(list)),
arr = []
employeeList.map(e => {
if (e.staffName && e.staffName.toUpperCase().indexOf(searchValue) != -1) arr.push(e)
})
this.searchList = arr
this.searchStatus = true
}
},
choose (i) {
let { idKey, data } = this,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!