|
@@ -10,6 +10,7 @@ use App\Model\CustomerInfo;
|
|
|
use App\Model\Depart;
|
|
|
use App\Model\Employee;
|
|
|
use App\Model\InvoiceOrder;
|
|
|
+use App\Model\OrderOperation;
|
|
|
use App\Model\Product;
|
|
|
use App\Model\SalesOrder;
|
|
|
use App\Model\SalesOrderInfo;
|
|
@@ -906,6 +907,12 @@ class SalesOrderService extends Service
|
|
|
SeeRange::insert($insert);
|
|
|
}
|
|
|
|
|
|
+ (new OrderOperationService())->add([
|
|
|
+ 'order_number' => $msg['order_number'],
|
|
|
+ 'msg' => OrderOperation::$type[OrderOperation::one],
|
|
|
+ 'type' => OrderOperation::one
|
|
|
+ ],$user);
|
|
|
+
|
|
|
DB::commit();
|
|
|
}catch (\Exception $exception){
|
|
|
DB::rollBack();
|
|
@@ -949,7 +956,7 @@ class SalesOrderService extends Service
|
|
|
* @param $data
|
|
|
* @return array
|
|
|
*/
|
|
|
- public function salesOrderDispatchCompany($data){
|
|
|
+ public function salesOrderDispatchCompany($data,$user){
|
|
|
list($status,$msg) = $this->salesOrderDispatchCompanyRule($data);
|
|
|
if(! $status) return [false,$msg];
|
|
|
|
|
@@ -990,6 +997,12 @@ class SalesOrderService extends Service
|
|
|
$model->save();
|
|
|
}
|
|
|
|
|
|
+ (new OrderOperationService())->add([
|
|
|
+ 'order_number' => $msg['order_number'],
|
|
|
+ 'msg' => OrderOperation::$type[OrderOperation::one],
|
|
|
+ 'type' => OrderOperation::one
|
|
|
+ ],$user);
|
|
|
+
|
|
|
DB::commit();
|
|
|
}catch (\Exception $exception){
|
|
|
DB::rollBack();
|