feat(admin/controller, retail/CashierclassLogic): 优化采购类商品展示
This commit is contained in:
parent
caaac6882c
commit
d8a78633ea
@ -112,6 +112,14 @@ class OpurchaseclassController extends BaseAdminController
|
||||
'is_adopt' => 1
|
||||
];
|
||||
$item['nums_count'] = OpurchaseGoodsOffer::where($where)->sum('nums');
|
||||
$offer=OpurchaseGoodsOffer::where($where)->field('delivery_name,delivery_id')->find();
|
||||
if($offer){
|
||||
$item['delivery_name']=$offer['delivery_name'];
|
||||
$item['delivery_id']=$offer['delivery_id'];
|
||||
}else{
|
||||
$item['delivery_name']='';
|
||||
$item['delivery_id']='';
|
||||
}
|
||||
});
|
||||
$data['count'] = Opurchaseinfo::where($where)->count();
|
||||
$data['lists'] = $res?->toArray();
|
||||
|
@ -155,7 +155,7 @@ class CashierclassLogic extends BaseLogic
|
||||
->with('goodsName')
|
||||
->field('goods,price sell,nums')->select()->each(function($item){
|
||||
$item['msg']='预计48小时发货';
|
||||
$item['goods_unit']=Unit::where('id',$item['unit'])->value('name');
|
||||
$item['unit_name']=Unit::where('id',$item['unit'])->value('name');
|
||||
});
|
||||
$merchant=Merchant::where('mer_id',$find['merchant'])->field('mer_id,uid,mer_name,service_phone,mer_address')->find();
|
||||
$merchant['real_name']=User::where('id',$merchant['uid'])->value('real_name');
|
||||
|
@ -42,6 +42,9 @@
|
||||
if(!isset($v['nums']) || $v['nums'] == '') {
|
||||
return '第'.($k+1).'行缺少数量';
|
||||
}
|
||||
if($data['nums']<$v['nums']){
|
||||
return '第'.($k+1).'行数量不能大于采购数量';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user