Commit 4a828e6b authored by honghy's avatar honghy Committed by wux

bug203 报价单校验错误

parent 444d7e2c
......@@ -7,7 +7,7 @@
</div>
<el-form-item :label="$t('所属人')" prop="relation">
<!-- <el-radio-group v-model="form.relation" > -->
<el-radio-group v-model="form.relation" id="relation">
<el-radio-group v-model="form.relation" id="relation" @change="handleChangeRelation">
<el-radio :label="1">{{ $t("发件人") }}</el-radio>
<el-radio :label="2">{{ $t("收件人") }}</el-radio>
</el-radio-group>
......@@ -952,61 +952,6 @@ export default {
}
},
watch: {
"form.relation": function (newVal) {
// this.form.standard = this.computedStandard
if (this.$route.query.type == 1) {
let customer = this.customer
switch (this.form.relation) {
case 1:
if (customer.name != null) {
this.form.consignorName = customer.name
this.form.consigneeName = ""
this.form.consignorId = customer.customerContactsId
}
if (customer.company != null) {
this.form.consignorCompany = customer.company
this.form.consigneeCompany = ""
}
if (customer.phoneNew != null) {
this.form.consignorPhone = customer.phoneNew
this.form.consignorCountryCode = customer.areaCode
this.form.consigneePhone = ""
this.form.consigneeCountryCode = ""
}
if (customer.email != null) {
this.form.consignorEmail = customer.email
this.form.consigneeEmail = ""
}
console.log(customer, this.form, "zs")
return
case 2:
if (customer.name != null) {
this.form.consignorName = ""
this.form.consigneeName = customer.name
this.form.consigneeId = customer.customerContactsId
}
if (customer.company != null) {
this.form.consignorCompany = ""
this.form.consigneeCompany = customer.company
}
if (customer.phoneNew != null) {
this.form.consignorPhone = ""
this.form.consignorCountryCode = ""
this.form.consigneePhone = customer.phoneNew
this.form.consigneeCountryCode = customer.areaCode
}
if (customer.email != null) {
this.form.consignorEmail = ""
this.form.consigneeEmail = customer.email
}
return
default:
return ""
}
}
},
// 始发地
"form.departureId"() {
this.getOpenedRouterList()
......@@ -1127,6 +1072,21 @@ export default {
},
methods: {
handleChangeRelation(val) {
if(val==1) {
this.form.consigneeName = ""
this.form.consigneeCompany = ""
this.form.consigneePhone = ""
this.form.consigneeCountryCode = ""
this.form.consigneeEmail = ""
} else {
this.form.consignorName = ""
this.form.consignorCompany = ""
this.form.consignorPhone = ""
this.form.consignorCountryCode = ""
this.form.consignorEmail = ""
}
},
async getChannelList() {
let query = {
cityId: this.form.objectiveId,
......
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