Commit 446cc778 by zhangquan

第一轮bug修复

1 parent 8d9b8156
...@@ -23,12 +23,12 @@ export default { ...@@ -23,12 +23,12 @@ export default {
}, },
methods:{ methods:{
inputFn(e){ inputFn(e){
e = e ? String(e) : '' e = e || e==0 ? String(e) : ''
this.intDigit = this.intDigit || 6 this.intDigit = this.intDigit || 6
this.precise = this.precise || this.precise==0 || this.precise=='0' ? this.precise : 2 this.precise = this.precise || this.precise==0 || this.precise=='0' ? this.precise : 2
let value = e let value = e
if(this.maxVal){ if(this.maxVal && +this.maxVal<= +e){
if(+this.maxVal<= +e) value = this.maxVal //加等号是因为 '500' == '500.' 导致多了点 value = this.maxVal //加等号是因为 '500' == '500.' 导致多了点
}else{ }else{
const intDigitReg = this.intDigit == -1 ? `(^\\d+)(\\.\\d+)?` : `(^\\d{${this.intDigit}})\\d+(\\.\\d+)?` const intDigitReg = this.intDigit == -1 ? `(^\\d+)(\\.\\d+)?` : `(^\\d{${this.intDigit}})\\d+(\\.\\d+)?`
value = e.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(new RegExp(intDigitReg,'g'), '$1').replace('.', '$#$') value = e.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(new RegExp(intDigitReg,'g'), '$1').replace('.', '$#$')
......
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
url: url, url: url,
searchFormData: [ searchFormData: [
{ {
label: '分类名称', label: '商品名称',
name: 'goodsName', name: 'goodsName',
type: 'input' type: 'input'
}, },
...@@ -349,8 +349,8 @@ ...@@ -349,8 +349,8 @@
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.tableSearchForm)) var params = JSON.parse(JSON.stringify(this.tableSearchForm))
if (this.tableSearchForm.createDate.length) { if (this.tableSearchForm.createDate.length) {
params.createdDateStrat = new Date(this.tableSearchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00' params.startCreatedDate = new Date(this.tableSearchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.createdDateEnd = new Date(this.tableSearchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59' params.endCreatedDate = new Date(this.tableSearchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
} }
return params return params
}, },
......
...@@ -445,7 +445,7 @@ export default { ...@@ -445,7 +445,7 @@ export default {
this.searchForm.apiType = 5 //在api.js判断是否更换接口 this.searchForm.apiType = 5 //在api.js判断是否更换接口
this.searchForm.merchantId =this.merchantId this.searchForm.merchantId =this.merchantId
const {associationClassifyFirstId, associationClassifySecondId} = this.ClassifyInfo const {associationClassifyFirstId, associationClassifySecondId} = this.ClassifyInfo
this.searchForm.associationClassifyFirstId = associationClassifyFirstId if(this.activeName == 5) this.searchForm.associationClassifyFirstId = associationClassifyFirstId
this.searchForm.associationClassifySecondId = associationClassifySecondId this.searchForm.associationClassifySecondId = associationClassifySecondId
this.searchForm.startCreatedDate = this.searchForm.createdDate ? this.searchForm.createdDate + ' 00:00:00' : '' this.searchForm.startCreatedDate = this.searchForm.createdDate ? this.searchForm.createdDate + ' 00:00:00' : ''
this.searchForm.endCreatedDate = this.searchForm.createdDate ? this.searchForm.createdDate + ' 23:59:59' : '' this.searchForm.endCreatedDate = this.searchForm.createdDate ? this.searchForm.createdDate + ' 23:59:59' : ''
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!