Browse Source

fix bug

dev
liujiangyong 2 years ago
parent
commit
e7d6515c73
  1. 34
      weapp/src/packages/patrol/index.jsx

34
weapp/src/packages/patrol/index.jsx

@ -645,9 +645,9 @@ const Index = () => {
break;
case "conserveContent":
let nextContent = { ...conserveContent }
if (value.split('.')[1] && value.split('.')[1].length > 3) {
if (value.split('.')[1] && value.split('.')[1].length > 3 || value.includes('-')) {
setConserveContent(nextContent)
Taro.showToast({ title: '最多输入三位小数', icon: 'none', duration: 1500 })
Taro.showToast({ title: '请输入最多三位小数的正数', icon: 'none', duration: 1500 })
return;
}
nextContent[key].value = value
@ -956,22 +956,26 @@ const Index = () => {
<Input
style={{ width: '30%' }}
type='text'
value={roadCodeHead === 'X' ? '县道' : roadCodeHead === 'Y' ? '乡道' : '村道'}
value={isView && isBeforeReport
? projectType
: roadCodeHead === 'X' ? '县道' : roadCodeHead === 'Y' ? '乡道' : '村道'}
onInput={() => { }}
disabled={true}
/>
<Text>其他</Text>
<InputPicker
width='30%'
star={false}
onlySelect
title=''
placeholder=''
value={projectType}
onInput={(value) => setProjectType(value === '无' ? '' : value)}
selector={prjTypeSelector}
isView={isView}
/>
{!(isView && isBeforeReport) && <>
<Text>其他</Text>
<InputPicker
width='30%'
star={false}
onlySelect
title=''
placeholder=''
value={projectType}
onInput={(value) => setProjectType(value === '无' ? '' : value)}
selector={prjTypeSelector}
isView={isView}
/>
</>}
</View>
<InputPicker
title='路线名称:'

Loading…
Cancel
Save