This commit is contained in:
lyd
2022-11-17 10:38:52 +08:00
9 changed files with 32 additions and 28 deletions

View File

@@ -93,7 +93,6 @@ public class AcceptMarkServiceImpl implements AcceptMarkService {
String nickName = SecurityUtils.getNickName();
String now = DateUtil.now();
JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser();
Long deptId = currentUser.getDeptId();
WQLObject mstTab = WQLObject.getWQLObject("QL_TEST_AcceptMark");
WQLObject dtlTab = WQLObject.getWQLObject("QL_TEST_AcceptMarkBOM");
@@ -106,9 +105,9 @@ public class AcceptMarkServiceImpl implements AcceptMarkService {
jsonMst.put("mark_id", IdUtil.getSnowflake(1, 1).nextId());
jsonMst.put("is_delete", "0");
jsonMst.put("remark", (String) whereJson.get("remark"));
JSONObject jonow = mstTab.query("is_delete='0' and mark_code='" + jsonMst.getString("mark_code") + "'").uniqueResult(0);
JSONObject jonow = mstTab.query("is_delete='0' and material_id='" + jsonMst.getString("material_id") + "'").uniqueResult(0);
if (jonow != null) {
throw new BadRequestException("牌号已存在!");
throw new BadRequestException("碳化钨已存在!");
}
jsonMst.put("create_id", currentUserId);
jsonMst.put("create_name", nickName);
@@ -149,12 +148,12 @@ public class AcceptMarkServiceImpl implements AcceptMarkService {
JSONObject jsonMst = new JSONObject();
whereJson.remove("tableData");
jsonMst = (JSONObject) JSON.toJSON(whereJson);
String mark_code = jsonMst.getString("mark_code");
String material_id = jsonMst.getString("material_id");
String mark_id = jsonMst.getString("mark_id");
JSONObject oldJO = mstTab.query("mark_id <> '" + mark_id + "' and mark_code='"+mark_code+"'").uniqueResult(0);
JSONObject oldJO = mstTab.query("mark_id <> '" + mark_id + "' and material_id='"+material_id+"'").uniqueResult(0);
if(oldJO !=null){
throw new BadRequestException("已存在相同牌号");
throw new BadRequestException("已存在相同碳化钨");
}
JSONObject now = mstTab.query("mark_id = '" + mark_id + "'").uniqueResult(0);
//主表

View File

@@ -138,7 +138,7 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
for (int i = 0; i < mater_rows.size(); i++) {
JSONObject mater = mater_rows.getJSONObject(i);
String material_id = mater.getString("material_id");
//1、库存现存量现有库存 - 开单领料重量
//1、库存现存量现有库存
JSONObject mater_ivt = WQL.getWO("statistical_report_query_01").addParam("flag", "4").addParam("material_id", material_id).process().uniqueResult(0);
double now_ivt = 0;
@@ -152,10 +152,10 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
jo1.put(material_id, String.format("%.3f", now_ivt));
double canuse_num = NumberUtil.sub(now_ivt - need_qty).doubleValue();
double canuse_num = now_ivt;
//已开单重量
jo22.put(material_id, String.format("%.3f", need_qty));
//2、排产需求量(未开的工令重量+排产未生成工令日计划重量)根据bom计算需要多少原料库存重量
//2、排产需求量(未开的工令重量+排产未生成工令日计划重量)根据bom计算需要多少原料库存重量
JSONObject nedd_mater = WQL.getWO("statistical_report_query_01").addParam("flag", "6").addParam("material_id", material_id).addParam("begin_time", begin_time).addParam("end_time", end_time).addParam("org_id", org_id).process().uniqueResult(0);
double bom_qty = 0;
if (ObjectUtil.isNotEmpty(nedd_mater)) {

View File

@@ -457,7 +457,7 @@
FROM
pdm_bi_workorder wo
WHERE
wo.`status` < 40
wo.`status` < 50
AND is_delete = '0'
OPTION 输入.begin_time <> ""
wo.planstart_time >= 输入.begin_time
@@ -611,7 +611,7 @@
FROM
pdm_bi_workorder wo
WHERE
wo.`status` < 40
wo.`status` < 50
AND is_delete = '0'
OPTION 输入.begin_time <> ""
wo.planstart_time like 输入.begin_time
@@ -682,7 +682,7 @@
LEFT JOIN md_me_materialbase mb ON mb.material_id = wo.material_id
LEFT JOIN md_me_producmaterialext ext ON ext.material_id = wo.material_id
WHERE
wo.`status` < 40
wo.`status` < 50
AND
wo.is_delete = '0'
OPTION 输入.begin_time <> ""

View File

@@ -215,13 +215,21 @@ export default {
this.form.tableData = res
})
},
[CRUD.HOOK.afterToView]() {
[CRUD.HOOK.afterToView](crud, form) {
const data = {
'device_bom_id': this.form.device_bom_id
}
crudDevicebom.getDtl(data).then(res => {
this.form.tableData = res
})
if (!form.device_bom_code) {
this.queryClassId()
} else {
const data = {}
data.id = form.material_type_id
data.goal_id = this.classBj_id
this.getSubTypes(data)
}
},
[CRUD.HOOK.afterToCU](crud, form) {
if (!form.device_bom_code) {

View File

@@ -165,8 +165,8 @@
<el-table-column prop="material_code" label="物料编码" min-width="150"/>
<el-table-column :formatter="seriesFormat" min-width="80" prop="product_series" label="系列" />
<el-table-column prop="product_type_name" label="生产方式" />
<el-table-column prop="fact_weight" label="生产重量(t)" :formatter="pcsn_num_format2" min-width="90" />
<el-table-column prop="standard_weight" label="每批重量kg" width="90" :formatter="crud.formatNum3"/>
<el-table-column prop="fact_weight" label="生产重量Kg" :formatter="crud.formatNum0" min-width="95" />
<el-table-column prop="standard_weight" label="每批重量Kg" width="95" :formatter="crud.formatNum0"/>
<el-table-column prop="pcsn_num" label="批数" :formatter="pcsn_num_format"/>
<el-table-column :formatter="stateFormat" min-width="80" prop="is_proc" label="状态" />
<el-table-column prop="update_time" label="提交时间" width="140px" />
@@ -268,9 +268,6 @@ export default {
pcsn_num_format(row) {
return Math.ceil(row.fact_weight / row.standard_weight)
},
pcsn_num_format2(row) {
return parseFloat(row.fact_weight / 1000.0).toFixed(3)
},
onInput() {
this.$forceUpdate()
},

View File

@@ -176,14 +176,14 @@
<el-table-column prop="material_code" label="物料编码" min-width="150"/>
<el-table-column prop="old_mark" min-width="100" label="牌号" />
<el-table-column prop="product_type_name" label="生产方式" />
<el-table-column prop="product_weight" label="需求重量" :formatter="crud.formatNum3"/>
<el-table-column prop="fact_weight" label="生产重量" :formatter="crud.formatNum3" width="150" align="center">
<el-table-column prop="product_weight" label="需求重量" :formatter="crud.formatNum0"/>
<el-table-column prop="fact_weight" label="生产重量" :formatter="crud.formatNum0" width="150" align="center">
<template scope="scope">
<el-input-number size="mini" v-model="scope.row.fact_weight" :precision="3" :controls="false" :min="1" style="width: 120px" :disabled="scope.row.is_proc > 0" />
<el-input-number size="mini" v-model="scope.row.fact_weight" :precision="0" :controls="false" :min="1" style="width: 120px" :disabled="scope.row.is_proc > 0" />
</template>
</el-table-column>
<el-table-column prop="weight_unit_name" label="单位"/>
<el-table-column prop="standard_weight" label="每批重量kg" width="90" :formatter="crud.formatNum3"/>
<el-table-column prop="standard_weight" label="每批重量kg" width="90" :formatter="crud.formatNum0"/>
<el-table-column prop="pcsn_num" label="批数" :formatter="pcsn_num_format"/>
<el-table-column :formatter="stateFormat" min-width="80" prop="is_proc" label="状态" />
<el-table-column prop="input_time" label="生成时间" width="140px" />

View File

@@ -46,19 +46,19 @@
/>
</template>
</el-table-column>
<el-table-column prop="mark_code" width="150px" label="牌号" align="center">
<el-table-column prop="material_code" label="碳化钨编码" width="120" align="center" />
<el-table-column prop="material_name" width="120" label="碳化钨名称" align="center">
<template slot-scope="scope">
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.mark_code }}</el-link>
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.material_name }}</el-link>
</template>
</el-table-column>
<el-table-column prop="mark_code" width="150px" label="牌号" align="center" />
<el-table-column prop="c_balance" label="碳平衡" width="90px" align="center" :formatter="crud.formatQlNum4" />
<el-table-column prop="liquid_rate" label="液料比" width="60" align="center" :formatter="crud.formatNum2" />
<el-table-column prop="ball_rate" label="球料比" width="60" align="center" :formatter="crud.formatNum2" />
<el-table-column prop="ball_speed" label="球磨转速(RPM)" width="120px" align="center" :formatter="crud.formatNum2" />
<el-table-column prop="ball_time" label="研磨时间(h)" width="90px" align="center" :formatter="crud.formatNum2" />
<el-table-column prop="accept_qty" label="标准重量(g)" width="90px" align="center" :formatter="crud.formatNum2" />
<el-table-column prop="material_code" label="碳化钨编码" width="120" align="center" />
<el-table-column prop="material_name" label="碳化钨名称" width="120" align="center" />
<el-table-column prop="detail_count" label="明细数" align="center" min-width="60" />
<el-table-column prop="remark" label="备注" align="center" min-width="135" />
<el-table-column prop="create_name" label="创建人" align="center" min-width="80" />

View File

@@ -1,6 +1,6 @@
<template>
<el-dialog
title="开始维修"
title="开始保养"
append-to-body
:visible.sync="dialogVisible"
:before-close="handleClose"

View File

@@ -1,6 +1,6 @@
<template>
<el-dialog
title="开始维修"
title="开始保养"
append-to-body
:visible.sync="dialogVisible"
:before-close="handleClose"