Commit b8c73ca0 authored by wuwangwolihui's avatar wuwangwolihui

修改-提示文字、邮寄地址模块

parent ca6fc8d1
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
v-model="addressForm.certificate_phone" v-model="addressForm.certificate_phone"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-row :gutter="40"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="收货地址" prop="certificate_province"> <el-form-item label="收货地址" prop="certificate_province">
<el-select <el-select
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="no_label" label=" " prop="county"> <el-form-item class="no_label" label=" " prop="certificate_county">
<!-- <el-select <!-- <el-select
ref="school" ref="school"
v-model="addressForm.school" v-model="addressForm.school"
...@@ -78,8 +78,8 @@ ...@@ -78,8 +78,8 @@
</el-select> --> </el-select> -->
<el-input <el-input
clearable clearable
placeholder="选择所在区县" placeholder="填写所在区县"
v-model="county" v-model="addressForm.certificate_county"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
clearable clearable
placeholder="填写详细地址" placeholder="填写详细地址"
ref="certificate_address" ref="certificate_address"
v-model="certificate_address" v-model="addressForm.certificate_address"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -138,9 +138,9 @@ ...@@ -138,9 +138,9 @@
trigger: "change", trigger: "change",
}, },
], ],
// county: [ certificate_county: [
// { required: true, message: "请选择所在区县!", trigger: "blur" }, {required: true, message: "所在区县不能为空!", trigger: "blur"},
// ], ],
certificate_address: [ certificate_address: [
{required: true, message: "详细地址不能为空!", trigger: "blur"}, {required: true, message: "详细地址不能为空!", trigger: "blur"},
], ],
...@@ -150,10 +150,9 @@ ...@@ -150,10 +150,9 @@
certificate_phone: "", certificate_phone: "",
certificate_province: null, certificate_province: null,
certificate_city: null, certificate_city: null,
certificate_address: "", certificate_county: "", //区县
certificate_address: "", //详细地址
}, },
county: "", //区县
certificate_address: "", //详细地址
selectProvince: [], //省份 selectProvince: [], //省份
CityName: {}, //根据省份筛选出所有城市的对象 CityName: {}, //根据省份筛选出所有城市的对象
selectCityJiguan: [], //籍贯城市列表 selectCityJiguan: [], //籍贯城市列表
...@@ -174,6 +173,7 @@ ...@@ -174,6 +173,7 @@
// 确认,关闭弹框,修改父组件的值 // 确认,关闭弹框,修改父组件的值
cancelBtn() { cancelBtn() {
this.dialogVisible = false; this.dialogVisible = false;
this.$refs.addressRef.resetFields();
this.$emit("closeAddressDialog", this.dialogVisible, false); this.$emit("closeAddressDialog", this.dialogVisible, false);
}, },
open() { open() {
...@@ -181,7 +181,6 @@ ...@@ -181,7 +181,6 @@
this.getAddress(); this.getAddress();
}, },
getAddress() { getAddress() {
console.log(111111)
getAddress({}).then((res) => { getAddress({}).then((res) => {
// console.log(res, "getAddress"); // console.log(res, "getAddress");
if (res.data.code != 200) { if (res.data.code != 200) {
...@@ -190,28 +189,18 @@ ...@@ -190,28 +189,18 @@
if (res.data.info == null) { if (res.data.info == null) {
return; return;
} else { } else {
// console.log(Object.keys(res.data.info),'info')
// if (Object.keys(res.data.info).length != 0) {
// return this.$message.error("已保存地址");
// }
// this.dialogVisible = true;
this.addressForm.certificate_name = res.data.info.certificate_name; this.addressForm.certificate_name = res.data.info.certificate_name;
this.addressForm.certificate_phone = res.data.info.certificate_phone; this.addressForm.certificate_phone = res.data.info.certificate_phone;
this.addressForm.certificate_province = this.addressForm.certificate_province = res.data.info.certificate_province;
res.data.info.certificate_province;
this.addressForm.certificate_city = res.data.info.certificate_city; this.addressForm.certificate_city = res.data.info.certificate_city;
this.selectCitySchool = this.getCurrentCityLists( this.selectCitySchool = this.getCurrentCityLists(this.addressForm.certificate_province);
this.addressForm.certificate_province
);
if (res.data.info.certificate_address) { if (res.data.info.certificate_address) {
this.county = res.data.info.certificate_address.split("-")[0]; this.addressForm.certificate_county = res.data.info.certificate_address.split("-")[0];
this.certificate_address = this.addressForm.certificate_address = res.data.info.certificate_address.split("-")[1];
res.data.info.certificate_address.split("-")[1];
} }
} }
}); });
}, },
// 获取省份城市 // 获取省份城市
getProAndCity() { getProAndCity() {
getProAndCity({}).then((res) => { getProAndCity({}).then((res) => {
...@@ -223,17 +212,14 @@ ...@@ -223,17 +212,14 @@
this.CityName = res.data.city_list; this.CityName = res.data.city_list;
}); });
}, },
//选择籍贯省份change事件 //选择籍贯省份change事件
changeProvince(val, status) { changeProvince(val, status) {
console.log(val);
this.selectCitySchool = []; this.selectCitySchool = [];
this.selectCitySchool = this.getCurrentCityLists(val); //在此调用城市筛选列表 this.selectCitySchool = this.getCurrentCityLists(val); //在此调用城市筛选列表
if (!status) { if (!status) {
this.addressForm.certificate_city = ""; this.addressForm.certificate_city = "";
} }
}, },
//返回当前省份下的城市列表 //返回当前省份下的城市列表
getCurrentCityLists(val) { getCurrentCityLists(val) {
console.log(val); console.log(val);
...@@ -272,22 +258,23 @@ ...@@ -272,22 +258,23 @@
}, },
// 提交 // 提交
setAddress() { setAddress() {
this.addressForm.certificate_address =
this.county.toString() + "-" + this.certificate_address.toString();
this.$refs["addressRef"].validate((valid, object) => { this.$refs["addressRef"].validate((valid, object) => {
console.log(valid, "valid"); if (!valid) return false;
if (!valid) { let obj = {
return false; certificate_name: this.addressForm.certificate_name,
certificate_phone: this.addressForm.certificate_phone,
certificate_province: this.addressForm.certificate_province,
certificate_city: this.addressForm.certificate_city,
certificate_address: this.addressForm.certificate_county.toString() + "-" + this.addressForm.certificate_address.toString(),
} }
}); setAddress(obj).then((res) => {
if (res.data.code != 200) {
setAddress(this.addressForm).then((res) => { return this.$message.error(res.data.msg);
// console.log(res, "setAddress"); }
if (res.data.code != 200) { this.$message.success(res.data.msg);
return this.$message.error(res.data.msg); this.dialogVisible = false;
} this.$refs.addressRef.resetFields();
this.$message.success(res.data.msg); });
this.dialogVisible = false;
}); });
}, },
}, },
......
...@@ -801,7 +801,7 @@ ...@@ -801,7 +801,7 @@
JSON.stringify(this.fileList) JSON.stringify(this.fileList)
); );
this.$message.success({ this.$message.success({
message: "您已上传成功,等待短信通知,审核通过后登录报名网址。", message: "您已上传成功,等待邮件通知,审核通过后登录报名网址。",
duration: 5000, duration: 5000,
}); });
this.hideUpload = this.fileList.length >= 1; this.hideUpload = this.fileList.length >= 1;
...@@ -849,8 +849,7 @@ ...@@ -849,8 +849,7 @@
// let code = this.$store.state.indexIdentity; // let code = this.$store.state.indexIdentity;
// window.localStorage.setItem("sign_up_payfile_" + window.localStorage.getItem("index-phone-all") + code, JSON.stringify(this.fileList)); // window.localStorage.setItem("sign_up_payfile_" + window.localStorage.getItem("index-phone-all") + code, JSON.stringify(this.fileList));
// this.$message.success({ // this.$message.success({
// message: // message: "您已上传成功,等待邮件通知,审核通过后登录报名网址。",
// "您已上传成功,等待短信通知,审核通过后登录报名网址。",
// duration: 5000, // duration: 5000,
// }); // });
// this.changeStatus(); // this.changeStatus();
......
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