提高
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
"vue": "2.6.12",
|
||||
"vue-count-to": "1.0.13",
|
||||
"vue-cropper": "0.4.9",
|
||||
"vue-easytable": "^2.27.1",
|
||||
"vue-router": "3.4.9",
|
||||
"vue-seamless-scroll": "^1.1.23",
|
||||
"vuedraggable": "2.20.0",
|
||||
|
||||
@@ -42,3 +42,34 @@ export function getworkorderList(id) {
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function deleteworkorder(id) {
|
||||
return request({
|
||||
url: '/mes/pro/workplan/deleteworkorder/' + id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function insertNewworkorder(data) {
|
||||
return request({
|
||||
url: '/mes/pro/workplan/addworkorder',
|
||||
method: 'post',
|
||||
data: data,
|
||||
contextType: 'application/json',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function updateworkorder(data) {
|
||||
return request({
|
||||
url: '/mes/pro/workplan/updateworkorder',
|
||||
method: 'post',
|
||||
data: data,
|
||||
contextType: 'application/json',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -44,9 +44,6 @@ import dataV from '@jiaminghi/data-view'
|
||||
//需要按需引入,先引入vue并引入element-ui
|
||||
import AFTableColumn from 'af-table-column'
|
||||
|
||||
|
||||
|
||||
|
||||
// 全局方法挂载
|
||||
Vue.prototype.getDicts = getDicts
|
||||
Vue.prototype.getConfigKey = getConfigKey
|
||||
|
||||
@@ -1,243 +1,46 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索部分 -->
|
||||
<div>
|
||||
<el-form :model="search" inline>
|
||||
<!-- <el-form-item label="年">
|
||||
<el-form-item label="年">
|
||||
<el-input v-model="search.year" placeholder="输入年份"></el-input>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="周">
|
||||
<el-input v-model="search.week" placeholder="输入周"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期">
|
||||
<el-input v-model="search.date" placeholder="输入日期"></el-input>
|
||||
<el-form-item label="日期" style="float: right">
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="search_workorder(1)">周一</el-button>
|
||||
<el-button type="primary" @click="search_workorder(2)">周二</el-button>
|
||||
<el-button type="primary" @click="search_workorder(3)">周三</el-button>
|
||||
<el-button type="primary" @click="search_workorder(4)">周四</el-button>
|
||||
<el-button type="primary" @click="search_workorder(5)">周五</el-button>
|
||||
<el-button type="primary" @click="search_workorder(6)">周六</el-button>
|
||||
<el-button type="primary" @click="search_workorder(7)">周日</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="上线时间">
|
||||
<el-input v-model="search.time" placeholder="输入时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="班组">
|
||||
<el-input v-model="search.teams" placeholder="输入班组"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单">
|
||||
<el-input v-model="search.workorder" placeholder="输入工单"></el-input>
|
||||
</el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="getList">搜索</el-button>
|
||||
</el-form>
|
||||
</div>
|
||||
<h3>油漆车间生产序列计划(第13周)</h3>
|
||||
<!-- 按钮排 -->
|
||||
<!-- 周一至周日 -->
|
||||
<div>
|
||||
<el-row type="flex" justify="space-between">
|
||||
<el-col :span="12">
|
||||
<el-row :gutter="2">
|
||||
<el-col :span="6">
|
||||
<el-button type="primary" size="small" @click="addItem">批量导入生产计划</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" size="small" @click="addItem">紧急插工单</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" size="small" @click="updataItem(true)">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" size="small" @click="deleteItem(true)">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-button-group style="float: right">
|
||||
<el-button type="primary" size="big">全部</el-button>
|
||||
<el-button type="info" size="big">周一</el-button>
|
||||
<el-button type="info" size="big">周二</el-button>
|
||||
<el-button type="info" size="big">周三</el-button>
|
||||
<el-button type="info" size="big">周四</el-button>
|
||||
<el-button type="info" size="big">周五</el-button>
|
||||
<el-button type="info" size="big">周六</el-button>
|
||||
<el-button type="info" size="big">周日</el-button>
|
||||
</el-button-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<vxe-table
|
||||
border
|
||||
:column-config="{ useKey: true }"
|
||||
:row-config="{ useKey: true }"
|
||||
height="400"
|
||||
:data="tableData"
|
||||
:cell-class-name="cellClassName"
|
||||
>
|
||||
<vxe-column type="seq" width="60"></vxe-column>
|
||||
<vxe-column field="Date" title="日期"></vxe-column>
|
||||
<vxe-column field="shift" title="班别"></vxe-column>
|
||||
<vxe-column field="team" title="班组"></vxe-column>
|
||||
<vxe-column field="round" title="圈数"></vxe-column>
|
||||
<vxe-column field="online_time" title="上线时间"></vxe-column>
|
||||
<vxe-column field="work_order" title="工单" :formatter="formatworkOrder" type="html" width="90"></vxe-column>
|
||||
<vxe-column field="vehicle_NO" title="小车号"></vxe-column>
|
||||
<vxe-column field="part_SN" title="简码"></vxe-column>
|
||||
<vxe-column field="part_NO" title="零件号" width="100" :formatter="formatPartNo" type="html"></vxe-column>
|
||||
<vxe-column field="part_name" title="零件名称" width="120" :formatter="formatPartName" type="html"> </vxe-column>
|
||||
<vxe-column field="paintCode" title="颜色代号"></vxe-column>
|
||||
<vxe-column field="ProgramCode" title="程序号"></vxe-column>
|
||||
<vxe-column field="QuantityPerRack" title="每车件数"></vxe-column>
|
||||
<vxe-column field="RackQuantity" title="小车数量"></vxe-column>
|
||||
<vxe-column field="ShareRack" title="共用小车"></vxe-column>
|
||||
<vxe-column field="ProductionQuantity" title="生产数量"></vxe-column>
|
||||
<vxe-column field="Remark" title="备注"></vxe-column>
|
||||
</vxe-table>
|
||||
<el-divider></el-divider>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="已经排程">已经排程</el-tab-pane>
|
||||
<el-tab-pane label="待产程">待产程</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'workorder',
|
||||
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
date: '',
|
||||
time: '',
|
||||
teams: '',
|
||||
workOrder: '',
|
||||
year: new Date().getFullYear(),
|
||||
week: 1,
|
||||
},
|
||||
tableData: [
|
||||
{
|
||||
Date: '2016/3/22',
|
||||
shift: '夜班',
|
||||
team: 'A',
|
||||
round: '08',
|
||||
online_time: '03/23 00:09:45',
|
||||
work_order: 'W0234',
|
||||
vehicle_NO: '059-063',
|
||||
part_SN: '177',
|
||||
part_NO: '300504103',
|
||||
part_name: 'SGM201左外镜副镜壳银河灰',
|
||||
paintCode: '1551',
|
||||
ProgramCode: '0041',
|
||||
QuantityPerRack: '20',
|
||||
RackQuantity: '6',
|
||||
ShareRack: '85',
|
||||
ProductionQuantity: '85',
|
||||
Remark: '-',
|
||||
},
|
||||
{
|
||||
Date: '2016/3/22',
|
||||
shift: '白班',
|
||||
team: 'A',
|
||||
round: '08',
|
||||
online_time: '03/23 00:09:45',
|
||||
work_order: 'W0234',
|
||||
vehicle_NO: '059-063',
|
||||
part_SN: '177',
|
||||
part_NO: '300504103',
|
||||
part_name: 'SGM201左外镜副镜壳银河灰',
|
||||
paintCode: '1551',
|
||||
ProgramCode: '0041',
|
||||
QuantityPerRack: '20',
|
||||
RackQuantity: '6',
|
||||
ShareRack: '85',
|
||||
ProductionQuantity: '85',
|
||||
Remark: '-',
|
||||
},
|
||||
{
|
||||
Date: '2016/3/22',
|
||||
shift: '夜班',
|
||||
team: 'A',
|
||||
round: '08',
|
||||
online_time: '03/23 00:09:45',
|
||||
work_order: 'W0234',
|
||||
vehicle_NO: '059-063',
|
||||
part_SN: '177',
|
||||
part_NO: '300504103',
|
||||
part_name: 'SGM201左外镜副镜壳银河灰',
|
||||
paintCode: '1551',
|
||||
ProgramCode: '0041',
|
||||
QuantityPerRack: '20',
|
||||
RackQuantity: '6',
|
||||
ShareRack: '85',
|
||||
ProductionQuantity: '85',
|
||||
Remark: '-',
|
||||
},
|
||||
{
|
||||
Date: '2016/3/22',
|
||||
shift: '白班',
|
||||
team: 'A',
|
||||
round: '08',
|
||||
online_time: '03/23 00:09:45',
|
||||
work_order: 'W0234',
|
||||
vehicle_NO: '059-063',
|
||||
part_SN: '177',
|
||||
part_NO: '300504103',
|
||||
part_name: 'SGM201左外镜副镜壳银河灰',
|
||||
paintCode: '1551',
|
||||
ProgramCode: '0041',
|
||||
QuantityPerRack: '20',
|
||||
RackQuantity: '6',
|
||||
ShareRack: '85',
|
||||
ProductionQuantity: '85',
|
||||
Remark: '-',
|
||||
},
|
||||
{
|
||||
Date: '2016/3/22',
|
||||
shift: '白班',
|
||||
team: 'A',
|
||||
round: '08',
|
||||
online_time: '03/23 00:09:45',
|
||||
work_order: 'W0234',
|
||||
vehicle_NO: '059-063',
|
||||
part_SN: '177',
|
||||
part_NO: '300504103',
|
||||
part_name: 'SGM201左外镜副镜壳银河灰',
|
||||
paintCode: '1551',
|
||||
ProgramCode: '0041',
|
||||
QuantityPerRack: '20',
|
||||
RackQuantity: '6',
|
||||
ShareRack: '85',
|
||||
ProductionQuantity: '85',
|
||||
Remark: '-',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {},
|
||||
addItem() {},
|
||||
updataItem() {},
|
||||
deleteItem() {},
|
||||
|
||||
formatworkOrder({ cellValue }) {
|
||||
return `<span style="color:blue;font-weight: bold"> ${cellValue} </span>`
|
||||
},
|
||||
formatPartNo({ cellValue }) {
|
||||
return `<span style="color:green;font-weight: bold"> ${cellValue} </span>`
|
||||
},
|
||||
formatPartName({ cellValue }) {
|
||||
return `<span style="color:green;font-weight: bold"> ${cellValue} </span>`
|
||||
},
|
||||
cellClassName({ row, column }) {
|
||||
if (column.field === 'team') {
|
||||
if (row.team == '夜班') {
|
||||
return 'col-black'
|
||||
}
|
||||
}
|
||||
return null
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
h3 {
|
||||
text-align: center;
|
||||
}
|
||||
::v-deep .el-button-group {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
243
src/views/productManagement/workorder_v1.vue
Normal file
243
src/views/productManagement/workorder_v1.vue
Normal file
@@ -0,0 +1,243 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索部分 -->
|
||||
<div>
|
||||
<el-form :model="search" inline>
|
||||
<!-- <el-form-item label="年">
|
||||
<el-input v-model="search.year" placeholder="输入年份"></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="周">
|
||||
<el-input v-model="search.week" placeholder="输入周"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期">
|
||||
<el-input v-model="search.date" placeholder="输入日期"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="上线时间">
|
||||
<el-input v-model="search.time" placeholder="输入时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="班组">
|
||||
<el-input v-model="search.teams" placeholder="输入班组"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单">
|
||||
<el-input v-model="search.workorder" placeholder="输入工单"></el-input>
|
||||
</el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="getList">搜索</el-button>
|
||||
</el-form>
|
||||
</div>
|
||||
<h3>油漆车间生产序列计划(第13周)</h3>
|
||||
<!-- 按钮排 -->
|
||||
<!-- 周一至周日 -->
|
||||
<div>
|
||||
<el-row type="flex" justify="space-between">
|
||||
<el-col :span="12">
|
||||
<el-row :gutter="2">
|
||||
<el-col :span="6">
|
||||
<el-button type="primary" size="small" @click="addItem">批量导入生产计划</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" size="small" @click="addItem">紧急插工单</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" size="small" @click="updataItem(true)">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" size="small" @click="deleteItem(true)">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-button-group style="float: right">
|
||||
<el-button type="primary" size="big">全部</el-button>
|
||||
<el-button type="info" size="big">周一</el-button>
|
||||
<el-button type="info" size="big">周二</el-button>
|
||||
<el-button type="info" size="big">周三</el-button>
|
||||
<el-button type="info" size="big">周四</el-button>
|
||||
<el-button type="info" size="big">周五</el-button>
|
||||
<el-button type="info" size="big">周六</el-button>
|
||||
<el-button type="info" size="big">周日</el-button>
|
||||
</el-button-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<vxe-table
|
||||
border
|
||||
:column-config="{ useKey: true }"
|
||||
:row-config="{ useKey: true }"
|
||||
height="400"
|
||||
:data="tableData"
|
||||
:cell-class-name="cellClassName"
|
||||
>
|
||||
<vxe-column type="seq" width="60"></vxe-column>
|
||||
<vxe-column field="Date" title="日期"></vxe-column>
|
||||
<vxe-column field="shift" title="班别"></vxe-column>
|
||||
<vxe-column field="team" title="班组"></vxe-column>
|
||||
<vxe-column field="round" title="圈数"></vxe-column>
|
||||
<vxe-column field="online_time" title="上线时间"></vxe-column>
|
||||
<vxe-column field="work_order" title="工单" :formatter="formatworkOrder" type="html" width="90"></vxe-column>
|
||||
<vxe-column field="vehicle_NO" title="小车号"></vxe-column>
|
||||
<vxe-column field="part_SN" title="简码"></vxe-column>
|
||||
<vxe-column field="part_NO" title="零件号" width="100" :formatter="formatPartNo" type="html"></vxe-column>
|
||||
<vxe-column field="part_name" title="零件名称" width="120" :formatter="formatPartName" type="html"> </vxe-column>
|
||||
<vxe-column field="paintCode" title="颜色代号"></vxe-column>
|
||||
<vxe-column field="ProgramCode" title="程序号"></vxe-column>
|
||||
<vxe-column field="QuantityPerRack" title="每车件数"></vxe-column>
|
||||
<vxe-column field="RackQuantity" title="小车数量"></vxe-column>
|
||||
<vxe-column field="ShareRack" title="共用小车"></vxe-column>
|
||||
<vxe-column field="ProductionQuantity" title="生产数量"></vxe-column>
|
||||
<vxe-column field="Remark" title="备注"></vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'workorder',
|
||||
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
date: '',
|
||||
time: '',
|
||||
teams: '',
|
||||
workOrder: '',
|
||||
},
|
||||
tableData: [
|
||||
{
|
||||
Date: '2016/3/22',
|
||||
shift: '夜班',
|
||||
team: 'A',
|
||||
round: '08',
|
||||
online_time: '03/23 00:09:45',
|
||||
work_order: 'W0234',
|
||||
vehicle_NO: '059-063',
|
||||
part_SN: '177',
|
||||
part_NO: '300504103',
|
||||
part_name: 'SGM201左外镜副镜壳银河灰',
|
||||
paintCode: '1551',
|
||||
ProgramCode: '0041',
|
||||
QuantityPerRack: '20',
|
||||
RackQuantity: '6',
|
||||
ShareRack: '85',
|
||||
ProductionQuantity: '85',
|
||||
Remark: '-',
|
||||
},
|
||||
{
|
||||
Date: '2016/3/22',
|
||||
shift: '白班',
|
||||
team: 'A',
|
||||
round: '08',
|
||||
online_time: '03/23 00:09:45',
|
||||
work_order: 'W0234',
|
||||
vehicle_NO: '059-063',
|
||||
part_SN: '177',
|
||||
part_NO: '300504103',
|
||||
part_name: 'SGM201左外镜副镜壳银河灰',
|
||||
paintCode: '1551',
|
||||
ProgramCode: '0041',
|
||||
QuantityPerRack: '20',
|
||||
RackQuantity: '6',
|
||||
ShareRack: '85',
|
||||
ProductionQuantity: '85',
|
||||
Remark: '-',
|
||||
},
|
||||
{
|
||||
Date: '2016/3/22',
|
||||
shift: '夜班',
|
||||
team: 'A',
|
||||
round: '08',
|
||||
online_time: '03/23 00:09:45',
|
||||
work_order: 'W0234',
|
||||
vehicle_NO: '059-063',
|
||||
part_SN: '177',
|
||||
part_NO: '300504103',
|
||||
part_name: 'SGM201左外镜副镜壳银河灰',
|
||||
paintCode: '1551',
|
||||
ProgramCode: '0041',
|
||||
QuantityPerRack: '20',
|
||||
RackQuantity: '6',
|
||||
ShareRack: '85',
|
||||
ProductionQuantity: '85',
|
||||
Remark: '-',
|
||||
},
|
||||
{
|
||||
Date: '2016/3/22',
|
||||
shift: '白班',
|
||||
team: 'A',
|
||||
round: '08',
|
||||
online_time: '03/23 00:09:45',
|
||||
work_order: 'W0234',
|
||||
vehicle_NO: '059-063',
|
||||
part_SN: '177',
|
||||
part_NO: '300504103',
|
||||
part_name: 'SGM201左外镜副镜壳银河灰',
|
||||
paintCode: '1551',
|
||||
ProgramCode: '0041',
|
||||
QuantityPerRack: '20',
|
||||
RackQuantity: '6',
|
||||
ShareRack: '85',
|
||||
ProductionQuantity: '85',
|
||||
Remark: '-',
|
||||
},
|
||||
{
|
||||
Date: '2016/3/22',
|
||||
shift: '白班',
|
||||
team: 'A',
|
||||
round: '08',
|
||||
online_time: '03/23 00:09:45',
|
||||
work_order: 'W0234',
|
||||
vehicle_NO: '059-063',
|
||||
part_SN: '177',
|
||||
part_NO: '300504103',
|
||||
part_name: 'SGM201左外镜副镜壳银河灰',
|
||||
paintCode: '1551',
|
||||
ProgramCode: '0041',
|
||||
QuantityPerRack: '20',
|
||||
RackQuantity: '6',
|
||||
ShareRack: '85',
|
||||
ProductionQuantity: '85',
|
||||
Remark: '-',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {},
|
||||
addItem() {},
|
||||
updataItem() {},
|
||||
deleteItem() {},
|
||||
|
||||
formatworkOrder({ cellValue }) {
|
||||
return `<span style="color:blue;font-weight: bold"> ${cellValue} </span>`
|
||||
},
|
||||
formatPartNo({ cellValue }) {
|
||||
return `<span style="color:green;font-weight: bold"> ${cellValue} </span>`
|
||||
},
|
||||
formatPartName({ cellValue }) {
|
||||
return `<span style="color:green;font-weight: bold"> ${cellValue} </span>`
|
||||
},
|
||||
cellClassName({ row, column }) {
|
||||
if (column.field === 'team') {
|
||||
if (row.team == '夜班') {
|
||||
return 'col-black'
|
||||
}
|
||||
}
|
||||
return null
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
h3 {
|
||||
text-align: center;
|
||||
}
|
||||
::v-deep .el-button-group {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -150,6 +150,7 @@
|
||||
<el-col :span="6"
|
||||
><el-form-item label="计划需求定性"> <el-input v-model="dialog_1.form.needcertainty"></el-input> </el-form-item
|
||||
></el-col>
|
||||
|
||||
<el-col :span="6"
|
||||
><el-form-item label="备注"> <el-input v-model="dialog_1.form.remark"></el-input> </el-form-item
|
||||
></el-col>
|
||||
@@ -168,7 +169,7 @@
|
||||
</el-row>
|
||||
<el-table border stripe :data="workOrderList" style="width: 100%" height="300">
|
||||
<el-table-column prop="id" label="流水号"> </el-table-column>
|
||||
<el-table-column prop="fk_pro_plan_id" label="生产计划id"> </el-table-column>
|
||||
<el-table-column prop="fkProPlanId" label="生产计划id"> </el-table-column>
|
||||
<el-table-column prop="year" label="年份"> </el-table-column>
|
||||
<el-table-column prop="week" label="周"> </el-table-column>
|
||||
<el-table-column prop="date" label="周几">
|
||||
@@ -176,23 +177,36 @@
|
||||
<div class="workorder_scope">{{ scope.row.date }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isarrange" label="是否已经排程">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.isarrange == '0'" size="mini" type="success" round>未排程</el-button>
|
||||
<el-button v-else-if="scope.row.isarrange == '1'" size="mini" type="info" round>已排程</el-button>
|
||||
<el-button v-else size="mini" type="danger" round>异常</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="priority" label="优先级">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.priority == 100" style="color: red">高</div>
|
||||
<div v-else>低</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="arrange_starttime" label="排产开始时间"> <i class="el-icon-time"></i> </el-table-column>
|
||||
<el-table-column prop="arrange_endtime" label="排产结束时间"> <i class="el-icon-time"></i></el-table-column> -->
|
||||
<el-table-column prop="production_time" label="预计工时"> </el-table-column>
|
||||
<el-table-column prop="production_name" label="产品名称"> </el-table-column>
|
||||
<el-table-column prop="productionTime" label="预计工时"> </el-table-column>
|
||||
<el-table-column prop="productionName" label="产品名称"> </el-table-column>
|
||||
<el-table-column prop="color" label="颜色"> </el-table-column>
|
||||
<el-table-column prop="paint_cylinder_number" label="油漆缸号"> </el-table-column>
|
||||
<el-table-column prop="paintCylinderNumber" label="油漆缸号"> </el-table-column>
|
||||
<el-table-column prop="specification" label="规格"> </el-table-column>
|
||||
<el-table-column prop="carnum" label="车数"> </el-table-column>
|
||||
<el-table-column prop="rack" label="挂具摆放"> </el-table-column>
|
||||
<el-table-column prop="require_num" label="上件数"> </el-table-column>
|
||||
<el-table-column prop="requireNum" label="上件数"> </el-table-column>
|
||||
<el-table-column prop="workblankpartnumber" label="毛坯零件号"> </el-table-column>
|
||||
<el-table-column prop="finishedpartnumber" label="成品零件号"> </el-table-column>
|
||||
<el-table-column prop="actualnumber" label="实际上件数"> </el-table-column>
|
||||
<el-table-column prop="actualnumber" label="实际上件数" fixed="right"> </el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
<el-button size="mini" @click="workorder_updateEdit(scope.$index, scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="danger" @click="workorder_delete(scope.$index, scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -219,55 +233,73 @@
|
||||
<el-form ref="dialog_2form" :model="dialog_2.form" :rules="dialog_2.rules" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="周几"> <el-input v-model="date"></el-input> </el-form-item>
|
||||
<el-form-item label="周几" prop="date"> <el-input v-model="dialog_2.form.date"></el-input> </el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="预计工时"> <el-input v-model="production_time"></el-input> </el-form-item>
|
||||
<el-form-item label="预计工时" prop="productionTime"> <el-input v-model="dialog_2.form.productionTime"></el-input> </el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="产品名称"> <el-input v-model="production_name"></el-input> </el-form-item>
|
||||
<el-form-item label="产品名称" prop="productionName"> <el-input v-model="dialog_2.form.productionName"></el-input> </el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="颜色"> <el-input v-model="color"></el-input> </el-form-item>
|
||||
<el-form-item label="颜色" prop="color"> <el-input v-model="dialog_2.form.color"></el-input> </el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="油漆缸号"> <el-input v-model="paint_cylinder_number"></el-input> </el-form-item>
|
||||
<el-form-item label="油漆缸号" prop="paintCylinderNumber">
|
||||
<el-input v-model="dialog_2.form.paintCylinderNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="规格"> <el-input v-model="specification"></el-input> </el-form-item>
|
||||
<el-form-item label="规格" prop="specification"> <el-input v-model="dialog_2.form.specification"></el-input> </el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="车数"> <el-input v-model="carnum"></el-input> </el-form-item>
|
||||
<el-form-item label="车数" prop="carnum"> <el-input v-model="dialog_2.form.carnum"></el-input> </el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="挂具摆放"> <el-input v-model="rack"></el-input> </el-form-item>
|
||||
<el-form-item label="挂具摆放" prop="rack"> <el-input v-model="dialog_2.form.rack"></el-input> </el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="上件数"> <el-input v-model="require_num"></el-input> </el-form-item>
|
||||
<el-form-item label="上件数" prop="requireNum"> <el-input v-model="dialog_2.form.requireNum"></el-input> </el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="毛坯零件号"> <el-input v-model="workblankpartnumber"></el-input> </el-form-item>
|
||||
<el-form-item label="毛坯零件号"> <el-input v-model="dialog_2.form.workblankpartnumber"></el-input> </el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="实际上件数"> <el-input v-model="actualnumber"></el-input> </el-form-item>
|
||||
<el-form-item label="实际上件数" prop="actualnumber"> <el-input v-model="dialog_2.form.actualnumber"></el-input> </el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6"
|
||||
><el-form-item label="排程优先级">
|
||||
<el-select v-model="dialog_2.form.priority" placeholder="请选择来源">
|
||||
<el-option label="紧急" :value="100"></el-option>
|
||||
<el-option label="普通" :value="1"></el-option>
|
||||
</el-select> </el-form-item
|
||||
></el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm_1">确 定</el-button>
|
||||
<el-button @click="cancel_1">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm_2">确 定</el-button>
|
||||
<el-button @click="cancel_2">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getWorkplanList, addNewworkplan, deleteworkplan, updateworkplan, getworkorderList } from '@/api/productManagement/workplan.js'
|
||||
import {
|
||||
getWorkplanList,
|
||||
addNewworkplan,
|
||||
deleteworkplan,
|
||||
updateworkplan,
|
||||
getworkorderList,
|
||||
insertNewworkorder,
|
||||
deleteworkorder,
|
||||
updateworkorder,
|
||||
} from '@/api/productManagement/workplan.js'
|
||||
export default {
|
||||
name: 'workplan',
|
||||
data() {
|
||||
@@ -324,6 +356,39 @@ export default {
|
||||
dialog_2: {
|
||||
title: '新增生产工单',
|
||||
open: false,
|
||||
rules: {
|
||||
date: [{ required: true, message: '周几不能为空', trigger: 'blur' }],
|
||||
productionTime: [{ required: true, message: '预计工时不能为空', trigger: 'blur' }],
|
||||
productionName: [{ required: true, message: '产品名称不能为空', trigger: 'blur' }],
|
||||
partnumber: [{ required: true, message: '零件号不能为空', trigger: 'blur' }],
|
||||
color: [{ required: true, message: '颜色不能为空', trigger: 'blur' }],
|
||||
paintCylinderNumber: [{ required: true, message: '颜色缸号不能为空', trigger: 'blur' }],
|
||||
carnum: [{ required: true, message: '车数不能为空', trigger: 'blur' }],
|
||||
rack: [{ required: true, message: '挂具摆放不能为空', trigger: 'blur' }],
|
||||
requireNum: [{ required: true, message: '需求数量不能为空', trigger: 'blur' }],
|
||||
actualnumber: [{ required: true, message: '实际上件数不能为空', trigger: 'blur' }],
|
||||
},
|
||||
form: {
|
||||
id: '',
|
||||
fkProPlanId: '',
|
||||
year: null,
|
||||
week: null,
|
||||
date: null,
|
||||
isarrange: '',
|
||||
arrangeStarttime: null,
|
||||
arrangeEndtime: null,
|
||||
productionTime: null,
|
||||
productionName: '',
|
||||
color: '',
|
||||
paintCylinderNumber: null,
|
||||
specification: '',
|
||||
carnum: null,
|
||||
rack: null,
|
||||
requireNum: null,
|
||||
workblankpartnumber: '',
|
||||
finishedpartnumber: '',
|
||||
actualnumber: null,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -331,6 +396,7 @@ export default {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
//todo 获取生产计划列表
|
||||
getList() {
|
||||
const query = { ...this.search, ...this.pagination }
|
||||
if (query.week == null || query.week == undefined || query.week == '') query.week = -1
|
||||
@@ -349,9 +415,24 @@ export default {
|
||||
this.dialog_1.title = '新增生产计划'
|
||||
this.flag = 'insert'
|
||||
},
|
||||
// 新增修改提交处理
|
||||
|
||||
//todo 新建生产工单
|
||||
addNewworkorder() {
|
||||
if (this.selectPlan.id == '' || this.selectPlan.id == undefined) {
|
||||
this.$notify.error({
|
||||
title: '错误',
|
||||
message: '未选中生产计划不得新建生产工单',
|
||||
})
|
||||
return
|
||||
}
|
||||
this.dialog_2.open = true
|
||||
this.dialog_2.title = '新增生产工单'
|
||||
this.flag = 'insert'
|
||||
},
|
||||
|
||||
// todo 新增修改提交计划处理
|
||||
submitForm_1() {
|
||||
if ((this.flag = 'insert')) {
|
||||
if (this.flag == 'insert') {
|
||||
this.$refs['dialog_1form'].validate((valid) => {
|
||||
if (valid) {
|
||||
addNewworkplan(this.dialog_1.form).then((res) => {
|
||||
@@ -363,7 +444,7 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if ((this.flag = 'update')) {
|
||||
} else if (this.flag == 'update') {
|
||||
this.$refs['dialog_1form'].validate((valid) => {
|
||||
if (valid) {
|
||||
updateworkplan(this.dialog_1.form).then((res) => {
|
||||
@@ -376,6 +457,68 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 清空表单
|
||||
this.resetForm('dialog_1form')
|
||||
},
|
||||
|
||||
// todo 新增修改 生产工单 处理
|
||||
submitForm_2() {
|
||||
if (this.flag == 'insert') {
|
||||
this.$refs['dialog_2form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const query = { ...this.dialog_2.form }
|
||||
query.fkProPlanId = this.selectPlan.id
|
||||
query.year = this.selectPlan.year
|
||||
query.week = this.selectPlan.week
|
||||
query.isarrange = '0'
|
||||
insertNewworkorder(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data == 1) {
|
||||
this.$notify.success('工单新增成功')
|
||||
this.workplan_select(0, this.selectPlan)
|
||||
this.dialog_2.open = false
|
||||
// 清空表单
|
||||
this.resetForm('dialog_2form')
|
||||
} else if (res.data == 0) {
|
||||
this.$notify.error('工单新增异常,请联系管理员')
|
||||
this.dialog_2.open = false
|
||||
} else if (res.data == 2) {
|
||||
this.$notify.warning('工单生产数量超过计划,无法插入,请调整数量')
|
||||
this.dialog_2.open = false
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$notify.error('工单校验失败')
|
||||
}
|
||||
})
|
||||
} else if (this.flag == 'update') {
|
||||
this.$refs['dialog_2form'].validate((valid) => {
|
||||
if (valid) {
|
||||
updateworkorder(this.dialog_2.form).then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data == 1) {
|
||||
this.$notify.success('修改成功')
|
||||
this.workplan_select(0, this.selectPlan)
|
||||
this.dialog_2.open = false
|
||||
// 清空表单
|
||||
this.resetForm('dialog_2form')
|
||||
} else if (res.data == 0) {
|
||||
this.$notify.error('修改失败,请联系管理员')
|
||||
} else if (res.data == 2) {
|
||||
this.$notify.warning('修改的工单生产数量超过计划,无法插入,请调整数量')
|
||||
} else if (res.data == 3) {
|
||||
this.dialog_2.open = false
|
||||
this.$notify.error('该工单已经排程不能修改')
|
||||
// 清空表单
|
||||
this.resetForm('dialog_2form')
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
cancel_1() {
|
||||
@@ -383,7 +526,14 @@ export default {
|
||||
// this.dialog_1reset();
|
||||
this.resetForm('dialog_1form')
|
||||
},
|
||||
//修改生产计划
|
||||
|
||||
cancel_2() {
|
||||
this.dialog_2.open = false
|
||||
// this.dialog_1reset();
|
||||
this.resetForm('dialog_2form')
|
||||
},
|
||||
|
||||
//todo 修改生产计划
|
||||
workplan_handleUpdate(index, row) {
|
||||
this.flag = 'update'
|
||||
this.dialog_1.open = true
|
||||
@@ -408,7 +558,7 @@ export default {
|
||||
this.dialog_1.form.remark = row.remark
|
||||
},
|
||||
|
||||
//删除生产计划
|
||||
//todo 删除生产计划
|
||||
workplan_handleDelete(index, row) {
|
||||
this.$modal
|
||||
.confirm('是否确认删除生产计划名称为' + row.partnumber + '"的数据项?')
|
||||
@@ -419,7 +569,7 @@ export default {
|
||||
if (res.code == 200) {
|
||||
if ((res.data = 1)) {
|
||||
this.$notify.success('删除成功')
|
||||
this.getList();
|
||||
this.getList()
|
||||
} else {
|
||||
this.$notify.error('删除失败')
|
||||
}
|
||||
@@ -427,21 +577,63 @@ export default {
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
//todo 删除生产工单
|
||||
workorder_delete(index, row) {
|
||||
this.$modal
|
||||
.confirm('是否确认删除生产工单名称为' + row.id + '"的数据项?')
|
||||
.then(function () {
|
||||
return deleteworkorder(row.id)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data == 1) {
|
||||
this.$notify.success('删除成功')
|
||||
this.workplan_select(0, this.selectPlan)
|
||||
} else if (res.data == 0) {
|
||||
this.$notify.error('删除失败')
|
||||
} else if (res.data == 3) {
|
||||
this.$notify.error('该工单已经排程不能删除')
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
//todo 修改工单
|
||||
workorder_updateEdit(index, row) {
|
||||
this.dialog_2.open = true
|
||||
this.flag = 'update'
|
||||
this.dialog_2.title = '修改生产工单'
|
||||
this.dialog_2.form.id = row.id
|
||||
this.dialog_2.form.fkProPlanId = row.fkProPlanId
|
||||
this.dialog_2.form.year = row.year
|
||||
this.dialog_2.form.week = row.week
|
||||
this.dialog_2.form.date = row.date
|
||||
this.dialog_2.form.arrangeStarttime = row.arrangeStarttime
|
||||
this.dialog_2.form.isarrange = row.isarrange
|
||||
this.dialog_2.form.arrangeEndtime = row.arrangeEndtime
|
||||
this.dialog_2.form.productionTime = row.productionTime
|
||||
this.dialog_2.form.productionName = row.productionName
|
||||
this.dialog_2.form.color = row.color
|
||||
this.dialog_2.form.paintCylinderNumber = row.paintCylinderNumber
|
||||
this.dialog_2.form.specification = row.specification
|
||||
this.dialog_2.form.carnum = row.carnum
|
||||
this.dialog_2.form.rack = row.rack
|
||||
this.dialog_2.form.requireNum = row.requireNum
|
||||
this.dialog_2.form.workblankpartnumber = row.workblankpartnumber
|
||||
this.dialog_2.form.finishedpartnumber = row.finishedpartnumber
|
||||
this.dialog_2.form.actualnumber = row.actualnumber
|
||||
},
|
||||
|
||||
//查看工单
|
||||
//todo 查看工单
|
||||
workplan_select(index, row) {
|
||||
this.selectPlan = row
|
||||
getworkorderList(row.id).then((res) => {
|
||||
if ((res.data = 200)) {
|
||||
if (res.code == 200) {
|
||||
this.workOrderList = res.data
|
||||
this.$notify.success('工单查看成功')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//新建生产工单
|
||||
addNewworkorder() {
|
||||
this.dialog_2.open = true
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user