升职申请
parent
54027768f0
commit
80aef52d01
|
|
@ -168,6 +168,12 @@
|
|||
"navigationBarTitleText": "升职申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "升职申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "create",
|
||||
"style": {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
<template>
|
||||
<view>
|
||||
<CuNavbar :isBack="isBack" title="上报"></CuNavbar>
|
||||
<view :class="[checkPermission(['store']) ? '' : 'pointer-events-none']">
|
||||
<view
|
||||
:class="[
|
||||
checkPermission(['store']) && form.allow_rereport
|
||||
? ''
|
||||
: 'pointer-events-none',
|
||||
]"
|
||||
>
|
||||
<uv-form
|
||||
class="mt-30rpx"
|
||||
labelPosition="left"
|
||||
|
|
@ -141,7 +147,13 @@
|
|||
:style="style"
|
||||
>
|
||||
<view class="w-full">
|
||||
<uv-button type="primary" shape="circle" block @click="submit">
|
||||
<uv-button
|
||||
:disabled="!form.allow_rereport"
|
||||
type="primary"
|
||||
shape="circle"
|
||||
block
|
||||
@click="submit"
|
||||
>
|
||||
上报
|
||||
</uv-button>
|
||||
</view>
|
||||
|
|
@ -251,12 +263,13 @@ const onSubmit = async () => {
|
|||
url: '/ledgers',
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Accept': 'application/json',
|
||||
Accept: 'application/json',
|
||||
},
|
||||
data: params,
|
||||
})
|
||||
.then((res) => {
|
||||
uni.$emit('revert:submit', res)
|
||||
getData()
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
duration: 2000,
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ const props = defineProps({
|
|||
|
||||
const onClick = () => {
|
||||
const type = props.item.taskable_type
|
||||
console.log(type)
|
||||
uni.navigateTo({
|
||||
url: `/pages/task/${type}_submit?id=${props.item.id}`,
|
||||
})
|
||||
}
|
||||
|
||||
const onTask = (e) => {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
>
|
||||
<uv-form-item label="清洁范围" required prop="content">
|
||||
<uv-input
|
||||
border="bottom"
|
||||
:border="`bottom`"
|
||||
placeholder="请输入清洁范围"
|
||||
v-model="form.content"
|
||||
></uv-input>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,313 @@
|
|||
<template>
|
||||
<view>
|
||||
<CuNavbar title="升职申请">
|
||||
<template v-if="!isEdit" #right>
|
||||
<uv-icon color="white" @click="open" name="more-dot-fill"></uv-icon>
|
||||
</template>
|
||||
</CuNavbar>
|
||||
<uv-sticky bgColor="white">
|
||||
<view class="p-base box-shadow text-28rpx">
|
||||
<view class="flex justify-between px-10rpx">
|
||||
<view>晋升职位</view>
|
||||
<view>{{ detail?.job?.name }}</view>
|
||||
</view>
|
||||
<view class="flex justify-between mt-15rpx px-10rpx">
|
||||
<view>申请人</view>
|
||||
<view>{{ detail?.employee?.name }}</view>
|
||||
</view>
|
||||
<view class="flex justify-between mt-15rpx px-10rpx">
|
||||
<view>推荐人</view>
|
||||
<view>{{ detail?.invitor?.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</uv-sticky>
|
||||
<view class="p-base" :class="isEdit ? '' : 'pointer-events-none'">
|
||||
<view class="card-shadow px-base">
|
||||
<uv-form
|
||||
labelPosition="left"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="formRef"
|
||||
errorType="toast"
|
||||
labelWidth="250rpx"
|
||||
>
|
||||
<uv-form-item :required="isEdit" label="年龄" prop="age">
|
||||
<uv-input
|
||||
placeholder="请输入年龄"
|
||||
inputAlign="right"
|
||||
:border="`none`"
|
||||
v-model="form.age"
|
||||
>
|
||||
</uv-input>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item :required="isEdit" label="性别" prop="sex">
|
||||
<uv-input
|
||||
placeholder="请选择性别"
|
||||
@click="openPicker"
|
||||
readonly
|
||||
inputAlign="right"
|
||||
:border="`none`"
|
||||
v-model="form.sex"
|
||||
>
|
||||
</uv-input>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item :required="isEdit" label="学历" prop="education">
|
||||
<uv-input
|
||||
placeholder="请输入学历"
|
||||
inputAlign="right"
|
||||
:border="`none`"
|
||||
v-model="form.education"
|
||||
>
|
||||
</uv-input>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item
|
||||
:required="isEdit"
|
||||
label="首次参加工作时间"
|
||||
prop="first_work_time"
|
||||
>
|
||||
<uv-input
|
||||
placeholder="请选择日期"
|
||||
:required="isEdit"
|
||||
@click="openDatePicker"
|
||||
inputAlign="right"
|
||||
:border="`none`"
|
||||
v-model="form.first_work_time"
|
||||
>
|
||||
</uv-input>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item :required="isEdit" label="工作年限" prop="work_years">
|
||||
<uv-input
|
||||
placeholder="请输入工作年限"
|
||||
inputAlign="right"
|
||||
:border="`none`"
|
||||
v-model="form.work_years"
|
||||
>
|
||||
</uv-input>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item
|
||||
:required="isEdit"
|
||||
label="本公司工作年限"
|
||||
prop="work_years_in_company"
|
||||
>
|
||||
<uv-input
|
||||
placeholder="请输入本公司工作年限"
|
||||
inputAlign="right"
|
||||
:border="`none`"
|
||||
v-model="form.work_years_in_company"
|
||||
>
|
||||
</uv-input>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item
|
||||
:required="isEdit"
|
||||
label="员工自评"
|
||||
prop="comment_self"
|
||||
labelPosition="top"
|
||||
>
|
||||
<uv-textarea
|
||||
v-model="form.comment_self"
|
||||
count
|
||||
placeholder="请输入员工自评"
|
||||
:border="`none`"
|
||||
:maxlength="200"
|
||||
></uv-textarea>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item
|
||||
:required="isEdit"
|
||||
label="未来计划"
|
||||
prop="plans"
|
||||
labelPosition="top"
|
||||
>
|
||||
<uv-textarea
|
||||
v-model="form.plans"
|
||||
count
|
||||
placeholder="请输入未来计划"
|
||||
:border="`none`"
|
||||
:maxlength="200"
|
||||
></uv-textarea>
|
||||
</uv-form-item>
|
||||
<template v-if="detail.promotion_status > 1">
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item
|
||||
label="推荐理由"
|
||||
prop="reason"
|
||||
:required="isEdit"
|
||||
labelPosition="top"
|
||||
>
|
||||
<uv-textarea
|
||||
v-model="form.reason"
|
||||
count
|
||||
placeholder="请输入推荐理由"
|
||||
:border="`none`"
|
||||
:maxlength="200"
|
||||
></uv-textarea>
|
||||
</uv-form-item>
|
||||
</template>
|
||||
</uv-form>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="px-base" v-if="isEdit">
|
||||
<view class="py-30rpx">
|
||||
<uv-button type="primary" @click="submit">提交</uv-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<uv-picker
|
||||
ref="pickerRef"
|
||||
:columns="columns"
|
||||
@confirm="confirmPicker"
|
||||
></uv-picker>
|
||||
<uv-datetime-picker
|
||||
:minDate="50"
|
||||
placeholder="请选择日期"
|
||||
ref="datetimePicker"
|
||||
mode="year-month"
|
||||
@confirm="confirmDatePicker"
|
||||
>
|
||||
</uv-datetime-picker>
|
||||
<uv-modal
|
||||
ref="modalRef"
|
||||
title="提示"
|
||||
content="确定提交吗?"
|
||||
@confirm="onSubmit"
|
||||
:showCancelButton="true"
|
||||
></uv-modal>
|
||||
|
||||
<uv-action-sheet
|
||||
ref="actionSheet"
|
||||
:actions="actionlist"
|
||||
@select="select"
|
||||
cancelText="取消"
|
||||
>
|
||||
</uv-action-sheet>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import CuNavbar from '@/components/cu-navbar/index'
|
||||
import { ref, reactive, computed, onBeforeMount } from 'vue'
|
||||
import { http } from '@/utils/request'
|
||||
import { timeFormat } from '@climblee/uv-ui/libs/function/index'
|
||||
const props = defineProps({
|
||||
id: {
|
||||
type: [Number, String],
|
||||
},
|
||||
isEdit: {
|
||||
type: Boolean,
|
||||
},
|
||||
})
|
||||
const actionlist = ref([
|
||||
{
|
||||
name: '去提交',
|
||||
value: 'submit',
|
||||
},
|
||||
])
|
||||
const actionSheet = ref(null)
|
||||
const columns = [['男', '女']]
|
||||
const formRef = ref(null)
|
||||
const datetimePicker = ref(null)
|
||||
const pickerRef = ref(null)
|
||||
const modalRef = ref(null)
|
||||
const loading = ref(false)
|
||||
const detail = ref({})
|
||||
|
||||
const form = reactive({
|
||||
age: '',
|
||||
sex: '',
|
||||
education: '',
|
||||
first_work_time: '',
|
||||
work_years: '',
|
||||
work_years_in_company: '',
|
||||
comment_self: '',
|
||||
plans: '',
|
||||
reason: '',
|
||||
})
|
||||
const openPicker = () => {
|
||||
pickerRef.value.open()
|
||||
}
|
||||
const openDatePicker = () => {
|
||||
datetimePicker.value.open()
|
||||
}
|
||||
const confirmDatePicker = (e) => {
|
||||
form.first_work_time = timeFormat(e.value, 'yyyy-mm')
|
||||
}
|
||||
const confirmPicker = (e) => {
|
||||
form.sex = e.value[0]
|
||||
}
|
||||
const rules = reactive({
|
||||
age: [{ required: true, message: '请输入年龄' }],
|
||||
sex: [{ required: true, message: '请选择性别' }],
|
||||
education: [{ required: true, message: '请输入学历' }],
|
||||
first_work_time: [{ required: true, message: '请输入首次参加工作时间' }],
|
||||
work_years: [{ required: true, message: '请输入清洁范围' }],
|
||||
work_years_in_company: [{ required: true, message: '请输入本公司工作年限' }],
|
||||
comment_self: [{ required: true, message: '请输入员工自评' }],
|
||||
plans: [{ required: true, message: '请输入未来计划' }],
|
||||
reason: [{ required: true, message: '请输入推荐理由' }],
|
||||
})
|
||||
|
||||
onBeforeMount(() => {
|
||||
getDetail()
|
||||
})
|
||||
|
||||
const submit = () => {
|
||||
formRef.value.validate().then((res) => {
|
||||
modalRef.value.open()
|
||||
})
|
||||
}
|
||||
|
||||
const onSubmit = async () => {
|
||||
if (loading.value) return
|
||||
loading.value = true
|
||||
try {
|
||||
const params = {
|
||||
...form,
|
||||
}
|
||||
const resData = await http.request({
|
||||
url: `/hr/promotion/${props.id}/apply`,
|
||||
method: 'POST',
|
||||
header: {
|
||||
Accept: 'application/json',
|
||||
},
|
||||
data: params,
|
||||
})
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
icon: 'none',
|
||||
})
|
||||
formRef.value.resetFields()
|
||||
uni.$emit('work:submit', resData)
|
||||
uni.navigateBack()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const getDetail = async () => {
|
||||
http.get(`/hr/promotion/${props.id}`).then((res) => {
|
||||
detail.value = res
|
||||
Object.assign(form, res?.employee_data || {})
|
||||
})
|
||||
}
|
||||
|
||||
const open = () => {
|
||||
actionSheet.value.open()
|
||||
}
|
||||
|
||||
const select = (e) => {
|
||||
const { value } = e
|
||||
if(value === 'submit') {
|
||||
uni.navigateTo({
|
||||
url: `/pages/work/create?id=${props.id}`,
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,21 +1,66 @@
|
|||
<template>
|
||||
<view class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx">
|
||||
<view
|
||||
@click="onClick"
|
||||
class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx"
|
||||
>
|
||||
<view class="flex items-center justify-between">
|
||||
<view class="text-30rpx"> {{ item.job.name }} </view>
|
||||
<view class="text-24rpx text-hex-999999">待完成</view>
|
||||
<view class="text-30rpx"> {{ item.job.name }}</view>
|
||||
<view
|
||||
class="text-24rpx"
|
||||
:style="{
|
||||
color: statusFun(item.promotion_status, 'promotion_status', 'color'),
|
||||
}"
|
||||
>{{ item.promotion_status_text }}</view
|
||||
>
|
||||
</view>
|
||||
<view class="text-24rpx text-hex-999999 flex">
|
||||
<view class="w-140rpx">推荐人</view>
|
||||
<view class="text-primary">12313</view>
|
||||
<view class="">{{ item?.invitor?.name }}</view>
|
||||
</view>
|
||||
<view class="text-24rpx text-hex-999999 flex">
|
||||
<view class="w-140rpx">晋升职位</view>
|
||||
<view class="text-hex-333">2022-01-01</view>
|
||||
<view class="">{{ item.job.name }}</view>
|
||||
</view>
|
||||
|
||||
<template v-if="options?.includes(item.promotion_status)">
|
||||
<view class="py-10rpx">
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
</view>
|
||||
<view class="flex justify-end items-center">
|
||||
<uv-button type="primary" size="mini">去提交</uv-button>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import statusFun from '@/utils/status'
|
||||
const props = defineProps({
|
||||
item: Object,
|
||||
options: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
type: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
subject_type: String,
|
||||
})
|
||||
|
||||
const onOption = (e) => {}
|
||||
|
||||
const onClick = () => {
|
||||
let url
|
||||
if (props.type == 3) {
|
||||
} else {
|
||||
url = `/pages/work/detail?id=${props.item.id}`
|
||||
}
|
||||
goPath(url)
|
||||
}
|
||||
|
||||
const goPath = (url) => {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,200 +1,15 @@
|
|||
<template>
|
||||
<view>
|
||||
<CuNavbar title="升值申请">
|
||||
<template #right>
|
||||
<view class="text-24rpx text-white" @confirm="onSubmit">保存</view>
|
||||
</template>
|
||||
</CuNavbar>
|
||||
<uv-sticky bgColor="white">
|
||||
<view class="p-40rpx">
|
||||
<view class="flex justify-between px-10rpx">
|
||||
<view>晋升职位</view>
|
||||
<view>店长</view>
|
||||
</view>
|
||||
<view class="flex justify-between mt-15rpx px-10rpx">
|
||||
<view>申请人</view>
|
||||
<view>李四</view>
|
||||
</view>
|
||||
<view class="flex justify-between mt-15rpx px-10rpx">
|
||||
<view>推荐人</view>
|
||||
<view>丁曼容</view>
|
||||
</view>
|
||||
</view>
|
||||
</uv-sticky>
|
||||
<view class="card-shadow px-base">
|
||||
<uv-form labelPosition="left" :model="form" :rules="rules" ref="formRef" errorType="toast" labelWidth="250rpx">
|
||||
<uv-form-item required label="年龄" prop="age">
|
||||
<uv-input placeholder="请输入年龄" inputAlign="right" :border="`none`" v-model="form.age"> </uv-input>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item required label="性别" prop="sex">
|
||||
<uv-input
|
||||
placeholder="请选择性别"
|
||||
@click="openPicker"
|
||||
readonly
|
||||
inputAlign="right"
|
||||
:border="`none`"
|
||||
v-model="form.sex"
|
||||
>
|
||||
</uv-input>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item required label="学历" prop="education">
|
||||
<uv-input placeholder="请输入学历" inputAlign="right" :border="`none`" v-model="form.education"> </uv-input>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item required label="首次参加工作时间" prop="first_work_time">
|
||||
<uv-input
|
||||
placeholder="请选择日期"
|
||||
readonly
|
||||
@click="openDatePicker"
|
||||
inputAlign="right"
|
||||
:border="`none`"
|
||||
v-model="form.first_work_time"
|
||||
>
|
||||
</uv-input>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item required label="工作年限" prop="work_years">
|
||||
<uv-input placeholder="请输入工作年限" inputAlign="right" :border="`none`" v-model="form.work_years">
|
||||
</uv-input>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item required label="本公司工作年限" prop="work_years_in_company">
|
||||
<uv-input
|
||||
placeholder="请输入本公司工作年限"
|
||||
inputAlign="right"
|
||||
:border="`none`"
|
||||
v-model="form.work_years_in_company"
|
||||
>
|
||||
</uv-input>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item required label="员工自评" prop="comment_self" labelPosition="top">
|
||||
<uv-textarea
|
||||
v-model="form.comment_self"
|
||||
count
|
||||
placeholder="请输入员工自评"
|
||||
:border="`none`"
|
||||
:maxlength="200"
|
||||
></uv-textarea>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item required label="未来计划" prop="plans" labelPosition="top">
|
||||
<uv-textarea
|
||||
v-model="form.plans"
|
||||
count
|
||||
placeholder="请输入未来计划"
|
||||
:border="`none`"
|
||||
:maxlength="200"
|
||||
></uv-textarea>
|
||||
</uv-form-item>
|
||||
<uv-line color="#f5f5f5"></uv-line>
|
||||
<uv-form-item label="推荐理由" prop="reason" labelPosition="top">
|
||||
<uv-textarea
|
||||
v-model="form.reason"
|
||||
count
|
||||
placeholder="请输入推荐理由"
|
||||
:border="`none`"
|
||||
:maxlength="200"
|
||||
></uv-textarea>
|
||||
</uv-form-item>
|
||||
</uv-form>
|
||||
</view>
|
||||
<!-- <view class="mt-100rpx">
|
||||
<uv-button type="primary" @click="submit">提交</uv-button>
|
||||
</view> -->
|
||||
<uv-picker ref="pickerRef" :columns="columns" @confirm="confirmPicker"></uv-picker>
|
||||
<uv-datetime-picker placeholder="请选择日期" ref="datetimePicker" mode="year-month" @confirm="confirmDatePicker">
|
||||
</uv-datetime-picker>
|
||||
<uv-modal ref="modalRef" title="提示" content="确定提交吗?" @confirm="onSubmit" :showCancelButton="true"></uv-modal>
|
||||
<commone :id="id" isEdit></commone>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import CuNavbar from "@/components/cu-navbar/index"
|
||||
import { ref, reactive, computed } from "vue"
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
import { http } from "@/utils/request"
|
||||
import { timeFormat } from "@climblee/uv-ui/libs/function/index"
|
||||
const columns = [["男", "女"]]
|
||||
const formRef = ref(null)
|
||||
const datetimePicker = ref(null)
|
||||
const pickerRef = ref(null)
|
||||
const modalRef = ref(null)
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import commone from './commone.vue'
|
||||
import { ref } from 'vue'
|
||||
const id = ref(0)
|
||||
const loading = ref(false)
|
||||
const form = reactive({
|
||||
age: "",
|
||||
sex: "",
|
||||
education: "",
|
||||
first_work_time: "",
|
||||
work_years: "",
|
||||
work_years_in_company: "",
|
||||
comment_self: "",
|
||||
plans: "",
|
||||
reason: ""
|
||||
})
|
||||
const openPicker = () => {
|
||||
pickerRef.value.open()
|
||||
}
|
||||
const openDatePicker = () => {
|
||||
datetimePicker.value.open()
|
||||
}
|
||||
const confirmDatePicker = e => {
|
||||
form.first_work_time = timeFormat(e.value, "yyyy-mm")
|
||||
}
|
||||
const confirmPicker = e => {
|
||||
form.sex = e.value[0]
|
||||
}
|
||||
const rules = reactive({
|
||||
age: [{ required: true, message: "请输入年龄" }],
|
||||
sex: [{ required: true, message: "请选择性别" }],
|
||||
education: [{ required: true, message: "请输入学历" }],
|
||||
first_work_time: [{ required: true, message: "请输入首次参加工作时间" }],
|
||||
work_years: [{ required: true, message: "请输入清洁范围" }],
|
||||
work_years_in_company: [{ required: true, message: "请输入本公司工作年限" }],
|
||||
comment_self: [{ required: true, message: "请输入员工自评" }],
|
||||
plans: [{ required: true, message: "请输入未来计划" }],
|
||||
reason: [{ required: true, message: "请输入推荐理由" }]
|
||||
})
|
||||
onLoad(options => {
|
||||
|
||||
onLoad((options) => {
|
||||
id.value = options.id
|
||||
})
|
||||
|
||||
const submit = () => {
|
||||
formRef.value.validate().then(res => {
|
||||
modalRef.value.open()
|
||||
})
|
||||
}
|
||||
|
||||
const onSubmit = async () => {
|
||||
if (loading.value) return
|
||||
loading.value = true
|
||||
try {
|
||||
await http.request({
|
||||
url: `/tasks/${id.value}/submit`,
|
||||
method: "POST",
|
||||
header: {
|
||||
Accept: "application/json"
|
||||
},
|
||||
data: {
|
||||
task_hygiene: {
|
||||
description: form.description,
|
||||
photos: form.photos.map(item => item.url)
|
||||
}
|
||||
}
|
||||
})
|
||||
uni.showToast({
|
||||
title: "提交成功",
|
||||
icon: "none"
|
||||
})
|
||||
formRef.value.resetFields()
|
||||
uni.$emit("task:submit", resData)
|
||||
uni.navigateBack()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<template>
|
||||
<view>
|
||||
<commone :id="id"></commone>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import commone from './commone.vue'
|
||||
import { ref } from 'vue'
|
||||
const id = ref(0)
|
||||
|
||||
onLoad((options) => {
|
||||
id.value = options.id
|
||||
})
|
||||
|
||||
</script>
|
||||
|
|
@ -1,10 +1,6 @@
|
|||
<template>
|
||||
<view>
|
||||
<CuNavbar title="升职申请">
|
||||
<template #right>
|
||||
<view @click="goPath('/pages/work/create')" class="text-24rpx text-white">申请</view>
|
||||
</template>
|
||||
</CuNavbar>
|
||||
<CuNavbar title="升职申请"> </CuNavbar>
|
||||
<uv-sticky bgColor="#fff">
|
||||
<uv-tabs
|
||||
:activeStyle="{ color: '#ee2c37' }"
|
||||
|
|
@ -14,11 +10,52 @@
|
|||
@change="tabChange"
|
||||
></uv-tabs>
|
||||
</uv-sticky>
|
||||
<MescrollItem ref="mescrollItem0" :top="88" :i="0" :index="tabIndex" :apiUrl="tabList[0].apiUrl">
|
||||
<MescrollItem
|
||||
ref="mescrollItem0"
|
||||
:top="88"
|
||||
:i="0"
|
||||
:index="tabIndex"
|
||||
:apiUrl="tabList[0].apiUrl"
|
||||
>
|
||||
<template v-slot="{ list }">
|
||||
<view class="space-y-15rpx p-base">
|
||||
<view v-for="(item, i) in list" :key="i">
|
||||
<Item :item="item"></Item>
|
||||
<Item :type="0" :item="item" :options="[1]"> </Item>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</MescrollItem>
|
||||
<MescrollItem
|
||||
ref="mescrollItem1"
|
||||
:top="88"
|
||||
:i="1"
|
||||
:index="tabIndex"
|
||||
:apiUrl="tabList[1].apiUrl"
|
||||
>
|
||||
<template v-slot="{ list }">
|
||||
<view class="space-y-15rpx p-base">
|
||||
<view v-for="(item, i) in list" :key="i">
|
||||
<Item :type="1" :item="item" :options="[2]"> </Item>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</MescrollItem>
|
||||
<MescrollItem
|
||||
ref="mescrollItem2"
|
||||
:top="88"
|
||||
:i="2"
|
||||
:index="tabIndex"
|
||||
:apiUrl="tabList[2].apiUrl"
|
||||
:params="tabList[2].params"
|
||||
>
|
||||
<template v-slot="{ list }">
|
||||
<view class="space-y-15rpx p-base">
|
||||
<view v-for="(item, i) in list" :key="i">
|
||||
<Item
|
||||
:type="2"
|
||||
:subject_type="tabList[2].params.subject_type"
|
||||
:item="item"
|
||||
></Item>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -26,32 +63,48 @@
|
|||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import CuNavbar from "@/components/cu-navbar/index"
|
||||
import { ref } from "vue"
|
||||
import { onPageScroll, onReachBottom, onShow } from "@dcloudio/uni-app"
|
||||
import useMescrollMore from "@/uni_modules/mescroll-uni/hooks/useMescrollMore.js"
|
||||
import MescrollItem from "@/components/mescroll-api/more.vue"
|
||||
import CuNavbar from '@/components/cu-navbar/index'
|
||||
import { ref } from 'vue'
|
||||
import { onPageScroll, onReachBottom, onShow } from '@dcloudio/uni-app'
|
||||
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
|
||||
import MescrollItem from '@/components/mescroll-api/more.vue'
|
||||
import Item from './components/item.vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
const tabList = ref([
|
||||
{
|
||||
name: "申请列表",
|
||||
apiUrl: "/hr/promotion/apply"
|
||||
name: '申请列表',
|
||||
apiUrl: '/hr/promotion/apply',
|
||||
},
|
||||
{
|
||||
name: "推荐列表"
|
||||
name: '推荐列表',
|
||||
apiUrl: '/hr/promotion/apply',
|
||||
},
|
||||
{
|
||||
name: "审核列表"
|
||||
}
|
||||
name: '审核列表',
|
||||
apiUrl: '/workflow',
|
||||
params: {
|
||||
subject_type: 'employee_promotions',
|
||||
},
|
||||
},
|
||||
])
|
||||
const mescrollItem0 = ref(null)
|
||||
const mescrollItem1 = ref(null)
|
||||
const mescrollItem2 = ref(null)
|
||||
|
||||
const mescrollItems = [mescrollItem0, mescrollItem1]
|
||||
const { tabIndex, getMescroll, scrollToLastY } = useMescrollMore(mescrollItems, onPageScroll, onReachBottom)
|
||||
const goPath = url => {
|
||||
const mescrollItems = [mescrollItem0, mescrollItem1, mescrollItem2]
|
||||
const { tabIndex, getMescroll, scrollToLastY } = useMescrollMore(
|
||||
mescrollItems,
|
||||
onPageScroll,
|
||||
onReachBottom
|
||||
)
|
||||
|
||||
onLoad(() => {
|
||||
uni.$on('work:submit', getMescroll(tabIndex.value))
|
||||
})
|
||||
|
||||
const goPath = (url) => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
url,
|
||||
})
|
||||
}
|
||||
const tabChange = ({ index }) => {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,13 @@ page {
|
|||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.card-shadow{
|
||||
.card-shadow {
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.04);
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.box-shadow {
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,28 @@ const data = {
|
|||
value: 4,
|
||||
name: '未完成',
|
||||
color: '#999999'
|
||||
}],
|
||||
// 升职申请
|
||||
promotion_status: [{
|
||||
value: 1,
|
||||
name: '待提交',
|
||||
color: '#f56c6c'
|
||||
}, {
|
||||
value: 2,
|
||||
name: '待推荐',
|
||||
color: '#f56c6c'
|
||||
}, {
|
||||
value: 3,
|
||||
name: '审核中',
|
||||
color: '#f56c6c'
|
||||
}, {
|
||||
value: 4,
|
||||
name: '审核通过',
|
||||
color: '#3c9cff'
|
||||
}, {
|
||||
value: 5,
|
||||
name: '不通过',
|
||||
color: '#999999'
|
||||
}]
|
||||
}
|
||||
export default function (value, status, key) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue