Browse Source

排产的按钮

master
rui_li 4 years ago
parent
commit
1001b46b15
  1. 384
      src/views/modules/common/com_work_calendar_out.vue
  2. 82
      src/views/modules/schedule/order_schedule.vue

384
src/views/modules/common/com_work_calendar_out.vue

@ -0,0 +1,384 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="800px" style="height: 560px;" class="customer-dialog">
<el-container cus style="height: 355px;">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -5px;">
<el-form-item :label="'工厂编号:'">
<el-input v-model="pageData.site" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'日历编码:'">
<el-input v-model="pageData.calendarId" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'日历描述:'">
<el-input v-model="pageData.calendarDesc" style="width: 130px"></el-input>
</el-form-item>
<el-table
height="300"
:data="calendarList"
border
style="width: 765px;">
<!-- <el-table-column
header-align="center"
align="center"
width="50"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="shiftModal(scope.row)">班次</a>
</template>
</el-table-column>-->
<el-table-column
v-for="(item,index) in columnCalendarOutArray" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</el-form>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getCalendarExceptionData,
}from "@/api/base.js"
export default {
data() {
return {
titleCon: '工作日历外',
calendarList: [],
columnCalendarOutArray: [
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Scheduledate',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "scheduledate",
headerAlign: "center",
align: "left",
columnLabel: "日期",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Datetype',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "datetype",
headerAlign: "center",
align: "left",
columnLabel: "工作日类型",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Worktime',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "worktime",
headerAlign: "center",
align: "right",
columnLabel: "累计工作时间",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Exceptexacttime1',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "exceptexacttime1",
headerAlign: "center",
align: "left",
columnLabel: "休息时间点1",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Exceptduration1',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "exceptduration1",
headerAlign: "center",
align: "right",
columnLabel: "休息时长1",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Exceptexacttime2',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "exceptexacttime2",
headerAlign: "center",
align: "left",
columnLabel: "休息时间点2",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Exceptduration2',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "exceptduration2",
headerAlign: "center",
align: "right",
columnLabel: "休息时长2",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Exceptexacttime3',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "exceptexacttime3",
headerAlign: "center",
align: "left",
columnLabel: "休息时间点3",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Exceptduration3',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "exceptduration3",
headerAlign: "center",
align: "right",
columnLabel: "休息时长3",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Exceptexacttime4',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "exceptexacttime4",
headerAlign: "center",
align: "left",
columnLabel: "休息时间点4",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Exceptduration4',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "exceptduration4",
headerAlign: "center",
align: "right",
columnLabel: "休息时长4",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Exceptexacttime5',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "exceptexacttime5",
headerAlign: "center",
align: "left",
columnLabel: "休息时间点5",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Exceptduration5',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "exceptduration5",
headerAlign: "center",
align: "right",
columnLabel: "休息时长5",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Exceptexacttime6',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "exceptexacttime6",
headerAlign: "center",
align: "left",
columnLabel: "休息时间点6",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6038,
serialNumber: '6038Table2Exceptduration6',
tableId: "6038Table2",
tableName: "工作日历表2",
columnProp: "exceptduration6",
headerAlign: "center",
align: "right",
columnLabel: "休息时长6",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 100
}
],
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
calendarId: '',
calendarDesc: '',
scheduleDate: '',
},
dataListLoading: false,
}
},
methods: {
//
init(requestData) {
//
this.pageData.calendarId = requestData.calendarId;
this.pageData.calendarDesc = requestData.calendarDesc;
this.pageData.scheduledDate = requestData.scheduledDate;
//
this.refreshPageTable();
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*刷新页面的参数*/
refreshPageTable(){
getCalendarExceptionData(this.pageData).then(({data}) => {
this.calendarList = data.rows
})
},
},
created() {
}
}
</script>
<style scoped lang="scss">
.customer-css /deep/ .el-table__header th.is-leaf{
line-height: 16px;
}
</style>

82
src/views/modules/schedule/order_schedule.vue

@ -167,11 +167,13 @@
<el-form :inline="true" label-position="top" label-width="100px">
<el-form-item :label="'主记录'">
</el-form-item>
<el-dropdown class="customer-dropdown" @command="handleCommand">
<el-button type="primary">
<el-dropdown class="customer-dropdown" size="mini" @command="handleCommand">
<el-button type="primary" @click="controlPrimaryMenuBun">
主菜单<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item class="customer-li" command="生产工单" :disabled="primaryMenuButton.shopOrderFlag">生产订单</el-dropdown-item>
<el-dropdown-item class="customer-li" command="工作日历" :disabled="primaryMenuButton.workCalendarFlag">工作日历</el-dropdown-item>
<el-dropdown-item class="customer-li" command="分批排产">分批排产</el-dropdown-item>
<el-dropdown-item class="customer-li" command="重新排产">重新排产</el-dropdown-item>
</el-dropdown-menu>
@ -247,21 +249,20 @@
<!--列表的组件-->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- routing的menu -->
<!-- 分批排产的组件 -->
<comSplitSchedule ref="comSplitSchedule" :close-on-click-modal="false"
:visible.sync="showSplitScheduleFlag"
@initAddSplitSchedule="initAddSplitSchedule">
</comSplitSchedule>
<!-- schedule的menu -->
<comSplitSchedule ref="comSplitSchedule" :close-on-click-modal="false"
:visible.sync="showSplitScheduleFlag"
@initAddSplitSchedule="initAddSplitSchedule">
<!-- 工作日历外的组件 -->
<comWorkCalendarOut ref="comWorkCalendarOut" :close-on-click-modal="false"
:visible.sync="showWorkCalendarOut">
</comSplitSchedule>
</comWorkCalendarOut>
<!-- 分批排产的组件 -->
<!-- 批量工作日历的组件 -->
<comSplitSchedule ref="comSplitSchedule" :close-on-click-modal="false"
:visible.sync="showSplitScheduleFlag"
@initAddSplitSchedule="initAddSplitSchedule">
@ -276,6 +277,7 @@
<script>
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
import comSplitSchedule from '@/views/modules/schedule/com_split_schedule';/*分批排产的modal*/
import comWorkCalendarOut from "../common/com_work_calendar_out";/*工作日历外组件*/
import {
getResourceRestList,
getShopOrderList,
@ -294,7 +296,7 @@ export default {
return {
height: 200,
tagNo: '',
showRoutingMenu: false,
showWorkCalendarOut: false,
showScheduleMenu: false,
showSplitScheduleFlag: false,
scheduleIndex: -1,
@ -322,6 +324,8 @@ export default {
waitTimes: 0,
scheduleSeqNo: 0,
planStartTime: '',
calendarId: '',
calendarDesc: '',
status: 1
},
resourceShiftList: [],
@ -1720,6 +1724,14 @@ export default {
fixed: false
}
],
calendarOutList: [],
primaryMenuButton: {
shopOrderFlag: true,
workCalendarOutFlag: true,
closedButton: true,
pauseButton: true,
openReverseButton: true
}
}
},
@ -1727,6 +1739,7 @@ export default {
components: {
Chooselist,/*列表的组件*/
comSplitSchedule,/* 分批排产的组件 */
comWorkCalendarOut,/*工作日历外组件*/
},
mounted() {
@ -1745,6 +1758,8 @@ export default {
}
getResourceRestList(queryData).then(({data}) => {
this.resourceShiftList = data.rows
this.pageData.calendarId = data.calendarRow.calendarId;
this.pageData.calendarDesc = data.calendarRow.calendarDesc;
})
},
@ -1808,7 +1823,35 @@ export default {
/*区分不同的菜单 调用不同的方法 调用不同的方法*/
handleCommand(menuName){
//
if('分批排产' === menuName){
if('生产工单' === menuName){
//
if(this.currentRoutingRow == null || this.currentRoutingRow == {}){
//
this.primaryMenuButton.shopOrderFlag = true;
//
this.$message.error('请选择工单!');
return false;
}
this.$router.push('/shopOrder-shopOrder/shopOrder', this.currentRoutingRow.orderNo)
}else if('工作日历' === menuName){
//
if(this.currentRoutingRow == null || this.currentRoutingRow == {}){
//
this.primaryMenuButton.workCalendarOutFlag = true;
//
this.$message.error('请选择工单!');
return false;
}
let tempData = {'site': this.pageData.site, 'calendarId': this.pageData.calendarId,
'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate};
//
this.$nextTick(() => {
debugger;
this.showWorkCalendarOut = true;
this.$refs.comWorkCalendarOut.init(tempData);
})
}else if('分批排产' === menuName){
this.openSplitScheduleModal();
}else if('重新排产' === menuName){
//
@ -2123,6 +2166,18 @@ export default {
});
},
/*判断主菜单的样式*/
controlPrimaryMenuBun(){
//
if(this.currentRoutingRow == null || this.currentRoutingRow == {}){
this.primaryMenuButton.shopOrderFlag = true;
this.primaryMenuButton.workCalendarOutFlag = true;
}else{
this.primaryMenuButton.shopOrderFlag = false;
this.primaryMenuButton.workCalendarOutFlag = false;
}
},
},
created() {
//
@ -2229,8 +2284,11 @@ div.customer-el-card-blue {
font-size: 12px;
}
/*设置间距*/
.el-dropdown-menu /deep/ li.customer-li{
font-size: 10px;
font-size: 12px;
height: 20px;
padding: 4px 8px;
}
.el-input /deep/ .el-icon-time{

Loading…
Cancel
Save