|
|
@@ -100,7 +100,7 @@ class Deliver extends Backend
|
|
|
$bach_detail = $bach->name($userInfo['company'].'_'.'qcode_bach')->where('_id',$v['bach_id'])->find();
|
|
|
$list[$k]['id'] = substr(json_encode($v['_id']),9,-2);
|
|
|
$list[$k]['bach'] = $bach_detail['bach_num'];
|
|
|
- $list[$k]['l_flow'] = $bach_detail['l_flow']+$k;
|
|
|
+ $list[$k]['l_flow'] = ltrim(substr($v['code'],53,6),'0');
|
|
|
$list[$k]['matter_name'] = $bach_detail['matter_name'];
|
|
|
$list[$k]['manufacture_date'] = date('Y-m-d',strtotime('20'.$bach_detail['manufacture_date']));
|
|
|
$list[$k]['code'] = $v['code'];
|
|
|
@@ -659,7 +659,8 @@ class Deliver extends Backend
|
|
|
foreach ($export_id as $k=>$v){
|
|
|
$data[$k] = $export->where('_id',$v)->find();
|
|
|
$large_str = explode(',',$data[$k]['large_str']);
|
|
|
- $large_list = $large->whereIn('_id',$large_str)->select();
|
|
|
+ $large_list = $large->name($userinfo['company'].'_'.'qcode_large')->whereIn('_id',$large_str)->select();
|
|
|
+
|
|
|
$large_num = $large_weight = 0;
|
|
|
foreach ($large_list as $value){
|
|
|
$large_num = $large_num + $value['l_num'];
|
|
|
@@ -723,11 +724,15 @@ class Deliver extends Backend
|
|
|
if ($res === false){
|
|
|
$this->error('删除失败');
|
|
|
}
|
|
|
- $export_id = $goods->where('_id',$ids)->find();
|
|
|
- $result = $export->where('_id',$export_id['export_id'])->update(['status'=>0]);
|
|
|
- if ($result === false){
|
|
|
- $this->error('删除失败');
|
|
|
+ $export_list = $goods->where('_id',$ids)->find();
|
|
|
+ $export_id = explode(',',$export_list['export_id']);
|
|
|
+ foreach ($export_id as $v){
|
|
|
+ $result = $export->where('_id',$v)->update(['status'=>0]);
|
|
|
+ if ($result === false){
|
|
|
+ $this->error('删除失败');
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
$this->success('成功');
|
|
|
}
|
|
|
|