Commit 88f7e048 authored by 李驰骋's avatar 李驰骋

Merge remote-tracking branch 'origin/dev' into dev

parents 52b64cfb 20fb9968
......@@ -9,12 +9,12 @@ export function listTeam(query) {
})
}
// 查询班组列表
// 查询工作单元列表
export function listAllTeam() {
return request({
url: '/mes/cal/team/listAll',
method: 'get'
})
url: "/md/cal/workunit/calWorkunitList",
method: "get",
});
}
// 查询班组详细
......
<template>
<div class="app-container">
<el-container>
<!-- <el-aside width="200px">
<el-radio-group v-model="selectedType" class="x-fillitem el-group-list" @change="onSelected">
<el-radio-button
v-for="dict in dict.type.mes_calendar_type"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio-button>
</el-radio-group>
</el-aside> -->
<el-main>
<el-calendar v-loading="loading" v-model="date">
<template slot="dateCell" slot-scope="{date, data }">
<div>
<el-row>
<el-col :span="6">
<div class="solar">
{{ data.day.split('-')[2] }}
</div>
</el-col>
<el-col :span="12">
<div class="lunar" :class="{ festival : isFestival(date, data) }">{{ solarDate2lunar(data.day) }}</div>
</el-col>
<el-col :span="6">
<el-tag v-if="holidayList.indexOf(data.day) ==-1" effect="dark"></el-tag>
<el-tag v-else effect="dark" type="success"></el-tag>
</el-col>
</el-row>
<el-row v-for="calendarDay in calendarDayList " :key="calendarDay.theDay">
<el-col :span="24" v-if="calendarDay.theDay == data.day && holidayList.indexOf(data.day) ==-1">
<div v-for="teamShift in calendarDay.teamShifts" :key="teamShift.orderNum" class="grid-content">
<el-button v-if="teamShift.orderNum == 1" type="success" icon="el-icon-sunrise">{{ teamShift.teamName }}</el-button>
<el-button v-if="teamShift.orderNum ==2 && calendarDay.shiftType=='SHIFT_THREE'" type="warning" icon="el-icon-sunny">{{ teamShift.teamName }}</el-button>
<el-button v-if="teamShift.orderNum ==2 && calendarDay.shiftType=='SHIFT_TWO'" type="info" icon="el-icon-moon">{{ teamShift.teamName }}</el-button>
<el-button v-if="teamShift.orderNum ==3 && calendarDay.shiftType=='SHIFT_THREE'" type="info" icon="el-icon-moon">{{ teamShift.teamName }}</el-button>
</div>
</el-col>
</el-row>
</div>
</template>
</el-calendar>
</el-main>
<el-main>
<el-calendar v-loading="loading" v-model="date">
<template slot="dateCell" slot-scope="{date, data }">
<div>
<el-row>
<el-col :span="6">
<div class="solar">
{{ data.day.split('-')[2] }}
</div>
</el-col>
<el-col :span="12">
<div class="lunar" :class="{ festival : isFestival(date, data) }">{{ solarDate2lunar(data.day) }}</div>
</el-col>
<el-col :span="6">
<el-tag v-if="holidayList.indexOf(data.day) ==-1" effect="dark"></el-tag>
<el-tag v-else effect="dark" type="success"></el-tag>
</el-col>
</el-row>
<el-row v-for="calendarDay in calendarDayList " :key="calendarDay.theDay">
<el-col :span="24" v-if="calendarDay.theDay == data.day && holidayList.indexOf(data.day) ==-1">
<div v-for="(teamShift,index) in calendarDay.calPlanWorkunitList" :key="index" class="grid-content">
<el-button type="success" icon="el-icon-sunrise">{{ teamShift.workunitName }}</el-button>
</div>
</el-col>
</el-row>
</div>
</template>
</el-calendar>
</el-main>
</el-container>
</div>
</template>
......@@ -52,7 +40,6 @@ import { listCalendars } from "@/api/mes/cal/calendar";
import calendar from '@/utils/calendar';
export default {
name: 'CalendarTypeView',
dicts:['mes_calendar_type'],
data(){
return {
// 遮罩层
......@@ -64,8 +51,7 @@ export default {
calendarDayList:[
],
teamShiftQueryParams:{
queryType:'TYPE',
calendarType: null
isWork: 1
},
queryParams: {
theDay: null,
......@@ -76,17 +62,17 @@ export default {
}
},
watch:{
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;
});
}
}
date:{
handler(newVal,oldVal){
console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate());
this.teamShiftQueryParams.theDay = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
this.loading = true;
listCalendars(this.teamShiftQueryParams).then(response =>{
this.calendarDayList = response.data;
this.loading = false;
});
}
}
},
created() {
this.getList();
......@@ -111,16 +97,6 @@ export default {
}
});
},
//点击班组类型
onSelected(calType){
this.loading = true;
this.teamShiftQueryParams.calendarType = calType;
this.teamShiftQueryParams.date = this.date;
listCalendars(this.teamShiftQueryParams).then(response =>{
this.calendarDayList = response.data;
this.loading = false;
});
},
isFestival(slotDate, slotData) {
let solarDayArr = slotData.day.split('-');
let lunarDay = calendar.solar2lunar(solarDayArr[0], solarDayArr[1], solarDayArr[2])
......
......@@ -4,10 +4,10 @@
<el-aside width="200px">
<el-radio-group v-model="selectedType" class="x-fillitem el-group-list" @change="onSelected">
<el-radio-button
v-for="item in teamList"
:key="item.teamId"
:label="item.teamId"
>{{item.teamName}}</el-radio-button>
v-for="(item, index) in teamList"
:key="index"
:label="item"
>{{item}}</el-radio-button>
</el-radio-group>
</el-aside>
<el-main>
......@@ -30,11 +30,8 @@
</el-row>
<el-row v-for="calendarDay in calendarDayList " :key="calendarDay.theDay">
<el-col :span="24" v-if="calendarDay.theDay == data.day && holidayList.indexOf(data.day) ==-1">
<div v-for="teamShift in calendarDay.teamShifts" :key="teamShift.orderNum" class="grid-content">
<el-button v-if="teamShift.orderNum == 1" type="success" icon="el-icon-sunrise">{{ teamShift.teamName }}</el-button>
<el-button v-if="teamShift.orderNum ==2 && calendarDay.shiftType=='SHIFT_THREE'" type="warning" icon="el-icon-sunny">{{ teamShift.teamName }}</el-button>
<el-button v-if="teamShift.orderNum ==2 && calendarDay.shiftType=='SHIFT_TWO'" type="info" icon="el-icon-moon">{{ teamShift.teamName }}</el-button>
<el-button v-if="teamShift.orderNum ==3 && calendarDay.shiftType=='SHIFT_THREE'" type="info" icon="el-icon-moon">{{ teamShift.teamName }}</el-button>
<div v-for="(teamShift,index) in calendarDay.calPlanWorkunitList" :key="index" class="grid-content">
<el-button type="success" icon="el-icon-sunrise">{{ teamShift.workunitName }}</el-button>
</div>
</el-col>
</el-row>
......@@ -53,7 +50,6 @@ import { listCalendars } from "@/api/mes/cal/calendar";
import calendar from '@/utils/calendar';
export default {
name: 'TeamView',
dicts:['mes_calendar_type'],
data(){
return {
// 遮罩层
......@@ -66,26 +62,26 @@ export default {
calendarDayList:[
],
teamShiftQueryParams: {
queryType:'TEAM'
isWork: 1
},
queryParams: {
theDay: null,
holidayType: null,
startTime: null,
endTime: null,
},
}
}
},
watch:{
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;
});
console.log(newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate());
this.teamShiftQueryParams.theDay = newVal.getFullYear()+'-'+(newVal.getMonth()+1)+'-'+newVal.getDate();
this.loading = true;
listCalendars(this.teamShiftQueryParams).then(response =>{
this.calendarDayList = response.data;
this.loading = false;
});
}
}
},
......@@ -121,8 +117,8 @@ export default {
//点击班组类型
onSelected(teamId){
this.loading = true;
this.teamShiftQueryParams.teamId = teamId;
this.teamShiftQueryParams.date = this.date;
this.teamShiftQueryParams.workunitName = teamId;
this.teamShiftQueryParams.theDay = this.date.getFullYear()+'-'+(this.date.getMonth()+1)+'-'+this.date.getDate();
listCalendars(this.teamShiftQueryParams).then(response =>{
this.calendarDayList = response.data;
this.loading = false;
......
......@@ -59,8 +59,7 @@
</template>
<script>
import { listItem, getTmToolRequestItem, delTmToolRequestItem, addTmToolRequestItem, updateTmToolRequestItem } from "@/api/mes/cal/calholiday";
import { getTaskIdMaxProcessTool } from "@/api/mes/pro/protask";
import { listItem } from "@/api/mes/cal/calholiday";
export default {
name: "TmToolRequestItem",
......@@ -119,19 +118,6 @@ export default {
created() {
},
methods: {
onItemSelect(list){
// console.log(list, 'list')
this.addList = list.map(item => {
return {
itemId:item.itemId,
itemName:item.itemName,
allQuantity: 1,
nextMaintenPeriod: Number(this.$attrs.quantity)
}
})
this.tmToolRequestItemList = this.detailList.concat(this.addList)
this.$emit('sum')
},
/** 查询刀模板物料申请单列表 */
getList() {
this.loading = true;
......@@ -166,58 +152,6 @@ export default {
handleSelectionChange(selection) {
this.ids = selection.map(item => item.toolRequestItemId)
this.selectRow = selection
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加刀模板物料申请单";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const toolRequestItemId = row.toolRequestItemId || this.ids
getTmToolRequestItem(toolRequestItemId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改刀模板物料申请单";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.toolRequestItemId != null) {
updateTmToolRequestItem(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addTmToolRequestItem(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const toolRequestItemIds = row.toolRequestItemId || this.ids;
this.$modal.confirm('是否确认删除刀模板物料申请单编号为"' + toolRequestItemIds + '"的数据项?').then(function() {
return delTmToolRequestItem(toolRequestItemIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('tm/tmToolRequestItem/export', {
...this.queryParams
}, `tmToolRequestItem_${new Date().getTime()}.xlsx`)
}
}
};
......
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