commit
e20aff77c4
|
|
@ -168,6 +168,12 @@
|
||||||
"navigationBarTitleText": "升职申请"
|
"navigationBarTitleText": "升职申请"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "detail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "升职申请"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "create",
|
"path": "create",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -200,6 +206,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
"root": "pages/ask-leave",
|
"root": "pages/ask-leave",
|
||||||
"pages": [
|
"pages": [
|
||||||
{
|
{
|
||||||
|
|
@ -212,12 +219,41 @@
|
||||||
"path": "create",
|
"path": "create",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "请假申请"
|
"navigationBarTitleText": "请假申请"
|
||||||
|
=======
|
||||||
|
"root": "pages/train-books",
|
||||||
|
"pages": [
|
||||||
|
{
|
||||||
|
"path": "index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "培训课件"
|
||||||
|
>>>>>>> bef6694e8063f41c6890ee243e7b32e9f248c252
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "detail",
|
"path": "detail",
|
||||||
"style": {
|
"style": {
|
||||||
|
<<<<<<< HEAD
|
||||||
"navigationBarTitleText": "请假详情"
|
"navigationBarTitleText": "请假详情"
|
||||||
|
=======
|
||||||
|
"navigationBarTitleText": "培训课件"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root": "pages/examination",
|
||||||
|
"pages": [
|
||||||
|
{
|
||||||
|
"path": "index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "培训考试"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "detail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "培训考试"
|
||||||
|
>>>>>>> bef6694e8063f41c6890ee243e7b32e9f248c252
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="items-center justify-between">
|
||||||
|
<view>{{ index }}/{{ total }}</view>
|
||||||
|
<view>
|
||||||
|
<view v-if="index > 0" @click="prev">上一题</view>
|
||||||
|
<view v-if="index < total" @click="next">下一题</view>
|
||||||
|
<view v-if="index >= total" @click="submit">提交</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
<template v-for="(item, key) in list" :key="key">
|
||||||
|
<view v-show="key == index" class="item">
|
||||||
|
<view class="title">({{ item.cate_name }}){{ item.title }}</view>
|
||||||
|
<view class="options">
|
||||||
|
<u-checkbox-group v-if="item.cate == 1">
|
||||||
|
<u-checkbox v-for="(option, optionKey) in item.options" :key="optionKey" :label="option.text" :name="optionKey" />
|
||||||
|
</u-checkbox-group>
|
||||||
|
<u-radio-group v-if="item.cate == 2">
|
||||||
|
<u-radio v-for="(option, optionKey) in item.options" :key="optionKey" :label="option.text" :name="optionKey" />
|
||||||
|
</u-radio-group>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { http } from '@/utils/request'
|
||||||
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
const info = ref({})
|
||||||
|
// 考题记录
|
||||||
|
const list = ref([])
|
||||||
|
// 总题数
|
||||||
|
const total = ref(0)
|
||||||
|
// 序号
|
||||||
|
const index = ref(0)
|
||||||
|
// 只读模式
|
||||||
|
const readonly = ref(true)
|
||||||
|
onLoad((options) => {
|
||||||
|
http.get(`/train/examinations/${options.id}`).then(res => {
|
||||||
|
if (res.finished_at) {
|
||||||
|
readonly = false
|
||||||
|
}
|
||||||
|
info.value = res
|
||||||
|
list.value = res.content
|
||||||
|
total.value = res.content.length
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const next = () => {
|
||||||
|
if (index < total) {
|
||||||
|
index.value++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const prev = () => {
|
||||||
|
if (index > 0) {
|
||||||
|
index.value--
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const submit = () => {
|
||||||
|
http.post(`/train/examinations/${info.id}/answer`).then(res => {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<CuNavbar title="培训考试"></CuNavbar>
|
||||||
|
<MescrollItem :top="88" :i="0" apiUrl="/train/examinations">
|
||||||
|
<template v-slot="{ list }">
|
||||||
|
<view class="space-y-15rpx p-base">
|
||||||
|
<template v-for="item in list" :key="item.id">
|
||||||
|
<view class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx" @click="detail(item)">
|
||||||
|
<view class="text-30rpx">{{ item.name }}</view>
|
||||||
|
<view class="flex items-center justify-between">
|
||||||
|
<view class="text-30rpx">发布日期: {{ item.examination.published_at }}</view>
|
||||||
|
<view class="text-30rpx">{{ item.mark == null ? item.mark : '未完成' }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</MescrollItem>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { http } from '@/utils/index'
|
||||||
|
import CuNavbar from '@/components/cu-navbar/index'
|
||||||
|
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
|
||||||
|
import MescrollItem from '@/components/mescroll-api/more.vue'
|
||||||
|
|
||||||
|
const mescrollItem = ref('')
|
||||||
|
|
||||||
|
const { getMescroll, scrollToLastY } = useMescrollMore(
|
||||||
|
mescrollItem,
|
||||||
|
onPageScroll,
|
||||||
|
onReachBottom
|
||||||
|
)
|
||||||
|
|
||||||
|
const detail = (item) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/examination/detail?id=${item.id}`,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -68,7 +68,7 @@ const formRef = ref(null)
|
||||||
const datetimePicker = ref(null)
|
const datetimePicker = ref(null)
|
||||||
const pickerRef = ref(null)
|
const pickerRef = ref(null)
|
||||||
const modalRef = ref(null)
|
const modalRef = ref(null)
|
||||||
// const value = ref(Number(new Date())
|
const value = ref(Number(new Date()))
|
||||||
const id = ref(0)
|
const id = ref(0)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
|
|
@ -108,6 +108,7 @@ onLoad(options => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
value.value = res.date
|
||||||
form.date = timeFormat(res.date, "yyyy-mm-dd hh:MM")
|
form.date = timeFormat(res.date, "yyyy-mm-dd hh:MM")
|
||||||
form.reason = res.reason
|
form.reason = res.reason
|
||||||
form.isOutSide = res.sign_type == 1 ? false : true
|
form.isOutSide = res.sign_type == 1 ? false : true
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<CuNavbar :isBack="isBack" title="上报"></CuNavbar>
|
<CuNavbar :isBack="isBack" title="上报"></CuNavbar>
|
||||||
<view :class="[checkPermission(['store']) ? '' : 'pointer-events-none']">
|
<view
|
||||||
|
:class="[
|
||||||
|
checkPermission(['store']) && form.allow_rereport
|
||||||
|
? ''
|
||||||
|
: 'pointer-events-none',
|
||||||
|
]"
|
||||||
|
>
|
||||||
<uv-form
|
<uv-form
|
||||||
class="mt-30rpx"
|
class="mt-30rpx"
|
||||||
labelPosition="left"
|
labelPosition="left"
|
||||||
|
|
@ -141,7 +147,13 @@
|
||||||
:style="style"
|
:style="style"
|
||||||
>
|
>
|
||||||
<view class="w-full">
|
<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>
|
</uv-button>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -251,12 +263,13 @@ const onSubmit = async () => {
|
||||||
url: '/ledgers',
|
url: '/ledgers',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
header: {
|
header: {
|
||||||
'Accept': 'application/json',
|
Accept: 'application/json',
|
||||||
},
|
},
|
||||||
data: params,
|
data: params,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
uni.$emit('revert:submit', res)
|
uni.$emit('revert:submit', res)
|
||||||
|
getData()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '提交成功',
|
title: '提交成功',
|
||||||
duration: 2000,
|
duration: 2000,
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,9 @@ const props = defineProps({
|
||||||
|
|
||||||
const onClick = () => {
|
const onClick = () => {
|
||||||
const type = props.item.taskable_type
|
const type = props.item.taskable_type
|
||||||
console.log(type)
|
uni.navigateTo({
|
||||||
|
url: `/pages/task/${type}_submit?id=${props.item.id}`,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const onTask = (e) => {
|
const onTask = (e) => {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
>
|
>
|
||||||
<uv-form-item label="清洁范围" required prop="content">
|
<uv-form-item label="清洁范围" required prop="content">
|
||||||
<uv-input
|
<uv-input
|
||||||
border="bottom"
|
:border="`bottom`"
|
||||||
placeholder="请输入清洁范围"
|
placeholder="请输入清洁范围"
|
||||||
v-model="form.content"
|
v-model="form.content"
|
||||||
></uv-input>
|
></uv-input>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<CuNavbar></CuNavbar>
|
||||||
|
<!-- 文章 -->
|
||||||
|
<template v-if="info.type == 1">
|
||||||
|
<view class="h-400rpx">
|
||||||
|
<uv-image width="100%" height="100%" :src="info.cover_image" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<!-- 视频 -->
|
||||||
|
<template v-if="info.type == 2">
|
||||||
|
<video class="w-full" :src="info.video" />
|
||||||
|
</template>
|
||||||
|
<view class="p-base space-y-10rpx">
|
||||||
|
<view class="font-500 text-30rpx">{{ info.title }}</view>
|
||||||
|
<view class="text-hex-999999">{{ info.description }}</view>
|
||||||
|
<view class="text-hex-999 text-right">{{
|
||||||
|
timeFormat(info.created_at)
|
||||||
|
}}</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<template v-if="info.type == 3">
|
||||||
|
<view class="p-base space-y-8rpx">
|
||||||
|
<view
|
||||||
|
v-for="item in info.files"
|
||||||
|
class="flex card-shadow bg-white rounded-19rpx p-base"
|
||||||
|
:key="item.id"
|
||||||
|
>
|
||||||
|
<view class="line-clamp-1 flex-1">
|
||||||
|
{{ item.name }}{{ item.name }}{{ item.name }}
|
||||||
|
</view>
|
||||||
|
<view @click="downloadFile(item.url)">
|
||||||
|
<uv-icon size="40rpx" name="download"></uv-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- 富文本 -->
|
||||||
|
<template v-if="info.content">
|
||||||
|
<uv-divider />
|
||||||
|
<view>
|
||||||
|
<uv-parse :content="info.content"></uv-parse>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import CuNavbar from '@/components/cu-navbar/index'
|
||||||
|
import { http } from '@/utils/request'
|
||||||
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { timeFormat } from '@climblee/uv-ui/libs/function'
|
||||||
|
|
||||||
|
const id = ref('')
|
||||||
|
const info = ref({})
|
||||||
|
onLoad((options) => {
|
||||||
|
id.value = options.id
|
||||||
|
http.get(`/train/books/${id.value}`).then((res) => {
|
||||||
|
info.value = res
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const downloadFile = (url) => {
|
||||||
|
uni.downloadFile({
|
||||||
|
url: url, // 文件的URL
|
||||||
|
success: function (res) {
|
||||||
|
console.log('下载成功', res)
|
||||||
|
// 在这里可以处理文件下载后的操作,比如保存到本地、读取文件内容等
|
||||||
|
},
|
||||||
|
fail: function (err) {
|
||||||
|
console.log('下载失败', err)
|
||||||
|
// 在这里可以处理文件下载失败的情况,比如重新下载、提示用户等
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
page {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<CuNavbar title="培训课件"></CuNavbar>
|
||||||
|
<uv-sticky bgColor="#fff">
|
||||||
|
<uv-tabs
|
||||||
|
height="44"
|
||||||
|
:activeStyle="{ color: '#ee2c37' }"
|
||||||
|
:scrollable="true"
|
||||||
|
:current="tabIndex"
|
||||||
|
lineColor="#ee2c37"
|
||||||
|
:list="tabList"
|
||||||
|
@change="tabChange"
|
||||||
|
></uv-tabs>
|
||||||
|
</uv-sticky>
|
||||||
|
|
||||||
|
<MescrollItem
|
||||||
|
v-for="(item, key) in tabList"
|
||||||
|
:key="item.id"
|
||||||
|
:ref="`mescrollItem${item.id}`"
|
||||||
|
:top="88"
|
||||||
|
:i="key"
|
||||||
|
:index="tabIndex"
|
||||||
|
apiUrl="/train/books"
|
||||||
|
:params="{ category_id: item.id }"
|
||||||
|
>
|
||||||
|
<template v-slot="{ list }">
|
||||||
|
<view class="space-y-15rpx mt-base">
|
||||||
|
<template v-for="subItem in list" :key="subItem.id">
|
||||||
|
<view
|
||||||
|
class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx"
|
||||||
|
@click="detail(subItem.id)"
|
||||||
|
>
|
||||||
|
<view class="flex">
|
||||||
|
<view
|
||||||
|
v-if="subItem.cover_image"
|
||||||
|
class="flex rounded-8rpx overflow-hidden"
|
||||||
|
>
|
||||||
|
<uv-image
|
||||||
|
:src="subItem.cover_image"
|
||||||
|
width="160rpx"
|
||||||
|
height="160rpx"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
class="ml-12rpx flex-1 flex flex-col justify-between space-y-10rpx"
|
||||||
|
>
|
||||||
|
<view class="text-26rpx font-500 line-clamp-2">{{
|
||||||
|
subItem.title
|
||||||
|
}}</view>
|
||||||
|
<view class="text-24rpx text-hex-999999">{{
|
||||||
|
subItem.description
|
||||||
|
}}</view>
|
||||||
|
<view class="text-22rpx text-hex-999999 text-right">{{
|
||||||
|
timeFormat(subItem.created_at)
|
||||||
|
}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</MescrollItem>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { http } from '@/utils/request'
|
||||||
|
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 { timeFormat } from '@climblee/uv-ui/libs/function'
|
||||||
|
|
||||||
|
const mescrollItems = ref([])
|
||||||
|
|
||||||
|
const { tabIndex, getMescroll, scrollToLastY } = useMescrollMore(
|
||||||
|
mescrollItems,
|
||||||
|
onPageScroll,
|
||||||
|
onReachBottom
|
||||||
|
)
|
||||||
|
let tabList = ref([])
|
||||||
|
http
|
||||||
|
.get('/keywords', { params: { parent_key: 'book_category' } })
|
||||||
|
.then((res) => {
|
||||||
|
tabList.value = res
|
||||||
|
})
|
||||||
|
|
||||||
|
const tabChange = ({ index }) => {
|
||||||
|
tabIndex.value = index
|
||||||
|
scrollToLastY()
|
||||||
|
}
|
||||||
|
|
||||||
|
const detail = (id) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/train-books/detail?id=${id}`,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -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>
|
<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="flex items-center justify-between">
|
||||||
<view class="text-30rpx"> {{ item.job.name }} </view>
|
<view class="text-30rpx"> {{ item.job.name }}</view>
|
||||||
<view class="text-24rpx text-hex-999999">待完成</view>
|
<view
|
||||||
|
class="text-24rpx"
|
||||||
|
:style="{
|
||||||
|
color: statusFun(item.promotion_status, 'promotion_status', 'color'),
|
||||||
|
}"
|
||||||
|
>{{ item.promotion_status_text }}</view
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-24rpx text-hex-999999 flex">
|
<view class="text-24rpx text-hex-999999 flex">
|
||||||
<view class="w-140rpx">推荐人</view>
|
<view class="w-140rpx">推荐人</view>
|
||||||
<view class="text-primary">12313</view>
|
<view class="">{{ item?.invitor?.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-24rpx text-hex-999999 flex">
|
<view class="text-24rpx text-hex-999999 flex">
|
||||||
<view class="w-140rpx">晋升职位</view>
|
<view class="w-140rpx">晋升职位</view>
|
||||||
<view class="text-hex-333">2022-01-01</view>
|
<view class="">{{ item.job.name }}</view>
|
||||||
</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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import statusFun from '@/utils/status'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: Object,
|
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>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,200 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<CuNavbar title="升值申请">
|
<commone :id="id" isEdit></commone>
|
||||||
<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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import CuNavbar from "@/components/cu-navbar/index"
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { ref, reactive, computed } from "vue"
|
import commone from './commone.vue'
|
||||||
import { onLoad } from "@dcloudio/uni-app"
|
import { ref } from 'vue'
|
||||||
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 id = ref(0)
|
||||||
const loading = ref(false)
|
|
||||||
const form = reactive({
|
onLoad((options) => {
|
||||||
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
|
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>
|
</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>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<CuNavbar title="升职申请">
|
<CuNavbar title="升职申请"> </CuNavbar>
|
||||||
<template #right>
|
|
||||||
<view @click="goPath('/pages/work/create')" class="text-24rpx text-white">申请</view>
|
|
||||||
</template>
|
|
||||||
</CuNavbar>
|
|
||||||
<uv-sticky bgColor="#fff">
|
<uv-sticky bgColor="#fff">
|
||||||
<uv-tabs
|
<uv-tabs
|
||||||
:activeStyle="{ color: '#ee2c37' }"
|
:activeStyle="{ color: '#ee2c37' }"
|
||||||
|
|
@ -14,11 +10,52 @@
|
||||||
@change="tabChange"
|
@change="tabChange"
|
||||||
></uv-tabs>
|
></uv-tabs>
|
||||||
</uv-sticky>
|
</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 }">
|
<template v-slot="{ list }">
|
||||||
<view class="space-y-15rpx p-base">
|
<view class="space-y-15rpx p-base">
|
||||||
<view v-for="(item, i) in list" :key="i">
|
<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>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -26,32 +63,48 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import CuNavbar from "@/components/cu-navbar/index"
|
import CuNavbar from '@/components/cu-navbar/index'
|
||||||
import { ref } from "vue"
|
import { ref } from 'vue'
|
||||||
import { onPageScroll, onReachBottom, onShow } from "@dcloudio/uni-app"
|
import { onPageScroll, onReachBottom, onShow } from '@dcloudio/uni-app'
|
||||||
import useMescrollMore from "@/uni_modules/mescroll-uni/hooks/useMescrollMore.js"
|
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
|
||||||
import MescrollItem from "@/components/mescroll-api/more.vue"
|
import MescrollItem from '@/components/mescroll-api/more.vue'
|
||||||
import Item from './components/item.vue'
|
import Item from './components/item.vue'
|
||||||
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
const tabList = ref([
|
const tabList = ref([
|
||||||
{
|
{
|
||||||
name: "申请列表",
|
name: '申请列表',
|
||||||
apiUrl: "/hr/promotion/apply"
|
apiUrl: '/hr/promotion/apply',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "推荐列表"
|
name: '推荐列表',
|
||||||
|
apiUrl: '/hr/promotion/apply',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "审核列表"
|
name: '审核列表',
|
||||||
}
|
apiUrl: '/workflow',
|
||||||
|
params: {
|
||||||
|
subject_type: 'employee_promotions',
|
||||||
|
},
|
||||||
|
},
|
||||||
])
|
])
|
||||||
const mescrollItem0 = ref(null)
|
const mescrollItem0 = ref(null)
|
||||||
const mescrollItem1 = ref(null)
|
const mescrollItem1 = ref(null)
|
||||||
|
const mescrollItem2 = ref(null)
|
||||||
|
|
||||||
const mescrollItems = [mescrollItem0, mescrollItem1]
|
const mescrollItems = [mescrollItem0, mescrollItem1, mescrollItem2]
|
||||||
const { tabIndex, getMescroll, scrollToLastY } = useMescrollMore(mescrollItems, onPageScroll, onReachBottom)
|
const { tabIndex, getMescroll, scrollToLastY } = useMescrollMore(
|
||||||
const goPath = url => {
|
mescrollItems,
|
||||||
|
onPageScroll,
|
||||||
|
onReachBottom
|
||||||
|
)
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
uni.$on('work:submit', getMescroll(tabIndex.value))
|
||||||
|
})
|
||||||
|
|
||||||
|
const goPath = (url) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url
|
url,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const tabChange = ({ index }) => {
|
const tabChange = ({ index }) => {
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,13 @@ page {
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-shadow{
|
.card-shadow {
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.04);
|
box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.04);
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.box-shadow {
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,28 @@ const data = {
|
||||||
name: '未完成',
|
name: '未完成',
|
||||||
color: '#999999'
|
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'
|
||||||
|
}],
|
||||||
// 不卡申请
|
// 不卡申请
|
||||||
workflow_check: [
|
workflow_check: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue