jiayubo дней назад: 3
Родитель
Сommit
04048ed2d0

+ 5 - 2
components/its-calendar/its-calendar.vue

@@ -28,7 +28,6 @@
 		</view>
 		<view class="calendar_footer">
 			{{ selectRange  }}
-			<view class="remark_content">{{remark}}</view>
 		</view>
 	</view>
 </template>
@@ -51,7 +50,11 @@
 			minQuantity: {  // 从父组件接收的购买次数(次数)
 				type: Number,
 				default: 1
-			}
+      },
+      projectName: {
+        type: String,
+        default: ''
+      }
 		},
 		data() {
 			return {

+ 2 - 2
pages/classify.vue

@@ -160,13 +160,13 @@ async function getList(type) {
 function btnClick(row, type) {
   if (type === 1) {
     uni.navigateTo({
-      url: `/pages_classify/pages/order/index?orderId=${row.secondOrderId}`,
+      url: `/pages_classify/pages/order/index?secondOrderId=${row.secondOrderId}`,
     })
     return
   }
   if (type === 3) {
     uni.navigateTo({
-      url: `/pages_classify/pages/handle/index?orderId=${row.secondOrderId}`,
+      url: `/pages_classify/pages/handle/index?secondOrderId=${row.secondOrderId}`,
     })
     return
   }

+ 12 - 13
pages_classify/pages/handle/index.vue

@@ -51,7 +51,7 @@ import { useDict } from '@/utils/dict.js';
 import DictTag from '@/components/DictTag/index.vue'
 import { wxMakePhoneCall } from '@/utils/wxRequest.js'
 import { computed } from 'vue';
-const orderId = ref('');
+const secondOrderId = ref('');
 const detaile = ref({});
 const verify = ref(null);
 const {
@@ -81,18 +81,17 @@ const getOrderDetail = async () => {
         uni.showLoading({
             title: '数据加载中...'
         });
-        const res = await getVolunteerOrderInfo({ orderId: orderId.value });
-        // const ad_res = await getAddress(res.data.addressId);
-
-        let data = res.data.secondOrder;
-        detaile.value = { ...res.data.secondOrder, address:res.data.address.address,serveTimes:res.data.secondOrder.updateTime }
-        if (data.orderStatus === '3') {
-
+        const res = await getVolunteerOrderInfo({ secondOrderId: secondOrderId.value });
+        
+        // Update to match the actual data structure where properties are at the top level
+        detaile.value = { ...res.data, serveTimes: res.data.updateTime || null }
+        
+        if (res.data.orderStatus === '3') {
             orderStatus.value = true;
         }
-        if (res.data.secondOrder.updateTime) {
+        if (res.data.updateTime) {
             timer = setInterval(() => {
-                const timeDiff = Math.abs(new Date() - new Date(res.data.secondOrder.updateTime));
+                const timeDiff = Math.abs(new Date() - new Date(res.data.updateTime));
                 const units = {
                     day: Math.floor(timeDiff / (1000 * 60 * 60 * 24)),
                     hour: Math.floor(timeDiff / (1000 * 60 * 60)),
@@ -124,7 +123,7 @@ const getOrderDetail = async () => {
 const change = (e) => {
     if (e.state && !orderStatus.value) {
 
-        getTimesByDate(orderId.value).then(res => {
+        getTimesByDate(secondOrderId.value).then(res => {
             if (res.code === 200) {
                 uni.showToast({
                     title: '已开始服务',
@@ -146,7 +145,7 @@ const change = (e) => {
             icon: 'success',
             success: () => {
                 setTimeout(() => {
-                    uni.redirectTo({ url: `/pages_classify/pages/order/index?orderId=${orderId.value}` });
+                    uni.redirectTo({ url: `/pages_classify/pages/order/index?secondOrderId=${secondOrderId.value}` });
                 }, 800)
             }
         })
@@ -156,7 +155,7 @@ const change = (e) => {
 
 
 onLoad((options) => {
-    orderId.value = options.orderId;
+    secondOrderId.value = options.secondOrderId;
     getOrderDetail();
 
 })

+ 4 - 4
pages_classify/pages/order/index.vue

@@ -89,7 +89,7 @@ import { wxUploadFile, wxMakePhoneCall } from '@/utils/wxRequest.js'
 import { useDict } from '@/utils/dict.js';
 import DictTag from '@/components/DictTag/index.vue'
 const fileList = ref([]);
-const orderId = ref('');
+const secondOrderId = ref('');
 const detaile = ref({
 	volunteerReview:''
 });
@@ -138,7 +138,7 @@ const getOrderDetail = async () => {
 		uni.showLoading({
 			title: '数据加载中...'
 		});
-		const res = await getVolunteerOrderInfo({ orderId: orderId.value });
+		const res = await getVolunteerOrderInfo({ secondOrderId: secondOrderId.value });
 		// const ad_res = await getAddress(res.data.addressId);
 		// detaile.value = {...res.data.secondOrder,...res.data.address}
 		detaile.value = { ...res.data.secondOrder, address:res.data.address.address,serveTimes:res.data.secondOrder.updateTime }
@@ -166,7 +166,7 @@ const onSubmit = () => {
 	console.log('submit', fileList.value, img_urls);
 
 	getVolunteerFinishSecondOrder({
-		secondOrderId: orderId.value,
+		secondOrderId: secondOrderId.value,
 		volunteerPicture: img_urls,
 		volunteerId: detaile.value.volunteerId,
 		volunteerReview: detaile.value.volunteerReview
@@ -197,7 +197,7 @@ const onSubmit = () => {
 
 onLoad((options) => {
 	console.log('options', options);
-	orderId.value = options.orderId;
+	secondOrderId.value = options.secondOrderId;
 	// orderId.value = '1911685346559660034';
 
 	getOrderDetail();

+ 3 - 2
pages_home/pages/Volunteerside/goodsDetails.vue

@@ -118,7 +118,7 @@
           <up-number-box
             :modelValue="singleQuantity"
             :min="listData.minQuantity"
-			:max="minQuantityMax"
+            :max="minQuantityMax"
             @change="valChange"
           ></up-number-box>
         </view>
@@ -145,6 +145,7 @@
               :minQuantity="singleQuantity"
               :timeArr="doorToDoorTimeArr"
               :timeHostArr="timeHostArr"
+              :projectName="listData.projectName"
               @getByDate="getByDate"
               @getByTime="getByTime"
             ></its-calendar>
@@ -516,7 +517,7 @@ const valChange = (obj) => {
   console.log(filteredSlots, '>>>>>filteredSlots')
 
   if (timestampDifferenceValue < durationMs) {
-	  minQuantityMax.value = obj.value - 1
+    minQuantityMax.value = obj.value - 1
     // 所选时间差值 小于 服务时间值 结束执行
     uni.showToast({ title: '所选时间的服务时间不充足!', icon: 'none' })
     return false