diff --git a/app/Domains/Virtual/Services/PackageService.php b/app/Domains/Virtual/Services/PackageService.php index 3a3df965..2c29dcff 100644 --- a/app/Domains/Virtual/Services/PackageService.php +++ b/app/Domains/Virtual/Services/PackageService.php @@ -68,6 +68,8 @@ class PackageService extends Service 'carrier_operator' => ['required', 'in:0,1,2,3'], 'cost_price' => ['numeric', 'min:0'], 'guide_price' => ['numeric', 'min:0'], + 'renewal_cost_price' => ['numeric', 'min:0'], + 'renewal_guide_price' => ['numeric', 'min:0'], 'flows' => ['numeric', 'min:0'], 'voices' => ['numeric', 'min:0'], 'messages' => ['numeric', 'min:0'], @@ -100,6 +102,8 @@ class PackageService extends Service $attributes['cost_price'] = floatval($attributes['cost_price']) * 100; $attributes['guide_price'] = floatval($attributes['guide_price']) * 100; + $attributes['renewal_cost_price'] = floatval($attributes['renewal_cost_price']) * 100; + $attributes['renewal_guide_price'] = floatval($attributes['renewal_guide_price']) * 100; if (!$attributes['id']) { $maxId = Package::withTrashed()->where('type', $attributes['type'])->max('id'); diff --git a/frontend/src/views/virtual/company_accounts/js/edit.js b/frontend/src/views/virtual/company_accounts/js/edit.js index fe67a5ec..14820767 100644 --- a/frontend/src/views/virtual/company_accounts/js/edit.js +++ b/frontend/src/views/virtual/company_accounts/js/edit.js @@ -69,12 +69,7 @@ export default { return; } - if (!this.params.mobile) { - this.$Message.info('请填写手机号'); - return; - } - - if (!isPhone(this.params.mobile)) { + if (this.params.mobile && !isPhone(this.params.mobile)) { this.$Message.info('手机号填写不正确'); return; } diff --git a/vendor/dipper/foundation/src/Repository/Repository.php b/vendor/dipper/foundation/src/Repository/Repository.php index ee1b22ab..8ba28fe0 100644 --- a/vendor/dipper/foundation/src/Repository/Repository.php +++ b/vendor/dipper/foundation/src/Repository/Repository.php @@ -177,6 +177,8 @@ abstract class Repository implements RepositoryInterface, CacheableInterface, Cr $results = $this->get($columns); } + $this->resetModel(); + return $this->paginator($results, $total, $limit, $page, [ 'path' => Paginator::resolveCurrentPath(), 'pageName' => $pageName, @@ -203,6 +205,8 @@ abstract class Repository implements RepositoryInterface, CacheableInterface, Cr $this->skip(($page - 1) * $limit)->take($limit + 1); + $this->resetModel(); + return $this->simplePaginator($this->get($columns), $limit, $page, [ 'path' => Paginator::resolveCurrentPath(), 'pageName' => $pageName,