更新班组

This commit is contained in:
2025-10-24 11:42:24 +08:00
parent 67b6b88863
commit 31bafae4aa
17 changed files with 1865 additions and 257 deletions

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2025-10-11 14:27:37
* @LastEditors: zwq
* @LastEditTime: 2025-10-15 16:42:28
* @LastEditTime: 2025-10-23 16:31:41
* @Description:
-->
<template>
@@ -95,7 +95,7 @@
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="80"
:width="270"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
@@ -112,7 +112,7 @@
@confirm="handleConfirm"
:before-close="handleCancel"
:destroy-on-close="true"
append-to-body
append-to-body
width="60%">
<add-or-update
ref="addOrUpdate"
@@ -141,7 +141,7 @@
class="btnTextStyle"
size="small"
plain
@click="handleConfirm">
@click="successSubmit">
保存草稿
</el-button>
<el-button
@@ -156,6 +156,30 @@
</slot>
</template>
</base-dialog>
<base-dialog
:dialogTitle="'排班计划详情'"
:dialogVisible="detailVisible"
@cancel="detailCancel"
:before-close="detailCancel"
:destroy-on-close="true"
append-to-body
width="50%">
<detail ref="detailRef"></detail>
<template #footer>
<slot name="footer">
<el-row slot="footer" type="flex" justify="end">
<el-col :span="24">
<el-button
size="small"
class="btnTextStyle"
@click="detailCancel">
取消
</el-button>
</el-col>
</el-row>
</slot>
</template>
</base-dialog>
</div>
</template>
@@ -165,8 +189,15 @@ import deptSelect from './../deptSelect.vue';
import basicPage from '@/mixins/basic-page';
import subSpan from './subSpan.vue';
import subStatus from './subStatus.vue';
import detail from './detail.vue';
import { parseTime } from '@/filter/code-filter';
import { getGroupPlanPage, deleteGroupPlan } from '@/api/group/Schedule';
import {
getGroupPlanPage,
deleteGroupPlan,
copyPlan,
disablePlan,
updateScheduleLater,
} from '@/api/group/Schedule';
const tableProps = [
{
@@ -206,7 +237,7 @@ const tableProps = [
subcomponent: subSpan,
},
{
prop: 'deptId',
prop: 'deptName',
label: '部门',
},
{
@@ -337,11 +368,13 @@ export default {
status: '',
},
stepNum: 1, // 新增编辑时当前第几步
detailVisible: false,
};
},
components: {
AddOrUpdate,
deptSelect,
detail
},
created() {},
methods: {
@@ -396,10 +429,15 @@ export default {
setStepNum(val) {
this.stepNum = val;
},
// dialog取消
handleCancel() {
successSubmit() {
this.addOrUpdateVisible = false;
this.addOrEditTitle = '';
this.stepNum = 1;
this.getDataList();
},
// dialog取消
handleCancel() {
this.$refs.addOrUpdate.cancelStep();
},
handleConfirm(val) {
if (val == 'up') {
@@ -408,6 +446,41 @@ export default {
this.$refs.addOrUpdate.nextSubmit();
}
},
//tableBtn点击
handleClick(val) {
if (val.type === 'edit') {
this.addOrUpdateVisible = true;
this.addOrEditTitle = '编辑';
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === 'delete') {
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex);
} else if (val.type === 'detail') {
this.detailVisible = true;
this.$nextTick(() => {
this.$refs.detailRef.init(val.data.id);
});
} else if (val.type === 'cancel') {
disablePlan(val.data.id).then((res) => {
this.$modal.msgSuccess('作废成功');
this.getDataList()
});
} else if (val.type === 'sync') {
updateScheduleLater({ planId: val.data.id }).then((res) => {
this.$modal.msgSuccess('同步节假日成功');
this.getDataList()
});
} else if (val.type === 'copy') {
copyPlan(val.data.id).then((res) => {
this.$modal.msgSuccess('复制成功');
this.getDataList()
});
}
},
detailCancel() {
this.detailVisible = false;
},
},
};
</script>
@@ -449,21 +522,21 @@ export default {
margin: 4px 0;
}
body .el-dialog__header {
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
padding: 13px 24px;
border-bottom: 1px solid #e9e9e9;
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
padding: 13px 24px;
border-bottom: 1px solid #e9e9e9;
}
body .el-dialog__header .titleStyle::before{
content: '';
display: inline-block;
width: 4px;
height: 16px;
background-color: #0B58FF;
border-radius: 1px;
margin-right: 8px;
position: relative;
top: 2px;
body .el-dialog__header .titleStyle::before {
content: '';
display: inline-block;
width: 4px;
height: 16px;
background-color: #0b58ff;
border-radius: 1px;
margin-right: 8px;
position: relative;
top: 2px;
}
</style>