|
@@ -71,6 +71,9 @@ class Sale extends BaseController
|
|
|
if($arrtime==""){
|
|
|
return error_show(1004,"参数arrtime不能为空");
|
|
|
}
|
|
|
+ $paytime =isset($this->post['paytime'])&&$this->post['paytime']!=""? $this->post['paytime']:"";
|
|
|
+ $workNo =isset($this->post['workNo'])&&$this->post['workNo']!=""? trim($this->post['workNo']):"";
|
|
|
+ $poNo =isset($this->post['poNo'])&&$this->post['poNo']!=""? trim($this->post['poNo']):"";
|
|
|
$ct = Db::name('good_platform')->alias('a')->join('good b', 'b.spuCode=a.spuCode', 'left')
|
|
|
->where(['a.skuCode' => $good_code])->find();
|
|
|
if ($ct == false) {
|
|
@@ -153,10 +156,13 @@ class Sale extends BaseController
|
|
|
"is_activity"=>$is_activity===""?0:$is_activity,
|
|
|
"proof_id"=>$proofid,
|
|
|
"order_type"=>$order_type,
|
|
|
+ "poNo"=>$poNo,
|
|
|
+ "workNo"=>$workNo,
|
|
|
"addtime"=>date("Y-m-d H:i:s"),
|
|
|
"updatetime"=>date("Y-m-d H:i:s"),
|
|
|
'total_price'=>round($goodinfo['sale_price']*$good_num,2),
|
|
|
];
|
|
|
+ $paytime==""?"": $data['paytime'] = $paytime;
|
|
|
$datainfo = Db::name('sale')->insert($data,true);
|
|
|
if($datainfo>0){
|
|
|
if($is_stock==0){
|
|
@@ -2662,4 +2668,28 @@ class Sale extends BaseController
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public function addother(){
|
|
|
+ $orderCode =isset($this->post['orderCode']) && $this->post['orderCode']!=""?trim($this->post['orderCode']):"";
|
|
|
+ if($orderCode==""){
|
|
|
+ return error_show(1004,"参数orderCode不能为空");
|
|
|
+ }
|
|
|
+ $order =Db::name("sale")->where(["orderCode"=>$orderCode,"is_del"=>0])->find();
|
|
|
+ if($order==false){
|
|
|
+ return error_show(1004,"未找到订单数据");
|
|
|
+ }
|
|
|
+ $paytime =isset($this->post['paytime'])&&$this->post['paytime']!=""? $this->post['paytime']:"";
|
|
|
+ $workNo =isset($this->post['workNo'])&&$this->post['workNo']!=""? trim($this->post['workNo']):"";
|
|
|
+ $poNo =isset($this->post['poNo'])&&$this->post['poNo']!=""? trim($this->post['poNo']):"";
|
|
|
+ $paytime==""?"":$order['paytime']=$paytime;
|
|
|
+ $order['workNo']=$workNo;
|
|
|
+ $order['poNo']=$poNo;
|
|
|
+ $order['updatetime']=date("Y-m-d H:i:s");
|
|
|
+ $sa=Db::name("sale")->save($order);
|
|
|
+ if($sa){
|
|
|
+ return app_show(0,"更新成功");
|
|
|
+ }else{
|
|
|
+ return error_show(1004,"更新失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
}
|