Commit 44175795 by Joneq

修改整箱字判断

parent cc336e2d
......@@ -113,11 +113,15 @@ class PalletLogic
//确认出库
static public function confirmOutStore($data)
{
$outStoreDetailIdArr = $data['pick_task_detail_id_arr'];
$pickTaskDetailIdArr = $data['pick_task_detail_id_arr'];
$adminInfo = CommonLogic::getAdminInfo();
PickTaskDetailModel::whereIn('pick_task_detail_id',$outStoreDetailIdArr)->update([
if (PickTaskDetailModel::getWhereObj([])->whereIn('pick_task_detail_id',$pickTaskDetailIdArr)->where('pick_status','!=',3)){
throw new \Exception('拣货任务存在未拣货数据,请拣货');
}
PickTaskDetailModel::whereIn('pick_task_detail_id',$pickTaskDetailIdArr)->update([
'is_confirm'=>1,'confirm_time'=>time(),
'confirm_user_name'=>$adminInfo['admin_name'],
'confirm_user_id'=>$adminInfo['admin_id'],
......@@ -129,9 +133,9 @@ class PalletLogic
public function cancelOutStore($data)
{
//获取需要修改的货品
$outStoreDetailIdArr = $data['pick_task_detail_id_arr'];
$pickTaskDetailIdArr = $data['pick_task_detail_id_arr'];
PickTaskDetailModel::whereIn('pick_task_detail_id',$outStoreDetailIdArr)->update(['is_confirm'=>0]);
PickTaskDetailModel::whereIn('pick_task_detail_id',$pickTaskDetailIdArr)->update(['is_confirm'=>0]);
return [];
}
......
......@@ -73,6 +73,7 @@ class PickTaskLogic
$data['number'] = $value;
$data['location_id'] = $locatiion[0];
$data['pallet_id'] = $locatiion[1];
$data['box_id'] = $locatiion[2];
if (!empty($data['pallet_id'])){
......@@ -84,9 +85,8 @@ class PickTaskLogic
$isAllGoods++;
}
$data['box_id'] = $locatiion[2];
if (!empty($data['box_id'])){
if (empty($data['pallet_id']) && !empty($data['box_id'])){
if (StockModel::where('pallet_id',$data['pallet_id'])->where('warehousing_sn',$outStoreDetail['warehousing_sn'])->sum('stock') == $value){
$data['pick_remark'] = '整箱';
}else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment