|
@@ -38,7 +38,7 @@ export default function getIandPListCom(type) {
|
|
|
getIandPList(placement.searchParams).then(res=>{
|
|
|
// console.log(res);
|
|
|
placement.tableData=res.data.list || []
|
|
|
- placement.total=res.page&&res.page.total || 0
|
|
|
+ placement.total=res.data.page&&res.data.page.total || 0
|
|
|
let amount=placement.tableData.reduce((pre,item)=>{
|
|
|
return pre+item.amount
|
|
|
},0)
|
|
@@ -56,6 +56,13 @@ export default function getIandPListCom(type) {
|
|
|
const moneyChange=(value,prop)=>{
|
|
|
let trimValue = value.trim()
|
|
|
let numerValue=parseFloat(trimValue)
|
|
|
+ // 如果输入不是 以.结尾&&只有一个. 或者 不是零结尾的话,就赋值为转为成数字后的值
|
|
|
+ // 考虑到类似12.02的情况
|
|
|
+ if((value.endsWith('.') && value.indexOf('.')==(value.length-1)) ||
|
|
|
+ (value.endsWith('0') && value.indexOf('.')==(value.length-2))){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // console.log(numerValue);
|
|
|
if((!numerValue)&&trimValue&&numerValue!=0){
|
|
|
setTimeout(()=>{
|
|
|
placement.searchParams[prop]=''
|
|
@@ -70,12 +77,14 @@ export default function getIandPListCom(type) {
|
|
|
ElMessage.warning('金额必须大于等于零')
|
|
|
return
|
|
|
}
|
|
|
+ // if(!numerValue) return
|
|
|
// 开始金额大于结束金额 就不查询
|
|
|
if(placement.searchParams.max_amount &&
|
|
|
placement.searchParams.min_amount &&
|
|
|
parseFloat(placement.searchParams.min_amount) > placement.searchParams.max_amount){
|
|
|
return
|
|
|
}
|
|
|
+ placement.searchParams[prop]=numerValue || ''
|
|
|
searchPlacement()
|
|
|
}
|
|
|
// 搜索项-判断开始金额是否大于结束金额
|
|
@@ -86,7 +95,7 @@ export default function getIandPListCom(type) {
|
|
|
ElMessage.warning('开始金额不能大于结束金额')
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 切换每页的数量
|
|
|
const changePageSize=(pageSize)=>{
|
|
|
placement.searchParams.page_size = pageSize
|