Commit 26a22b11 by cen

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

2 parents e45a59d4 c7d75452
......@@ -8,10 +8,7 @@
:scroll-into-view="to"
@scroll="to = ''"
>
<view
class="repoet-box"
:key="dateKey"
>
<view class="repoet-box">
<template v-if="loadComplete">
<view class="box">
......@@ -40,6 +37,8 @@
@blur="handleBlur($event, i)"
:disabled="filterDisabled(isEditReport)"
:maxlength="3"
:key="dateKey[i.value]"
auto-blur
>
</template>
<template v-else-if="i.type == 'picker'">
......@@ -102,7 +101,7 @@
<template v-for="(i,ind) in filterTemplateList">
<view
:class="['form-item flex',{name:i.name}]"
:key="`${index}_${ind}_${dateKey}`"
:key="`${index}_${ind}`"
:id="i.refId ? `${i.refId}_${index}` : ''"
>
<template v-if="i.name">
......@@ -131,9 +130,11 @@
:value="item[i.key]"
:placeholder="i.inputPlaceholder || '请输入'"
placeholder-class="placeholder"
@blur="handleCarInputBlur($event, i , item)"
@blur="handleCarInputBlur($event, i , item , index)"
:maxlength="3"
:inputmode="i.inputmode || 'text'"
:key="dateKey[`${i.key}_${index}`]"
auto-blur
>
</template>
</view>
......@@ -204,7 +205,7 @@ export default {
data () {
return {
to: '',
dateKey: Date.now(),
dateKey: {},
loadComplete: false,
reportObject: Object.freeze([
{
......@@ -445,7 +446,11 @@ export default {
uni.hideLoading()
let { brandDataList, remark } = data
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 => {
if ([0, 1].includes(ele.brandType)) {
return ele.brandType == item.brandType
......@@ -474,14 +479,9 @@ export default {
item[e.key] = null
})
}
item.error = false
return item
})
}
hwOhterObjArray = hwOhterObjArray.map(item => {
item.error = false
return item
})
let diffDay = dayjs().diff(dayjs(currentDate), 'day')
this.hwOhterObjArray = hwOhterObjArray
this.carBandList = carBandList
......@@ -506,7 +506,7 @@ export default {
staffCountError: false,
}
this.loadComplete = true
this.dateKey = Date.now()
this.dateKey.staffCount = Date.now()
},
title (item) {
let title = ''
......@@ -523,7 +523,7 @@ export default {
numbers = numbers ? numbers.join('') : ''
if (numbers.length > 1) numbers = numbers.replace(/^0+/, '')
this.orderObj[key] = Math.min(Math.max(Number(numbers), 0), 100).toString()
this.dateKey = Date.now()
this.dateKey[key] = Date.now()
if (
this.isNotEmpty(orderObj.recordStaffCount) &&
this.isNotEmpty(value) &&
......@@ -547,7 +547,7 @@ export default {
!(Array.isArray(value) && value.length === 0)
)
},
handleCarInputBlur (e, i, item) {
handleCarInputBlur (e, i, item , index) {
let { value } = e.detail
if (value) {
let { key } = i,
......@@ -555,7 +555,7 @@ export default {
numbers = numbers ? numbers.join('') : ''
if (numbers.length > 1) numbers = numbers.replace(/^0+/, '')
item[key] = Math.min(Math.max(Number(numbers), 0), 100).toString()
this.dateKey = Date.now()
this.dateKey[`${key}_${index}`] = Date.now()
}
},
async submit () {
......
......@@ -5,38 +5,91 @@
<view class="title">登录</view>
<view class="sub-title">手机号码登录</view>
<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">
<view class="icon" @click="mobile = ''">
<icon type="clear" size="16" color="#000"></icon>
<view
class="icon"
@click="mobile = ''"
>
<icon
type="clear"
size="16"
color="#000"
></icon>
</view>
</template>
</view>
<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">
<view class="icon" @click="code = ''">
<icon type="clear" size="16" color="#000"></icon>
<view
class="icon"
@click="code = ''"
>
<icon
type="clear"
size="16"
color="#000"
></icon>
</view>
</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>
<button class="btn" @click="login">登录</button>
<button
class="btn"
@click="login"
>登录</button>
<view class="form-footer">
<view class="autoLogin" @click="readingStatus = !readingStatus">
<uni-icons :type="`${readingStatus ? 'checkbox-filled' : 'circle'}`" :size="18" :color="`${readingStatus ? '#2C66F7' : '#858A94'}`"></uni-icons>
<view
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>
</view>
<view class="autoLogin" @click="noSignIn = !noSignIn">
<uni-icons :type="`${noSignIn ? 'checkbox-filled' : 'circle'}`" :size="18" :color="`${noSignIn ? '#2C66F7' : '#858A94'}`"></uni-icons>
<view
class="autoLogin"
@click="noSignIn = !noSignIn"
>
<uni-icons
:type="`${noSignIn ? 'checkbox-filled' : 'circle'}`"
:size="18"
:color="`${noSignIn ? '#2C66F7' : '#858A94'}`"
></uni-icons>
30天内免登录
</view>
</view>
</view>
<view class="app-code flex">
APP编码:{{ deviceId }}
<view class="sprite-icon icon-clone" @click="copyText"></view>
<view
class="sprite-icon icon-clone"
@click="copyText"
></view>
</view>
<update-box />
</view>
......@@ -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) {
if (options.mobile) this.mobile = options.mobile
const noSignInUuid = uni.$storage.get('noSignInUuid')
if (noSignInUuid) this.autoLogin(noSignInUuid)
const {
deviceId
} = uni.getDeviceInfo()
this.deviceId = deviceId
},
methods: {
copyText() {
uni.setClipboardData({
data: this.deviceId,
success: function() {
uni.showToast({
title: '复制成功',
icon: 'success'
});
}
});
},
const {
deviceId
} = uni.getDeviceInfo()
this.deviceId = deviceId
},
methods: {
autoLoginByMobile () {
let { mobile, code } = this
if (code && mobile && code.length == 4 && phoneRex.test(mobile)) this.login()
},
copyText () {
uni.setClipboardData({
data: this.deviceId,
success: function () {
uni.showToast({
title: '复制成功',
icon: 'success'
});
}
});
},
async autoLogin (noSignInUuid) {
uni.showLoading({
mask: true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!