<template>
|
<ProTabs
|
v-model="queryState.mineHireType"
|
name="home-tab"
|
:showPaneContent="false"
|
class="home-tabs"
|
isTransparent
|
title-gutter="12"
|
title-scroll
|
>
|
<ProTabPane :title="`已签约`" :pane-key="TaskStatus.All"></ProTabPane>
|
<ProTabPane :title="`待签约`" :pane-key="TaskStatus.WaitSign"></ProTabPane>
|
<ProTabPane :title="`已解约`" :pane-key="TaskStatus.Effect"></ProTabPane>
|
</ProTabs>
|
<InfiniteLoading
|
scrollViewClassName="common-infinite-scroll-list home-list"
|
v-bind="infiniteLoadingProps"
|
>
|
<template #renderItem="{ item }">
|
<FlexJobCard :show-done-detail="false" :show-footer-left="false" @click="goDetail(item)">
|
<template #footerRight>
|
<template v-if="Number(queryState.mineHireType) === TaskStatus.All">
|
<nut-button
|
class="flexJobManage-card-plain-button"
|
type="default"
|
plain
|
@click.stop="handleUnContract"
|
>解约</nut-button
|
>
|
<nut-button type="primary" @click.stop="checkContract">查看合约</nut-button>
|
</template>
|
<nut-button v-else type="primary" @click.stop="goSignContract(item)">签约</nut-button>
|
</template>
|
</FlexJobCard>
|
</template>
|
</InfiniteLoading>
|
</template>
|
|
<script setup lang="ts">
|
import { FlexJobCard, ProTabs, ProTabPane } from '@12333/components';
|
import { RouterPath } from '@/constants';
|
import { useInfiniteLoading } from '@12333/hooks';
|
import { OrderInputType } from '@12333/constants';
|
import * as orderServices from '@12333/services/api/Order';
|
import { TaskStatus } from '@/constants/task';
|
import Taro from '@tarojs/taro';
|
|
defineOptions({
|
name: 'InnerPage',
|
});
|
|
const queryState = reactive({
|
mineHireType: TaskStatus.All,
|
});
|
|
const { infiniteLoadingProps } = useInfiniteLoading(
|
({ pageParam }) => {
|
let params: API.FrontOrderListInput = {
|
pageModel: {
|
rows: 20,
|
page: pageParam,
|
orderInput: [{ property: 'isRecommend', order: OrderInputType.Desc }],
|
},
|
};
|
|
return orderServices.getFrontOrderList(params, {
|
showLoading: false,
|
});
|
},
|
{
|
queryKey: ['orderServices/getFrontOrderList'],
|
}
|
);
|
|
function goDetail(item: API.FrontOrderList) {
|
Taro.navigateTo({
|
url: `${RouterPath.flexJobDetailFromManage}?id=${item.id}`,
|
});
|
}
|
|
function checkContract() {}
|
function handleUnContract() {}
|
function goSignContract(item: API.FrontOrderList) {
|
Taro.navigateTo({
|
url: `${RouterPath.flexJobSign}`,
|
});
|
}
|
</script>
|
|
<style lang="scss">
|
@import '@/styles/common.scss';
|
|
.flexJobManage-page-wrapper {
|
.flexJobManage-card-plain-button {
|
margin-right: 30px;
|
|
&.nut-button--plain {
|
border-width: 1px;
|
}
|
}
|
}
|
</style>
|