|
@@ -487,7 +487,41 @@ class handleYzOrderData extends Command
|
|
|
"action_type" => "create"//新建create,编辑edit,更改状态status
|
|
|
], "CKD", 0, $out);
|
|
|
|
|
|
- ProcessOrder::AddProcess(['id' => $rm, 'nickname' => $ri], [
|
|
|
+ if ($out['status'] == 1) {
|
|
|
+ if ($is_stock == 1) {
|
|
|
+ //库存品,待办数据推给库管
|
|
|
+ $uids = Db::name('user_role')
|
|
|
+ ->where(['is_del' => 0, 'roleid' => config('app.wsm_cgder_role'), 'status' => 1])
|
|
|
+ ->column('uid');
|
|
|
+ ProcessOrder::AddProcess(['id' => $rm, 'nickname' => $ri], [
|
|
|
+ "order_type" => 'CKD',
|
|
|
+ "order_code" => $outCode,//出库单号
|
|
|
+ "order_id" => $ou,
|
|
|
+ "order_status" => $out['status'],
|
|
|
+ "before_status" => 0,
|
|
|
+ 'holder_id' => $data['apply_id'],
|
|
|
+ 'handle_user_list' => implode(',', $uids),
|
|
|
+ ]);
|
|
|
+ } else {
|
|
|
+ //非库存品推给供应商负责人
|
|
|
+ $supp = Db::name('supplier')
|
|
|
+ ->field('person,personid')
|
|
|
+ ->where('code', $ct['supplierNo'])
|
|
|
+ ->findOrEmpty();
|
|
|
+ ProcessOrder::AddProcess(['id' => $rm, 'nickname' => $ri], [
|
|
|
+ "order_type" => 'CKD',
|
|
|
+ "order_code" => $outCode,//出库单号
|
|
|
+ "order_id" => $ou,
|
|
|
+ "order_status" => $out['status'],
|
|
|
+ "before_status" => 0,
|
|
|
+ 'holder_id' => $data['apply_id'],
|
|
|
+ 'wait_id' => $supp['personid'],
|
|
|
+ 'wait_name' => $supp['person'],
|
|
|
+ ]);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }else ProcessOrder::AddProcess(['id' => $rm, 'nickname' => $ri], [
|
|
|
"order_type" => 'CKD',
|
|
|
"order_code" => $outCode,//出库单号
|
|
|
"order_id" => $ou,
|