chuweiqiang il y a 1 an
Parent
commit
add09ad633
2 fichiers modifiés avec 10 ajouts et 5 suppressions
  1. 2 4
      .idea/workspace.xml
  2. 8 1
      application/api/controller/Order.php

+ 2 - 4
.idea/workspace.xml

@@ -3,9 +3,7 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/api/controller/Supplier.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Supplier.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/runtime/log/single.log" beforeDir="false" afterPath="$PROJECT_DIR$/runtime/log/single.log" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/runtime/log/single_sql.log" beforeDir="false" afterPath="$PROJECT_DIR$/runtime/log/single_sql.log" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Order.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Order.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -481,7 +479,7 @@
       <workItem from="1700440204810" duration="14773000" />
       <workItem from="1700526499424" duration="11662000" />
       <workItem from="1700613253175" duration="10732000" />
-      <workItem from="1700699350870" duration="13046000" />
+      <workItem from="1700699350870" duration="15149000" />
     </task>
     <servers />
   </component>

+ 8 - 1
application/api/controller/Order.php

@@ -977,8 +977,15 @@ class Order extends Base
         $order_id = input('post.order_id');
         $field = 'id,order_no,price_total,price_goods,price_express,create_at,pay_at,pay_type,goods_num,remark,pro_name,city_name,county_name,add_detail,pay_state,user_name,phone,remark,cancel_state,cancel_at,refund_state,express_state,express_company_title,express_send_no,express_send_at';
         $order_info = GoodsOrder::with('orderRefund')->where('id',$order_id)->field($field)->find()->toArray();
+        //express_on express_company
         if(!$order_info['order_refund']) $this->error('该订单未申请退款');
-        if($order_info['order_refund']['status'] != 0 ) $this->error('订单已审核完成');
+//        if($order_info['order_refund']['status'] != 0 ) $this->error('订单已审核完成');
+        if($order_info['order_refund']['status'] == 3 ){
+            $this->error('订单已退款');
+        }
+        if($order_info['order_refund']['express_on'] != null ){
+            $this->error('订单已审核完成');
+        }
         Db::startTrans();
         try {
             StoreOrderRefund::where('id',$order_info['order_refund']['id'])->update(['status'=>5,'is_deleted'=>1]);