This commit is contained in:
zds
2022-11-10 20:12:16 +08:00
parent 52b7294a9f
commit a892e65fec
6 changed files with 24 additions and 34 deletions

View File

@@ -553,9 +553,13 @@ public class HandNewMaterialServiceImpl implements HandNewMaterialService {
if (receive_dtl_jo.getString("status").equals("99")) {
throw new PdaRequestException("收货单明细已完成!");
}
if (receive_dtl_jo.getDoubleValue("status") == 0) {
throw new PdaRequestException("收货明细入库数为0");
double unin = receive_dtl_jo.getDouble("receive_qty")-receive_dtl_jo.getDouble("instor_qty");
if (unin <= 0) {
throw new PdaRequestException("收货明细未入库数为0");
}
if(bucket_now.getDouble("storage_qty") > unin){
throw new PdaRequestException("当前组盘入库数"+bucket_now.getDouble("storage_qty")+"大于收货明细未入库数"+unin+"");
}
bucket_now.put("source_billdtl_id", bill.get("source_billdtl_id"));
bucket_now.put("source_bill_type", bill.get("source_bill_type"));
bucket_now.put("source_bill_code", bill.get("source_bill_code"));

View File

@@ -69,16 +69,10 @@ public class DailyplanServiceImpl implements DailyplanService {
String planend_date = jo.getString("planend_date");
Date date = DateUtil.parse(planend_date);
String plan_finish_date = jo.getString("plan_finish_date");
Date date2 = DateUtil.parse(plan_finish_date);
long days = (int) DateUtil.between(date2,date, DateUnit.DAY);
int report_time = jo.getInteger("report_time");
int report_day = report_time/24;
if(date2.getTime() >= date.getTime()){
jo.put("day_num",days-report_day);
}else{
jo.put("day_num",-days-report_day);
}
Date date2 = DateUtil.offsetDay(date, report_day);
jo.put("plan_finish_date2",DateUtil.formatDate(date2));
ja.add(jo);
}
Map<String, Object> jret = new HashMap<String, Object>();

View File

@@ -136,9 +136,10 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
if (dtlJa_map.containsKey(material_id)) {
need_qty = dtlJa_map.get(material_id);
}
double canuse_num = NumberUtil.sub(now_ivt - need_qty).doubleValue();
jo1.put(material_id, String.format("%.3f", canuse_num));
jo1.put(material_id, String.format("%.3f", now_ivt));
double canuse_num = NumberUtil.sub(now_ivt - need_qty).doubleValue();
//已开单重量
jo22.put(material_id, String.format("%.3f", need_qty));
//2、排产需求量(未开单的工令重量+排产未生成工令日计划重量)根据bom计算需要多少原料库存重量
@@ -184,7 +185,7 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
jo7.put(material_id, String.format("%.3f", safe_qty));
//8、采购缺口库存+待检+在途+最低储备-排产量
double buy_qty = bom_qty + safe_qty - (canuse_num + noin_qty + notqty);
double buy_qty = (canuse_num + noin_qty + notqty) - (bom_qty + safe_qty);
jo8.put(material_id, String.format("%.3f", buy_qty));
//6、覆盖日期物料库存可坚持到哪一天库存现存量减每天需求量哪天<0,取前一天

View File

@@ -109,21 +109,21 @@
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column fixed type="selection" width="55" />
<el-table-column v-if="false" prop="id" label="id" />
<el-table-column prop="supp_name" label="供应商" min-width="220px" show-overflow-tooltip/>
<el-table-column prop="create_date" label="订单日期" width="150px" />
<el-table-column prop="vbillcode" label="订单编号" min-width="100px" show-overflow-tooltip/>
<el-table-column prop="supp_name" label="供应商" min-width="220px" />
<el-table-column prop="create_date" label="订单日期" width="100" :formatter="planend_timeFormat" />
<el-table-column prop="vbillcode" label="订单编号" min-width="100px" />
<el-table-column prop="crowno" label="明细行号" />
<el-table-column prop="material_code" label="物料编码" width="120px" show-overflow-tooltip/>
<el-table-column prop="material_name" label="物料名称" min-width="200px" show-overflow-tooltip/>
<el-table-column prop="material_code" label="物料编码" width="160" />
<el-table-column prop="material_name" label="物料名称" min-width="120" />
<el-table-column prop="qty" label="采购重量" width="120px" :formatter="crud.formatNum3"/>
<el-table-column prop="receive_qty" label="到货重量" width="100px" :formatter="crud.formatNum3"/>
<el-table-column prop="instor_qty" label="入库重量" width="100px" :formatter="crud.formatNum3"/>
<el-table-column prop="surplus_qty" label="剩余重量" width="100px" :formatter="crud.formatNum3"/>
<el-table-column prop="unit_name" label="单位" />
<el-table-column prop="proc_status" label="处理状态" :formatter="formaterStatus" />
<el-table-column show-overflow-tooltip prop="contract_no" label="合同编码" />
<el-table-column show-overflow-tooltip prop="price" label="无税单价" :formatter="crud.formatNum3" />
<el-table-column show-overflow-tooltip prop="price_tax" label="含税单价" :formatter="crud.formatNum3" />
<el-table-column prop="contract_no" label="合同编码" />
<el-table-column prop="price" label="无税单价" :formatter="crud.formatNum3" />
<el-table-column prop="price_tax" label="含税单价" :formatter="crud.formatNum3" />
<el-table-column prop="input_optname" label="导入人" />
<el-table-column prop="update_optname" label="更新人" />
<el-table-column prop="input_time" label="导入时间" width="150px" />
@@ -249,6 +249,9 @@ export default {
this.crud.toQuery()
})
},
planend_timeFormat(row) {
return row.create_date.substring(0, 10)
},
formaterStatus(row, column) {
for (const item of this.procStatusList) {
if (item.code === row.proc_status) {

View File

@@ -21,15 +21,6 @@
</el-row>
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
<!-- <el-form-item label="组织机构" prop="sysdeptid">
<treeselect
v-model="form.sysdeptid"
:options="depts"
:load-options="loadDepts"
style="width: 200px"
placeholder="选择部门"
/>
</el-form-item>-->
<el-form-item label="模板" prop="captemplate_code">
<label slot="label">模&nbsp;&nbsp;板&nbsp;号:</label>
<el-input v-model="form.captemplate_code" disabled placeholder="系统生成" clearable style="width: 210px" />
@@ -100,8 +91,6 @@
import CRUD, { crud, form } from '@crud/crud'
import capacitytemplate from '@/api/wms/pdm/capacitytemplate'
import queryDevice from '@/views/wms/pdm/base/CapacityTemplate/queryDevice'
import shutframe from '@/api/wms/st/inStor/shutframe'
import crudDept, {getDepts} from "@/api/system/dept";
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
const defaultForm = {

View File

@@ -200,8 +200,7 @@
<el-table-column prop="product_weight" label="计划重量(kg)" :formatter="crud.formatNum0" min-width="100" />
<el-table-column prop="product_num" label="批数" min-width="50" />
<el-table-column prop="planend_date" label="计划结束日期" min-width="100" />
<el-table-column prop="plan_finish_date" label="交货日期" min-width="85" />
<el-table-column prop="day_num" label="提前天数" min-width="75" :formatter="crud.formatNum0" />
<el-table-column prop="plan_finish_date2" label="计划交货日期" min-width="100" />
<el-table-column :formatter="stateFormat" min-width="50" prop="status" label="状态" />
<el-table-column prop="task_code" label="生产任务号" min-width="110" />
<el-table-column prop="create_time" label="创建时间" min-width="135" />