Commit d5ef3d13 authored by 沈翠玲's avatar 沈翠玲

生产排产增加取消排产按钮

parent ccaf510f
...@@ -64,6 +64,14 @@ export function getProtask(taskId) { ...@@ -64,6 +64,14 @@ export function getProtask(taskId) {
}); });
} }
// 取消排产
export function unschedule(arrangeCode) {
return request({
url: "/mes/pro/protask/unschedule/" + arrangeCode,
method: "get",
});
}
// 新增生产任务 // 新增生产任务
export function addProtask(data) { export function addProtask(data) {
return request({ return request({
......
...@@ -182,6 +182,15 @@ ...@@ -182,6 +182,15 @@
@click="handleVirtualReporting" @click="handleVirtualReporting"
>虚拟报工</el-button> >虚拟报工</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
:disabled='single'
@click="handleUnschedule"
>取消排产</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
...@@ -638,7 +647,7 @@ import { ...@@ -638,7 +647,7 @@ import {
getworkstationList, getworkstationList,
gettaskWorkunitList, gettaskWorkunitList,
getdefaultWorkCenterList} from '@/api/mes/pro/scheduleList' getdefaultWorkCenterList} from '@/api/mes/pro/scheduleList'
import {putProtaskSplit, splitWorkstation, deleteTask, updateProTaskWorkunitApi} from '@/api/mes/pro/protask' import {putProtaskSplit, splitWorkstation, deleteTask, unschedule, updateProTaskWorkunitApi} from '@/api/mes/pro/protask'
import BrandSelect from "@/components/TmTool/index.vue"; import BrandSelect from "@/components/TmTool/index.vue";
import shiftSelectMixin from '@/utils/shiftSelectMixin' import shiftSelectMixin from '@/utils/shiftSelectMixin'
import OrderList from './orderList.vue' import OrderList from './orderList.vue'
...@@ -837,6 +846,18 @@ export default { ...@@ -837,6 +846,18 @@ export default {
}); });
}) })
}, },
handleUnschedule(){
this.$modal
.confirm('是否取消排产')
.then( ()=> {
unschedule(this.selectedRows[0].arrangeCode).then(response => {
if(response.code === 200) {
this.$modal.msgSuccess("取消成功");
this.getList();
}
});
})
},
handleVirtualReporting() { handleVirtualReporting() {
const params = { const params = {
taskWorkunitId: this.selectedRows[0].taskWorkunitId, taskWorkunitId: this.selectedRows[0].taskWorkunitId,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment