|
@@ -38,7 +38,7 @@
|
|
|
<span @click="handleClickAddress" role="button" class="btn">修改</span>
|
|
|
</div>
|
|
|
<p class="phone">{{ phone }}</p>
|
|
|
- <p class="address">{{ address }}{{ email }}</p>
|
|
|
+ <p class="address">{{ address }}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-else @click="handleClickAddress">
|
|
@@ -165,13 +165,10 @@
|
|
|
<el-input size="medium" v-model="dataForm.phone" placeholder="请输入11位手机号码"></el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item v-if="data.productAttribute == 1 && data.deliveryType == 1" label="联系地址"
|
|
|
+ <el-form-item label="联系地址"
|
|
|
:label-width="formLabelWidth" prop="address">
|
|
|
<el-input size="medium" v-model="dataForm.address" placeholder="请输入详细联系地址"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-else label="联系邮箱" :label-width="formLabelWidth" prop="email">
|
|
|
- <el-input size="medium" v-model="dataForm.email" placeholder="请输入联系邮箱"></el-input>
|
|
|
- </el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer" style="text-align: center;">
|
|
|
<el-button class="addButton-address" type="primary" @click="submitForm('dataForm')">提交</el-button>
|
|
@@ -253,10 +250,10 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
+ contactInfo:{},
|
|
|
activeName: this.$route.query.activeName,
|
|
|
name: '',
|
|
|
phone: '',
|
|
|
- email: '',
|
|
|
address: '',
|
|
|
disabled: true,
|
|
|
skuCount: 1,
|
|
@@ -268,7 +265,6 @@ export default {
|
|
|
dataForm: {
|
|
|
name: '',
|
|
|
phone: '',
|
|
|
- email: '',
|
|
|
address: '',
|
|
|
},
|
|
|
rules: {
|
|
@@ -279,9 +275,6 @@ export default {
|
|
|
phone: [
|
|
|
{ required: true, validator: validPhone, trigger: 'blur' }
|
|
|
],
|
|
|
- email: [
|
|
|
- { required: true, message: '请输入联系邮箱', trigger: 'blur' },
|
|
|
- ],
|
|
|
address: [
|
|
|
{ required: true, message: '请输入联系地址', trigger: 'blur' },
|
|
|
{ min: 1, max: 120, message: '长度在 1 到 120 个字符', trigger: 'blur' }
|
|
@@ -314,6 +307,15 @@ export default {
|
|
|
if (activeName == 'goodsNotice') {
|
|
|
integralInfo({ skuId: skuId }).then(response => {
|
|
|
this.data = response.data.data;
|
|
|
+ this.contactInfo = response.data.data.contactInfo;
|
|
|
+ if(this.contactInfo){
|
|
|
+ this.name = this.contactInfo.contact;
|
|
|
+ this.phone = this.contactInfo.contactPhone;
|
|
|
+ this.address = this.contactInfo.contactAddr;
|
|
|
+ this.addressDetail = true;
|
|
|
+ this.disabled = false;
|
|
|
+ }
|
|
|
+
|
|
|
this.total = response.data.data.price;
|
|
|
if (this.data.deliveryType != 1) {
|
|
|
this.disabled = false;
|
|
@@ -334,6 +336,10 @@ export default {
|
|
|
},
|
|
|
handleClickAddress() {
|
|
|
this.dialogFormVisible = true;
|
|
|
+ this.dataForm.name = this.name;
|
|
|
+ this.dataForm.phone = this.phone;
|
|
|
+ this.dataForm.address = this.address;
|
|
|
+
|
|
|
},
|
|
|
submitForm(formName) {
|
|
|
this.$refs[formName].validate((valid) => {
|
|
@@ -341,7 +347,6 @@ export default {
|
|
|
// alert('submit!');
|
|
|
this.name = this.dataForm.name,
|
|
|
this.phone = this.dataForm.phone,
|
|
|
- this.email = this.dataForm.email,
|
|
|
this.address = this.dataForm.address,
|
|
|
this.addressDetail = true;
|
|
|
this.dialogFormVisible = false;
|
|
@@ -360,10 +365,9 @@ export default {
|
|
|
total: this.total,
|
|
|
price: this.data.price,
|
|
|
skuType: this.data.skuType,
|
|
|
- contact: this.dataForm.name,
|
|
|
- contactPhone: this.dataForm.phone,
|
|
|
- contactAddr: this.dataForm.address,
|
|
|
- contactEmail: this.dataForm.email,
|
|
|
+ contact: this.name,
|
|
|
+ contactPhone: this.phone,
|
|
|
+ contactAddr: this.address,
|
|
|
welfareId: this.data.welfareId,
|
|
|
}
|
|
|
if (this.activeName == 'goodsNotice') {
|