dongke 1 год назад
Родитель
Сommit
96b3de2e15

+ 2 - 2
package-base-select/pages/select-data/select-data.js

@@ -1230,7 +1230,7 @@ Page({
    * @date : 2024年5月29日
    * @author : 刘尧
    */
-  handleSearchData(tableData) {
+  handleSearchData(tableData) { 
     let addItem = this.data.addItem
     let valueKey = this.data.valueKey
     let choosedData = this.data.choosedData
@@ -1252,7 +1252,7 @@ Page({
         const targetData = this.data.contentList.filter(res => res.title === '供应商欠款')
         item[targetData[0].name] = item.payableResidue - item.paymentResidue
       }
-      if (this.data.routeObjName == 'supplier') {
+      if (!this.data.item.defaultSupplier && this.data.routeObjName == 'supplier') {
         // item.balance = item.paymentResidue - item.payableResidue     //bug 7524 跟采购订单保持一致
         item.payableResidue = item.payableResidue - item.paymentResidue
 

+ 17 - 15
package-purchase/pages/purchase-order/add/add.js

@@ -198,21 +198,7 @@ Page({
     formData.fromNos = this.isArrayWithSingleNull(orderNoArray) ? [] : orderNoArray.join(',').split(',') //来源单号
     formData.fromIds = this.isArrayWithSingleNull(orderIdArray) ? [] : orderIdArray.join(',').split(',') //来源单id
     formData.fromNo = orderNoArray.join(',');
-    let cardList_ = this.data.cardList
-    cardList_.forEach(card => { //循环出商品总共价格
-      if (card.name === 'items') {
-        card.itemAmt = choooseItemList.sum("itemAmt") //售价金额合计 
-      }
-    })
-    let contentList_ = this.data.contentList
-    contentList_.forEach(card => { //循环出商品总共价格
-      if (card.code === 'amount') {
-        card.content = choooseItemList.sum("itemAmt")
-      }
-      if (card.code === 'goodsCount') {
-        card.quantity = choooseItemList.sum("itemQty")
-      }
-    })
+   
 
     choooseItemList.forEach(element => {
       element.chooseFlg = "biu" //辨别选品标识
@@ -220,6 +206,7 @@ Page({
       element.fromId = element.orderId
       element.fromItemId = element.itemId
       element.pricePur = element.pricePur ? element.pricePur : element.pricePurchase
+      element.itemAmt = Number( element.pricePur)*Number( element.itemQty)
       element.amtStd = Number(element.priceStd * element.itemQty) //标价金额
       element.priceDiscount = (Number(element.pricePurchase) / Number(element.priceStandard)) * 100;
       element.nonStdCode = element.nonStdCode ? element.nonStdCode : '' // 色号  批次号   
@@ -228,6 +215,21 @@ Page({
         element.packageBox = element['box'] + element.subUnitName + element['piece'] + element.unitName
       }
     });
+    let cardList_ = this.data.cardList
+    cardList_.forEach(card => { //循环出商品总共价格
+      if (card.name === 'items') {
+        card.itemAmt = choooseItemList.sum("itemAmt") //售价金额合计 
+      }
+    })
+    let contentList_ = this.data.contentList
+    contentList_.forEach(card => { //循环出商品总共价格
+      if (card.code === 'amount') {
+        card.content = choooseItemList.sum("itemAmt")
+      }
+      if (card.code === 'goodsCount') {
+        card.quantity = choooseItemList.sum("itemQty")
+      }
+    })
     formData.goodsList = choooseItemList
     this.setData({
       formData: JSON.stringify(formData),

+ 12 - 10
package-purchase/pages/supplier-list/detail/detail.wxml

@@ -22,7 +22,7 @@
         <image class="scan-image-icon" fit="fill" src="{{imageUrl+'/customer_detail_02.png'}}"></image>
       </view>
       <view style="padding-left: 10rpx;" catchtap="openTelPhone" data-item="{{item}}">
-        {{ (item.contactName ? item.contactName  : '') +(item.contactName && item.contactPhone ? '/':'')+ (item.contactPhone ? item.contactPhone : '') }}
+        {{ (item.contactName ? item.contactName : '') +(item.contactName && item.contactPhone ? '/':'')+ (item.contactPhone ? item.contactPhone : '') }}
       </view>
     </view>
     <view class="detail-top-color" style="display: flex;" wx:if="{{item.returnAddress}}">
@@ -47,7 +47,7 @@
             <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.purchaseAmount ? item.purchaseAmount : 0}}"></dk-cell>
           </view>
           <view class="oreder-summary-detail">
-            <text style="margin-right: 4px;">订单({{item.purchaseQuantity}}单)</text> 
+            <text style="margin-right: 4px;">订单({{item.purchaseQuantity}}单)</text>
             <dk-tip id="dk-tip1" Down="{{true}}" Right="{{true}}" tipContent='数据来源:采购订单' bind:clickTip="handleTap"></dk-tip>
           </view>
         </view>
@@ -56,7 +56,7 @@
             <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.inboundReturnAmount ? item.inboundReturnAmount : 0 }}"></dk-cell>
           </view>
           <view class="oreder-summary-detail">
-            <text style="margin-right: 4px;"> 退货({{item.inboundReturnQuantity}}单)</text> 
+            <text style="margin-right: 4px;"> 退货({{item.inboundReturnQuantity}}单)</text>
             <dk-tip id="dk-tip2" Down="{{true}}" Left="{{true}}" tipContent='数据来源:采购退货' bind:clickTip="handleTap"></dk-tip>
           </view>
         </view>
@@ -67,7 +67,7 @@
             <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.payment ? item.payment : 0}}"></dk-cell>
           </view>
           <view class="oreder-summary-detail">
-            <text style="margin-right: 4px;"> 付款总额</text> 
+            <text style="margin-right: 4px;"> 付款总额</text>
             <dk-tip id="dk-tip3" Up="{{true}}" Right="{{true}}" tipContent='数据来源:供应商付款\\退款\r\n计算公式:供应商付款-退款' bind:clickTip="handleTap"></dk-tip>
           </view>
         </view>
@@ -79,7 +79,7 @@
             </dk-cell>
           </view>
           <view class="oreder-summary-detail">
-            <text style="margin-right: 4px;"> 欠款</text> 
+            <text style="margin-right: 4px;"> 欠款</text>
             <dk-tip id="dk-tip4" Up="{{true}}" Left="{{true}}" tipContent='计算公式:(采购订单-退货)-(供应商付款-供应商退款)' bind:clickTip="handleTap"></dk-tip>
           </view>
         </view>
@@ -98,18 +98,20 @@
         </view>
         <view class="number" style="margin-left: 0; margin-right: 0;">
           <view class="order-summary">
-            <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.inboundAmount ? item.inboundAmount : 0}}"></dk-cell>
+        
+            <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.inboundNotAmount ? item.inboundNotAmount : 0}}"></dk-cell>
           </view>
           <view class="oreder-summary-detail">
-            已出库({{item.inboundQuantity}}单)
+            入库中({{item.inboundNotQuantity}}单)
+         
           </view>
         </view>
         <view class="number" style="margin-right: 0;">
           <view class="order-summary">
-            <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.inboundNotAmount ? item.inboundNotAmount : 0}}"></dk-cell>
+            <dk-cell center="center" height="46rpx" spaceWidth="1rpx" left="0" fontSize="17" contentColor="#1B365D" fontWeight="600" title="" content="{{item.inboundAmount ? item.inboundAmount : 0}}"></dk-cell>
           </view>
           <view class="oreder-summary-detail">
-            出库中({{item.inboundNotQuantity}}单)
+            已入库({{item.inboundQuantity}}单)
           </view>
         </view>
       </view>
@@ -130,7 +132,7 @@
             </dk-cell>
           </view>
           <view class="oreder-summary-detail">
-            余额
+            欠款
           </view>
         </view>