فهرست منبع

Merge branch 'master' of http://www.sysuimars.cn:3000/feiniao/feiniao-farm-h5

wangsisi 2 روز پیش
والد
کامیت
80dcba2c10

+ 5 - 7
src/components/popup/priceSheetPopup.vue

@@ -66,7 +66,7 @@
                                 <div class="col-1">{{ item.typeName || '--' }}</div>
                                 <div class="col-1">{{ item.typeName || '--' }}</div>
                                 <div class="col-2">{{ item.defaultName || '--' }}</div>
                                 <div class="col-2">{{ item.defaultName || '--' }}</div>
                                 <div class="col-3">{{ item.brand || '--' }}</div>
                                 <div class="col-3">{{ item.brand || '--' }}</div>
-                                <div class="col-4">{{ item.priceDisplay || '--' }}</div>
+                                <div class="col-4">{{ item.price || '--' }}</div>
                                 <div class="col-5">{{ item.usageDisplay || '--' }}</div>
                                 <div class="col-5">{{ item.usageDisplay || '--' }}</div>
                                 <div class="col-6">{{ item.totalDisplay === '--' ? '--' : (item.totalDisplay + '元') }}</div>
                                 <div class="col-6">{{ item.totalDisplay === '--' ? '--' : (item.totalDisplay + '元') }}</div>
                             </div>
                             </div>
@@ -155,7 +155,7 @@ const processedPrescriptionList = computed(() => {
     const priceMap = new Map();
     const priceMap = new Map();
     if (priceData.value?.itemsList && Array.isArray(priceData.value.itemsList)) {
     if (priceData.value?.itemsList && Array.isArray(priceData.value.itemsList)) {
         priceData.value.itemsList.forEach(item => {
         priceData.value.itemsList.forEach(item => {
-            priceMap.set(String(item.pesticideFertilizerId), { price: item.price, brand: item.brand });
+            priceMap.set(String(item.pesticideFertilizerId), { price: item.price, brand: item.brand, totalPrice: item.totalPrice });
         });
         });
     }
     }
     // 展平 prescriptionList 中的所有 pesticideFertilizerList
     // 展平 prescriptionList 中的所有 pesticideFertilizerList
@@ -167,20 +167,18 @@ const processedPrescriptionList = computed(() => {
                 const mapped = priceMap.get(pesticideFertilizerId) || {};
                 const mapped = priceMap.get(pesticideFertilizerId) || {};
                 const price = mapped.price || 0;
                 const price = mapped.price || 0;
                 const brand = mapped.brand || item.brand || '';
                 const brand = mapped.brand || item.brand || '';
+                const total = mapped.totalPrice || item.total || '';
                 const muUsage = item.muUsage || 0;
                 const muUsage = item.muUsage || 0;
                 const unit = item.unit || '';
                 const unit = item.unit || '';
-                
-                // 计算总价
-                const total = price * muUsage;
 
 
                 result.push({
                 result.push({
                     typeName: item.typeName || '--',
                     typeName: item.typeName || '--',
                     defaultName: item.defaultName || item.pesticideFertilizerName || '--',
                     defaultName: item.defaultName || item.pesticideFertilizerName || '--',
                     brand: brand,
                     brand: brand,
-                    price: price,
+                    price: price ? `${price}元` : '--',
                     unit: unit,
                     unit: unit,
                     muUsage: muUsage,
                     muUsage: muUsage,
-                    total: total,
+                    // total: total,
                     // 显示的格式化字符串
                     // 显示的格式化字符串
                     priceDisplay: price > 0 ? `${price}元/${unit}` : '--',
                     priceDisplay: price > 0 ? `${price}元/${unit}` : '--',
                     usageDisplay: muUsage > 0 ? `${muUsage}${unit}` : '--',
                     usageDisplay: muUsage > 0 ? `${muUsage}${unit}` : '--',

+ 2 - 2
src/views/old_mini/modify_work/completedWork.vue

@@ -138,7 +138,7 @@
                         当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标
                         当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标:当前农场指标
                     </div>
                     </div>
                 </div>
                 </div>
-                <div class="box-wrap farm-photo">
+                <div class="box-wrap farm-photo" v-if="triggerImg.length">
                     <div class="photo-list">
                     <div class="photo-list">
                         <photo-provider :photo-closable="true">
                         <photo-provider :photo-closable="true">
                                 <photo-consumer v-for="src in triggerImg" intro="触发照片" :key="src" :src="base_img_url2 + src.cloudFilename">
                                 <photo-consumer v-for="src in triggerImg" intro="触发照片" :key="src" :src="base_img_url2 + src.cloudFilename">
@@ -535,7 +535,7 @@ onActivated(async () => {
                                 const area = detailData.value.area || 0;
                                 const area = detailData.value.area || 0;
                                 
                                 
                                 // 计算总价:优先使用 totalPrice,否则计算 price * muUsage * area
                                 // 计算总价:优先使用 totalPrice,否则计算 price * muUsage * area
-                                const total = priceInfo.totalPrice !== null && priceInfo.totalPrice !== undefined 
+                                const total = priceInfo.totalPrice 
                                     ? priceInfo.totalPrice 
                                     ? priceInfo.totalPrice 
                                     : (price * muUsage * area);
                                     : (price * muUsage * area);
                                 
                                 

+ 0 - 1
src/views/old_mini/task_condition/components/uploadExecute.vue

@@ -77,7 +77,6 @@ function handleConfirm() {
                     id:data.id,
                     id:data.id,
                 }
                 }
                 farmData.value.type = 'confirmExecute'
                 farmData.value.type = 'confirmExecute'
-                console.log("farmData.value", farmData.value);
                 showShare.value = true;
                 showShare.value = true;
             });
             });
         }
         }