升值申请
parent
6e741f941b
commit
b62b4047bf
|
|
@ -167,6 +167,12 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "升职申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "create",
|
||||
"style": {
|
||||
"navigationBarTitleText": "升职申请"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,200 @@
|
|||
<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>
|
||||
</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)
|
||||
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 => {
|
||||
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>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<view>
|
||||
<CuNavbar title="升职申请">
|
||||
<template #right>
|
||||
<view @click="goPath('/pages/expense-account/submit')" class="text-24rpx text-white">申请</view>
|
||||
<view @click="goPath('/pages/work/create')" class="text-24rpx text-white">申请</view>
|
||||
</template>
|
||||
</CuNavbar>
|
||||
<uv-sticky bgColor="#fff">
|
||||
|
|
@ -11,48 +11,61 @@
|
|||
:scrollable="false"
|
||||
lineColor="#ee2c37"
|
||||
:list="tabList"
|
||||
@change="tabChange"
|
||||
></uv-tabs>
|
||||
</uv-sticky>
|
||||
<view class="px-base space-y-20rpx mt-30rpx">
|
||||
<view
|
||||
v-for="item in 4"
|
||||
class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx"
|
||||
>
|
||||
<view class="flex items-center justify-between">
|
||||
<view class="text-30rpx"> 升职申请 </view>
|
||||
<view class="text-24rpx text-hex-999999">待完成</view>
|
||||
<MescrollItem ref="mescrollItem0" :top="88" :i="0" :index="tabIndex" :apiUrl="tabList[0].apiUrl">
|
||||
<template v-slot="{ list }">
|
||||
<view class="px-base space-y-20rpx mt-30rpx">
|
||||
<view v-for="item in list" class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx">
|
||||
<view class="flex items-center justify-between">
|
||||
<view class="text-30rpx"> 升职申请 </view>
|
||||
<view class="text-24rpx text-hex-999999">待完成</view>
|
||||
</view>
|
||||
<view class="text-24rpx text-hex-999999 flex">
|
||||
<view class="w-140rpx">推荐人</view>
|
||||
<view class="text-primary">12313</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>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-24rpx text-hex-999999 flex">
|
||||
<view class="w-140rpx">推荐人</view>
|
||||
<view class="text-primary">12313</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>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</MescrollItem>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import CuNavbar from '@/components/cu-navbar/index'
|
||||
import { ref } from '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"
|
||||
const tabList = ref([
|
||||
{
|
||||
name: '申请列表',
|
||||
name: "申请列表",
|
||||
apiUrl: "/hr/promotion/apply"
|
||||
},
|
||||
{
|
||||
name: '推荐列表',
|
||||
name: "推荐列表"
|
||||
},
|
||||
{
|
||||
name: '审核列表',
|
||||
},
|
||||
name: "审核列表"
|
||||
}
|
||||
])
|
||||
const mescrollItem0 = ref(null)
|
||||
const mescrollItem1 = ref(null)
|
||||
|
||||
const goPath = (url) => {
|
||||
const mescrollItems = [mescrollItem0, mescrollItem1]
|
||||
const { tabIndex, getMescroll, scrollToLastY } = useMescrollMore(mescrollItems, onPageScroll, onReachBottom)
|
||||
const goPath = url => {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
const tabChange = ({ index }) => {
|
||||
tabIndex.value = index
|
||||
scrollToLastY()
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue