中文冒号 金额补0
This commit is contained in:
@@ -36,6 +36,7 @@ export function filterObj(obj) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for ( let key in obj) {
|
for ( let key in obj) {
|
||||||
|
// eslint-disable-next-line
|
||||||
if (obj.hasOwnProperty(key)
|
if (obj.hasOwnProperty(key)
|
||||||
&& (obj[key] == null || obj[key] == undefined || obj[key] === '')) {
|
&& (obj[key] == null || obj[key] == undefined || obj[key] === '')) {
|
||||||
delete obj[key]
|
delete obj[key]
|
||||||
@@ -86,6 +87,7 @@ let indexRouter = [{
|
|||||||
path: '/',
|
path: '/',
|
||||||
name: 'dashboard',
|
name: 'dashboard',
|
||||||
//component: () => import('@/components/layouts/BasicLayout'),
|
//component: () => import('@/components/layouts/BasicLayout'),
|
||||||
|
// eslint-disable-next-line
|
||||||
component: resolve => require(['@/components/layouts/TabLayout'], resolve),
|
component: resolve => require(['@/components/layouts/TabLayout'], resolve),
|
||||||
meta: { title: '首页' },
|
meta: { title: '首页' },
|
||||||
redirect: '/dashboard/analysis',
|
redirect: '/dashboard/analysis',
|
||||||
@@ -136,6 +138,7 @@ function generateChildRouters (data) {
|
|||||||
// }else if(item.component=="modules/online/cgreport/auto/OnlCgreportAutoList"){
|
// }else if(item.component=="modules/online/cgreport/auto/OnlCgreportAutoList"){
|
||||||
// componentPath = onlineCommons.OnlCgreportAutoList
|
// componentPath = onlineCommons.OnlCgreportAutoList
|
||||||
// }else{
|
// }else{
|
||||||
|
// eslint-disable-next-line
|
||||||
componentPath = resolve => require(['@/' + component+'.vue'], resolve)
|
componentPath = resolve => require(['@/' + component+'.vue'], resolve)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@@ -587,3 +590,34 @@ export function isRepeat(arr) {
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 补充0
|
||||||
|
* */
|
||||||
|
|
||||||
|
export function addZero(e) {
|
||||||
|
// (e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}
|
||||||
|
console.log(e)
|
||||||
|
// 判断是否包含 .
|
||||||
|
let value = e.target.value
|
||||||
|
// 判断是否包含小数点
|
||||||
|
if (value.includes('.')) {
|
||||||
|
// 获取索引
|
||||||
|
let index = value.indexOf('.')
|
||||||
|
console.log('index', index)
|
||||||
|
// 小树点之前的数
|
||||||
|
let beforePointValue = value.slice(0, index + 1)
|
||||||
|
// 小数点之后的数字
|
||||||
|
let afterPointValue = value.slice(index + 1)
|
||||||
|
// 大于等于2
|
||||||
|
if (afterPointValue.length >= 2) {
|
||||||
|
e.target.value = beforePointValue + afterPointValue
|
||||||
|
}else {
|
||||||
|
// 不足2位补0
|
||||||
|
afterPointValue = afterPointValue.padEnd(2,'0')
|
||||||
|
e.target.value = beforePointValue + afterPointValue
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
// 不包括小数点
|
||||||
|
e.target.value = e.target.value + '.00'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -49,7 +49,6 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--工作组会议才有-->
|
<!--工作组会议才有-->
|
||||||
<a-col :xxl="8" :xl="12" :sm="24" v-if="meetingType === '1' ">
|
<a-col :xxl="8" :xl="12" :sm="24" v-if="meetingType === '1' ">
|
||||||
<a-form-item label="工作组" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="工作组" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
@@ -201,6 +200,7 @@
|
|||||||
<a-input placeholder="请输入会议费用"
|
<a-input placeholder="请输入会议费用"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}"
|
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}"
|
||||||
|
@blur="addZero"
|
||||||
v-decorator="[ 'meetingCosts',validatorRules.meetingCosts]"></a-input>
|
v-decorator="[ 'meetingCosts',validatorRules.meetingCosts]"></a-input>
|
||||||
<span class="yuan">元/人</span>
|
<span class="yuan">元/人</span>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -329,6 +329,7 @@ import pick from 'lodash.pick'
|
|||||||
import meetingValidate from '@views/incomePayments/meetManage/meetingValidate'
|
import meetingValidate from '@views/incomePayments/meetManage/meetingValidate'
|
||||||
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||||
import {checkMeetingName} from '@/utils/validateOnly'
|
import {checkMeetingName} from '@/utils/validateOnly'
|
||||||
|
import {addZero} from '@/utils/util'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddOrDetailMeet',
|
name: 'AddOrDetailMeet',
|
||||||
@@ -432,6 +433,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
moment,
|
moment,
|
||||||
|
addZero,
|
||||||
/*
|
/*
|
||||||
* 新增
|
* 新增
|
||||||
* */
|
* */
|
||||||
|
|||||||
@@ -10,22 +10,22 @@
|
|||||||
<section class="project-base-info-content">
|
<section class="project-base-info-content">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :xxl="8" :xl="12" :sm="24">
|
<a-col :xxl="8" :xl="12" :sm="24">
|
||||||
<label>会员项目:</label><span>{{ currentInfo.projectName }}</span>
|
<label>会员项目:</label><span>{{ currentInfo.projectName }}</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="8" :xl="12" :sm="24">
|
<a-col :xxl="8" :xl="12" :sm="24">
|
||||||
<label>负责人:</label><span>{{ currentInfo.directorName }}</span>
|
<label>负责人:</label><span>{{ currentInfo.directorName }}</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="8" :xl="12" :sm="24">
|
<a-col :xxl="8" :xl="12" :sm="24">
|
||||||
<label>收费标准:</label><span>{{ currentInfo.chargeStandard }}</span>
|
<label>收费标准:</label><span>{{ currentInfo.chargeStandard }}</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="8" :xl="12" :sm="24">
|
<a-col :xxl="8" :xl="12" :sm="24">
|
||||||
<label>收费通知号:</label><span>{{ currentInfo.chargeNoticeNo }}</span>
|
<label>收费通知号:</label><span>{{ currentInfo.chargeNoticeNo }}</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="8" :xl="12" :sm="24">
|
<a-col :xxl="8" :xl="12" :sm="24">
|
||||||
<label>收费通知:</label><preview-file :file-id="currentInfo.chargeNoticeFileId"></preview-file>
|
<label>收费通知:</label><preview-file :file-id="currentInfo.chargeNoticeFileId"></preview-file>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="8" :xl="12" :sm="24">
|
<a-col :xxl="8" :xl="12" :sm="24">
|
||||||
<label>备注:</label><span>{{ currentInfo.remark }}</span>
|
<label>备注:</label><span>{{ currentInfo.remark }}</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user