排程进行中
This commit is contained in:
parent
22dd568db0
commit
ee8e17b3e1
@ -52,7 +52,7 @@
|
||||
"vue-easytable": "^2.27.1",
|
||||
"vue-router": "3.4.9",
|
||||
"vue-seamless-scroll": "^1.1.23",
|
||||
"vuedraggable": "2.20.0",
|
||||
"vuedraggable": "^2.20.0",
|
||||
"vuex": "3.6.0",
|
||||
"vxe-table": "^3.6.13",
|
||||
"xe-utils": "^3.5.11"
|
||||
|
||||
18
src/api/productManagement/workorder.js
Normal file
18
src/api/productManagement/workorder.js
Normal file
@ -0,0 +1,18 @@
|
||||
import request from '@/utils/request'
|
||||
import { downFile } from '@/utils/request'
|
||||
|
||||
export function getWorkorderList_Scheduled(query) {
|
||||
return request({
|
||||
url: '/mes/pro/workorder/getworkorderListwithschedule',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function getWorkorderList_NOSchedule(query) {
|
||||
return request({
|
||||
url: '/mes/pro/workorder/getworkorderListwithoutschedule',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
@ -10,26 +10,82 @@
|
||||
</el-form-item>
|
||||
<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 type="primary" @click="searchDate(1)">周一</el-button>
|
||||
<el-button type="primary" @click="searchDate(2)">周二</el-button>
|
||||
<el-button type="primary" @click="searchDate(3)">周三</el-button>
|
||||
<el-button type="primary" @click="searchDate(4)">周四</el-button>
|
||||
<el-button type="primary" @click="searchDate(5)">周五</el-button>
|
||||
<el-button type="primary" @click="searchDate(6)">周六</el-button>
|
||||
<el-button type="primary" @click="searchDate(7)">周日</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="已经排程">已经排程</el-tab-pane>
|
||||
<el-tab-pane label="待产程">待产程</el-tab-pane>
|
||||
<el-tab-pane label="已经排程">
|
||||
<draggable v-model="list">
|
||||
<div v-for="element in list" class="list-element">{{ element }}</div>
|
||||
</draggable>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="待产程">
|
||||
<vxe-table border :column-config="{ resizable: true }" :data="workorderList_NOSchedule" :loading="loading_v1">
|
||||
<vxe-column field="id" title="流水号" width="120"></vxe-column>
|
||||
<vxe-column field="fkProPlanId" title="生产计划id" width="120"></vxe-column>
|
||||
<vxe-column field="year" title="年份" width="120"></vxe-column>
|
||||
<vxe-column field="week" title="周" width="120"></vxe-column>
|
||||
<vxe-column field="date" title="周几" width="120"></vxe-column>
|
||||
<vxe-column field="arrangeStarttime" title="预计排产开始时间" width="120"></vxe-column>
|
||||
<vxe-column field="arrangeEndtime" title="预计排产结束时间" width="120"></vxe-column>
|
||||
<vxe-column field="productionTime" title="预计工时" width="120"></vxe-column>
|
||||
<vxe-column field="productionName" title="产品名称" width="120"></vxe-column>
|
||||
<vxe-column field="paintCylinderNumber" title="油漆缸号" width="120"></vxe-column>
|
||||
<vxe-column field="specification" title="规格" width="120"></vxe-column>
|
||||
<vxe-column field="carnum" title="车数" width="120"></vxe-column>
|
||||
<vxe-column field="rack" title="挂具摆放" width="120"></vxe-column>
|
||||
<vxe-column field="requireNum" title="上件数" width="120"></vxe-column>
|
||||
<vxe-column field="workblankpartnumber" title="毛坯零件号" width="120"></vxe-column>
|
||||
<vxe-column field="finishedpartnumber" title="成品零件号" width="120"></vxe-column>
|
||||
<vxe-column field="actualnumber" title="实际上件数" width="120"></vxe-column>
|
||||
<vxe-column field="priority" title="优先级 1-100" width="120"></vxe-column>
|
||||
<vxe-column field="color" title="颜色" width="120"></vxe-column>
|
||||
<vxe-column field="isarrange" title="是否已排产" width="120"></vxe-column>
|
||||
<vxe-column field="isProduction" title="是否已生产" width="120"></vxe-column>
|
||||
<vxe-column field="order" title="工单顺序" width="120"></vxe-column>
|
||||
<vxe-column title="操作" fixed="right" width="120">
|
||||
<template #default="{ row }">
|
||||
<vxe-button status="primary" content="排程" @click="Scheduling(row)"></vxe-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
<pagination
|
||||
:total="pagination.total"
|
||||
:page.sync="pagination.pageNum"
|
||||
:limit.sync="pagination.pageSize"
|
||||
@pagination="getList(this.dateitem)"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-dialog :title="dialog_2.title" :visible.sync="dialog_2.open" width="40%">
|
||||
<el-form :model="this.Scheduling_form" label-width="150px">
|
||||
<el-form-item label="工单号"> <el-input v-model="this.Scheduling_form.id" disabled></el-input> </el-form-item>
|
||||
<el-form-item label="毛坯零件号"> <el-input v-model="this.Scheduling_form.workblankpartnumber" disabled></el-input> </el-form-item>
|
||||
<el-form-item label="成品零件号"> <el-input v-model="this.Scheduling_form.finishedpartnumber" disabled></el-input> </el-form-item>
|
||||
<el-form-item label="预计排产开始时间"> <el-input v-model="this.Scheduling_form.arrangeStarttime"></el-input> </el-form-item>
|
||||
<el-form-item label="预计排产结束时间"> <el-input v-model="this.Scheduling_form.arrangeEndtime"></el-input> </el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm_2">确 定</el-button>
|
||||
<el-button @click="cancel_2">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getWorkorderList_Scheduled, getWorkorderList_NOSchedule } from '@/api/productManagement/workorder.js'
|
||||
import draggable from 'vuedraggable'
|
||||
export default {
|
||||
name: 'workorder',
|
||||
data() {
|
||||
@ -38,9 +94,87 @@ export default {
|
||||
year: new Date().getFullYear(),
|
||||
week: 1,
|
||||
},
|
||||
pagination: {
|
||||
total: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
pagination2: {
|
||||
total: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
list: ['Item 1', 'Item 2', 'Item 3'],
|
||||
workorderList_Scheduled: [], //生产工单 已经排程
|
||||
workorderList_NOSchedule: [], //生产工单 未排程
|
||||
loading_v1: true,
|
||||
dateitem: -1,
|
||||
dialog_2: {
|
||||
title: '进行排程',
|
||||
open: false,
|
||||
},
|
||||
Scheduling_form: {}, //排程表单
|
||||
}
|
||||
},
|
||||
components: {
|
||||
draggable,
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
//todo 搜索按钮
|
||||
searchDate(dateitem) {
|
||||
this.dateitem = dateitem
|
||||
this.getList()
|
||||
},
|
||||
//todo 获取生产工单列表
|
||||
getList() {
|
||||
const query = { ...this.search, ...this.pagination }
|
||||
query.date = this.dateitem
|
||||
if (query.week == null || query.week == undefined || query.week == '') query.week = -1
|
||||
if (query.year == null || query.year == undefined || query.year == '') query.year = -1
|
||||
getWorkorderList_Scheduled(query)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.loading_v1 = false
|
||||
this.workorderList_Scheduled = res.data.item1
|
||||
this.pagination.total = res.data.item2
|
||||
}
|
||||
return getWorkorderList_NOSchedule(query)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.loading_v2 = false
|
||||
this.workorderList_NOSchedule = res.data.item1
|
||||
this.pagination2.total = res.data.item2
|
||||
}
|
||||
})
|
||||
},
|
||||
//todo 排程按钮点击
|
||||
Scheduling(row) {
|
||||
this.dialog_2.open = true
|
||||
this.Scheduling_form.id = row.id
|
||||
this.Scheduling_form.workblankpartnumber = row.workblankpartnumber
|
||||
this.Scheduling_form.finishedpartnumber = row.finishedpartnumber
|
||||
},
|
||||
//todo 排程对话框确认按钮
|
||||
submitForm_2() {
|
||||
this.dialog_2.open = false
|
||||
const query = { ...this.Scheduling_form }
|
||||
delete query.workblankpartnumber
|
||||
delete query.finishedpartnumber
|
||||
addScheduling(query).then((res) => {})
|
||||
},
|
||||
//todo 排程对话框取消按钮
|
||||
cancel_2() {},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
.list-element {
|
||||
padding: 10px;
|
||||
background: #eee;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user