shish 5 سال پیش
والد
کامیت
b8d37caeb8

+ 380 - 0
ghsApp/src/admin/clear/customInfo.vue

@@ -0,0 +1,380 @@
+<template>
+	<view class="app-content">
+		<view class="info-content_box">
+			<view class="title">
+				单据信息
+			</view>
+			<view class="bills-info_box content-box">
+				<view class="order-info_box">
+					<view>订单日期:</view>
+					<view>{{ detailInfo.addTime }}</view>
+				</view>
+				<view class="order-info_box">
+					<view>订单编码:</view>
+					<view>{{ detailInfo.orderSn }}</view>
+					<view class="price">
+						<button
+							@click="copy(detailInfo.orderSn)"
+							class="admin-button-com default"
+						>
+							复制
+						</button>
+					</view>
+				</view>
+				<view class="order-info_box">
+					<view>操作人员:</view>
+					<view>{{ detailInfo.operator }}</view>
+				</view>
+				<view class="order-info_box">
+					<view>状态:</view>
+					<view>已结账</view>
+				</view>
+			</view>
+			<view class="title">
+				订单信息
+			</view>
+			<view class="module-com content-box">
+				<view class="commodity-view">
+					<view class="commodity-list">
+						<view
+							v-for="(s, idx) in detailInfo.orderList"
+							:key="idx"
+							class="commodity-item"
+						>
+							<view class="item-info" @click="pageTo({url: '/pagesOrder/detail',query: {id: s.id,},})" >
+								<view class="info-line">
+									<text class="item-name">单号:{{ s.orderSn }}</text>
+									<text class="item-price">
+										<text class="unit">¥</text>
+										<text class="price">{{ s.realPrice }}</text>
+									</text>
+								</view>
+								<view class="info-line">
+									<text class="item-type">{{ s.property }}</text>
+									<text class="item-count">{{ `${s.bigNum}/${s.smallNum}` }}</text>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="summary-bar">
+						<view class="operate-view" ></view>
+						<view class="describe-view">
+							共{{ detailInfo.orderNum || 0 }}个订单
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="content-box price-detail">
+				<div class="module-com input-line-wrap">
+					<tui-list-cell class="line-cell" :hover="false">
+						<div class="tui-title">总金额</div>
+						<div class="detail-price_box" style="font-size: 28rpx;">¥{{ detailInfo.prePrice }}</div>
+					</tui-list-cell>
+					<tui-list-cell class="line-cell" :hover="false" v-if="detailInfo.discountAmount > 0">
+						<div class="tui-title">扣除</div>
+						<div class="detail-price_box" style="font-size: 28rpx;">¥{{ detailInfo.discountAmount }}</div>
+					</tui-list-cell>
+					<tui-list-cell class="line-cell" :hover="false">
+						<div class="tui-title">实付</div>
+						<div class="detail-price_box" style="font-size: 28rpx;">¥{{ detailInfo.realPrice }}</div>
+					</tui-list-cell>
+
+				</div>
+			</view>
+			<view class="content-box price-detail" v-if="detailInfo.remark.length > 0">
+				<div class="module-com input-line-wrap">
+					<tui-list-cell class="line-cell" :hover="false">
+						<div class="tui-title">备注</div>
+						<input
+							:disabled="true"
+							v-model="detailInfo.remark"
+							placeholder-class="phcolor"
+							class="tui-input"
+							name="name"
+							maxlength="50"
+							type="text"
+						/>
+					</tui-list-cell>
+				</div>
+			</view>
+
+			<view class="title">
+				客户
+			</view>
+			<view class="address-des_bx content-box">
+				<view>
+					<view> {{ detailInfo.customName }} {{ detailInfo.customMobile }} </view>
+				</view>
+				<view>
+					<i
+						@click="callUp(detailInfo.customMobile)"
+						class="iconfont icondianhua1"
+					></i>
+				</view>
+			</view>
+
+		</view>
+	</view>
+</template>
+
+<script>
+import { getCustomDetail } from "@/api/clear/index";
+import productMins from "@/mixins/product";
+import TuiListCell from "@/components/plugin/list-cell";
+export default {
+	name: "customInfo",
+	components: {
+		TuiListCell
+	},
+	mixins: [productMins],
+	data() {
+		return {
+			pageType: "order_change",
+			autoLoad: false,
+			stepActive: 0,
+			form: {
+				name: ""
+			},
+			detailInfo: {},
+			loading: false
+		};
+	},
+	onShow() {
+		console.log('aabbcc')
+	},
+	methods: {
+		copy(val) {
+			const self = this;
+			uni.setClipboardData({
+				data: val,
+				success: function() {
+					self.$msg("复制成功");
+				}
+			});
+		},
+		callUp(mobile) {
+			uni.makePhoneCall({
+				phoneNumber: mobile
+			});
+		},
+		async init() {
+			const { id } = this.option;
+			if (!id) {
+				return;
+			}
+			const { data } = await getCustomDetail(id);
+			this.detailInfo = data;
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.info-content_box {
+	padding: 0 20px 100px;
+	& > .title {
+		color: #666666;
+		font-size: 28px;
+		font-weight: 600;
+		padding: 30px 3px;
+	}
+	& .address-des_bx {
+		display: flex;
+		padding: 20px 10px 30px 20px;
+		& > view:nth-child(1) {
+			flex: 1;
+			margin-top: 10px;
+			& > view:nth-child(1) {
+				color: #333333;
+				font-size: 32px;
+				font-weight: bold;
+			}
+			& > view:nth-child(2) {
+				color: #666666;
+				font-size: 28px;
+				font-weight: 400;
+				margin-top: 20px;
+			}
+		}
+		& > view:nth-child(2) {
+			display: flex;
+			& .icondianhua1 {
+				font-size: 50px;
+				color: #3385ff;
+				margin-left: 0px;
+			}
+		}
+	}
+	.bills-info_box {
+		padding: 30px 20px 30px;
+		// border-bottom: 1px solid #EEEEEE;
+		& > .order-info_box {
+			display: flex;
+			align-items: center;
+			font-size: 26px;
+			font-weight: 400;
+			margin-bottom: 5px;
+			& > view:nth-child(1) {
+				color: #999999;
+				width: 135px;
+				text-align: right;
+			}
+			& > view:nth-child(2) {
+				color: #333333;
+			}
+			& > .price {
+				flex: 1;
+				font-size: 30px;
+				color: #333333;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				& .iconxiangyou {
+					color: #999999;
+					font-size: 25px;
+					margin-left: 12px;
+				}
+			}
+		}
+	}
+	.content-box {
+		background-color: #ffffff;
+		border-radius: 10px;
+	}
+	.commodity-view {
+		display: flex;
+		flex-direction: column;
+		.commodity-list {
+			padding: 20px;
+			.commodity-item {
+				display: flex;
+				margin-bottom: 20px;
+				.item-icon {
+					flex-shrink: 0;
+					width: 140px;
+					height: 140px;
+				}
+				.item-info {
+					display: flex;
+					flex-direction: column;
+					justify-content: center;
+					flex: 1;
+					margin-left: 20px;
+					.info-line {
+						margin-bottom: 20px;
+						display: flex;
+						justify-content: space-between;
+						align-items: flex-end;
+						.item-name {
+							color: #666;
+							font-size: 28px;
+						}
+						.item-price {
+							color: #333;
+							font-size: 22px;
+							.price {
+								font-size: 32px;
+								font-weight: bold;
+							}
+						}
+						.item-type {
+							color: #999;
+							font-size: 24px;
+						}
+						.item-count {
+							color: #666;
+							font-size: 24px;
+						}
+					}
+				}
+			}
+		}
+		.summary-bar {
+			padding: 0 20px;
+			height: 90px;
+			display: flex;
+
+			align-items: center;
+			justify-content: space-between;
+			border-top: 1px solid #eeeeee;
+			.operate-view {
+				display: flex;
+
+				align-items: center;
+				color: #3385ff;
+				font-size: 26px;
+				.iconfont {
+					margin-right: 20px;
+					font-size: 40px;
+				}
+			}
+			.describe-view {
+				display: flex;
+
+				align-items: center;
+				color: #333;
+				font-size: 24px;
+				.price {
+					font-weight: bold;
+					font-size: 36px;
+				}
+			}
+		}
+	}
+	.shipping-address {
+		display: flex;
+		align-items: center;
+		margin-top: 20px;
+		& > view:nth-child(1) {
+			color: #999999;
+			font-size: 28upx;
+			font-weight: 400;
+			display: inline-block;
+			padding: 30upx 0 30upx 20upx;
+			flex: 1;
+			& > text {
+				color: #333333;
+				font-weight: 600;
+			}
+		}
+		& > view:nth-child(2) {
+			font-size: 60px;
+			color: #d6e7ff;
+			margin-right: 10px;
+		}
+	}
+	.price-detail {
+		margin-top: 20px;
+		margin-bottom: 20px;
+	}
+	.detail-price_box {
+		color: #333333;
+		font-size: 22px;
+		text-align: right;
+		flex: 1;
+		font-weight: 600;
+		&.red {
+			color: #ff2842;
+		}
+	}
+}
+.app-footer {
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+	& .admin-button-com {
+		padding: 0;
+		margin-right: 15px;
+		width: 140px;
+		height: 70px;
+		line-height: 70px;
+		text-align: center;
+		color: #3385ff;
+		border: 1px solid #3385ff;
+		&.active{
+			color: #666666;
+			border: 1px solid #ccc;
+		}
+	}
+}
+</style>

+ 141 - 0
ghsApp/src/admin/clear/customList.vue

@@ -0,0 +1,141 @@
+<template>
+	<view class="order-page">
+		<view scroll-y class="order-list">
+			<block v-if="!$util.isEmpty(list.data)">
+				<OrderItem v-for="(item, index) in list.data" :key="index" :info="item" @click="gotoDetail(item)"></OrderItem>
+			</block>
+			<block v-else>
+				<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+			</block>
+		</view>
+	</view>
+</template>
+<script>
+import OrderItem from "./customOrderItem";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import { list } from "@/mixins";
+import { getCustomClearList } from "@/api/clear/index";
+export default {
+	components: {
+		OrderItem,
+		AppWrapperEmpty
+	},
+	mixins: [list],
+	data() {
+		return {}
+	},
+	onPullDownRefresh() {
+		this.resetList();
+		this._list().then(res => {
+			uni.stopPullDownRefresh();
+		});
+	},
+	methods: {
+		async init() {
+			this._list();
+		},
+		_list() {
+			let options = {
+				page: this.list.page,
+				pageSize: this.list.pageSize,
+				customId:this.option.customId
+			};
+			return getCustomClearList(options).then(res => {
+					this.completes(res);
+				}).catch(err => {});
+		},
+		gotoDetail(item) {
+			uni.navigateTo({
+				url: `/admin/clear/customInfo?id=${item.id}`,
+				success: result => {},
+				fail: () => {},
+				complete: () => {}
+			});
+		}
+	}
+};
+</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;
+		// padding-bottom: 50upx;
+		.allot-item {
+			margin-bottom: 1px;
+			padding: 30upx;
+			display: flex;
+			align-items: center;
+			box-shadow: 0px 1px 0px 0px #eeeeee;
+			background-color: #fff;
+			.info {
+				flex: 1;
+				margin-right: 20px;
+				.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: 0px -1px 6px 0px rgba(4, 0, 0, 0.06);
+		.btn-view {
+			display: flex;
+			.admin-button-com {
+				margin: 0 10upx;
+				width: 140upx;
+			}
+		}
+	}
+}
+</style>

+ 127 - 0
ghsApp/src/admin/clear/customOrderItem.vue

@@ -0,0 +1,127 @@
+<template>
+	<view class="order-item-view" @click="clickItemEvent">
+		<view class="item-header">
+			<view class="title">
+				<image class="icon" :src="info.customAvatar" alt="" />
+				<text class="name">
+					{{ info.customName }}
+				</text>
+			</view>
+			<view class="status">已结账</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 }} </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 }} <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>

+ 12 - 6
ghsApp/src/api/clear/index.js

@@ -1,15 +1,21 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 import https from "@/plugins/luch-request_0.0.7/request";
 
 
-/** *
- * 采购订单详情
- */
+//供应商的结帐单详情
 export const getDetail = async id => {
 export const getDetail = async id => {
 	return https.get("/clear/get-full-info", { id });
 	return https.get("/clear/get-full-info", { id });
 };
 };
 
 
-/** *
- * 月结单
- */
+//供应商的结帐单
 export const getClearList = async data => {
 export const getClearList = async data => {
 	return https.get("/clear/list", data);
 	return https.get("/clear/list", data);
+};
+
+//客户的结帐单
+export const getCustomClearList = async data => {
+	return https.get("/clear/custom-list", data);
+};
+
+//客户的结帐单详情
+export const getCustomDetail = async id => {
+	return https.get("/clear/get-custom-full-info", { id });
 };
 };

+ 14 - 2
ghsApp/src/pages.json

@@ -429,7 +429,7 @@
 				{
 				{
 					"path": "details",
 					"path": "details",
 					"style": {
 					"style": {
-						"navigationBarTitleText": "结单",
+						"navigationBarTitleText": "结单",
 						"enablePullDownRefresh": true
 						"enablePullDownRefresh": true
 					}
 					}
 				}
 				}
@@ -477,7 +477,7 @@
 				{
 				{
 					"path": "list",
 					"path": "list",
 					"style": {
 					"style": {
-						"navigationBarTitleText": "结单"
+						"navigationBarTitleText": "结单"
 					}
 					}
 				},
 				},
 				{
 				{
@@ -485,6 +485,18 @@
 					"style": {
 					"style": {
 						"navigationBarTitleText": "详情"
 						"navigationBarTitleText": "详情"
 					}
 					}
+				},
+				{
+					"path": "customList",
+					"style": {
+						"navigationBarTitleText": "结帐单"
+					}
+				},
+				{
+					"path": "customInfo",
+					"style": {
+						"navigationBarTitleText": "详情"
+					}
 				}
 				}
 			]
 			]
 		},
 		},

+ 7 - 5
ghsApp/src/pagesArrears/details.vue

@@ -54,7 +54,6 @@
 				</view>
 				</view>
 			</template>
 			</template>
 			<view class="btn-view">
 			<view class="btn-view">
-				<!--<button :class="['admin-button-com', 'blue']" @click="batchEvent" >收款</button>-->
 				<button :class="['admin-button-com', 'blue']" @click="isModelFun" >收款</button>
 				<button :class="['admin-button-com', 'blue']" @click="isModelFun" >收款</button>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -237,7 +236,7 @@ export default {
 		// 支付成功
 		// 支付成功
 		async paySuccess(parameter) {
 		async paySuccess(parameter) {
 			await clearOrderApi({...parameter,modifyPrice:this.modifyPrice});
 			await clearOrderApi({...parameter,modifyPrice:this.modifyPrice});
-			this.pageTo({url:'/admin/common/pageSuccess?title=收款成功', type: 2});
+			this.pageTo({url:'/common/pageSuccess?title=收款成功', type: 2});
 		},
 		},
 		payFail() {
 		payFail() {
 		}
 		}
@@ -351,18 +350,21 @@ export default {
   }
   }
 	.select-cmd_bx {
 	.select-cmd_bx {
 		.num_bx {
 		.num_bx {
-			margin-bottom: 80px;
+			margin-top:30px;
+			margin-bottom:50px;
+			margin-left:80rpx;
 			view{
 			view{
 				height: 80rpx;
 				height: 80rpx;
 				font-size: 28rpx;
 				font-size: 28rpx;
 			}
 			}
 			input {
 			input {
-				height: 80rpx;
+				height: 70rpx;
 				border: 1px solid #dddddd;
 				border: 1px solid #dddddd;
 				border-radius: 4px;
 				border-radius: 4px;
 				text-align: left;
 				text-align: left;
 				margin-right: 24px;
 				margin-right: 24px;
-				font-size: 40rpx;
+				font-size: 35rpx;
+				width:300rpx;
 			}
 			}
 		}
 		}
 	}
 	}

+ 2 - 2
ghsApp/src/pagesClient/member/detail.vue

@@ -50,8 +50,8 @@
       </view>
       </view>
       <view class="module-com user-open_bx">
       <view class="module-com user-open_bx">
         <view class="input-line-wrap">
         <view class="input-line-wrap">
-            <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="pageTo({ url: '/admin/clear/list',query: {customId: userInfo.id}})">
-              <div class="tui-title">结单</div>
+            <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="pageTo({ url: '/admin/clear/customList',query: {customId: userInfo.id}})">
+              <div class="tui-title">结单</div>
             </tui-list-cell>
             </tui-list-cell>
             <tui-list-cell class="line-cell" :hover="false">
             <tui-list-cell class="line-cell" :hover="false">
               <div class="tui-title">允许欠款</div>
               <div class="tui-title">允许欠款</div>