Browse Source

Merge branch 'dev_wf' of wugg/phpstock into version1.5

wufeng 2 years ago
parent
commit
b4830e6bc6
3 changed files with 23 additions and 2 deletions
  1. 2 2
      app/admin/controller/Consult.php
  2. 20 0
      app/admin/controller/Sale.php
  3. 1 0
      app/admin/route/app.php

+ 2 - 2
app/admin/controller/Consult.php

@@ -651,7 +651,7 @@ class Consult extends Base
         $cost_desc = isset($this->post['cost_desc'])&&$this->post['cost_desc']!=""? trim($this->post['cost_desc']):"";
         $work_day = isset($this->post['work_day'])&&$this->post['work_day']!=""? intval($this->post['work_day']):"";
         $delivery_day = isset($this->post['delivery_day'])&&$this->post['delivery_day']!=""? intval($this->post['delivery_day']):"";
-        $good_img = isset($this->post['good_img'])&&$this->post['good_img']!=""? trim($this->post['good_img']):"";
+        $good_img = isset($this->post['good_img'])&&$this->post['good_img']!=""? $this->post['good_img']:[];
         $expire_day = isset($this->post['expire_day'])&&$this->post['expire_day']!=""? intval($this->post['expire_day'])
             :"";
         $origin_place = isset($this->post['origin_place'])&&$this->post['origin_place']!=""? trim($this->post['origin_place']):"";
@@ -1023,7 +1023,7 @@ class Consult extends Base
         $cost_desc = isset($this->post['cost_desc'])&&$this->post['cost_desc']!=""? trim($this->post['cost_desc']):"";
         $work_day = isset($this->post['work_day'])&&$this->post['work_day']!=""? intval($this->post['work_day']):"";
         $delivery_day = isset($this->post['delivery_day'])&&$this->post['delivery_day']!=""? intval($this->post['delivery_day']):"";
-        $good_img = isset($this->post['good_img'])&&$this->post['good_img']!=""? trim($this->post['good_img']):"";
+        $good_img = isset($this->post['good_img'])&&$this->post['good_img']!=""? $this->post['good_img']:[];
         $expire_day = isset($this->post['expire_day'])&&$this->post['expire_day']!=""? intval($this->post['expire_day'])
             :"";
         $origin_place = isset($this->post['origin_place'])&&$this->post['origin_place']!=""? trim($this->post['origin_place']):"";

+ 20 - 0
app/admin/controller/Sale.php

@@ -3541,4 +3541,24 @@ class Sale extends Base
         $headerArr = array_keys($list[0]);
         excelSave('发货申请单导出' . date('YmdHis'), $headerArr, $list);
     }
+
+    //发货申请单 签收(目前只改动状态,后面要实时查询物流信息,以判断是否签收)
+    public function saleoutReceipt()
+    {
+
+        $outCode = $this->request->post('outCode', '', 'trim');
+
+        if (empty($outCode)) return error_show(1004, '发货申请单编号不能为为空');
+
+        $rs = Db::name('order_out')
+            ->field('id')
+            ->where(['outCode' => $outCode, 'status' => 2])
+            ->find();
+
+        if (empty($rs)) return error_show(1005, '该出库单不存在或不允许确认收货');
+        else return Db::name('order_out')->field('id')->where(['id' => $rs['id'], 'status' => 2])->update(['status' => 3, 'updatetime' => date('Y-m-d H:i:s')]) ? app_show(0, '收货完成') : error_show(1005, '收货失败');
+    }
+
+
+
 }

+ 1 - 0
app/admin/route/app.php

@@ -104,6 +104,7 @@ Route::rule('salegetprice','admin/Sale/getPrice');
 Route::rule('goodzxinfo','admin/Sale/goodzxinfo');
 Route::rule('getgoodzxinfobynotzixun','admin/Sale/getGoodZxInfoByNotZixun');
 Route::rule('exportsaleout','admin/Sale/exportSaleOut');//发货申请单导出
+Route::rule('saleoutreceipt','admin/Sale/saleoutReceipt');//发货申请单确认收货
 
 Route::rule('checkflist','admin/Check/flist');
 Route::rule('checklist','admin/Check/list');