|
@@ -408,7 +408,7 @@ class Sale extends Base
|
|
|
|
|
|
if($out['status']==1 ){
|
|
|
//节点1待库管发货
|
|
|
- if($data['is_stock']==0){
|
|
|
+// if($data['is_stock']==0){
|
|
|
//非库存品,推给供应商负责人
|
|
|
$supp = Db::name('supplier')
|
|
|
->field('person,personid')
|
|
@@ -423,20 +423,20 @@ class Sale extends Base
|
|
|
'wait_id'=>$supp['personid'],
|
|
|
'wait_name'=>$supp['person'],
|
|
|
]);
|
|
|
- }else{
|
|
|
- //库存品,推给31库管和41库管-张凯旋
|
|
|
- $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" => $out['status'],
|
|
|
- 'handle_user_list' => implode(',', $uids),
|
|
|
- ]);
|
|
|
- }
|
|
|
+// }else{
|
|
|
+// //库存品,推给31库管和41库管-张凯旋
|
|
|
+// $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" => $out['status'],
|
|
|
+// 'handle_user_list' => implode(',', $uids),
|
|
|
+// ]);
|
|
|
+// }
|
|
|
}else{
|
|
|
ProcessOrder::AddProcess(['id'=>$rm,'nickname'=>$ri], [
|
|
|
"order_type" => 'CKD',
|
|
@@ -807,23 +807,23 @@ class Sale extends Base
|
|
|
$process=[];
|
|
|
if($status == 1){
|
|
|
//库存品,推给库管和库管-张凯旋
|
|
|
- if($etid['is_stock']==1){
|
|
|
- $roleid = config('app.wsm_cgder_role');
|
|
|
- $uids = Db::name('user_role')
|
|
|
- ->where('is_del', 0)
|
|
|
- ->whereIn('roleid', $roleid)
|
|
|
- ->column('uid');
|
|
|
- $process=[
|
|
|
- "order_type" => 'CKD',
|
|
|
- "order_code" => $outCode,//出库单号
|
|
|
- "order_id" => $ou,
|
|
|
- "order_status" => $status,
|
|
|
- "before_status" => 0,
|
|
|
-// 'holder_id'=>$out['apply_id'],
|
|
|
- 'handle_user_list' => implode(',', $uids)
|
|
|
- ];
|
|
|
- }else{
|
|
|
- //非库存品,推给供应商负责人
|
|
|
+// if($etid['is_stock']==1){
|
|
|
+// $roleid = config('app.wsm_cgder_role');
|
|
|
+// $uids = Db::name('user_role')
|
|
|
+// ->where('is_del', 0)
|
|
|
+// ->whereIn('roleid', $roleid)
|
|
|
+// ->column('uid');
|
|
|
+// $process=[
|
|
|
+// "order_type" => 'CKD',
|
|
|
+// "order_code" => $outCode,//出库单号
|
|
|
+// "order_id" => $ou,
|
|
|
+// "order_status" => $status,
|
|
|
+// "before_status" => 0,
|
|
|
+//// 'holder_id'=>$out['apply_id'],
|
|
|
+// 'handle_user_list' => implode(',', $uids)
|
|
|
+// ];
|
|
|
+// }else{
|
|
|
+ //推给供应商负责人
|
|
|
$supplier = Db::name('supplier')
|
|
|
->field('person,personid')
|
|
|
->where('code',$cgdinfo['supplierNo'])
|
|
@@ -838,7 +838,7 @@ class Sale extends Base
|
|
|
'wait_name'=>$supplier['person'],
|
|
|
'holder_id'=>$supplier['personid'],
|
|
|
];
|
|
|
- }
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
if(empty($process)) $process=[
|
|
@@ -2920,16 +2920,16 @@ class Sale extends Base
|
|
|
//库存品——>推到库管,非库存品——>推送供应商负责人
|
|
|
$order=[];
|
|
|
if($data['status'] == 1){
|
|
|
- if($der['is_stock'] == 1){
|
|
|
- //库存品,推给库管和库管-张凯旋
|
|
|
- $roleid = config('app.wsm_cgder_role');
|
|
|
- $uids = Db::name('user_role')
|
|
|
- ->where('is_del', 0)
|
|
|
- ->whereIn('roleid', $roleid)
|
|
|
- ->column('uid');
|
|
|
- $order = ["order_type" => "CKD", "order_code" => $outCode, "order_id" => $datainfo, "order_status" => $data['status'], "before_status" => 0, 'handle_user_list' => implode(',', $uids)];
|
|
|
- }else{
|
|
|
- //非库存品和采返商品,推给供应商负责人
|
|
|
+// if($der['is_stock'] == 1){
|
|
|
+// //库存品,推给库管和库管-张凯旋
|
|
|
+// $roleid = config('app.wsm_cgder_role');
|
|
|
+// $uids = Db::name('user_role')
|
|
|
+// ->where('is_del', 0)
|
|
|
+// ->whereIn('roleid', $roleid)
|
|
|
+// ->column('uid');
|
|
|
+// $order = ["order_type" => "CKD", "order_code" => $outCode, "order_id" => $datainfo, "order_status" => $data['status'], "before_status" => 0, 'handle_user_list' => implode(',', $uids)];
|
|
|
+// }else{
|
|
|
+ //推给供应商负责人
|
|
|
$supplier = Db::name('supplier')
|
|
|
->alias('a')
|
|
|
->field('a.id,a.person,a.personid')
|
|
@@ -2938,7 +2938,7 @@ class Sale extends Base
|
|
|
->where('c.orderCode', $orderCode)
|
|
|
->findOrEmpty();
|
|
|
$order = ["order_type" => "CKD", "order_code" => $outCode, "order_id" => $datainfo, "order_status" => $data['status'], "before_status" => 0, 'holder_id' => $data['apply_id'], 'wait_id' => $supplier['personid'] ?? 0, 'wait_name' => $supplier['person'] ?? ''];
|
|
|
- }
|
|
|
+// }
|
|
|
}
|
|
|
if(empty($order)) $order = ["order_type" => "CKD", "order_code" => $outCode, "order_id" => $datainfo, "order_status" => $data['status'], "before_status" => 0, 'holder_id' => $data['apply_id']];
|
|
|
|
|
@@ -3010,8 +3010,8 @@ class Sale extends Base
|
|
|
|
|
|
$order = [];
|
|
|
if ($status == 1) {
|
|
|
- //非库存品,推给供应商负责人
|
|
|
- if ($dr['is_stock'] == 0) {
|
|
|
+ //推给供应商负责人
|
|
|
+// if ($dr['is_stock'] == 0) {
|
|
|
$supplier = Db::name('supplier')
|
|
|
->alias('a')
|
|
|
->field('a.id,a.person,a.personid')
|
|
@@ -3020,14 +3020,14 @@ class Sale extends Base
|
|
|
->where('c.orderCode', $codeinfo['orderCode'])
|
|
|
->findOrEmpty();
|
|
|
$order = ["order_type" => "CKD", "order_code" => $outCode, "order_id" => $codeinfo['id'], "order_status" => $codeinfo['status'], "before_status" => 0, 'holder_id' => $codeinfo['apply_id'], 'wait_id' => $supplier['personid'] ?? 0, 'wait_name' => $supplier['person'] ?? ''];
|
|
|
- } else{
|
|
|
- $roleid = config('app.wsm_cgder_role');
|
|
|
- $uids = Db::name('user_role')
|
|
|
- ->where('is_del', 0)
|
|
|
- ->whereIn('roleid', $roleid)
|
|
|
- ->column('uid');
|
|
|
- $order = ["order_type" => "CKD", "order_code" => $outCode, "order_id" => $codeinfo['id'], "order_status" => $codeinfo['status'], "before_status" => 0, 'handle_user_list' => implode(',', $uids)];
|
|
|
- }
|
|
|
+// } else{
|
|
|
+// $roleid = config('app.wsm_cgder_role');
|
|
|
+// $uids = Db::name('user_role')
|
|
|
+// ->where('is_del', 0)
|
|
|
+// ->whereIn('roleid', $roleid)
|
|
|
+// ->column('uid');
|
|
|
+// $order = ["order_type" => "CKD", "order_code" => $outCode, "order_id" => $codeinfo['id'], "order_status" => $codeinfo['status'], "before_status" => 0, 'handle_user_list' => implode(',', $uids)];
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
if (empty($order)) $order = ["order_type" => "CKD", "order_code" => $outCode, "order_id" => $codeinfo['id'], "order_status" => $codeinfo['status'], "before_status" => 0, 'holder_id' => $codeinfo['apply_id']];
|
|
@@ -3813,22 +3813,22 @@ class Sale extends Base
|
|
|
//是否库存品,待办数据推送到的人有区别,
|
|
|
$process = [];
|
|
|
if ($data['status'] == 1) {
|
|
|
- if ($der['is_stock'] == 1) {
|
|
|
- //库存品,推给库管和库管-张凯旋
|
|
|
- $roleid = config('app.wsm_cgder_role');
|
|
|
- $uids = Db::name('user_role')
|
|
|
- ->where('is_del', 0)
|
|
|
- ->whereIn('roleid', $roleid)
|
|
|
- ->column('uid');
|
|
|
- $process = ["order_type" => 'CKD', "order_code" => $data['outCode'], "order_id" => $datainfo, "order_status" => $data['status'], "before_status" => 0, 'holder_id' => $data['apply_id'], 'handle_user_list' => implode(',', $uids)];
|
|
|
- } else{
|
|
|
- //非库存品和采返商品,推给供应商负责人
|
|
|
+// if ($der['is_stock'] == 1) {
|
|
|
+// //库存品,推给库管和库管-张凯旋
|
|
|
+// $roleid = config('app.wsm_cgder_role');
|
|
|
+// $uids = Db::name('user_role')
|
|
|
+// ->where('is_del', 0)
|
|
|
+// ->whereIn('roleid', $roleid)
|
|
|
+// ->column('uid');
|
|
|
+// $process = ["order_type" => 'CKD', "order_code" => $data['outCode'], "order_id" => $datainfo, "order_status" => $data['status'], "before_status" => 0, 'holder_id' => $data['apply_id'], 'handle_user_list' => implode(',', $uids)];
|
|
|
+// } else{
|
|
|
+ //推给供应商负责人
|
|
|
$supplier = Db::name('supplier')
|
|
|
->field('person,personid')
|
|
|
->where('code', $cgd['supplierNo'])
|
|
|
->findOrEmpty();
|
|
|
$process = ["order_type" => 'CKD', "order_code" => $data['outCode'], "order_id" => $datainfo, "order_status" => $data['status'], "before_status" => 0, 'holder_id' => $data['apply_id'], 'wait_id' => $supplier['personid'], 'wait_name' => $supplier['person'],];
|
|
|
- }
|
|
|
+// }
|
|
|
}
|
|
|
if (empty($process)) $process = ["order_type" => 'CKD', "order_code" => $data['outCode'], "order_id" => $datainfo, "order_status" => $data['status'], "before_status" => 0, 'holder_id' => $data['apply_id']];
|
|
|
|