修复了在设置成功时返回错误信息的问题,并优化了商品单位获取方式。
This commit is contained in:
parent
d8a78633ea
commit
400d8c1f93
@ -120,7 +120,7 @@ class CashierclassController extends BaseAdminController
|
||||
if ($id) {
|
||||
$res = Cashierclass::where('id', $id)->update(['is_print' => 1]);
|
||||
if ($res) {
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
return $this->success('设置成功');
|
||||
}
|
||||
}
|
||||
return $this->success('设置失败');
|
||||
|
@ -54,8 +54,8 @@ class CashierinfoLists extends BaseAdminDataLists implements ListsSearchInterfac
|
||||
$cashier = Cashierclass::field('number')->where('id',$data['pid'])->findOrEmpty();
|
||||
$room = Db::name('room')->where('id',$data['room'])->find();
|
||||
$warehouse = Warehouse::field('name')->where('id',$data['warehouse'])->findOrEmpty();
|
||||
$unit=Db::name('unit')->where('id',$data['unit'])->value('name');
|
||||
$goods = Goods::field('name,imgs')->where('id',$data['goods'])->findOrEmpty();
|
||||
$goods = Goods::field('name,imgs,unit')->where('id',$data['goods'])->findOrEmpty();
|
||||
$unit=Db::name('unit')->where('id',$goods['unit'])->value('name');
|
||||
$data['cashier_number'] = !$cashier->isEmpty() ? $cashier['number'] : '';
|
||||
$data['room_data'] = !empty($room) ? $room : [];
|
||||
$data['warehouse_name'] = !$warehouse->isEmpty() ? $warehouse['name'] : '';
|
||||
|
@ -46,7 +46,7 @@ class OpurchaseclassController extends BaseApiController
|
||||
$data = [
|
||||
'delivery_name' => $delivery_name,
|
||||
'delivery_id' => $delivery_id,
|
||||
'supplier_id'=>$delivery_id,
|
||||
'supplier_id'=>$supplier_id,
|
||||
];
|
||||
$res = OpurchaseGoodsOfferLogic::express($data);
|
||||
if (true === $res) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user