Просмотр исходного кода

问题件 自定义订单号添加筛选

ajun 5 лет назад
Родитель
Сommit
5dc3a90304
2 измененных файлов с 5 добавлено и 7 удалено
  1. 4 5
      app/Services/OrderIssueService.php
  2. 1 2
      resources/views/order/issue/index.blade.php

+ 4 - 5
app/Services/OrderIssueService.php

@@ -78,6 +78,9 @@ class OrderIssueService
                 $query->where('logistic_id', $arr['logistic_id']);
             });
         }
+        if (isset($arr['custom_code'])) {
+            $query->where('custom_code', $arr['custom_code']);
+        }
 
         $query->selectRaw('order_issues.* ,order_issue_on_tops.id top_id ,order_issue_on_tops.remark,order_issue_on_tops.updated_at top_update')
             ->leftJoin('order_issue_on_tops', 'order_issue_on_tops.order_issue_id', '=', 'order_issues.id')
@@ -326,11 +329,7 @@ class OrderIssueService
     {
         if(!$orderIssues)return;
         foreach ($orderIssues as $orderIssue) {
-            try {
-                $orderIssue->syncRejectedBill();
-            } catch (\Exception $e) {
-                dd($e->getMessage());
-            }
+            $orderIssue->syncRejectedBill();
             $orderIssue->同步退单状态();
         }
     }

+ 1 - 2
resources/views/order/issue/index.blade.php

@@ -751,7 +751,6 @@
                     },
                     {name: 'logistic_number_return', type: 'input', tip: '退回单号:前或后加百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '退回单号'},
                     {name: 'send_client_code', type: 'input', tip: '二次订单号:前或后加百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '二次订单号'},
-
                 ], [
                     {name: 'created_at_end', type: 'dateTime', tip: '订单结束日期'},
                     {name: 'consignee_name', type: 'input', tip: '收货人名称:前或后加百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '收货人名称'},
@@ -760,7 +759,6 @@
                     {name: 'good_name', type: 'input', tip: '商品名:前或后加 百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '商品名'},
                     {name: 'id_quality_label', type: 'select', tip: '是否正品', placeholder: '是否正品', data: this.qualityLabel},
                     {name: 'is_imported', type: 'select', tip: '是否导入处理', placeholder: '是否导入处理', data: imported_status},
-
                 ],[
                     @cannot('订单管理-问题件-客户不可见')
                     {name: 'logistic_indemnity_money', type: 'input', tip: '承运商赔偿金额', placeholder: '承运商赔偿金额'},
@@ -774,6 +772,7 @@
                         data:log_content_range,
                         rules:[{son:{addtime:{default:'31',required_without_all_if:['created_at_start','created_at_end']}}}]},
                     // {date_relevance:{date:['orderdate_start','orderdate_end'],relevance:'addtime',killing:'date',default:[31,92,183,366]}}]},
+                    {name: 'custom_code', type: 'input', tip: '自定义订单号:自定义订单号', placeholder: '自定义订单号'},
                     {name: 'is_handle', type: 'checkbox', tip: '是否已处理', data: [{name: 'ture', value: '已解决'}]},
                 ],[
                     {name: 'settlement_at_start', type: 'dateTime', tip: '完结起始日期'},