feat(StoreCashFinanceFlowLists): 添加店铺名称和管理员名称查询功能
This commit is contained in:
parent
3b166e5701
commit
216d0d5554
@ -6,7 +6,8 @@ namespace app\admin\lists\store_cash_finance_flow;
|
||||
use app\admin\lists\BaseAdminDataLists;
|
||||
use app\common\model\store_cash_finance_flow\StoreCashFinanceFlow;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\system_store\SystemStore;
|
||||
|
||||
/**
|
||||
* 现金流水列表
|
||||
@ -47,7 +48,12 @@ class StoreCashFinanceFlowLists extends BaseAdminDataLists implements ListsSearc
|
||||
->field(['id', 'store_id', 'cash_price', 'receivable', 'receipts', 'admin_id', 'file', 'remark', 'status'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->select()->each(function ($item) {
|
||||
$item->store_name =SystemStore::where('id', $item->store_id)->value('name');
|
||||
if($item->admin_id>0){
|
||||
$item->admin_name =Admin::where('id', $item->admin_id)->value('name');
|
||||
}
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ class CashFlowLogic extends BaseLogic
|
||||
$model->store_id = $storeId;
|
||||
$model->cash_price = $amount;
|
||||
$model->receivable = $amount;
|
||||
$model->status = YesNoEnum::YES;//收银台收了默认算完成了
|
||||
$model->status = YesNoEnum::NO;//收银台收了默认算完成了
|
||||
$model->save();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user