shish 2 meses atrás
pai
commit
d8582b7e8c

+ 37 - 3
ghsApp/src/pagesOrder/detail.vue

@@ -171,15 +171,27 @@
 								{{ detailInfo.payWay==0?'线下微信':detailInfo.payWay==1?'线下支付宝':detailInfo.payWay==2?'余额':detailInfo.payWay==4?'现金':detailInfo.payWay==5?'银行卡':detailInfo.payWay==3?'挂账':'--' }}
 							</text>
 						</block>
-						<text v-if="Number(detailInfo.clearId)>0" style="color:#3385ff;font-weight:bold;">(已结清)</text>
+						<text v-if="Number(detailInfo.clearId)>0 && $util.isEmpty(detailInfo.orderClearList)" style="color:#3385ff;font-weight:bold;">(已结清)</text>
+						<text v-else-if="!$util.isEmpty(detailInfo.orderClearList) && Number(detailInfo.remainDebtPrice)<=0" style="color:#3385ff;font-weight:bold;">(已结清)</text>
 					</view>
-					<view class="price" v-if="detailInfo.clearId > 0">
-						<button @click="pageTo({url: '/admin/clear/customInfo',query: {id: detailInfo.clearId}})" class="admin-button-com">查看结账单</button>
+					<view class="price" v-if="detailInfo.clearId > 0 && $util.isEmpty(detailInfo.orderClearList)">
+						<button @click="goClearBill({ clearId: detailInfo.clearId })" class="admin-button-com">查看结账单</button>
 					</view>
 					<view class="price" v-if="detailInfo.debt == 1">
 						<button @click='pageTo({url:"/pagesArrears/details",query: {id: detailInfo.customId}})' class="admin-button-com" style="border:1upx solid red;color:red;">全部挂账</button>
 					</view>
 				</view>
+				<view class="order-info_box" v-if="detailInfo.status != 1 && detailInfo.status!=5 && !$util.isEmpty(detailInfo.orderClearList)">
+					<view>账单信息:</view>
+					<view class="order-clear-bills__links">
+						<text
+							v-for="(bill, billIndex) in detailInfo.orderClearList"
+							:key="billIndex"
+							class="order-clear-bills__link"
+							@click.stop="goClearBill(bill)"
+						>{{ bill.clearSn ? bill.clearSn : ('结账单' + (billIndex + 1)) }}<text v-if="Number(bill.amount)>0" class="order-clear-bills__amt"> ¥{{ parseFloat(bill.amount) }}</text></text>
+					</view>
+				</view>
 				<view class="order-info_box" style="margin-top:40upx;">
 					<view>订单状态:</view>
 					<view>{{ detailInfo.status==1?'待付款':detailInfo.status==2?'待发货':detailInfo.status==3?'配送中':detailInfo.status==4?'已完成':detailInfo.status==5?'已取消':'已退款' }}</view>
@@ -1224,6 +1236,13 @@ export default {
 		goCustom(){
 			this.$util.pageTo({url: '/pagesClient/member/detail?id='+this.detailInfo.customId})
 		},
+		goClearBill(item) {
+			const id = item && item.clearId ? item.clearId : 0
+			if (!id) {
+				return
+			}
+			this.pageTo({ url: '/admin/clear/customInfo', query: { id } })
+		},
 		modifyAddress(){
 			this.$util.pageTo({url: '/pagesOrder/modify?id='+this.detailInfo.id})
 		},
@@ -1912,6 +1931,21 @@ export default {
 			}
 		}
 	}
+	.order-clear-bills__links {
+		flex: 1;
+		display: flex;
+		flex-wrap: wrap;
+	}
+	.order-clear-bills__link {
+		color: #3385ff;
+		font-weight: bold;
+		margin-right: 20upx;
+		margin-bottom: 8upx;
+	}
+	.order-clear-bills__amt {
+		font-weight: normal;
+		font-size: 24upx;
+	}
 	.content-box {
 		background-color: #ffffff;
 		border-radius: 10upx;

+ 38 - 3
hdApp/src/pagesPurchase/purDetails.vue

@@ -149,9 +149,22 @@
 
         <view class="order-info_box" v-else>
           <view>本单金额:</view>
-          <view v-if="detailInfo.clearId > 0" style="font-weight:bold;color:#3385FF;font-size:29upx;">已结清</view>
-          <view class="price" v-if="detailInfo.clearId > 0">
-            <button style="padding:20upx 15upx;" @click="pageTo({url: '/admin/clear/info',query: {id: detailInfo.clearId}})" class="admin-button-com">查看账单</button>
+          <view v-if="detailInfo.clearId > 0 && $util.isEmpty(detailInfo.orderClearList)" style="font-weight:bold;color:#3385FF;font-size:29upx;">已结清</view>
+          <view v-else-if="!$util.isEmpty(detailInfo.orderClearList) && Number(detailInfo.remainDebtAmount)<=0" style="font-weight:bold;color:#3385FF;font-size:29upx;">已结清</view>
+          <view class="price" v-if="detailInfo.clearId > 0 && $util.isEmpty(detailInfo.orderClearList)">
+            <button style="padding:20upx 15upx;" @click="goClearBill({ clearId: detailInfo.clearId })" class="admin-button-com">查看账单</button>
+          </view>
+        </view>
+
+        <view class="order-info_box order-clear-bills" v-if="!$util.isEmpty(detailInfo.orderClearList)" style="margin-top:20upx;">
+          <view>账单信息:</view>
+          <view class="order-clear-bills__links">
+            <text
+              v-for="(bill, billIndex) in detailInfo.orderClearList"
+              :key="billIndex"
+              class="order-clear-bills__link"
+              @click.stop="goClearBill(bill)"
+            >{{ bill.clearSn ? bill.clearSn : ('结账单' + (billIndex + 1)) }}<text v-if="Number(bill.amount)>0" class="order-clear-bills__amt"> ¥{{ parseFloat(bill.amount) }}</text></text>
           </view>
         </view>
 
@@ -565,6 +578,13 @@ export default {
     goToRecharge(info){
       this.pageTo({url: '/admin/ghs/pay?id='+info.ghsId+'&salt='+info.ghsSalt})
     },
+    goClearBill(item) {
+      const id = item && item.clearId ? item.clearId : 0
+      if (!id) {
+        return
+      }
+      this.pageTo({ url: '/admin/clear/info', query: { id } })
+    },
     copy (val) {
       const self = this;
       uni.setClipboardData({
@@ -708,6 +728,21 @@ export default {
         justify-content: flex-end;
       }
     }
+    .order-clear-bills__links {
+      flex: 1;
+      display: flex;
+      flex-wrap: wrap;
+    }
+    .order-clear-bills__link {
+      color: #3385ff;
+      font-weight: bold;
+      margin-right: 20upx;
+      margin-bottom: 8upx;
+    }
+    .order-clear-bills__amt {
+      font-weight: normal;
+      font-size: 24upx;
+    }
   }
   .content-box {
     background-color: #ffffff;