bug修改,统计查询限制
This commit is contained in:
@@ -167,6 +167,7 @@
|
|||||||
<invoicing-stage-module
|
<invoicing-stage-module
|
||||||
ref="invoicingStage"
|
ref="invoicingStage"
|
||||||
:visible.sync="invoicingStageVisible"
|
:visible.sync="invoicingStageVisible"
|
||||||
|
:mail-contacts-id="companyDataById.packContactId"
|
||||||
:project-id="selectProjectId"
|
:project-id="selectProjectId"
|
||||||
:project-type="selectProjectType"
|
:project-type="selectProjectType"
|
||||||
:project-name="selectProjectName"
|
:project-name="selectProjectName"
|
||||||
|
|||||||
@@ -42,9 +42,17 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||||
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoney" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoney"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('start')"></a-input>
|
||||||
<span class="query-group-split-cust"></span>
|
<span class="query-group-split-cust"></span>
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoneyTwo" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoneyTwo"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('end')"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
@@ -68,7 +76,8 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
||||||
<span class="table-page-search-submitButtons">
|
<span class="table-page-search-submitButtons">
|
||||||
<a-button type="primary" icon="search" @click="searchQuery" v-has="'wholeInstituteStatistics:search'">查询</a-button>
|
<a-button type="primary" icon="search" @click="searchQuery"
|
||||||
|
v-has="'wholeInstituteStatistics:search'">查询</a-button>
|
||||||
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
||||||
</span>
|
</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -79,7 +88,9 @@
|
|||||||
|
|
||||||
<!-- 操作按钮区域-->
|
<!-- 操作按钮区域-->
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<a-button type="primary" icon="export" @click="handleExportXls('全所统计')" v-has="'wholeInstituteStatistics:export'">导出</a-button>
|
<a-button type="primary" icon="export" @click="handleExportXls('全所统计')"
|
||||||
|
v-has="'wholeInstituteStatistics:export'">导出
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 操作按钮区域-end-->
|
<!-- 操作按钮区域-end-->
|
||||||
|
|
||||||
@@ -226,7 +237,7 @@ export default {
|
|||||||
key: 'rowIndex',
|
key: 'rowIndex',
|
||||||
width: 120,
|
width: 120,
|
||||||
align: 'center'
|
align: 'center'
|
||||||
}, {
|
}, {
|
||||||
title: '项目名称',
|
title: '项目名称',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
// width: 200,
|
// width: 200,
|
||||||
@@ -274,7 +285,8 @@ export default {
|
|||||||
url: {
|
url: {
|
||||||
list: '/statistics/allProjectStatistics/list',
|
list: '/statistics/allProjectStatistics/list',
|
||||||
exportXlsUrl: '/statistics/allProjectStatistics/statistics/excel'
|
exportXlsUrl: '/statistics/allProjectStatistics/statistics/excel'
|
||||||
}
|
},
|
||||||
|
validateMoney: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -292,7 +304,6 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
let dom = this.$refs.footTable.$el.querySelectorAll('.ant-table-body')[0]
|
let dom = this.$refs.footTable.$el.querySelectorAll('.ant-table-body')[0]
|
||||||
console.log(this.$refs.footTable.$el.querySelectorAll('.ant-table-body'))
|
|
||||||
dom.addEventListener(
|
dom.addEventListener(
|
||||||
'scroll',
|
'scroll',
|
||||||
() => {
|
() => {
|
||||||
@@ -331,6 +342,12 @@ export default {
|
|||||||
this.ipagination.current = 1
|
this.ipagination.current = 1
|
||||||
}
|
}
|
||||||
let params = this.getQueryParams()//查询条件
|
let params = this.getQueryParams()//查询条件
|
||||||
|
if (params.hasOwnProperty.call(params, 'allMoney') && params.hasOwnProperty.call(params, 'allMoneyTwo')) {
|
||||||
|
if (Number(params.allMoney) > Number(params.allMoneyTwo)) {
|
||||||
|
this.$message.warn('应收款项范围不正确,请修改')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.list, params).then((res) => {
|
getAction(this.url.list, params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -373,6 +390,52 @@ export default {
|
|||||||
}
|
}
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 搜索金额校验
|
||||||
|
* @param type 起始范围--start,终止范围--end
|
||||||
|
*/
|
||||||
|
checkMoney(type) {
|
||||||
|
if (type === 'start') {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoney.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoney.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoney = str + this.queryParam.allMoney.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoney.length > 10) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (type === 'end') {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoneyTwo.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoneyTwo.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoneyTwo = str + this.queryParam.allMoneyTwo.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoneyTwo.length > 10) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+57
-3
@@ -31,9 +31,17 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||||
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoney" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoney"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('start')"></a-input>
|
||||||
<span class="query-group-split-cust"></span>
|
<span class="query-group-split-cust"></span>
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoneyTwo" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoneyTwo"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('end')"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
||||||
@@ -141,7 +149,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 给定当年作为来款年份默认查询条件
|
// 给定当年作为来款年份默认查询条件
|
||||||
queryParam: {
|
queryParam: {
|
||||||
year: new Date().getFullYear().toString(),
|
year: new Date().getFullYear().toString()
|
||||||
},
|
},
|
||||||
lastQueryParam: {
|
lastQueryParam: {
|
||||||
year: new Date().getFullYear().toString()
|
year: new Date().getFullYear().toString()
|
||||||
@@ -295,6 +303,52 @@ export default {
|
|||||||
}
|
}
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 搜索金额校验
|
||||||
|
* @param type 起始范围--start,终止范围--end
|
||||||
|
*/
|
||||||
|
checkMoney(type) {
|
||||||
|
if (type === 'start') {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoney.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoney.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoney = str + this.queryParam.allMoney.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoney.length > 10) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (type === 'end') {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoneyTwo.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoneyTwo.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoneyTwo = str + this.queryParam.allMoneyTwo.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoneyTwo.length > 10) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+56
-2
@@ -19,9 +19,17 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||||
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoney" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoney"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('start')"></a-input>
|
||||||
<span class="query-group-split-cust"></span>
|
<span class="query-group-split-cust"></span>
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoneyTwo" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoneyTwo"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('end')"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
@@ -313,6 +321,52 @@ export default {
|
|||||||
year: new Date().getFullYear().toString()
|
year: new Date().getFullYear().toString()
|
||||||
}
|
}
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 搜索金额校验
|
||||||
|
* @param type 起始范围--start,终止范围--end
|
||||||
|
*/
|
||||||
|
checkMoney(type) {
|
||||||
|
if (type === 'start') {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoney.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoney.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoney = str + this.queryParam.allMoney.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoney.length > 10) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (type === 'end') {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoneyTwo.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoneyTwo.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoneyTwo = str + this.queryParam.allMoneyTwo.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoneyTwo.length > 10) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,9 +29,17 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||||
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoney" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoney"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('start')"></a-input>
|
||||||
<span class="query-group-split-cust"></span>
|
<span class="query-group-split-cust"></span>
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoneyTwo" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoneyTwo"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('end')"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
@@ -262,7 +270,7 @@ export default {
|
|||||||
treeDepartData: [], // 部门数据
|
treeDepartData: [], // 部门数据
|
||||||
replaceFields: {
|
replaceFields: {
|
||||||
value: 'orgCode'
|
value: 'orgCode'
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -358,6 +366,52 @@ export default {
|
|||||||
year: new Date().getFullYear().toString()
|
year: new Date().getFullYear().toString()
|
||||||
}
|
}
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 搜索金额校验
|
||||||
|
* @param type 起始范围--start,终止范围--end
|
||||||
|
*/
|
||||||
|
checkMoney(type) {
|
||||||
|
if (type === 'start') {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoney.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoney.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoney = str + this.queryParam.allMoney.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoney.length > 10) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (type === 'end') {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoneyTwo.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoneyTwo.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoneyTwo = str + this.queryParam.allMoneyTwo.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoneyTwo.length > 10) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+57
-3
@@ -31,9 +31,17 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||||
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoney" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoney"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('start')"></a-input>
|
||||||
<span class="query-group-split-cust"></span>
|
<span class="query-group-split-cust"></span>
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoneyTwo" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoneyTwo"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('end')"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
||||||
@@ -150,7 +158,7 @@ export default {
|
|||||||
customRender: function (t, r, index) {
|
customRender: function (t, r, index) {
|
||||||
return parseInt(index) + 1
|
return parseInt(index) + 1
|
||||||
}
|
}
|
||||||
},{
|
}, {
|
||||||
title: '来款项目',
|
title: '来款项目',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'projectName',
|
dataIndex: 'projectName',
|
||||||
@@ -295,6 +303,52 @@ export default {
|
|||||||
year: new Date().getFullYear().toString()
|
year: new Date().getFullYear().toString()
|
||||||
}
|
}
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 搜索金额校验
|
||||||
|
* @param type 起始范围--start,终止范围--end
|
||||||
|
*/
|
||||||
|
checkMoney(type) {
|
||||||
|
if (type === 'start') {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoney.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoney.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoney = str + this.queryParam.allMoney.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoney.length > 10) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (type === 'end') {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoneyTwo.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoneyTwo.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoneyTwo = str + this.queryParam.allMoneyTwo.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoneyTwo.length > 10) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+64
-6
@@ -9,7 +9,8 @@
|
|||||||
<a-row>
|
<a-row>
|
||||||
<a-col :xxl="4" :xl="10" :lg="12" :md="12" :sm="24">
|
<a-col :xxl="4" :xl="10" :lg="12" :md="12" :sm="24">
|
||||||
<a-form-item label="来款企业" :labelCol="labelCol" :wrapperCol="wrapperCol" style="margin-bottom: -1px">
|
<a-form-item label="来款企业" :labelCol="labelCol" :wrapperCol="wrapperCol" style="margin-bottom: -1px">
|
||||||
<company-select :can-add="false" placeholder="请选择来款企业" v-model="queryParam.chargeCompany"></company-select>
|
<company-select :can-add="false" placeholder="请选择来款企业"
|
||||||
|
v-model="queryParam.chargeCompany"></company-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="4" :xl="10" :lg="12" :md="12" :sm="24">
|
<a-col :xxl="4" :xl="10" :lg="12" :md="12" :sm="24">
|
||||||
@@ -19,14 +20,23 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||||
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoney" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoney"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('start')"></a-input>
|
||||||
<span class="query-group-split-cust"></span>
|
<span class="query-group-split-cust"></span>
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoneyTwo" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoneyTwo"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('end')"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
||||||
<span class="table-page-search-submitButtons">
|
<span class="table-page-search-submitButtons">
|
||||||
<a-button type="primary" icon="search" @click="searchQuery" v-has="'companyPaymentStatistics:search'">查询</a-button>
|
<a-button type="primary" icon="search" @click="searchQuery"
|
||||||
|
v-has="'companyPaymentStatistics:search'">查询</a-button>
|
||||||
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
||||||
</span>
|
</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -37,7 +47,9 @@
|
|||||||
|
|
||||||
<!-- 操作按钮区域-->
|
<!-- 操作按钮区域-->
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<a-button type="primary" icon="export" @click="handleExportXls('企业来款统计')" v-has="'companyPaymentStatistics:export'">导出</a-button>
|
<a-button type="primary" icon="export" @click="handleExportXls('企业来款统计')"
|
||||||
|
v-has="'companyPaymentStatistics:export'">导出
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 操作按钮区域-end-->
|
<!-- 操作按钮区域-end-->
|
||||||
|
|
||||||
@@ -207,7 +219,7 @@ export default {
|
|||||||
},
|
},
|
||||||
lastQueryParam: {
|
lastQueryParam: {
|
||||||
year: new Date().getFullYear().toString()
|
year: new Date().getFullYear().toString()
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -314,6 +326,52 @@ export default {
|
|||||||
year: new Date().getFullYear().toString()
|
year: new Date().getFullYear().toString()
|
||||||
}
|
}
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 搜索金额校验
|
||||||
|
* @param type 起始范围--start,终止范围--end
|
||||||
|
*/
|
||||||
|
checkMoney(type) {
|
||||||
|
if (type === 'start') {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoney.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoney.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoney = str + this.queryParam.allMoney.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoney.length > 10) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (type === 'end') {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoneyTwo.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoneyTwo.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoneyTwo = str + this.queryParam.allMoneyTwo.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoneyTwo.length > 10) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+64
-10
@@ -12,11 +12,11 @@
|
|||||||
<a-input placeholder="请输入来款单位" v-model="queryParam.chargeCompanyTemporaryName"></a-input>
|
<a-input placeholder="请输入来款单位" v-model="queryParam.chargeCompanyTemporaryName"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
|
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
|
||||||
<!-- <a-form-item label="来款项目" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
<!-- <a-form-item label="来款项目" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
<!-- <a-input placeholder="请输入来款项目" v-model="queryParam.projectName"></a-input>-->
|
<!-- <a-input placeholder="请输入来款项目" v-model="queryParam.projectName"></a-input>-->
|
||||||
<!-- </a-form-item>-->
|
<!-- </a-form-item>-->
|
||||||
</a-col>
|
<!-- </a-col>-->
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
<a-form-item label="来款用途" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="来款用途" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<j-dict-select-tag v-model="queryParam.chargeUse" placeholder="请选择来款用途" dictCode="payment_charge_use"/>
|
<j-dict-select-tag v-model="queryParam.chargeUse" placeholder="请选择来款用途" dictCode="payment_charge_use"/>
|
||||||
@@ -36,9 +36,17 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||||
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoney" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoney"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('start')"></a-input>
|
||||||
<span class="query-group-split-cust"></span>
|
<span class="query-group-split-cust"></span>
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoneyTwo" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoneyTwo"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('end')"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="5" :xl="8" :lg="7" :md="8" :sm="24">
|
<a-col :xxl="5" :xl="8" :lg="7" :md="8" :sm="24">
|
||||||
@@ -94,7 +102,7 @@
|
|||||||
<a @click="goDetail(record.id)">详情</a>
|
<a @click="goDetail(record.id)">详情</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<template slot="footer" slot-scope="currentPageData" v-if="dataSource.length > 0">
|
<template slot="footer" v-if="dataSource.length > 0">
|
||||||
|
|
||||||
<a-table
|
<a-table
|
||||||
size="middle"
|
size="middle"
|
||||||
@@ -150,7 +158,7 @@ export default {
|
|||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
list: '/project/payWorkingGroupStatistics/listSub',
|
list: '/project/payWorkingGroupStatistics/listSub',
|
||||||
exportXlsUrl: '/project/payWorkingGroupStatistics/excelSub',
|
exportXlsUrl: '/project/payWorkingGroupStatistics/excelSub'
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@@ -257,7 +265,7 @@ export default {
|
|||||||
},
|
},
|
||||||
lastQueryParam: {
|
lastQueryParam: {
|
||||||
year: new Date().getFullYear().toString()
|
year: new Date().getFullYear().toString()
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -326,6 +334,52 @@ export default {
|
|||||||
}
|
}
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 搜索金额校验
|
||||||
|
* @param type 起始范围--start,终止范围--end
|
||||||
|
*/
|
||||||
|
checkMoney(type) {
|
||||||
|
if (type === 'start') {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoney.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoney.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoney = str + this.queryParam.allMoney.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoney.length > 10) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (type === 'end') {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoneyTwo.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoneyTwo.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoneyTwo = str + this.queryParam.allMoneyTwo.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoneyTwo.length > 10) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+56
-2
@@ -19,9 +19,17 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||||
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="应收款项" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoney" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoney"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('start')"></a-input>
|
||||||
<span class="query-group-split-cust"></span>
|
<span class="query-group-split-cust"></span>
|
||||||
<a-input placeholder="请输入应收款项" v-model="queryParam.allMoneyTwo" class="query-group-cust"></a-input>
|
<a-input
|
||||||
|
placeholder="请输入应收款项"
|
||||||
|
v-model="queryParam.allMoneyTwo"
|
||||||
|
class="query-group-cust"
|
||||||
|
@change="checkMoney('end')"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
||||||
@@ -299,6 +307,52 @@ export default {
|
|||||||
},
|
},
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 搜索金额校验
|
||||||
|
* @param type 起始范围--start,终止范围--end
|
||||||
|
*/
|
||||||
|
checkMoney(type) {
|
||||||
|
if (type === 'start') {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoney.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoney.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoney = str + this.queryParam.allMoney.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoney.length > 10) {
|
||||||
|
this.queryParam.allMoney = this.queryParam.allMoney.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (type === 'end') {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.replace(/[^0-9.]/g, '')
|
||||||
|
let pointIndex = this.queryParam.allMoneyTwo.indexOf('.')
|
||||||
|
// 包含小数点,保留小数点后两位
|
||||||
|
if (pointIndex > -1) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, pointIndex + 3)
|
||||||
|
// 截取整数部分
|
||||||
|
let str = this.queryParam.allMoneyTwo.slice(0, pointIndex)
|
||||||
|
// 整数部分大于十位则去掉十位之后的整数部门,并将小数部分拼接
|
||||||
|
if (str.length > 10) {
|
||||||
|
str = str.substr(0, 10)
|
||||||
|
this.queryParam.allMoneyTwo = str + this.queryParam.allMoneyTwo.substr(pointIndex, 3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 不包含小数点且输入数字超过十位保留前十位数据
|
||||||
|
if (pointIndex === -1 && this.queryParam.allMoneyTwo.length > 10) {
|
||||||
|
this.queryParam.allMoneyTwo = this.queryParam.allMoneyTwo.substr(0, 10)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user