Ver código fonte

Merge branch 'master' of http://git.aseanbusiness.cn/qzyReal/market-app-ui

mym 1 ano atrás
pai
commit
a53ca953fb

+ 11 - 2
common/style.scss

@@ -108,9 +108,19 @@
 	}
 	.uni-data-tree {
 		margin-top: 12px;
+		background-color: #f6f6f6;
+		border: 0px!important;
+		padding-left:5px;
+		border-radius: 5px;
 		.placeholder {
 			font-size: 15px;
 		}
+		.input-value-border{
+			border: 0px;
+		}
+		.input-value{
+			padding: 1px 5.5px;
+		}
 	}
 	input {
 		font-size: 15px;
@@ -709,7 +719,7 @@
 }
 .order_detail {
 	.item {
-		padding: 12px 8px 12px 8px;
+		padding: 13px 8px 13px 8px;
 		border-bottom: 1px solid $line;
 		overflow: hidden;
 		&:last-child {
@@ -728,7 +738,6 @@
 			text-align: right;
 			font-size: 15px;
 			float: right;
-			margin-top: -21px;
 		}
 	}
 }

+ 1 - 32
pages/index/index.vue

@@ -63,7 +63,7 @@ export default {
 	onLoad() {
 		this.getBannerList();
 		this.getNewsList();
-	    this.getRoleMenu();
+		this.getMenu();
 	},
 	methods: {
 		getBannerList() {
@@ -74,22 +74,6 @@ export default {
 				}
 			});
 		},
-		getRoleMenu() {
-			let menu = uni.getStorageSync('menu');
-			this.http.request({
-				url: '/sp-admin/ReRoleMenu/getList',
-				success: res => {
-					res.data.data.map((item1, index) => {
-						menu.map((item2, index1) => {
-							if (item1.appRoleId == item2) {
-								this.roleMenu.push(item1.appMenuId);
-							}
-						});
-					});
-					this.getMenu();
-				}
-			});
-		},
 		getMenu() {
 			let menu = uni.getStorageSync('menu');
 			this.http.request({
@@ -117,21 +101,6 @@ 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 => {

+ 21 - 42
pages/market/one/leader/order.vue

@@ -5,7 +5,7 @@
 		</view>
 		<view class="goodsList">
 			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
-				<view class="title">广西京东自营店南宁分店</view>
+				<view class="title">{{ item.enterpriseName }}]</view>
 				<view class="state" v-if="item.enterpriseConfirm == 0">
 					<text class="icon">&#xe830;</text>
 					<text>商家未确认</text>
@@ -14,7 +14,7 @@
 					<text class="icon" style="color: #13ce66">&#xe830;</text>
 					<text>已确认</text>
 				</view>
-				<view class="state" v-if="item.enterpriseConfirm == 3">
+				<view class="state" v-if="item.enterpriseConfirm == 2">
 					<text class="icon" style="color: #f44336">&#xe622;</text>
 					<text>已取消</text>
 				</view>
@@ -22,17 +22,16 @@
 				<view class="con">
 					<view class="productName omit">{{ item.goodsNames }}</view>
 					<view class="desc omit">
-						<text>50吨</text>
+						<text>重量 {{ item.totalWeight }}</text>
 						<text>{{ item.tradeAreaName }}</text>
 					</view>
-					<view class="price">¥ {{ item.price }}</view>
+					<view class="price">¥ {{ item.totalPrice }}</view>
 				</view>
 				<view class="clear"></view>
 				<view class="op">
 					<view class="date">2022-12-12:12:12</view>
 					<template v-if="item.enterpriseConfirm == 0">
-						<view class="an" style="color: #f44336" v-if="user.userType == 2" @click.stop="confirm(item.id, 2, item.enterpriseConfirm)">取消订单</view>
-						<view class="an" style="color: #4581fb" v-if="user.userType == 3" @click.stop="confirm(item.id, 1)">确认订单</view>
+						<view class="an" style="color: #f44336" v-if="user.userType == 2" @click.stop="confirm(item.id)">取消订单</view>
 					</template>
 				</view>
 			</view>
@@ -122,43 +121,23 @@ export default {
 			this.getData();
 		},
 		//通知商家
-		confirm(id, type, enterpriseConfirm) {
-			if (type == 1) {
-				uni.showModal({
-					title: '提示',
-					content: '是否确认接单?',
-					success: res => {
-						if (res.confirm) {
-							this.http.request({
-								url: '/level-one-server/app/TbGoodsTransit/updateEnterpriseConfirm',
-								data: { id: id, enterpriseConfirm: 1 },
-								method: 'POST',
-								success: resp => {
-									uni.showToast({ title: '操作成功' });
-									this.refresh();
-								}
-							});
-						}
-					}
-				});
-			} else {
-				uni.showModal({
-					title: '提示',
-					content: '是否确认取消订单?',
-					success: res => {
-						if (res.confirm) {
-							this.http.request({
-								url: '/level-one-server/app/TbOrder/cancelOrder',
-								data: { orderId: id, orderStatus: enterpriseConfirm },
-								success: resp => {
-									uni.showToast({ title: '操作成功' });
-									this.refresh();
-								}
-							});
-						}
+		confirm(id) {
+			uni.showModal({
+				title: '提示',
+				content: '是否确认取消订单?',
+				success: res => {
+					if (res.confirm) {
+						this.http.request({
+							url: '/level-one-server/app/TbOrder/cancelOrder',
+							data: { orderId: id },
+							success: resp => {
+								uni.showToast({ title: '操作成功' });
+								this.refresh();
+							}
+						});
 					}
-				});
-			}
+				}
+			});
 		}
 	},
 	//下拉刷新

+ 26 - 0
pages/market/one/merchant/order/list.vue

@@ -31,6 +31,7 @@
 				<view class="op">
 					<view class="date">2022-12-12:12:12</view>
 					<template v-if="item.enterpriseConfirm == 0">
+<<<<<<< HEAD
 						<view class="an" style="color: #f44336" @click.stop="confirm(item.id, 2, '确认拒绝?')">拒绝订单</view>
 						<view class="an" style="color: #4581fb" @click.stop="confirm(item.goodsId, 1, '确认接单?')">确认订单
 						</view>
@@ -38,6 +39,10 @@
 					<template v-if="item.enterpriseConfirm == 1">
 						<view class="an" style="color: #13ce66"
 							 @click.stop="showPop">物流车辆</view>
+=======
+						<view class="an" style="color: #f44336" @click.stop="confirm(item.id, item.goodsId, 2, '确认拒绝?')">取消订单</view>
+						<view class="an" style="color: #4581fb" @click.stop="confirm(item.id, item.goodsId, 1, '确认接单?')">确认订单</view>
+>>>>>>> 10869ae7aad892d454d8d29e68f543377fcd7de4
 					</template>
 				</view>
 			</view>
@@ -107,6 +112,7 @@
 		},
 		onLoad() {
 			this.getData();
+<<<<<<< HEAD
 		},
 		methods: {
 			getData() {
@@ -119,6 +125,26 @@
 						if (res.data.data) {
 							this.list.push(...res.data.data);
 						}
+=======
+		}, 
+		// 商家确认
+		confirm(id, goodsId, status, content) {
+			//enterprise_confirm:'商铺确认情况[0=待确认,1=已确认,2=拒绝]'
+			uni.showModal({
+				title: '提示',
+				content: content,
+				success: res => {
+					if (res.confirm) {
+						this.http.request({
+							url: '/level-one-server/app/TbOrder/updateEnterpriseConfirm',
+							data: { id: id, goodsId: goodsId, enterpriseConfirm: status },
+							method: 'POST',
+							success: resp => {
+								uni.showToast({ title: '操作成功' });
+								this.refresh();
+							}
+						});
+>>>>>>> 10869ae7aad892d454d8d29e68f543377fcd7de4
 					}
 				});
 			},

+ 4 - 4
pages/market/two/leader/confirm.vue

@@ -8,9 +8,9 @@
 					<u-steps-item title="完成交易"></u-steps-item>
 				</u-steps>
 			</view>
+			<u-divider text="需求信息"></u-divider>
 			<view class="box order_detail">
-				<u-divider text="订单信息"></u-divider>
-				<view class="item" style="padding-top: 0px">
+				<view class="item">
 					<text class="label">收购商品</text>
 					<text class="desc omit">{{ item.goodsName }}</text>
 				</view>
@@ -81,13 +81,13 @@ export default {
 			}
 			uni.showModal({
 				title: '提示',
-				content: '我已核对单信息无误',
+				content: '我已核对单信息无误',
 				success: res => {
 					if (res.confirm) {
 						this.http.request({
 							url: '/level-two-server/app/TbDemandQuotation/quotation',
 							method: 'POST',
-							data:this.order,
+							data: this.order,
 							success: res => {
 								uni.navigateTo({ url: '/pages/market/two/leader/success' });
 							}

+ 3 - 3
pages/market/two/leader/success.vue

@@ -2,8 +2,8 @@
 	<view class="cmain">
 		<view class="icon">&#xe602;</view>
 		<view class="desc">接单成功,</view>
-		<view class="desc">等待收购商进行接单确认。</view>
-		<button class="btn" @click="go()">前往订单</button>
+		<view class="desc">等待收购商进行接单确认才会生成订单。</view>
+		<button class="btn" @click="go()">确定</button>
 	</view>
 </template>
 
@@ -15,7 +15,7 @@ export default {
 	methods: {
 		go() {
 			uni.redirectTo({
-				url: '/pages/market/two/leader/order'
+				url: '/pages/market/two/list'
 			});
 		}
 	}

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

@@ -64,7 +64,7 @@ export default {
 			uni.navigateTo({ url: '/pages/market/two/detail?id=' + item.id });
 		},
 		confirm(item) {
-			uni.navigateTo({ url: '/pages/market/two/leader/confirm?id=' + item.id });
+			uni.navigateTo({ url: '/pages/market/two/leader/confirm?item=' + JSON.stringify(item) });
 		},
 		//刷新数据
 		refresh() {

+ 1 - 3
pages/market/two/purchaser/buy/add.vue

@@ -10,9 +10,7 @@
 			</view>
 			<view class="con" v-else>
 				<view class="title omit">你还没添加收货地址</view>
-				<view class="desc">
-					<text>点击添加地址</text>
-				</view>
+				<view class="desc">点击添加地址</view>
 			</view>
 			<view class="icon">&#xe8f2;</view>
 		</view>

+ 41 - 36
pages/market/two/purchaser/buy/detail.vue

@@ -1,63 +1,68 @@
 <template>
 	<view>
 		<view class="cmain">
-			<view class="box order_detail" style="margin-top: 0px">
-				<view class="item">
-					<text class="label">收购状态</text>
-					<text class="desc" v-if="item.isRelease == 0">
-						<text class="icon">&#xe830;</text>
-						<text>未发布</text>
-					</text>
-					<text class="desc" v-if="item.isRelease == 1 && item.isOrders == 0">
-						<text class="icon">&#xe830;</text>
-						<text>未接单</text>
-					</text>
-					<text class="desc" v-if="item.isOrders == 1 && item.isConfirm == 0">
-						<text class="icon" style="color: #13ce66">&#xe830;</text>
-						<text>已接单</text>
-					</text>
-					<text class="desc" v-if="item.isConfirm == 1">
-						<text class="icon" style="color: #13ce66">&#xe830;</text>
-						<text>已确认</text>
-					</text>
-				</view>
-			</view>
 			<view class="box order_detail">
 				<view class="item">
 					<text class="label">收购商品</text>
 					<text class="desc omit">{{ item.goodsName }}</text>
 				</view>
 				<view class="item">
+					<text class="label">商品编号</text>
+					<text class="desc">{{ item.goodsNo }}</text>
+				</view>
+				<view class="item">
+					<text class="label">计价单位</text>
+					<text class="desc">{{ item.goodsUnit }}</text>
+				</view>
+				<view class="item">
 					<text class="label">数量</text>
 					<text class="desc">{{ item.goodsQuantity }}</text>
 				</view>
 				<view class="item">
-					<text class="label">发布时间</text>
-					<text class="desc">{{ item.goodsDemandTime }}</text>
+					<text class="label">到货日期</text>
+					<text class="desc">{{ item.arrivalTime }}</text>
 				</view>
 				<view class="item">
-					<text class="label">接单组名</text>
-					<text class="desc">{{ item.groupName }}</text>
+					<text class="label">创建时间</text>
+					<text class="desc">{{ item.goodsDemandTime }}</text>
 				</view>
 				<view class="item">
-					<text class="label">接单组长</text>
+					<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>
+				</view>
+			</view>
+			<u-divider text="收货地址"></u-divider>
+			<view class="box order_detail">
 				<view class="item">
-					<text class="label">组长备注</text>
-					<text class="desc">{{ item.remark }}</text>
+					<text class="label">收件人</text>
+					<text class="desc omit">{{ item.name }}</text>
 				</view>
 				<view class="item">
-					<text class="label">出价金额</text>
-					<text class="desc">{{ item.quotation }}</text>
+					<text class="label">联系电话</text>
+					<text class="desc">{{ item.phone }}</text>
 				</view>
 				<view class="item">
-					<text class="label">报价时间</text>
-					<text class="desc">{{ item.createTime }}</text>
+					<text class="label">收件地址</text>
+					<text class="desc">{{ item.addressName }}</text>
 				</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>
+			<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>
@@ -87,7 +92,8 @@ export default {
 				success: res => {
 					uni.showToast({ title: '操作成功' });
 					// 收购商已确认
-					this.item.isConfirm = 1
+					this.item.isConfirm = 1;
+					uni.$emit('purchaser_buy_list');
 				}
 			});
 		},
@@ -96,7 +102,6 @@ export default {
 				url: '/level-two-server/app/TbGoodsDemand/refuse?id=' + e.id,
 				success: res => {
 					uni.showToast({ title: '操作成功' });
-					
 				}
 			});
 		}
@@ -108,7 +113,7 @@ export default {
 page {
 	background-color: $pg;
 }
-.btn{
+.btn {
 	margin-top: 20px;
 	width: 70%;
 }

+ 3 - 2
pages/market/two/purchaser/buy/list.vue

@@ -15,10 +15,10 @@
 				<view class="con">
 					<view class="flex fs">
 						<view class="f left" style="flex: 0.5">
-							<view class="tag">商品量:{{ item.goodsQuantity }}</view>
+							<view class="tag">量:{{ item.goodsQuantity }}</view>
 						</view>
 						<view class="f left">
-							<view class="tag">{{ item.createTime }}</view>
+							<view class="tag">发布于:{{ item.createTime }}</view>
 						</view>
 					</view>
 				</view>
@@ -28,6 +28,7 @@
 						<view class="f" v-if="item.isRelease == 0 && item.isOrders == 0 && item.isConfirm == 0" style="color: #4581fb" @click.stop="op(item, 1)">发布</view>
 						<view class="f" v-if="item.isRelease == 1 && item.isOrders == 0 && item.isConfirm == 0" style="color: #f44336" @click.stop="op(item, 0)">取消发布</view>
 						<view class="f" v-if="item.isRelease == 1 && item.isOrders == 1 && item.isConfirm == 0" style="color: #4581fb" @click.stop="confirm(item, 0)">前往确认</view>
+						<view class="f" v-if="item.isRelease == 1 && item.isOrders == 1 && item.isConfirm == 1" style="color: #4581fb" @click.stop="detail(item)">查看订单</view>
 					</view>
 				</view>
 			</view>