渠道后台增加平安主订单id
This commit is contained in:
@@ -33,6 +33,7 @@ class IndexController extends Controller
|
|||||||
$start = $request->start;
|
$start = $request->start;
|
||||||
$end = $request->end;
|
$end = $request->end;
|
||||||
$thirdPartyGoodsId = $request->thirdPartyGoodsId;
|
$thirdPartyGoodsId = $request->thirdPartyGoodsId;
|
||||||
|
$pa_order_id = $request->pa_order_id;
|
||||||
|
|
||||||
$coupons = Coupon::where('user_id', $user->id)
|
$coupons = Coupon::where('user_id', $user->id)
|
||||||
->when($outlet, function ($q) use ($outlet) {
|
->when($outlet, function ($q) use ($outlet) {
|
||||||
@@ -48,6 +49,9 @@ class IndexController extends Controller
|
|||||||
->when($thirdPartyGoodsId, function ($q) use ($thirdPartyGoodsId) {
|
->when($thirdPartyGoodsId, function ($q) use ($thirdPartyGoodsId) {
|
||||||
$q->where('thirdPartyGoodsId', $thirdPartyGoodsId);
|
$q->where('thirdPartyGoodsId', $thirdPartyGoodsId);
|
||||||
})
|
})
|
||||||
|
->when($pa_order_id, function ($q) use ($pa_order_id) {
|
||||||
|
$q->where('pa_order_id', $pa_order_id);
|
||||||
|
})
|
||||||
->when(is_numeric($status), function ($query) use ($status) {
|
->when(is_numeric($status), function ($query) use ($status) {
|
||||||
if ($status == 4) {
|
if ($status == 4) {
|
||||||
$query->where('is_profit', 1);
|
$query->where('is_profit', 1);
|
||||||
@@ -154,6 +158,9 @@ class IndexController extends Controller
|
|||||||
->when($request->thirdPartyGoodsId, function ($q) use ($request) {
|
->when($request->thirdPartyGoodsId, function ($q) use ($request) {
|
||||||
$q->where('thirdPartyGoodsId', $request->thirdPartyGoodsId);
|
$q->where('thirdPartyGoodsId', $request->thirdPartyGoodsId);
|
||||||
})
|
})
|
||||||
|
->when($request->pa_order_id, function ($q) use ($request) {
|
||||||
|
$q->where('pa_order_id', $request->pa_order_id);
|
||||||
|
})
|
||||||
->when(is_numeric($request->status), function ($query) use ($request) {
|
->when(is_numeric($request->status), function ($query) use ($request) {
|
||||||
$query->where('status', $request->status);
|
$query->where('status', $request->status);
|
||||||
}, function ($query) {
|
}, function ($query) {
|
||||||
@@ -249,7 +256,7 @@ class IndexController extends Controller
|
|||||||
$filename = '卡券记录'.date('YmdHis').'.csv';
|
$filename = '卡券记录'.date('YmdHis').'.csv';
|
||||||
$response = function () use ($user, $request) {
|
$response = function () use ($user, $request) {
|
||||||
$handle = fopen('php://output', 'w');
|
$handle = fopen('php://output', 'w');
|
||||||
$titles = ['ID', '网点名称', '平安券编号', '优惠政策', '核销金额', '订单id', '状态', '处理结果', '核销时间'];
|
$titles = ['ID', '网点名称', '平安券编号', '优惠政策', '核销金额', '平安主订单号', '状态', '处理结果', '核销时间'];
|
||||||
fputcsv($handle, $titles);
|
fputcsv($handle, $titles);
|
||||||
|
|
||||||
Coupon::where('user_id', $user->id)
|
Coupon::where('user_id', $user->id)
|
||||||
|
|||||||
@@ -44,6 +44,10 @@
|
|||||||
<input type="text" placeholder="平安券编号" name="redemptionCode"
|
<input type="text" placeholder="平安券编号" name="redemptionCode"
|
||||||
class="input-sm form-control" value="{{ Request::input('redemptionCode') }}">
|
class="input-sm form-control" value="{{ Request::input('redemptionCode') }}">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" placeholder="平安主订单号" name="pa_order_id"
|
||||||
|
class="input-sm form-control" value="{{ Request::input('pa_order_id') }}">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<select class="form-control m-b" name="status">
|
<select class="form-control m-b" name="status">
|
||||||
@@ -105,7 +109,7 @@
|
|||||||
<th>平安券编号</th>
|
<th>平安券编号</th>
|
||||||
<th>优惠政策</th>
|
<th>优惠政策</th>
|
||||||
<th>核销金额</th>
|
<th>核销金额</th>
|
||||||
<th>订单id</th>
|
<th>平安主订单号</th>
|
||||||
<th>状态</th>
|
<th>状态</th>
|
||||||
<th>处理结果</th>
|
<th>处理结果</th>
|
||||||
<th>核销时间</th>
|
<th>核销时间</th>
|
||||||
@@ -121,7 +125,8 @@
|
|||||||
<td>{{ $coupon->redemptionCode }}</td>
|
<td>{{ $coupon->redemptionCode }}</td>
|
||||||
<td>{{ $coupon->couponName }}</td>
|
<td>{{ $coupon->couponName }}</td>
|
||||||
<td>{{ $coupon->price }}</td>
|
<td>{{ $coupon->price }}</td>
|
||||||
<td>{{ $coupon->orderid }}</td>
|
{{-- <td>{{ $coupon->orderid }}</td>--}}
|
||||||
|
<td>{{ $coupon->pa_order_id }}</td>
|
||||||
<td>{{ $coupon->status_text }}</td>
|
<td>{{ $coupon->status_text }}</td>
|
||||||
<td>{{ $coupon->remark }}</td>
|
<td>{{ $coupon->remark }}</td>
|
||||||
<td>{{ $coupon->created_at }}</td>
|
<td>{{ $coupon->created_at }}</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user