whitefang 1 год назад
Родитель
Сommit
14ebccd1a1

+ 2 - 2
app/workerapi/lists/GoodsFeeStandardsLists.php

@@ -21,8 +21,8 @@ class GoodsFeeStandardsLists extends BaseWorkerDataLists implements ListsSearchI
      */
     public function setSearch(): array
     {
-        if(isset($this->params['id'])){
-            $rechargeOrder = RechargeOrder::with(['orderGoods'])->where('work_id',$this->params['id'])->where('payment_type','IN',[0,1])->find()->toArray();
+        if(isset($this->params['work_id'])){
+            $rechargeOrder = RechargeOrder::with(['orderGoods'])->where('work_id',$this->params['work_id'])->where('payment_type','IN',[0,1])->find()->toArray();
             $this->params['goods_id'] =  $rechargeOrder['orderGoods'][0]['goods_id']??0;
         }
         return [

+ 2 - 2
app/workerapi/validate/GoodsFeeStandardsValidate.php

@@ -27,7 +27,7 @@ class GoodsFeeStandardsValidate extends BaseValidate
      * @var string[]
      */
     protected $field = [
-        'id' => '工单ID'
+        'work_id' => '工单ID'
     ];
 
     /**
@@ -36,6 +36,6 @@ class GoodsFeeStandardsValidate extends BaseValidate
      */
     public function sceneStandards()
     {
-        return $this->only(['id']);
+        return $this->only(['work_id']);
     }
 }