shish 1 سال پیش
والد
کامیت
88090e1ea9

+ 144 - 0
mallApp/src/pages/clear/list.vue

@@ -0,0 +1,144 @@
+<template>
+	<view class="order-page">
+		<block v-if="!$util.isEmpty(list.data)">
+		<view scroll-y class="order-list">
+			<OrderItem v-for="(item, index) in list.data" :key="index" :info="item" @click="gotoDetail(item)"></OrderItem>
+		</view>
+		</block>
+		<block v-else>
+			<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+		</block>
+	</view>
+</template>
+<script>
+import OrderItem from "./orderItem";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import { list } from "@/mixins";
+import { getClearList } from "@/api/clear/index";
+export default {
+	components: {
+		OrderItem,
+		AppWrapperEmpty
+	},
+	mixins: [list],
+	data() {
+		return {}
+	},
+	onPullDownRefresh() {
+		this.resetList();
+		this.getList().then(res => {
+			uni.stopPullDownRefresh();
+		});
+	},
+	onReachBottom () {
+		if (!this.list.finished) {
+			this.getList().then(res => {
+				uni.stopPullDownRefresh()
+			})
+		} else {
+			uni.stopPullDownRefresh()
+		}
+	},
+	methods: {
+		async init() {
+			this.getList();
+		},
+		getList() {
+			let options = {
+				page: this.list.page,
+				pageSize: this.list.pageSize,
+				ghsId:this.option.ghsId
+			};
+			getClearList(options).then(res => {
+				this.completes(res);
+			})
+		},
+		gotoDetail(item) {
+			uni.navigateTo({ url: `/admin/clear/info?id=${item.id}` })
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.order-page {
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	background-color: #f9fbfc;
+	.order-list {
+		padding-top: 20upx;
+		padding-bottom: 80upx;
+		flex: 1;
+		.allot-item {
+			margin-bottom: 1px;
+			padding: 30upx;
+			display: flex;
+			align-items: center;
+			box-shadow: 0upx 1px 0upx 0upx #eeeeee;
+			background-color: #fff;
+			.info {
+				flex: 1;
+				margin-right: 20upx;
+				.info-order {
+					font-size: 32upx;
+					font-weight: 600;
+					color: #333333;
+				}
+				.info-name {
+					margin: 40upx 0 20upx;
+					font-size: 28upx;
+					font-weight: 400;
+					color: #666666;
+				}
+				.info-time {
+					margin-right: 30upx;
+					font-size: 28upx;
+					font-weight: 400;
+					color: #666666;
+				}
+			}
+			.status {
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				flex-shrink: 0;
+				width: 100upx;
+				color: #cccccc;
+				.status-name {
+					margin-top: 10upx;
+					font-size: 24upx;
+				}
+				.iconfont {
+					font-size: 46upx;
+				}
+				&.primary {
+					color: #3385ff;
+				}
+				&.gray {
+					color: #cccccc;
+				}
+				&.warn {
+					color: #ffaf1d;
+				}
+			}
+		}
+	}
+	.bar-view {
+		flex-shrink: 0;
+		display: flex;
+		justify-content: flex-end;
+		align-items: center;
+		padding: 0 30upx;
+		width: 100%;
+		height: 100upx;
+		box-shadow: 0upx -1px 6upx 0upx rgba(4, 0, 0, 0.06);
+		.btn-view {
+			display: flex;
+			.admin-button-com {
+				margin: 0 10upx;
+				width: 140upx;
+			}
+		}
+	}
+}
+</style>

+ 123 - 0
mallApp/src/pages/clear/orderItem.vue

@@ -0,0 +1,123 @@
+<template>
+	<view class="order-item-view" @click="clickItemEvent">
+		<view class="item-header">
+			<view class="title">
+				<image class="icon" :src="info.ghsAvatar"></image>
+				<text class="name"> {{ info.ghsName }} </text>
+			</view>
+			<view class="status">{{info.status == 1 ?'待结清':info.status==2?'已结清':info.status==3?'已取消':'待结清'}}</view>
+		</view>
+		<view class="item-main" >
+			<view class="item-info">
+				<view class="info-row">
+					<text class="info-label"> 日期:</text>
+					<text class="info-value">{{ info.addTime ? info.addTime.substr(5,11) : '' }} </text>
+				</view>
+				<view class="info-row">
+					<text class="info-label"> 单号:</text>
+					<text class="info-value">{{ info.orderSn }} </text>
+				</view>
+				<view class="info-row">
+					<text class="info-label"> 人员:</text>
+					<text class="info-value">{{ info.operator }} </text>
+				</view>
+			</view>
+			<view class="item-price">¥{{ info.realPrice ? parseFloat(info.realPrice):0 }} <text class="iconfont iconxiangyou"></text>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+import { PURCHASE_ORDER_STATUS } from "@/utils/declare";
+export default {
+	name: "orderItem",
+	props: {
+		info: {
+			required: true
+		}
+	},
+	data() {
+		return {
+			PURCHASE_ORDER_STATUS
+		};
+	},
+	computed: {},
+	methods: {
+		clickItemEvent() {
+			this.$emit("click", this.info);
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.order-item-view {
+	padding: 30upx;
+	margin-bottom: 20upx;
+	width: 100%;
+	background-color: #fff;
+	.item-header {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		margin-bottom: 20upx;
+		.title {
+			display: flex;
+			align-items: center;
+			flex: 1;
+
+			.icon {
+				margin-right: 20upx;
+				width: 50upx;
+				height: 50upx;
+				border-radius: 25upx;
+				border-radius: 50%;
+			}
+			.name {
+				font-size: 32upx;
+				font-weight: 600;
+				color: #333333;
+			}
+		}
+		.status {
+			flex-shrink: 0;
+			color: $mainColor;
+		}
+	}
+	.item-main {
+		display: flex;
+
+		align-items: flex-end;
+		.item-info {
+			flex: 1;
+
+			font-size: 26upx;
+			.info-row {
+				margin-top: 12upx;
+				display: flex;
+				align-items: center;
+			}
+			.info-label {
+				font-weight: 400;
+				color: #999999;
+			}
+			.info-value {
+				font-weight: 400;
+				color: #333333;
+			}
+		}
+		.item-price {
+			display: flex;
+			align-items: center;
+			flex-shrink: 0;
+
+			font-size: 30upx;
+			font-weight: 600;
+			color: #333333;
+			.iconfont {
+				font-size: 28upx;
+				color: #999999;
+			}
+		}
+	}
+}
+</style>

+ 1 - 1
mallApp/src/pages/item/item.vue

@@ -84,7 +84,7 @@
 			<view style="position: fixed;bottom: 108upx;width:100vw;background-color:white;" @click.stop="">
 				<view class="commodity-view">
 					<view class="summary-bar">
-						<button class="admin-button-com blue middle" style="border:none;" @click.stop="delMemory()">清空花材</button>
+						<button class="admin-button-com blue middle" style="border:none;" @click.stop="delMemory()">清空购物车</button>
 					</view>
 					<view class="commodity-list">
 						<view class="commodity-item" v-for="(item, index) in selectList" :key="index">

+ 2 - 0
mallApp/src/pages/order/detail.vue

@@ -183,6 +183,8 @@ export default {
           this.payWayInfo = "支付宝";
         } else if (res.data.payWay == 2) {
           this.payWayInfo = "余额";
+        } else if (res.data.payWay == 3) {
+          this.payWayInfo = "记账";
         } else {
           this.payWayInfo = "其它";
         }

+ 17 - 3
mallApp/src/pages/order/list.vue

@@ -4,7 +4,7 @@
       <div class="list-wrap" v-for="(item, index) in list.data" :key="index" @click="pageTo({ url: '/pages/order/detail', query: { id: item.id } })" >
         <div class="list-top flex-center-between">
           <div class="app-color-3">编号:<text style="color:black;font-size:28upx;">{{ item.sendNum }}</text></div>
-          <div class="app-price">{{ item.status | constantfilter('ORDER_STATUS') }}</div>
+          <div class="app-price" style="color:black;">{{ item.status | constantfilter('ORDER_STATUS') }}</div>
         </div>
         <div class="list-bottom flex-center-between">
           <div>
@@ -12,15 +12,29 @@
             <span class="app-size-30">{{ item.addTime ? item.addTime.substring(5,16) : '' }}</span>
           </div>
         </div>
+        <div class="list-bottom flex-center-between">
+          <div>
+            <span class="app-color-3">单号:</span>
+            <span class="app-size-30">{{ item.orderSn }}</span>
+          </div>
+        </div>
         <div class="list-bottom flex-center-between">
           <div>
             <span class="app-color-3">金额:</span>
             <span class="app-size-30">¥{{ item.orderPrice ? parseFloat(item.orderPrice) : 0 }}</span>
           </div>
-          <block v-if="item.status == 0">
-            <button class="button-com red" @click.stop="pageTo({ url: '/pages/callback/index', query: { pageStatus: 1, orderSn: item.orderSn, totalPrice: item.orderPrice, couponId: item.couponId } })" >立即付</button>
+          <block v-if="item.status == 1">
+            <button class="button-com red" @click.stop="pageTo({ url: '/pages/callback/index', query: { pageStatus: 1, orderSn: item.orderSn, totalPrice: item.orderPrice, couponId: item.couponId } })" >立即付</button>
           </block>
         </div>
+
+        <div class="list-bottom flex-center-between" v-if="Number(item.remainDebtPrice)>0">
+          <div>
+            <span class="app-color-3">待结:</span>
+            <span class="app-size-30" style="color:red;font-weight:bold;">¥{{ item.remainDebtPrice ? parseFloat(item.remainDebtPrice) : 0 }}</span>
+          </div>
+        </div>
+
       </div>
     </block>
     <block v-else>