排产看板提交

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',
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) {
if (row.planStatus === '1') {
if (row.remindStatus === '1') {
return '#FFD700'; //
} else if (row.remindStatus === '2') {
return '#dc3545'; //
}
// remindStatus
return '#6c757d';
if (row.remindStatus == '1') {
return '#FFD700'; //
} else if (row.remindStatus == '2') {
return '#dc3545'; //
}
switch (row.planStatus) {
case '1':
return '#6c757d';
case '5':
return '#007bff';
case '2':

@ -16,21 +16,25 @@
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu="scope">
<template #menu="scope">
<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"
size="mini"
@click="handleFn(scope.row)"
>处理</el-button>
>处理</el-button
>
<el-button type="text" size="mini" @click="recoveryFn(scope.row)">恢复</el-button>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import { getYieldOrderList } from '@/api/productionSchedulingPlan/scheduling';
import { getYieldOrderList,recoveryUpdate } from '@/api/productionSchedulingPlan/scheduling';
export default {
components: {},
@ -83,7 +87,7 @@ export default {
delBtn: false,
editBtnText: '修改',
labelWidth: 120,
menuWidth: 80,
menuWidth: 120,
dialogWidth: 900,
dialogClickModal: false,
searchEnter: true,
@ -287,15 +291,31 @@ export default {
};
},
methods: {
handleFn(row){
if(row.errorInfo.indexOf('设备资源')>-1){
this.$router.push({path:'/productionSchedulingPlan/basic/equipmentCapacity'})
handleFn(row) {
if (row.errorInfo.indexOf('设备资源') > -1) {
this.$router.push({ path: '/productionSchedulingPlan/basic/equipmentCapacity' });
}
if(row.errorInfo.indexOf('工序信息不完整')>-1){
this.$router.push({path:'/productionSchedulingPlan/basic/process'})
if (row.errorInfo.indexOf('工序信息不完整') > -1) {
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() {
this.query = {};

Loading…
Cancel
Save