shish 3 лет назад
Родитель
Сommit
33f768e07c

+ 2 - 1
ghsApp/src/pages.json

@@ -352,7 +352,8 @@
 			"root": "pagesGys",
 			"pages": [
 				{ "path": "list", "style": { "navigationBarTitleText": "赊账单", "enablePullDownRefresh": true } },
-				{ "path": "details", "style": { "navigationBarTitleText": "赊账单", "enablePullDownRefresh": true } }
+				{ "path": "details", "style": { "navigationBarTitleText": "赊账单", "enablePullDownRefresh": true } },
+				{ "path": "search", "style": { "navigationBarTitleText": "赊账单", "enablePullDownRefresh": false } }
 			]
 		},
 		{

+ 5 - 5
ghsApp/src/pagesGys/details.vue

@@ -37,14 +37,14 @@
 			</view>
 		</view>
 
-		<modal-module :show="showClearModel" @click="confirmClear" :title="'结账'" color="#333" :size="32" padding="30upx 30upx" >
+		<modal-module :show="showClearModel" @click="confirmClear" :title="'结账'" color="#333" :size="32" padding="30rpx 30rpx" >
 			<template slot="customContent">
 				<view class="select-cmd_bx">
 					<view class="num_bx">
-						<view class="flex">金额:{{selectTotalAmount}}</view>
-						<view class="flex">实付:<input @focus="modifyPrice = null" v-model="modifyPrice" type="digit"/></view>
-						<view class="flex">优惠:{{(selectTotalAmount - modifyPrice).toFixed(2)}}</view>
-						<view class="flex">支付:
+						<view class="flex">合计金额:{{selectTotalAmount}}</view>
+						<view class="flex">实付金额:<input @focus="modifyPrice = null" v-model="modifyPrice" type="digit"/></view>
+						<view class="flex">优惠金额:{{(selectTotalAmount - modifyPrice).toFixed(2)}}</view>
+						<view class="flex">支付方式
 							<picker mode="selector" :value="payWay" :range="payWayList" range-key="name" @change="changePayWayFn" class="tui-input" >
 							<div style="border:1upx solid #CCCCCC;width:300upx;height:70upx;line-height:70upx;">{{ payWayData.name }}</div>
 							</picker>

+ 274 - 0
ghsApp/src/pagesGys/search.vue

@@ -0,0 +1,274 @@
+<template>
+<view class="app-content">
+
+	<uni-popup ref="searchShowRef" :mask-click="false" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+
+			<view style="height:auto;font-size:33upx;margin-top:130upx;padding-left:25upx;color:#333333;">
+				<view style="margin-bottom:28upx;">
+					<view>KD312702412 | 2023-06-17 00:21</view>
+					<view>金额 ¥23.5</view>
+				</view>
+				<view style="margin-bottom:28upx;">
+					<view>KD312702412 | 2023-06-17 00:21</view>
+					<view>金额 ¥23.5</view>
+				</view>
+				<view style="margin-bottom:28upx;">
+					<view>KD312702412 | 2023-06-17 00:21</view>
+					<view>金额 ¥23.5</view>
+				</view>
+			</view>
+
+	</uni-popup>
+
+    <view class="input-wrap_box">
+      <view>
+        <AppSearchModule placeholder="输入编号" @input="searchFn"/>
+      </view>
+      <view style="padding:0 10upx 0 20upx;" >
+				<button class="admin-button-com middle blue" @click="">清空</button>
+		</view>
+    </view>
+	<view class="order-page">
+		<view scroll-y class="shop-list">
+			<block v-if="!$util.isEmpty(detailsList)">
+				<view v-for="(item, index) in detailsList">
+				</view>
+			</block>
+			<block v-else>
+				<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(detailsList)" />
+			</block>
+		</view>
+		<view class="bar-view">
+			<template>
+				<view class="info-view">
+					<view class="details-select">
+						
+					</view>
+				</view>
+			</template>
+			<view class="btn-view">
+				<button :class="['admin-button-com', 'blue']" @click="clearSelectedOrder" >下一步</button>
+			</view>
+		</view>
+
+	</view>
+</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import { getDebtList,clearOrderApi } from "@/api/gys/index";
+import AppSearchModule from "@/components/module/app-search";
+export default {
+	components: { AppWrapperEmpty, AppSearchModule},
+	data() {
+		return {
+			totalAmount: "",
+			num: "",
+			detailsList: [],
+			searchList:[],
+			listLoading: false,
+      		isAllCheck: false,
+			showClearModel:false,
+			modifyPrice:0,
+			searchTime:'',
+			startTime:'',
+			endTime:'',
+			payWayData:{name:"线下微信",id:0},
+			payWayList:[{name:"线下微信",id:0},{name:"现金",id:4},{name:"线下支付宝",id:1},{name:"银行卡",id:5}],
+			payWay:0
+		};
+	},
+	computed: {
+	},
+	methods: {
+		searchFn(e) {
+			let that = this
+			if (this.$util.isEmpty(e)) {
+				that.$refs.searchShowRef.close()
+				that.searchList = [];
+				return false
+			}
+			if(e.length < 5){
+				that.$refs.searchShowRef.close()
+				that.searchList = [];
+				return false
+			}
+			getDebtList({id:this.option.id,shortNo:e}).then(res=>{
+				if(res.code == 1){
+					if (res.data.list && !this.$util.isEmpty(res.data.list)) {
+						that.searchList = res.data.list
+						that.$refs.searchShowRef.open('top')
+					}else{
+						that.$refs.searchShowRef.close()
+						that.searchList = [];
+					}
+				}
+			})
+		},
+		init(){
+
+		},
+		clearSelectedOrder(){
+			if (this.$util.isEmpty(this.selectList)) {
+				this.$msg("请选择订单");
+				return;
+			}
+			this.showClearModel = true;
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.class-popup-style{
+	z-index:999999;
+}
+.input-wrap_box {
+  background-color: #fff;
+  position: fixed;
+  top: 0;
+  z-index: 9999;
+  /* 手机mobile屏幕小于1000px */
+  @media screen and (max-width: 1100px) {
+    width: 100%;
+  }
+  /* 收银台cashier屏幕大于1000px */
+  @media screen and (min-width:1100px) {
+    width: 40%;
+  }   
+  height: 100upx;
+  display: flex;
+  align-items: center;
+  padding: 0 30upx;
+  & > view:nth-child(1) {
+    flex: 1;
+  }
+}
+.order-page {
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	background-color: #f9fbfc;
+	overflow: scroll;
+	.top-view {
+		position:fixed;
+		width:100%;
+		padding: 30upx;
+		background-color: #fff;
+		.top-row {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			&:not(:last-child) {
+				margin-bottom: 10upx;
+			}
+			.header-item {
+				font-size: 24upx;
+				font-weight: 400;
+				color: #999999;
+			}
+			.info-item {
+				display: flex;
+				align-items: center;
+				.logo {
+					margin-right: 10upx;
+					width: 32upx;
+					height: 32upx;
+					border-radius: 50%;
+				}
+				.name {
+					font-size: 28upx;
+					font-weight: 600;
+					color: #333333;
+				}
+			}
+			.price-item {
+				font-size: 34upx;
+				font-weight: 600;
+				color: #333333;
+			}
+		}
+	}
+	.shop-list {
+		margin-top:98upx;
+		padding: 20upx 30upx;
+		flex: 1;
+		padding-bottom: 100upx;
+	}
+	.bar-view {
+		position: fixed;
+		bottom: 0;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 0 30upx;
+		width: 100%;
+		height: 100upx;
+		background: #fff;
+		box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
+		.info-view {
+			display: flex;
+			align-items: center;
+			color: #333;
+			font-size: 24upx;
+			.iconfont {
+				font-size: 32upx;
+				color: #dddddd;
+			}
+			.price {
+				margin: 0 3upx;
+				color: $redColor;
+				font-size: 30upx;
+			}
+			.unit {
+				margin: 0 3upx;
+				color: $redColor;
+				font-size: 30upx;
+			}
+		}
+		.btn-view {
+			display:flex;
+			.admin-button-com {
+				display:flex;
+				align-items:center;
+				justify-content:center;
+				margin:0 10upx;
+				width:200upx;
+				height:84upx;
+				font-size: 32upx;
+			}
+		}
+	}
+	.details-select {
+		font-size:30upx;
+		margin-right: 20upx;
+		display: inline-block;
+		.iconweixuanzhong,
+		.iconxuanzhong {
+		font-size: 40upx !important;
+		}
+		.iconxuanzhong {
+		color: $mainColor !important;
+		}
+	}
+	.select-cmd_bx {
+		.num_bx {
+			margin-top:30upx;
+			margin-bottom:50upx;
+			margin-left:80upx;
+			view{
+				height: 80upx;
+				font-size: 28upx;
+			}
+			input {
+				height: 70upx;
+				border: 1upx solid #dddddd;
+				border-radius: 4upx;
+				text-align: left;
+				margin-right: 24upx;
+				font-size: 35upx;
+				width:300upx;
+			}
+		}
+	}
+}
+</style>

+ 109 - 0
ghsApp/src/pagesGys/searchItem.vue

@@ -0,0 +1,109 @@
+<template>
+	<view class="details-item">
+		<view class="details-main">
+			<view class="item-header">
+				<text class="name">{{info.orderSn}} </text>
+			</view>
+			<view class="item-row">
+				<view class="mark">{{ info.addTime.substr(2,11) }} <text v-if="info.yfPayWay ==2" style="margin-left:16upx;color:#333333;">到付</text></view>
+			</view>
+			<view v-if="!$util.isEmpty(info.remark)" class="item-row">
+				<view class="mark" style="color:red;font-weight:bold;">{{ info.remark }}</view>
+			</view>
+			<view class="item-row">
+				<view class="price" style="color:#3385FF;">
+					<text>¥{{ parseFloat(info.realPrice) }}</text>
+					<text v-if="Number(info.tkPrice)>0" style="margin-left:30upx;color:red;">已退¥{{info.tkPrice?parseFloat(info.tkPrice):0}}</text>
+				</view>
+				<view class="price" style="border:1upx solid #67a0f7;border-radius:10upx;font-weight:normal;color:#3385FF;font-size:32upx;width:180upx;height:80upx;justify-content:center;" @click.stop="goToDetai(info)">查看明细</view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+export default {
+	props: {
+		info: {
+			required: true
+		},
+		isEdit: {
+			type: Boolean,
+			default: false
+		},
+		isCheck: {
+			type: Boolean,
+			default: false
+		}
+	},
+	methods: {
+		goToDetai(item){
+			this.$util.pageTo({
+				url: "/pagesPurchase/info",
+				query: {orderSn:item.orderSn}
+			});
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.details-item {
+	display: flex;
+	align-items: center;
+	padding: 30upx 20upx;
+	margin-bottom: 20upx;
+	background-color: #fff;
+	border-radius: 10upx;
+	.details-select {
+		margin-right: 30upx;
+		.iconfont {
+			font-size: 40upx;
+			color: #dddddd;
+		}
+		.iconxuanzhong {
+			color: $mainColor;
+		}
+	}
+	.details-main {
+		flex: 1;
+	}
+	.item-header {
+		display: flex;
+		align-items: center;
+		.logo {
+			margin-right: 20upx;
+			width: 50upx;
+			height: 50upx;
+			border-radius: 50%;
+		}
+		.name {
+			font-size: 28upx;
+			font-family: PingFang SC;
+			font-weight: 600;
+			color: #333333;
+		}
+	}
+	.item-row {
+		margin-top: 20upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		.mark {
+			font-size: 28upx;
+			font-weight: 400;
+			color: #666666;
+		}
+		.price {
+			display: flex;
+			align-items: center;
+			font-size: 28upx;
+			font-weight: 600;
+			color: #333333;
+			.iconfont {
+				font-size: 28upx;
+				color: #999999;
+			}
+		}
+	}
+}
+</style>

+ 6 - 0
ghsApp/src/pagesPurchase/supplier.vue

@@ -43,6 +43,9 @@
                 <image class="icon_3" referrerpolicy="no-referrer" src="/static/lanhu_020105gongyingshangliebiao/ps83ag7scu3a8bfq22ciodg5hiu0x9cesxjbfb4c9ca-ee3f-45ec-a6d7-6f166e13d6e6.png" />
               </view>
             </view>
+            <view v-if="item.location == 1" style="height:30upx;" @click.stop="goToSearchDebt(item)">
+            搜索
+            </view>
 
           </view>
         </block>
@@ -133,6 +136,9 @@ export default {
         this.supplierList = res.data.list
       })
     },
+    goToSearchDebt(item){
+      this.pageTo({url: '/pagesGys/search?id='+item.id})
+    },
     goToDebtList(item) {
       this.pageTo({url: '/pagesGys/details?id='+item.id})
 		},