Commit de7233a4 by 李姝悦

点击隐藏按钮

parent 3be61ed6
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div id="xzry"> <div id="xzry">
<div class="top"> <div class="top">
<div class="fir"> <div class="fir">
<div class="cir">1</div> <div class="cir" @click="auto">1</div>
<span>人员信息 </span> <span>人员信息 </span>
<div class="dashed"></div> <div class="dashed"></div>
</div> </div>
...@@ -217,6 +217,8 @@ ...@@ -217,6 +217,8 @@
}, },
data() { data() {
return { return {
isZjhm:/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/,
numbers : [0,1,2,3,4,5,6,7,8,9],
ryInfo: {}, ryInfo: {},
// edit: '新增人员', // edit: '新增人员',
dialogVisible: false, // 弹窗状态 dialogVisible: false, // 弹窗状态
...@@ -302,8 +304,9 @@ ...@@ -302,8 +304,9 @@
zjhm: [ zjhm: [
{ required: true, message: "请输入证件号码", trigger: "blur" }, { required: true, message: "请输入证件号码", trigger: "blur" },
{ {
pattern: pattern: this.isZjhm,
/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/, // /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/,
message: "证件号码格式有误!", message: "证件号码格式有误!",
trigger: "blur", trigger: "blur",
}, },
...@@ -357,8 +360,38 @@ ...@@ -357,8 +360,38 @@
// console.log(this.$route.params.type==='edit'); // console.log(this.$route.params.type==='edit');
this.edit = "新增人员"; this.edit = "新增人员";
} }
this.ruleForm.cyzjdm = "111" ? this.isZjhm : /^(?:0|[1-9]\d{3,30})?$/
}, },
methods: { methods: {
auto(){
var code = "";
for (var i = 0; i < 22; i++) {
var r1 = parseInt(Math.random() * this.numbers.length)
code += r1
}
// console.log(code);
this.ruleForm.ysxtAsjxgrybh = code
this.ruleForm.jzrybh = code
this.ruleForm.asjxgrybh = code
this.ruleForm.zzhwkbh = code
this.ruleForm.cjxxyydm = ["01","02"]
this.ruleForm.xm = "李明"
this.ruleForm.xbdm = "1"
this.ruleForm.csrq = "2022-01-17"
this.ruleForm.gjdm = "156" //中国
this.ruleForm.mzdm = "01" //汉族
this.ruleForm.cyzjdm = "111" //身份证号
this.ruleForm.zjhm = "140911199909091425" //身份证号
this.ruleForm.hjdzXzqhdm = "110000" //北京市
this.ruleForm.hjdzDzmc = "海淀区"
this.ruleForm.xzzXzqhdm = "110000" //北京市
this.ruleForm.xzzDzmc = "海淀区"
this.ruleForm.nydwGajgjgdm = "430000000000" //湖南省公安
this.ruleForm.nyryXm = "李雷雷"
this.ruleForm.nysj = "2022-01-17"
this.ruleForm.nyryGmsfhm = "132910199608122049"
this.ruleForm.nyryLxdh = "13111133331"
},
disabledDate(a) { disabledDate(a) {
if (a.getTime() > new Date().getTime()) { if (a.getTime() > new Date().getTime()) {
return true; return true;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div id="xzry"> <div id="xzry">
<div class="top"> <div class="top">
<div class="fir"> <div class="fir">
<div class="cir">1</div> <div class="cir" @click="auto">1</div>
<span>人员信息 </span> <span>人员信息 </span>
<div class="dashed"></div> <div class="dashed"></div>
</div> </div>
...@@ -342,6 +342,7 @@ ...@@ -342,6 +342,7 @@
}; };
}, },
mounted() { mounted() {
// console.log(this.ruleForm.cjxxyydm);
// console.log(this.$route.query.barcode) // console.log(this.$route.query.barcode)
if (this.$route.params.type === "edit") { if (this.$route.params.type === "edit") {
this.edit = "修改人员"; this.edit = "修改人员";
...@@ -353,6 +354,10 @@ ...@@ -353,6 +354,10 @@
this.id = this.$route.params.id this.id = this.$route.params.id
}, },
methods: { methods: {
auto(){
this.ruleForm.ysxtAsjxgrybh = Math.random(22)
console.log(this.ruleForm.ysxtAsjxgrybh);
},
disabledDate(a) { disabledDate(a) {
if (a.getTime() > new Date().getTime()) { if (a.getTime() > new Date().getTime()) {
return true; return true;
...@@ -367,7 +372,6 @@ ...@@ -367,7 +372,6 @@
} else { } else {
this.submitForm(e); this.submitForm(e);
} }
this.$bus.emit("xzryResetForm", "xzryedit");
}, },
editForm(formName) { editForm(formName) {
let self = this; let self = this;
...@@ -420,6 +424,8 @@ ...@@ -420,6 +424,8 @@
}); });
} else { } else {
self.$message.error("修改失败!"); self.$message.error("修改失败!");
this.$set(this.ruleForm, 'ysxtAsjxgrybh', this.ruleForm.ysxtAsjxgrybh.substring(1, 23))
} }
}); });
self.$bus.emit("isBlur", false); self.$bus.emit("isBlur", false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment