Lijy пре 4 месеци
родитељ
комит
ad1d4c8cd1

+ 5 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/order/detail.vue

@@ -11,7 +11,7 @@
         <RelatedProducts :infoList="relatedProductsList" />
       </van-tab>
       <van-tab title="回款" name="回款">
-        <PaymentCollection :info="infoData" />
+        <PaymentCollection :info="infoData" @changePaymentCollection="changePaymentCollection" />
       </van-tab> 
     </van-tabs>
   </div>
@@ -74,6 +74,10 @@ function getDetailedData(id) {
   })
 }
 
+function changePaymentCollection(id) {
+  getDetailedData(id)
+}
+
 function processingData(id) {
   clearTimeout(timeout.value);
   toastLoading('加载中...', 0)

+ 4 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/order/paymentCollection.vue

@@ -48,6 +48,7 @@ import requests from "@common/requests";
 import useShowToast from '@hooks/useToast'
 
 const { toastSuccess, toastFail, toastText } = useShowToast()
+const emit = defineEmits()
 const props = defineProps({
   info: {
     type: Object,
@@ -72,6 +73,7 @@ function deletePaymentCollection(row) {
   }).then(() => {
     requests.post(DELETE_SALES_ORDER_PAYMENT_RECORDS, { paymentId: row.id }).then(() => {
       toastSuccess('操作成功')
+      emit('changePaymentCollection', props.info.id)
       processingData(props.info.id)
     }).catch((err) => {
       toastFail(err.msg ? err.msg : '删除失败')
@@ -93,12 +95,13 @@ function addEditReceipt() {
     [rowId ? 'paymentId' : 'orderId']: rowId ? rowId : props.info.id,
     money: val,
   }
-  if ((+totalMoney + val) > orderAmount) {
+  if ((+totalMoney + +val) > orderAmount) {
     toastText('回款金额不能大于订单金额')
     return
   }
   requests.post(url, formVal).then(() => {
     toastSuccess('操作成功')
+    emit('changePaymentCollection', props.info.id)
     processingData(props.info.id)
     showDialog.value = false
   })

+ 4 - 4
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/tabbar/home/component/dataSummary.vue

@@ -37,7 +37,7 @@
             <div class="text-size-small text-[#999]" style="width: 40%;">
               新增商机 <span class="ml-1 text-[#51C2FF]">
                 {{ dataSummary?.businessOpportunityDataSummary?.newNum || 0 }}
-              </span> 
+              </span> 
             </div>
             <div class="text-size-small text-[#999]" style="width: 60%;">
               商机赢单 <span class="ml-1 text-[#51C2FF]">
@@ -49,7 +49,7 @@
             <div class="text-size-small text-[#999]" style="width: 40%;">
               输单商机 <span class="ml-1 text-[#51C2FF]">
                 {{ dataSummary?.businessOpportunityDataSummary?.winning || 0 }}
-              </span> 
+              </span> 
             </div>
             <div class="text-size-small text-[#999]" style="width: 60%;">
               商机总金额 <span class="ml-1 text-[#51C2FF]">
@@ -68,12 +68,12 @@
             <div class="w-1/2 text-size-small text-[#999]">
               新增线索 <span class="ml-1 text-[#28C67E]">
                 {{ dataSummary?.clueDataSummary?.newNum || 0 }}
-              </span> 
+              </span> 
             </div>
             <div class="w-1/2 text-size-small text-[#999]">
               线索转商机 <span class="ml-1 text-[#28C67E]">
                 {{ dataSummary?.clueDataSummary?.changeNum || 0 }}
-              </span> 
+              </span> 
             </div>
           </div>
         </div>