Merge remote-tracking branch 'origin/main'
This commit is contained in:
-15
@@ -178,21 +178,6 @@ layout("/layouts/platform.html"){
|
||||
onExport() {
|
||||
this.$downLoad('/platform/unionReimburse/collect/onExport', this.pageForm)
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
|
||||
@@ -0,0 +1,294 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="生育休假" define_key="SYXJ"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<table-tool label="人员信息"></table-tool>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="职工姓名">{{formData.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{formData.sex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="民族">{{formData.nation}}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月" >{{formData.birthday}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工作单位" >{{formData.unitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="电话" >{{formData.mobile}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="爱人姓名">
|
||||
<el-form-item label="爱人姓名" prop="loverName">
|
||||
<el-input type="text" v-model="formData.loverName" placeholder="请输入爱人姓名"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">
|
||||
<el-form-item label="性别" prop="loverSex">
|
||||
<el-select v-model="formData.loverSex" placeholder="请选择">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="民族">
|
||||
<el-form-item label="民族" prop="loverNation">
|
||||
<el-select clearable placeholder="请选择民族"
|
||||
style="width: 100%;"
|
||||
v-model="formData.loverNation">
|
||||
<el-option :label="item.name" :value="item.code"
|
||||
v-for="item in dict.type.USER_NATION"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月" >
|
||||
<el-form-item label="出生年月" prop="loverBirthday">
|
||||
<el-date-picker type="date"
|
||||
v-model="formData.loverBirthday"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工作单位" span="2">
|
||||
<el-form-item label="工作单位" prop="loverUnitName">
|
||||
<el-input type="text" v-model="formData.loverUnitName"
|
||||
placeholder="请输入工作单位"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<table-tool label="假期类别"></table-tool>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="陪产假" v-if="formData.sex === '男性' || formData.sex === '男'">
|
||||
<el-form-item label="陪产假" prop="withLeave">
|
||||
<el-input v-model="formData.withLeave" placeholder="请输入陪产天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="育儿假" v-if="formData.sex === '男性' || formData.sex === '男'">
|
||||
<el-form-item label="育儿假" prop="parentalLeave">
|
||||
<el-input v-model="formData.parentalLeave" placeholder="请输入育儿假天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="产假" v-if="formData.sex === '女性' || formData.sex === '女'">
|
||||
<el-form-item label="产假" prop="maternityLeave">
|
||||
<el-input v-model="formData.maternityLeave" placeholder="请输入产假天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="延长假" v-if="formData.sex === '女性' || formData.sex === '女'">
|
||||
<el-form-item label="延长假" prop="extendLeave">
|
||||
<el-input v-model="formData.extendLeave" placeholder="请输入延长假天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="多胞胎" v-if="formData.sex === '女性' || formData.sex === '女'">
|
||||
<el-form-item label="多胞胎" prop="birthsLeave">
|
||||
<el-input v-model="formData.birthsLeave" placeholder="请输入多胞胎天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="难产假" v-if="formData.sex === '女性' || formData.sex === '女'">
|
||||
<el-form-item label="难产假" prop="difficultLeave">
|
||||
<el-input v-model="formData.difficultLeave" placeholder="请输入难产假天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="寒假">
|
||||
<el-form-item label="寒假" prop="winterLeave">
|
||||
<el-input v-model="formData.winterLeave" placeholder="请输入寒假天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="暑假">
|
||||
<el-form-item label="暑假" prop="summerLeave">
|
||||
<el-input v-model="formData.summerLeave" placeholder="请输入暑假天数"
|
||||
type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="合计天数" span="2">{{formData.leaveDays}}
|
||||
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<table-tool label="休假时间"></table-tool>
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="休假时间起">
|
||||
<el-form-item label="休假时间起" prop="startTime">
|
||||
<el-date-picker type="date"
|
||||
v-model="formData.startTime"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="休假时间止">
|
||||
<el-form-item label="休假时间止" prop="endTime">
|
||||
<el-date-picker type="date"
|
||||
v-model="formData.endTime"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="子女出生日">
|
||||
<el-form-item label="子女出生日" prop="childrenBirthday">
|
||||
<el-date-picker type="date"
|
||||
v-model="formData.childrenBirthday"
|
||||
placeholder="请选择子女出生日"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交1</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
dicts: ["USER_NATION"],
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {},
|
||||
formRules: {},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 计算合计天数
|
||||
totalLeaveDays() {
|
||||
const fields = [
|
||||
'withLeave', 'parentalLeave', 'maternityLeave',
|
||||
'extendLeave', 'birthsLeave', 'difficultLeave',
|
||||
'winterLeave', 'summerLeave'
|
||||
];
|
||||
|
||||
let total = 0;
|
||||
fields.forEach(field => {
|
||||
const value = this.formData[field];
|
||||
if (value && !isNaN(value)) {
|
||||
total += parseFloat(value);
|
||||
}
|
||||
});
|
||||
|
||||
return total;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
totalLeaveDays(newVal) {
|
||||
this.$set(this.formData, 'leaveDays', newVal);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 保存
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/maternityLeave/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
window.location.href = '/platform/maternityLeave/mine/index'
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 提交
|
||||
onSubmit() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/maternityLeave/apply/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/maternityLeave/mine/index'
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 再次提交
|
||||
onFinishTask() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/maternityLeave/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/maternityLeave/mine/index'
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async findOne(id) {
|
||||
const resp = await $.get('/platform/maternityLeave/apply/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
return resp.data
|
||||
}
|
||||
},
|
||||
init() {
|
||||
if (this.bizId) {
|
||||
this.findOne(this.bizId).then(async data => {
|
||||
this.formData = data
|
||||
})
|
||||
} else {
|
||||
const {id, username, loginname, union, unit, sex, nation, birthday,mobile} = this.$store.state.user
|
||||
this.formData = {
|
||||
userId: id,
|
||||
userName: username,
|
||||
loginName: loginname,
|
||||
unitId: unit.id,
|
||||
unitName: unit.name,
|
||||
unionId: union.id,
|
||||
unionName: union.name,
|
||||
sex: sex,
|
||||
nation: nation,
|
||||
birthday: birthday,
|
||||
mobile:mobile
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button @click="onExport" icon="el-icon-s-promotion" type="primary" size="small">导出</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="leaveDays" label="休假天数"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="$auth.hasRole('SYSADMIN')" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<maternity-leave-info ref="maternityLeaveInfoRef"></maternity-leave-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"maternity-leave-info": maternityLeaveInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/maternityLeave/collect/pageData",
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/maternityLeave/mine/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onExport() {
|
||||
this.$downLoad('/platform/maternityLeave/collect/onExport', this.pageForm)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,135 @@
|
||||
const maternityLeaveInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">
|
||||
申请信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<table-tool label="人员信息"></table-tool>
|
||||
<el-descriptions :column="2" border class="flow-task-form">
|
||||
<el-descriptions-item label="职工姓名">{{viewData.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{viewData.sex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="民族">{{viewData.nation}}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月">{{viewData.birthday}}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位">{{viewData.unitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="电话">{{viewData.mobile}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="爱人姓名">{{viewData.loverName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{viewData.loverSex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="民族">{{viewData.loverNation}}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月">{{viewData.loverBirthday}}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位" span="2">{{viewData.loverUnitName}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<table-tool label="假期类型"></table-tool>
|
||||
<el-descriptions :column="2" border class="flow-task-form">
|
||||
<el-descriptions-item label="陪产假" v-if="viewData.sex === '男性' || viewData.sex === '男'">
|
||||
{{viewData.withLeave}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="育儿假" v-if="viewData.sex === '男性' || viewData.sex === '男'">
|
||||
{{viewData.parentalLeave}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="产假" v-if="viewData.sex === '女性' || viewData.sex === '女'">
|
||||
{{viewData.maternityLeave}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="延长假" v-if="viewData.sex === '女性' || viewData.sex === '女'">
|
||||
{{viewData.extendLeave}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="多胞胎" v-if="viewData.sex === '女性' || viewData.sex === '女'">
|
||||
{{viewData.birthsLeave}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="难产假" v-if="viewData.sex === '女性' || viewData.sex === '女'">
|
||||
{{viewData.difficultLeave}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="寒假">{{viewData.winterLeave}}</el-descriptions-item>
|
||||
<el-descriptions-item label="暑假">{{viewData.summerLeave}}</el-descriptions-item>
|
||||
<el-descriptions-item label="合计">{{viewData.leaveDays}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<table-tool label="休假时间"></table-tool>
|
||||
<el-descriptions :column="2" border class="flow-task-form">
|
||||
<el-descriptions-item label="休假时间起">{{viewData.startTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="休假时间止">{{viewData.endTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="子女出生日">{{viewData.childrenBirthday}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<template v-for="task in doneTasks">
|
||||
<div class="mt10">
|
||||
<div class="process-title">{{ task.displayName }}</div>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||
}}({{task.ext.initiatorAccount}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<slot></slot>
|
||||
|
||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post('/platform/maternityLeave/apply/findOne', {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查看流程图
|
||||
openChart(){
|
||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="leaveDays" label="休假天数"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<maternity-leave-info ref="maternityLeaveInfoRef"></maternity-leave-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"maternity-leave-info": maternityLeaveInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/maternityLeave/mine/pageData",
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
window.location.href = '/platform/maternityLeave/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/maternityLeave/mine/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="leaveDays" label="休假天数"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<maternity-leave-info ref="maternityLeaveInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</maternity-leave-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"maternity-leave-info": maternityLeaveInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/maternityLeave/schoolAudit/pageData",
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+191
@@ -0,0 +1,191 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool><el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="leaveDays" label="休假天数"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<maternity-leave-info ref="maternityLeaveInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</maternity-leave-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"maternity-leave-info": maternityLeaveInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/maternityLeave/unionAudit/pageData",
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user