2 次代碼提交 bc1ccffb5e ... 116acf3aed

作者 SHA1 備註 提交日期
  qzy 116acf3aed Merge remote-tracking branch 'origin/feature/asyncOrder' into feature/asyncOrder 1 月之前
  qzy 8e756088e2 整车购买 1 月之前

+ 2 - 2
common/http.js

@@ -2,10 +2,10 @@
 // const ip = 'http://192.168.2.8:8080'; //线下
 //const ip = 'http://hs-server.aseanbusiness.cn'; //线上
 // const ngip = 'http://hs.tbgjhc.top:7010'
-const ip = 'http://hs-server.tbgjhc.top:8018';
+// const ip = 'http://hs-server.tbgjhc.top:8018';
 //静态图片地址前缀
 // const ngip = 'http://192.168.3.15:8080/sp-admin'
-// const ip = 'http://192.168.31.250:8080'; //线下
+const ip = 'http://192.168.3.15:8080'; //线下
 
 /**
  * 封装的http请求

+ 1 - 1
common/style.scss

@@ -155,7 +155,7 @@
 	border-radius: 8px;
 	overflow: hidden;
 	.s_item {
-		padding: 10px;
+		padding: 5px;
 		background-color: white;
 		color: $font-c;
 		overflow: hidden;

+ 12 - 4
pages.json

@@ -147,7 +147,7 @@
 		}, {
 			"path": "pages/market/two/purchaser/buy/detail",
 			"style": {
-				"navigationBarTitleText": "收购详情",
+				"navigationBarTitleText": "详情",
 				"enablePullDownRefresh": false
 			}
 
@@ -190,21 +190,21 @@
 		}, {
 			"path": "pages/market/two/leader/confirm",
 			"style": {
-				"navigationBarTitleText": "单确认",
+				"navigationBarTitleText": "单确认",
 				"enablePullDownRefresh": false
 			}
 
 		}, {
 			"path": "pages/market/two/leader/success",
 			"style": {
-				"navigationBarTitleText": "接单成功",
+				"navigationBarTitleText": "购买成功",
 				"enablePullDownRefresh": false
 			}
 
 		}, {
 			"path": "pages/market/one/leader/success",
 			"style": {
-				"navigationBarTitleText": "接单成功",
+				"navigationBarTitleText": "购买成功",
 				"enablePullDownRefresh": false
 			}
 
@@ -536,6 +536,14 @@
 
 		},
 		{
+			"path": "pages/market/two/purchaser/buy/buyWhole",
+			"style": {
+				"navigationBarTitleText": "整车购买",
+				"enablePullDownRefresh": false
+			}
+
+		},
+		{
 			"path": "pages/market/one/cooperative/peopleOrders",
 			"style": {
 				"navigationBarTitleText": "合作社边民订单",

+ 2 - 0
pages/index/index.vue

@@ -156,6 +156,7 @@
 			};
 		},
 		onLoad() {
+			uni.hideLoading()
 			this.getBannerList();
 			this.getNewsList();
 			this.getMenu();
@@ -392,6 +393,7 @@
 					});
 					return;
 				}
+				console.log(url);
 				uni.navigateTo({
 					url: url,
 					fail: res => {

+ 2 - 2
pages/market/one/confirm/apply.vue

@@ -49,8 +49,8 @@ export default {
 				peopleConfirmStatus: 1, //边民确认状态
 				cooperEntrustStatus: 1,//互助委托申报确认状态
 				//applyConfirmStatus: 0, //进口申报确认状态
-				finishStatus: 0, //订单完成状态
-				resaleStatus: 0, //订单转售状态
+				// finishStatus: 0, //订单完成状态
+				// resaleStatus: 0, //订单转售状态
 				confirmType: 'apply_confirm_time'
 			},
 			list: [],

+ 2 - 2
pages/market/one/confirm/cooperation.vue

@@ -48,8 +48,8 @@ export default {
 				// peopleConfirmStatus: 1, //边民确认状态
 				cooperEntrustStatus: 1,//互助委托申报确认状态
 				// applyConfirmStatus: 0, //进口申报确认状态
-				finishStatus: 0, //订单完成状态
-				resaleStatus: 0, //订单转售状态
+				// finishStatus: 0, //订单完成状态
+				// resaleStatus: 0, //订单转售状态
 				confirmType: 'cooper_entrust_time'
 			},
 			list: [],

+ 2 - 2
pages/market/one/confirm/people.vue

@@ -49,8 +49,8 @@ export default {
 				//peopleConfirmStatus: 0, //边民确认状态
 				// cooperEntrustStatus: 0, //互助委托申报确认状态
 				// applyConfirmStatus: 0, //进口申报确认状态
-				finishStatus: 0, //订单完成状态
-				resaleStatus: 0, //订单转售状态
+				// finishStatus: 0, //订单完成状态
+				// resaleStatus: 0, //订单转售状态
 				confirmType: 'people_confirm_time'
 			},
 			list: [],

+ 54 - 37
pages/market/one/cooperative/order.vue

@@ -2,35 +2,34 @@
 	<view>
 		<view class="tab" style="height: 110px;">
 			<u-tabs :list="tab" @click="click" :lineHeight="5"></u-tabs>
-			<view style="display: flex;margin-top: 10px;">
-				<u--input placeholder="选择日期" border="surround"   v-model="param.declTime" clearable readonly>
-					<text  @click="show=!show" slot="suffix">选择</text>
+			<view style="display: flex;margin-top: 10px;z-index: 999;">
+				<view class="searchDate" @click="show=!show">{{param.declTime}}</view>
+				<!-- <u--input placeholder="选择日期" border="surround"   v-model="param.declTime" clearable readonly @click="show=!show"> -->
 				</u--input>
 				<view class="reset_btn" @click="cleanDate">重置</view>
 			</view>
-			<u-calendar :show="show" minDate="2024-01-01" maxDate="2099-12-30" title="选择日期" @confirm="confirm"
-				@close="show=false"></u-calendar>
+			<u-calendar :show="show" minDate="2024-08-15" :insert="false" title="选择日期" @confirm="confirm"></u-calendar>
 		</view>
-		<view class="goodsList" >
+		<view class="goodsList">
 			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
 				<view class="title">{{ item.shopName }}
-				<view v-if="item.hzsConfirmStatus==0">
-					<view class="state">
-						<text class="icon">&#xe830;</text>
-						<text>未确认</text>
+					<view v-if="item.hzsConfirmStatus==0">
+						<view class="state">
+							<text class="icon">&#xe830;</text>
+							<text>未确认</text>
+						</view>
 					</view>
-				</view>
-				<view v-else>
-					<view class="state" v-if="item.finishStatus == 1">
-						<text class="icon">&#xe830;</text>
-						<text>已结算</text>
-					</view>
-					<view class="state" v-else>
-						<text class="icon">&#xe830;</text>
-						<text>未结算</text>
+					<view v-else>
+						<view class="state" v-if="item.finishStatus == 1">
+							<text class="icon">&#xe830;</text>
+							<text>已结算</text>
+						</view>
+						<view class="state" v-else>
+							<text class="icon">&#xe830;</text>
+							<text>未结算</text>
+						</view>
 					</view>
 				</view>
-				</view>
 				<view class="con">
 					<view class="productName omit" style="font-size: 16px;">{{ item.goodsNames }}</view>
 					<view class="desc omit">
@@ -42,7 +41,7 @@
 						<text>| 车辆 {{ item.veNo }}</text>
 						<text v-if="item.orderCount"> | 订单 {{ item.orderCount }}</text>
 					</view>
-					
+
 					<view class="price"> ¥ {{ item.sumAmt }}</view>
 				</view>
 				<view class="clear"></view>
@@ -71,17 +70,17 @@
 					{
 						name: '未确认',
 						finishStatus: 0,
-						hzsConfirmStatus:0
+						hzsConfirmStatus: 0
 					},
 					{
 						name: '未结算',
 						finishStatus: 0,
-						hzsConfirmStatus:1
+						hzsConfirmStatus: 1
 					},
 					{
 						name: '已结算',
 						finishStatus: 1,
-						hzsConfirmStatus:1
+						hzsConfirmStatus: 1
 
 					},
 				],
@@ -89,8 +88,8 @@
 				param: {
 					pageNo: 1,
 					pageSize: 10,
-					declTime: '',
-					sortType:25
+					declTime: '选择日期',
+					sortType: 25
 				},
 				list: [],
 				loadMore: true,
@@ -104,7 +103,7 @@
 		onShow() {},
 		methods: {
 			cleanDate() {
-				this.param.declTime = '';
+				this.param.declTime = '选择日期';
 				this.param.pageNo = 1;
 				this.getData()
 			},
@@ -114,16 +113,20 @@
 				this.getData()
 			},
 			getData() {
+				let params = JSON.parse(JSON.stringify(this.param));
+				if (params.declTime == '选择日期') {
+					params.declTime = '';
+				}
 				this.http.request({
 					url: '/level-one-server/app/HtTradeSettlement/getList',
 					loading: 'false',
-					data: this.param,
+					data: params,
 					success: res => {
 						this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
 						if (res.data.data) {
 							this.list.push(...res.data.data);
 						}
-						if (this.param.pageNo == 1 && res.data.data&&res.data.data.length==0) {
+						if (this.param.pageNo == 1 && res.data.data && res.data.data.length == 0) {
 							this.list = []
 						}
 					}
@@ -136,14 +139,16 @@
 			},
 			detail(item) {
 				uni.navigateTo({
-					url: '/pages/market/one/cooperative/peopleOrders?mainId=' + item.id+'&goodsName='+item.goodsNames+'&veNo='+item.veNo+'&declTime='+item.declTime+'&sumGrossWt='+item.sumGrossWt
+					url: '/pages/market/one/cooperative/peopleOrders?mainId=' + item.id + '&goodsName=' + item
+						.goodsNames + '&veNo=' + item.veNo + '&declTime=' + item.declTime + '&sumGrossWt=' + item
+						.sumGrossWt
 				});
 			},
 		},
 		//下拉刷新
 		onPullDownRefresh() {
-			this.param.pageNo=1;
-			this.param.declTime='';
+			this.param.pageNo = 1;
+			this.param.declTime = '';
 			setTimeout(() => {
 				this.getData();
 				uni.stopPullDownRefresh();
@@ -167,12 +172,14 @@
 	.state {
 		margin-right: -70px;
 	}
-	.goodsList{
-		.item{
-			.con{
+
+	.goodsList {
+		.item {
+			.con {
 				width: 90%;
-				.desc{
-					uni-text{
+
+				.desc {
+					uni-text {
 						padding-right: 5px;
 					}
 				}
@@ -181,6 +188,16 @@
 	}
 
 	.tab {
+		.searchDate {
+			width: 60%;
+			font-size: 15px;
+			border-radius: 5px;
+			padding: 10px;
+			color: #545555;
+			background-color: #f6f6f6;
+			margin-left: 10px;
+		}
+
 		.reset_btn {
 			line-height: 35px;
 			padding: 0 15px;

+ 36 - 27
pages/market/two/leader/success.vue

@@ -2,39 +2,48 @@
 	<view class="cmain">
 		<view class="icon">&#xe602;</view>
 		<view class="desc">购买成功。</view>
-		<button class="btn" @click="go()">返回订单列表</button>
+		<button class="btn" @click="goBuy()" type="warn">继续购买</button>
+		<button class="btn" @click="go()" style="margin-top: 20px;">订单列表</button>
 	</view>
 </template>
 
 <script>
-export default {
-	data() {
-		return {};
-	},
-	methods: {
-		go() {
-			uni.redirectTo({
-				url: '/pages/market/two/purchaser/order/list'
-			});
+	export default {
+		data() {
+			return {};
+		},
+		methods: {
+			go() {
+				uni.redirectTo({
+					url: '/pages/market/two/purchaser/order/list'
+				});
+			},
+			goBuy() {
+				uni.redirectTo({
+					url: '/pages/market/two/list'
+				});
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-.cmain {
-	text-align: center;
-	padding: 40px;
-	color: $font-c;
-	.icon {
-		font-size: 150px;
-		color: $main-color;
-	}
-	.desc {
-		margin-top: 7px;
-	}
-	.btn {
-		margin-top: 50px;
+	.cmain {
+		text-align: center;
+		padding: 40px;
+		color: $font-c;
+
+		.icon {
+			font-size: 150px;
+			color: $main-color;
+		}
+
+		.desc {
+			margin-top: 7px;
+		}
+
+		.btn {
+			margin-top: 50px;
+		}
 	}
-}
-</style>
+</style>

+ 255 - 151
pages/market/two/list.vue

@@ -1,40 +1,57 @@
 <template>
 	<view>
-		<view class="search">
-			<u-search placeholder="搜索商品名或车牌号" v-model="param.goodsName" bgColor="white" @search="refresh()" :animation="true" actionText="取消" @clear="refresh()"></u-search>
-			<view class="clear"></view>
-		</view>
-		<view class="goodsList">
-			<view class="sort-list">
-				<view class="sort-item" :class="{ active: item.check }" v-for="(item, index) in sort" :key="index" @click="select(item, index)">
-					<text>{{ item.name }}</text>
-					<text v-if="index > 0 && item.isAsc == 'desc'" class="icon">&#xeb0a;</text>
-					<text v-if="index > 0 && item.isAsc == 'asc'" class="icon">&#xeb0b;</text>
+		<view style="position: relative;z-index: 999;height:150px;">
+			<view style="position: fixed;width: 100%;background-color: white;">
+				<u-tabs :list="tab" @click="clickSearchType" :lineHeight="5"></u-tabs>
+				<view class="search">
+					<u-search placeholder="搜索商品名或车牌号" v-model="param.goodsName" bgColor="#e2e2e2" @search="refresh()"
+						:animation="true" actionText="取消" @clear="refresh()"></u-search>
+					<view class="clear"></view>
 				</view>
-				<view class="type" @click="go()">
-					<text>{{ param.goodsType || '分类' }}</text>
-					<text class="icon">&#xe8f2;</text>
+				<view class="sort-list">
+					<view class="sort-item" :class="{ active: item.check }" v-for="(item, index) in sort" :key="index"
+						@click="select(item, index)">
+						<text>{{ item.name }}</text>
+						<text v-if="index > 0 && item.isAsc == 'desc'" class="icon">&#xeb0a;</text>
+						<text v-if="index > 0 && item.isAsc == 'asc'" class="icon">&#xeb0b;</text>
+					</view>
+					<!-- <view class="type" @click="go()">
+						<text>{{ param.goodsType || '分类' }}</text>
+						<text class="icon">&#xe8f2;</text>
+					</view> -->
 				</view>
 			</view>
+		</view>
+		<view class="goodsList">
 			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
-				<view class="title">{{ item.leaderName }}</view>
+				<view class="title">
+					<text v-if="currentOrderType==2">{{ item.leaderName }}</text>
+					<text v-if="currentOrderType==1">{{ item.shopName }}</text>
+				</view>
 				<view class="check" @click.stop="selected(item)" v-if="user.userType == 3">
 					<text class="check icon" v-if="item.check" style="color: #4581fb">&#xe631;</text>
 					<text class="check icon" v-else>&#xe60c;</text>
 				</view>
 				<view class="con">
-					<view class="productName omit">{{ item.goodsName }}</view>
-					<view class="desc">车牌号 {{ item.veNo }}</view>
+					<view class="productName omit">
+						<text v-if="currentOrderType==2">{{ item.goodsName }}</text>
+						<text v-if="currentOrderType==1">{{ item.goodsNames }}</text>
+					</view>
+					<view class="desc">车牌号 <text style="font-weight: bold;margin-left: 5px;"> {{ item.veNo }}</text>
+					</view>
 					<view class="desc omit">
-						<text>重量 {{ item.totalWeight }}{{ item.goodsUnit }}</text>
+						<text v-if="currentOrderType==2">重量 {{ item.totalWeight }}{{ item.goodsUnit }}</text>
+						<text v-if="currentOrderType==1">重量 {{ item.sumNetWt }} kg</text>
 						<text>{{ item.tradeAreaName }}</text>
 					</view>
-					<view class="price">上架金额 ¥ {{ item.resalePrice }}</view>
+					<view class="price" v-if="currentOrderType==2"> ¥ {{ item.resalePrice }}</view>
+					<view class="price" v-if="currentOrderType==1"> ¥ {{ item.sumUpPrice }}</view>
 					<view class="op">
 						<view class="date">{{ item.createTime }}</view>
 						<template>
-							<view class="icon btn" v-if="user.userType == 3" @click.stop="addCar(item)">&#xe600;</view>
-							<view class="btn"      v-if="user.userType == 3" @click.stop="buy(item)">购买</view>
+							<view class="icon btn" v-if="user.userType == 3&&currentOrderType==2"
+								@click.stop="addCar(item)">&#xe600;</view>
+							<view class="btn" v-if="user.userType == 3" @click.stop="buy(item)">购买</view>
 						</template>
 					</view>
 				</view>
@@ -43,11 +60,11 @@
 			<u-empty v-if="!loadMore && list.length == 0"></u-empty>
 		</view>
 		<productType v-model="show"></productType>
-		<button class="addBtn" @click="goCar()" v-if="user.userType == 3">
+		<button class="addBtn" @click="goCar()" v-if="user.userType == 3&&currentOrderType==2">
 			<text class="icon">&#xe600;</text>
 			<view class="bag animated" :class="{ bounce: add }" v-if="cars > 0">{{ cars }}</view>
 		</button>
-		<view class="mfooter" v-if="selects.length > 0&&user.userType == 3">
+		<view class="mfooter" v-if="selects.length > 0">
 			<view class="flex">
 				<view class="f">
 					<button class="btn" @click="buy({})">立即购买({{ selects.length }})</button>
@@ -58,150 +75,237 @@
 </template>
 
 <script>
-export default {
-	data() {
-		return {
-			user: this.getUser(),
-			show: false,
-			isAsc: 'desc',
-			cars: 0,
-			add: false,
-			sort: [
-				{ name: '综合', sortName: 'id', isAsc: 'desc', check: false },
-				{ name: '日期', sortName: 'create_time', isAsc: 'desc', check: false },
-				{ name: '金额', sortName: 'resale_price', isAsc: 'desc', check: false }
-			],
-			list: [],
-			param: { pageNo: 1, pageSize: 10 },
-			loadMore: true,
-			selects: []
-		};
-	},
-	onLoad(e) {
-		this.getData();
-		//选择商品分类
-		uni.$on('productType', res => {
-			this.param.typeCode = res.no;
-			this.param.goodsType = res.name;
-			this.refresh();
-		});
-	},
-	methods: {
-		select(item, index) {
-			this.sort.forEach(it => (it.check = false));
-			item.check = true;
-			if (index > 0) {
-				this.isAsc = this.isAsc == 'desc' ? 'asc' : 'desc';
-				item.isAsc = this.isAsc;
-			}
-			this.param.orderBy = item.sortName + ' ' + this.isAsc;
-			this.refresh();
+	export default {
+		data() {
+			return {
+				tab: [{
+						name: '整车',
+						orderType: 1
+					},
+					{
+						name: '非整车',
+						orderType: 2
+					},
+				],
+				currentOrderType: 1,
+				user: this.getUser(),
+				show: false,
+				isAsc: 'desc',
+				cars: 0,
+				add: false,
+				sort: [{
+						name: '综合',
+						sortName: 'id',
+						isAsc: 'desc',
+						check: false
+					},
+					{
+						name: '日期',
+						sortName: 'create_time',
+						isAsc: 'desc',
+						check: false
+					},
+					{
+						name: '金额',
+						sortName: 'resale_price',
+						isAsc: 'desc',
+						check: false
+					}
+				],
+				list: [],
+				param: {
+					pageNo: 1,
+					pageSize: 10
+				},
+				loadMore: true,
+				selects: []
+			};
 		},
-		getData() {
-			this.http.request({
-				url: '/level-two-server/app/TbOrders/getLevelTwoList',
-				data: this.param,
-				loading: 'false',
-				success: res => {
-					this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
-					this.list.push(...res.data.data);
-				}
+		onLoad(e) {
+
+			//选择商品分类
+			uni.$on('productType', res => {
+				this.param.typeCode = res.no;
+				this.param.goodsType = res.name;
+				this.refresh();
 			});
 		},
-		//多选购买
-		selected(item) {
-			item.check = !item.check;
-			this.$forceUpdate();
-			this.selects = this.list.filter(item => item.check);
+		onShow() {
+			this.init();
+			this.query();
 		},
-		//选择分类
-		go() {
-			uni.navigateTo({ url: '/pages/market/productType?current=' + this.param.current + '&now=' + this.param.now });
-		},
-		detail(item) {
-			uni.navigateTo({ url: '/pages/market/two/detail?orderId=' + item.id });
-		},
-		addCar(item) {
-			this.add = true;
-			this.http.request({
-				url: '/level-two-server/app/TbOrdersCart/add',
-				method: 'POST',
-				data: { orderId: item.id },
-				success: res => {
-					this.cars++;
-					setTimeout(() => {
-						this.add = false;
-					}, 500);
-					uni.showToast({ title: '添加成功' });
+		methods: {
+			clickSearchType(e) {
+				let orderType = e.orderType;
+				if (this.currentOrderType == orderType) {
+					return;
 				}
-			});
-		},
-		goCar() {
-			uni.navigateTo({ url: '/pages/market/two/purchaser/order/cart' });
-		},
-		buy(item) {
-			if (item.id) {
+				this.currentOrderType = orderType;
+				this.init();
+				this.query();
+			},
+			init() {
+				this.list = [];
+				this.param = {
+					pageNo: 1,
+					pageSize: 10
+				}
+			},
+			query() {
+				if (this.currentOrderType == 2) {
+					this.getData();
+				} else {
+					this.getWholeData();
+				}
+			},
+			select(item, index) {
+				this.sort.forEach(it => (it.check = false));
+				item.check = true;
+				if (index > 0) {
+					this.isAsc = this.isAsc == 'desc' ? 'asc' : 'desc';
+					item.isAsc = this.isAsc;
+				}
+				item.sortName=item.sortName=='resale_price'&&this.currentOrderType==1?item.sortName='sumUpPrice':item.sortName;
+				this.param.orderBy = item.sortName + ' ' + this.isAsc;
+				this.refresh();
+			},
+			getWholeData() {
+				this.http.request({
+					url: '/level-one-server/app/HtTradeSettlement/getOnSaleList',
+					data: this.param,
+					loading: 'false',
+					success: res => {
+						this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
+						this.list.push(...res.data.data);
+					}
+				});
+			},
+			getData() {
+				this.http.request({
+					url: '/level-two-server/app/TbOrders/getLevelTwoList',
+					data: this.param,
+					loading: 'false',
+					success: res => {
+						this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
+						this.list.push(...res.data.data);
+					}
+				});
+			},
+			//多选购买
+			selected(item) {
+				item.check = !item.check;
+				this.$forceUpdate();
+				this.selects = this.list.filter(item => item.check);
+			},
+			//选择分类
+			go() {
 				uni.navigateTo({
-					url: '/pages/market/two/purchaser/buy/buy?orderId=' + item.id
+					url: '/pages/market/productType?current=' + this.param.current + '&now=' + this.param.now
 				});
-			} else {
+			},
+			detail(item) {
 				uni.navigateTo({
-					url: '/pages/market/two/purchaser/buy/buy?orderId=' + this.selects.map(item => item.id)
+					url: '/pages/market/two/purchaser/buy/detail?id=' + item.id + '&type=' + this.currentOrderType
 				});
+			},
+			addCar(item) {
+				this.add = true;
+				this.http.request({
+					url: '/level-two-server/app/TbOrdersCart/add',
+					method: 'POST',
+					data: {
+						orderId: item.id
+					},
+					success: res => {
+						this.cars++;
+						setTimeout(() => {
+							this.add = false;
+						}, 500);
+						uni.showToast({
+							title: '添加成功'
+						});
+					}
+				});
+			},
+			goCar() {
+				uni.navigateTo({
+					url: '/pages/market/two/purchaser/order/cart'
+				});
+			},
+			buy(item) {
+				let ids = undefined;
+				if (item.id) {
+					ids = item.id;
+				} else {
+					ids = this.selects.map(item => item.id)
+				}
+				if (this.currentOrderType == 2) {
+					uni.navigateTo({
+						url: '/pages/market/two/purchaser/buy/buy?orderId=' + ids
+					});
+					return;
+				}
+				uni.navigateTo({
+					url: '/pages/market/two/purchaser/buy/buyWhole?ids=' + ids
+				});
+			},
+			//刷新数据
+			refresh() {
+				this.loadMore = true;
+				this.param.pageNo = 1;
+				this.list = [];
+				this.selects = [];
+				this.query();
 			}
 		},
-		//刷新数据
-		refresh() {
-			this.loadMore = true;
-			this.param.pageNo = 1;
-			this.list = [];
-			this.selects=[];
-			this.getData();
-		}
-	},
-	//下拉刷新
-	onPullDownRefresh() {
-		setTimeout(() => {
-			this.refresh();
-			uni.stopPullDownRefresh();
-		}, 1000);
-	},
-	//上拉加载
-	onReachBottom() {
-		if (this.loadMore) {
-			this.param.pageNo++;
-			this.getData();
+		//下拉刷新
+		onPullDownRefresh() {
+			setTimeout(() => {
+				this.refresh();
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		//上拉加载
+		onReachBottom() {
+			if (this.loadMore) {
+				this.param.pageNo++;
+				this.query();
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	background-color: $pg;
-}
-.goodsList .item .con {
-    width: 98%;
-}
-.con {
-	.btn {
-		float: right;
-		background-color: $main-color;
-		height: 20px;
-		position: relative;
-		color: white;
-		padding: 5px 20px;
-		margin-left: 10px;
+	page {
+		background-color: $pg;
+	}
+
+	.goodsList .item .con {
+		width: 98%;
 	}
-	.icon {
-		line-height: 20px;
+
+	.con {
+		.btn {
+			float: right;
+			background-color: $main-color;
+			height: 20px;
+			position: relative;
+			color: white;
+			padding: 5px 20px;
+			margin-left: 10px;
+		}
+
+		.icon {
+			line-height: 20px;
+		}
 	}
-}
-.mfooter {
-	background-color: #ffffff00;
-	border: 0px;
-	.btn{
-		background-color: #F44336;
+
+	.mfooter {
+		background-color: #ffffff00;
+		border: 0px;
+
+		.btn {
+			background-color: #F44336;
+		}
 	}
-}
-</style>
+</style>

+ 125 - 0
pages/market/two/purchaser/buy/buyWhole.vue

@@ -0,0 +1,125 @@
+<template>
+	<view>
+		<view class="cmain" v-for="(item,index) in list">
+			<view class="box order_detail">
+				<view class="item">
+					<text class="label">车牌号</text>
+					<text class="desc">{{ item.veNo }}</text>
+				</view>
+				<view class="item">
+					<text class="label">商品</text>
+					<text class="desc omit">{{ item.goodsNames }}</text>
+				</view>
+				<view class="item">
+					<text class="label">数量</text>
+					<text class="desc omit">{{ item.packNo }}</text>
+				</view>
+
+				<view class="item">
+					<text class="label">店主</text>
+					<text class="desc">{{ item.shopName }}</text>
+				</view>
+				<view class="item">
+					<text class="label">互市区</text>
+					<text class="desc">{{ item.fieldName }}</text>
+				</view>
+				<view class="item">
+					<text class="label">发布时间</text>
+					<text class="desc">{{ item.createTime }}</text>
+				</view>
+				<view class="item">
+					<text class="label">商品价格</text>
+					<text class="desc price">¥ {{ item.sumUpPrice }}</text>
+				</view>
+			</view>
+		</view>
+		<view style="height: 80px;"></view>
+		<view class="mfooter">
+			<view class="flex">
+				<view class="total-price price">¥{{totalPrice}}</view>
+				<view class="f">
+					<button class="btn" @click="pay()">立即购买</button>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				user: this.getUser(),
+				list: [],
+				ids: ''
+			};
+		},
+		onLoad(e) {
+			if (e.ids) {
+				this.ids = e.ids;
+				this.http.request({
+					url: '/level-one-server/app/HtTradeSettlement/getByIds',
+					method: 'POST',
+					data: {
+						ids: this.ids
+					},
+					success: res => {
+						this.list = res.data.data;
+					}
+				});
+
+			}
+		},
+		computed: {
+			totalPrice() {
+				let list = this.list;
+				let total = 0;
+				list.map(item => total = Number(item.sumUpPrice) + Number(total));
+				return Math.round(total * 100) / 100;
+			}
+		},
+		methods: {
+			pay() {
+				uni.showModal({
+					title: '提示',
+					content: '我已核对订单信息无误',
+					success: res => {
+						if (res.confirm) {
+							this.http.request({
+								url: '/level-two-server/app/TbOrders/purchaserBuyWhole',
+								method: 'POST',
+								data: {
+									ids: this.ids
+								},
+								success: res => {
+									console.log(res);
+									return;
+									uni.redirectTo({
+										url: '/pages/market/two/leader/success'
+									});
+								}
+							});
+						}
+					}
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background-color: $pg;
+	}
+
+	.price {
+		color: red;
+		font-weight: bold;
+	}
+
+	.total-price {
+		line-height: 66px;
+		padding: 0 0 0 10px;
+		font-size: 18px;
+	}
+</style>

+ 132 - 118
pages/market/two/purchaser/buy/detail.vue

@@ -1,151 +1,165 @@
 <template>
 	<view>
-		<view class="cmain">
-			<view class="box order_detail">
+		<view class="product_detail">
+			<!-- <image src="../../../static/news.jpg" mode="widthFix" class="pic"></image> -->
+			<view class="box">
+				<view class="title">{{ item.goodsName }}</view>
+				<view class="clear"></view>
+				<u-divider text="详情"></u-divider>
 				<view class="item">
-					<text class="label">收购商品</text>
-					<text class="desc omit">{{ item.goodsName }}</text>
+					<text class="desc">车牌号:</text>
+					<text>{{ item.veNo }}</text>
+					<view class="clear"></view>
 				</view>
 				<view class="item">
-					<text class="label">商品编号</text>
-					<text class="desc">{{ item.goodsNo }}</text>
+					<text class="desc">商品重量:</text>
+					<text v-if="type==1">{{ item.goodsNames }} </text>
+					<text v-if="type==2">{{ item.goodsName }} </text>
 				</view>
 				<view class="item">
-					<text class="label">计价单位</text>
-					<text class="desc">{{ item.goodsUnit }}</text>
+					<text class="desc">商品名称:</text>
+					<text v-if="type==1">{{ item.sumNetWt }} kg</text>
+					<text v-if="type==2">{{ item.netWet }} kg</text>
 				</view>
 				<view class="item">
-					<text class="label">数量</text>
-					<text class="desc">{{ item.goodsQuantity }}</text>
+					<text class="desc">货主:</text>
+					<text v-if="type==1">{{ item.shopName }}</text>
+					<text v-if="type==2">{{ item.leaderName }}</text>
 				</view>
 				<view class="item">
-					<text class="label">到货日期</text>
-					<text class="desc">{{ item.arrivalTime }}</text>
+					<text class="desc">互市区:</text>
+					<text v-if="type==2">{{ item.tradeAreaName }}</text>
+					<text v-if="type==1">{{ item.fieldName }}</text>
+					<view class="clear"></view>
 				</view>
+
 				<view class="item">
-					<text class="label">创建时间</text>
-					<text class="desc">{{ item.goodsDemandTime }}</text>
+					<text class="desc">发布时间:</text>
+					<text>{{ item.createTime }}</text>
+					<view class="clear"></view>
 				</view>
 				<view class="item">
-					<text class="label">状态</text>
-					<text class="desc" v-if="item.isRelease == 0">未发布</text>
-					<text class="desc" v-if="item.isRelease == 1 && item.isOrders == 0">未接单</text>
-					<text class="desc" v-if="item.isOrders == 1 && item.isConfirm == 0">已接单</text>
-					<text class="desc" v-if="item.isConfirm == 1">已确认</text>
-				</view>
-				<view class="item" v-if="item.createName">
-					<text class="label">接单人</text>
-					<text class="desc">{{ item.createName }}</text>
-				</view>
-				<view class="item" v-if="item.quotation">
-					<text class="label">出价金额</text>
-					<text class="desc" style="color: #f44336; font-weight: bold">¥ {{ item.quotation }}</text>
-				</view>
-				<view class="item" v-if="item.createTime">
-					<text class="label">接单时间</text>
-					<text class="desc">{{ item.createTime }}</text>
+					<text class="desc">总金额:</text>
+					<text v-if="type==2" class="price">¥ {{ item.resalePrice }}</text>
+					<text v-if="type==1" class="price">¥ {{ item.sumUpPrice }}</text>
+					<view class="clear"></view>
 				</view>
 			</view>
-			<u-divider text="收货地址"></u-divider>
-			<view class="box order_detail">
-				<view class="item">
-					<text class="label">收件人</text>
-					<text class="desc omit">{{ item.name }}</text>
-				</view>
-				<view class="item">
-					<text class="label">联系电话</text>
-					<text class="desc">{{ item.phone }}</text>
-				</view>
-				<view class="item">
-					<text class="label">收件地址</text>
-					<text class="desc">{{ item.addressName }}</text>
+		</view>
+		<view class="mfooter">
+			<view class="flex">
+				<view class="f">
+					<button class="btn" v-if="user.userType == 3" @click="pay()">立即购买</button>
 				</view>
 			</view>
-			<button class="btn" @click.stop="confirm()" v-if="item.isRelease == 1 && item.isOrders == 1 && item.isConfirm == 0">同意接单并支付</button>
-			<button class="btn" @click.stop="refuse()" style="background-color: #f44336" v-if="item.isRelease == 1 && item.isOrders == 1 && item.isConfirm == 0">拒绝接单</button>
 		</view>
 	</view>
 </template>
 
 <script>
-export default {
-	data() {
-		return {
-			item: {}
-		};
-	},
-	onLoad(e) {
-		if (e.id) {
-			this.http.request({
-				url: '/level-two-server/app/TbGoodsDemand/goodsDemandDetail?id=' + e.id,
-				success: res => {
-					this.item = res.data.data;
+	export default {
+		data() {
+			return {
+				user: this.getUser(),
+				item: {},
+				id: '',
+				type: 1
+			};
+		},
+		onLoad(e) {
+			if (e.id) {
+				this.id = e.id;
+				this.type = e.type
+				this.getDetail()
+			}
+		},
+		methods: {
+			getDetail() {
+				if (this.type == 1) {
+					this.getWholeDetails();
+				} else {
+					this.getOrdersDetails()
 				}
-			});
-		}
-	},
-	methods: {
-		confirm() {
-			uni.showModal({
-				title: '提示',
-				content: '确定同意接单并支付?',
-				success: res => {
-					if (res.confirm) {
-						this.http.request({
-							url: '/level-two-server/app/TbOrders/add',
-							data: this.item,
-							success: res => {
-								console.log('asd:');
-								uni.showModal({
-									title: '提示',
-									content: '处理成功,等待组长发货',
-									showCancel: false,
-									success: res => {
-										uni.navigateBack();
-										uni.$emit('purchaser_buy_list');
-									}
-								});
-							}
+			},
+			getOrdersDetails() {
+				this.http.request({
+					url: '/level-two-server/app/TbOrders/getDetailById',
+					method: 'POST',
+					data: {
+						ids: this.id
+					},
+					success: res => {
+						let data = res.data.data;
+						this.item = data[0];
+					}
+				});
+			},
+			getWholeDetails() {
+				this.http.request({
+					url: '/level-one-server/app/HtTradeSettlement/getByIds',
+					method: 'POST',
+					data: {
+						ids: this.id
+					},
+					success: res => {
+						this.item = res.data.data[0];
+					}
+				});
+			},
+			buyOrder() {
+				this.http.request({
+					url: '/level-two-server/app/TbOrders/purchaserBuy',
+					method: 'POST',
+					data: {
+						ids: this.id
+					},
+					success: res => {
+						uni.navigateTo({
+							url: '/pages/market/two/leader/success'
 						});
 					}
-				}
-			});
-		},
-		refuse() {
-			uni.showModal({
-				title: '提示',
-				content: '确定取消该接单?',
-				success: res => {
-					if (res.confirm) {
-						this.http.request({
-							url: '/level-two-server/app/TbGoodsDemand/refuse',
-							data: { id: this.item.goodsDemandId, goodsName: this.item.goodsName },
-							success: res => {
-								uni.showModal({
-									title: '提示',
-									content: '取消成功',
-									showCancel: false,
-									success: res => {
-										uni.navigateBack();
-										uni.$emit('purchaser_buy_list');
-									}
-								});
-							}
+				});
+			},
+			buyWhole() {
+				this.http.request({
+					url: '/level-two-server/app/TbOrders/purchaserBuyWhole',
+					method: 'POST',
+					data: {
+						ids: this.id
+					},
+					success: res => {
+						uni.navigateTo({
+							url: '/pages/market/two/leader/success'
 						});
 					}
-				}
-			});
+				});
+			},
+			pay() {
+				uni.showModal({
+					title: '提示',
+					content: '确定下单购买?',
+					success: res => {
+						if (res.confirm) {
+							if (this.type == 1) {
+								this.buyWhole()
+							} else {
+								this.buyOrder()
+							}
+						}
+					}
+				});
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	background-color: $pg;
-}
-.btn {
-	margin-top: 20px;
-	width: 70%;
-}
-</style>
+	page {
+		.price {
+			color: red;
+			font-weight: bold;
+		}
+
+		background-color: $pg;
+	}
+</style>

+ 1 - 1
pages/personal/bankInfo.vue

@@ -9,7 +9,7 @@
 			<input type="text" placeholder="请输入银行账号" v-model="item.bankAccount" />
 		</view>
 		</br></br></br>
-		<button class="btn" @click="save()">提交</button>
+		<!-- <button class="btn" @click="save()">提交</button> -->
 		<button class="btn back" @click="back()">返回</button>
 	</view>
 </template>

+ 14 - 3
pages/personal/personal.vue

@@ -79,11 +79,21 @@
 					<text class="title" style="color: firebrick;;font-weight: bold;">加入互助组</text>
 					<text class="icon arrow">&#xe8f2;</text>
 				</view>
+				<view class="s_item ">
+					<text class="icon ic">&#xe622;</text>
+					<text class="title">APP版本 {{version}}</text>
+					
+				</view>
 			</view>
 			<button class="btn exit" @click="exitLogin()">退出登录</button>
 			<button class="btn exit" @click="cancelAccount()">注销账号</button>
 		</view>
-		<view class="version">版本号:{{version}}</view>
+		<view class="version">
+		<view>
+			<view>Copyright@2024-2030</view>
+			<view>天保国际物流投资有限公司版权所有</view>
+		</view>
+		</view>
 	</view>
 </template>
 
@@ -298,9 +308,10 @@
 	}
 
 	.version {
-		margin-left: 35%;
+		margin-left: 15%;
 		position: fixed;
-		bottom: 70px;
+		bottom: 25px;
 		color: #888484;
+		text-align: center;
 	}
 </style>