diff --git a/app/Admin/Actions/Coupon/SettleCoupon.php b/app/Admin/Actions/Coupon/SettleCoupon.php new file mode 100644 index 0000000..9282dca --- /dev/null +++ b/app/Admin/Actions/Coupon/SettleCoupon.php @@ -0,0 +1,115 @@ +file('file')); + } catch (\Exception $exception) { + return $this->response()->swal()->error($exception->getMessage()); + } + + return $this->response()->swal()->success('上传成功')->refresh(); + } + + public function form() + { + $this->file('file', '请选择文件') + ->options([ + 'showPreview' => false, + 'allowedFileExtensions' => ['xlsx', 'xls', 'csv'], + 'showUpload' => true, + ]) + ->required(); + + } + + public function html(): string + { + return <<导入已结算数据 +HTML; + } + + /** + * 上传等待 + * + * @return string + */ + public function handleActionPromise(): string + { + $resolve = <<