瀏覽代碼

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

wufeng 2 年之前
父節點
當前提交
6c45c5f802
共有 2 個文件被更改,包括 4 次插入3 次删除
  1. 3 2
      app/abutment/controller/Order.php
  2. 1 1
      app/admin/controller/Goodup.php

+ 3 - 2
app/abutment/controller/Order.php

@@ -461,6 +461,7 @@ class Order extends BaseController
                 $wsm_in_code = substr($wsm_in_code, 0, -2) . str_pad($i, 2, '0', STR_PAD_LEFT);
                 $i++;
 
+                //入库单
                 $win = Db::name("purchease_in")->insertGetId([
                     "wsm_in_code" => $wsm_in_code,
                     "cgdNo" => $cgdNo,
@@ -559,12 +560,12 @@ class Order extends BaseController
 
                             if ($upcgd == false) throw new Exception('采购单数量更新失败');
                         }
-                        if ($cgdinfo[$cgdNo]['send_status'] == 3 && $cgdinfo[$cgdNo]['order_type'] != 1) {
+                        if ($cgdinfo[$cgdNo]['send_status'] == 1 && $cgdinfo[$cgdNo]['order_type'] != 1) {
                             $send = Db::name("order_send")->where(["cgdNo" => $cgdNo, "status" => 1])->column("outCode");
                             if (!empty($send)) {
                                 $out = Db::name("order_out")->where(["outCode" => $send, "status" => 0])->select()->toArray();
                                 if (!empty($out)) {
-                                    $up = Db::name("order_out")->where(["outCode" => $send, "status" => 0])->update(["status" => 1, 'wsm_code' => $cgdinfo['wsm_code'], "updatetime" => date('Y-m-d H:i:s')]);
+                                    $up = Db::name("order_out")->where(["outCode" => $send, "status" => 0])->update(["status" => 1, 'wsm_code' => $cgdinfo[$cgdNo]['wsm_code'], "updatetime" => date('Y-m-d H:i:s')]);
                                     if ($up == false) throw new Exception('出库单出库失败');
                                     else {
                                         foreach ($out as $k => $v_outCode) {

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

@@ -1343,7 +1343,7 @@ class Goodup extends Base
                         $value['id']=$iso['id'];
                         $value['updatetime']=date("Y-m-d H:i:s");
                     }
-                    $up =Db::name("good")->save($value);
+                    $up = Db::name("good")->strict(false)->save($value);
                     if(!$up){
                         Db::rollback();
                         return error_show(1004,"提交失败");