Commit e7ed1fd6 by 胡悦

Merge branch 'V4.56.0' of http://192.168.3.233:8090/glsx/gl_tape into V4.56.0

2 parents c7cbc0f9 318269a5
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</template> </template>
</scroll-view> </scroll-view>
<view class="letter-list"> <view class="letter-list">
<template v-for="(i, index) in list"> <template v-for="(i, index) in listData">
<view <view
class="letter-item" class="letter-item"
:key="index" :key="index"
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
data = await uni.$api.popupApi.getMerchantCarBrandList({ data = await uni.$api.popupApi.getMerchantCarBrandList({
merchantId: shopMerchantId merchantId: shopMerchantId
}) })
if (data && data.length) this.updateParams(params, data) this.updateParams(params, data || [])
}, },
initData (carData) { initData (carData) {
let { params: { idKey }, data: { customer } } = this, let { params: { idKey }, data: { customer } } = this,
......
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
yqMerchantId: merchantId, yqMerchantId: merchantId,
orderByType: 9 orderByType: 9
}) })
if (data && data.length) this.updateParams(params, data) this.updateParams(params, data || [])
}, },
initData (data) { initData (data) {
let couponTypeList = Array.from(new Set([...data.map((e) => e.couponInfo.couponType)])), let couponTypeList = Array.from(new Set([...data.map((e) => e.couponInfo.couponType)])),
......
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
const data = await uni.$api.popupApi.getDiversionMerchantRef({ const data = await uni.$api.popupApi.getDiversionMerchantRef({
merchantId: shopMerchantId merchantId: shopMerchantId
}) })
if (data && data.length) this.updateParams(params, data) this.updateParams(params, data || [])
}, },
initData (data) { initData (data) {
this.list = data this.list = data
......
...@@ -40,9 +40,9 @@ export default { ...@@ -40,9 +40,9 @@ export default {
sceneList: params.idKey == 'sellerUserId' ? '' : [sceneType], sceneList: params.idKey == 'sellerUserId' ? '' : [sceneType],
name: searchValue name: searchValue
}) })
if (data && data.length) this.updateParams(params, data) this.updateParams(params, data || [])
}, },
initData(data){ initData (data) {
this.list = data this.list = data
this.$emit('onComplete') this.$emit('onComplete')
}, },
......
...@@ -4,11 +4,18 @@ ...@@ -4,11 +4,18 @@
<template v-if="listData.length"> <template v-if="listData.length">
<template v-for="(i, index) in listData"> <template v-for="(i, index) in listData">
<template v-if="isDefeatOrder"> <template v-if="isDefeatOrder">
<view class="item-box" :key="index"> <view
class="item-box"
:key="index"
>
<view class="goods-title flex">{{ i.goodsTypeName }}|建议价</view> <view class="goods-title flex">{{ i.goodsTypeName }}|建议价</view>
<view class="defeat-goods-list"> <view class="defeat-goods-list">
<template v-for="(item, ind) in i.upgradeGoodsList"> <template v-for="(item, ind) in i.upgradeGoodsList">
<view :class="['item flex', { active: checkActive(item) }]" :key="`${index}_${ind}`" @click="choose(item)"> <view
:class="['item flex', { active: checkActive(item) }]"
:key="`${index}_${ind}`"
@click="choose(item)"
>
<view class="sprite-icon icon-tag-checked"></view> <view class="sprite-icon icon-tag-checked"></view>
<text class="goods-name text-hide"> <text class="goods-name text-hide">
{{ replaceItemText(item, 'upgradeGoodsAlias') || replaceItemText(item, 'upgradeGoodsName') || replaceItemText(item.goodsInfo, 'goodsName') }} {{ replaceItemText(item, 'upgradeGoodsAlias') || replaceItemText(item, 'upgradeGoodsName') || replaceItemText(item.goodsInfo, 'goodsName') }}
...@@ -26,7 +33,11 @@ ...@@ -26,7 +33,11 @@
</view> </view>
</template> </template>
<template v-else> <template v-else>
<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> <view class="sprite-icon icon-tag-checked"></view>
<text class="goods-name text-hide"> <text class="goods-name text-hide">
{{ replaceItemText(i.goods, 'goodsAlias') || replaceItemText(i.goods, 'upgradeGoodsName') || replaceItemText(i.goodsInfo, 'goodsName') }} {{ replaceItemText(i.goods, 'goodsAlias') || replaceItemText(i.goods, 'upgradeGoodsName') || replaceItemText(i.goodsInfo, 'goodsName') }}
...@@ -76,7 +87,7 @@ export default { ...@@ -76,7 +87,7 @@ export default {
} }
isDefeatOrder ? apiParams.upradeFlag = 'N' : apiParams.sceneType = sceneType isDefeatOrder ? apiParams.upradeFlag = 'N' : apiParams.sceneType = sceneType
const data = await uni.$api.popupApi[apiName](apiParams) const data = await uni.$api.popupApi[apiName](apiParams)
if (data && data.length) this.updateParams(params, data) this.updateParams(params, data || [])
}, },
handleSearch (searchValue) { handleSearch (searchValue) {
let { isDefeatOrder } = this let { isDefeatOrder } = this
......
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
merchantId: shopMerchantId, merchantId: shopMerchantId,
sceneType sceneType
}) })
if (data && data.length) this.updateParams(params, data) this.updateParams(params, data || [])
}, },
handleSearch (searchValue) { handleSearch (searchValue) {
if (!searchValue) this.searchStatus = false if (!searchValue) this.searchStatus = false
......
...@@ -123,7 +123,7 @@ export default { ...@@ -123,7 +123,7 @@ export default {
merchantId: shopMerchantId, merchantId: shopMerchantId,
sceneType sceneType
}) })
if (data && data.length) this.updateParams(params, data) this.updateParams(params, data || [])
}, },
handleSearch (searchValue) { handleSearch (searchValue) {
if (!searchValue) this.searchStatus = false if (!searchValue) this.searchStatus = false
......
...@@ -8,10 +8,7 @@ ...@@ -8,10 +8,7 @@
:scroll-into-view="to" :scroll-into-view="to"
@scroll="to = ''" @scroll="to = ''"
> >
<view <view class="repoet-box">
class="repoet-box"
:key="dateKey"
>
<template v-if="loadComplete"> <template v-if="loadComplete">
<view class="box"> <view class="box">
...@@ -40,6 +37,8 @@ ...@@ -40,6 +37,8 @@
@blur="handleBlur($event, i)" @blur="handleBlur($event, i)"
:disabled="filterDisabled(isEditReport)" :disabled="filterDisabled(isEditReport)"
:maxlength="3" :maxlength="3"
:key="dateKey[i.value]"
auto-blur
> >
</template> </template>
<template v-else-if="i.type == 'picker'"> <template v-else-if="i.type == 'picker'">
...@@ -102,7 +101,7 @@ ...@@ -102,7 +101,7 @@
<template v-for="(i,ind) in filterTemplateList"> <template v-for="(i,ind) in filterTemplateList">
<view <view
:class="['form-item flex',{name:i.name}]" :class="['form-item flex',{name:i.name}]"
:key="`${index}_${ind}_${dateKey}`" :key="`${index}_${ind}`"
:id="i.refId ? `${i.refId}_${index}` : ''" :id="i.refId ? `${i.refId}_${index}` : ''"
> >
<template v-if="i.name"> <template v-if="i.name">
...@@ -131,9 +130,11 @@ ...@@ -131,9 +130,11 @@
:value="item[i.key]" :value="item[i.key]"
:placeholder="i.inputPlaceholder || '请输入'" :placeholder="i.inputPlaceholder || '请输入'"
placeholder-class="placeholder" placeholder-class="placeholder"
@blur="handleCarInputBlur($event, i , item)" @blur="handleCarInputBlur($event, i , item , index)"
:maxlength="3" :maxlength="3"
:inputmode="i.inputmode || 'text'" :inputmode="i.inputmode || 'text'"
:key="dateKey[`${i.key}_${index}`]"
auto-blur
> >
</template> </template>
</view> </view>
...@@ -204,7 +205,7 @@ export default { ...@@ -204,7 +205,7 @@ export default {
data () { data () {
return { return {
to: '', to: '',
dateKey: Date.now(), dateKey: {},
loadComplete: false, loadComplete: false,
reportObject: Object.freeze([ reportObject: Object.freeze([
{ {
...@@ -445,7 +446,11 @@ export default { ...@@ -445,7 +446,11 @@ export default {
uni.hideLoading() uni.hideLoading()
let { brandDataList, remark } = data let { brandDataList, remark } = data
if (brandDataList && brandDataList.length) { if (brandDataList && brandDataList.length) {
carBandList = carBandList.map(item => { carBandList = carBandList.map((item, index) => {
this.dateKey[`deliveryCount_${index}`] = Date.now()
this.dateKey[`notDeliveryCount_${index}`] = Date.now()
this.dateKey[`equityToShopCount_${index}`] = Date.now()
this.dateKey[`afterSaleEquityToShopCount_${index}`] = Date.now()
let carBand = brandDataList.find(ele => { let carBand = brandDataList.find(ele => {
if ([0, 1].includes(ele.brandType)) { if ([0, 1].includes(ele.brandType)) {
return ele.brandType == item.brandType return ele.brandType == item.brandType
...@@ -474,14 +479,9 @@ export default { ...@@ -474,14 +479,9 @@ export default {
item[e.key] = null item[e.key] = null
}) })
} }
item.error = false
return item return item
}) })
} }
hwOhterObjArray = hwOhterObjArray.map(item => {
item.error = false
return item
})
let diffDay = dayjs().diff(dayjs(currentDate), 'day') let diffDay = dayjs().diff(dayjs(currentDate), 'day')
this.hwOhterObjArray = hwOhterObjArray this.hwOhterObjArray = hwOhterObjArray
this.carBandList = carBandList this.carBandList = carBandList
...@@ -506,7 +506,7 @@ export default { ...@@ -506,7 +506,7 @@ export default {
staffCountError: false, staffCountError: false,
} }
this.loadComplete = true this.loadComplete = true
this.dateKey = Date.now() this.dateKey.staffCount = Date.now()
}, },
title (item) { title (item) {
let title = '' let title = ''
...@@ -523,7 +523,7 @@ export default { ...@@ -523,7 +523,7 @@ export default {
numbers = numbers ? numbers.join('') : '' numbers = numbers ? numbers.join('') : ''
if (numbers.length > 1) numbers = numbers.replace(/^0+/, '') if (numbers.length > 1) numbers = numbers.replace(/^0+/, '')
this.orderObj[key] = Math.min(Math.max(Number(numbers), 0), 100).toString() this.orderObj[key] = Math.min(Math.max(Number(numbers), 0), 100).toString()
this.dateKey = Date.now() this.dateKey[key] = Date.now()
if ( if (
this.isNotEmpty(orderObj.recordStaffCount) && this.isNotEmpty(orderObj.recordStaffCount) &&
this.isNotEmpty(value) && this.isNotEmpty(value) &&
...@@ -547,7 +547,7 @@ export default { ...@@ -547,7 +547,7 @@ export default {
!(Array.isArray(value) && value.length === 0) !(Array.isArray(value) && value.length === 0)
) )
}, },
handleCarInputBlur (e, i, item) { handleCarInputBlur (e, i, item , index) {
let { value } = e.detail let { value } = e.detail
if (value) { if (value) {
let { key } = i, let { key } = i,
...@@ -555,7 +555,7 @@ export default { ...@@ -555,7 +555,7 @@ export default {
numbers = numbers ? numbers.join('') : '' numbers = numbers ? numbers.join('') : ''
if (numbers.length > 1) numbers = numbers.replace(/^0+/, '') if (numbers.length > 1) numbers = numbers.replace(/^0+/, '')
item[key] = Math.min(Math.max(Number(numbers), 0), 100).toString() item[key] = Math.min(Math.max(Number(numbers), 0), 100).toString()
this.dateKey = Date.now() this.dateKey[`${key}_${index}`] = Date.now()
} }
}, },
async submit () { async submit () {
......
...@@ -498,9 +498,9 @@ const DEFEAT_FORM_LIST = [ ...@@ -498,9 +498,9 @@ const DEFEAT_FORM_LIST = [
{ {
label: '车主拒升理由', label: '车主拒升理由',
value: 'refusalReason', value: 'refusalReason',
maxlength: '100', maxlength: '30',
type: 'textarea', type: 'textarea',
placeholder: '请输入 (100字以内)', placeholder: '请输入 (30字以内)',
class: 'cell-break', class: 'cell-break',
required: true, required: true,
addHtml: 'reasonList', addHtml: 'reasonList',
......
...@@ -5,38 +5,91 @@ ...@@ -5,38 +5,91 @@
<view class="title">登录</view> <view class="title">登录</view>
<view class="sub-title">手机号码登录</view> <view class="sub-title">手机号码登录</view>
<view class="input"> <view class="input">
<input type="tel" :value="mobile" placeholder="请输入手机号" maxlength="11" @blur="input($event, 'mobile')" :key="dateKey.mobile" /> <input
type="tel"
:value="mobile"
placeholder="请输入手机号"
maxlength="11"
@blur="input($event, 'mobile')"
:key="dateKey.mobile"
auto-blur
/>
<template v-if="mobile"> <template v-if="mobile">
<view class="icon" @click="mobile = ''"> <view
<icon type="clear" size="16" color="#000"></icon> class="icon"
@click="mobile = ''"
>
<icon
type="clear"
size="16"
color="#000"
></icon>
</view> </view>
</template> </template>
</view> </view>
<view class="input"> <view class="input">
<input type="number" :value="code" placeholder="请输入验证码" maxlength="4" @blur="input($event, 'code')" :key="dateKey.code" /> <input
type="number"
:value="code"
placeholder="请输入验证码"
maxlength="4"
@blur="input($event, 'code')"
:key="dateKey.code"
auto-blur
/>
<template v-if="code"> <template v-if="code">
<view class="icon" @click="code = ''"> <view
<icon type="clear" size="16" color="#000"></icon> class="icon"
@click="code = ''"
>
<icon
type="clear"
size="16"
color="#000"
></icon>
</view> </view>
</template> </template>
<view :class="['code-btn', `${count ? 'code-disabled' : ''}`]" @click="getSmsCode">{{ count ? `重新发送(${count}s)` : '获取验证码' }}</view> <view
:class="['code-btn', `${count ? 'code-disabled' : ''}`]"
@click="getSmsCode"
>{{ count ? `重新发送(${count}s)` : '获取验证码' }}</view>
</view> </view>
<button class="btn" @click="login">登录</button> <button
class="btn"
@click="login"
>登录</button>
<view class="form-footer"> <view class="form-footer">
<view class="autoLogin" @click="readingStatus = !readingStatus"> <view
<uni-icons :type="`${readingStatus ? 'checkbox-filled' : 'circle'}`" :size="18" :color="`${readingStatus ? '#2C66F7' : '#858A94'}`"></uni-icons> class="autoLogin"
@click="readingStatus = !readingStatus"
>
<uni-icons
:type="`${readingStatus ? 'checkbox-filled' : 'circle'}`"
:size="18"
:color="`${readingStatus ? '#2C66F7' : '#858A94'}`"
></uni-icons>
我已阅读并同意 我已阅读并同意
<text @click.stop="jumpUrl()">《用户隐私协议》</text> <text @click.stop="jumpUrl()">《用户隐私协议》</text>
</view> </view>
<view class="autoLogin" @click="noSignIn = !noSignIn"> <view
<uni-icons :type="`${noSignIn ? 'checkbox-filled' : 'circle'}`" :size="18" :color="`${noSignIn ? '#2C66F7' : '#858A94'}`"></uni-icons> class="autoLogin"
@click="noSignIn = !noSignIn"
>
<uni-icons
:type="`${noSignIn ? 'checkbox-filled' : 'circle'}`"
:size="18"
:color="`${noSignIn ? '#2C66F7' : '#858A94'}`"
></uni-icons>
30天内免登录 30天内免登录
</view> </view>
</view> </view>
</view> </view>
<view class="app-code flex"> <view class="app-code flex">
APP编码:{{ deviceId }} APP编码:{{ deviceId }}
<view class="sprite-icon icon-clone" @click="copyText"></view> <view
class="sprite-icon icon-clone"
@click="copyText"
></view>
</view> </view>
<update-box /> <update-box />
</view> </view>
...@@ -57,27 +110,47 @@ export default { ...@@ -57,27 +110,47 @@ export default {
} }
}; };
}, },
watch: {
code: {
handler (val) {
this.autoLoginByMobile()
},
immediate: true,
deep: true
},
mobile: {
handler (val) {
this.autoLoginByMobile()
},
immediate: true,
deep: true
}
},
onLoad (options) { onLoad (options) {
if (options.mobile) this.mobile = options.mobile if (options.mobile) this.mobile = options.mobile
const noSignInUuid = uni.$storage.get('noSignInUuid') const noSignInUuid = uni.$storage.get('noSignInUuid')
if (noSignInUuid) this.autoLogin(noSignInUuid) if (noSignInUuid) this.autoLogin(noSignInUuid)
const { const {
deviceId deviceId
} = uni.getDeviceInfo() } = uni.getDeviceInfo()
this.deviceId = deviceId this.deviceId = deviceId
}, },
methods: { methods: {
copyText() { autoLoginByMobile () {
uni.setClipboardData({ let { mobile, code } = this
data: this.deviceId, if (code && mobile && code.length == 4 && phoneRex.test(mobile)) this.login()
success: function() { },
uni.showToast({ copyText () {
title: '复制成功', uni.setClipboardData({
icon: 'success' data: this.deviceId,
}); success: function () {
} uni.showToast({
}); title: '复制成功',
}, icon: 'success'
});
}
});
},
async autoLogin (noSignInUuid) { async autoLogin (noSignInUuid) {
uni.showLoading({ uni.showLoading({
mask: true mask: true
......
...@@ -37,6 +37,10 @@ class Track { ...@@ -37,6 +37,10 @@ class Track {
if (data.businessId) item.businessId = data.businessId if (data.businessId) item.businessId = data.businessId
trackList.push(item) trackList.push(item)
uni.setStorageSync('TRACK_LIST', trackList) uni.setStorageSync('TRACK_LIST', trackList)
if (!TRACK_TIME) {
console.log('---------------- 重新打开定时埋点 ----------------')
this.sendTrack() //开启定时埋点
}
if (trackList.length > 9) this.sendTrackData() if (trackList.length > 9) this.sendTrackData()
} }
...@@ -52,8 +56,11 @@ class Track { ...@@ -52,8 +56,11 @@ class Track {
const recordList = uni.getStorageSync('TRACK_LIST') || [] const recordList = uni.getStorageSync('TRACK_LIST') || []
if (recordList.length) { if (recordList.length) {
const res = await uni.$api.commonApi.recordInsert({ recordList }) const res = await uni.$api.commonApi.recordInsert({ recordList })
if (res) if (res) uni.setStorageSync('TRACK_LIST', [])
uni.setStorageSync('TRACK_LIST', []) } else {
clearInterval(TRACK_TIME)
TRACK_TIME = null
console.log('---------------- 暂停定时埋点 ----------------')
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!