diff --git a/src/views/mes/cal/calendar/calendarType.vue b/src/views/mes/cal/calendar/calendarType.vue
index 1f21f35..403f4de 100644
--- a/src/views/mes/cal/calendar/calendarType.vue
+++ b/src/views/mes/cal/calendar/calendarType.vue
@@ -62,22 +62,11 @@ export default {
workdayList:[],//工作日
selectedType:null,
calendarDayList:[
- {
- theDay:'2022-06-04',
- shiftType: 'SHIFT_TWO',
- teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}]
- },
- {
- theDay:'2022-06-13',
- shiftType: 'SHIFT_TWO',
- teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}]
- },
- {
- theDay:'2022-06-14',
- shiftType: 'SHIFT_THREE',
- teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}]
- }
],
+ teamShiftQueryParams:{
+ queryType:'TYPE',
+ calendarType: null
+ },
queryParams: {
theDay: null,
holidayType: null,
@@ -90,6 +79,12 @@ export default {
date:{
handler(newVal,oldVal){
console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate());
+ this.teamShiftQueryParams.date = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
+ this.loading = true;
+ listCalendars(this.teamShiftQueryParams).then(response =>{
+ this.calendarDayList = response.data;
+ this.loading = false;
+ });
}
}
},
@@ -119,11 +114,9 @@ export default {
//点击班组类型
onSelected(calType){
this.loading = true;
- var param = {
- queryType: 'TYPE',
- calendarType: calType
- }
- listCalendars(param).then(response =>{
+ this.teamShiftQueryParams.calendarType = calType;
+ this.teamShiftQueryParams.date = this.date;
+ listCalendars(this.teamShiftQueryParams).then(response =>{
this.calendarDayList = response.data;
this.loading = false;
});
diff --git a/src/views/mes/cal/calendar/person.vue b/src/views/mes/cal/calendar/person.vue
index 8b5a5ae..e68b5c8 100644
--- a/src/views/mes/cal/calendar/person.vue
+++ b/src/views/mes/cal/calendar/person.vue
@@ -71,22 +71,11 @@ export default {
selectedType:null,
form:{},
calendarDayList:[
- {
- theDay:'2022-06-04',
- shiftType: 'SHIFT_TWO',
- teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}]
- },
- {
- theDay:'2022-06-13',
- shiftType: 'SHIFT_TWO',
- teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}]
- },
- {
- theDay:'2022-06-14',
- shiftType: 'SHIFT_THREE',
- teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}]
- }
+
],
+ teamShiftQueryParams:{
+ queryType:'USER',
+ },
queryParams: {
theDay: null,
holidayType: null,
@@ -99,6 +88,12 @@ export default {
date:{
handler(newVal,oldVal){
console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate());
+ this.teamShiftQueryParams.date = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
+ this.loading = true;
+ listCalendars(this.teamShiftQueryParams).then(response =>{
+ this.calendarDayList = response.data;
+ this.loading = false;
+ });
}
}
},
@@ -133,11 +128,9 @@ export default {
onUserSelected(row){
this.form.nickName = row.nickName;
this.loading = true;
- var param = {
- queryType: 'USER',
- userId: row.userId
- }
- listCalendars(param).then(response =>{
+ this.teamShiftQueryParams.userId = row.userId;
+ this.teamShiftQueryParams.date = this.date;
+ listCalendars(this.teamShiftQueryParams).then(response =>{
this.calendarDayList = response.data;
this.loading = false;
});
diff --git a/src/views/mes/cal/calendar/team.vue b/src/views/mes/cal/calendar/team.vue
index cef1857..257f278 100644
--- a/src/views/mes/cal/calendar/team.vue
+++ b/src/views/mes/cal/calendar/team.vue
@@ -64,22 +64,10 @@ export default {
workdayList:[],//工作日
selectedType:null,
calendarDayList:[
- {
- theDay:'2022-06-04',
- shiftType: 'SHIFT_TWO',
- teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}]
- },
- {
- theDay:'2022-06-13',
- shiftType: 'SHIFT_TWO',
- teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}]
- },
- {
- theDay:'2022-06-14',
- shiftType: 'SHIFT_THREE',
- teamShifts:[{teamName: '注塑1组',shiftName:'白班',orderNum: 1},{teamName: '注塑2组',shiftName:'中班',orderNum: 2},{teamName: '注塑3组',shiftName:'晚班',orderNum: 3}]
- }
],
+ teamShiftQueryParams: {
+ queryType:'TEAM'
+ },
queryParams: {
theDay: null,
holidayType: null,
@@ -92,6 +80,12 @@ export default {
date:{
handler(newVal,oldVal){
console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate());
+ this.teamShiftQueryParams.date = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
+ this.loading = true;
+ listCalendars(this.teamShiftQueryParams).then(response =>{
+ this.calendarDayList = response.data;
+ this.loading = false;
+ });
}
}
},
@@ -127,11 +121,9 @@ export default {
//点击班组类型
onSelected(teamId){
this.loading = true;
- var param = {
- queryType: 'TEAM',
- teamId: teamId
- }
- listCalendars(param).then(response =>{
+ this.teamShiftQueryParams.teamId = teamId;
+ this.teamShiftQueryParams.date = this.date;
+ listCalendars(this.teamShiftQueryParams).then(response =>{
this.calendarDayList = response.data;
this.loading = false;
});
diff --git a/src/views/mes/cal/plan/index.vue b/src/views/mes/cal/plan/index.vue
index bcb31b2..83eff09 100644
--- a/src/views/mes/cal/plan/index.vue
+++ b/src/views/mes/cal/plan/index.vue
@@ -57,20 +57,9 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
- v-hasPermi="['cal:calplan:add']"
+ v-hasPermi="['mes:cal:calplan:add']"
>新增
-
- 修改
-
删除
@@ -89,7 +78,7 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
- v-hasPermi="['cal:calplan:export']"
+ v-hasPermi="['mes:cal:calplan:export']"
>导出
@@ -132,13 +121,18 @@
-
+
+
+
+
+
修改
@@ -146,6 +140,7 @@
size="mini"
type="text"
icon="el-icon-delete"
+ v-if="scope.row.status =='PREPARE'"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:cal:calplan:remove']"
>删除
@@ -162,7 +157,7 @@
/>
-
+
@@ -243,8 +238,8 @@
-
-
+
+
@@ -267,8 +262,9 @@
@@ -282,7 +278,7 @@ import Team from "./team";
import {genCode} from "@/api/system/autocode/rule"
export default {
name: "Calplan",
- dicts: ['mes_shift_method','mes_shift_type','mes_calendar_type'],
+ dicts: ['mes_shift_method','mes_shift_type','mes_calendar_type','mes_order_status'],
components: {Shift,Team},
data() {
return {
@@ -291,6 +287,7 @@ export default {
optType: undefined,
// 遮罩层
loading: true,
+ formLoading: false,
// 选中数组
ids: [],
// 非单个禁用
@@ -371,6 +368,7 @@ export default {
shiftType: 'SHIFT_TWO',
shiftMethod: 'MONTH',
shiftCount: 1,
+ status: "PREPARE",
remark: null,
attr1: null,
attr2: null,
@@ -429,7 +427,8 @@ export default {
});
},
/** 提交按钮 */
- submitForm() {
+ submitForm() {
+ this.formLoading = true;
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.planId != null) {
@@ -437,6 +436,7 @@ export default {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
+ this.formLoading = false;
});
} else {
addCalplan(this.form).then(response => {
@@ -458,6 +458,13 @@ export default {
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
+ handleFinish(){
+ let that = this;
+ this.$modal.confirm('是否完成计划编制?【完成后将不能更改】').then(function(){
+ that.form.status = 'CONFIRMED';
+ that.submitForm();
+ });
+ },
/** 导出按钮操作 */
handleExport() {
this.download('cal/calplan/export', {