rev:代码优化
This commit is contained in:
@@ -713,13 +713,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
|
|
||||||
} else if (type.equals("3")) {
|
} else if (type.equals("3")) {
|
||||||
//判断AGV是否启用
|
//判断AGV是否启用
|
||||||
String agv_status = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("agv_status").getValue();
|
String device_code = whereJson.getString("device_code");
|
||||||
|
String product_area = device_code.substring(0,2);
|
||||||
|
String agv_status = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode(product_area+"_agv_status").getValue();
|
||||||
|
|
||||||
if ("0".equals(agv_status)) {
|
if ("0".equals(agv_status)) {
|
||||||
log.info("当前AGV未启用,不启用自动出烘箱功能!");
|
log.info("当前AGV未启用,不启用自动出烘箱功能!");
|
||||||
} else {
|
} else {
|
||||||
//烘箱出箱任务
|
//烘箱出箱任务
|
||||||
String device_code = whereJson.getString("device_code");
|
|
||||||
JSONObject bake_jo = new JSONObject();
|
JSONObject bake_jo = new JSONObject();
|
||||||
bake_jo.put("point_code", device_code);
|
bake_jo.put("point_code", device_code);
|
||||||
bake_jo.put("option", "2");
|
bake_jo.put("option", "2");
|
||||||
|
|||||||
@@ -333,7 +333,8 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
log.info("母卷:" + ContainerName + "被决策入半成品库,请求入半成品库标识改为1");
|
log.info("母卷:" + ContainerName + "被决策入半成品库,请求入半成品库标识改为1");
|
||||||
|
|
||||||
//判断AGV是否启用
|
//判断AGV是否启用
|
||||||
String agv_status = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("agv_status").getValue();
|
String product_area = ContainerName.substring(0,2);
|
||||||
|
String agv_status = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode(product_area+"_agv_status").getValue();
|
||||||
|
|
||||||
if (agv_status.equals("1")) {
|
if (agv_status.equals("1")) {
|
||||||
log.info("当前AGV启用参数为是");
|
log.info("当前AGV启用参数为是");
|
||||||
|
|||||||
@@ -143,6 +143,10 @@ public class OutServiceImpl implements OutService {
|
|||||||
.addParam("flag", "303").process().uniqueResult(0);
|
.addParam("flag", "303").process().uniqueResult(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(empty_vehicle)){
|
||||||
|
throw new BadRequestException("未查询到可用的空载具!");
|
||||||
|
}
|
||||||
|
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("point_code1", point_code);
|
jo.put("point_code1", point_code);
|
||||||
jo.put("point_code2", empty_vehicle.getString("point_code"));
|
jo.put("point_code2", empty_vehicle.getString("point_code"));
|
||||||
|
|||||||
@@ -155,9 +155,9 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
JSONObject jsonSb = sbTab.query("ext_code = '" + jsonRaw.getString("resource_name") + "'").uniqueResult(0);
|
JSONObject jsonSb = sbTab.query("ext_code = '" + jsonRaw.getString("resource_name") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonSb)) throw new BadRequestException("点位:"+jsonRaw.getString("resource_name")+"生箔设备不存在");
|
if (ObjectUtil.isEmpty(jsonSb)) throw new BadRequestException("点位:"+jsonRaw.getString("resource_name")+"生箔设备不存在");
|
||||||
|
|
||||||
if (StrUtil.equals("0", jsonSb.getString("is_used"))) {
|
/*if (StrUtil.equals("0", jsonSb.getString("is_used"))) {
|
||||||
throw new BadRequestException("当前生箔机:"+jsonSb.getString("ext_code")+"未启用!");
|
throw new BadRequestException("当前生箔机:"+jsonSb.getString("ext_code")+"未启用!");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
String start_pint_code = "";
|
String start_pint_code = "";
|
||||||
String point_code4 = "";
|
String point_code4 = "";
|
||||||
@@ -213,9 +213,9 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
throw new BadRequestException("未查到相关的生箔机点位!");
|
throw new BadRequestException("未查到相关的生箔机点位!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.equals("0", raw_jo.getString("is_used"))) {
|
/*if (StrUtil.equals("0", raw_jo.getString("is_used"))) {
|
||||||
throw new BadRequestException("当前生箔机:"+raw_jo.getString("ext_code")+"未启用!");
|
throw new BadRequestException("当前生箔机:"+raw_jo.getString("ext_code")+"未启用!");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// 2.根据就近原则查对应空卷抽
|
// 2.根据就近原则查对应空卷抽
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
@@ -265,7 +265,8 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
JSONObject task_jo = WQLObject.getWQLObject("SCH_BASE_Task").query("material_code = '" + container_name + "' and task_status <> '07' AND is_delete = '0'").uniqueResult(0);
|
JSONObject task_jo = WQLObject.getWQLObject("SCH_BASE_Task").query("material_code = '" + container_name + "' and task_status <> '07' AND is_delete = '0'").uniqueResult(0);
|
||||||
|
|
||||||
// 查询生箔点位库存表
|
// 查询生箔点位库存表
|
||||||
JSONObject jsonSb = sbTab.query("ext_code = '" + jsonRaw.getString("resource_name") + "'and is_used = '1'").uniqueResult(0);
|
// JSONObject jsonSb = sbTab.query("ext_code = '" + jsonRaw.getString("resource_name") + "'and is_used = '1'").uniqueResult(0);
|
||||||
|
JSONObject jsonSb = sbTab.query("ext_code = '" + jsonRaw.getString("resource_name") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonSb)) throw new BadRequestException("点位不存在");
|
if (ObjectUtil.isEmpty(jsonSb)) throw new BadRequestException("点位不存在");
|
||||||
|
|
||||||
//下发ACS,执行取满放空的AGV动作
|
//下发ACS,执行取满放空的AGV动作
|
||||||
@@ -307,7 +308,8 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
JSONObject task_jo = WQLObject.getWQLObject("SCH_BASE_Task").query("material_code = '" + container_name + "' and task_status <> '07' AND is_delete = '0'").uniqueResult(0);
|
JSONObject task_jo = WQLObject.getWQLObject("SCH_BASE_Task").query("material_code = '" + container_name + "' and task_status <> '07' AND is_delete = '0'").uniqueResult(0);
|
||||||
|
|
||||||
// 查询生箔点位库存表
|
// 查询生箔点位库存表
|
||||||
JSONObject jsonSb = WQLObject.getWQLObject("st_ivt_sbpointivt").query("ext_code = '" + jsonRaw.getString("resource_name") + "'and is_used = '1'").uniqueResult(0);
|
// JSONObject jsonSb = WQLObject.getWQLObject("st_ivt_sbpointivt").query("ext_code = '" + jsonRaw.getString("resource_name") + "'and is_used = '1'").uniqueResult(0);
|
||||||
|
JSONObject jsonSb = WQLObject.getWQLObject("st_ivt_sbpointivt").query("ext_code = '" + jsonRaw.getString("resource_name") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonSb)) throw new BadRequestException("点位不存在");
|
if (ObjectUtil.isEmpty(jsonSb)) throw new BadRequestException("点位不存在");
|
||||||
|
|
||||||
//下发ACS,执行取满放空的AGV动作
|
//下发ACS,执行取满放空的AGV动作
|
||||||
|
|||||||
@@ -99,8 +99,9 @@
|
|||||||
is_child_ps_ok = 0
|
is_child_ps_ok = 0
|
||||||
AND
|
AND
|
||||||
plan.is_delete = '0'
|
plan.is_delete = '0'
|
||||||
AND
|
OPTION 输入.in_area_id <> ""
|
||||||
ivt.product_area in 输入.in_area_id
|
ivt.product_area in 输入.in_area_id
|
||||||
|
ENDOPTION
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
ivt.product_area = 输入.product_area
|
ivt.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -273,8 +274,9 @@
|
|||||||
is_child_ps_ok = 1
|
is_child_ps_ok = 1
|
||||||
AND
|
AND
|
||||||
plan.is_delete = '0'
|
plan.is_delete = '0'
|
||||||
AND
|
OPTION 输入.in_area_id <> ""
|
||||||
ivt.product_area in 输入.in_area_id
|
ivt.product_area in 输入.in_area_id
|
||||||
|
ENDOPTION
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
ivt.product_area = 输入.product_area
|
ivt.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -304,8 +306,9 @@
|
|||||||
is_child_ps_ok = 0
|
is_child_ps_ok = 0
|
||||||
AND
|
AND
|
||||||
plan.is_delete = '0'
|
plan.is_delete = '0'
|
||||||
AND
|
OPTION 输入.in_area_id <> ""
|
||||||
ivt.product_area in 输入.in_area_id
|
ivt.product_area in 输入.in_area_id
|
||||||
|
ENDOPTION
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
ivt.product_area = 输入.product_area
|
ivt.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -392,8 +395,9 @@
|
|||||||
AND del.is_used = '1'
|
AND del.is_used = '1'
|
||||||
AND
|
AND
|
||||||
plan.is_delete = '0'
|
plan.is_delete = '0'
|
||||||
AND
|
OPTION 输入.in_area_id <> ""
|
||||||
del.product_area in 输入.in_area_id
|
del.product_area in 输入.in_area_id
|
||||||
|
ENDOPTION
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
del.product_area = 输入.product_area
|
del.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -487,8 +491,9 @@
|
|||||||
is_parent_ok = 0
|
is_parent_ok = 0
|
||||||
AND
|
AND
|
||||||
plan.is_delete = '0'
|
plan.is_delete = '0'
|
||||||
AND
|
OPTION 输入.in_area_id <> ""
|
||||||
ivt.product_area in 输入.in_area_id
|
ivt.product_area in 输入.in_area_id
|
||||||
|
ENDOPTION
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
ivt.product_area = 输入.product_area
|
ivt.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
@@ -1,158 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
title="物料选择"
|
|
||||||
append-to-body
|
|
||||||
:visible.sync="dialogVisible"
|
|
||||||
destroy-on-close
|
|
||||||
width="1000px"
|
|
||||||
@close="close"
|
|
||||||
@open="open"
|
|
||||||
>
|
|
||||||
<el-form
|
|
||||||
:inline="true"
|
|
||||||
class="demo-form-inline"
|
|
||||||
label-position="right"
|
|
||||||
label-width="80px"
|
|
||||||
label-suffix=":"
|
|
||||||
>
|
|
||||||
<el-form-item label="模糊搜索">
|
|
||||||
<el-input
|
|
||||||
v-model="query.search"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="编码、名称"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<rrOperation />
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<!--表格渲染-->
|
|
||||||
<el-table
|
|
||||||
ref="table"
|
|
||||||
v-loading="crud.loading"
|
|
||||||
:data="crud.data"
|
|
||||||
style="width: 100%;"
|
|
||||||
size="mini"
|
|
||||||
border
|
|
||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
|
||||||
@select="handleSelectionChange"
|
|
||||||
@select-all="onSelectAll"
|
|
||||||
@current-change="clickChange"
|
|
||||||
>
|
|
||||||
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
|
||||||
<el-table-column v-if="isSingle" label="选择" width="55">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column prop="material_code" label="物料编码" min-width="150" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="material_name" label="物料名称" min-width="100" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="material_spec" label="规格" min-width="100" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="net_weight" label="物料净重" min-width="100" show-overflow-tooltip />
|
|
||||||
</el-table>
|
|
||||||
<!--分页组件-->
|
|
||||||
<pagination />
|
|
||||||
<span slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
||||||
<el-button type="primary" @click="submit">确 定</el-button>
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import crudMaterialbase from '@/views/wms/mps/produce/outmaterial'
|
|
||||||
import CRUD, { header, presenter } from '@crud/crud'
|
|
||||||
import rrOperation from '@crud/RR.operation'
|
|
||||||
import pagination from '@crud/Pagination'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'OutMaterDtl',
|
|
||||||
components: { rrOperation, pagination },
|
|
||||||
cruds() {
|
|
||||||
return CRUD({ title: '物料', url: '/api/Materialbase', crudMethod: { ...crudMaterialbase }, optShow: {}})
|
|
||||||
},
|
|
||||||
mixins: [presenter(), header()],
|
|
||||||
dicts: ['product_series'],
|
|
||||||
props: {
|
|
||||||
dialogShow: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
isSingle: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
materOptCode: {
|
|
||||||
type: String,
|
|
||||||
default: '00'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogVisible: false,
|
|
||||||
classes: [],
|
|
||||||
tableRadio: null,
|
|
||||||
class_idStr: null,
|
|
||||||
checkrow: null,
|
|
||||||
rows: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
dialogShow: {
|
|
||||||
handler(newValue) {
|
|
||||||
this.dialogVisible = newValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
clickChange(item) {
|
|
||||||
this.tableRadio = item
|
|
||||||
},
|
|
||||||
seriesFormat(row) {
|
|
||||||
return this.dict.label.product_series[row.product_series]
|
|
||||||
},
|
|
||||||
open() {
|
|
||||||
},
|
|
||||||
handleSelectionChange(val, row) {
|
|
||||||
if (val.length > 1) {
|
|
||||||
this.$refs.table.clearSelection()
|
|
||||||
this.$refs.table.toggleRowSelection(val.pop())
|
|
||||||
} else {
|
|
||||||
this.checkrow = row
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onSelectAll() {
|
|
||||||
this.$refs.table.clearSelection()
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
this.crud.resetQuery(false)
|
|
||||||
this.$emit('update:dialogShow', false)
|
|
||||||
},
|
|
||||||
submit() {
|
|
||||||
// 处理单选
|
|
||||||
if (this.isSingle && this.tableRadio) {
|
|
||||||
this.$emit('update:dialogShow', false)
|
|
||||||
this.$emit('tableChanged2', this.tableRadio)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.rows = this.$refs.table.selection
|
|
||||||
if (this.rows.length <= 0) {
|
|
||||||
this.$message('请先勾选物料')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.crud.resetQuery(false)
|
|
||||||
this.$emit('update:dialogShow', false)
|
|
||||||
this.$emit('tableChanged2', this.rows)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
::v-deep .el-dialog__body {
|
|
||||||
padding-top: 0px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
@@ -1,383 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
title="工单详情"
|
|
||||||
append-to-body
|
|
||||||
fullscreen
|
|
||||||
:visible.sync="dialogVisible"
|
|
||||||
@open="open"
|
|
||||||
@close="close"
|
|
||||||
>
|
|
||||||
<el-card class="box-card" shadow="never">
|
|
||||||
<el-form ref="form" disabled :inline="true" :model="form" :rules="rules" size="mini" label-width="180px">
|
|
||||||
<el-form-item label="工单编码">
|
|
||||||
<el-input v-model="form.produceorder_code" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="工单类型">
|
|
||||||
<el-select v-model="form.order_type_scode" style="width: 200px" filterable placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.PDM_BI_ORDERTYPE"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属工序">
|
|
||||||
<el-select
|
|
||||||
v-model="form.workprocedure_id"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
class="filter-item"
|
|
||||||
style="width: 200px;"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in workprocedureList"
|
|
||||||
:key="item.workprocedure_id"
|
|
||||||
:label="item.workprocedure_name"
|
|
||||||
:value="item.workprocedure_id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="生产日期">
|
|
||||||
<el-date-picker v-model="form.produce_date" type="date" value-format="yyyy-MM-dd" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="false" label="物料标识">
|
|
||||||
<el-input v-model="form.material_id" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料编码">
|
|
||||||
<el-input
|
|
||||||
v-model="form.material_code"
|
|
||||||
style="width: 200px;"
|
|
||||||
clearable
|
|
||||||
@focus="materialShow=true"
|
|
||||||
@clear="form.material_id='',form.material_code='',form.material_name='',form.material_spec=''"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料名称">
|
|
||||||
<el-input
|
|
||||||
v-model="form.material_name"
|
|
||||||
style="width: 200px;"
|
|
||||||
disabled
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料规格">
|
|
||||||
<el-input
|
|
||||||
v-model="form.material_spec"
|
|
||||||
style="width: 200px;"
|
|
||||||
disabled
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料单重">
|
|
||||||
<el-input v-model="form.material_weight" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计划数量">
|
|
||||||
<el-input v-model="form.plan_qty" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计划开始时间">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="form.planproducestart_date"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
type="datetime"
|
|
||||||
style="width: 200px;"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计划结束时间">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="form.planproduceend_date"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
type="datetime"
|
|
||||||
style="width: 200px;"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="报工数量">
|
|
||||||
<el-input v-model="form.report_qty" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="实际开始时间">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="form.realproducestart_date"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
type="datetime"
|
|
||||||
style="width: 200px;"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="实际结束时间">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="form.realproduceend_date"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
type="datetime"
|
|
||||||
style="width: 200px;"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="班次类型">
|
|
||||||
<el-select
|
|
||||||
v-model="form.shift_type_scode"
|
|
||||||
style="width: 200px"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
placeholder="请选择"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.PDM_BI_SHIFTTYPE"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="产品系列">
|
|
||||||
<treeselect
|
|
||||||
v-model="form.product_series"
|
|
||||||
disabled
|
|
||||||
:options="classes3"
|
|
||||||
:auto-load-root-options="false"
|
|
||||||
:load-options="loadChildNodes"
|
|
||||||
style="width: 200px;"
|
|
||||||
placeholder=""
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="销售单标识">
|
|
||||||
<el-input v-model="form.sale_id" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="是否搬运">
|
|
||||||
<el-radio
|
|
||||||
v-for="item in dict.IS_OR_NOT"
|
|
||||||
:key="item.id"
|
|
||||||
v-model="form.is_needmove"
|
|
||||||
:label="item.value"
|
|
||||||
>{{ item.label }}
|
|
||||||
</el-radio>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="允许修改报工数量">
|
|
||||||
<el-radio
|
|
||||||
v-for="item in dict.IS_OR_NOT"
|
|
||||||
:key="item.id"
|
|
||||||
v-model="form.is_canupdate_update"
|
|
||||||
:label="item.value"
|
|
||||||
>{{ item.label }}
|
|
||||||
</el-radio>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-card>
|
|
||||||
<div class="crud-opts2" style="margin-top: 30px;margin-bottom: 15px">
|
|
||||||
<span class="role-span">工单生产记录详情</span>
|
|
||||||
<span class="crud-opts-right2">
|
|
||||||
<!--左侧插槽-->
|
|
||||||
<slot name="left" />
|
|
||||||
</span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!--表格渲染-->
|
|
||||||
<el-table
|
|
||||||
ref="table"
|
|
||||||
:data="tableData"
|
|
||||||
style="width: 100%;"
|
|
||||||
max-height="300"
|
|
||||||
border
|
|
||||||
:highlight-current-row="true"
|
|
||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
|
||||||
>
|
|
||||||
<el-table-column prop="device_code" label="设备编码" align="center" />
|
|
||||||
<el-table-column prop="device_name" label="设备名称" align="center" min-width="200" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="produce_qty" label="生产数量" align="center" />
|
|
||||||
<el-table-column prop="init_qty" label="期初数量" align="center" />
|
|
||||||
<el-table-column prop="finish_qty" label="期末数量" align="center" />
|
|
||||||
<el-table-column prop="finishproduct_qty" label="完成数量" align="center" />
|
|
||||||
<el-table-column prop="report_qty" label="报工数量" align="center" />
|
|
||||||
<el-table-column prop="operatetime_start" label="开始时间" align="center" min-width="130" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="operatetime_end" label="结束时间" align="center" min-width="130" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="nick_name" label="操作人" align="center" />
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<span slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
||||||
<el-button type="primary" @click="dialogVisible = false">确定</el-button>
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { crud } from '@crud/crud'
|
|
||||||
import crudWorkProcedure from '@/views/wms/pdm/base/workProcedure/workProcedure'
|
|
||||||
import crudProduceshiftorder from '@/views/wms/mps/produce/produceshiftorder'
|
|
||||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
|
||||||
import crudClassstandard from '@/views/wms/basedata/master/customer/customerbase'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'ViewDialog',
|
|
||||||
components: { Treeselect },
|
|
||||||
dicts: ['PDM_BI_SHIFTTYPE', 'MPS_BD_ORDERSTATUS', 'is_used', 'PDM_BI_ORDERTYPE', 'IS_OR_NOT'],
|
|
||||||
mixins: [crud()],
|
|
||||||
props: {
|
|
||||||
dialogShow: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
bussConfig: {
|
|
||||||
type: Object
|
|
||||||
},
|
|
||||||
openParam: {
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogVisible: false,
|
|
||||||
classes3: [],
|
|
||||||
form: {
|
|
||||||
sale_id: null,
|
|
||||||
produceorder_id: null,
|
|
||||||
produceorder_code: null,
|
|
||||||
producedeviceorder_code: null,
|
|
||||||
shift_type_scode: null,
|
|
||||||
workprocedure_id: null,
|
|
||||||
produce_date: null,
|
|
||||||
plan_qty: null,
|
|
||||||
real_qty: null,
|
|
||||||
report_qty: null,
|
|
||||||
material_id: null,
|
|
||||||
material_code: null,
|
|
||||||
material_weight: null,
|
|
||||||
planproducestart_date: null,
|
|
||||||
planproduceend_date: null,
|
|
||||||
realproducestart_date: null,
|
|
||||||
realproduceend_date: null,
|
|
||||||
order_status: null,
|
|
||||||
is_needmove: null,
|
|
||||||
order_type_scode: null,
|
|
||||||
create_id: null,
|
|
||||||
create_name: null,
|
|
||||||
create_time: null,
|
|
||||||
update_optid: null,
|
|
||||||
update_optname: null,
|
|
||||||
update_time: null,
|
|
||||||
sysdeptid: null,
|
|
||||||
syscompanyid: null,
|
|
||||||
is_delete: null,
|
|
||||||
material_name: null,
|
|
||||||
device_id: null,
|
|
||||||
is_canupdate_update: null,
|
|
||||||
material_spec: null
|
|
||||||
},
|
|
||||||
workprocedureList: [],
|
|
||||||
tableData: [],
|
|
||||||
rules: {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
dialogShow: {
|
|
||||||
handler(newValue) {
|
|
||||||
this.dialogVisible = newValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
open() {
|
|
||||||
this.getworkprocedure()
|
|
||||||
this.initClass3()
|
|
||||||
this.is_null()
|
|
||||||
crudProduceshiftorder.getDtl({ produceorder_id: this.form.produceorder_id }).then(res => {
|
|
||||||
this.tableData = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
is_null() {
|
|
||||||
// 物料系列为空,新增
|
|
||||||
if (!this.form.product_series) {
|
|
||||||
this.form.product_series = null // 必须为null,否则会出现unknown
|
|
||||||
} else { // 更新
|
|
||||||
this.getSubTypes('03', this.form.product_series)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getSubTypes(type, id) {
|
|
||||||
const that = this
|
|
||||||
crudClassstandard.getClassSuperior(id).then(res => {
|
|
||||||
const data = res.content
|
|
||||||
that.buildTree(data)
|
|
||||||
if (type === '03') {
|
|
||||||
that.classes3 = data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
queryClassId() {
|
|
||||||
const param = {
|
|
||||||
'class_idStr': this.class_idStr
|
|
||||||
}
|
|
||||||
crudClassstandard.queryClassById(param).then(res => {
|
|
||||||
this.classes = res.content.map(obj => {
|
|
||||||
if (obj.hasChildren) {
|
|
||||||
obj.children = null
|
|
||||||
}
|
|
||||||
return obj
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
buildTree(classes) {
|
|
||||||
classes.forEach(data => {
|
|
||||||
if (data.children) {
|
|
||||||
this.buildTree(data.children)
|
|
||||||
}
|
|
||||||
if (data.hasChildren && !data.children) {
|
|
||||||
data.children = null // 重点代码
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 获取子节点数据
|
|
||||||
loadChildNodes({ action, parentNode, callback }) {
|
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
|
||||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
|
||||||
parentNode.children = res.content.map(function(obj) {
|
|
||||||
if (obj.hasChildren) {
|
|
||||||
obj.children = null
|
|
||||||
}
|
|
||||||
return obj
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
callback()
|
|
||||||
}, 100)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
initClass3() {
|
|
||||||
const param = {
|
|
||||||
parent_class_code: '07'
|
|
||||||
}
|
|
||||||
crudClassstandard.getClassType(param).then(res => {
|
|
||||||
const data = res.content
|
|
||||||
this.buildTree(data)
|
|
||||||
this.classes3 = data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getworkprocedure() {
|
|
||||||
// 查询工序
|
|
||||||
crudWorkProcedure.downSelect({}).then(res => {
|
|
||||||
this.workprocedureList = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
this.$emit('AddChanged')
|
|
||||||
},
|
|
||||||
setForm(row) {
|
|
||||||
this.dialogVisible = true
|
|
||||||
this.form = row
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.crud-opts2 {
|
|
||||||
padding: 0 0;
|
|
||||||
display: -webkit-flex;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.crud-opts2 .crud-opts-right2 {
|
|
||||||
margin-left: auto;
|
|
||||||
padding: 4px 4px;
|
|
||||||
}
|
|
||||||
.input-with-select {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,314 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="border: 1px solid #938d8d;margin-left: 10px;margin-right: 10px;">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<div class="grid-content bg-purple"><h2 style="margin-left: 30px;padding-top: 10px;">车间加工看板</h2></div>
|
|
||||||
<div class="grid-content bg-purple">
|
|
||||||
  
|
|
||||||
<!-- <el-button type="primary" icon="el-icon-search" @click="queryTask(query.device_code)">搜索</el-button>-->
|
|
||||||
<el-button type="primary" icon="el-icon-thumb" @click="fresh">刷新</el-button>
|
|
||||||
<el-button type="warning" icon="el-icon-position" :disabled="is_openStart" @click="openStart">开工</el-button>
|
|
||||||
<el-button type="success" icon="el-icon-finished" :disabled="is_reportWork" @click="reportWork">报工</el-button>
|
|
||||||
<el-button type="danger" icon="el-icon-finished" :disabled="is_finish" @click="finish">强制完成</el-button>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<div class="grid-content bg-purple-light">
|
|
||||||
<h2 style="text-align:right;margin-right: 140px;">{{ getTime }}</h2>
|
|
||||||
</div>
|
|
||||||
<div class="grid-content bg-purple-light">
|
|
||||||
<p style="text-align:right;margin-right: 110px;"><b>{{ getDate }}</b></p>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<div>
|
|
||||||
<!--表格渲染-->
|
|
||||||
<el-table
|
|
||||||
ref="table"
|
|
||||||
:data="tableData"
|
|
||||||
size="small"
|
|
||||||
style="width: 100%;"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
@select="handleSelectionChange"
|
|
||||||
@select-all="onSelectAll"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="55" />
|
|
||||||
<el-table-column v-if="false" prop="produceorder_id" label="生产班次工单标识" />
|
|
||||||
<el-table-column prop="produceorder_code" label="工单编号" width="130px" />
|
|
||||||
<el-table-column prop="order_status" label="工单状态">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ dict.label.MPS_BD_ORDERSTATUS[scope.row.order_status] }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="shift_type_scode" label="班次类型">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ dict.label.PDM_BI_SHIFTTYPE[scope.row.shift_type_scode] }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column v-if="false" prop="workprocedure_id" label="工序标识" />
|
|
||||||
<el-table-column prop="produce_date" label="生产日期" width="100px" />
|
|
||||||
<el-table-column prop="plan_qty" label="计划数量" />
|
|
||||||
<el-table-column prop="report_qty" label="完工数量" />
|
|
||||||
<el-table-column v-if="false" prop="material_id" label="物料标识" />
|
|
||||||
<el-table-column prop="material_code" label="物料编码" width="100" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="material_name" label="物料名称" width="100" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="material_spec" label="物料规格" width="100" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="realproducestart_date" label="开始时间" width="150" />
|
|
||||||
</el-table>
|
|
||||||
<!--分页组件-->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<el-dialog
|
|
||||||
title="请绑定设备"
|
|
||||||
:visible.sync="devicedialogVisible"
|
|
||||||
width="35%"
|
|
||||||
:before-close="handleClose"
|
|
||||||
>
|
|
||||||
<el-form ref="deviceForm" :model="deviceForm" status-icon label-width="120px" class="demo-ruleForm">
|
|
||||||
<el-form-item label="选择设备" prop="device_id">
|
|
||||||
<el-select
|
|
||||||
v-model="deviceForm.device_id"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
class="filter-item"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in deviceList"
|
|
||||||
:key="item.device_id"
|
|
||||||
:label="item.device_name"
|
|
||||||
:value="item.device_id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="saveDevice">保存</el-button>
|
|
||||||
<el-button @click="devicedialogVisible = false">取消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
<el-dialog
|
|
||||||
title="报工数量"
|
|
||||||
:visible.sync="reportdialogVisibler"
|
|
||||||
width="35%"
|
|
||||||
:before-close="handleClose"
|
|
||||||
>
|
|
||||||
<el-form ref="reportForm" :model="reportForm" status-icon label-width="120px" class="demo-ruleForm">
|
|
||||||
<el-form-item label="生产数量" prop="produce_qty">
|
|
||||||
<el-input v-model="reportForm.produce_qty" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="期初数量" prop="init_qty">
|
|
||||||
<el-input v-model="reportForm.init_qty" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="期末数量" prop="report_qty">
|
|
||||||
<el-input v-model="reportForm.finish_qty" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="完成数量" prop="report_qty">
|
|
||||||
<el-input v-model="reportForm.finishproduct_qty" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="报工数量" prop="report_qty">
|
|
||||||
<el-input v-model="reportForm.report_qty" clearable oninput="value = value.replace(/[^\d]/g, '')" type="number" :disabled="is_disabled()" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="saveReport">保存</el-button>
|
|
||||||
<el-button @click="reportdialogVisibler = false">取消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import crud from '@/mixins/crud'
|
|
||||||
import crudProduceshiftorder from '@/views/wms/mps/produce/produceshiftorder'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'BigscreenTask',
|
|
||||||
mixins: [crud],
|
|
||||||
dicts: ['PDM_BI_SHIFTTYPE', 'MPS_BD_ORDERSTATUS', 'is_used', 'PDM_BI_ORDERTYPE'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
devicedialogVisible: false,
|
|
||||||
reportdialogVisibler: false,
|
|
||||||
deviceForm: { device_id: null },
|
|
||||||
reportForm: { report_qty: null, produce_qty: null, init_qty: null, finish_qty: null, finishproduct_qty: null },
|
|
||||||
currentDate: new Date(),
|
|
||||||
getTime: '',
|
|
||||||
getDate: '',
|
|
||||||
deviceList: [],
|
|
||||||
choice: '',
|
|
||||||
is_openStart: true,
|
|
||||||
is_reportWork: true,
|
|
||||||
is_finish: true,
|
|
||||||
is_report_qty: false,
|
|
||||||
ProduceStatusList: [],
|
|
||||||
materialList: [],
|
|
||||||
tableData: [],
|
|
||||||
rules: {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getTable()
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
// 定时器
|
|
||||||
const timer = setInterval(() => {
|
|
||||||
this.settime()// 你所加载数据的方法
|
|
||||||
}, 1000)
|
|
||||||
// 销毁定时器
|
|
||||||
this.$once('hook:beforeDestroy', () => {
|
|
||||||
clearInterval(timer)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
settime() {
|
|
||||||
const _this = this
|
|
||||||
const yy = new Date().getFullYear()
|
|
||||||
const mm = new Date().getMonth() + 1
|
|
||||||
const dd = new Date().getDate()
|
|
||||||
const hh = new Date().getHours()
|
|
||||||
const mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
|
|
||||||
const ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
|
|
||||||
_this.getDate = yy + '年' + mm + '月' + dd + '日 ' + '星期' + '日一二三四五六'.charAt(new Date().getDay())
|
|
||||||
_this.getTime = hh + ':' + mf + ':' + ss
|
|
||||||
},
|
|
||||||
is_disabled() {
|
|
||||||
if (this.choice !== null) {
|
|
||||||
if (this.choice.is_canupdate_update === '1') {
|
|
||||||
return false
|
|
||||||
} else {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isDisabled() {
|
|
||||||
this.is_openStart = true
|
|
||||||
this.is_finish = true
|
|
||||||
this.is_reportWork = true
|
|
||||||
},
|
|
||||||
handleCurrentChange(current) {
|
|
||||||
if (current === null) {
|
|
||||||
this.choice = null
|
|
||||||
this.is_openStart = true
|
|
||||||
this.is_reportWork = true
|
|
||||||
this.is_finish = true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleSelectionChange(val, row) {
|
|
||||||
if (val.length > 1) {
|
|
||||||
this.$refs.table.clearSelection()
|
|
||||||
this.$refs.table.toggleRowSelection(val.pop())
|
|
||||||
this.buttonChange(row)
|
|
||||||
} else if (val.length === 1) {
|
|
||||||
this.buttonChange(row)
|
|
||||||
} else {
|
|
||||||
this.handleCurrentChange(null)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onSelectAll() {
|
|
||||||
this.$refs.table.clearSelection()
|
|
||||||
this.handleCurrentChange(null)
|
|
||||||
},
|
|
||||||
buttonChange(current) {
|
|
||||||
if (current !== null) {
|
|
||||||
this.choice = current
|
|
||||||
if (current.order_status === '01' || current.order_status === '03') {
|
|
||||||
this.is_openStart = false
|
|
||||||
} else {
|
|
||||||
this.is_openStart = true
|
|
||||||
}
|
|
||||||
if (current.order_status === '02') {
|
|
||||||
this.is_reportWork = false
|
|
||||||
} else {
|
|
||||||
this.is_reportWork = true
|
|
||||||
}
|
|
||||||
this.is_finish = false
|
|
||||||
} else {
|
|
||||||
this.is_finish = true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
notify(title, type) {
|
|
||||||
this.$notify({
|
|
||||||
title: title,
|
|
||||||
type: type,
|
|
||||||
duration: 2500
|
|
||||||
})
|
|
||||||
},
|
|
||||||
fresh() {
|
|
||||||
this.handleCurrentChange(null)
|
|
||||||
this.getTable()
|
|
||||||
this.isDisabled()
|
|
||||||
this.notify('刷新成功', 'success')
|
|
||||||
},
|
|
||||||
handleClose() {
|
|
||||||
this.devicedialogVisible = false
|
|
||||||
this.reportdialogVisibler = false
|
|
||||||
},
|
|
||||||
getTable() {
|
|
||||||
crudProduceshiftorder.getTable({ device_id: this.query.device_id }).then(res => {
|
|
||||||
this.tableData = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
openStart() {
|
|
||||||
crudProduceshiftorder.getDevice({ workprocedure_id: this.choice.workprocedure_id }).then(res => {
|
|
||||||
this.deviceList = res
|
|
||||||
})
|
|
||||||
this.devicedialogVisible = true
|
|
||||||
this.deviceForm.device_id = this.choice.device_id
|
|
||||||
},
|
|
||||||
reportWork() {
|
|
||||||
this.reportdialogVisibler = true
|
|
||||||
this.getReportWork(this.choice.produceorder_id)
|
|
||||||
},
|
|
||||||
getReportWork(produceorder_id) {
|
|
||||||
crudProduceshiftorder.getReportWork({ produceorder_id: produceorder_id }).then(res => {
|
|
||||||
this.reportForm.init_qty = res.init_qty
|
|
||||||
this.reportForm.finish_qty = res.finish_qty
|
|
||||||
this.reportForm.produce_qty = res.produce_qty
|
|
||||||
this.reportForm.finishproduct_qty = res.finishproduct_qty
|
|
||||||
this.reportForm.report_qty = res.finishproduct_qty
|
|
||||||
})
|
|
||||||
},
|
|
||||||
saveReport() {
|
|
||||||
if (this.reportForm.report_qty === '' || this.reportForm.report_qty === null || this.reportForm.report_qty === undefined) {
|
|
||||||
this.notify('请输入报工数量', 'info')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
crudProduceshiftorder.saveReport({ report_qty: this.reportForm.report_qty, row: this.choice }).then(res => {
|
|
||||||
this.notify('操作成功', 'success')
|
|
||||||
this.getTable()
|
|
||||||
this.reportdialogVisibler = false
|
|
||||||
this.isDisabled()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
saveDevice() {
|
|
||||||
if (this.deviceForm.device_id === '' || this.deviceForm.device_id === null || this.deviceForm.device_id === undefined) {
|
|
||||||
this.notify('请选择要绑定的设备', 'info')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
crudProduceshiftorder.openStart({ device_id: this.deviceForm.device_id, row: this.choice }).then(res => {
|
|
||||||
this.notify('操作成功', 'success')
|
|
||||||
this.getTable()
|
|
||||||
this.devicedialogVisible = false
|
|
||||||
this.isDisabled()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
finish() {
|
|
||||||
crudProduceshiftorder.finish({ row: this.choice }).then(res => {
|
|
||||||
this.notify('操作成功', 'success')
|
|
||||||
this.getTable()
|
|
||||||
this.isDisabled()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -1,536 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!--工具栏-->
|
|
||||||
<div class="head-container">
|
|
||||||
<div v-if="crud.props.searchToggle">
|
|
||||||
<el-form
|
|
||||||
:inline="true"
|
|
||||||
class="demo-form-inline"
|
|
||||||
label-position="right"
|
|
||||||
label-width="90px"
|
|
||||||
label-suffix=":"
|
|
||||||
>
|
|
||||||
<!-- 搜索 -->
|
|
||||||
<el-form-item label="工单编号">
|
|
||||||
<el-input
|
|
||||||
v-model="query.produceorder_code"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
placeholder="请输入工单编号"
|
|
||||||
style="width: 200px;"
|
|
||||||
class="filter-item"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料搜索">
|
|
||||||
<el-input
|
|
||||||
v-model="query.material"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
placeholder="物料编码、名称或规格"
|
|
||||||
style="width: 200px;"
|
|
||||||
class="filter-item"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="生产日期">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="query.createTime"
|
|
||||||
type="daterange"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
:default-time="['00:00:00','23:59:59']"
|
|
||||||
@change="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="工单类型">
|
|
||||||
<el-select
|
|
||||||
v-model="query.order_type_scode"
|
|
||||||
style="width: 200px"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
placeholder="请选择"
|
|
||||||
@change="crud.toQuery"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.PDM_BI_ORDERTYPE"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label=" 工单状态">
|
|
||||||
<el-select
|
|
||||||
v-model="order_status"
|
|
||||||
style="width: 200px"
|
|
||||||
clearable
|
|
||||||
multiple
|
|
||||||
placeholder="请选择"
|
|
||||||
class="filter-item"
|
|
||||||
@change="handTaskStatus"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
label="未完成"
|
|
||||||
value="-1"
|
|
||||||
/>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.MPS_BD_ORDERSTATUS"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="班次类型">
|
|
||||||
<el-select
|
|
||||||
v-model="query.shift_type_scode"
|
|
||||||
style="width: 200px"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
placeholder="请选择"
|
|
||||||
@change="crud.toQuery"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.PDM_BI_SHIFTTYPE"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="销售单标识">
|
|
||||||
<el-input
|
|
||||||
v-model="query.sale_id"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
placeholder="请输入销售单标识"
|
|
||||||
style="width: 200px;"
|
|
||||||
class="filter-item"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<rrOperation :crud="crud" />
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
|
||||||
<crudOperation :permission="permission">
|
|
||||||
<el-button
|
|
||||||
slot="right"
|
|
||||||
class="filter-item"
|
|
||||||
type="success"
|
|
||||||
icon="el-icon-position"
|
|
||||||
size="mini"
|
|
||||||
:disabled="is_disabled(crud.selections.length,crud.selections[0])"
|
|
||||||
@click="submits(crud.selections[0])"
|
|
||||||
>
|
|
||||||
开工
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
slot="right"
|
|
||||||
class="filter-item"
|
|
||||||
type="danger"
|
|
||||||
icon="el-icon-position"
|
|
||||||
size="mini"
|
|
||||||
:disabled="crud.selections.length !== 1"
|
|
||||||
@click="forceFinish(crud.selections[0])"
|
|
||||||
>
|
|
||||||
强制完成
|
|
||||||
</el-button>
|
|
||||||
</crudOperation>
|
|
||||||
<!--表单组件-->
|
|
||||||
<el-dialog
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
:before-close="crud.cancelCU"
|
|
||||||
:visible.sync="crud.status.cu > 0"
|
|
||||||
:title="crud.status.title"
|
|
||||||
width="1200px"
|
|
||||||
>
|
|
||||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini" label-width="160px">
|
|
||||||
<el-form-item label="工单类型" prop="order_type_scode">
|
|
||||||
<el-select v-model="form.order_type_scode" style="width: 200px" filterable placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.PDM_BI_ORDERTYPE"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="生产日期" prop="produce_date">
|
|
||||||
<el-date-picker v-model="form.produce_date" type="date" value-format="yyyy-MM-dd" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="false" label="物料标识" prop="material_id">
|
|
||||||
<el-input v-model="form.material_id" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="生产设备">
|
|
||||||
<el-input
|
|
||||||
v-model="form.device_code"
|
|
||||||
style="width: 200px;"
|
|
||||||
clearable
|
|
||||||
@focus="deviceShow=true"
|
|
||||||
@clear="form.device_id='', form.device_code=''"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料编码" prop="material_code">
|
|
||||||
<el-input
|
|
||||||
v-model="form.material_code"
|
|
||||||
style="width: 200px;"
|
|
||||||
clearable
|
|
||||||
@focus="materialShow=true"
|
|
||||||
@clear="form.material_id='',form.material_code='',form.material_name='',form.material_spec=''"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料名称" prop="material_name">
|
|
||||||
<el-input
|
|
||||||
v-model="form.material_name"
|
|
||||||
style="width: 200px;"
|
|
||||||
disabled
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料规格" prop="material_spec">
|
|
||||||
<el-input
|
|
||||||
v-model="form.material_spec"
|
|
||||||
style="width: 200px;"
|
|
||||||
disabled
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="物料单重" prop="material_weight">
|
|
||||||
<el-input v-model="form.material_weight" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计划数量" prop="plan_qty">
|
|
||||||
<el-input v-model="form.plan_qty" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="载具类型" prop="vehicle_type">
|
|
||||||
<el-select v-model="form.vehicle_type" style="width: 200px" filterable placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.storagevehicle_type"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计划开始时间" prop="planproducestart_date">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="form.planproducestart_date"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
type="datetime"
|
|
||||||
style="width: 200px;"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计划结束时间" prop="planproduceend_date">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="form.planproduceend_date"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
type="datetime"
|
|
||||||
style="width: 200px;"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="crud.status.edit" label="报工数量" prop="report_qty">
|
|
||||||
<el-input v-model="form.report_qty" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="班次类型" prop="shift_type_scode">
|
|
||||||
<el-select
|
|
||||||
v-model="form.shift_type_scode"
|
|
||||||
style="width: 200px"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
placeholder="请选择"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.PDM_BI_SHIFTTYPE"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="销售单标识">
|
|
||||||
<el-input v-model="form.sale_id" style="width: 200px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="是否搬运" prop="is_needmove">
|
|
||||||
<el-radio
|
|
||||||
v-for="item in dict.IS_OR_NOT"
|
|
||||||
:key="item.id"
|
|
||||||
v-model="form.is_needmove"
|
|
||||||
:label="item.value"
|
|
||||||
>{{ item.label }}
|
|
||||||
</el-radio>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="允许修改报工数量" prop="is_canupdate_update">
|
|
||||||
<el-radio
|
|
||||||
v-for="item in dict.IS_OR_NOT"
|
|
||||||
:key="item.id"
|
|
||||||
v-model="form.is_canupdate_update"
|
|
||||||
:label="item.value"
|
|
||||||
>{{ item.label }}
|
|
||||||
</el-radio>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
|
||||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<!--表格渲染-->
|
|
||||||
<el-table
|
|
||||||
ref="table"
|
|
||||||
v-loading="crud.loading"
|
|
||||||
:data="crud.data"
|
|
||||||
size="mini"
|
|
||||||
style="width: 100%;"
|
|
||||||
@selection-change="crud.selectionChangeHandler"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="55" />
|
|
||||||
<el-table-column v-if="false" prop="produceorder_id" label="生产班次工单标识" />
|
|
||||||
<el-table-column prop="produceorder_code" label="工单编号" width="140px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.produceorder_code }}</el-link>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="producedeviceorder_code" label="机台工单号" width="100px" />
|
|
||||||
<el-table-column prop="order_status" label="工单状态">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ dict.label.MPS_BD_ORDERSTATUS[scope.row.order_status] }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="shift_type_scode" label="班次类型">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ dict.label.PDM_BI_SHIFTTYPE[scope.row.shift_type_scode] }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="produce_date" label="生产日期" width="100px" />
|
|
||||||
<el-table-column prop="plan_qty" label="计划数量" />
|
|
||||||
<el-table-column prop="real_qty" label="实际数量" />
|
|
||||||
<el-table-column prop="report_qty" label="报工数量" />
|
|
||||||
<el-table-column v-if="false" prop="material_id" label="物料标识" />
|
|
||||||
<el-table-column prop="device_name" label="设备" width="100" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="material_code" label="物料编码" width="100" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="material_name" label="物料名称" width="100" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="material_spec" label="物料规格" width="100" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="sale_id" label="销售单标识" width="100" show-overflow-tooltip />
|
|
||||||
<el-table-column prop="material_weight" label="物料单重" :formatter="rounding" />
|
|
||||||
<el-table-column prop="planproducestart_date" label="计划生产开始时间" width="150" />
|
|
||||||
<el-table-column prop="planproduceend_date" label="计划生产结束时间" width="150" />
|
|
||||||
<el-table-column prop="realproducestart_date" label="实际生产开始时间" width="150" />
|
|
||||||
<el-table-column prop="realproduceend_date" label="实际生产结束时间" width="150" />
|
|
||||||
<el-table-column prop="vehicle_type" label="载具类型">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ dict.label.storagevehicle_type[scope.row.vehicle_type] }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="is_needmove" label="是否搬运">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ dict.label.IS_OR_NOT[scope.row.is_needmove] }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="order_type_scode" label="工单类型">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ dict.label.PDM_BI_ORDERTYPE[scope.row.order_type_scode] }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="create_name" label="创建人" />
|
|
||||||
<el-table-column prop="create_time" label="创建时间" width="150" />
|
|
||||||
<el-table-column prop="update_optname" label="修改人" />
|
|
||||||
<el-table-column prop="update_time" label="修改时间" width="150" />
|
|
||||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<udOperation
|
|
||||||
:data="scope.row"
|
|
||||||
:permission="permission"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<!--分页组件-->
|
|
||||||
<pagination />
|
|
||||||
</div>
|
|
||||||
<MaterDtl :dialog-show.sync="materialShow" :is-single="true" @setMaterValue="setMaterValue" />
|
|
||||||
<DeviceDialog :dialog-show.sync="deviceShow" :is-single="true" @tableChanged="tableChanged" />
|
|
||||||
<ViewDialog ref="child3" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import crudProduceshiftorder from '@/views/wms/mps/produce/produceshiftorder'
|
|
||||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
|
||||||
import rrOperation from '@crud/RR.operation'
|
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
|
||||||
import udOperation from '@crud/UD.operation'
|
|
||||||
import pagination from '@crud/Pagination'
|
|
||||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
|
||||||
import ViewDialog from '@/views/wms/mps/produce/ViewDialog'
|
|
||||||
import DeviceDialog from '@/views/wms/pub/DeviceDialog'
|
|
||||||
|
|
||||||
const defaultForm = {
|
|
||||||
produceorder_id: null,
|
|
||||||
produceorder_code: null,
|
|
||||||
producedeviceorder_code: null,
|
|
||||||
shift_type_scode: '01',
|
|
||||||
workprocedure_id: null,
|
|
||||||
produce_date: null,
|
|
||||||
plan_qty: null,
|
|
||||||
real_qty: null,
|
|
||||||
report_qty: null,
|
|
||||||
material_id: null,
|
|
||||||
material_code: null,
|
|
||||||
material_weight: null,
|
|
||||||
vehicle_type: null,
|
|
||||||
planproducestart_date: null,
|
|
||||||
planproduceend_date: null,
|
|
||||||
realproducestart_date: null,
|
|
||||||
realproduceend_date: null,
|
|
||||||
order_status: '00',
|
|
||||||
is_needmove: '1',
|
|
||||||
order_type_scode: '01',
|
|
||||||
create_id: null,
|
|
||||||
create_name: null,
|
|
||||||
create_time: null,
|
|
||||||
update_optid: null,
|
|
||||||
update_optname: null,
|
|
||||||
update_time: null,
|
|
||||||
sysdeptid: null,
|
|
||||||
syscompanyid: null,
|
|
||||||
is_delete: null,
|
|
||||||
material_name: null,
|
|
||||||
device_id: null,
|
|
||||||
device_code: null,
|
|
||||||
is_canupdate_update: '1',
|
|
||||||
material_spec: null,
|
|
||||||
sale_id: null
|
|
||||||
}
|
|
||||||
export default {
|
|
||||||
name: 'Produceshiftorder',
|
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl, ViewDialog, DeviceDialog },
|
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
|
||||||
dicts: ['PDM_BI_SHIFTTYPE', 'MPS_BD_ORDERSTATUS', 'is_used', 'PDM_BI_ORDERTYPE', 'IS_OR_NOT', 'storagevehicle_type'],
|
|
||||||
cruds() {
|
|
||||||
return CRUD({
|
|
||||||
title: '工单', url: 'api/produceshiftorder', idField: 'produceorder_id', sort: 'produceorder_id,desc',
|
|
||||||
optShow: {
|
|
||||||
add: true,
|
|
||||||
edit: false,
|
|
||||||
del: false,
|
|
||||||
download: false,
|
|
||||||
reset: true
|
|
||||||
},
|
|
||||||
query: {
|
|
||||||
order_status: '-1'
|
|
||||||
},
|
|
||||||
crudMethod: { ...crudProduceshiftorder }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
classes3: [],
|
|
||||||
materType: '01',
|
|
||||||
materialShow: false,
|
|
||||||
deviceShow: false,
|
|
||||||
workprocedureList: [],
|
|
||||||
order_status: ['-1'],
|
|
||||||
permission: {},
|
|
||||||
rules: {
|
|
||||||
produceorder_code: [
|
|
||||||
{ required: true, message: '生产班次工单编号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
producedeviceorder_code: [
|
|
||||||
{ required: true, message: '机台工单号不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
shift_type_scode: [
|
|
||||||
{ required: true, message: '班次类型不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
produce_date: [
|
|
||||||
{ required: true, message: '生产日期不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
plan_qty: [
|
|
||||||
{ required: true, message: '计划数量不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
material_code: [
|
|
||||||
{ required: true, message: '物料编码不能为空', trigger: 'change' }
|
|
||||||
],
|
|
||||||
material_weight: [
|
|
||||||
{ required: true, message: '物料单重不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
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' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 工单状态多选搜索
|
|
||||||
handTaskStatus(value) {
|
|
||||||
this.$forceUpdate()
|
|
||||||
if (value) {
|
|
||||||
this.order_status = JSON.parse(JSON.stringify(value))
|
|
||||||
this.query.order_status = this.order_status.toString()
|
|
||||||
}
|
|
||||||
this.crud.toQuery()
|
|
||||||
},
|
|
||||||
// 查看
|
|
||||||
toView(row) {
|
|
||||||
console.log(row)
|
|
||||||
if (row !== null) {
|
|
||||||
this.$refs.child3.setForm(row)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强制完成
|
|
||||||
forceFinish(data) {
|
|
||||||
crudProduceshiftorder.forceFinish({ row: data }).then(res => {
|
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
this.crud.toQuery()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 取两位小数点
|
|
||||||
rounding(row, column) {
|
|
||||||
return parseFloat(row[column.property]).toFixed(2)
|
|
||||||
},
|
|
||||||
// 下发按钮禁用条件
|
|
||||||
is_disabled(len, row) {
|
|
||||||
if (len === 1 && row.order_status === '00') {
|
|
||||||
return false
|
|
||||||
} else {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 新增编辑给form表单物料相关信息赋值
|
|
||||||
setMaterValue(row) {
|
|
||||||
this.form.material_id = row.material_id
|
|
||||||
this.form.material_code = row.material_code
|
|
||||||
this.form.material_name = row.material_name
|
|
||||||
this.form.material_spec = row.material_spec
|
|
||||||
},
|
|
||||||
tableChanged(row) {
|
|
||||||
this.form.device_id = row.device_id
|
|
||||||
this.form.device_code = row.device_code
|
|
||||||
},
|
|
||||||
// 下发
|
|
||||||
submits(row) {
|
|
||||||
crudProduceshiftorder.submits({ produceorder_id: row.produceorder_id }).then(res => {
|
|
||||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
this.crud.toQuery()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export function add(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/Materialbase',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function del(ids) {
|
|
||||||
return request({
|
|
||||||
url: 'api/Materialbase/',
|
|
||||||
method: 'delete',
|
|
||||||
data: ids
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function edit(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/Materialbase',
|
|
||||||
method: 'put',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getMaterOptType(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/Materialbase/getMaterOptType',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function isAlongMaterType(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/Materialbase/isAlongMaterType',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function synchronize(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/Materialbase/synchronize',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export default { add, edit, del, getMaterOptType, isAlongMaterType, synchronize }
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export function add(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/produceshiftorder',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function del(ids) {
|
|
||||||
return request({
|
|
||||||
url: 'api/produceshiftorder/',
|
|
||||||
method: 'delete',
|
|
||||||
data: ids
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function edit(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/produceshiftorder',
|
|
||||||
method: 'put',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function submits(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/produceshiftorder/submits',
|
|
||||||
method: 'put',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getDevice(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/produceshiftorder/getDevice',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getTable(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/produceshiftorder/getTable',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function openStart(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/produceshiftorder/openStart',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function saveReport(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/produceshiftorder/saveReport',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function finish(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/produceshiftorder/finish',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function forceFinish(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/produceshiftorder/forceFinish',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getReportWork(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/produceshiftorder/getReportWork',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getDtl(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/produceshiftorder/getDtl',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export default { add, edit, del, submits, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl }
|
|
||||||
Reference in New Issue
Block a user