|
@@ -29,7 +29,9 @@ class Filing extends Base
|
|
|
->count('id');
|
|
|
|
|
|
$list = Db::name('filing')
|
|
|
- ->field('id,filingCode,cat_id,good_name,num,wait_num,transfer_num,good_img,price,expect_service,companyName,companyCode,status,addtime,"" catinfo,orderCode,cgd_charge')
|
|
|
+ ->field('id,filingCode,cat_id,good_name,num,wait_num,transfer_num,good_img,
|
|
|
+ price,expect_service,companyName,companyCode,status,addtime,supplierNo,supplierName,customerCode,customerName,
|
|
|
+ "" catinfo,orderCode,cgd_charge')
|
|
|
->where($where)
|
|
|
->page($data['page'], $data['size'])
|
|
|
->order('id', 'desc')
|
|
@@ -38,11 +40,13 @@ class Filing extends Base
|
|
|
})
|
|
|
->select()
|
|
|
->toArray();
|
|
|
-
|
|
|
+ $has_account = checkHasAccountBySupplierNos(array_unique(array_column($list,'supplierNo')));
|
|
|
$all_cat = [];
|
|
|
foreach ($list as &$value) {
|
|
|
if (!isset($all_cat[$value['cat_id']])) $all_cat[$value['cat_id']] = implode('/', array_column(made($value['cat_id']), 'name'));
|
|
|
$value['catinfo'] = $all_cat[$value['cat_id']];
|
|
|
+ $value['wsm_has_account'] = (int)isset($has_account[$value['supplierNo']]);
|
|
|
+
|
|
|
}
|
|
|
return json_show(0, '获取报备单列表成功', ['count' => $count, 'list' => $list]);
|
|
|
}
|