shish 19 часов назад
Родитель
Сommit
117f4953a1

+ 1 - 1
ghsApp/src/admin/home/components/OrderItem.vue

@@ -869,7 +869,7 @@ export default {
 
 .bill-date {
   flex: 1;
-  color: #a29696;
+  color: #3385FF;
   display: flex;
   align-items: center;
   justify-content: flex-end;

+ 16 - 1
ghsApp/src/pagesOrder/detail.vue

@@ -81,7 +81,7 @@
 				</view>
 				<view class="order-info_box" v-if="detailInfo.payStatus == 1">
 					<view>发货时间:</view>
-					<view>{{ detailInfo.sendTime && detailInfo.sendTime.indexOf('0000-00-00') < 0 ? detailInfo.sendTime.substr(5, 11) : '' }}</view>
+					<view :style="isSendPayDifferentDay ? 'color:#3385FF;' : ''">{{ detailInfo.sendTime && detailInfo.sendTime.indexOf('0000-00-00') < 0 ? detailInfo.sendTime.substr(5, 11) : '' }}</view>
 					<view class="price">
 						<button @click="openSendTimePicker" class="admin-button-com default">修改</button>
 					</view>
@@ -855,6 +855,21 @@ export default {
 			}
 			return add.substr(0, 10) !== pay.substr(0, 10)
 		},
+		/**
+		 * 发货日与账单日 payTime 不是同一天时,仅发货时间标红。
+		 */
+		isSendPayDifferentDay() {
+			const info = this.detailInfo || {}
+			const send = info.sendTime
+			const pay = info.payTime
+			if (!send || String(send).indexOf('0000-00-00') >= 0) {
+				return false
+			}
+			if (!pay || String(pay).indexOf('0000-00-00') >= 0) {
+				return false
+			}
+			return String(send).substr(0, 10) !== String(pay).substr(0, 10)
+		},
 	},
 	onShareAppMessage(res) {
 		const purchaseId = this.detailInfo.purchaseId || 0

+ 18 - 4
ghsApp/src/pagesPurchase/info.vue

@@ -31,11 +31,10 @@
 					<view>预录时间:</view>
 					<view>{{ detailInfo.addTime?detailInfo.addTime.substr(2,14):'' }}</view>
 				</view>
-				<view class="order-info_box">
+				<view class="order-info_box" v-if="detailInfo.status==4">
 					<view>记账时间:</view>
-					<view>
-						<text v-if="detailInfo.status==4">{{ detailInfo.entryTime?detailInfo.entryTime.substr(2,14):'' }}</text>
-						<text v-else>待入库</text>
+					<view :style="isEntrySendDifferentDay ? 'color:red;' : ''">
+						{{ detailInfo.entryTime?detailInfo.entryTime.substr(2,14):'' }}
 					</view>
 				</view>
 				<view class="order-info_box">
@@ -404,6 +403,21 @@ export default {
 			const next = Number(this.detailInfo.nextDayTkPrice || 0)
 			return parseFloat((tk + next).toFixed(2))
 		},
+		/**
+		 * 记账日与发货日不是同一天时,仅记账时间标红,提示跨天入库。
+		 */
+		isEntrySendDifferentDay() {
+			const info = this.detailInfo || {}
+			const entry = info.entryTime
+			const send = info.sendTime
+			if (!entry || String(entry).indexOf('0000-00-00') >= 0) {
+				return false
+			}
+			if (!send || String(send).indexOf('0000-00-00') >= 0) {
+				return false
+			}
+			return String(entry).substr(0, 10) !== String(send).substr(0, 10)
+		},
 		/**
 		 * 预录时间 addTime:记账时间 entryTime 为空,或与 addTime 相差超过 30 分钟时才显示。
 		 */

+ 2 - 2
ghsApp/src/pagesPurchase/orderItem.vue

@@ -94,7 +94,7 @@ export default {
 			return Math.abs(addMs - entryMs) > 30 * 60 * 1000
 		},
 		/**
-		 * 右侧记账时间:entryTime 有效,且与主展示的发货时间(含时分秒)不完全相同才展示。
+		 * 右侧记账时间:entryTime 有效,且与发货时间不在同一天(只比 Y-m-d)才展示。
 		 */
 		showEntryTime() {
 			const entry = this.info.entryTime
@@ -105,7 +105,7 @@ export default {
 			if (!send || send.indexOf('0000-00-00') >= 0) {
 				return true
 			}
-			return entry.substr(0, 19) !== send.substr(0, 19)
+			return entry.substr(0, 10) !== send.substr(0, 10)
 		}
 	},
 	methods: {