Browse Source

修改筛查信息提交接口传修改前的手机号和姓名

new-ays
1747191978@qq.com 2 months ago
parent
commit
3a317252db
  1. 27
      acupuncture-前台/src/views/screening/h5eva.vue

27
acupuncture-前台/src/views/screening/h5eva.vue

@ -317,6 +317,18 @@ import {
export default {
name: "Notice",
data() {
var numberValidator = (rule, value, callback) => {
// 18-65
if (!value) {
callback(new Error("年龄不能为空"));
return;
}
if (value < 18 || value > 65) {
callback(new Error("年龄范围需要在18-65岁之间"));
} else {
callback();
}
};
return {
popupRadio: 1,
open: false,
@ -567,7 +579,7 @@ export default {
"SCWJ-AGE": [
{
required: true,
message: "年龄不能为空",
validator: numberValidator,
trigger: ["blur", "change"],
},
],
@ -656,7 +668,10 @@ export default {
//
handlePopupVerify() {
if (this.popupRadio === 1) {
this.form = { ...this.form, ...this.detailList };
this.form = {
...this.form,
...JSON.parse(JSON.stringify(this.detailList)),
};
setTimeout(() => {
this.open = false;
}, 500);
@ -679,11 +694,10 @@ export default {
if (name && phone && /^1[3456789]\d{9}$/.test(phone)) {
queryDetailNoToken({ param: { name: name, phone: phone } }).then(
(res) => {
this.detailList = {};
if (res.data.list.length) {
this.detailList = {};
let data = res.data.list[0];
this.detailId = data.id;
console.log("this.detailId", this.detailId);
data.detailList.forEach((item) => {
this.detailList[item.questionCode] = item.answer;
});
@ -955,6 +969,11 @@ export default {
await this.saveAnswer(this.tips, "SCREEN-JL");
// ------ ------
const submitParams = { param: { detailId: this.detailId } };
// this.detailList
if (Object.keys(this.detailList).length !== 0) {
submitParams.param.phone = this.detailList["SCWJ-PHONE"];
submitParams.param.name = this.detailList["SCWJ-NAME"];
}
await screenSubmit(submitParams).then((response) => {
this.loading = false;
this.disabled = false;

Loading…
Cancel
Save