瀏覽代碼

修改页面 对接info接口

lzm 3 月之前
父節點
當前提交
5490be7015

+ 43 - 18
pages/subpack/pages/application/componenets/page2.vue

@@ -1,24 +1,24 @@
 <template>
 	<view>
-		<view class="info-dot">基本信息</view>
+		<view class="info-dot">护理申请</view>
 		<view class="info-list">
-			<view class="info-item" v-for="(item, index) in objKeyValue" :key="index">
+			<view class="info-item" v-for="(item, index) in itemHandle" :key="index">
 				<text class="info-item-label">{{item.name}}</text>
-				<text class="info-item-content text-overflow">大厦大厦大叔大婶大厦大叔大婶大厦大叔大婶大叔大婶</text>
+				<text class="info-item-content text-overflow">{{item.value??'-'}}</text>
 			</view>
 		</view>
-		<view class="info-dot">申请理由</view>
+		<view class="info-dot">护理需求</view>
 		<view class="info-list">
 			<view class="info-item flex-column" style="align-items: flex-start;">
-				<view class="info-item-label">申请理由</view>
+				<view class="info-item-label">护理需求</view>
 				<view class="info-item-content info-item-content2">
-					<up-textarea v-model="value1" disabled placeholder=" " count />
+					<up-textarea v-model="item.careNeeds" disabled placeholder="-" count />
 				</view>
 			</view>
 			<view class="info-item flex-column" style="align-items: flex-start;">
-				<view class="info-item-label">详细说明</view>
+				<view class="info-item-label">备注</view>
 				<view class="info-item-content info-item-content2">
-					<up-textarea v-model="value2" disabled placeholder=" " count />
+					<up-textarea v-model="item.remark" disabled placeholder="-" count />
 				</view>
 			</view>
 		</view>
@@ -27,9 +27,14 @@
 
 <script setup>
 	import {
+		computed,
 		reactive,
 		ref
 	} from 'vue';
+	import {
+			getDict
+		} from '@/common/status/index.js'
+	
 	const props = defineProps({
 		item: {
 			type: Object,
@@ -40,27 +45,47 @@
 	})
 	const objKeyValue = reactive([{
 			name: '姓名',
-			key: 'name'
+			key: 'personName'
+		},
+		{
+			name: '首选性别',
+			key: 'nurseGender'
 		},
 		{
-			name: '证件号码',
-			key: 'idNumber'
+			name: '所在医院',
+			key: 'hospital'
 		},
 		{
-			name: '址',
+			name: '详细地址',
 			key: 'address'
 		},
 		{
-			name: '联系电话',
-			key: 'phoneNnumber'
+			name: '预计天数',
+			key: 'careDays'
 		},
 		{
-			name: '登记日期',
-			key: 'registeredDate'
+			name: '申请日期',
+			key: 'applyDate'
 		},
 	])
-	const value1 = ref('这是一条申请理由!!!!')
-	const value2 = ref('每一天都在这快乐的日子里快乐的生活着,想成为外面的世界里的一个过客,去厦门,去哈尔滨,去西藏,气云南….')
+	//中间层 - item和objKeyValue
+	const itemHandle = computed(()=>{
+		let itemArray = uni.$u.deepClone(objKeyValue);
+		itemArray.map(keyObj=>{
+			if(props.item.hasOwnProperty(keyObj.key)){
+				let value = props.item[keyObj.key];
+				if(keyObj.key === 'nurseGender'){
+					value = getDict('sys_user_sex', {dictValue: value}).dictLabel??'-';
+				}
+				keyObj.value = value;
+			}
+		})
+		return itemArray;
+	})
+
+
+
+
 </script>
 
 <style lang="scss" scoped>

+ 66 - 4
pages/subpack/pages/application/componenets/page3.vue

@@ -66,8 +66,14 @@
 <script setup>
 	import {
 		computed,
-		reactive
+		onMounted,
+		reactive,
+		ref
 	} from 'vue';
+	import {
+			getDict
+		} from '@/common/status/index.js'
+		
 	const props = defineProps({
 		item: {
 			type: Object,
@@ -76,12 +82,47 @@
 			}
 		}
 	})
+	const allFlowKey = {
+		status: {
+			'no_check': {
+				flowIndex: 1,
+				status: 1
+			},
+			'assigned': {
+				flowIndex: 3,
+				status: 2
+			},
+			'wait_assign_company': {
+				flowIndex: 3,
+				status: 1
+			},
+			'disagree': {
+				flowIndex: 2,
+				status: 0
+			},
+			'agree': {
+				flowIndex: 1,
+				status: 2
+			},
+			'wait_check': {
+				flowIndex: 2,
+				status: 1
+			},
+			'wait_assign_nurse': {
+				flowIndex: 4,
+				status: 1
+			},
+			
+		}
+	}
+	
 	// 0 不同意 1 待审  2 同意
-	const flowList = reactive([{
+	const allFlow = [{
 			flowName: '资料提交',
 			name: '乡镇民政所',
 			time: '2025-01-01 10:20:30',
 			des: '',
+			statusName: '',
 			status: 2,
 		},
 		{
@@ -89,6 +130,7 @@
 			name: '区民政局',
 			time: '2025-01-01 10:20:30',
 			des: '意见:同意开门多少度啥平开门大厦科目都是',
+			statusName: '',
 			status: 2,
 		},
 		{
@@ -96,6 +138,7 @@
 			name: '区民政局',
 			time: '2025-01-01 10:20:30',
 			des: '护理要求:要求必须工作做到位',
+			statusName: '',
 			status: 2,
 		},
 		{
@@ -103,6 +146,7 @@
 			name: '护理公司',
 			time: '2025-01-01 10:20:30',
 			des: '要求必须工作做到位',
+			statusName: '',
 			status: 2,
 		},
 		{
@@ -117,11 +161,14 @@
 			name: '看护人员',
 			time: '2025-01-01 10:20:30',
 			des: '评分:总共100分,评分88分',
-			status: 1,
+			statusName: '',
+			status: 2,
 		}
-	])
+	]
+	const flowList = ref([])
 
 	function nameHandle(flow) {
+		if (flow.statusName) return flow.statusName;
 		if (flow.status === 0) return '拒绝';
 		if (flow.status === 1) return '待审';
 		if (flow.status === 2) {
@@ -137,6 +184,21 @@
 		}
 		return '--'
 	}
+	
+	function initFlowList(){
+		let status = props.item.status;
+		if(allFlowKey.status.hasOwnProperty(status)) {
+			let keyObj = allFlowKey.status[status];
+			flowList.value = allFlow.slice(0, keyObj.flowIndex);
+			flowList.value[flowList.value.length - 1].status = keyObj.status;
+			flowList.value[flowList.value.length - 1].statusName = getDict('care_apply_status', {dictValue: status}).dictLabel;
+		}
+		
+	}
+	
+	onMounted(()=>{
+		initFlowList();
+	})
 </script>
 
 <style lang="scss" scoped>

+ 6 - 4
pages/subpack/pages/application/info.vue

@@ -7,9 +7,9 @@
 		</view> -->
 		<!-- 加载组件 -->
 		<view>
-			<Page1 class="page1" v-show="tabbarIndex === 0" />
-			<Page2 class="page2" v-show="tabbarIndex === 1" />
-			<Page3 class="page3" v-show="tabbarIndex === 2" />
+			<Page1 class="page1" :item="appItem" v-show="tabbarIndex === 0" />
+			<Page2 class="page2" :item="appItem" v-show="tabbarIndex === 1" />
+			<Page3 class="page3" :item="appItem" v-show="tabbarIndex === 2" />
 		</view>
 		<up-tabbar :value="tabbarIndex" @change="tabbarChange" fixed placeholder safeAreaInsetBottom>
 			<up-tabbar-item text="特困审批" icon="chrome-circle-fill" />
@@ -39,6 +39,7 @@
 	//tabbar 
 	const id = ref(0);
 	const tabbarIndex = ref(0);
+	const appItem = ref({})
 
 	function tabbarChange(index) {
 		if (index === tabbarIndex) return;
@@ -54,7 +55,8 @@
 		getCareInfo({
 			id: id.value
 		}).then(res=>{
-			console.log('getCareInfo=>', res);
+			appItem.value = res;
+			// console.log('getCareInfo=>', res);
 		})
 	}
 	onLoad((params)=>{

+ 20 - 1
pages/tabbar/mine/mine.vue

@@ -19,7 +19,26 @@
 			</div>
 		</view>
 		<u-cell-group :border="false" :customStyle="{background: '#fff', margin: '30rpx', borderRadius: '20rpx'}">
-			<u-cell icon="setting-fill" title="我的申请" isLink url="/pages/subpack/pages/application/list">
+			<!-- 县民政 -->
+			<u-cell icon="setting-fill" title="护理申请" isLink url="/pages/subpack/pages/application/list">
+				<template #icon>
+					<u-image src="/static/mine/task.png" bgColor="transparent" width="36rpx" height="36rpx" />
+				</template>
+			</u-cell>
+			<!-- 区民政 -->
+			<u-cell icon="setting-fill" title="护理审核" isLink url="/pages/subpack/pages/application/list">
+				<template #icon>
+					<u-image src="/static/mine/task.png" bgColor="transparent" width="36rpx" height="36rpx" />
+				</template>
+			</u-cell>
+			<!-- 护理人员 -->
+			<u-cell icon="setting-fill" title="护理打卡" isLink url="/pages/subpack/pages/application/list">
+				<template #icon>
+					<u-image src="/static/mine/task.png" bgColor="transparent" width="36rpx" height="36rpx" />
+				</template>
+			</u-cell>
+			<!-- 县民政 -->
+			<u-cell icon="setting-fill" title="业务评分" isLink url="/pages/subpack/pages/application/list">
 				<template #icon>
 					<u-image src="/static/mine/task.png" bgColor="transparent" width="36rpx" height="36rpx" />
 				</template>