|
@@ -87,15 +87,15 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <!-- 待结订单提示区(如果有欠款且非删除状态) -->
|
|
|
|
|
|
|
+ <!-- 待结订单提示区:合并后直接使用 xhGhs.debtNum 与净 balance(负值=待结金额) -->
|
|
|
<view
|
|
<view
|
|
|
class="pending-order-box"
|
|
class="pending-order-box"
|
|
|
hover-class="none"
|
|
hover-class="none"
|
|
|
@click.stop="goToDebtList(item)"
|
|
@click.stop="goToDebtList(item)"
|
|
|
- v-if="Number(item.debtAmount)>0 && isNormalList">
|
|
|
|
|
|
|
+ v-if="hasSupplierPending(item) && isNormalList">
|
|
|
<view class="pending-order-content">
|
|
<view class="pending-order-content">
|
|
|
<image class="pending-icon" referrerpolicy="no-referrer" src="/static/lanhu_020105gongyingshangliebiao/ps2pvfa1l5i34w5vqj2k7b3kejml3i3nmrba1421bf-caa2-491b-8773-af413df7e96d.png" />
|
|
<image class="pending-icon" referrerpolicy="no-referrer" src="/static/lanhu_020105gongyingshangliebiao/ps2pvfa1l5i34w5vqj2k7b3kejml3i3nmrba1421bf-caa2-491b-8773-af413df7e96d.png" />
|
|
|
- <text class="pending-text">待结订单 {{item.debtNum}} 笔 ¥{{item.debtAmount?parseFloat(item.debtAmount):0}} 查看明细 ></text>
|
|
|
|
|
|
|
+ <text class="pending-text">待结订单 {{item.debtNum || 0}} 笔 ¥{{supplierPendingAmount(item)}} 查看明细 ></text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -245,6 +245,19 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
iconSrc,
|
|
iconSrc,
|
|
|
|
|
+ // 供货商待结金额:净 balance 为负时取绝对值(appVersion>=3 协议)
|
|
|
|
|
+ supplierPendingAmount(item) {
|
|
|
|
|
+ const bal = parseFloat(item.balance || 0)
|
|
|
|
|
+ if (bal < 0) {
|
|
|
|
|
+ return Math.abs(bal)
|
|
|
|
|
+ }
|
|
|
|
|
+ return parseFloat(item.debtAmount || 0)
|
|
|
|
|
+ },
|
|
|
|
|
+ // 是否有待结:以 debtNum 或待结金额为准
|
|
|
|
|
+ hasSupplierPending(item) {
|
|
|
|
|
+ const debtNum = Number(item.debtNum || 0)
|
|
|
|
|
+ return debtNum > 0 || this.supplierPendingAmount(item) > 0
|
|
|
|
|
+ },
|
|
|
changeLocation(ghs){
|
|
changeLocation(ghs){
|
|
|
let that = this
|
|
let that = this
|
|
|
this.$util.confirmModal({content:'确认修改?'},() => {
|
|
this.$util.confirmModal({content:'确认修改?'},() => {
|