Commit 92179471 authored by 张海景's avatar 张海景

update:修改节假日设置和排班计划

parent feaad019
...@@ -46,11 +46,11 @@ ...@@ -46,11 +46,11 @@
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> --> </el-dialog> -->
<el-dialog :title="title" :visible.sync="open" width="1300px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1400px" append-to-body>
<item-index ref="itemIndex" v-if="open" optType="add" :theDay="theDay"></item-index> <item-index ref="itemIndex" v-if="open" optType="add" :theDay="theDay"></item-index>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" v-hasPermi="['mes:cal:calholiday:edit']" @click="submitForm(2)">放 假</el-button> <el-button type="primary" v-hasPermi="['mes:cal:calholiday:edit']" @click="submitForm(2)">放 假</el-button>
<el-button type="primary" v-hasPermi="['mes:cal:calholiday:edit']" @click="submitForm(1)">加 班</el-button> <!-- <el-button type="primary" v-hasPermi="['mes:cal:calholiday:edit']" @click="submitForm(1)">加 班</el-button> -->
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
......
...@@ -10,20 +10,19 @@ ...@@ -10,20 +10,19 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="工作状态" prop="isWork"> <el-form-item label="班次" prop="shiftName">
<el-select <el-select
v-model="queryParams.isWork" v-model="queryParams.shiftName"
placeholder="请选择工作状态"
clearable clearable
placeholder="请选择班次"
> >
<el-option <el-option
label="工作" v-for="dict in dict.type.SHIFT_TYPE"
value="1" :key="dict.value"
/> :label="dict.label"
<el-option :value="dict.label"
label="休息" >
value="2" </el-option>
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -36,6 +35,7 @@ ...@@ -36,6 +35,7 @@
<el-table-column label="工作单元ID" align="center" prop="workunitId" /> <el-table-column label="工作单元ID" align="center" prop="workunitId" />
<el-table-column label="工作单元编码" align="center" prop="workunitCode" /> <el-table-column label="工作单元编码" align="center" prop="workunitCode" />
<el-table-column label="工作单元名称" align="center" prop="workunitName" /> <el-table-column label="工作单元名称" align="center" prop="workunitName" />
<el-table-column label="班次" align="center" prop="shiftName" />
<el-table-column label="工作状态" align="center" prop="isWork" > <el-table-column label="工作状态" align="center" prop="isWork" >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isWork == '1'? '工作': '休息' }} {{ scope.row.isWork == '1'? '工作': '休息' }}
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
import { listItem } from "@/api/mes/cal/calholiday"; import { listItem } from "@/api/mes/cal/calholiday";
export default { export default {
dicts: ['SHIFT_TYPE'],
name: "TmToolRequestItem", name: "TmToolRequestItem",
components: {}, components: {},
props:{ props:{
...@@ -91,8 +92,8 @@ export default { ...@@ -91,8 +92,8 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
workunitId: null, shiftName: null,
isWork: null, isWork: 1,
theDay: this.theDay theDay: this.theDay
}, },
// 表单参数 // 表单参数
...@@ -130,14 +131,14 @@ export default { ...@@ -130,14 +131,14 @@ export default {
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false; this.open = false;
this.reset(); // this.reset();
},
// 表单重置
reset() {
this.form = {
toolRequestItemId: null, toolRequestId: null, itemId: null, allQuantity: null, nextMaintenPeriod: null, createBy: null, createTime: null, updateBy: null, updateTime: null };
this.resetForm("form");
}, },
// // 表单重置
// reset() {
// this.form = {
// toolRequestItemId: null, toolRequestId: null, itemId: null, allQuantity: null, nextMaintenPeriod: null, createBy: null, createTime: null, updateBy: null, updateTime: null };
// this.resetForm("form");
// },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
......
...@@ -195,7 +195,8 @@ ...@@ -195,7 +195,8 @@
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="轮班方式"> <el-form-item label="轮班方式">
<el-radio-group v-model="form.shiftType"> <el-radio-group v-model="form.shiftType"
:disabled="optType === 'view'">
<el-radio <el-radio
v-for="dict in dict.type.mes_shift_type" v-for="dict in dict.type.mes_shift_type"
:key="dict.value" :key="dict.value"
...@@ -340,10 +341,8 @@ export default { ...@@ -340,10 +341,8 @@ export default {
calendarType:null, calendarType:null,
startDate: null, startDate: null,
endDate: null, endDate: null,
shiftType: 'SHIFT_TWO', shiftType: '',
shiftMethod: 'MONTH', status: "",
shiftCount: 1,
status: "PREPARE",
remark: null, remark: null,
saturday: null, saturday: null,
sunday: null, sunday: null,
...@@ -369,6 +368,8 @@ export default { ...@@ -369,6 +368,8 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.form.shiftType = 'SHIFT_TWO'
this.form.status = "PREPARE",
this.open = true; this.open = true;
this.title = "添加排班计划"; this.title = "添加排班计划";
this.handleAutoGenChange() this.handleAutoGenChange()
......
...@@ -41,7 +41,19 @@ ...@@ -41,7 +41,19 @@
</el-col> --> </el-col> -->
<el-col :span="12"> <el-col :span="12">
<el-form-item label="班次名称" prop="shiftName"> <el-form-item label="班次名称" prop="shiftName">
<el-input v-model="form.shiftName" placeholder="请输入班次名称" /> <el-select
v-model="form.shiftName"
clearable
placeholder="请选择班次"
>
<el-option
v-for="dict in dict.type.SHIFT_TYPE"
:key="dict.value"
:label="dict.label"
:value="dict.label"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -110,6 +122,7 @@ import { listShift, listEditShift } from "@/api/mes/cal/shift"; ...@@ -110,6 +122,7 @@ import { listShift, listEditShift } from "@/api/mes/cal/shift";
export default { export default {
name: "Shift", name: "Shift",
dicts: ['SHIFT_TYPE'],
props: { props: {
shiftType: null, shiftType: null,
planId: null, planId: null,
...@@ -119,17 +132,23 @@ export default { ...@@ -119,17 +132,23 @@ export default {
// 根据名称筛选分类树 // 根据名称筛选分类树
shiftType: { shiftType: {
handler (newName, oldName) { handler (newName, oldName) {
if (newName&&this.optType === 'add'&& !this.plan) { console.log(newName, 'shiftType')
if (newName) {
if (this.planId&&!this.editShiftType) {
this.getEditList();
} else if ((this.optType === 'view' || this.optType === 'edit')&&(this.editShiftType && this.editShiftType === newName)) {
this.getEditList();
} else {
this.getList(); this.getList();
console.log(889999) }
} }
}, },
immediate: true immediate: true
}, },
planId: { planId: {
handler (newName, oldName) { handler (newName, oldName) {
if (newName&&this.optType === 'edit') { if (newName) {
this.getEditList(); this.editShiftType = this.shiftType
} }
}, },
immediate: true immediate: true
...@@ -137,6 +156,7 @@ export default { ...@@ -137,6 +156,7 @@ export default {
}, },
data() { data() {
return { return {
editShiftType: null,
currentIndex: null, currentIndex: null,
currentRow: {}, currentRow: {},
// 遮罩层 // 遮罩层
...@@ -182,6 +202,7 @@ export default { ...@@ -182,6 +202,7 @@ export default {
/** 查询计划班次列表 */ /** 查询计划班次列表 */
getList() { getList() {
this.loading = true; this.loading = true;
this.queryParams.shiftType = this.shiftType
listShift(this.queryParams).then(response => { listShift(this.queryParams).then(response => {
this.shiftList = response.data; this.shiftList = response.data;
this.loading = false; this.loading = false;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-table-column label="工序名称" prop="processName" align="center" /> <el-table-column label="工序名称" prop="processName" align="center" />
<el-table-column label="工序编码" prop="processCode" align="center" /> <el-table-column label="工序编码" prop="processCode" align="center" />
<el-table-column label="工作站" prop="workstationName" align="center" /> <el-table-column label="工作站" prop="workstationName" align="center" />
<el-table-column label="工作单元名称" prop="workunitName" align="center" /> <el-table-column v-if="mode === 'make'" label="工作单元名称" prop="workunitName" align="center" />
<el-table-column label="标准工时" prop="stdWorkingTime" align="center" /> <el-table-column label="标准工时" prop="stdWorkingTime" align="center" />
<el-table-column label="换型时间" prop="lineBreakTime" align="center" /> <el-table-column label="换型时间" prop="lineBreakTime" align="center" />
<el-table-column label="工序总数量" prop="quantity" align="center" /> <el-table-column label="工序总数量" prop="quantity" align="center" />
...@@ -18,8 +18,30 @@ ...@@ -18,8 +18,30 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="标准文本代码" prop="x" align="center" /> <el-table-column label="标准文本代码" prop="x" align="center" />
<el-table-column label="开始时间" align="center" prop="startTime" /> <el-table-column width="220" v-if="mode === 'make'" label="开始时间" align="center" prop="startTime" >
<el-table-column label="结束时间" align="center" prop="endTime" /> <template slot-scope="scope">
<el-date-picker
v-model="scope.row.startTime"
type="datetime"
style="width:200px;"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择开始时间"
>
</el-date-picker>
</template>
</el-table-column>
<el-table-column width="220" v-if="mode === 'make'" label="结束时间" align="center" prop="endTime" >
<template slot-scope="scope">
<el-date-picker
v-model="scope.row.endTime"
type="datetime"
style="width:200px;"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择结束时间"
>
</el-date-picker>
</template>
</el-table-column>
<el-table-column <el-table-column
v-if="!(mode === 'info'|| mode === 'make')" v-if="!(mode === 'info'|| mode === 'make')"
label="操作" label="操作"
......
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