This commit is contained in:
zds
2022-09-20 16:04:32 +08:00
parent 7043d95d28
commit d9241f2b38
5 changed files with 64 additions and 41 deletions

View File

@@ -293,11 +293,12 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
String factorycalendar_id = calendar.getJSONObject(0).getString("factorycalendar_id");
for (int i = 0; i < ja.size(); i++) {
JSONObject jo = ja.getJSONObject(i);
JSONObject jsonMst = PDM_BI_WorkOrder.query("workorder_id ='" + jo.getString("workorder_id") + "' and is_delete = '0'").uniqueResult(0);
if (jsonMst == null) {
throw new BadRequestException(jo.getString("workorder_code") + "当前工令记录状态异常,操作失败!");
}
String jo_device_id = jsonMst.getString("device_id");
JSONObject Formula = PDM_BI_Formula.query("workorder_id ='" + jo.getString("workorder_id") + "' and is_delete = '0' and is_audit='0' ").uniqueResult(0);
if (Formula != null) {
throw new BadRequestException(jo.getString("workorder_code") + "工令对应配方未审核,操作失败!");
@@ -394,7 +395,9 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
}
}
}
}else if("GX001".equals(workprocedure_code)){//配粉工序
}else
//配粉工序
if("GX001".equals(workprocedure_code)){
String planstart_date = jsonMst.getString("planstart_time").substring(0,10);
String nowTime = planstart_date+" 24:00:00";
if(devices.size()>=0){
@@ -422,6 +425,12 @@ public class WorkOrderServiceImpl implements WorkOrdereService {
}else{
throw new BadRequestException("未查询到满足条件的排产模板!");
}
//喷雾工序使用工令指定的设备生产工序任务
if("GX003".equals(workprocedure_code)){
if (StrUtil.isNotEmpty(jo_device_id)) {
jsonMst.put("device_id", jo_device_id);
}
}
String planstart_date = jsonMst.getString("planstart_time").substring(0,10);
String planstart_time = jsonMst.getString("planstart_time");
//设置开始时间

View File

@@ -155,26 +155,25 @@
/>
</template>
</el-table-column>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column :selectable="checkboxT" type="selection" width="55" />
<el-table-column prop="plan_code" label="日计划编码" width="120" />
<el-table-column :selectable="checkboxT" type="selection" width="45" />
<el-table-column prop="plan_code" label="日计划编码" width="110" />
<el-table-column :formatter="seriesFormat" min-width="80" prop="product_series_id" label="系列产线" />
<el-table-column prop="device_name" label="关键设备" width="100" />
<el-table-column prop="device_name" label="关键设备" width="80" />
<el-table-column prop="planstart_date" label="计划开始日期" width="100" />
<el-table-column prop="plan_org_name" label="申报单位" width="100" />
<el-table-column prop="workorder_type" label="计划类型" :formatter="workorder_typeFormat" min-width="120" />
<el-table-column prop="material_code" label="物料编码" min-width="120"/>
<el-table-column prop="old_mark" label="牌号" />
<el-table-column prop="workorder_type" label="计划类型" :formatter="workorder_typeFormat" min-width="80" />
<el-table-column prop="material_code" label="物料编码" min-width="130"/>
<el-table-column prop="old_mark" label="牌号" min-width="100" />
<el-table-column :formatter="seriesFormat2" min-width="80" prop="mater_product_series" label="产品系列" />
<el-table-column prop="product_weight" label="生产重量(kg)" :formatter="crud.formatNum3" min-width="120" />
<el-table-column prop="product_num" label="批数" width="80" />
<el-table-column prop="product_weight" label="生产重量(kg)" :formatter="crud.formatNum0" min-width="95" />
<el-table-column prop="product_num" label="批数" width="45" />
<el-table-column prop="planend_date" label="计划结束日期" width="100" />
<el-table-column prop="plan_finish_date" label="交货日期" width="100" />
<el-table-column prop="day_num" label="提前天数" width="90" :formatter="crud.formatNum0" />
<el-table-column :formatter="stateFormat" min-width="80" prop="status" label="状态" />
<el-table-column prop="task_code" label="生产任务号" width="120" />
<el-table-column prop="create_time" label="创建时间" width="140px" />
<el-table-column prop="create_name" label="创建人" width="100" />
<el-table-column prop="plan_finish_date" label="交货日期" width="90" />
<el-table-column prop="day_num" label="提前天数" width="70" :formatter="crud.formatNum0" />
<el-table-column :formatter="stateFormat" min-width="45" prop="status" label="状态" />
<el-table-column prop="task_code" label="生产任务号" width="110" />
<el-table-column prop="create_time" label="创建时间" width="135" />
<el-table-column prop="create_name" label="创建人" width="70" />
<el-table-column prop="remark" label="备注" />
</el-table>
<!--分页组件-->

View File

@@ -90,11 +90,21 @@
<el-form-item label="计划开始时间" prop="planstart_time">
<el-date-picker v-model="form.planstart_time" default-time="08:00:00" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="选择开始时间" style="width: 210px" :disabled="crud.status.view > 0" />
</el-form-item>
<el-form-item label="关键设备" prop="device_name">
<el-form-item label="关键设备" prop="device_id">
<label slot="label">关键设备:</label>
<el-input v-model="form.device_name" style="width: 210px" disabled class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="queryDtl" />
</el-input>
<el-select
v-model="form.device_id"
size="mini"
placeholder="关键设备"
class="filter-item"
style="width: 210px"
>
<el-option
v-for="item in Devices"
:key="item.id"
:label="item.name"
:value="item.id"
/></el-select>
</el-form-item>
<el-form-item label="批数" prop="pcsn_num">
<label slot="label">批数:</label>
@@ -127,6 +137,7 @@ import DeviceDialog from '@/views/wms/pub/DeviceDialog'
import MaterDialog from '@/views/wms/pub/MaterDialog'
import workorder from '@/api/wms/pdm/workorder'
import crudseriesProcessRoute from '@/api/wms/pdm/seriesProcessRoute'
import producetask from '@/api/wms/pdm/producetask'
const defaultForm = {
workorder_code: '',
@@ -164,6 +175,7 @@ export default {
materType: '05',
XLList: [],
Depts: [],
Devices: [],
materShow: false,
rules: {
pcsn: [
@@ -204,6 +216,9 @@ export default {
workorder.getDepts().then(res => {
this.Depts = res
})
producetask.getDevices().then(res => {
this.Devices = res
})
},
methods: {
close() {

View File

@@ -235,23 +235,23 @@
/>
</template>
</el-table-column>
<el-table-column :selectable="checkboxT" type="selection" width="55" />
<el-table-column :selectable="checkboxT" type="selection" width="45" />
<el-table-column prop="workorder_date" min-width="85" label="工令日期" :formatter="workorder_dateFormat"/>
<el-table-column prop="workorder_code" width="130" label="工令号">
<template slot-scope="scope">
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.workorder_code }}</el-link>
</template>
</el-table-column>
<el-table-column prop="org_id" :formatter="orgFormat" min-width="110" label="所属组织" />
<el-table-column prop="workorder_type" :formatter="bill_typeFormat" min-width="80" label="工令类型" />
<el-table-column :formatter="stateFormat" min-width="80" prop="status" label="工令状态" />
<el-table-column prop="device_name" min-width="100" label="设备"/>
<el-table-column prop="org_id" :formatter="orgFormat" min-width="105" label="所属组织" />
<el-table-column prop="workorder_type" :formatter="bill_typeFormat" min-width="70" label="工令类型" />
<el-table-column :formatter="stateFormat" min-width="70" prop="status" label="工令状态" />
<el-table-column prop="device_name" min-width="80" label="设备"/>
<el-table-column prop="material_code" min-width="130" label="物料编码"/>
<el-table-column prop="old_mark" min-width="80" label="牌号"/>
<el-table-column prop="old_mark" min-width="110" label="牌号"/>
<el-table-column :formatter="seriesFormat" min-width="80" prop="product_series_id" label="系列" />
<el-table-column prop="pcsn" min-width="80" label="批次"/>
<el-table-column prop="workorder_qty" min-width="80" label="重量" :formatter="crud.formatNum3"/>
<el-table-column prop="bill_qty" min-width="80" label="开单总重量" :formatter="crud.formatNum3" />
<el-table-column prop="workorder_qty" min-width="70" label="重量" :formatter="crud.formatNum0"/>
<el-table-column prop="bill_qty" min-width="90" label="开单总重量" :formatter="crud.formatNum3" />
<el-table-column prop="productin_qty" min-width="100" label="实际生产重量" :formatter="crud.formatNum3"/>
<el-table-column prop="qty_unit_name" min-width="80" label="单位"/>
<el-table-column prop="planstart_time" min-width="140" label="计划开始时间"/>

View File

@@ -139,24 +139,24 @@
:highlight-current-row="true"
@selection-change="mySelectionChange"
>
<el-table-column :selectable="checkboxT" type="selection" width="55" />
<el-table-column prop="workorder_date" min-width="90" label="工令日期" :formatter="workorder_dateFormat"/>
<el-table-column :selectable="checkboxT" type="selection" width="45" />
<el-table-column prop="workorder_date" min-width="85" label="工令日期" :formatter="workorder_dateFormat"/>
<el-table-column prop="workorder_code" width="130" label="工令号">
<template slot-scope="scope">
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.workorder_code }}</el-link>
</template>
</el-table-column>
<el-table-column prop="workorder_type" :formatter="bill_typeFormat" min-width="80" label="工令类型" />
<el-table-column :formatter="stateFormat" min-width="100" prop="status" label="工令状态" />
<el-table-column prop="workorder_type" :formatter="bill_typeFormat" min-width="70" label="工令类型" />
<el-table-column :formatter="stateFormat" min-width="70" prop="status" label="工令状态" />
<el-table-column prop="material_code" min-width="130" label="物料编码"/>
<el-table-column :formatter="seriesFormat" min-width="130" prop="product_series_id" label="系列" />
<el-table-column prop="pcsn" min-width="130" label="批次"/>
<el-table-column prop="workorder_qty" min-width="100" label="重量" :formatter="crud.formatNum3"/>
<el-table-column prop="bill_qty" min-width="100" label="开单总重量" :formatter="crud.formatNum3" />
<el-table-column :formatter="create_modeFormat" min-width="170" prop="create_mode" label="生成方式" />
<el-table-column prop="qty_unit_name" min-width="100" label="单位"/>
<el-table-column prop="formula_time" min-width="150" label="开单时间"/>
<el-table-column prop="formula_name" min-width="150" label="开单人"/>
<el-table-column :formatter="seriesFormat" min-width="80" prop="product_series_id" label="系列" />
<el-table-column prop="pcsn" min-width="80" label="批次"/>
<el-table-column prop="workorder_qty" min-width="70" label="重量" :formatter="crud.formatNum0"/>
<el-table-column prop="bill_qty" min-width="90" label="开单总重量" :formatter="crud.formatNum3" />
<el-table-column :formatter="create_modeFormat" min-width="160" prop="create_mode" label="生成方式" />
<el-table-column prop="qty_unit_name" min-width="80" label="单位"/>
<el-table-column prop="formula_time" min-width="135" label="开单时间"/>
<el-table-column prop="formula_name" min-width="80" label="开单人"/>
</el-table>
<!--分页组件-->
<pagination />