| | |
| | | <!-- <text v-if="isLineOrRepair()" class="text-white">接单</text>--> |
| | | <!-- </template>--> |
| | | </wd-navbar> |
| | | <!-- 增加一个搜索栏 --> |
| | | <wd-search v-model="searchValue" @search="handleSearch"></wd-search> |
| | | <wd-tabs v-model="activeTab" @change="handleTabChange"> |
| | | <wd-tab title="待维修"></wd-tab> |
| | | <wd-tab title="已维修"></wd-tab> |
| | | </wd-tabs> |
| | | <!-- <wd-drop-menu>--> |
| | | <!-- <wd-drop-menu-item--> |
| | | <!-- v-model="resTypeId"--> |
| | |
| | | </template> |
| | | |
| | | <view class="bg-base"> |
| | | <res-card v-for="(item, index) in dataList" :key="item.id" :item="item" @click="handleResClick" /> |
| | | <res-card v-for="item in dataList" :key="item.id" :item="item" /> |
| | | </view> |
| | | </z-paging> |
| | | </template> |
| | |
| | | import { formatDate } from '@/utils/DateUtils' |
| | | import dayjs from "dayjs"; |
| | | import ResCard from "@/components/repair/res-card.vue"; |
| | | |
| | | const activeTab = ref(0) |
| | | const userStore = useUserStore() |
| | | |
| | | const message = useMessage() |
| | | const toast = useToast() |
| | | const searchValue = ref<string>('') |
| | | |
| | | /** |
| | | * 其他页面传过来的数据 |
| | |
| | | const queryParams: any = { |
| | | pageNum, |
| | | pageSize, |
| | | params: {}, |
| | | params: { |
| | | searchValue: searchValue.value, |
| | | }, |
| | | // reqType: resTypeId.value, |
| | | // status: status.value, |
| | | } |
| | |
| | | if (option?.from === 'scan') { |
| | | queryParams.assetNo = option.assetNo |
| | | } |
| | | queryParams.params.status = '0,1,2,3' |
| | | if (activeTab.value === 0) { |
| | | // 待维修:status 等于 1 或 2 或 3 |
| | | queryParams.params.status = '1,2' |
| | | } else { |
| | | // 已维修:status 等于 3 或 4 |
| | | queryParams.params.status = '3,4' |
| | | } |
| | | |
| | | queryParams.reqUser = userStore?.userInfo?.userId |
| | | if (isRepair()) { |
| | | queryParams.params.status = null |
| | | queryParams.params.status = undefined |
| | | queryParams.resUser = userStore?.userInfo?.userId |
| | | delete queryParams.reqUser |
| | | delete queryParams.params |
| | | } |
| | | getRepairResList(queryParams) |
| | | .then((res: any) => { |
| | |
| | | paging.value.reload() |
| | | } |
| | | |
| | | function handleTabChange() { |
| | | reloadData() |
| | | } |
| | | |
| | | // /** |
| | | // * 条目点击事件 |
| | | // * @param item |