|
|
@@ -1,3 +1,8 @@
|
|
|
+<!--
|
|
|
+ 供货商按编号搜索结账:已选订单行
|
|
|
+ 用途:展示单号/入库时间/实付与剩余待结;支持删除与查看明细
|
|
|
+ 对齐 detailsItem:部分结清时划掉原挂账、标红「剩余待结」
|
|
|
+-->
|
|
|
<template>
|
|
|
<view class="details-item">
|
|
|
<view class="details-main">
|
|
|
@@ -13,25 +18,56 @@
|
|
|
</view>
|
|
|
<view class="item-row">
|
|
|
<view class="price" style="color:#3385FF;">
|
|
|
- <text>¥{{ parseFloat(info.realPrice) }}</text>
|
|
|
- <text v-if="Number(info.tkPrice)>0" style="margin-left:30upx;color:red;">
|
|
|
+ <!-- 部分结清:原挂账划掉,下方另显剩余待结 -->
|
|
|
+ <text :class="[hasPartialClear ? 'price-del' : '']">¥{{ parseFloat(displayDebtPrice) }}</text>
|
|
|
+ <text v-if="Number(info.tkPrice)>0" style="margin-left:30upx;color:red;text-decoration:none;">
|
|
|
已退¥{{info.tkPrice?parseFloat(info.tkPrice):0}}
|
|
|
</text>
|
|
|
</view>
|
|
|
- <view class="price" style="border:1upx solid #8a7676;border-radius:10upx;font-weight:normal;color:#8a7676;font-size:32upx;width:150upx;height:80upx;justify-content:center;" @click.stop="delOrder(info)">删除</view>
|
|
|
-
|
|
|
- <view class="price" style="border:1upx solid #67a0f7;border-radius:10upx;font-weight:normal;color:#3385FF;font-size:32upx;width:180upx;height:80upx;justify-content:center;" @click.stop="goToDetai(info)">查看明细</view>
|
|
|
+ <view class="price action-del" @click.stop="delOrder(info)">删除</view>
|
|
|
+ <view class="price action-detail" @click.stop="goToDetai(info)">查看明细</view>
|
|
|
+ </view>
|
|
|
+ <view class="item-row" v-if="Number(info.nextDayTkPrice)>0">
|
|
|
+ <view class="refund-tip refund-tip-next">隔天售后 ¥{{parseFloat(info.nextDayTkPrice)}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="item-row" v-if="hasPartialClear">
|
|
|
+ <view class="price" style="color:red;">剩余待结 ¥{{ parseFloat(remainDebtPrice) }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
+/**
|
|
|
+ * 搜索结账已选行:金额口径与 detailsItem 一致(优先 remainDebtPrice)
|
|
|
+ */
|
|
|
export default {
|
|
|
props: {
|
|
|
info: {
|
|
|
required: true
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ /** 剩余待结:有 remainDebtPrice 用剩余,否则回落 actPrice/realPrice */
|
|
|
+ remainDebtPrice() {
|
|
|
+ const remain = Number(this.info.remainDebtPrice)
|
|
|
+ if (remain > 0) {
|
|
|
+ return remain
|
|
|
+ }
|
|
|
+ return Number(this.info.actPrice || this.info.realPrice || 0)
|
|
|
+ },
|
|
|
+ /** 展示挂账原额:有 debtPrice 用原挂账,否则等同剩余 */
|
|
|
+ displayDebtPrice() {
|
|
|
+ const debt = Number(this.info.debtPrice)
|
|
|
+ if (debt > 0) {
|
|
|
+ return debt
|
|
|
+ }
|
|
|
+ return this.remainDebtPrice
|
|
|
+ },
|
|
|
+ /** 原挂账大于剩余 → 已部分结清 */
|
|
|
+ hasPartialClear() {
|
|
|
+ return this.displayDebtPrice > this.remainDebtPrice
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
goToDetai(item){
|
|
|
this.$util.pageTo({url: "/pagesPurchase/info?orderSn="+item.orderSn})
|
|
|
@@ -103,6 +139,38 @@ export default {
|
|
|
color: #999999;
|
|
|
}
|
|
|
}
|
|
|
+ .price-del {
|
|
|
+ text-decoration: line-through;
|
|
|
+ color: #999 !important;
|
|
|
+ font-weight: 600;
|
|
|
+ }
|
|
|
+ .refund-tip {
|
|
|
+ font-size: 26upx;
|
|
|
+ font-weight: normal;
|
|
|
+ }
|
|
|
+ .refund-tip-next {
|
|
|
+ color: #e67e22;
|
|
|
+ }
|
|
|
+ .action-del {
|
|
|
+ border: 1upx solid #8a7676;
|
|
|
+ border-radius: 10upx;
|
|
|
+ font-weight: normal;
|
|
|
+ color: #8a7676;
|
|
|
+ font-size: 32upx;
|
|
|
+ width: 150upx;
|
|
|
+ height: 80upx;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+ .action-detail {
|
|
|
+ border: 1upx solid #67a0f7;
|
|
|
+ border-radius: 10upx;
|
|
|
+ font-weight: normal;
|
|
|
+ color: #3385FF;
|
|
|
+ font-size: 32upx;
|
|
|
+ width: 180upx;
|
|
|
+ height: 80upx;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|