Commit 65d8b0e4 authored by 高铭波's avatar 高铭波

feat(parts):地址逻辑优化

parent b069e46a
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
</template> </template>
<script> <script>
import Utils from '@/utils/callUtils.js'
import SelectParts from '@/components/select-parts/adjust.vue' import SelectParts from '@/components/select-parts/adjust.vue'
export default { export default {
components: { components: {
...@@ -96,11 +95,6 @@ export default { ...@@ -96,11 +95,6 @@ export default {
this.orderId = e && Number(e.orderId) || 0 this.orderId = e && Number(e.orderId) || 0
this.initData() this.initData()
}, },
mounted() {
Utils.$on('update-site',(site)=>{
this.updateSite(site);
})
},
methods: { methods: {
initData() { initData() {
this.loadMineAddress() this.loadMineAddress()
...@@ -144,10 +138,11 @@ export default { ...@@ -144,10 +138,11 @@ export default {
this.order.contactCityText, this.order.contactCityText,
this.order.contactCommunityText, this.order.contactCommunityText,
] ]
let address = region.join("") + (this.order.contactStreetText || '') + this.order.contactAddress
this.customer = { this.customer = {
name: this.order.contactName, name: this.order.contactName,
mobile: this.order.contactPhone, mobile: this.order.contactPhone,
address: region.join("") + this.order.contactStreetText + this.order.contactAddress, address: address,
region: region, region: region,
code: [ code: [
this.order.contactProvince, this.order.contactProvince,
...@@ -192,7 +187,11 @@ export default { ...@@ -192,7 +187,11 @@ export default {
}) })
}, },
updateSite(site) { updateSite(site) {
console.log("updateSite", site) if(this.curType) {
this.customer = site
} else {
this.mine = site
}
}, },
addParts() { addParts() {
this.$u.route({ this.$u.route({
......
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