|
@@ -10,7 +10,11 @@
|
|
|
<view style="margin-bottom:28upx;" @click="addData(item)">
|
|
<view style="margin-bottom:28upx;" @click="addData(item)">
|
|
|
<view>编号 {{item.orderSn}}</view>
|
|
<view>编号 {{item.orderSn}}</view>
|
|
|
<view>时间 {{item.entryTime.substr(2,14)}}</view>
|
|
<view>时间 {{item.entryTime.substr(2,14)}}</view>
|
|
|
- <view>金额 ¥{{item.actPrice}}</view>
|
|
|
|
|
|
|
+ <!-- 搜索结果:优先展示剩余待结(对齐 details 结账口径) -->
|
|
|
|
|
+ <view>剩余待结 ¥{{ searchRemainPrice(item) }}</view>
|
|
|
|
|
+ <view v-if="searchHasPartialClear(item)" style="color:#999;text-decoration:line-through;font-size:28upx;">
|
|
|
|
|
+ 原挂账 ¥{{ searchDisplayDebtPrice(item) }}
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</block>
|
|
</block>
|
|
|
</block>
|
|
</block>
|
|
@@ -72,6 +76,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+/**
|
|
|
|
|
+ * 供货商按编号搜索结账页
|
|
|
|
|
+ * 合计/列表金额与 details 一致:优先 remainDebtPrice(剩余待结)
|
|
|
|
|
+ */
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import DetailsItem from "./searchItem";
|
|
import DetailsItem from "./searchItem";
|
|
|
import ModalModule from "@/components/plugin/modal";
|
|
import ModalModule from "@/components/plugin/modal";
|
|
@@ -102,11 +110,17 @@ export default {
|
|
|
let num = 0
|
|
let num = 0
|
|
|
return num
|
|
return num
|
|
|
},
|
|
},
|
|
|
|
|
+ /** 结账合计用剩余待结;无字段时回落 actPrice/realPrice(对齐 details.vue) */
|
|
|
selectTotalAmount() {
|
|
selectTotalAmount() {
|
|
|
let amount = 0;
|
|
let amount = 0;
|
|
|
if (this.getOrderList) {
|
|
if (this.getOrderList) {
|
|
|
for (const item of this.getOrderList) {
|
|
for (const item of this.getOrderList) {
|
|
|
- amount=amount+Number(item.realPrice)
|
|
|
|
|
|
|
+ const remain = Number(item.remainDebtPrice)
|
|
|
|
|
+ if (remain > 0) {
|
|
|
|
|
+ amount = amount + remain
|
|
|
|
|
+ } else {
|
|
|
|
|
+ amount = amount + Number(item.actPrice || item.realPrice || 0)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
let newAmount = amount.toFixed(2);
|
|
let newAmount = amount.toFixed(2);
|
|
@@ -115,6 +129,27 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ /** 搜索结果:剩余待结金额 */
|
|
|
|
|
+ searchRemainPrice(item) {
|
|
|
|
|
+ const remain = Number(item && item.remainDebtPrice)
|
|
|
|
|
+ if (remain > 0) {
|
|
|
|
|
+ return parseFloat(remain)
|
|
|
|
|
+ }
|
|
|
|
|
+ return parseFloat(Number((item && (item.actPrice || item.realPrice)) || 0))
|
|
|
|
|
+ },
|
|
|
|
|
+ /** 搜索结果:原挂账金额 */
|
|
|
|
|
+ searchDisplayDebtPrice(item) {
|
|
|
|
|
+ const debt = Number(item && item.debtPrice)
|
|
|
|
|
+ if (debt > 0) {
|
|
|
|
|
+ return parseFloat(debt)
|
|
|
|
|
+ }
|
|
|
|
|
+ return this.searchRemainPrice(item)
|
|
|
|
|
+ },
|
|
|
|
|
+ /** 搜索结果:是否部分结清 */
|
|
|
|
|
+ searchHasPartialClear(item) {
|
|
|
|
|
+ return this.searchDisplayDebtPrice(item) > this.searchRemainPrice(item)
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
confirmClear(val) {
|
|
confirmClear(val) {
|
|
|
if(val.index == 0){
|
|
if(val.index == 0){
|
|
|
this.showClearModel = false
|
|
this.showClearModel = false
|