|
|
@@ -1,3 +1,7 @@
|
|
|
+<!--
|
|
|
+ 花店采购列表卡片(shopping / mergeOrder)。
|
|
|
+ 主时间永远是开单 addTime;发货、账单只在与开单不是同一天时展示,避免当天三套时间重复占行。
|
|
|
+-->
|
|
|
<template>
|
|
|
<view class="order-item-view" @click="clickItemEvent">
|
|
|
<view class="item-header">
|
|
|
@@ -20,22 +24,18 @@
|
|
|
|
|
|
<view class="info-row">
|
|
|
<text class="info-label"> 开单:</text>
|
|
|
- <text class="info-value">{{ info.addTime ? info.addTime.substring(5, 16) : '' }}</text>
|
|
|
+ <text class="info-value">{{ info.addTime ? info.addTime.substr(5, 11) : '' }}</text>
|
|
|
+ <!-- 发货日与开单日不是同一天才展示,贴本行右侧,对齐 ghsApp 订单列表 -->
|
|
|
+ <text v-if="showSendDate" class="extra-date">发货日期 {{ info.sendTime.substr(5, 11) }}</text>
|
|
|
</view>
|
|
|
-
|
|
|
- <view class="info-row" v-if="info.payTime!='0000-00-00 00:00:00'">
|
|
|
+ <!-- 账单日被改过(与开单日不同)才占一行;同一天再展示等于重复 -->
|
|
|
+ <view class="info-row" v-if="showPayDate">
|
|
|
<text class="info-label"> 账单:</text>
|
|
|
- <text class="info-value">{{ info.payTime ? info.payTime.substring(5, 16) : '' }}</text>
|
|
|
+ <text class="info-value">{{ info.payTime.substr(5, 11) }}</text>
|
|
|
</view>
|
|
|
-
|
|
|
<view class="info-row">
|
|
|
<text class="info-label"> 单号:</text>
|
|
|
<text class="info-value">{{ info.orderSn }} </text>
|
|
|
- <!-- 相对 item-main 贴卡片右缘,避免被右侧价格列把可用宽度挤窄后换行 -->
|
|
|
- <text
|
|
|
- v-if="info.addTime && info.sendTime && info.sendTime.indexOf('0000-00-00') < 0 && info.addTime.substr(5, 5) != info.sendTime.substr(5, 5)"
|
|
|
- class="send-date"
|
|
|
- >发货日期 {{ info.sendTime.substr(5, 11) }}</text>
|
|
|
</view>
|
|
|
<view class="info-row">
|
|
|
<text class="info-label"> 采购:</text>
|
|
|
@@ -85,6 +85,30 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
+ /**
|
|
|
+ * 发货日与开单日是否不是同一天。
|
|
|
+ * 当天发货与开单重复,列表不展示;预订单/补录跨天才需要一眼看到。
|
|
|
+ */
|
|
|
+ showSendDate() {
|
|
|
+ const add = this.info.addTime
|
|
|
+ const send = this.info.sendTime
|
|
|
+ if (!add || !send || send.indexOf('0000-00-00') >= 0) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return add.substr(5, 5) !== send.substr(5, 5)
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 账单日与开单日是否不是同一天。
|
|
|
+ * 多数 payTime 与开单同一天,常驻会占一行重复;改过账单日才展示。
|
|
|
+ */
|
|
|
+ showPayDate() {
|
|
|
+ const add = this.info.addTime
|
|
|
+ const pay = this.info.payTime
|
|
|
+ if (!add || !pay || pay.indexOf('0000-00-00') >= 0) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return add.substr(5, 5) !== pay.substr(5, 5)
|
|
|
+ },
|
|
|
/**
|
|
|
* 列表展示价:actPrice - 封账退款(nextDayTkPrice)
|
|
|
* 封账退款不改 actPrice,扣减后与详情最终金额一致
|