| | |
| | | { |
| | | "appId": "201912040924165801464FF1788654BC5AC73", |
| | | "appkey": "20191106103859640976D6E924E464D029CF0", |
| | | "appId": "202108312122504607B107A83F55B40C98CCF", |
| | | "appkey": "20210831212235413F287EC3BF489424496C8", |
| | | "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", |
| | | "systemType": "", |
| | | "externalDatabase": "false", |
| | | "lineColor": "", |
| | | "filter": "false", |
| | | "defaultApp": "mk", |
| | | "defaultApp": "mkindustry", |
| | | "defaultLang": "zh-CN", |
| | | "WXAppID": "", |
| | | "WXminiAppID": "", |
| | |
| | | "transfer": "false", |
| | | "keepPassword": "true", |
| | | "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], |
| | | "host": "http://qingqiumarket.cn", |
| | | "service": "MKWMS/" |
| | | "host": "http://demo.mk9h.cn", |
| | | "service": "erp_new/" |
| | | } |
| | |
| | | |
| | | if (item.regular) { |
| | | if (item.regular === 'number') { |
| | | let reg = /^[0-9.-]*$/ |
| | | if (item.regularExtra) { |
| | | reg = new RegExp('^[0-9.-' + item.regularExtra.replace(/\.|-/g, '') + ']*$') |
| | | } |
| | | _rules.push({ |
| | | pattern: /^[0-9.-]*$/, |
| | | pattern: reg, |
| | | message: item.regularText || formRule.input.numbermsg |
| | | }) |
| | | } else if (item.regular === 'letter') { |
| | | let reg = /^[a-zA-Z]*$/ |
| | | if (item.regularExtra) { |
| | | reg = new RegExp('^[a-zA-Z' + item.regularExtra + ']*$') |
| | | } |
| | | _rules.push({ |
| | | pattern: /^[a-zA-Z]*$/, |
| | | pattern: reg, |
| | | message: item.regularText || formRule.input.lettermsg |
| | | }) |
| | | } else if (item.regular === 'letter_number') { |
| | | let reg = /^[a-zA-Z0-9]*$/ |
| | | if (item.regularExtra) { |
| | | reg = new RegExp('^[a-zA-Z0-9' + item.regularExtra + ']*$') |
| | | } |
| | | _rules.push({ |
| | | pattern: /^[a-zA-Z0-9]*$/, |
| | | pattern: reg, |
| | | message: item.regularText || '请输入数字或字母' |
| | | }) |
| | | } else if (item.regular === 'letter&number') { |
| | | let reg = /^[a-zA-Z0-9@_.]*$/ |
| | | if (item.regularExtra) { |
| | | reg = new RegExp('^[a-zA-Z0-9@_.' + item.regularExtra.replace(/\.|_|@/g, '') + ']*$') |
| | | } |
| | | _rules.push({ |
| | | pattern: /^[a-zA-Z0-9@_.]*$/, |
| | | pattern: reg, |
| | | message: item.regularText || '请输入数字、字母以及@_.' |
| | | }) |
| | | } else if (item.regular === 'phone') { |
| | |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'regularExtra', |
| | | label: '正则扩展符', |
| | | initVal: card.regularExtra || '', |
| | | tooltip: '正则验证时的自定义字符,包括~!@#$%^&*()_+:;{}<>,.-', |
| | | required: false, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'regularText', |
| | | label: '正则提示', |
| | | initVal: card.regularText || '', |
| | |
| | | } |
| | | if (this.record.regular !== '') { |
| | | shows.push('regularText') |
| | | if (this.record.regular !== 'phone' && this.record.regular !== 'email') { |
| | | shows.push('regularExtra') |
| | | } |
| | | } |
| | | } else if (type === 'number') { |
| | | reTypes.initval = 'number' |
| | |
| | | max: formRule.field.max, |
| | | message: formRule.field.maxMessage |
| | | }) |
| | | } else if (item.key === 'regularExtra') { |
| | | rules.push({ |
| | | pattern: /^[~!@#$%^&*()_+:;{}<>,.-]*$/, |
| | | message: '扩展符包括~!@#$%^&*()_+:;{}<>,.-' |
| | | }) |
| | | } else if (item.max) { |
| | | rules.push({ |
| | | max: item.max, |
| | |
| | | values.initval = '' |
| | | } else if (values.type === 'split') { |
| | | values.span = 24 |
| | | } else if (values.type === 'text') { |
| | | if (values.regularExtra) { |
| | | values.regularExtra = Array.from(new Set(values.regularExtra.split(''))).join('') |
| | | } |
| | | } |
| | | |
| | | ['linkField', 'valueField', 'valueText', 'orderBy'].forEach(item => { |