Browse Source

no message

linwenxin 6 months ago
parent
commit
f92f4591bf
1 changed files with 28 additions and 3 deletions
  1. 28 3
      src/packageWorkorder/pages/orderDetail.vue

+ 28 - 3
src/packageWorkorder/pages/orderDetail.vue

@@ -376,7 +376,7 @@
                   v-for="(it, idx) in item.rpMaterialOrderItems.filter(o => o.chargeType == 'SERV')"
                   :key="idx"
                 >
-                  <view class="name">服务费</view>
+                  <view class="name">{{ it.amountName }}</view>
                   <view class="price">¥{{ it.normAmount }}</view>
                 </view>
                 <view class="total">
@@ -464,7 +464,7 @@
                   v-for="(it, idx) in item.workerOrderItems.filter(o => o.chargeType == 'SERV')"
                   :key="idx"
                 >
-                  <view class="name">服务费</view>
+                  <view class="name">{{ it.amountName }}</view>
                   <view class="price">¥{{ it.normAmount }}</view>
                 </view>
                 <view class="total">
@@ -915,7 +915,32 @@ export default {
             workerOrderId: this.id
           })
           .then(async res => {
-            this.payList = res.data
+            this.payList = res.data.map(item => {
+              var gengduo = [
+                {
+                  chargeType: 'SERV',
+                  amountName: '服务费用',
+                  normAmount: item.servicePrice || 0
+                },
+                {
+                  chargeType: 'SERV',
+                  amountName: '其他费用',
+                  normAmount: item.otherPrice || 0
+                }
+              ]
+              if (this.detail.rpProjectRepairId) {
+                if (!item.rpMaterialOrderItems) {
+                  item.rpMaterialOrderItems = []
+                }
+                item.rpMaterialOrderItems.push(...gengduo)
+              } else {
+                if (!item.workerOrderItems) {
+                  item.workerOrderItems = []
+                }
+                item.workerOrderItems.push(...gengduo)
+              }
+              return { ...item }
+            })
             resolve(1)
           })
           .catch(res => {