本地生活后端显示商品返补比例
This commit is contained in:
parent
09409360e6
commit
fbc2ea2901
@ -4,6 +4,7 @@ namespace app\admin\logic\shop;
|
||||
|
||||
use app\common\basics\Logic;
|
||||
use app\common\enum\LocalStoreGoodsEnum;
|
||||
use app\common\model\goods\GoodsSubsidy;
|
||||
use app\common\model\localstore\LocalStoreGoods;
|
||||
use app\common\model\localstore\LocalStoreGoodsItem;
|
||||
use think\facade\Config;
|
||||
@ -80,6 +81,12 @@ class LocalStoreGoodsLogic extends Logic
|
||||
{
|
||||
$data = LocalStoreGoods::with('pic')->where(['id' => $id])->find()->toArray();
|
||||
|
||||
$data['subsidy'] = [];
|
||||
if ($data['subsidy_id'] > 0) {
|
||||
$model = new GoodsSubsidy();
|
||||
$data['subsidy'] = $model->getSubsidyById($data['subsidy_id']);
|
||||
}
|
||||
|
||||
// 查找多规格
|
||||
if ($data['is_multiple_spec'] == 1) {
|
||||
$data['item'] = LocalStoreGoodsItem::where([
|
||||
|
||||
@ -213,14 +213,12 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>商家利润比例</th>
|
||||
<th>商品让利比例</th>
|
||||
<th>商品全返比例</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>${subsidy.profit}</td>
|
||||
<td>${subsidy.discount}</td>
|
||||
<td>${subsidy.subsidy}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@ -57,6 +57,26 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">商品返补比例:</label>
|
||||
<div class="layui-input-inline">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>商家折扣比例</th>
|
||||
<th>商品最高返补比例</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{$data.subsidy.profit}</td>
|
||||
<td>{$data.subsidy.subsidy}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">商品概述:</label>
|
||||
<div class="layui-input-inline">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user