工单修改
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"af-table-column": "^1.0.3",
|
||||
"axios": "^0.21.4",
|
||||
"bootstrap": "^5.3.0-alpha1",
|
||||
"clipboard": "2.0.8",
|
||||
"core-js": "3.6.5",
|
||||
"echarts": "^5.4.3",
|
||||
|
||||
@@ -16,3 +16,18 @@ export function getWorkorderList_NOSchedule(query) {
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function addScheduling(query) {
|
||||
return request({
|
||||
url: '/mes/pro/workorder/setschedule',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function CancelScheduling(id) {
|
||||
return request({
|
||||
url: '/mes/pro/workorder/resetschedule/' + id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5,7 +5,10 @@ import Cookies from 'js-cookie'
|
||||
import Element from 'element-ui'
|
||||
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
|
||||
import './assets/styles/element-variables.scss'
|
||||
import '@/assets/styles/index.scss' // global css
|
||||
import '@/assets/styles/index.scss' // global css
|
||||
|
||||
|
||||
|
||||
|
||||
import App from './App'
|
||||
import store from './store'
|
||||
|
||||
11783
src/views/productManagement/bootstrap.css
vendored
Normal file
11783
src/views/productManagement/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -23,20 +23,81 @@
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="已经排程">
|
||||
<draggable v-model="list">
|
||||
<div v-for="element in list" class="list-element">{{ element }}</div>
|
||||
</draggable>
|
||||
<el-tab-pane label="已经排程" class="mytable">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover table-bordered" style="table-layout: fixed">
|
||||
<thead>
|
||||
<tr class="table-secondary">
|
||||
<th style="width: 50px">#</th>
|
||||
<th>流水号</th>
|
||||
<th>生产计划id</th>
|
||||
<th>年份</th>
|
||||
<th>周</th>
|
||||
<th>周几</th>
|
||||
<th>预计排产开始时间</th>
|
||||
<th>预计排产开始时间</th>
|
||||
<th>预计工时</th>
|
||||
<th>产品名称</th>
|
||||
<th>油漆缸号</th>
|
||||
<th>规格</th>
|
||||
<th>车数</th>
|
||||
<th>上件数</th>
|
||||
<th>毛坯零件号</th>
|
||||
<th>成品零件号</th>
|
||||
<th>优先级 1-100</th>
|
||||
<th>颜色</th>
|
||||
<th>是否已排产</th>
|
||||
<th>是否已生产</th>
|
||||
<th>是否已生产</th>
|
||||
<th>工单顺序</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<draggable element="tbody" v-model="workorderList_Scheduled" @start="onStart" @end="onEnd">
|
||||
<tr v-for="(item, index) in workorderList_Scheduled" :key="item.index">
|
||||
<td>{{ index }}</td>
|
||||
<td>{{ item.id }}</td>
|
||||
<td>{{ item.fkProPlanId }}</td>
|
||||
<td>{{ item.year }}</td>
|
||||
<td>{{ item.week }}</td>
|
||||
<td>{{ item.date }}</td>
|
||||
<td>{{ item.arrangeStarttime }}</td>
|
||||
<td>{{ item.arrangeEndtime }}</td>
|
||||
<td>{{ item.productionTime }}</td>
|
||||
<td>{{ item.productionName }}</td>
|
||||
<td>{{ item.paintCylinderNumber }}</td>
|
||||
<td>{{ item.specification }}</td>
|
||||
<td>{{ item.carnum }}</td>
|
||||
<td>{{ item.rack }}</td>
|
||||
<td>{{ item.requireNum }}</td>
|
||||
<td>{{ item.workblankpartnumber }}</td>
|
||||
<td>{{ item.actualnumber }}</td>
|
||||
<td>{{ item.priority }}</td>
|
||||
<td>{{ item.color }}</td>
|
||||
<td>{{ item.isarrange }}</td>
|
||||
<td>{{ item.isProduction }}</td>
|
||||
<td>{{ item.order }}</td>
|
||||
<td><el-button type="warning" @click="cancel_scheduled(item)" size="mini">取消排程</el-button></td>
|
||||
</tr>
|
||||
</draggable>
|
||||
</table>
|
||||
</div>
|
||||
<pagination
|
||||
:total="pagination.total"
|
||||
:page.sync="pagination.pageNum"
|
||||
:limit.sync="pagination.pageSize"
|
||||
@pagination="getList(this.dateitem)"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="待产程">
|
||||
<vxe-table border :column-config="{ resizable: true }" :data="workorderList_NOSchedule" :loading="loading_v1">
|
||||
<vxe-table border :column-config="{ resizable: true }" :data="workorderList_NOSchedule" :loading="loading_v2">
|
||||
<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="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>
|
||||
@@ -59,20 +120,29 @@
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
<pagination
|
||||
:total="pagination.total"
|
||||
:page.sync="pagination.pageNum"
|
||||
:limit.sync="pagination.pageSize"
|
||||
:total="pagination2.total"
|
||||
:page.sync="pagination2.pageNum"
|
||||
:limit.sync="pagination2.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 :model="Scheduling_form" label-width="150px">
|
||||
<el-form-item label="工单号"> <el-input v-model="Scheduling_form.id" disabled></el-input> </el-form-item>
|
||||
<el-form-item label="毛坯零件号"> <el-input v-model="Scheduling_form.workblankpartnumber" disabled></el-input> </el-form-item>
|
||||
<el-form-item label="成品零件号"> <el-input v-model="Scheduling_form.finishedpartnumber" disabled></el-input> </el-form-item>
|
||||
<el-form-item label="预计生产时间">
|
||||
<el-time-picker
|
||||
is-range
|
||||
v-model="Scheduling_form.arrangetime"
|
||||
range-separator="至"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
placeholder="选择时间范围"
|
||||
>
|
||||
</el-time-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -84,12 +154,25 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getWorkorderList_Scheduled, getWorkorderList_NOSchedule } from '@/api/productManagement/workorder.js'
|
||||
import { getWorkorderList_Scheduled, getWorkorderList_NOSchedule, addScheduling, CancelScheduling } from '@/api/productManagement/workorder.js'
|
||||
import draggable from 'vuedraggable'
|
||||
export default {
|
||||
name: 'workorder',
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{ id: 1, name: 'Abby', sport: 'basket' },
|
||||
{ id: 2, name: 'Brooke', sport: 'foot' },
|
||||
{ id: 3, name: 'Courtenay', sport: 'volley' },
|
||||
{ id: 4, name: 'David', sport: 'rugby' },
|
||||
],
|
||||
|
||||
Scheduling_form: {
|
||||
id: '',
|
||||
workblankpartnumber: '',
|
||||
finishedpartnumber: '',
|
||||
arrangetime: [new Date(), new Date()],
|
||||
}, //排程表单
|
||||
search: {
|
||||
year: new Date().getFullYear(),
|
||||
week: 1,
|
||||
@@ -107,13 +190,12 @@ export default {
|
||||
list: ['Item 1', 'Item 2', 'Item 3'],
|
||||
workorderList_Scheduled: [], //生产工单 已经排程
|
||||
workorderList_NOSchedule: [], //生产工单 未排程
|
||||
loading_v1: true,
|
||||
loading_v2: true,
|
||||
dateitem: -1,
|
||||
dialog_2: {
|
||||
title: '进行排程',
|
||||
open: false,
|
||||
},
|
||||
Scheduling_form: {}, //排程表单
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -137,7 +219,6 @@ export default {
|
||||
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
|
||||
}
|
||||
@@ -161,20 +242,75 @@ export default {
|
||||
//todo 排程对话框确认按钮
|
||||
submitForm_2() {
|
||||
this.dialog_2.open = false
|
||||
const query = { ...this.Scheduling_form }
|
||||
delete query.workblankpartnumber
|
||||
delete query.finishedpartnumber
|
||||
addScheduling(query).then((res) => {})
|
||||
const query = {
|
||||
id: this.Scheduling_form.id,
|
||||
arrange_starttime: this.Scheduling_form.arrangetime[0],
|
||||
arrange_endtime: this.Scheduling_form.arrangetime[1],
|
||||
}
|
||||
addScheduling(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data == 1) {
|
||||
this.$notify.success('排程成功')
|
||||
this.getList()
|
||||
} else {
|
||||
this.$notify.error('未知错误')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//todo 排程对话框取消按钮
|
||||
cancel_2() {},
|
||||
cancel_2() {
|
||||
this.dialog_2.open = false
|
||||
this.Scheduling_form.id = ''
|
||||
this.Scheduling_form.arrangetime = [new Date(), new Date()]
|
||||
},
|
||||
|
||||
//todo 取消排程
|
||||
cancel_scheduled(row) {
|
||||
this.$modal
|
||||
.confirm('是否确认取消已经排程工单' + row.id + '"的数据项?')
|
||||
.then(function () {
|
||||
return CancelScheduling(row.id)
|
||||
})
|
||||
.then((res) => {
|
||||
if ((res.code == 200) & (res.data == 1)) {
|
||||
this.$notify.success('取消已经排程工单成功')
|
||||
this.getList()
|
||||
} else {
|
||||
this.$notify.error('未知错误')
|
||||
}
|
||||
})
|
||||
},
|
||||
//todo 拖拽开始事件
|
||||
onStart(ev) {},
|
||||
//todo 拓拽结束事件
|
||||
onEnd(ev) {
|
||||
this.workorderList_Scheduled.forEach((item, index) => {
|
||||
item.order = index
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style src="./bootstrap.css" scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
.list-element {
|
||||
padding: 10px;
|
||||
background: #eee;
|
||||
}
|
||||
.mytable {
|
||||
tr:last-child {
|
||||
position: sticky;
|
||||
right: 0;
|
||||
}
|
||||
td:last-child {
|
||||
position: sticky;
|
||||
right: 0;
|
||||
}
|
||||
tr {
|
||||
th {
|
||||
width: 250px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user