Browse Source

排产页面的排产 取消 分批排产

master
Rui_Li 4 years ago
parent
commit
b211b2510b
  1. 6
      src/api/schedule/order_schedule.js
  2. 2
      src/api/yieldReport/produce_report_normal.js
  3. 1
      src/icons/svg/icon-open-menu.svg
  4. 131
      src/views/modules/schedule/com_open_routing_menu.vue
  5. 119
      src/views/modules/schedule/com_open_schedule_menu.vue
  6. 9
      src/views/modules/schedule/com_split_schedule.vue
  7. 184
      src/views/modules/schedule/order_schedule.vue
  8. 11
      src/views/modules/yieldReport/com_produce_report_normal.vue
  9. 34
      src/views/modules/yieldReport/com_switch_operator.vue

6
src/api/schedule/order_schedule.js

@ -18,5 +18,11 @@ export const scheduleWorkOrder = data => createAPI('scheduling/scheduleWorkOrder
//取消排产生产工单的操作
export const cancelSoSchedule = data => createAPI('scheduling/cancelSoSchedule', 'POST', data)
//取消排产生产工单的操作
export const addWaitSchedule = data => createAPI('scheduling/addWaitSchedule', 'POST', data)
//重新排产生产工单的操作
export const reScheduleWorkOrders = data => createAPI('scheduling/reScheduleWorkOrders', 'POST', data)

2
src/api/yieldReport/produce_report_normal.js

@ -38,7 +38,7 @@ export const refreshWorkPlatformButtons = data => createAPI('schedule/refreshWor
export const checkScheduleButton = data => createAPI('schedule/checkScheduleButton', 'POST', data)
//测试是否可以创建sfdcRoll卷
export const checkCreateNewRoll = data => createAPI('schedule/checkCreateNewRoll', 'POST', data)
export const checkCreateNewSfdcRoll = data => createAPI('schedule/checkCreateNewSfdcRoll', 'POST', data)
//创建新卷号
export const createNewRoll = data => createAPI('schedule/createNewRoll', 'POST', data)

1
src/icons/svg/icon-open-menu.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1646126361695" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2246" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M192.037 287.953h640.124c17.673 0 32-14.327 32-32s-14.327-32-32-32H192.037c-17.673 0-32 14.327-32 32s14.327 32 32 32zM192.028 543.17h393.608c17.673 0 32-14.327 32-32s-14.327-32-32-32H192.028c-17.673 0-32 14.327-32 32s14.327 32 32 32zM832.161 735.802H192.037c-17.673 0-32 14.327-32 32s14.327 32 32 32h640.124c17.673 0 32-14.327 32-32s-14.327-32-32-32zM705.162 671.594l160-160-160-160z" fill="" p-id="2247"></path></svg>

131
src/views/modules/schedule/com_open_routing_menu.vue

@ -0,0 +1,131 @@
<template>
<div class="produce-report">
<el-dialog v-drag
width="320px" class="customer-dialog"
:title="titleCon" v-bind="$attrs" v-on="$listeners">
<el-form :inline="true" label-position="top" style="height: 330px;"
label-width="80px">
<!-- 菜单 -->
<fieldset class="customer-fieldset"
style="margin-left: 0px; margin-top: 10px; width: 300px; height: 320px;">
<el-form>
<el-form-item>
<el-button class="customer-bun-mid" type="primary" @click="choseMethod('splitSchedule')" style="margin-left: 20px; margin-top: 20px; margin-bottom: 25px;">
分批排产
</el-button>
</el-form-item>
<el-form-item>
<el-button class="customer-bun-mid" type="primary" @click="choseMethod('reSchedule')" style="margin-left: 20px; margin-top: 20px;">
重新排产
</el-button>
</el-form-item>
<el-form-item style="margin-top: 20px;">
<el-button class="customer-bun-mid" type="primary" @click="" style="margin-left: 20px; margin-bottom: 5px;">
开始调机
</el-button>
</el-form-item>
<el-form-item style="margin-top: 30px;">
<el-button class="customer-bun-mid" type="primary" @click="" style="margin-left: 20px; margin-bottom: 5px;">
开始生产
</el-button>
</el-form-item>
</el-form>
</fieldset>
</el-form>
</el-dialog>
</div>
</template>
<script>
/*生产过程的停机组件*/
export default {
name: "com_open_routing_menu",
data() {
return {
titleCon: '主表菜单',
pageData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
resourceId: '',
shiftNo: '',
partNo: '',
workCenterNo: '',
operatorId: ''
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
showFlag: false
},
}
},
methods: {
/*初始化页面的方法*/
init(routingRow){
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*选择方法 回调方法*/
choseMethod(methodName){
//
this.closeDialog();
//
this.$emit('initProcessRoutingMenu', methodName);
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
/deep/ .customer-tab .el-tabs__content {
padding: 0px !important;
}
/*当前按钮的通用样式*/
.customer-css .customer-bun-mid{
width: 60px;
text-align: center;
}
.customer-css .customer-bun-min{
width: 50px;
text-align: center;
}
.customer-css .customer-bun-max{
width: 80px;
text-align: center;
}
/*当前按钮的通用样式*/
.customer-css .el-button--medium {
padding: 5px 5px;
}
.customer-css .customer-roll-css span{
font-size: 16px;
color: #387877;
}
</style>

119
src/views/modules/schedule/com_open_schedule_menu.vue

@ -0,0 +1,119 @@
<template>
<div class="produce-report">
<el-dialog v-drag
width="320px" class="customer-dialog"
:title="titleCon" v-bind="$attrs" v-on="$listeners">
<el-form :inline="true" label-position="top" style="height: 330px;"
label-width="80px">
<!-- 菜单 -->
<fieldset class="customer-fieldset"
style="margin-left: 0px; margin-top: 10px; width: 300px; height: 320px;">
<el-form>
<el-form-item>
<el-button class="customer-bun-mid" type="primary" style="margin-left: 20px; margin-top: 20px; margin-bottom: 25px;">
分批排产
</el-button>
</el-form-item>
<el-form-item>
<el-button class="customer-bun-mid" type="primary" @click="" style="margin-left: 20px; margin-top: 20px;">
切换用户
</el-button>
</el-form-item>
<el-form-item style="margin-top: 20px;">
<el-button class="customer-bun-mid" type="primary" @click="" style="margin-left: 20px; margin-bottom: 5px;">
开始调机
</el-button>
</el-form-item>
<el-form-item style="margin-top: 30px;">
<el-button class="customer-bun-mid" type="primary" @click="" style="margin-left: 20px; margin-bottom: 5px;">
开始生产
</el-button>
</el-form-item>
</el-form>
</fieldset>
</el-form>
</el-dialog>
</div>
</template>
<script>
/*生产过程的停机组件*/
export default {
name: "com_open_schedule_menu",
data() {
return {
titleCon: '派工单菜单',
pageData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
resourceId: '',
shiftNo: '',
partNo: '',
workCenterNo: '',
operatorId: ''
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
showFlag: false
},
}
},
methods: {
/*初始化页面的方法*/
init(routingRow){
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
/deep/ .customer-tab .el-tabs__content {
padding: 0px !important;
}
/*当前按钮的通用样式*/
.customer-css .customer-bun-mid{
width: 60px;
text-align: center;
}
.customer-css .customer-bun-min{
width: 50px;
text-align: center;
}
.customer-css .customer-bun-max{
width: 80px;
text-align: center;
}
/*当前按钮的通用样式*/
.customer-css .el-button--medium {
padding: 5px 5px;
}
.customer-css .customer-roll-css span{
font-size: 16px;
color: #387877;
}
</style>

9
src/views/modules/schedule/com_split_schedule.vue

@ -1,20 +1,20 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="360px" style="height: 300px;" class="customer-dialog">
width="220px" style="height: 300px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 100px;"
label-width="80px">
<!-- 菜单信息 -->
<el-row>
<el-col :span="24" >
<el-form-item :label="'排产数量:'">
<el-input-number ref="scheduleQty" v-model="pageData.scheduleQty"></el-input-number>
<el-input ref="scheduleQty" controls-position="right" v-model="pageData.scheduleQty" min="0"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: -20px;">
<el-button type="primary" @click="addExceptionReason"> </el-button>
<el-button type="primary" @click="addSplitSchedule"> </el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
@ -37,6 +37,7 @@ export default {
methods: {
/*初始化页面参数*/
init(scheduleRow) {
this.titleCon = '工单:' + scheduleRow.orderNo + ',分批排产';
//
this.pageData.scheduleQty = scheduleRow.qtyToSchedule;
//
@ -51,7 +52,7 @@ export default {
this.$emit('update:visible', false);
},
/*添加异常原因的数据*/
/*添加分批排产数据*/
addSplitSchedule(){
//
let scheduleQty = this.pageData.scheduleQty;

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

@ -124,7 +124,7 @@
</el-input>
</el-form-item>
<el-form-item :label="''" style="text-align: center; margin-top: 15px; margin-bottom: 9px;">
<el-button type="primary" style="margin-left: 30px; margin-top: 10px; margin-bottom: 15px;">插入等待订单</el-button>
<el-button type="primary" @click="addWaitScheduleBun" style="margin-left: 30px; margin-top: 10px; margin-bottom: 15px;">插入等待订单</el-button>
</el-form-item>
</el-form>
</fieldset>
@ -162,11 +162,16 @@
<el-form :inline="true" label-position="top" label-width="100px">
<el-form-item :label="'主记录'">
</el-form-item>
<span @click="openRoutingMenuModal">
<icon-svg name="open-menu" style="height: 20px; width: 20px;"></icon-svg>
</span>
</el-form>
<el-table
height="120"
:data="shopOrderList"
border
ref="routingTable"
@row-click="setCurrentRoutingRow"
:row-class-name="routingRowClassName"
@row-dblclick="startScheduleOperation"
@ -195,7 +200,9 @@
<el-form :inline="true" label-position="top" label-width="100px">
<el-form-item :label="'明细记录'">
</el-form-item>
<i class="el-icon-unfold"></i>
<span @click="openScheduleMenuModal">
<icon-svg name="open-menu" style="height: 20px; width: 20px;" ></icon-svg>
</span>
</el-form>
<el-table
height="135"
@ -225,20 +232,53 @@
</el-table-column>
</el-table>
</el-main>
<!--列表的组件-->
<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">
</comSplitSchedule>
<!-- 分批排产的组件 -->
<comSplitSchedule ref="comSplitSchedule" :close-on-click-modal="false"
:visible.sync="showDownFlag"
:visible.sync="showSplitScheduleFlag"
@initAddSplitSchedule="initAddSplitSchedule">
</comSplitSchedule>
<!-- 分批排产的组件 -->
<comOpenRoutingMenu ref="comOpenRoutingMenu" :close-on-click-modal="false"
:visible.sync="showRoutingMenu"
@initProcessRoutingMenu="initProcessRoutingMenu">
</comOpenRoutingMenu>
<!-- 分批排产的组件 -->
<comOpenScheduleMenu ref="comOpenScheduleMenu" :close-on-click-modal="false"
:visible.sync="showScheduleMenu"
@initProcessScheduleMenu="initProcessScheduleMenu">
</comOpenScheduleMenu>
</div>
</template>
<script>
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
import comSplitSchedule from '@/views/modules/schedule/com_split_schedule';/*分批排产的modal*/
import comOpenRoutingMenu from "./com_open_routing_menu";/*工艺路线的菜单页面*/
import comOpenScheduleMenu from "./com_open_schedule_menu";/* 派工单的菜单*/
import {
getResourceRestList,
getShopOrderList,
@ -246,6 +286,8 @@ import {
getCurrentWorkCenterNoByResourceId,
scheduleWorkOrder,
cancelSoSchedule,
addWaitSchedule,
reScheduleWorkOrders,
} from '@/api/schedule/order_schedule.js'
export default {
@ -253,6 +295,9 @@ export default {
return {
height: 200,
tagNo: '',
showRoutingMenu: false,
showScheduleMenu: false,
showSplitScheduleFlag: false,
scheduleIndex: -1,
modelFlag: false,
modelInputFlag: true,
@ -275,6 +320,7 @@ export default {
scheduleTime: this.dayjs(new Date()).format('HH:mm:ss'),
specifiedTime: 'N',
scheduledQty: 0,
waitTimes: 0,
sortField: '',
status: 1
},
@ -1716,6 +1762,8 @@ export default {
/*组件*/
components: {
Chooselist,/*列表的组件*/
comOpenRoutingMenu,/* 工艺路线的菜单页面 */
comOpenScheduleMenu,/*派工单的菜单*/
comSplitSchedule,/* 分批排产的组件 */
},
@ -1725,6 +1773,7 @@ export default {
})
},
methods: {
/*获取机台班次信息的方法*/
getResourceShiftData() {
let queryData = {
site: this.$store.state.user.site,
@ -1737,12 +1786,16 @@ export default {
})
},
/*获取工单信息*/
getShopOrderList() {
getShopOrderList(this.pageData).then(({data}) => {
this.shopOrderList = data.rows
this.shopOrderList = data.rows;
//
this.currentRoutingRow = null;
})
},
/*获取派工单的信息*/
getOrderScheduleList() {
getOrderScheduleList(this.pageData).then(({data}) => {
this.orderScheduleList = data.rows;
@ -1751,6 +1804,8 @@ export default {
//
this.$refs.scheduleTable.setCurrentRow(this.$refs.scheduleTable.data[index]);
}
//
this.currentScheduleRow = null;
})
},
@ -1786,6 +1841,51 @@ export default {
})
},
/*打开routing操作菜单的页面*/
openRoutingMenuModal(){
//
this.showRoutingMenu = true;
//
this.$nextTick(() => {
this.$refs.comOpenRoutingMenu.init(this.currentRoutingRow);
});
},
/*打开派工单操作菜单的页面*/
openScheduleMenuModal(){
//
this.showScheduleMenu = true;
//
this.$nextTick(() => {
this.$refs.comOpenScheduleMenu.init(this.currentSchedlingRow);
});
},
/*区分不同的菜单 调用不同的方法 调用不同的方法*/
initProcessRoutingMenu(menuName){
//
if('splitSchedule' === menuName){
let routingRow = this.currentRoutingRow;
//
if(null == routingRow){
this.$message.error("请先单击选择行!")
return false;
}
//
this.showSplitScheduleFlag = true;
//
this.$refs.comSplitSchedule.init(this.currentRoutingRow);
}else if('reSchedule' === menuName){
this.initReScheduleWorkOrders();
}
},
/*区分不同的菜单 调用不同的方法 调用不同的方法*/
initProcessScheduleMenu(menuName){
},
/*获取当前的机台对应的加工中心*/
getCurrentWorkCenterNoByResourceId(){
getCurrentWorkCenterNoByResourceId(this.pageData).then(({data}) => {
@ -1812,6 +1912,7 @@ export default {
setCurrentRoutingRow(row, column, event) {
this.currentRoutingRow = JSON.parse(JSON.stringify(row));
},
/*开始排产的操作*/
startScheduleOperation(row, $event, column){
//
@ -1833,6 +1934,24 @@ export default {
this.scheduleWorkOrderOperation();
},
/*分批排产*/
initAddSplitSchedule(scheduledQty){
//
this.pageData.scheduledQty = scheduledQty;
//
//
if(this.pageData.workCenterNo == null || '' == this.pageData.workCenterNo){
this.$message.error('加工中心不能为空!')
return false;
}
if(this.pageData.resourceId == null || '' == this.pageData.resourceId){
this.$message.error('机台不能为空!')
return false;
}
//
this.scheduleWorkOrderOperation();
},
/*排产生产工单*/
scheduleWorkOrderOperation(){
scheduleWorkOrder(this.pageData).then(({data}) => {
@ -1887,11 +2006,62 @@ export default {
},
/*分批排产*/
initAddSplitSchedule(scheduledQty){
//
addWaitScheduleBun(){
//
let waitTimes = this.pageData.waitTimes;
if(waitTimes <= 0){
this.$message.error('等待时间必须大于零!')
return false;
}
//
//
if(this.pageData.workCenterNo == null || '' == this.pageData.workCenterNo){
this.$message.error('加工中心不能为空!')
return false;
}
if(this.pageData.resourceId == null || '' == this.pageData.resourceId){
this.$message.error('机台不能为空!')
return false;
}
//
this.addWaitScheduleOperation();
},
/*插入等待的派工单信息*/
addWaitScheduleOperation(){
addWaitSchedule(this.pageData).then(({data}) => {
if(data.code == 500){
this.$message.error(data.msg);
}else{
this.$message.info(data.msg);
//
this.getOrderScheduleList();
}
});
},
/*重新排产的方法*/
initReScheduleWorkOrders(){
//
if(this.pageData.workCenterNo == null || '' == this.pageData.workCenterNo){
this.$message.error('加工中心不能为空!')
return false;
}
if(this.pageData.resourceId == null || '' == this.pageData.resourceId){
this.$message.error('机台不能为空!')
return false;
}
reScheduleWorkOrders(this.pageData).then(({data}) => {
if(data.code == 500){
this.$message.error(data.msg);
}else{
this.$message.info(data.msg);
//
this.getOrderScheduleList();
}
});
},
},
created() {
//

11
src/views/modules/yieldReport/com_produce_report_normal.vue

@ -557,7 +557,7 @@ import {
getSfdcRollByCon,
refreshWorkPlatformButtons,
checkScheduleButton,
checkCreateNewRoll,
checkCreateNewSfdcRoll,
createNewRoll,
reopenSfdcRolls,/*重新打开卷操作*/
deleteSfdcRolls,/*删除sfdcRolls的操作*/
@ -3155,17 +3155,14 @@ export default {
createNewRollFun() {
//
this.scheduleData.operatorId = this.operatorData.operatorId;
checkCreateNewRoll(this.scheduleData).then(({data}) => {
//
let resultMap = data.resultMap;
//
if (resultMap.code == 200) {
checkCreateNewSfdcRoll(this.scheduleData).then(({data}) => {
if (data.code === 200) {
//
this.createNewRollDo();
} else {
//
this.buttonTags.createNewRollFlag = false;
this.$message.error(resultMap.msg)
this.$message.error(data.msg)
}
});
},

34
src/views/modules/yieldReport/com_switch_operator.vue

@ -29,13 +29,19 @@
</el-form-item>
</el-form>
<!--列表的组件-->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</el-dialog>
</template>
<script>
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
import {
getOperatorData,
} from '@/api/yieldReport/produce_order.js'
import comOpenRoutingMenu from "../schedule/com_open_routing_menu";
import comOpenScheduleMenu from "../schedule/com_open_schedule_menu";
export default {
name: "com_switch_operator",
data() {
@ -51,6 +57,10 @@ export default {
},
}
},
/*组件*/
components: {
Chooselist,/*列表的组件*/
},
methods: {
/*关闭modal*/
@ -75,10 +85,15 @@ export default {
},
//
saveOperatorData() {
//
let operatorId = this.operatorData.operatorId.trim();
if(operatorId == null || '' === operatorId){
this.$message.error('请输入操作员!');
return false;
}
getOperatorData(this.operatorData).then(({data}) => {
//
//
if(data.code == 500){
if(data.code === 500){
this.operatorData.operatorName = '';
this.$message.error(data.msg);
return false;
@ -89,7 +104,7 @@ export default {
}
let status = data.row.status;
//
if (status == 'N') {
if (status === 'N') {
this.operatorFlag = false;
} else {
this.operatorFlag = true;
@ -112,18 +127,18 @@ export default {
checkOperatorId(){
getOperatorData(this.operatorData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
if(data.code === 500){
//this.$message.error(data.msg);
this.operatorData.operatorName = '';
return false;
}else if(!data.row){
this.$message.error('账号有误!');
//this.$message.error('!');
this.operatorData.operatorName = '';
return false;
}
let status = data.row.status;
//
if (status == 'N') {
if (status === 'N') {
this.operatorFlag = false;
} else {
this.operatorFlag = true;
@ -131,10 +146,11 @@ export default {
//
this.operatorData.status = status;
if (!this.operatorFlag) {
this.$message.error('操作员信息不可用!');
//this.$message.error('!');
this.operatorData.operatorName = '';
}else{
this.operatorData.operatorName = data.row.operatorName;
}
this.operatorData.operatorName = data.row.operatorName;
});
},
},

Loading…
Cancel
Save