|
@@ -1797,6 +1797,7 @@
|
|
|
:prop="item.required ? item.fieldKey : ''"
|
|
|
>
|
|
|
<el-input
|
|
|
+ :disabled="apply_post_disabled"
|
|
|
v-model="infoForm.apply_post"
|
|
|
:placeholder="`请输入${item.fieldName}`"
|
|
|
/>
|
|
@@ -2391,22 +2392,22 @@ export default {
|
|
|
message: "请输入身份证号",
|
|
|
trigger: ["change", "blur"],
|
|
|
},
|
|
|
- {
|
|
|
- validator: (rule, value, callback) => {
|
|
|
- let IDRe18 =
|
|
|
- /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
|
|
|
- let IDre15 =
|
|
|
- /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/;
|
|
|
-
|
|
|
- if (!IDRe18.test(value) && !IDre15.test(value)) {
|
|
|
- return callback(new Error("请输入格式正确的身份证号"));
|
|
|
- } else {
|
|
|
- return callback();
|
|
|
- }
|
|
|
- },
|
|
|
- message: "请输入格式正确的身份证号",
|
|
|
- trigger: ["change", "blur"],
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // validator: (rule, value, callback) => {
|
|
|
+ // let IDRe18 =
|
|
|
+ // /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
|
|
|
+ // let IDre15 =
|
|
|
+ // /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/;
|
|
|
+
|
|
|
+ // if (!IDRe18.test(value) && !IDre15.test(value)) {
|
|
|
+ // return callback(new Error("请输入格式正确的身份证号"));
|
|
|
+ // } else {
|
|
|
+ // return callback();
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // message: "请输入格式正确的身份证号",
|
|
|
+ // trigger: ["change", "blur"],
|
|
|
+ // },
|
|
|
],
|
|
|
telphone: [
|
|
|
{
|
|
@@ -2414,18 +2415,18 @@ export default {
|
|
|
message: "请输入手机号码",
|
|
|
trigger: ["change", "blur"],
|
|
|
},
|
|
|
- {
|
|
|
- validator: (rule, value, callback) => {
|
|
|
- var reg_tel =
|
|
|
- /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
|
|
|
- if (reg_tel.test(value)) {
|
|
|
- return callback();
|
|
|
- } else {
|
|
|
- return callback(new Error("手机号码不正确"));
|
|
|
- }
|
|
|
- },
|
|
|
- trigger: ["change", "blur"],
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // validator: (rule, value, callback) => {
|
|
|
+ // var reg_tel =
|
|
|
+ // /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
|
|
|
+ // if (reg_tel.test(value)) {
|
|
|
+ // return callback();
|
|
|
+ // } else {
|
|
|
+ // return callback(new Error("手机号码不正确"));
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // trigger: ["change", "blur"],
|
|
|
+ // },
|
|
|
],
|
|
|
education: [
|
|
|
{
|
|
@@ -2571,6 +2572,7 @@ export default {
|
|
|
menuIndex: [],
|
|
|
clickLock: false,
|
|
|
liveLast: null,
|
|
|
+ apply_post_disabled: false,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -3328,17 +3330,26 @@ export default {
|
|
|
},
|
|
|
|
|
|
async uploadDatas(data) {
|
|
|
+ let self = this;
|
|
|
if (this.infoForm.recent_photos && this.infoForm.idcard_face_photo) {
|
|
|
let base = await this.$tools.imageToBase64(
|
|
|
this.$tools.splitImgHost(this.infoForm.idcard_face_photo)
|
|
|
);
|
|
|
console.log(base);
|
|
|
console.log(this.$tools.splitImgHost(this.infoForm.idcard_face_photo));
|
|
|
- let resData = await this.$request.faceCertificationIDCardOCR({
|
|
|
- cardSide: 1, //1人像 2 国徽
|
|
|
- cardImageBase64: base,
|
|
|
- gradeId: this.gradeId,
|
|
|
- });
|
|
|
+
|
|
|
+ let resData = {};
|
|
|
+ try {
|
|
|
+ resData = await this.$request.faceCertificationIDCardOCR({
|
|
|
+ cardSide: 1, //1人像 2 国徽
|
|
|
+ cardImageBase64: base,
|
|
|
+ gradeId: this.gradeId,
|
|
|
+ });
|
|
|
+ } catch (err) {
|
|
|
+ self.$message.warning("身份证人像面照片异常,请重新上传");
|
|
|
+ self.uploading = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
if (!resData.data) {
|
|
|
this.$message.warning("身份证人像面照片异常,请重新上传");
|
|
@@ -3473,7 +3484,6 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- var self = this;
|
|
|
if (self.remarkStatus) {
|
|
|
var arsty = {};
|
|
|
for (let k in data) {
|
|
@@ -4489,6 +4499,12 @@ export default {
|
|
|
this.$request.goodsDetail(this.goodsId).then((res) => {
|
|
|
self.goodsData = res.data;
|
|
|
self.gradeId = self.goodsData.gradeId;
|
|
|
+ if (this.goodsData.categoryName) {
|
|
|
+ this.infoForm.apply_post = this.goodsData.categoryName;
|
|
|
+ if (this.goodsData.categoryName) {
|
|
|
+ this.apply_post_disabled = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (this.goodsData.buyNote) {
|
|
|
this.tabList = [
|
|
|
{ name: "1", label: "学员须知" },
|