信用代码正则,项目统计接口修改
This commit is contained in:
@@ -79,3 +79,12 @@ export function number(s) {
|
||||
export function money(s) {
|
||||
return /^[0-9](\d{1,9})?(\.\d{1,2})$|^0\.([1-9](\d{0,1})|\d[1-9])$|^[1-9]\d{0,9}$|^0$/.test(s)
|
||||
}
|
||||
|
||||
/**
|
||||
* 信用代码 15、18位
|
||||
* @param s
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function dutyCode(s) {
|
||||
return /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/.test(s)
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { postcode, phoneReg, isPhone, number } from '@/utils/validate'
|
||||
import { postcode, phoneReg, isPhone, number, dutyCode } from '@/utils/validate'
|
||||
import pick from 'lodash.pick'
|
||||
import { httpAction } from '@api/manage'
|
||||
import { duplicateCheck } from '@api/api'
|
||||
@@ -300,6 +300,10 @@ export default {
|
||||
*/
|
||||
checkDutyCode(rules, value, callback) {
|
||||
if (value) {
|
||||
if (!dutyCode(value)) {
|
||||
callback('请输入15位、18位数字和大写英文字母')
|
||||
return
|
||||
}
|
||||
if (!this.model.id) {
|
||||
const params = {
|
||||
confusionCode: 'pay_company_duty_code',
|
||||
|
||||
@@ -154,8 +154,8 @@ export default {
|
||||
sm: { span: 10 }
|
||||
},
|
||||
url: {
|
||||
list: '/statistics/allProjectStatistics/list',
|
||||
exportXlsUrl: '/statistics/allProjectStatistics/statistics/excel'
|
||||
list: '/statistics/allProjectStatistics/listProject',
|
||||
exportXlsUrl: '/statistics/allProjectStatistics/statistics/excelProject'
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user