清理idCardNoUtils,改使用ID对象
This commit is contained in:
@@ -522,7 +522,7 @@ export default {
|
||||
{
|
||||
label: "证件号",
|
||||
render: (h, {row}) =>
|
||||
h("p", null, this.idCardNoUtil.hideId(row.idNumber)),
|
||||
h("p", null, ID.hideId(row.idNumber)),
|
||||
},
|
||||
{slot: "options"},
|
||||
];
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
import {ID} from "dvcp-ui/lib/js/utils";
|
||||
|
||||
export default {
|
||||
name: "hrList",
|
||||
@@ -92,7 +93,7 @@ export default {
|
||||
{type: 'selection'},
|
||||
{label: "姓名", prop: "name", align: "center"},
|
||||
{label: "性别", prop: "sex", dict: 'sex', align: "center"},
|
||||
{label: "证件号", render: (h, {row}) => h('p', this.idCardNoUtil.hideId(row.idNumber))},
|
||||
{label: "证件号", render: (h, {row}) => h('p', ID.hideId(row.idNumber))},
|
||||
{label: "年龄", prop: "age", align: "center"},
|
||||
{label: "民族", prop: "nation", align: "center", dict: "fpNation"},
|
||||
{label: "文化程度", prop: "education", align: "center", dict: "fpEducation"},
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import {ID} from "dvcp-ui/lib/js/utils";
|
||||
export default {
|
||||
name: 'Add',
|
||||
|
||||
@@ -70,7 +71,7 @@
|
||||
const validatorId = (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
callback(new Error('请输入身份证号'))
|
||||
} else if (!this.idCardNoUtil.checkIdCardNo(value)) {
|
||||
} else if (!ID.check(value)) {
|
||||
callback(new Error('身份证号格式错误'))
|
||||
} else {
|
||||
callback()
|
||||
@@ -80,10 +81,10 @@
|
||||
const validatorPhone = function (rule, value, callback) {
|
||||
if (value === '') {
|
||||
callback(new Error('请输入联系方式'))
|
||||
}
|
||||
}
|
||||
// else if (!/^1\d{10}$/.test(value)) {
|
||||
// callback(new Error('手机号格式错误'))
|
||||
// }
|
||||
// }
|
||||
else {
|
||||
callback()
|
||||
}
|
||||
|
||||
@@ -95,6 +95,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {ID} from "dvcp-ui/lib/js/utils";
|
||||
|
||||
export default {
|
||||
name: "sealDetail",
|
||||
inject: ['seal'],
|
||||
@@ -135,11 +137,11 @@ export default {
|
||||
],
|
||||
legalIdNumber: [
|
||||
{required: true, message: "请填写法人身份证号码"},
|
||||
{validator: (r, v, cb) => cb(this.idCardNoUtil.checkIdCardNo(v) ? undefined : "身份证号码格式有误")}
|
||||
{validator: (r, v, cb) => cb(ID.check(v) ? undefined : "身份证号码格式有误")}
|
||||
],
|
||||
agentIdNumber: [
|
||||
{required: true, message: "请填写代理人身份证号码"},
|
||||
{validator: (r, v, cb) => cb(this.idCardNoUtil.checkIdCardNo(v) ? undefined : "身份证号码格式有误")}
|
||||
{validator: (r, v, cb) => cb(ID.check(v) ? undefined : "身份证号码格式有误")}
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ export default {
|
||||
],
|
||||
idNumber: [
|
||||
{required: true, message: "请填写身份证号码"},
|
||||
{validator: (r, v, cb) => cb(this.idCardNoUtil.checkIdCardNo(v) ? undefined : "身份证号码格式有误")}
|
||||
{validator: (r, v, cb) => cb(ID.check(v) ? undefined : "身份证号码格式有误")}
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user