From c8b32b8bca79a116cfab70eb8c389907b664c9ca Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 23 四月 2025 10:43:14 +0800
Subject: [PATCH] 提交
---
h5/pages/workOrder/workOrder.vue | 370 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 366 insertions(+), 4 deletions(-)
diff --git a/h5/pages/workOrder/workOrder.vue b/h5/pages/workOrder/workOrder.vue
index 8c3b35f..eaf750a 100644
--- a/h5/pages/workOrder/workOrder.vue
+++ b/h5/pages/workOrder/workOrder.vue
@@ -1,19 +1,381 @@
<template>
- <view>
-
+ <view class="report">
+ <view class="report_search">
+ <view class="report_search_row" @click="show = true">
+ <text>{{type ? type : '绫诲瀷'}}</text>
+ <u-icon name="arrow-down-fill" color="#666666" size="13"></u-icon>
+ </view>
+ <view class="report_search_row" @click="show1 = true">
+ <text>{{status ? status : '瑙e喅鎯呭喌'}}</text>
+ <u-icon name="arrow-down-fill" color="#666666" size="13"></u-icon>
+ </view>
+ <view class="report_search_row" @click="$refs.pengTree._show()" v-if="['3'].includes(typeId)">
+ <text>{{localtionId ? locationName : '鍙戠敓鍦扮偣'}}</text>
+ <u-icon name="arrow-down-fill" color="#666666" size="13"></u-icon>
+ </view>
+ <view class="report_search_row" @click="$refs.pengTree1._show()" v-if="['1'].includes(typeId)">
+ <text>{{localtionId ? locationName : '浣嶇疆'}}</text>
+ <u-icon name="arrow-down-fill" color="#666666" size="13"></u-icon>
+ </view>
+ </view>
+ <view class="report_list">
+ <view class="report_list_row" v-for="(item, index) in list" :key="index" @click="jump(item)">
+ <view class="report_list_row_icon">
+ <image src="/static/tabbar/nav_gongdan_sel@2x.png" mode="widthFix"></image>
+ </view>
+ <view class="report_list_row_info" v-if="[0].includes(item.type)">
+ <text>{{titleType(item.type)}}</text>
+ <text>{{userType(item.memberType)}}-{{item.memberNames}} {{item.happenTime.substring(0, 16)}}/{{item.locationName}}/{{item.typeName}}</text>
+ <text>{{item.submitDate.substring(0, 16)}}</text>
+ </view>
+ <view class="report_list_row_info" v-else-if="[3].includes(item.type)">
+ <text>{{titleType(item.type)}}</text>
+ <text>{{item.happenTime.substring(0, 16)}}/{{item.locationName}}/{{item.typeName}}</text>
+ <text>{{item.submitDate.substring(0, 16)}}</text>
+ </view>
+ <view class="report_list_row_info1" v-else>
+ <text>DCA</text>
+ <text>{{item.typeName || '-'}}/{{item.categoryName || '-'}}</text>
+ <text>绗﹀悎锛歿{item.dcaYesNum}} 涓嶇鍚堬細{{item.dcaNoNum}}</text>
+ <text>{{item.createDate.substring(0, 16)}}</text>
+ </view>
+ <view class="report_list_row_dian success" v-if="[3,4,5].includes(item.status)"></view>
+ <view class="report_list_row_dian error" v-else-if="[0,1,2].includes(item.status)"></view>
+ </view>
+ </view>
+ <!-- 鏃犳暟鎹� -->
+ <u-loadmore :line="true" status="nomore" v-if="!search.next"></u-loadmore>
+ <!-- 绫诲瀷 -->
+ <u-picker :show="show" keyName="label" immediateChange :columns="columns" @confirm="confirmType" @cancel="show = false"></u-picker>
+ <!-- 瑙e喅鎯呭喌 -->
+ <u-picker :show="show1" keyName="label" immediateChange :columns="columns1" @confirm="confirmStatus" @cancel="show1 = false"></u-picker>
+ <!-- 鍙戠敓鍦扮偣 -->
+ <peng-tree
+ ref="pengTree"
+ :range="address"
+ idKey="id"
+ :selectParent="false"
+ nameKey="name"
+ :multiple="false"
+ title="閫夋嫨鍦扮偣"
+ @confirm="selectAddress"
+ @cancel="$refs.pengTree._hide()">
+ </peng-tree>
+ <!-- 浣嶇疆 -->
+ <peng-tree
+ ref="pengTree1"
+ :range="address1"
+ idKey="id"
+ :selectParent="false"
+ nameKey="name"
+ :multiple="false"
+ title="浣嶇疆"
+ @confirm="selectAddress1"
+ @cancel="$refs.pengTree._hide()">
+ </peng-tree>
</view>
</template>
<script>
+ import { mapState } from 'vuex'
+ import pengTree from '@/uni_modules/peng-tree/peng-tree/peng-tree.vue'
export default {
+ components: { pengTree },
+ computed: {
+ ...mapState(['userInfo'])
+ },
data() {
return {
-
+ show: false,
+ show1: false,
+ show2: false,
+ type: '',
+ typeId: '',
+ status: '',
+ statusId: '',
+ locationName: '',
+ localtionId: '',
+ columns: [
+ [
+ { label: '鍏ㄩ儴', id: '' },
+ { label: 'DCA', id: '1' },
+ { label: '璺岀粖婊戦闄╀笂鎶�', id: '3' },
+ { label: 'SHE浜嬩欢涓婃姤', id: '0' }
+ ]
+ ],
+ columns1: [
+ [
+ { label: '鍏ㄩ儴', id: '' },
+ { label: '鏈В鍐�', id: '0' },
+ { label: '宸茶В鍐�', id: '1' }
+ ]
+ ],
+ search: {
+ page: 1,
+ next: true
+ },
+ list: [],
+ address: [],
+ address1: []
};
+ },
+ onLoad() {
+ this.getLocation()
+ this.getLocation1()
+ },
+ onShow() {
+ this.$nextTick(() => {
+ this.$refs.pengTree._hide()
+ this.$refs.pengTree1._hide()
+ })
+ this.show = false
+ this.show1 = false
+ this.search.page = 1
+ this.search.next = true
+ this.list = []
+ this.getList()
+ },
+ onReachBottom() {
+ this.getList()
+ },
+ methods: {
+ // 閫夋嫨鍙戠敓鍦扮偣
+ selectAddress(e) {
+ this.localtionId = e[0].id
+ this.locationName = e[0].name
+ this.search.page = 1
+ this.search.next = true
+ this.list = []
+ this.getList()
+ this.$refs.pengTree._hide()
+ },
+ // 浣嶇疆
+ selectAddress1(e) {
+ this.localtionId = e[0].id
+ this.locationName = e[0].name
+ this.search.page = 1
+ this.search.next = true
+ this.list = []
+ this.getList()
+ this.$refs.pengTree1._hide()
+ },
+ // 鑾峰彇鍙戠敓鍦扮偣鏍�
+ async getLocation() {
+ let res = await this.$u.api.categoryTree({ categoryType: 2 })
+ if (res.code === 200) {
+ res.data.unshift({ name: '鍏ㄩ儴', id: '', childList: [] })
+ this.address = res.data
+ }
+ },
+ // 鑾峰彇浣嶇疆鏍�
+ async getLocation1() {
+ let res = await this.$u.api.categoryTree({ categoryType: 3 })
+ if (res.code === 200) {
+ res.data.unshift({ name: '鍏ㄩ儴', id: '', childList: [] })
+ this.address1 = res.data
+ }
+ },
+ getList() {
+ if (!this.search.next) return
+ this.$u.api.page({
+ capacity: 10,
+ page: this.search.page,
+ model: {
+ myWorkOrder: 1,
+ type: this.typeId,
+ dealStatus: this.statusId,
+ localtionId: this.localtionId
+ }
+ }).then(res => {
+ if (res.code === 200) {
+ this.list = [...this.list, ...res.data.records]
+ if (this.list.length === res.data.total) {
+ this.search.next = false
+ }
+ this.search.page++
+ }
+ })
+ },
+ // 鍒囨崲绫诲瀷
+ confirmType(e) {
+ this.type = e.value[0].label
+ this.typeId = e.value[0].id
+
+ this.localtionId = ''
+ this.locationName = ''
+ this.status = ''
+ this.statusId = ''
+ this.search.page = 1
+ this.search.next = true
+ this.list = []
+ this.getList()
+ this.show = false
+ },
+ confirmStatus(e) {
+ this.status = e.value[0].label
+ this.statusId = e.value[0].id
+ this.search.page = 1
+ this.search.next = true
+ this.list = []
+ this.getList()
+ this.show1 = false
+ },
+ // 璺宠浆璇︽儏
+ jump(item) {
+ if (item.type === 0) {
+ uni.navigateTo({
+ url: `/pages/details_she/details_she?id=${item.id}`
+ })
+ } else if (item.type === 3) {
+ uni.navigateTo({
+ url: `/pages/workOrder_she/workOrder_she?id=${item.id}`
+ })
+ } else if (item.type === 1) {
+ uni.navigateTo({
+ url: `/pages/details_dca/details_dca?id=${item.id}&isShow=true`
+ })
+ }
+ },
+ userType(type) {
+ if (type === 0) {
+ return '鏈汉'
+ } else if (type === 1) {
+ return '鍚屼簨'
+ } else if (type === 2) {
+ return '渚涘簲鍟�'
+ }
+ },
+ titleType(type) {
+ if (type === 0) {
+ return 'SHE浜嬩欢涓婃姤'
+ } else if (type === 3) {
+ return '璺岀粖婊戜簨浠朵笂鎶�'
+ }
+ }
}
}
</script>
<style lang="scss">
-
+ .report {
+ width: 100%;
+ .report_search {
+ width: 100%;
+ height: 100rpx;
+ display: flex;
+ align-items: center;
+ padding: 0 30rpx;
+ box-sizing: border-box;
+ border-bottom: 1rpx solid #ececec;
+ background-color: #ffffff;
+ position: sticky;
+ top: 0;
+ left: 0;
+ z-index: 9;
+ .report_search_row {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ text {
+ font-size: 28rpx;
+ color: #222222;
+ margin-right: 8rpx;
+ }
+ }
+ }
+ .report_list {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ .report_list_row {
+ width: 100%;
+ padding: 34rpx 36rpx;
+ box-sizing: border-box;
+ border-bottom: 1rpx solid #ececec;
+ display: flex;
+ align-items: center;
+ &:last-child {
+ border: none;
+ }
+ .report_list_row_dian {
+ flex-shrink: 0;
+ width: 16rpx;
+ height: 16rpx;
+ border-radius: 50%;
+ margin-left: 30rpx;
+ }
+ .success {
+ background-color: rgba(52,199,88,1);
+ }
+ .error {
+ background-color: red;
+ }
+ .report_list_row_icon {
+ flex-shrink: 0;
+ width: 56rpx;
+ height: 56rpx;
+ margin-right: 20rpx;
+ image {
+ width: 100%;
+ height: 100%;
+ }
+ }
+ .report_list_row_info {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ text {
+ &:nth-child(1) {
+ font-size: 28rpx;
+ color: #222222;
+ font-weight: 600;
+ }
+ &:nth-child(2) {
+ font-size: 24rpx;
+ color: #666666;
+ font-weight: 400;
+ margin: 6rpx 0;
+ }
+ &:nth-child(3) {
+ font-size: 24rpx;
+ color: #999999;
+ font-weight: 400;
+ }
+ }
+ }
+ .report_list_row_info1 {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ text {
+ &:nth-child(1) {
+ font-size: 28rpx;
+ color: #222222;
+ font-weight: 600;
+ }
+ &:nth-child(2) {
+ font-size: 24rpx;
+ color: #666666;
+ font-weight: 400;
+ margin-top: 6rpx;
+ }
+ &:nth-child(3) {
+ color: rgba(16,16,16,1);
+ font-size: 24rpx;
+ font-weight: 400;
+ margin-top: 6rpx;
+ }
+ &:nth-child(4) {
+ font-size: 24rpx;
+ color: #999999;
+ font-weight: 400;
+ margin-top: 6rpx;
+ }
+ }
+ }
+ }
+ }
+ }
</style>
--
Gitblit v1.9.3