Commit c8dbb5a1 by 宁成龙

优化收货公司

parent 39f507e5
......@@ -65,7 +65,7 @@ class EditUserHandle extends Form implements LazyRenderable
$form->width(5)->text('email');
});
$this->row(function (Row $form) {
$form->width(5)->select('reg_source')->options(admin_trans('user.options.reg_source'))->required();
$form->width(5)->select('account_properties')->options(admin_trans('user.options.account_properties'))->required();
$form->width(5)->text('remark');
});
}
......
......@@ -38,6 +38,7 @@ class SaveUserAddressHandle extends Form implements LazyRenderable
if ($input['is_default'] == 1) {
UserAddress::updateByUserId($address['user_id'], ['is_default' => 0]);
}
$input['consignee'] = $input['first_name'] . ' ' . $input['last_name'];
UserAddress::updateById($addressId, $input);
} else {
$userId = $this->payload['user_id'] ?? 0;
......
......@@ -5,6 +5,7 @@ namespace App\Admin\Service;
use App\Admin\Actions\User\UserAssignAction;
use App\Admin\Actions\User\UserStatusAction;
use App\Admin\Actions\User\UserTransferAction;
use App\Models\Country;
use App\Models\User;
use Dcat\Admin\Grid;
......@@ -18,9 +19,9 @@ class UserAddressService
$grid->column('phone');
$grid->column('detail_address');
$grid->column('city');
$grid->column('address_type');
$grid->column('address_type')->using(admin_trans('user-address.options.address_type'));
$grid->column('post_code');
$grid->column('country');
$grid->column('country')->using(Country::getCountryMap());
$grid->column('province');
}
}
......@@ -177,6 +177,7 @@ class UserService
"create_time" => time(),
"update_time" => time(),
];
$addressData['consignee'] = $addressData['first_name'] . " " . $addressData['last_name'];
UserAddress::insertData($addressData);
}
......
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 sign in to comment