From 174350e855349919ee287a52d3198c7c7558b858 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 02 四月 2024 14:21:22 +0800
Subject: [PATCH] mrshi
---
wx/pages/details_dispatch_unit/details_dispatch_unit.vue | 144 +++++++++++++++++++++++++++++++++---------------
1 files changed, 99 insertions(+), 45 deletions(-)
diff --git a/wx/pages/details_dispatch_unit/details_dispatch_unit.vue b/wx/pages/details_dispatch_unit/details_dispatch_unit.vue
index 2b70d09..e902140 100644
--- a/wx/pages/details_dispatch_unit/details_dispatch_unit.vue
+++ b/wx/pages/details_dispatch_unit/details_dispatch_unit.vue
@@ -1,88 +1,101 @@
<template>
<view class="details">
- <view class="details_back" :style="{ background: returnStyle(0) }"></view>
+ <template v-if="info">
+ <view class="details_back" :style="{ background: returnStyle(info.status) }"></view>
+ </template>
<view class="box">
<view class="box_info">
- <view class="box_info_head" :style="{ background: returnStyle1(0) }">
- <view class="box_info_head_left">
- <text>澶у湴鎰忓淇濋櫓</text>
- <text>鍏宠仈淇濆崟鍙凤細29102938988921</text>
+ <template v-if="info">
+ <view class="box_info_head" :style="{ background: returnStyle1(info.status) }">
+ <view class="box_info_head_left">
+ <text>{{info.solutionsName || ''}}</text>
+ <text>鍏宠仈淇濆崟鍙凤細{{info.applyCode || ''}}</text>
+ </view>
+ <image v-if="info.status === 2" src="@/static/icon/progress_yishengxiao@2x.png" mode="widthFix"></image>
+ <image v-if="info.status === 1" src="@/static/icon/progress_daishenhe@2x.png" mode="widthFix"></image>
+ <image v-if="info.status === 0" src="@/static/icon/progress_daiqianshu@2x.png" mode="widthFix"></image>
+ <image v-if="info.status === 3 || info.status === 4" src="@/static/icon/progress_shenqingtuihui@2x.png" mode="widthFix"></image>
+ <image v-if="info.status === 5 || info.status === 8" src="@/static/icon/progress_yituihui@2x.png" mode="widthFix"></image>
+ <image v-if="info.status === 6" src="@/static/icon/progress_yiguanbi@2x.png" mode="widthFix"></image>
</view>
- <image src="@/static/icon/progress_yishengxiao@2x.png" mode="widthFix"></image>
- </view>
+ </template>
<view class="box_info_center">
<view class="box_info_center_x"></view>
</view>
<view class="box_info_list">
<view class="box_info_list_item">
<view class="box_info_list_item_label">鏇存崲娲鹃仯鍗曚綅浜烘暟锛�</view>
- <view class="box_info_list_item_val">10浜�</view>
+ <view class="box_info_list_item_val">{{info.changeNum || 0}}浜�</view>
</view>
<view class="box_info_list_item">
<view class="box_info_list_item_label">鎵瑰崟鍙凤細</view>
- <view class="box_info_list_item_val">32432310010394</view>
+ <view class="box_info_list_item_val">{{info.validCode || '-'}}</view>
</view>
<view class="box_info_list_item">
<view class="box_info_list_item_label">鎵瑰崟鐢熸晥鏈燂細</view>
- <view class="box_info_list_item_val">2024.01.01 00:00:00</view>
+ <view class="box_info_list_item_val">{{info.applyStartTime}}</view>
</view>
</view>
</view>
<view class="box_people">
<view class="box_people_label">鏇存崲娲鹃仯鍗曚綅浜哄憳鍚嶅崟</view>
<view class="box_people_list">
- <view class="box_people_list_item" v-for="(item, index) in 3" :key="index">
+ <view class="box_people_list_item" v-for="(item, index) in list" :key="index">
<view class="item_head">
<view class="item_head_top">
- <text>寮犲皬骞�</text>
- <text>鐢凤綔23宀�</text>
+ <text>{{item.memberName}}</text>
+ <text>{{item.sex == 0 ? '鐢�' : '濂�'}}锝渰{item.age}}宀�</text>
</view>
<view class="item_head_bottom">
- 韬唤璇佸彿锛� 342425199001119999
+ 韬唤璇佸彿锛歿{item.memberIdcardNo}}
</view>
</view>
<view class="item_x"></view>
<view class="item_list">
<view class="item_list_item">
- <view class="item_list_item_label">娲鹃仯鍗曚綅锛�</view>
- <view class="item_list_item_val">瀹夊窘鐪佹牸鍔涘伐绋嬪缓璁炬湁闄愯矗浠诲叕鍙�</view>
+ <view class="item_list_item_label">鍘熸淳閬e崟浣嶏細</view>
+ <view class="item_list_item_val">{{item.oldDuName}}</view>
</view>
<view class="item_list_item">
- <view class="item_list_item_label">鎵�灞炲伐绉嶏細</view>
- <view class="item_list_item_val">1绫� 瀹変繚鍙婂贰鏌ヤ汉鍛�</view>
+ <view class="item_list_item_label">鍘熸墍灞炲伐绉嶏細</view>
+ <view class="item_list_item_val">{{item.oldWorkTypeName}}</view>
</view>
<view class="item_list_item">
<view class="item_list_item_label">鏇存崲鍚庢淳閬e崟浣嶏細</view>
- <view class="item_list_item_val">瀹夊窘鐪佹牸鍔涘伐绋嬪缓璁炬湁闄愯矗浠诲叕鍙�</view>
+ <view class="item_list_item_val">{{item.duName}}</view>
</view>
<view class="item_list_item">
<view class="item_list_item_label">鏇存崲鍚庢墍灞炲伐绉嶏細</view>
- <view class="item_list_item_val">1绫� 瀹変繚鍙婂贰鏌ヤ汉鍛�</view>
+ <view class="item_list_item_val">{{item.workTypeName}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
- <view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 100rpx);"></view>
- <!-- 宸茬敓鏁� -->
- <view class="details_footer">
- <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鏌ョ湅鐢宠鍗�"></u-button>
- <view style="width: 44rpx; height: 50rpx;"></view>
- <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鏌ョ湅鎵瑰崟"></u-button>
- </view>
- <!-- 寰呭鏍� | 寰呯缃� -->
- <!-- <view class="details_footer">
- <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鐢宠閫�鍥�"></u-button>
- <view style="width: 44rpx; height: 50rpx;"></view>
- <u-button type="primary" shape="circle" color="#437CB3" text="鏌ョ湅鐢宠鍗�"></u-button>
- </view> -->
- <!-- 宸查��鍥� -->
- <!-- <view class="details_footer">
- <u-button type="primary" shape="circle" color="#437CB3" @click="show2 = true" :plain="true" text="鍏抽棴璁㈠崟"></u-button>
- <view style="width: 44rpx; height: 50rpx;"></view>
- <u-button type="primary" shape="circle" color="#437CB3" text="鍐嶆鎻愪氦"></u-button>
- </view> -->
+ <template v-if="info">
+ <view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 100rpx);" v-if="[2,1,0,5,8].includes(info.status)"></view>
+ </template>
+ <template v-if="info">
+ <!-- 宸茬敓鏁� -->
+ <view class="details_footer" v-if="info.status === 2">
+ <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鏌ョ湅鐢宠鍗�"></u-button>
+ <view style="width: 44rpx; height: 50rpx;"></view>
+ <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鏌ョ湅鎵瑰崟"></u-button>
+ </view>
+ <!-- 寰呭鏍� | 寰呯缃� -->
+ <view class="details_footer" v-if="info.status === 1 || info.status === 0">
+ <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鐢宠閫�鍥�"></u-button>
+ <view style="width: 44rpx; height: 50rpx;"></view>
+ <u-button type="primary" shape="circle" color="#437CB3" text="鏌ョ湅鐢宠鍗�"></u-button>
+ </view>
+ <!-- 宸查��鍥� -->
+ <view class="details_footer" v-if="info.status === 5 || info.status === 8">
+ <u-button type="primary" shape="circle" color="#437CB3" @click="show2 = true" :plain="true" text="鍏抽棴璁㈠崟"></u-button>
+ <view style="width: 44rpx; height: 50rpx;"></view>
+ <u-button type="primary" shape="circle" color="#437CB3" text="鍐嶆鎻愪氦"></u-button>
+ </view>
+ </template>
<!-- 鐢宠閫�鍥炵‘璁ゅ脊绐� -->
<u-modal :show="show" title="娓╅Θ鎻愮ず" :showCancelButton="true" cancelText="鎴戝啀鎯虫兂" confirmColor="#437CB3" @cancel="cancel" @confirm="confirm">
纭鐢宠閫�鍥烇紵
@@ -110,6 +123,11 @@
export default {
data() {
return {
+ id: null,
+ info: null,
+ page: 1,
+ next: false,
+ list: [],
show: false,
show1: false,
show2: false,
@@ -120,7 +138,43 @@
}]
};
},
+ onLoad(option) {
+ this.id = option.id
+ this.getDetail()
+ },
+ onReachBottom() {
+ this.getList()
+ },
methods: {
+ getDetail() {
+ this.$u.api.applyChangeById(this.id)
+ .then(res => {
+ if (res.code === 200) {
+ this.info = res.data
+ this.getList()
+ }
+ })
+ },
+ getList() {
+ if (this.next) return
+ this.$u.api.applyChagneDetailPage({
+ capacity: 10,
+ page: this.page,
+ model: {
+ applyChangeId: this.info.id,
+ types:[2]
+ }
+ }).then(res => {
+ if (res.code === 200) {
+ if (res.data.records.length > 0) {
+ this.page++
+ this.list.push(...res.data.records)
+ } else {
+ this.next = true
+ }
+ }
+ })
+ },
confirm() {
this.show = false
},
@@ -140,20 +194,20 @@
this.show2 = false
},
returnStyle(type) {
- if ([0].includes(type)) {
+ if ([2].includes(type)) {
return 'linear-gradient(#97DDC5 0%, #F7F7F7 100%);'
- } else if ([1,2,3].includes(type)) {
+ } else if ([1,0].includes(type)) {
return 'linear-gradient( 180deg, #FBC88C 0%, #F7F7F7 100%);'
- } else if ([4,5,6,7].includes(type)) {
+ } else if ([3,4,5,8,6].includes(type)) {
return ''
}
},
returnStyle1(type) {
- if ([0].includes(type)) {
+ if ([2].includes(type)) {
return 'linear-gradient( 180deg, #E5F7F1 0%, rgba(255,255,255,0) 100%)'
- } else if ([1,2,3].includes(type)) {
+ } else if ([1,0].includes(type)) {
return 'linear-gradient( 180deg, #FFF2E3 0%, rgba(255,255,255,0) 100%);'
- } else if ([4,5,6,7].includes(type)) {
+ } else if ([3,4,5,8,6].includes(type)) {
return '#ffffff'
}
}
--
Gitblit v1.9.3