| | |
| | | > |
| | | <nut-button type="primary" @click.stop="checkContract">查看合约</nut-button> |
| | | </template> |
| | | <nut-button v-else type="primary" @click.stop="goSignContract">签约</nut-button> |
| | | <nut-button v-else type="primary" @click.stop="goSignContract(item)">签约</nut-button> |
| | | </template> |
| | | </FlexJobCard> |
| | | </template> |
| | |
| | | import { RouterPath } from '@/constants'; |
| | | import { useInfiniteLoading } from '@12333/hooks'; |
| | | import { OrderInputType } from '@12333/constants'; |
| | | import * as orderServices from '@12333/services/api/Order'; |
| | | import * as flexWorkerServices from '@12333/services/api/FlexWorker'; |
| | | import { TaskStatus } from '@/constants/task'; |
| | | import Taro from '@tarojs/taro'; |
| | | |
| | |
| | | |
| | | const { infiniteLoadingProps } = useInfiniteLoading( |
| | | ({ pageParam }) => { |
| | | let params: API.FrontOrderListInput = { |
| | | let params: API.GetFlexTaskListInput = { |
| | | pageModel: { |
| | | rows: 20, |
| | | page: pageParam, |
| | | orderInput: [{ property: 'isRecommend', order: OrderInputType.Desc }], |
| | | orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }], |
| | | }, |
| | | }; |
| | | |
| | | return orderServices.getFrontOrderList(params, { |
| | | return flexWorkerServices.getFlexTaskByArrange(params, { |
| | | showLoading: false, |
| | | }); |
| | | }, |
| | | { |
| | | queryKey: ['orderServices/getFrontOrderList'], |
| | | queryKey: ['flexWorkerServices/getFlexTaskByArrange'], |
| | | } |
| | | ); |
| | | |
| | | function goDetail(item: API.FrontOrderList) { |
| | | function goDetail(item: API.GetFlexTaskListOutput) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.flexJobDetailFromManage}?id=${item.id}`, |
| | | url: `${RouterPath.flexJobDetailFromManage}?id=${item.taskId}`, |
| | | }); |
| | | } |
| | | |
| | | function checkContract() {} |
| | | function handleUnContract() {} |
| | | function goSignContract() {} |
| | | function goSignContract(item: API.GetFlexTaskListOutput) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.flexJobSign}`, |
| | | }); |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |