更新
This commit is contained in:
@@ -142,4 +142,12 @@ public class WorkorderController {
|
|||||||
return new ResponseEntity<>(workordeService.getDtl(param),HttpStatus.OK);
|
return new ResponseEntity<>(workordeService.getDtl(param),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getMaterial")
|
||||||
|
@Log("获取工单物料")
|
||||||
|
@ApiOperation("获取工单物料")
|
||||||
|
//@SaCheckPermission("produceshiftorder:list")
|
||||||
|
public ResponseEntity<Object> getMaterial(){
|
||||||
|
return new ResponseEntity<>(workordeService.getMaterial(),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,4 +121,6 @@ public interface WorkordeService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
JSONArray getDtl(JSONObject param);
|
JSONArray getDtl(JSONObject param);
|
||||||
|
|
||||||
|
JSONArray getMaterial();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ public class WorkorderServiceImpl implements WorkordeService {
|
|||||||
}
|
}
|
||||||
work_order.put("vehicle_type", vehicle_type);
|
work_order.put("vehicle_type", vehicle_type);
|
||||||
work_order.put("device_id", dto.getDevice_id());
|
work_order.put("device_id", dto.getDevice_id());
|
||||||
work_order.put("device_code", device_code);
|
|
||||||
work_order.put("order_status", WorkOrderEnum.ORDER_STATUS_UNPRODUCED.value());
|
work_order.put("order_status", WorkOrderEnum.ORDER_STATUS_UNPRODUCED.value());
|
||||||
work_order.put("is_urgent", dto.getIs_urgent());
|
work_order.put("is_urgent", dto.getIs_urgent());
|
||||||
work_order.put("is_pri", dto.getIs_pri());
|
work_order.put("is_pri", dto.getIs_pri());
|
||||||
@@ -460,4 +459,8 @@ public class WorkorderServiceImpl implements WorkordeService {
|
|||||||
return resultJSONArray;
|
return resultJSONArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONArray getMaterial() {
|
||||||
|
return WQLObject.getWQLObject("md_me_materialbase").query().getResultJSONArray(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ public class YZCallEmptyTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void cancelTask(JSONObject task, OperationType operation_type) {
|
public void cancelTask(JSONObject task, OperationType operation_type) {
|
||||||
|
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
|
||||||
task.put("task_status", TaskStatus.CANCELLED.value());
|
task.put("task_status", TaskStatus.CANCELLED.value());
|
||||||
if (operation_type == OperationType.AUTO) {
|
if (operation_type == OperationType.AUTO) {
|
||||||
TaskUtils.addACSUpdateColum(task);
|
TaskUtils.addACSUpdateColum(task);
|
||||||
@@ -167,9 +168,11 @@ public class YZCallEmptyTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void finishTask(JSONObject task, OperationType operation_type) {
|
public void finishTask(JSONObject task, OperationType operation_type) {
|
||||||
|
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
|
||||||
task.put("task_status", TaskStatus.FINISHED.value());
|
task.put("task_status", TaskStatus.FINISHED.value());
|
||||||
if (operation_type == OperationType.AUTO) {
|
if (operation_type == OperationType.AUTO) {
|
||||||
TaskUtils.addACSUpdateColum(task);
|
TaskUtils.addACSUpdateColum(task);
|
||||||
@@ -204,4 +207,5 @@ public class YZCallEmptyTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ public class SZCallMaterialTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void cancelTask(JSONObject task, OperationType operation_type) {
|
public void cancelTask(JSONObject task, OperationType operation_type) {
|
||||||
|
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
|
||||||
task.put("task_status", TaskStatus.CANCELLED.value());
|
task.put("task_status", TaskStatus.CANCELLED.value());
|
||||||
if (operation_type == OperationType.AUTO) {
|
if (operation_type == OperationType.AUTO) {
|
||||||
TaskUtils.addACSUpdateColum(task);
|
TaskUtils.addACSUpdateColum(task);
|
||||||
@@ -172,9 +173,11 @@ public class SZCallMaterialTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void finishTask(JSONObject task, OperationType operation_type) {
|
public void finishTask(JSONObject task, OperationType operation_type) {
|
||||||
|
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
|
||||||
task.put("task_status", TaskStatus.FINISHED.value());
|
task.put("task_status", TaskStatus.FINISHED.value());
|
||||||
if (operation_type == OperationType.AUTO) {
|
if (operation_type == OperationType.AUTO) {
|
||||||
TaskUtils.addACSUpdateColum(task);
|
TaskUtils.addACSUpdateColum(task);
|
||||||
@@ -206,4 +209,5 @@ public class SZCallMaterialTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ public class SZSendMaterialTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void cancelTask(JSONObject task, OperationType operation_type) {
|
public void cancelTask(JSONObject task, OperationType operation_type) {
|
||||||
|
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
|
||||||
task.put("task_status", TaskStatus.CANCELLED.value());
|
task.put("task_status", TaskStatus.CANCELLED.value());
|
||||||
if (operation_type == OperationType.AUTO) {
|
if (operation_type == OperationType.AUTO) {
|
||||||
TaskUtils.addACSUpdateColum(task);
|
TaskUtils.addACSUpdateColum(task);
|
||||||
@@ -161,9 +162,11 @@ public class SZSendMaterialTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void finishTask(JSONObject task, OperationType operation_type) {
|
public void finishTask(JSONObject task, OperationType operation_type) {
|
||||||
|
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
|
||||||
task.put("task_status", TaskStatus.FINISHED.value());
|
task.put("task_status", TaskStatus.FINISHED.value());
|
||||||
if (operation_type == OperationType.AUTO) {
|
if (operation_type == OperationType.AUTO) {
|
||||||
TaskUtils.addACSUpdateColum(task);
|
TaskUtils.addACSUpdateColum(task);
|
||||||
@@ -196,4 +199,5 @@ public class SZSendMaterialTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ public class YZSendMaterialTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void cancelTask(JSONObject task, OperationType operation_type) {
|
public void cancelTask(JSONObject task, OperationType operation_type) {
|
||||||
|
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
|
||||||
task.put("task_status", TaskStatus.CANCELLED.value());
|
task.put("task_status", TaskStatus.CANCELLED.value());
|
||||||
if (operation_type == OperationType.AUTO) {
|
if (operation_type == OperationType.AUTO) {
|
||||||
TaskUtils.addACSUpdateColum(task);
|
TaskUtils.addACSUpdateColum(task);
|
||||||
@@ -153,9 +154,11 @@ public class YZSendMaterialTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void finishTask(JSONObject task, OperationType operation_type) {
|
public void finishTask(JSONObject task, OperationType operation_type) {
|
||||||
|
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
|
||||||
task.put("task_status", TaskStatus.FINISHED.value());
|
task.put("task_status", TaskStatus.FINISHED.value());
|
||||||
if (operation_type == OperationType.AUTO) {
|
if (operation_type == OperationType.AUTO) {
|
||||||
TaskUtils.addACSUpdateColum(task);
|
TaskUtils.addACSUpdateColum(task);
|
||||||
@@ -191,4 +194,5 @@ public class YZSendMaterialTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
point_table.update(point2, "point_code = '" + task.getString("point_code2") + "'");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -96,4 +96,11 @@ export function getDtl(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, submits, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl }
|
export function getMaterial() {
|
||||||
|
return request({
|
||||||
|
url: 'api/workorder/getMaterial',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, submits, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl, getMaterial }
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="物料" prop="material_code">
|
<el-form-item label="物料编码" prop="material_code">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.material_code"
|
v-model="form.material_code"
|
||||||
style="width: 300px"
|
style="width: 300px"
|
||||||
@@ -130,13 +130,13 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="生产设备" prop="device_code">
|
<el-form-item label="生产设备" prop="device_name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.device_code"
|
v-model="form.device_name"
|
||||||
style="width: 300px"
|
style="width: 300px"
|
||||||
clearable
|
clearable
|
||||||
@focus="deviceShow=true"
|
@focus="deviceShow=true"
|
||||||
@clear="form.device_code=''; form.device_id=''"
|
@clear="form.device_code=''; form.device_id=''; form.device_name=''"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -198,10 +198,14 @@
|
|||||||
{{ dict.label.pdm_workorder_status[scope.row.order_status] }}
|
{{ dict.label.pdm_workorder_status[scope.row.order_status] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="planproducestart_date" label="计划开始时间" min-width="150" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="planproduceend_date" label="计划结束时间" min-width="150" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="device_name" label="设备" width="100" show-overflow-tooltip />
|
<el-table-column prop="device_name" label="设备" width="100" show-overflow-tooltip />
|
||||||
<el-table-column prop="material_name" label="物料" width="100" show-overflow-tooltip />
|
<el-table-column prop="material_code" label="物料编码" width="260" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="vehicle_type" label="载具类型" min-width="120" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="create_name" label="创建人" />
|
||||||
<el-table-column prop="plan_qty" label="计划数量" />
|
<el-table-column prop="plan_qty" label="计划数量" />
|
||||||
<el-table-column prop="is_urgent" label="是否加急">
|
<el-table-column prop="is_urgent" label="是否加急">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -218,12 +222,6 @@
|
|||||||
<el-table-column prop="real_qty" label="实际数量" />
|
<el-table-column prop="real_qty" label="实际数量" />
|
||||||
<el-table-column prop="qualified_qty" label="合格数量" />
|
<el-table-column prop="qualified_qty" label="合格数量" />
|
||||||
<el-table-column prop="unqualified_qty" label="不合格数量" width="100" />
|
<el-table-column prop="unqualified_qty" label="不合格数量" width="100" />
|
||||||
<!-- <el-table-column prop="vehicle_type" label="载具类型" min-width="120" show-overflow-tooltip>-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- {{ dict.label.vehicle_type[scope.row.vehicle_type] }}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<el-table-column prop="create_name" label="创建人" />
|
|
||||||
<el-table-column prop="create_time" label="创建时间" width="150" />
|
<el-table-column prop="create_time" label="创建时间" width="150" />
|
||||||
<el-table-column prop="update_optname" label="修改人" />
|
<el-table-column prop="update_optname" label="修改人" />
|
||||||
<el-table-column prop="update_time" label="修改时间" width="150" />
|
<el-table-column prop="update_time" label="修改时间" width="150" />
|
||||||
@@ -268,7 +266,7 @@ const defaultForm = {
|
|||||||
material_id: null,
|
material_id: null,
|
||||||
material_code: null,
|
material_code: null,
|
||||||
material_weight: null,
|
material_weight: null,
|
||||||
vehicle_type: null,
|
vehicle_type: '3',
|
||||||
planproducestart_date: null,
|
planproducestart_date: null,
|
||||||
planproduceend_date: null,
|
planproduceend_date: null,
|
||||||
realproducestart_date: null,
|
realproducestart_date: null,
|
||||||
@@ -288,6 +286,7 @@ const defaultForm = {
|
|||||||
material_name: null,
|
material_name: null,
|
||||||
device_id: null,
|
device_id: null,
|
||||||
device_code: null,
|
device_code: null,
|
||||||
|
device_name: null,
|
||||||
is_canupdate_update: '1',
|
is_canupdate_update: '1',
|
||||||
material_spec: null,
|
material_spec: null,
|
||||||
sale_id: null,
|
sale_id: null,
|
||||||
@@ -332,44 +331,17 @@ export default {
|
|||||||
order_status: ['-1'],
|
order_status: ['-1'],
|
||||||
permission: {},
|
permission: {},
|
||||||
rules: {
|
rules: {
|
||||||
produceorder_code: [
|
|
||||||
{ required: true, message: '生产班次工单编号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
producedeviceorder_code: [
|
|
||||||
{ required: true, message: '机台工单号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
produce_date: [
|
|
||||||
{ required: true, message: '生产日期不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
plan_qty: [
|
plan_qty: [
|
||||||
{ required: true, message: '计划数量不能为空', trigger: 'blur' }
|
{ required: true, message: '计划数量不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
material_code: [
|
material_code: [
|
||||||
{ required: true, message: '物料编码不能为空', trigger: 'change' }
|
{ required: true, message: '物料编码不能为空', trigger: 'change' }
|
||||||
],
|
],
|
||||||
planproducestart_date: [
|
|
||||||
{ required: true, message: '计划生产开始时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
planproduceend_date: [
|
|
||||||
{ required: true, message: '计划生产结束时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
order_status: [
|
|
||||||
{ required: true, message: '工单状态不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
is_needmove: [
|
|
||||||
{ required: true, message: '是否搬运不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
order_type_scode: [
|
|
||||||
{ required: true, message: '工单类型不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
is_canupdate_update: [
|
|
||||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
vehicle_type: [
|
vehicle_type: [
|
||||||
{ required: true, message: '木托盘类型不能为空', trigger: 'blur' }
|
{ required: true, message: '木托盘类型不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
device_code: [
|
device_name: [
|
||||||
{ required: true, message: '生产设备不能为空', trigger: 'blur' }
|
{ required: true, message: '生产设备不能为空', trigger: 'change' }
|
||||||
],
|
],
|
||||||
is_urgent: [
|
is_urgent: [
|
||||||
{ required: true, message: '是否加急不能为空', trigger: 'blur' }
|
{ required: true, message: '是否加急不能为空', trigger: 'blur' }
|
||||||
@@ -426,6 +398,7 @@ export default {
|
|||||||
tableChanged(row) {
|
tableChanged(row) {
|
||||||
this.form.device_code = row.device_code
|
this.form.device_code = row.device_code
|
||||||
this.form.device_id = row.device_id
|
this.form.device_id = row.device_id
|
||||||
|
this.form.device_name = row.device_name
|
||||||
},
|
},
|
||||||
// 下发
|
// 下发
|
||||||
submits(row) {
|
submits(row) {
|
||||||
|
|||||||
@@ -15,12 +15,12 @@
|
|||||||
label-width="80px"
|
label-width="80px"
|
||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form-item label="编码名称">
|
<el-form-item label="物料编码">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.name"
|
v-model="query.name"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
placeholder="编码名称"
|
placeholder="物料编码"
|
||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -46,8 +46,7 @@
|
|||||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="material_code" label="物料编码" width="189" show-overflow-tooltip />
|
<el-table-column prop="material_code" label="物料编码" width="260" show-overflow-tooltip />
|
||||||
<el-table-column prop="material_name" label="物料名称" width="190" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="standing_time" label="静置时间" width="75" />
|
<el-table-column prop="standing_time" label="静置时间" width="75" />
|
||||||
<el-table-column prop="threshold_time" label="阈值时间" width="75" />
|
<el-table-column prop="threshold_time" label="阈值时间" width="75" />
|
||||||
<el-table-column prop="product_code" label="产品编号" width="75" />
|
<el-table-column prop="product_code" label="产品编号" width="75" />
|
||||||
|
|||||||
Reference in New Issue
Block a user