diff --git a/app/Admin/Actions/Coupon/RefreshPAOrder.php b/app/Admin/Actions/Coupon/RefreshPAOrder.php new file mode 100644 index 0000000..72036b2 --- /dev/null +++ b/app/Admin/Actions/Coupon/RefreshPAOrder.php @@ -0,0 +1,48 @@ +month; + $month = Carbon::parse($month)->format('Ym'); + $table = 'api_log_'.$month; + + if (! Schema::hasColumn($table, 'coupon_no')) { + Schema::table($table, function (Blueprint $table) { + $table->string('coupon_no')->after('out_source')->nullable(); + }); + } + + CheckCouponLog::dispatch($table); + CheckCouponByLog::dispatch($table, 10); + + return $this->response()->success('正在获取数据,请等待片刻后刷新页面查看!')->refresh(); + } + + public function form() + { + $this->date('month', '月份')->format('YYYY-MM'); + } + + public function html() + { + return << 刷新平安订单id +HTML; + } +} 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 = <<