@{{ address.name }}
@@ -171,9 +171,10 @@
payment_address_id: @json($current['payment_address_id']),
payment_method_code: @json($current['payment_method_code']),
shipping_method_code: @json($current['shipping_method_code']),
- same_as_shipping_address: @json($current['same_as_shipping_address'] ?? true) ,
},
+ // same_as_shipping_address: @json($current['same_as_shipping_address'] ?? true),
+
isAllAddress: false,
isAllAddressPayment: false,
@@ -214,6 +215,20 @@
// 计算属性
computed: {
+ same_as_shipping_address: {
+ get() {
+ return this.form.shipping_address_id == this.form.payment_address_id
+ },
+
+ set(e) {
+ if (e) {
+ this.form.payment_address_id = this.form.shipping_address_id
+ } else {
+ this.form.payment_address_id = '';
+ }
+ }
+ },
+
isSubmit() {
// source.addresses.length > 0 && source.payment_methods.length > 0 && source.shipping_methods.length > 0
return this.source.addresses.length > 0 && this.source.payment_methods.length > 0 && this.source.shipping_methods.length > 0;
@@ -241,6 +256,10 @@
this.dialogAddress.show = true
},
+ // shippingPaymentAddressChange() {
+
+ // },
+
addressFormSubmit(form) {
const self = this;