Commit d1b9094b by 李姝悦

添加身份证号和出生日期的匹配对比

parent 0a647f35
......@@ -25,7 +25,8 @@
</div>
</div>
<div class="content">
<el-form :label-position="labelPosition" :inline="true" :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-form-inline">
<el-form :label-position="labelPosition" :inline="true" :model="ruleForm" :rules="rules" ref="ruleForm"
class="demo-form-inline">
<!-- 一 -->
<el-row class="title">
<div class="colorDiv"></div>
......@@ -34,7 +35,8 @@
<!-- 二 -->
<el-row class="item-row">
<el-form-item label="人员编号:" prop="ysxtAsjxgrybh">
<el-input v-model.trim="ruleForm.ysxtAsjxgrybh" placeholder="请输入人员编号" maxlength="22" class="inputBh" show-word-limit clearable>
<el-input v-model.trim="ruleForm.ysxtAsjxgrybh" placeholder="请输入人员编号" maxlength="22" class="inputBh"
show-word-limit clearable>
<template slot="prepend" class="preR">R</template>
</el-input>
</el-form-item>
......@@ -46,7 +48,8 @@
<!-- 三 -->
<el-row class="item-row">
<el-form-item label="采集信息原因:" prop="cjxxyydm">
<SelectCode codeUrl="/api/code/cjxxyydm" width="18.75" :clearable="true" :form="ruleForm" id="cjxxyydm" ref="cjxxyydm" multiple :multipleLimit="5"></SelectCode>
<SelectCode codeUrl="/api/code/cjxxyydm" width="18.75" :clearable="true" :form="ruleForm" id="cjxxyydm"
ref="cjxxyydm" multiple :multipleLimit="5"></SelectCode>
</el-form-item>
<el-form-item class="no_require" label="指掌纹卡编号:">
<!-- -->
......@@ -59,7 +62,8 @@
<el-form-item> </el-form-item>
<el-form-item class="no_require" label="案事件相关人员编号:">
<!-- -->
<el-input v-model.trim="ruleForm.asjxgrybh" placeholder="请输入案事件相关人员编号" maxlength="23" show-word-limit clearable></el-input>
<el-input v-model.trim="ruleForm.asjxgrybh" placeholder="请输入案事件相关人员编号" maxlength="23" show-word-limit
clearable></el-input>
</el-form-item>
</el-row>
<el-divider></el-divider>
......@@ -85,7 +89,8 @@
<SelectCode codeUrl="/api/code/sex" width="18.75" clearable :form="ruleForm" id="xbdm"></SelectCode>
</el-form-item>
<el-form-item label="出生日期:" prop="csrq">
<el-date-picker type="date" placeholder="请选择出生日期" v-model="ruleForm.csrq" style="width: 100%" :picker-options="{
<el-date-picker type="date" placeholder="请选择出生日期" v-model="ruleForm.csrq" style="width: 100%"
:picker-options="{
disabledDate: disabledDate,
}"></el-date-picker>
</el-form-item>
......@@ -106,7 +111,8 @@
</SelectCode>
</el-form-item>
<el-form-item label="证件号码:" prop="zjhm">
<el-input v-model.trim="ruleForm.zjhm" placeholder="请输入证件号码" maxlength="30" show-word-limit clearable>
<el-input v-model.trim="ruleForm.zjhm" placeholder="请输入证件号码" maxlength="30" show-word-limit clearable
@blur="isRight">
</el-input>
</el-form-item>
</el-row>
......@@ -157,7 +163,7 @@
<!-- 七 -->
<el-row class="item-row">
<el-form-item label="捺印单位:" prop="nydwGajgjgdm">
<Cascader :form="ruleForm" id="nydwGajgjgdm" :width="18.75" :props = "props"></Cascader>
<Cascader :form="ruleForm" id="nydwGajgjgdm" :width="18.75" :props="props"></Cascader>
</el-form-item>
<el-form-item label="捺印人姓名:" prop="nyryXm">
<el-input v-model="ruleForm.nyryXm" placeholder="请输入捺印人姓名" maxlength="50" show-word-limit clearable>
......@@ -167,7 +173,8 @@
<!-- 八 -->
<el-row class="item-row">
<el-form-item label="捺印日期:" prop="nysj">
<el-date-picker type="date" placeholder="请输入捺印日期" v-model="ruleForm.nysj" style="width: 100%" :picker-options="{
<el-date-picker type="date" placeholder="请输入捺印日期" v-model="ruleForm.nysj" style="width: 100%"
:picker-options="{
disabledDate: disabledDate,
}"></el-date-picker>
</el-form-item>
......@@ -200,6 +207,7 @@
</template>
<script>
import moment from "moment";
import Cascader from "@/components/Cascader.vue";
import SelectCode from "@/components/SelectCode.vue";
export default {
......@@ -210,7 +218,7 @@
},
data() {
return {
numbers : [0,1,2,3,4,5,6,7,8,9],
numbers: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
ryInfo: {},
// edit: '新增人员',
dialogVisible: false, // 弹窗状态
......@@ -242,144 +250,172 @@
searchOptions: 3, // 默认搜索方式
checkboxQuery: [], //滚动平面等筛选条件
},
ruleForm: {
ysxtAsjxgrybh: "", // 人员编号
jzrybh: "", // 警综人员编号
asjxgrybh: "", // 案事件相关人员编号号
zzhwkbh: "", // 现场掌指纹卡编号
cjxxyydm: "", // 采集信息原因
ruleForm: {
ysxtAsjxgrybh: "", // 人员编号
jzrybh: "", // 警综人员编号
asjxgrybh: "", // 案事件相关人员编号号
zzhwkbh: "", // 现场掌指纹卡编号
cjxxyydm: "", // 采集信息原因
xm: "", // 姓名
bmch: "", // 别名
xbdm: "", // 性别
csrq: "", // 出生日期
gjdm: "", // 国籍
mzdm: "", // 民族
cyzjdm: "", // 证件类型
zjhm: "", // 证件号码
hjdzXzqhdm: "", // 户籍地行政区
hjdzDzmc: "", // 户籍地址
xzzXzqhdm: "", // 现住址行政区
xzzDzmc: "", // 现住址
bz: "", // 备注
xm: "", // 姓名
bmch: "", // 别名
xbdm: "", // 性别
csrq: "", // 出生日期
gjdm: "", // 国籍
mzdm: "", // 民族
cyzjdm: "", // 证件类型
zjhm: "", // 证件号码
hjdzXzqhdm: "", // 户籍地行政区
hjdzDzmc: "", // 户籍地址
xzzXzqhdm: "", // 现住址行政区
xzzDzmc: "", // 现住址
bz: "", // 备注
nydwGajgjgdm: "", // 捺印单位
nyryXm: "", // 捺印人姓名
nysj: "", // 捺印时间
nyryGmsfhm: "", // 捺印人身份证号
nyryLxdh: "", // 捺印人电话
nydwGajgjgdm: "", // 捺印单位
nyryXm: "", // 捺印人姓名
nysj: "", // 捺印时间
nyryGmsfhm: "", // 捺印人身份证号
nyryLxdh: "", // 捺印人电话
ifidcard: "1", // 是否采集二代身份证
zwbdxtlxms: "1", // 指纹比对描述
},
logicList: [], // 逻辑库代码
rules: {
ysxtAsjxgrybh: [
{ min: 22, max: 22, message: "编号长度有误!", trigger: "change" },
{ required: true, message: "请输入人员条码号", trigger: "blur" },
],
jzrybh: [
{ required: true, message: "请输入警综人员编号", trigger: "blur" },
],
asjxgrybh: [
{ required: true, message: "请输入案事件人员号", trigger: "blur" },
],
zzhwkbh: [
{ required: true, message: "请输入掌指纹卡编号", trigger: "blur" },
],
cjxxyydm: [
{ required: true, message: "请选择采集信息原因", trigger: "blur" },
],
xm: [{ required: true, message: "请输入姓名", trigger: "blur" }],
xbdm: [{ required: true, message: "请选择性别", trigger: "blur" }],
csrq: [
{
required: true,
message: "请选择出生日期",
trigger: "change",
},
],
gjdm: [{ required: true, message: "请选择国籍", trigger: "blur" }],
mzdm: [{ required: true, message: "请选择民族", trigger: "blur" }],
cyzjdm: [
{ required: true, message: "请选择证件类型", trigger: "blur" },
],
zjhm: [
{ required: true, message: "请输入证件号码", trigger: "blur" },
{
pattern:
/(^[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: "证件号码格式有误!",
trigger: "blur",
},
],
hjdzXzqhdm: [
{ required: true, message: "请选择户籍地行政区", trigger: "blur" },
],
hjdzDzmc: [
{ required: true, message: "请输入户籍地址", trigger: "blur" },
],
xzzXzqhdm: [
{ required: true, message: "请选现住地行政区", trigger: "blur" },
],
xzzDzmc: [
{ required: true, message: "请输入现住地址", trigger: "blur" },
],
nydwGajgjgdm: [
{ required: true, message: "请输入捺印单位", trigger: "change" },
],
nyryXm: [
{ required: true, message: "请输入捺印人员姓名", trigger: "change" },
],
nysj: [
{
required: true,
message: "请选择捺印日期",
trigger: "change",
},
],
nyryGmsfhm: [
{ required: true, message: "请输入捺印人身份证号", trigger: "blur" },
{
pattern:
/(^[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: "证件号码格式有误!",
trigger: "blur",
},
],
nyryLxdh: [
{ required: true, message: "请输入捺印人联系电话", trigger: "blur" },
],
},
};
},
mounted () {
console.log(process.env.VUE_APP_AUTO_WRITE);
// console.log(this.$route.query.barcode)
if (this.$route.params.type === "edit") {
this.edit = "修改人员";
// this.getRyinfo(this.$route.params.barcode);
} else {
// console.log(this.$route.params.type==='edit');
this.edit = "新增人员";
}
ifidcard: "1", // 是否采集二代身份证
zwbdxtlxms: "1", // 指纹比对描述
},
logicList: [], // 逻辑库代码
rules: {
ysxtAsjxgrybh: [
{ min: 22, max: 22, message: "编号长度有误!", trigger: "change" },
{ required: true, message: "请输入人员条码号", trigger: "blur" },
],
jzrybh: [
{ required: true, message: "请输入警综人员编号", trigger: "blur" },
],
asjxgrybh: [
{ required: true, message: "请输入案事件人员号", trigger: "blur" },
],
zzhwkbh: [
{ required: true, message: "请输入掌指纹卡编号", trigger: "blur" },
],
cjxxyydm: [
{ required: true, message: "请选择采集信息原因", trigger: "blur" },
],
},
watch: {
"ruleForm.cyzjdm" (newV, oldV) {
// console.log(newV)
if (this.ruleForm.cyzjdm == '111') {
console.log(this.rules.zjhm[1]);
this.$set(this.rules.zjhm[1], "pattern", /(^[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}$)/)
xm: [
{ required: true, message: "请输入姓名", trigger: "blur" },
{
pattern:
/([\u4E00-\u9FA5·]{1,17})/,
message: "请输入汉字!",
trigger: "blur"
},
],
xbdm: [{ required: true, message: "请选择性别", trigger: "blur" }],
csrq: [
{
required: true,
message: "请选择出生日期",
trigger: "change",
},
],
gjdm: [{ required: true, message: "请选择国籍", trigger: "blur" }],
mzdm: [{ required: true, message: "请选择民族", trigger: "blur" }],
cyzjdm: [
{ required: true, message: "请选择证件类型", trigger: "blur" },
],
zjhm: [
{ required: true, message: "请输入证件号码", trigger: "blur" },
{
pattern:
/(^[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: "证件号码格式有误!",
trigger: "blur",
},
],
hjdzXzqhdm: [
{ required: true, message: "请选择户籍地行政区", trigger: "blur" },
],
hjdzDzmc: [
{ required: true, message: "请输入户籍地址", trigger: "blur" },
],
xzzXzqhdm: [
{ required: true, message: "请选现住地行政区", trigger: "blur" },
],
xzzDzmc: [
{ required: true, message: "请输入现住地址", trigger: "blur" },
],
nydwGajgjgdm: [
{ required: true, message: "请输入捺印单位", trigger: "change" },
],
nyryXm: [
{ required: true, message: "请输入捺印人员姓名", trigger: "change" },
],
nysj: [
{
required: true,
message: "请选择捺印日期",
trigger: "change",
},
],
nyryGmsfhm: [
{ required: true, message: "请输入捺印人身份证号", trigger: "blur" },
{
pattern:
/(^[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: "证件号码格式有误!",
trigger: "blur",
},
],
nyryLxdh: [
{ required: true, message: "请输入捺印人联系电话", trigger: "blur" },
],
},
};
},
mounted() {
// console.log(process.env.VUE_APP_AUTO_WRITE);
// console.log(this.$route.query.barcode)
if (this.$route.params.type === "edit") {
this.edit = "修改人员";
// this.getRyinfo(this.$route.params.barcode);
} else {
this.$set(this.rules.zjhm[1], "pattern", /^(?:0|[1-9]\d{3,30})?$/)
// console.log(this.$route.params.type==='edit');
this.edit = "新增人员";
}
}
},
methods: {
auto () {
if (process.env.VUE_APP_AUTO_WRITE == 'dev' || process.env.VUE_APP_AUTO_WRITE == 'pro') {
},
watch: {
"ruleForm.cyzjdm"(newV, oldV) {
// console.log(newV)
if (this.ruleForm.cyzjdm == '111') {
console.log(this.rules.zjhm[1]);
this.$set(this.rules.zjhm[1], "pattern", /(^[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}$)/)
} else {
this.$set(this.rules.zjhm[1], "pattern", /^[0-9a-zA-Z]+$/)
}
},
},
methods: {
isRight() {
if (this.ruleForm.cyzjdm === "111" && this.ruleForm.zjhm != '') {
let b = moment(this.ruleForm.csrq).format("YYYYMMDD")
if (b != this.ruleForm.zjhm.toString().substr(6, 8)) {
// alert("请输入和出生日期匹配的证件号码")
this.$alert('请输入和出生日期匹配的证件号码', '提示', {
confirmButtonText: '确定',
callback: action => {
// this.$message({
// type: 'info',
// // message: `action: ${action}`
// });
}
});
}
}
},
auto() {
// if (process.env.VUE_APP_AUTO_WRITE == 'dev' || process.env.VUE_APP_AUTO_WRITE == 'pro') {
var code = "";
for (var i = 0; i < 22; i++) {
var r1 = parseInt(Math.random() * this.numbers.length)
......@@ -407,289 +443,289 @@
this.ruleForm.nysj = "2022-01-17"
this.ruleForm.nyryGmsfhm = "132910199608122049"
this.ruleForm.nyryLxdh = "13111133331"
} else {
return
}
},
disabledDate (a) {
if (a.getTime() > new Date().getTime()) {
return true;
} else {
return false;
}
},
tijiao (e) {
let tjType = this.$route.params.type;
if (tjType === "edit") {
this.editForm(e);
} else {
this.submitForm(e);
}
},
editForm (formName) {
let self = this;
// debugger
// console.log(self.ruleForm);
// console.log(formName);
this.$refs[formName].validate((valid) => {
if (valid) {
// let logicList = this.ruleForm.logicdbtype2.map(Number)
// let cjxxyyList = this.ruleForm.cjxxyydm
// delete this.ruleForm.cjxxyydm
this.logicList = this.checkedTargets.map(Number);
let reqParam = {
personDo: "",
logicList: [],
cjxxyyList: [],
};
// reqParam.cjxxyyList = this.ruleForm.cjxxyydm
// this.ruleForm.cjxxyydm.forEach(item => {
// item = Number(item)
// })
// console.log(reqParam.cjxxyyList);
// delete this.ruleForm.cjxxyydm
reqParam.personDo = this.ruleForm;
reqParam.cjxxyyList = this.ruleForm.cjxxyydm;
// reqParam.personDo.ysxtAsjxgrybh = this.ruleForm.ysxtAsjxgrybh
reqParam.personDo.ysxtAsjxgrybh = "R" + this.ruleForm.ysxtAsjxgrybh;
reqParam.logicList = this.logicList;
delete reqParam.personDo.cjxxyydm;
this.$axios
.post("/api/personstore/person/file", reqParam)
.then((res) => {
// console.log(res.data);
if (res.data.code === 0) {
self.$message.success("修改成功!");
// 清除全部案件库缓存
self.$store.commit('layout/delcachePageName', 'htcj')
this.$store.commit('layout/delcachePageName', 'xzry')
this.$store.commit('layout/delcachePageName', 'xzryedit')
// this.$refs[formName].resetFields();
this.$set(this.ruleForm, 'ysxtAsjxgrybh', this.ruleForm.ysxtAsjxgrybh.substring(1, 23))
this.$router.push({
path: `/fingerprintIndex/${reqParam.personDo.ysxtAsjxgrybh}/${this.ruleForm.xm}`,
query: {
type: 1
},
});
} else {
self.$message.error("修改失败!");
}
});
self.$bus.emit("isBlur", false);
// } else {
// return
// }
},
disabledDate(a) {
if (a.getTime() > new Date().getTime()) {
return true;
} else {
this.$nextTick(() => {
let isError = document.getElementsByClassName("is-error");
isError[0].scrollIntoView({
// 滚动到指定节点
// 值有start,center,end,nearest,当前显示在视图区域中间
block: "center",
// 值有auto、instant,smooth,缓动动画(当前是慢速的)
behavior: "smooth",
});
});
return false;
}
});
},
submitForm (formName) {
let self = this
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.checkedTargets.length == 0) {
this.$message.error("请选择逻辑库");
} else {
},
tijiao(e) {
let tjType = this.$route.params.type;
if (tjType === "edit") {
this.editForm(e);
} else {
this.submitForm(e);
}
},
editForm(formName) {
let self = this;
// debugger
// console.log(self.ruleForm);
// console.log(formName);
this.$refs[formName].validate((valid) => {
if (valid) {
// let logicList = this.ruleForm.logicdbtype2.map(Number)
// let cjxxyyList = this.ruleForm.cjxxyydm
// delete this.ruleForm.cjxxyydm
this.logicList = this.checkedTargets.map(Number);
let reqParam = {
personDo: "",
logicList: [],
cjxxyyList: [],
};
reqParam.cjxxyyList = this.ruleForm.cjxxyydm;
delete this.ruleForm.cjxxyydm;
// reqParam.cjxxyyList = this.ruleForm.cjxxyydm
// this.ruleForm.cjxxyydm.forEach(item => {
// item = Number(item)
// })
// console.log(reqParam.cjxxyyList);
// delete this.ruleForm.cjxxyydm
reqParam.personDo = this.ruleForm;
reqParam.cjxxyyList = this.ruleForm.cjxxyydm;
// reqParam.personDo.ysxtAsjxgrybh = this.ruleForm.ysxtAsjxgrybh
reqParam.personDo.ysxtAsjxgrybh = "R" + this.ruleForm.ysxtAsjxgrybh;
reqParam.logicList = this.logicList;
console.log(reqParam.personDo.ysxtAsjxgrybh);
console.log(this.ruleForm.ysxtAsjxgrybh);
delete reqParam.personDo.cjxxyydm;
this.$axios
.post("/api/personstore/personadd", reqParam)
.then((response) => {
console.log(response);
if (response.data.code === 0) {
this.$message.success("新增成功");
self.$axios({
method: 'post',
url: '/api/workflow/savePersonOrCase',
params: {
barcode: this.ruleForm.ysxtAsjxgrybh,
.post("/api/personstore/person/file", reqParam)
.then((res) => {
// console.log(res.data);
if (res.data.code === 0) {
self.$message.success("修改成功!");
// 清除全部案件库缓存
self.$store.commit('layout/delcachePageName', 'htcj')
this.$store.commit('layout/delcachePageName', 'xzry')
this.$store.commit('layout/delcachePageName', 'xzryedit')
// this.$refs[formName].resetFields();
this.$set(this.ruleForm, 'ysxtAsjxgrybh', this.ruleForm.ysxtAsjxgrybh.substring(1, 23))
this.$router.push({
path: `/fingerprintIndex/${reqParam.personDo.ysxtAsjxgrybh}/${this.ruleForm.xm}`,
query: {
type: 1
}
}).then(res => {
// console.log(res);
if (res.data.code === 0) {
this.$router.push({
path: `/fingerprintIndex/${reqParam.personDo.ysxtAsjxgrybh}/${this.ruleForm.xm}`,
query: {
type: 0
}
})
this.$store.commit('layout/delcachePageName', 'htcj')
this.$refs[formName].resetFields();
this.ruleForm = {
ysxtAsjxgrybh: "", // 人员编号
jzrybh: "", // 警综人员编号
asjxgrybh: "", // 案事件相关人员编号号
zzhwkbh: "", // 现场掌指纹卡编号
cjxxyydm: "", // 采集信息原因
xm: "", // 姓名
bmch: "", // 别名
xbdm: "", // 性别
csrq: "", // 出生日期
gjdm: "", // 国籍
mzdm: "", // 民族
cyzjdm: "", // 证件类型
zjhm: "", // 证件号码
hjdzXzqhdm: "", // 户籍地行政区
hjdzDzmc: "", // 户籍地址
xzzXzqhdm: "", // 现住址行政区
xzzDzmc: "", // 现住址
bz: "", // 备注
nydwGajgjgdm: "", // 捺印单位
nyryXm: "", // 捺印人姓名
nysj: "", // 捺印时间
nyryGmsfhm: "", // 捺印人身份证号
nyryLxdh: "", // 捺印人电话
ifidcard: "1", // 是否采集二代身份证
zwbdxtlxms: "1", // 指纹比对描述
};
this.checkedTargets = ["1"]; // 选定的目标逻辑库
}
})
},
});
} else {
this.$message.error("新增失败");
this.$set(this.ruleForm, "cjxxyydm", []);
this.$set(this.ruleForm, 'ysxtAsjxgrybh', this.ruleForm.ysxtAsjxgrybh.substring(1, 23))
self.$message.error("修改失败!");
}
});
}
} else {
this.$nextTick(() => {
let isError = document.getElementsByClassName("is-error");
isError[0].scrollIntoView({
// 滚动到指定节点
// 值有start,center,end,nearest,当前显示在视图区域中间
block: "center",
// 值有auto、instant,smooth,缓动动画(当前是慢速的)
behavior: "smooth",
});
});
return false;
}
});
},
resetForm (formName) {
this.$refs[formName].resetFields();
this.$store.commit('layout/delcachePageName', 'xzry/:type')
this.ruleForm = {} //清空列表
// 关闭tab页
this.$bus.emit("xzryResetForm", "xzry");
},
initData () {
// 赋值
this.ruleForm.id = this.ryInfo.id;
this.ruleForm.rybh = this.ryInfo.ysxtAsjxgrybh;
this.ruleForm.jzrybh = this.ryInfo.jzrybh;
// 人员档案信息
if (this.ryInfo.cjxxyydm) {
this.ruleForm.cjxxyydm = this.ryInfo.cjxxyydm.split(",");
}
this.ruleForm.zzhwkbh = this.ryInfo.zzhwkbh;
this.ruleForm.asjxgrybh = this.ryInfo.asjxgrybh;
this.ruleForm.xm = this.ryInfo.xm;
this.ruleForm.bmch = this.ryInfo.bmch;
this.ruleForm.xbdm = this.ryInfo.xbdm;
this.ruleForm.csrq = this.ryInfo.csrq;
this.ruleForm.gjdm = this.ryInfo.gjdm;
this.ruleForm.mzdm = this.ryInfo.mzdm;
this.ruleForm.cyzjdm = this.ryInfo.cyzjdm;
this.ruleForm.zjhm = this.ryInfo.zjhm;
this.ruleForm.hjdzXzqhdm = this.ryInfo.hjdzXzqhdm;
this.ruleForm.hjdzDzmc = this.ryInfo.hjdzDzmc;
this.ruleForm.xzzXzqhdm = this.ryInfo.xzzXzqhdm;
this.ruleForm.xzzDzmc = this.ryInfo.xzzDzmc;
this.ruleForm.bz = this.ryInfo.bz;
// 人员逻辑分库
// let ryljfk = this.ryInfo.logicdbtype.split('')
// this.ruleForm.logicdbtype = ryljfk
if (
this.ryInfo.logicDatabaseCode &&
this.ryInfo.logicDatabaseCode.length > 0
) {
this.ruleForm.logicdbtype2 = this.ryInfo.logicDatabaseCode.split(",");
} else {
this.ruleForm.logicdbtype2 = [];
}
this.ruleForm.nydwGajgjgdm = this.ryInfo.nydwGajgjgdm;
this.ruleForm.nyryXm = this.ryInfo.nyryXm;
this.ruleForm.nysj = this.ryInfo.nysj;
this.ruleForm.nyryGmsfhm = this.ryInfo.nyryGmsfhm;
this.ruleForm.nyryLxdh = this.ryInfo.nyryLxdh;
},
getRyinfo (code) {
let self = this;
this.reqParam.personStoreCustomSearch.ysxtAsjxgrybh = code;
this.$axios
.post("/api/personstore/person/list", this.reqParam)
.then((response) => {
if (response.data.code === 0) {
self.ryInfo = response.data.ret.list[0];
self.initData();
this.ruleForm.ysxtAsjxgrybh = self.ryInfo.ysxtAsjxgrybh;
// this.ruleForm = self.ryInfo
this.ruleForm.ysxtAsjxgrybh = self.ryInfo.ysxtAsjxgrybh
.toString()
.substr(1);
self.$bus.emit("isBlur", false);
} else {
self.$message.error(response.data.message);
this.$nextTick(() => {
let isError = document.getElementsByClassName("is-error");
isError[0].scrollIntoView({
// 滚动到指定节点
// 值有start,center,end,nearest,当前显示在视图区域中间
block: "center",
// 值有auto、instant,smooth,缓动动画(当前是慢速的)
behavior: "smooth",
});
});
return false;
}
});
},
/**
* @description: 工作流
* @param {*}
* @return {*}
*/
workStream () {
NetUtil.workStream.stream({
barcode: "R" + this.ruleForm.ysxtAsjxgrybh,
type: 1
})
.then(response => {
if (response.code === 0) {
console.log(response);
} else {
},
submitForm(formName) {
let self = this
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.checkedTargets.length == 0) {
this.$message.error("请选择逻辑库");
} else {
this.logicList = this.checkedTargets.map(Number);
let reqParam = {
personDo: "",
logicList: [],
cjxxyyList: [],
};
reqParam.cjxxyyList = this.ruleForm.cjxxyydm;
delete this.ruleForm.cjxxyydm;
reqParam.personDo = this.ruleForm;
reqParam.personDo.ysxtAsjxgrybh = "R" + this.ruleForm.ysxtAsjxgrybh;
reqParam.logicList = this.logicList;
console.log(reqParam.personDo.ysxtAsjxgrybh);
console.log(this.ruleForm.ysxtAsjxgrybh);
this.$axios
.post("/api/personstore/personadd", reqParam)
.then((response) => {
console.log(response);
if (response.data.code === 0) {
this.$message.success("新增成功");
self.$axios({
method: 'post',
url: '/api/workflow/savePersonOrCase',
params: {
barcode: this.ruleForm.ysxtAsjxgrybh,
type: 1
}
}).then(res => {
// console.log(res);
if (res.data.code === 0) {
this.$router.push({
path: `/fingerprintIndex/${reqParam.personDo.ysxtAsjxgrybh}/${this.ruleForm.xm}`,
query: {
type: 0
}
})
this.$store.commit('layout/delcachePageName', 'htcj')
this.$refs[formName].resetFields();
this.ruleForm = {
ysxtAsjxgrybh: "", // 人员编号
jzrybh: "", // 警综人员编号
asjxgrybh: "", // 案事件相关人员编号号
zzhwkbh: "", // 现场掌指纹卡编号
cjxxyydm: "", // 采集信息原因
xm: "", // 姓名
bmch: "", // 别名
xbdm: "", // 性别
csrq: "", // 出生日期
gjdm: "", // 国籍
mzdm: "", // 民族
cyzjdm: "", // 证件类型
zjhm: "", // 证件号码
hjdzXzqhdm: "", // 户籍地行政区
hjdzDzmc: "", // 户籍地址
xzzXzqhdm: "", // 现住址行政区
xzzDzmc: "", // 现住址
bz: "", // 备注
nydwGajgjgdm: "", // 捺印单位
nyryXm: "", // 捺印人姓名
nysj: "", // 捺印时间
nyryGmsfhm: "", // 捺印人身份证号
nyryLxdh: "", // 捺印人电话
ifidcard: "1", // 是否采集二代身份证
zwbdxtlxms: "1", // 指纹比对描述
};
this.checkedTargets = ["1"]; // 选定的目标逻辑库
}
})
} else {
this.$message.error("新增失败");
this.$set(this.ruleForm, "cjxxyydm", []);
this.$set(this.ruleForm, 'ysxtAsjxgrybh', this.ruleForm.ysxtAsjxgrybh.substring(1, 23))
}
});
}
} else {
this.$nextTick(() => {
let isError = document.getElementsByClassName("is-error");
isError[0].scrollIntoView({
// 滚动到指定节点
// 值有start,center,end,nearest,当前显示在视图区域中间
block: "center",
// 值有auto、instant,smooth,缓动动画(当前是慢速的)
behavior: "smooth",
});
});
return false;
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
this.$store.commit('layout/delcachePageName', 'xzry/:type')
this.ruleForm = {} //清空列表
// 关闭tab页
this.$bus.emit("xzryResetForm", "xzry");
},
initData() {
// 赋值
this.ruleForm.id = this.ryInfo.id;
this.ruleForm.rybh = this.ryInfo.ysxtAsjxgrybh;
this.ruleForm.jzrybh = this.ryInfo.jzrybh;
// 人员档案信息
if (this.ryInfo.cjxxyydm) {
this.ruleForm.cjxxyydm = this.ryInfo.cjxxyydm.split(",");
}
this.ruleForm.zzhwkbh = this.ryInfo.zzhwkbh;
this.ruleForm.asjxgrybh = this.ryInfo.asjxgrybh;
this.ruleForm.xm = this.ryInfo.xm;
this.ruleForm.bmch = this.ryInfo.bmch;
this.ruleForm.xbdm = this.ryInfo.xbdm;
this.ruleForm.csrq = this.ryInfo.csrq;
this.ruleForm.gjdm = this.ryInfo.gjdm;
this.ruleForm.mzdm = this.ryInfo.mzdm;
this.ruleForm.cyzjdm = this.ryInfo.cyzjdm;
this.ruleForm.zjhm = this.ryInfo.zjhm;
this.ruleForm.hjdzXzqhdm = this.ryInfo.hjdzXzqhdm;
this.ruleForm.hjdzDzmc = this.ryInfo.hjdzDzmc;
this.ruleForm.xzzXzqhdm = this.ryInfo.xzzXzqhdm;
this.ruleForm.xzzDzmc = this.ryInfo.xzzDzmc;
this.ruleForm.bz = this.ryInfo.bz;
// 人员逻辑分库
// let ryljfk = this.ryInfo.logicdbtype.split('')
// this.ruleForm.logicdbtype = ryljfk
if (
this.ryInfo.logicDatabaseCode &&
this.ryInfo.logicDatabaseCode.length > 0
) {
this.ruleForm.logicdbtype2 = this.ryInfo.logicDatabaseCode.split(",");
} else {
this.ruleForm.logicdbtype2 = [];
}
this.ruleForm.nydwGajgjgdm = this.ryInfo.nydwGajgjgdm;
this.ruleForm.nyryXm = this.ryInfo.nyryXm;
this.ruleForm.nysj = this.ryInfo.nysj;
this.ruleForm.nyryGmsfhm = this.ryInfo.nyryGmsfhm;
this.ruleForm.nyryLxdh = this.ryInfo.nyryLxdh;
},
getRyinfo(code) {
let self = this;
this.reqParam.personStoreCustomSearch.ysxtAsjxgrybh = code;
this.$axios
.post("/api/personstore/person/list", this.reqParam)
.then((response) => {
if (response.data.code === 0) {
self.ryInfo = response.data.ret.list[0];
self.initData();
this.ruleForm.ysxtAsjxgrybh = self.ryInfo.ysxtAsjxgrybh;
// this.ruleForm = self.ryInfo
this.ruleForm.ysxtAsjxgrybh = self.ryInfo.ysxtAsjxgrybh
.toString()
.substr(1);
} else {
self.$message.error(response.data.message);
}
});
},
/**
* @description: 工作流
* @param {*}
* @return {*}
*/
workStream() {
NetUtil.workStream.stream({
barcode: "R" + this.ruleForm.ysxtAsjxgrybh,
type: 1
})
}
},
watch: {
"ruleForm.cyzjdm" (newValue, oldValue) {
if (this.ruleForm.cyzjdm == "111") {
this.$set(this.rules.zjhm[1], 'pattern', /(^[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}$)/)
} else {
this.$set(this.rules.zjhm[1], 'pattern', /^(?:0|[1-9]\d{3,30})?$/)
.then(response => {
if (response.code === 0) {
console.log(response);
} else {
}
})
}
},
watch: {
"ruleForm.cyzjdm"(newValue, oldValue) {
if (this.ruleForm.cyzjdm == "111") {
this.$set(this.rules.zjhm[1], 'pattern', /(^[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}$)/)
} else {
this.$set(this.rules.zjhm[1], 'pattern', /^(?:0|[1-9]\d{3,30})?$/)
}
}
}
},
};
},
};
</script>
<style lang="scss" scoped>
......
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