Commit e83f038d by liuguorong93

警犬技术人员管理bug修复

parent 6a95046c
......@@ -158,6 +158,19 @@ var rules = {
callback()
}
}
},
// 不能输入#号
noInputJing: (rule, value, callback) => {
let myreg = /[#]+/g
if (!value) {
callback(new Error('请输入警犬芯片号'))
} else {
if (myreg.test(value)) {
callback(new Error('警犬芯片号不能含有#号'))
} else {
callback()
}
}
}
}
......
......@@ -358,7 +358,7 @@ export default {
},
],
firstJqxph: [
{ required: true, message: "请输入警犬芯片号", trigger: "blur" },
{ required: true, validator: rules.noInputJing, trigger: "blur" },
],
xxdjryXm: [
{ required: true, message: "采集人姓名必填", trigger: "blur" },
......@@ -472,7 +472,7 @@ export default {
datas.firstJqxph = "";
this.tableData = [];
let jqxphArr =
datas.jqxph && datas.jqxph.length ? datas.jqxph.split(",") : [];
datas.jqxph && datas.jqxph.length ? datas.jqxph.split("#") : [];
if (jqxphArr && jqxphArr.length === 1) {
datas.firstJqxph = jqxphArr[0];
} else if (jqxphArr && jqxphArr.length > 1) {
......@@ -505,11 +505,11 @@ export default {
this.$refs.detailInfoRef.validate((result) => {
if (result) {
// 处理警犬芯片号
let jqxph = this.detailInfo.firstJqxph + ",";
let jqxph = this.detailInfo.firstJqxph + "#";
if (this.tableData && this.tableData.length) {
this.tableData.forEach((item) => {
if (item.xinpianhao) {
jqxph = jqxph + item.xinpianhao + ",";
jqxph = jqxph + item.xinpianhao + "#";
}
});
}
......@@ -531,15 +531,13 @@ export default {
xxdjryGmsfhm: this.detailInfo.xxdjryGmsfhm,
xxdjdwGajgmc: this.detailInfo.xxdjdwGajgmc,
xxdjdwGajgjgdm: this.detailInfo.xxdjdwGajgjgdm,
djsj: "",
djsj: this.detailInfo.djsj,
id: this.detailInfo.id || "",
};
if (this.routeName === "artisanManageEdit") {
params.djsj = this.detailInfo.djsj;
this.editParams(params);
} else {
params.djsj = moment().format("YYYY-MM-DD HH:mm:ss");
this.addParams(params);
}
}
......@@ -617,9 +615,12 @@ export default {
{
required: true,
validator: (rule, value, callback) => {
let myreg = /[#]+/g;
let curVal = item.xinpianhao || "";
if (!curVal) {
callback(new Error(`请输入警犬芯片号`));
} else if (myreg.test(curVal)) {
callback(new Error("警犬芯片号不能含有#号"));
} else {
callback();
}
......
......@@ -126,13 +126,13 @@
size="small"
class="elTableClass"
>
<el-table-column
<!-- <el-table-column
label="序号"
align="center"
type="index"
:index="indexMethod"
width="50"
></el-table-column>
></el-table-column> -->
<el-table-column
align="center"
label="操作"
......
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