Commit da54d548 authored by Facius's avatar Facius

improve: 【前后台】流水号限制长度8位数字,输入框提示:请填写交易流水号后8位数字

parent fa1d7492
<!-- ******************* 输入框 ******************* --> <!-- ******************* 输入框 ******************* -->
<template> <template>
<view :style="{ width: fieldsWidth }"> <view :style="{ width: fieldsWidth }" class="input-view-class">
<view class="tip-span" v-if="showTip">({{placeholderText}})</view>
<u-input <u-input
:type="type" :type="type"
class="input-item" class="input-item"
...@@ -16,6 +17,7 @@ ...@@ -16,6 +17,7 @@
:cursor-spacing="10" :cursor-spacing="10"
:disabled="isDisabled" :disabled="isDisabled"
hold-keyboard hold-keyboard
@blur="showTip=dataValue.length < maxlength && isESerialNum"
/> />
<view class="content" v-if="slotContent"> <view class="content" v-if="slotContent">
<text class="txt">{{ slotContent }}</text> <text class="txt">{{ slotContent }}</text>
...@@ -52,6 +54,7 @@ export default { ...@@ -52,6 +54,7 @@ export default {
data() { data() {
return { return {
inputType: 'text', inputType: 'text',
showTip: false,
} }
}, },
computed: { computed: {
...@@ -105,6 +108,8 @@ export default { ...@@ -105,6 +108,8 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.input-view-class {
position: relative;
.input-item { .input-item {
background: #f4f5f7; background: #f4f5f7;
} }
...@@ -116,4 +121,13 @@ export default { ...@@ -116,4 +121,13 @@ export default {
color: #999; color: #999;
} }
} }
.tip-span {
position: absolute;
font-size: 28rpx;
color: #FA5A49;
right: 140rpx;
top: -74rpx;
}
}
</style> </style>
...@@ -826,11 +826,9 @@ export default { ...@@ -826,11 +826,9 @@ export default {
if (ele.required) { if (ele.required) {
panelResult.required++ panelResult.required++
let value = this.form[ele.fieldsName] let value = this.form[ele.fieldsName]
if (value && !Array.isArray(value)) { // "ele.fieldsName != 'eSerialNum' || value.length == 8" 意思是: "非付款流水号 || 8位付款流水号"
// 非付款流水号 || 8位付款流水号 if (value && !Array.isArray(value) && (ele.fieldsName != 'eSerialNum' || value.length == 8)) {
if (ele.fieldsName != 'eSerialNum' || value.length == 8) {
panelResult.submitted++ panelResult.submitted++
}
} else if (value && Array.isArray(value) && value.length > 0) { } else if (value && Array.isArray(value) && value.length > 0) {
if (ele.fieldsName === 'materialList') { if (ele.fieldsName === 'materialList') {
let hasMate = false let hasMate = false
......
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