rev: 对照马钢LMS - 点位管理、工单管理、任务工厂类、组盘表
This commit is contained in:
@@ -60,7 +60,19 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission" >
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="!(crud.selections[0]) || crud.selections[1]"
|
||||
@click="submits(crud.selections[0])"
|
||||
>
|
||||
开工
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
@@ -93,7 +105,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="material_name">
|
||||
<el-input v-model="form.material_name" style="width: 240px;" @focus="getMaterial" />
|
||||
<el-input v-model="form.material_name" style="width: 240px;" @focus="getMaterial(1)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input v-model="form.material_code" style="width: 240px;" disabled />
|
||||
@@ -108,6 +120,12 @@
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="半成品编码" prop="material_name">
|
||||
<el-input v-model="form.half_material_code" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="原料编码">
|
||||
<el-input v-model="form.raw_material_code" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划开始时间" prop="planproducestart_date">
|
||||
<el-date-picker
|
||||
v-model="form.planproducestart_date"
|
||||
@@ -228,6 +246,12 @@
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否加急" prop="is_needmove">
|
||||
<el-radio-group v-model="form.is_urgent" style="width: 240px">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
@@ -256,13 +280,15 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="plan_qty" label="计划数量" :min-width="flexWidth('plan_qty',crud.data,'计划数量')" />
|
||||
<el-table-column prop="real_qty" label="实际数量" :min-width="flexWidth('real_qty',crud.data,'实际数量')" />
|
||||
<!-- <el-table-column prop="region_code" label="区域编码" :min-width="flexWidth('region_code',crud.data,'区域编码')" />-->
|
||||
<!-- <el-table-column prop="region_code" label="区域编码" :min-width="flexWidth('region_code',crud.data,'区域编码')" />-->
|
||||
<el-table-column prop="region_name" label="区域名称" :min-width="flexWidth('region_name',crud.data,'区域名称')" />
|
||||
<el-table-column prop="point_code" label="设备编码" :min-width="flexWidth('point_code',crud.data,'设备编码')" />
|
||||
<el-table-column prop="point_name" label="设备名称" :min-width="flexWidth('point_name',crud.data,'设备名称')" />
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_name',crud.data,'物料标识')" />
|
||||
<el-table-column prop="material_code" label="成品编码" :min-width="flexWidth('material_name',crud.data,'物料标识')" />
|
||||
<el-table-column prop="half_material_code" label="半成品编码" :min-width="flexWidth('half_material_code',crud.data,'半成品编码')" />
|
||||
<el-table-column prop="raw_material_code" label="泥料编码" :min-width="flexWidth('raw_material_code',crud.data,'物料标识')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料标识')" />
|
||||
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_name',crud.data,'物料标识')" />
|
||||
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'物料标识')" />
|
||||
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型', 20)">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
||||
@@ -298,13 +324,18 @@
|
||||
{{ scope.row.is_needmove ? '是' : '否' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="workorder_type" label="工单类型" :min-width="flexWidth('workorder_type',crud.data,'工单类型')" />-->
|
||||
<el-table-column prop="is_urgent" label="是否加急" :min-width="flexWidth('is_urgent',crud.data,'是否加急')">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.is_urgent ? '是' : '否' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="workorder_type" label="工单类型" :min-width="flexWidth('workorder_type',crud.data,'工单类型')" />-->
|
||||
<!--<el-table-column
|
||||
prop="passback_status"
|
||||
label="回传MES状态"
|
||||
:min-width="flexWidth('passback_status',crud.data,'回传MES状态')"
|
||||
/>-->
|
||||
<!-- <el-table-column prop="workshop_code" label="车间编码" :min-width="flexWidth('workshop_code',crud.data,'车间编码')" />-->
|
||||
<!-- <el-table-column prop="workshop_code" label="车间编码" :min-width="flexWidth('workshop_code',crud.data,'车间编码')" />-->
|
||||
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
|
||||
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
|
||||
<el-table-column prop="update_name" label="修改人" :min-width="flexWidth('update_name',crud.data,'修改人')" />
|
||||
@@ -321,7 +352,7 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<MaterialDialog :dialog-show.sync="materialDialog" @tableChanged="tableChanged" />
|
||||
<MaterialDialog :dialog-show.sync="materialDialog" @tableChanged="tableChanged" :flag="flag"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -344,6 +375,8 @@ const defaultForm = {
|
||||
plan_qty: null,
|
||||
real_qty: null,
|
||||
material_id: null,
|
||||
half_material_code: null,
|
||||
raw_material_code: null,
|
||||
vehicle_type: null,
|
||||
planproducestart_date: null,
|
||||
planproduceend_date: null,
|
||||
@@ -363,7 +396,8 @@ const defaultForm = {
|
||||
passback_status: null,
|
||||
workshop_code: null,
|
||||
ext_id: null,
|
||||
is_delete: false
|
||||
is_delete: false,
|
||||
is_urgent: false
|
||||
}
|
||||
export default {
|
||||
name: 'PdmBdWorkorder',
|
||||
@@ -413,7 +447,8 @@ export default {
|
||||
regionList: [],
|
||||
pointList: [],
|
||||
regionCodeParam: null,
|
||||
materialDialog: false
|
||||
materialDialog: false,
|
||||
flag: 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -452,14 +487,23 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
getMaterial() {
|
||||
getMaterial(flag) {
|
||||
this.materialDialog = true
|
||||
this.flag = flag
|
||||
},
|
||||
tableChanged(row) {
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_spec = row.material_spec
|
||||
this.form.material_code = row.material_code
|
||||
tableChanged(row, flag) {
|
||||
if (flag === 1) {
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_spec = row.material_spec
|
||||
this.form.material_code = row.material_code
|
||||
this.form.half_material_code = row.half_material_code
|
||||
this.form.raw_material_code = row.raw_material_code
|
||||
} else {
|
||||
this.form.raw_material_name = row.material_name
|
||||
this.form.raw_material_id = row.material_id
|
||||
this.form.raw_material_code = row.material_code
|
||||
}
|
||||
},
|
||||
setRegionName(data) {
|
||||
// 清空
|
||||
@@ -480,7 +524,14 @@ export default {
|
||||
this.crud.query.more_order_status = value.toString()
|
||||
}
|
||||
this.crud.toQuery()
|
||||
}
|
||||
},
|
||||
// 下发
|
||||
submits(row) {
|
||||
crudPdmBdWorkorder.submits(row).then(res => {
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -24,4 +24,12 @@ export function edit(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
export function submits(param) {
|
||||
return request({
|
||||
url: 'api/pdmBdWorkorder/submits',
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, submits }
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
:cell-style="{'text-align':'center'}"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||
@@ -107,7 +106,7 @@ export default {
|
||||
},
|
||||
isSingle: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -132,7 +131,7 @@ export default {
|
||||
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
if (val.length > 1 && this.isSingle) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
} else {
|
||||
@@ -166,8 +165,8 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<el-form-item label="区域类型">
|
||||
<el-select
|
||||
v-model="query.region_code"
|
||||
@clear="handleClear"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
@@ -210,6 +211,16 @@
|
||||
<el-form-item v-if="form.point_status !== '1'" label="载具编码" prop="vehicle_code">
|
||||
<el-input v-model="form.vehicle_code" clearable style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.point_status !== '1'" label="载具类型" prop="vehicle_code">
|
||||
<el-select v-model="form.vehicle_type" placeholder="请选择" clearable style="width: 370px;">
|
||||
<el-option
|
||||
v-for="item in dict.vehicle_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="可放载具类型" prop="can_vehicle_types">
|
||||
<el-select v-model="form.can_vehicle_types" multiple placeholder="请选择" clearable style="width: 370px;">
|
||||
<el-option
|
||||
@@ -248,8 +259,8 @@
|
||||
<el-table-column prop="region_name" label="区域名称" :min-width="flexWidth('region_name',crud.data,'区域名称')" />
|
||||
<el-table-column prop="point_type_name" label="点位类型" :min-width="flexWidth('point_type_name',crud.data,'点位类型')"/>
|
||||
<el-table-column prop="point_status_name" label="点位状态" :min-width="flexWidth('point_status_name',crud.data,'点位类型')"/>
|
||||
<!-- <el-table-column prop="point_type" label="点位类型" :min-width="flexWidth('point_type',crud.data,'点位类型')" />-->
|
||||
<!-- <el-table-column prop="point_status" label="点位状态" :min-width="flexWidth('point_status',crud.data,'点位状态')" />-->
|
||||
<!-- <el-table-column prop="point_type" label="点位类型" :min-width="flexWidth('point_type',crud.data,'点位类型')" />-->
|
||||
<!-- <el-table-column prop="point_status" label="点位状态" :min-width="flexWidth('point_status',crud.data,'点位状态')" />-->
|
||||
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型', 30)">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
||||
@@ -307,7 +318,7 @@
|
||||
<pagination />
|
||||
</div>
|
||||
<ViewDialog ref="viewDialog"/>
|
||||
<PointDialog :dialog-show.sync="pointDialog" @tableChanged="tableChanged"/>
|
||||
<PointDialog :dialog-show.sync="pointDialog" :is-single="false" @tableChanged="tableChanged"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -473,7 +484,7 @@ export default {
|
||||
})
|
||||
},
|
||||
showButton(point_status) {
|
||||
if (point_status && point_status === '2') {
|
||||
if (point_status && (point_status === '2' || point_status === '3')) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@@ -484,10 +495,16 @@ export default {
|
||||
}
|
||||
},
|
||||
tableChanged(row) {
|
||||
this.form.parent_point_code = row.point_code
|
||||
this.form.parent_point_code = row.map(point => point.point_code).join(',')
|
||||
},
|
||||
getParentPoint() {
|
||||
this.pointDialog = true
|
||||
},
|
||||
handleClear() {
|
||||
this.crud.query.region_code = null
|
||||
this.crud.query.point_type = null
|
||||
this.crud.query.point_status = null
|
||||
this.hand()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user