change - 物料信息显示是否低于安全库存

master
yinq 5 days ago
parent 73e032c91d
commit e7b0a628cb

@ -59,7 +59,7 @@
bmi.material_categories, bmi.material_categories,
bmi.material_subclass, bmi.material_subclass,
bmi.material_type_id, bmi.material_type_id,
bmt.type_name material_type_name, bmt.type_name material_type_name,
bmi.batch_flag, bmi.batch_flag,
bmi.batch_amount, bmi.batch_amount,
bmi.material_unit_id, bmi.material_unit_id,
@ -91,12 +91,12 @@
bmi.erp_modify_date, bmi.erp_modify_date,
bmi.safe_stock_amount, bmi.safe_stock_amount,
mbui.unit_name, mbui.unit_name,
wst.availableAmount, IF(wst.availableAmount IS NULL, 0, wst.availableAmount) availableAmount,
IF(wst.availableAmount >= bmi.safe_stock_amount, '1', '0') isExceeded IF(bmi.safe_stock_amount > IF(wst.availableAmount IS NULL, 0, wst.availableAmount) , '1', '0') isExceeded
from mes_base_material_info bmi from mes_base_material_info bmi
left join mes_base_material_type bmt on bmt.matrial_type_id = bmi.material_type_id left join mes_base_material_type bmt on bmt.matrial_type_id = bmi.material_type_id
left join mes_base_unit_info mbui on bmi.material_unit_id = mbui.erp_id left join mes_base_unit_info mbui on bmi.material_unit_id = mbui.erp_id
left join (select material_id, SUM(total_amount - occupy_amount) availableAmount left join (select material_id, SUM(total_amount) availableAmount
from wms_stock_total from wms_stock_total
GROUP BY material_id) wst on bmi.material_id = wst.material_id GROUP BY material_id) wst on bmi.material_id = wst.material_id
</sql> </sql>
@ -142,7 +142,7 @@
<if test="accessoriesFlag != null and accessoriesFlag != ''">and bmi.accessories_flag = #{accessoriesFlag}</if> <if test="accessoriesFlag != null and accessoriesFlag != ''">and bmi.accessories_flag = #{accessoriesFlag}</if>
<if test="lowValueConsumableFlag != null and lowValueConsumableFlag != ''">and bmi.low_value_consumable_flag = #{lowValueConsumableFlag}</if> <if test="lowValueConsumableFlag != null and lowValueConsumableFlag != ''">and bmi.low_value_consumable_flag = #{lowValueConsumableFlag}</if>
<if test="alwaysFlag != null and alwaysFlag != ''">and bmi.always_flag = #{alwaysFlag}</if> <if test="alwaysFlag != null and alwaysFlag != ''">and bmi.always_flag = #{alwaysFlag}</if>
<if test="isExceeded != null and isExceeded != ''">and IF(wst.availableAmount >= bmi.safe_stock_amount, '1', '0') = #{isExceeded}</if> <if test="isExceeded != null and isExceeded != ''">and IF(bmi.safe_stock_amount > IF(wst.availableAmount IS NULL, 0, wst.availableAmount) , '1', '0') = #{isExceeded}</if>
<if test="selectType != null and selectType !=''">and exists (select 1 from wms_warehouse_material wwm where wwm.storage_type='1' and wwm.warehouse_id=511 and wwm.storage_id=bmi.material_id)</if> <if test="selectType != null and selectType !=''">and exists (select 1 from wms_warehouse_material wwm where wwm.storage_type='1' and wwm.warehouse_id=511 and wwm.storage_id=bmi.material_id)</if>
<if test="filterMaterialId != null ">and exists (select 1 <if test="filterMaterialId != null ">and exists (select 1
from (select m1.material_id, m1.material_name, m2.material_id prod_id, m2.material_name prod_name from (select m1.material_id, m1.material_name, m2.material_id prod_id, m2.material_name prod_name

@ -109,8 +109,8 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否超安全库存" prop="isExceeded"> <el-form-item label="低于安全库存" prop="isExceeded">
<el-select v-model="queryParams.isExceeded" placeholder="请选择是否安全库存" clearable> <el-select v-model="queryParams.isExceeded" placeholder="请选择是否低于安全库存" clearable>
<el-option <el-option
v-for="dict in dict.type.active_flag" v-for="dict in dict.type.active_flag"
:key="dict.value" :key="dict.value"

Loading…
Cancel
Save