ruanqi 3 years ago
parent
commit
09187dd031
  1. 2
      src/api/production/schedule.js
  2. 30
      src/views/modules/schedule/closeSchedule.vue

2
src/api/production/schedule.js

@ -26,3 +26,5 @@ export const toolReportCheck=data => createAPI(`schedule/toolReportCheck`, 'post
export const toolUseDetail=data => createAPI(`schedule/toolUseDetail`, 'post', data); export const toolUseDetail=data => createAPI(`schedule/toolUseDetail`, 'post', data);
export const updateSOSPrintFlag=data => createAPI(`schedule/updateSOSPrintFlag`, 'post', data); export const updateSOSPrintFlag=data => createAPI(`schedule/updateSOSPrintFlag`, 'post', data);
export const openSchedule=data => createAPI(`schedule/openSchedule`, 'post', data);

30
src/views/modules/schedule/closeSchedule.vue

@ -100,7 +100,8 @@
min-width="160" min-width="160"
label="操作"> label="操作">
<template slot-scope="scope" class="foo_container"> <template slot-scope="scope" class="foo_container">
<a v-if="scope.row.circulationSeqNo===null" type="text" size="small" @click="closeSchedule(scope.row)">关闭派工单</a>
<a v-if="scope.row.circulationSeqNo===null&&scope.row.closedFlag=='N'" type="text" size="small" @click="closeSchedule(scope.row)">关闭派工单</a>
<a v-if="scope.row.circulationSeqNo===null&&scope.row.closedFlag=='Y'" type="text" size="small" @click="openSchedule(scope.row)">打开派工单</a>
<span v-if="scope.row.circulationSeqNo!=null" size="small" >派工单已流转</span> <span v-if="scope.row.circulationSeqNo!=null" size="small" >派工单已流转</span>
<a v-if="scope.row.circulationSeqNo==null" type="text" size="small" @click="cancelJob(scope.row)">取消派工单</a> <a v-if="scope.row.circulationSeqNo==null" type="text" size="small" @click="cancelJob(scope.row)">取消派工单</a>
<a v-if="scope.row.circulationSeqNo===null" type="text" size="small" @click="circulation(scope.row)">流转</a> <a v-if="scope.row.circulationSeqNo===null" type="text" size="small" @click="circulation(scope.row)">流转</a>
@ -350,7 +351,8 @@
cancelJob, cancelJob,
getSOScheduleRoutingData, getSOScheduleRoutingData,
circulationSchedule, circulationSchedule,
closeSchedule
closeSchedule,
openSchedule
} from "@/api/production/schedule.js" } from "@/api/production/schedule.js"
import Chooselist from '@/views/modules/common/Chooselist' import Chooselist from '@/views/modules/common/Chooselist'
export default { export default {
@ -627,6 +629,30 @@
}) })
}) })
}, },
openSchedule(row){
this.$confirm(`确定打开此派工单`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
openSchedule(row).then(({data}) => {
if (data && data.code === 0) {
this.search();
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
getWorkCenterOperatorList(row){ getWorkCenterOperatorList(row){
let inData={ let inData={
site:row.site, site:row.site,

Loading…
Cancel
Save