产品新增当前存量展示

This commit is contained in:
weizhiqiang 2019-10-13 22:33:03 +08:00
parent 36a794b461
commit 11184c41e6
2 changed files with 13 additions and 1 deletions

View file

@ -206,13 +206,17 @@
FORMAT(a.retail_price, 2) retailPrice,
FORMAT(a.low_price, 2) lowPrice,
FORMAT(a.estimate_purchase_price, 2) estimatePurchasePrice,
FORMAT(a.sale_price, 2) salePrice
FORMAT(a.sale_price, 2) salePrice,
SUM(c.oper_number * (CASE d.type WHEN 2 THEN 1 ELSE -1 END)) currentTock
FROM
erp_material_norms a
LEFT JOIN erp_unit b ON a.unit_id = b.id
LEFT JOIN erp_depotitem c ON a.id = c.m_unit_id
LEFT JOIN erp_depothead d ON c.header_id = d.id
WHERE
a.meterial_id = #{id}
AND a.delete_flag = '0'
GROUP BY a.id
ORDER BY b.number ASC
</select>

View file

@ -14,6 +14,12 @@
</form>
<script type="text/x-handlebars-template" id="simpleTemplate">
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">当前存量:</label>
<div class="layui-input-block ver-center">
<a class="notice-title-click">{{currentTock}}</a>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">安全存量:</label>
<div class="layui-input-block ver-center">
@ -80,6 +86,7 @@
<th style="width: 60px;">单位类型</th>
<th style="width: 60px;">计量单位</th>
<th>安全存量</th>
<th>当前存量</th>
<th>零售价</th>
<th>最低售价</th>
<th>预计采购价</th>
@ -92,6 +99,7 @@
<td>{{baseUnit}}</td>
<td>{{unitName}}</td>
<td>{{safetyTock}}</td>
<td><a class="notice-title-click">{{currentTock}}</a></td>
<td>{{retailPrice}}</td>
<td>{{lowPrice}}</td>
<td>{{estimatePurchasePrice}}</td>