排产看板提交

dev-scheduling
zhangdi 2 months ago
parent 3e50397283
commit a08c781575
  1. 9
      src/api/productionSchedulingPlan/scheduling.js
  2. 15
      src/views/productionSchedulingPlan/schedulingDashboard/container.vue
  3. 46
      src/views/productionSchedulingPlan/schedulingException/index.vue

@ -49,4 +49,13 @@ export const selectEquip = row => {
method: 'get', method: 'get',
params: row, params: row,
}); });
};
// 排产恢复 recoveryUpdate
export const recoveryUpdate = row => {
return request({
url: '/blade-scheduling/workOrder/saveWorkOrderFromBak/' + row,
method: 'get',
// data: row,
});
}; };

@ -1328,16 +1328,15 @@ export default {
}, },
// //
getStatusColor(row) { getStatusColor(row) {
if (row.planStatus === '1') { if (row.remindStatus == '1') {
if (row.remindStatus === '1') { return '#FFD700'; //
return '#FFD700'; // } else if (row.remindStatus == '2') {
} else if (row.remindStatus === '2') { return '#dc3545'; //
return '#dc3545'; //
}
// remindStatus
return '#6c757d';
} }
switch (row.planStatus) { switch (row.planStatus) {
case '1':
return '#6c757d';
case '5': case '5':
return '#007bff'; return '#007bff';
case '2': case '2':

@ -16,21 +16,25 @@
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
> >
<template #menu="scope"> <template #menu="scope">
<el-button <el-button
v-if="$route.path == '/productionSchedulingPlan/schedulingException/index'&&scope.row.errorInfo.indexOf('设备资源')>-1" v-if="
$route.path == '/productionSchedulingPlan/schedulingException/index' &&
scope.row.errorInfo.indexOf('设备资源') > -1
"
type="text" type="text"
size="mini" size="mini"
@click="handleFn(scope.row)" @click="handleFn(scope.row)"
>处理</el-button> >处理</el-button
>
<el-button type="text" size="mini" @click="recoveryFn(scope.row)">恢复</el-button>
</template> </template>
</avue-crud> </avue-crud>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import { getYieldOrderList } from '@/api/productionSchedulingPlan/scheduling'; import { getYieldOrderList,recoveryUpdate } from '@/api/productionSchedulingPlan/scheduling';
export default { export default {
components: {}, components: {},
@ -83,7 +87,7 @@ export default {
delBtn: false, delBtn: false,
editBtnText: '修改', editBtnText: '修改',
labelWidth: 120, labelWidth: 120,
menuWidth: 80, menuWidth: 120,
dialogWidth: 900, dialogWidth: 900,
dialogClickModal: false, dialogClickModal: false,
searchEnter: true, searchEnter: true,
@ -287,15 +291,31 @@ export default {
}; };
}, },
methods: { methods: {
handleFn(row){ handleFn(row) {
if(row.errorInfo.indexOf('设备资源')>-1){ if (row.errorInfo.indexOf('设备资源') > -1) {
this.$router.push({path:'/productionSchedulingPlan/basic/equipmentCapacity'}) this.$router.push({ path: '/productionSchedulingPlan/basic/equipmentCapacity' });
} }
if(row.errorInfo.indexOf('工序信息不完整')>-1){ if (row.errorInfo.indexOf('工序信息不完整') > -1) {
this.$router.push({path:'/productionSchedulingPlan/basic/process'}) this.$router.push({ path: '/productionSchedulingPlan/basic/process' });
} }
},
recoveryFn(row){
this.$confirm('确定要将数据恢复排产吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.loading = true;
return recoveryUpdate(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
});
}, },
searchReset() { searchReset() {
this.query = {}; this.query = {};

Loading…
Cancel
Save