chuweiqiang 1 năm trước cách đây
mục cha
commit
017d18d388

+ 1 - 1
app/admin/controller/Platform.php

@@ -46,7 +46,7 @@ class Platform extends Controller
             $post = $this->request->post();
             if (isset($post['android']) && $post['android']['download_url']){
              // $url =  setappcode($post['android']['download_url']);
-              $url =  setappcode("https://ship-expert.zhousi.hdlkeji.com/h53/index.html#/");
+              $url =  setappcode("https://ship.shipcc.cn/h53/index.html#/");
                $post['android']['download_url_code'] = $url;
             }
             foreach ($post as $k => $v) sysconf($k, $v);

+ 9 - 0
app/admin/controller/ShopCoor.php

@@ -120,7 +120,11 @@ class ShopCoor extends Controller
             }
 //            var_dump($row['form']);die;
 //            $row['fm'] = explode(',',$row['form']);
+            //$row['images'] = $row['file'];
 
+            if($row['file'] == '' || $row['file'] == null){
+                $row['file'] = [];
+            }
             $this->assign('row',$row);
             $this->fetch('edit');
         }else{
@@ -152,6 +156,11 @@ class ShopCoor extends Controller
             if(!$data['offer_id']){
                 unset($data['offer_id']);
             }
+            if(isset($data['file'])){
+//                $data['file'] = $data['images'];
+            }else{
+                $data['file'] = null;
+            }
 //            $order= \app\data\model\ShopCoordination::create($data);
             $order=Model::update($data);
             foreach ($item as &$v){

+ 9 - 1
app/admin/controller/ShopOcean.php

@@ -130,7 +130,10 @@ class ShopOcean extends Controller
             }
 //            var_dump($row['form']);die;
             $row['fm'] = explode(',',$row['form']);
-
+            $row['images'] = $row['file'];
+            if($row['images'] == '' || $row['images'] == null){
+                $row['images'] = [];
+            }
             $this->assign('row',$row);
             $this->fetch('edit');
         }else{
@@ -166,6 +169,11 @@ class ShopOcean extends Controller
             if(!$data['offer_id']){
                 unset($data['offer_id']);
             }
+            if(isset($data['images'])){
+                $data['file'] = $data['images'];
+            }else{
+                $data['file'] = null;
+            }
             $order=Model::update($data);
             $order->items()->saveAll($item);
             app()->db->commit();

+ 13 - 0
app/admin/controller/ShopProduction.php

@@ -122,6 +122,10 @@ class ShopProduction extends Controller
                 $array = ['company'=>'平台发布'];
                 $row['merchant'] = $array;
             }
+            $row['images'] = $row['file'];
+            if($row['images'] == '' || $row['images'] == null){
+                $row['images'] = [];
+            }
             $this->assign('row',$row);
             $this->fetch('edit');
 
@@ -163,6 +167,15 @@ class ShopProduction extends Controller
             if(!$data['offer_id']){
                 unset($data['offer_id']);
             }
+            if(isset($data['images'])){
+                $data['file'] = $data['images'];
+            }else{
+                $data['file'] = null;
+            }
+//            if(count($data['file']) <= 0){
+//                $data['file'] = null;
+//            }
+
             $order=Model::update($data);
 //            $order->items()->saveAll($item);
             app()->db->commit();

+ 8 - 2
app/admin/controller/ShopPurchase.php

@@ -51,7 +51,7 @@ class ShopPurchase extends Controller
             ->where('status','in','1,2,3')
 //            ->field("sum(amount) as kkk")
             ->dateBetween('create_time')
-        ->order('create_time','desc');
+            ->order('create_time','desc');
         $this->amount = $result->db()->sum('amount');
         $result->page();
 
@@ -94,6 +94,9 @@ class ShopPurchase extends Controller
                 $array = ['company'=>'平台发布'];
                 $row['merchant'] = $array;
             }
+            if($row['images'] == '' || $row['images'] == null){
+                $row['images'] = [];
+            }
             $this->assign('row',$row);
             $this->fetch('edit');
 
@@ -130,9 +133,12 @@ class ShopPurchase extends Controller
             $data['latitude']=$merchant['latitude']??null;
             $data['amount']=min(array_column($item,'price'));
             $data['type'] =1;
-            if(!$data['offer_id']){
+            if(isset($data['offer_id']) && !$data['offer_id']){
                 unset($data['offer_id']);
             }
+            if(!isset($data['images'])){
+                $data['images'] = null;
+            }
             $order=Model::update($data);
 //            $order->items()->saveAll($item);
             app()->db->commit();

+ 2 - 1
app/admin/view/shop_coor/add.html

@@ -131,7 +131,8 @@
                         this.$message.error('请上传正确的格式')
                         return
                     }
-                    form.push({fileurl:obj.data.url,filename:obj.data.url.split('/')[obj.data.url.split('/').length-1]})
+                    console.log(form)
+                    //form.push({fileurl:obj.data.url,filename:obj.data.url.split('/')[obj.data.url.split('/').length-1]})
                     this.form.file.push({
                         type:type,
                         src:obj.data.url

+ 3 - 1
app/admin/view/shop_coor/edit.html

@@ -134,7 +134,8 @@
                         this.$message.error('请上传正确的格式')
                         return
                     }
-                    form.push({fileurl:obj.data.url,filename:obj.data.url.split('/')[obj.data.url.split('/').length-1]})
+                    console.log(this.form);
+                    //form.push({fileurl:obj.data.url,filename:obj.data.url.split('/')[obj.data.url.split('/').length-1]})
                     this.form.file.push({
                         type:type,
                         src:obj.data.url
@@ -149,6 +150,7 @@
                         this.$message.error('请上传正确的格式')
                         return
                     }
+                    console.log(form);
                     form.push({fileurl:obj.data.url,filename:obj.data.url.split('/')[obj.data.url.split('/').length-1]})
                     // form.push(obj.data.url)
                 });

+ 1 - 0
app/admin/view/shop_production/edit.html

@@ -139,6 +139,7 @@
                         this.$message.error('请上传正确的格式')
                         return
                     }
+                    console.log(this.form.images)
                     this.form.images.push({
                         type:type,
                         src:obj.data.url

+ 12 - 3
app/data/controller/api/business/Order.php

@@ -172,7 +172,15 @@ class Order  extends Controller
         $status =[7,8];
         $query = ShopOrder::mQuery()->like('order_name');
         $list = $query ->where('admin_id',$admin_id['id'])
-            ->whereIn('status',$status)->where('refund_del',1)->whereOr('refund_status',3)->order('id desc')->page(true, false, false, 10);
+            ->where('refund_del',1)->where(function ($query) {
+                $query->where('status', 'in', '7,8')->whereOr('refund_status',3);
+            })->order('id desc')->page(true, false, false, 10);
+
+//        $query->where(function ($query,$admin_id) {
+//            $query->where('admin_id', $admin_id['id'])->whereor('id', 2);
+//        })->whereOr(function ($query) {
+//            $query->where('name', 'like', 'think')->whereOr('name', 'like', 'thinkphp');
+//        })->select();
         foreach ($list['list'] as $k=>$v){
             $list['list'][$k]['goods_item']=ShopOrderItem::mk()->where('order_no',$list['list'][$k]['order_no'])->select();
             $list['list'][$k]['user_address']=ShopOrderSend::mk()->where('order_no',$list['list'][$k]['order_no'])->find();
@@ -199,7 +207,8 @@ class Order  extends Controller
             'reason.default'=>'',
         ]);
         $info = ShopOrder::mk()->where(['id'=>$data['order_id'],'admin_id'=>$admnd_id['id'],'status'=>7])->find();
-        $pay_money  = ShopOrderPay::mk()->where(['status' => 2, 'pay_no'=>$info['payment_trade']])->value('money');
+//        $pay_money  = ShopOrderPay::mk()->where(['status' => 2, 'pay_no'=>$info['payment_trade']])->value('money');
+        $pay_money  = ShopOrderPay::mk()->where(['pay_no'=>$info['payment_trade']])->value('money');
 
         if(empty($info)){
             $this->error('订单信息有误');
@@ -219,7 +228,7 @@ class Order  extends Controller
                     $this->success('已同意退款,支付金额原路退回');
                 }
                 else{
-                    $this->error('金额未退回查看支付账户');
+                    $this->error('管理平台微信账户余额不足,请联系管理员');
                 }
             }
             //统一退货

+ 1 - 1
app/data/model/ShopOrder.php

@@ -237,4 +237,4 @@ class ShopOrder extends Model
     }
 
 
-}
+}