Przeglądaj źródła

fix: 订单对接

chenjj 5 miesięcy temu
rodzic
commit
a1c850bbdf

+ 3 - 2
components/PositioningMap/index.vue

@@ -13,7 +13,7 @@ const props = defineProps({
     address: {
         type: String,
         required: true,
-        default: '重庆市永川区中山路街道文昌路700号'
+        default: ''
     }
 });
 
@@ -36,7 +36,8 @@ onMounted(() => {
         key: 'KFEBZ-P2GKZ-A5PX4-7Q6Y7-KXOBF-XCB4C'
     });
 
-
+    console.log('props',props.address);
+    
     // 如果地址已经传入,立即进行地址转经纬度
     if (props.address) {
         geocodeAddress(props.address);

+ 2 - 0
components/cc-selectDity/cc-selectDity.vue

@@ -248,6 +248,8 @@
 					});
 					
 					let areaCode = getAreasCode(index[0], index[1], index[2]);
+					that.address = provinces[index[0]]+ selectCitys[index[1]]+ selectAreas[index[2]];
+					that.addressCode = areaCode;
 				    console.log('uni===2==>', provinces[index[0]], selectCitys[index[1]], selectAreas[index[2]],areaCode);
 
 					that.$emit("changeClick", provinces[index[0]], selectCitys[index[1]], selectAreas[index[2]],areaCode);

+ 24 - 11
pages/classify.vue

@@ -40,10 +40,13 @@
 	} from '@dcloudio/uni-app';
 
 	const {
-		order_status
-	} = useDict('order_status');
+		order_status,
+		lrr_service_status
+	} = useDict('order_status','lrr_service_status');
 
 	provide('order_status', order_status); //订单/服务状态
+	provide('lrr_service_status', lrr_service_status); //订单/服务状态
+
 
 	const userType = uni.getStorageSync('userType') //读取本地存储
 
@@ -65,19 +68,23 @@
 		},
 		{
 			name: "待服务",
-			value: "1",
+			value: "0",
 		},
 		{
 			name: "进行中",
-			value: "3",
+			value: "1",
 		},
 		{
-			name: "已完成",
+			name: "待评价",
 			value: "4",
 		},
 		{
-			name: "已取消",
+			name: "已完成",
 			value: "2",
+		},
+		{
+			name: "已取消",
+			value: "3",
 		}
 	]
 
@@ -134,10 +141,17 @@
 	 * 3:上传照片
 	 */
 	function btnClick(row, type) {
-		console.log('btnClick', type, row);
+		console.log('btnClick', type, row, row.orderStatus);
+		if (type === 1 && row.orderStatus === 2) {
+			uni.navigateTo({
+				url: `/pages_classify/pages/order/index?orderId=${row.secondOrderId}`
+			});
+			return;
+		}
 		if (type === 1) {
+
 			uni.navigateTo({
-				url: `/pages/order/order?orderId=${row.secondOrderId}`
+				url: `/pages_classify/pages/handle/index?orderId=${row.secondOrderId}`
 			});
 			return
 		}
@@ -162,9 +176,8 @@
 
 	onShow(() => {
 		const params = getApp().globalData.switchTabParams || {};
-		if (!params.tabKey) return;
-		tabKey.value = params.tabKey;
-		console.log(params); // { id: 123, type: "test" }
+		tabKey.value = params.tabKey || 0;
+		console.log(params);
 		onChange(column[tabKey.value])
 		// 使用后建议清除参数,避免重复读取 
 		getApp().globalData.switchTabParams = null;

+ 8 - 4
pages/index.vue

@@ -23,14 +23,12 @@
 			<volunteerSide></volunteerSide>
 
 			<view v-if="userType == '2'" class="serve-monthly-ranking">
-				<!-- <view class="font-title index-title">月度排名</view>
+				<view class="font-title index-title">月度排名</view>
 				<List :data="data" @refresh="getList" v-if="data.length > 0" :type="'ranking'" />
 				<view v-else class="empty-null">
 					<img src="/static/empty/订单为空.png" alt="">
-				</view> -->
-				<view>
-					<view class="serve-title">本月热门服务排名</view>
 				</view>
+				<!-- <view class="serve-title index-title">本月热门服务排名</view> -->
 
 			</view>
 
@@ -107,6 +105,7 @@ import {
 
 	.index-title {
 		padding: 0 12px 12px;
+		margin-bottom: 16px;
 	}
 
 	.index-title::before {
@@ -119,4 +118,9 @@ import {
 		position: relative;
 		top: 1px;
 	}
+
+	.serve-monthly-ranking {
+		margin-bottom: 16px;
+
+	}
 </style>

+ 6 - 4
pages/mine.vue

@@ -436,7 +436,12 @@ const getDetails = async () => {
 		}
 
 
-		.rate-box {
+		
+
+
+	}
+
+	.rate-box {
 			display: flex;
 			align-items: center;
 			justify-content: space-between;
@@ -467,8 +472,5 @@ const getDetails = async () => {
 				}
 			}
 		}
-
-
-	}
 }
 </style>

+ 2 - 2
pages_classify/components/orderList/listItem.vue

@@ -9,7 +9,7 @@
                     <view class="item-name">
                          姓名: {{ data.name }}
                     </view>
-                    <dict-tag :options="order_status" :value="data.orderStatus" />
+                    <dict-tag :options="lrr_service_status" :value="data.orderStatus" />
                 </view>
                 <view class="item-de">
                     服务地址:{{ data.address }}
@@ -46,7 +46,7 @@ const props = defineProps({
 
 const inject_click = inject('onClick');
 
-const order_status = inject('order_status');
+const lrr_service_status = inject('lrr_service_status');
 
 const btn_style = ` width: 120rpx; height: 50rpx; font-size: 24rpx;border-radius: 25rpx;margin-left: 12rpx;`;
 

+ 2 - 2
pages_classify/components/orderList/rankingItem.vue

@@ -10,7 +10,7 @@
                         <!-- <dict-tag :options="lrr_service_category" :value="data.serviceCategory" /> -->
                         姓名: {{ }}
                     </view>
-                    <dict-tag :options="order_status" :value="data.orderStatus" />
+                    <dict-tag :options="lrr_service_status" :value="data.orderStatus" />
                 </view>
                 <view class="item-de">类别:</view>
                 <view class="item-de">综合评分:</view>
@@ -53,7 +53,7 @@ const inject_click = inject('onClick');
 
 const lrr_chitchat = inject('lrr_chitchat');
 const lrr_study = inject('lrr_study');
-const order_status = inject('order_status');
+const lrr_service_status = inject('lrr_service_status');
 
 const btn_style = ` width: 120rpx; height: 50rpx; font-size: 24rpx;border-radius: 25rpx;margin-left: 12rpx;`;
 

+ 8 - 2
pages_classify/pages/handle/index.vue

@@ -2,7 +2,7 @@
 <template>
     <view class="order-detail">
         <view class="service-info order-card">
-            <PositioningMap />
+            <PositioningMap :address="detaile.address" />
         </view>
         <view class="user-info order-card">
             <view class="user-box">
@@ -27,7 +27,7 @@ import { ref } from 'vue';
 import { onLoad } from '@dcloudio/uni-app';
 import { getVolunteerOrderInfo,getTimesByDate, } from '@/api/volunteer.js'
 import { getAddress } from '@/api/address.js'
-import PositioningMap from '@/components//PositioningMap/index.vue'
+import PositioningMap from '@/components/PositioningMap/index.vue'
 import Slide from '@/components/Slide/index.vue'
 
 import { wxMakePhoneCall } from '@/utils/wxRequest.js'
@@ -38,6 +38,7 @@ const orderId = ref('');
 const detaile = ref({});
 const verify = ref(null);
 
+
 const orderStatus = ref(false);//false:未开始服务 true:服务已开始,待上传图片
 const onPhone = (phone) => {
     wxMakePhoneCall(phone)
@@ -69,6 +70,11 @@ const getOrderDetail = async () => {
             }
         }
         detaile.value = data;
+        if(data.orderStatus === 1){
+            
+            orderStatus.value = true;
+        }
+
         console.log('xxxx', detaile.value);
 
     } catch (error) {

+ 8 - 3
pages_classify/pages/order/index.vue

@@ -23,15 +23,15 @@
 			<view class="upload-box">
 				<view class="upload-img-item" v-for="(item, index) in fileList" :key="item.url">
 					<view class="delete-icon" @click="deletePic(index)"><up-icon name="close-circle-fill"
-							color="#f64a1f" size="18"></up-icon></view>
+							color="#f64a1f" size="18" v-if="detaile.orderStatus === 3 "></up-icon></view>
 					<img class="upload-img" :src="item.url" :alt="item.fileName" srcset="">
 				</view>
 				<img src="/static/img/upload.png" alt="" class="upload-img" @click="uploadClick('img')"
-					v-if="fileList.length < 10">
+					v-if="fileList.length < 10 && detaile.orderStatus === 3 ">
 			</view>
 		</view>
 
-		<view class=" footer-g">
+		<view class=" footer-g" v-if="detaile.orderStatus === 3 ">
 			<up-button type="primary" text="确定结束" @click="onSubmit"></up-button>
 		</view>
 	</view>
@@ -80,6 +80,11 @@ const getOrderDetail = async () => {
 				telephone: ad_res.data.telephone
 			}
 		}
+		if(data.serviceLog) {
+			fileList.value = data.serviceLog.split(',').map(item => {
+				return {url: item}
+			});
+		}
 		detaile.value = data;
 		console.log('detaile.value', detaile.value);
 

+ 1 - 1
pages_home/pages/register/data.js

@@ -192,7 +192,7 @@ const clean = [
     {
         label: "地区",
         key: "city",
-        type: "select",
+        type: "city",
         option: city_option,
         rules: rules.city