shish 13 ساعت پیش
والد
کامیت
c0e9ea240b
3فایلهای تغییر یافته به همراه58 افزوده شده و 2 حذف شده
  1. 4 0
      ghsApp/src/api/gys/index.js
  2. 29 1
      ghsApp/src/pagesGys/details.vue
  3. 25 1
      ghsApp/src/pagesGys/detailsItem.vue

+ 4 - 0
ghsApp/src/api/gys/index.js

@@ -20,6 +20,10 @@ export const clearOrderApi = id => {
 	return https.post("/purchase-clear/create-order", id);
 	return https.post("/purchase-clear/create-order", id);
 };
 };
 
 
+/**
+ * 供货商采购挂账明细。searchTime 筛账单时间 entryTime;sendSearchTime 筛发货时间 sendTime。
+ * 对应 PurchaseController::actionDebtList
+ */
 export const getDebtList = data => {
 export const getDebtList = data => {
 	return https.get("/purchase/debt-list", data);
 	return https.get("/purchase/debt-list", data);
 };
 };

+ 29 - 1
ghsApp/src/pagesGys/details.vue

@@ -9,7 +9,11 @@
 						{{ ghsInfo.name}}
 						{{ ghsInfo.name}}
 					</text>
 					</text>
 				</view>
 				</view>
-				<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
+				<!-- 发货时间在左、开单时间在右;不改顶栏结构,只并排放两个筛选 -->
+				<view class="date-filter">
+					<DateSelect class="bar" top="0" @selectDateFn="selectSendDateFn" defaultShowName="发货时间" />
+					<DateSelect class="bar date-filter-gap" top="0" @selectDateFn="selectDateFn" defaultShowName="开单时间" />
+				</view>
 			</view>
 			</view>
 		</view>
 		</view>
 		<view scroll-y class="shop-list">
 		<view scroll-y class="shop-list">
@@ -108,6 +112,9 @@ export default {
 			searchTime:'',
 			searchTime:'',
 			startTime:'',
 			startTime:'',
 			endTime:'',
 			endTime:'',
+			sendSearchTime:'',
+			sendStartTime:'',
+			sendEndTime:'',
 			payWayList:[{name:"线下微信",id:0},{name:"现金",id:4},{name:"线下支付宝",id:1},{name:"银行卡",id:5}],
 			payWayList:[{name:"线下微信",id:0},{name:"现金",id:4},{name:"线下支付宝",id:1},{name:"银行卡",id:5}],
 			payWay:0,
 			payWay:0,
 			confirm:-1
 			confirm:-1
@@ -196,6 +203,16 @@ export default {
 				uni.stopPullDownRefresh()
 				uni.stopPullDownRefresh()
 			})
 			})
 		},
 		},
+		// 发货时间筛 sendTime,可与开单时间(entryTime)同时生效
+		selectSendDateFn(val){
+			this.sendSearchTime = val.searchTime
+			this.sendStartTime = val.startTime
+			this.sendEndTime = val.endTime
+			this.resetDebtListPage()
+			this.initData().then(res => {
+				uni.stopPullDownRefresh()
+			})
+		},
 		clearSelectedOrder(){
 		clearSelectedOrder(){
 			if (this.$util.isEmpty(this.selectList)) {
 			if (this.$util.isEmpty(this.selectList)) {
 				this.$msg("请选择订单");
 				this.$msg("请选择订单");
@@ -211,6 +228,9 @@ export default {
 					searchTime: this.searchTime,
 					searchTime: this.searchTime,
 					startTime: this.startTime,
 					startTime: this.startTime,
 					endTime: this.endTime,
 					endTime: this.endTime,
+					sendSearchTime: this.sendSearchTime,
+					sendStartTime: this.sendStartTime,
+					sendEndTime: this.sendEndTime,
 					confirm: this.confirm,
 					confirm: this.confirm,
 				}))
 				}))
 				this.ghsInfo = data.ghsInfo;
 				this.ghsInfo = data.ghsInfo;
@@ -361,6 +381,14 @@ export default {
 				font-weight: 600;
 				font-weight: 600;
 				color: #333333;
 				color: #333333;
 			}
 			}
+			.date-filter {
+				display: flex;
+				align-items: center;
+				flex-shrink: 0;
+			}
+			.date-filter-gap {
+				margin-left: 24upx;
+			}
 		}
 		}
 	}
 	}
 	.shop-list {
 	.shop-list {

+ 25 - 1
ghsApp/src/pagesGys/detailsItem.vue

@@ -25,6 +25,8 @@
 				<view class="price" style="color:#3385FF;">
 				<view class="price" style="color:#3385FF;">
 					<text :class="[hasPartialClear ? 'price-del' : '']">¥{{ parseFloat(displayDebtPrice) }}</text>
 					<text :class="[hasPartialClear ? 'price-del' : '']">¥{{ parseFloat(displayDebtPrice) }}</text>
 				</view>
 				</view>
+				<!-- 发货时间与账单时间(entryTime)不完全相同时才贴右侧 -->
+				<view v-if="showSendTime" class="send-date">发货时间 {{ info.sendTime.substr(2, 14) }}</view>
 			</view>
 			</view>
 			<!-- 售后退款单独成行,不与挂账价格挤在同一行 -->
 			<!-- 售后退款单独成行,不与挂账价格挤在同一行 -->
 			<view class="item-row" v-if="Number(info.tkPrice)>0">
 			<view class="item-row" v-if="Number(info.tkPrice)>0">
@@ -33,7 +35,7 @@
 			<view class="item-row" v-if="Number(info.nextDayTkPrice)>0">
 			<view class="item-row" v-if="Number(info.nextDayTkPrice)>0">
 				<view class="refund-tip refund-tip-next">跨天售后 ¥{{parseFloat(info.nextDayTkPrice)}}</view>
 				<view class="refund-tip refund-tip-next">跨天售后 ¥{{parseFloat(info.nextDayTkPrice)}}</view>
 			</view>
 			</view>
-			<view class="item-row" v-if="hasPartialClear">
+			<view class="item-row" v-if="Number(remainDebtPrice)>0 && parseFloat(displayDebtPrice)!=parseFloat(remainDebtPrice)">
 				<view class="price" style="color:red;">剩余待结 ¥{{ parseFloat(remainDebtPrice) }}</view>
 				<view class="price" style="color:red;">剩余待结 ¥{{ parseFloat(remainDebtPrice) }}</view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -81,6 +83,20 @@ export default {
 		},
 		},
 		hasPartialClear() {
 		hasPartialClear() {
 			return this.displayDebtPrice > this.remainDebtPrice
 			return this.displayDebtPrice > this.remainDebtPrice
+		},
+		/**
+		 * 金额行右侧发货时间:sendTime 有效,且与账单时间 entryTime(含时分秒)不完全相同才展示。
+		 */
+		showSendTime() {
+			const send = this.info.sendTime
+			const bill = this.info.entryTime
+			if (!send || send.indexOf('0000-00-00') >= 0) {
+				return false
+			}
+			if (!bill || bill.indexOf('0000-00-00') >= 0) {
+				return true
+			}
+			return send.substr(0, 19) !== bill.substr(0, 19)
 		}
 		}
 	},
 	},
 	methods: {
 	methods: {
@@ -183,6 +199,14 @@ export default {
 		.refund-tip-next {
 		.refund-tip-next {
 			color: #e67e22;
 			color: #e67e22;
 		}
 		}
+		.send-date {
+			margin-left: auto;
+			text-align: right;
+			white-space: nowrap;
+			flex-shrink: 0;
+			font-size: 26upx;
+			color: red;
+		}
 	}
 	}
 }
 }
 </style>
 </style>