mym 1 жил өмнө
parent
commit
09b3570f9c

+ 15 - 0
pages/index/index.vue

@@ -123,6 +123,21 @@ export default {
 			});
 		},
 		navTo(url) {
+			let info = this.getUser()
+			if(info.userType == 4 && url=='/pages/market/one/list'){
+				uni.showToast({
+					title: '您当前无权限查看该选项',
+					icon:'none',
+				})
+				return;
+			}
+			if(info.userType == 3 && url=='/pages/market/two/list'){
+				uni.showToast({
+					title: '您当前无权限查看该选项',
+					icon:'none',
+				})
+				return;
+			}
 			uni.navigateTo({
 				url: url,
 				fail: res => {

+ 0 - 1
pages/login/login.vue

@@ -63,7 +63,6 @@ export default {
 				method: 'POST',
 				success: resp => {
 					let data = resp.data.data;
-					console.log(data);
 					uni.setStorageSync('token', data.tokenInfo.tokenValue);
 					uni.setStorageSync('info', data.appUser);
 					uni.setStorageSync('menu', data.per_list);

+ 7 - 7
pages/market/two/detail.vue

@@ -44,7 +44,7 @@
 		<view class="mfooter">
 			<view class="flex">
 				<view class="f">
-					<button class="btn" @click="pay()">立即接单</button>
+					<button class="btn" v-if="user.userType !== 5" @click="pay()">立即接单</button>
 				</view>
 			</view>
 		</view>
@@ -61,12 +61,12 @@ export default {
 	},
 	onLoad(e) {
 		if (e.id) {
-			/* this.http.request({
-				url: '/level-one-server/app/TbPortNews/getPortNewsDetails?id=' + e.id,
-				success: res => {
-					this.content = res.data.data;
-				}
-			}); */
+			// this.http.request({
+			// 	url: '/level-two-server/app/TbGoodsDemand/getById?id=' + e.id,
+			// 	success: res => {
+			// 		this.content = res.data.data;
+			// 	}
+			// });
 		}
 	},
 	methods: {

+ 19 - 8
pages/market/two/list.vue

@@ -18,13 +18,14 @@
 				<view class="clear"></view>
 			</view>
 			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
-				<view class="title">广西京东自营店南宁分店</view>
+				<view class="title">{{item.createName}}</view>
+				<!-- <image :src="item.goodsImg" mode="aspectFill" class="pic"></image> -->
 				<image src="../../../static/news.jpg" mode="aspectFill" class="pic"></image>
 				<view class="con">
-					<view class="productName omit">八角茴香(未磨)(可食用)</view>
-					<view class="desc">50吨</view>
-					<view class="price">¥ 5000</view>
-					<view class="icon buy" v-if="user.userType == 2">&#xe604;</view>
+					<view class="productName omit">{{item.goodsName}}</view>
+					<view class="desc">{{item.goodsQuantity}}吨</view>
+					<!-- <view class="price">¥ 5000</view> -->
+					<view class="btn" v-if="user.userType == 2">立即接单</view>
 				</view>
 				<view class="clear"></view>
 			</view>
@@ -40,18 +41,18 @@ export default {
 			user: this.getUser(),
 			show: false,
 			sort: [{ name: '综合' }, { name: '日期' }, { name: '价格' }],
-			list: [{}, {}, {}, {}],
+			list: [],
 			param: { pageNo: 1, pageSize: 10 },
 			loadMore: true
 		};
 	},
 	onLoad(e) {
-		//this.getData();
+		this.getData();
 	},
 	methods: {
 		getData() {
 			this.http.request({
-				url: '/level-one-server/app/TbGoodsTransit/getTransitList',
+				url: '/level-two-server/app/TbGoodsDemand/getAppList',
 				data: this.param,
 				loading: 'false',
 				success: res => {
@@ -95,4 +96,14 @@ page {
 .search {
 	padding: 12px 12px 0px 12px;
 }
+.btn{
+	width: 120rpx;
+	height: 40rpx;
+	background-color: #fff;
+	color: #000;
+	border: #B5B5B5 1px solid;
+	position: relative;
+	left: 340rpx;
+	font-size: 14px;
+}
 </style>

+ 36 - 6
pages/market/two/purchaser/buy/list.vue

@@ -44,19 +44,20 @@ export default {
 		return {
 			tab: [
 				{ name: '全部', goodsStatus: '' },
-				{ name: '待发布', goodsStatus: 1 },
-				{ name: '发布中', goodsStatus: 0 },
-				{ name: '已接单', goodsStatus: 0 },
-				{ name: '已确认', goodsStatus: 0 },
-				{ name: '已完成', goodsStatus: 0 }
+				{ name: '未报价', goodsStatus: 1 },
+				{ name: '已报价', goodsStatus: 0 },
+				// { name: '已接单', goodsStatus: 0 },
+				// { name: '已确认', goodsStatus: 0 },
+				// { name: '已完成', goodsStatus: 0 }
 			],
 			list: [{}, {}, {}, {}, {}],
-			param: { pageNo: 1, pageSize: 10 },
+			param: { pageNo: 1, pageSize: 10, isOrders: 0 },
 			loadMore: true
 		};
 	},
 	onLoad(e) {
 		//this.getData();
+		this.goodsDemandList()
 	},
 	methods: {
 		getData() {
@@ -70,6 +71,35 @@ export default {
 				}
 			});
 		},
+		//当前已被报价的需求列表
+		goodsDemandList() {
+			this.http.request({
+				url: '/level-two-server/app/TbGoodsDemand/goodsDemandList',
+				data: this.param,
+				loading: 'false',
+				success: res => {
+					this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
+					// this.list.push(...res.data.data);
+				}
+			});
+		},
+		//处理已被报价的需求
+		disposeOrders() {
+			let params = {
+				disposeStatus: 1,
+				goodsDemandId: 1,
+				demandQuotationId: 1
+			}
+			this.http.request({
+				url: '/level-two-server/app/TbGoodsDemand/disposeOrders',
+				data: params,
+				loading: 'false',
+				success: res => {
+					this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
+					// this.list.push(...res.data.data);
+				}
+			});
+		},
 		//点击tab切换
 		click(e) {
 			this.param.goodsStatus = e.goodsStatus;

+ 1 - 1
pages/market/two/purchaser/order/list.vue

@@ -59,7 +59,7 @@ export default {
 	methods: {
 		getData() {
 			this.http.request({
-				url: '/level-one-server/app/TbGoodsTransit/getTransitList',
+				url: '/level-two-server/app/TbOrders/getList',
 				loading: 'false',
 				data: this.param,
 				success: res => {

+ 5 - 5
pages/personal/personal.vue

@@ -14,8 +14,8 @@
 					<view class="tag" v-if="user.userType == 1">普通边民</view>
 					<view class="tag" v-if="user.userType == 2">互市组长</view>
 					<view class="tag" v-if="user.userType == 3">外籍商户</view>
-					<view class="tag" v-if="user.userType == 4">收购商</view>
-					<view class="tag" v-if="user.userType == 1">司机</view>
+					<view class="tag" v-if="user.userType == 4">司机</view>
+					<view class="tag" v-if="user.userType == 5">收购商</view>
 				</view>
 				<text class="icon edit">&#xe645;</text>
 				<view class="clear"></view>
@@ -67,7 +67,7 @@
 				</view>
 			</view>
 			<!--收购商-->
-			<view class="menu" v-if="user.userType == 4">
+			<view class="menu" v-if="user.userType == 5">
 				<view class="msn" @click="go('/pages/market/two/purchaser/buy/list')">
 					<view class="out">
 						<view class="int">
@@ -149,8 +149,8 @@ export default {
 			if (this.user.userType == 3) {
 				uni.navigateTo({ url: '/pages/market/one/merchant/order/list' });
 			}
-			//外籍商户
-			if (this.user.userType == 4) {
+			//收购商
+			if (this.user.userType == 5) {
 				uni.navigateTo({ url: '/pages/market/two/purchaser/order/list' });
 			}
 		},