李书文 vor 1 Jahr
Ursprung
Commit
84f6899fd0
2 geänderte Dateien mit 22 neuen und 11 gelöschten Zeilen
  1. 10 6
      pages/market/two/purchaser/buy/detail.vue
  2. 12 5
      pages/market/two/purchaser/buy/list.vue

+ 10 - 6
pages/market/two/purchaser/buy/detail.vue

@@ -6,18 +6,18 @@
 					<text class="label">收购状态</text>
 					<text class="desc" v-if="item.isOrders == 0">
 						<text class="icon">&#xe830;</text>
-						<text >未接单</text>
+						<text>未接单</text>
 					</text>
 					<text class="desc" v-else>
 						<text class="icon" style="color: #13ce66">&#xe830;</text>
-						<text >已接单</text>
+						<text>已接单</text>
 					</text>
 				</view>
 			</view>
 			<view class="box order_detail">
 				<view class="item">
 					<text class="label">收购商品</text>
-					<text class="desc">{{ item.goodsName }}</text>
+					<text class="desc omit">{{ item.goodsName }}</text>
 				</view>
 				<view class="item">
 					<text class="label">数量</text>
@@ -48,6 +48,8 @@
 					<text class="desc">{{ item.createTime }}</text>
 				</view>
 			</view>
+			<button class="btn">同意接单并支付</button>
+			<button class="btn" style="background-color: #F44336;">拒绝接单</button>
 		</view>
 	</view>
 </template>
@@ -62,9 +64,7 @@ export default {
 	onLoad(e) {
 		if (e.id) {
 			this.http.request({
-				url: '/level-two-server/app/TbGoodsDemand/goodsDemandDetail',
-				data: {id: e.id},
-				loading: 'false',
+				url: '/level-two-server/app/TbGoodsDemand/goodsDemandDetail?id=' + e.id,
 				success: res => {
 					this.item = res.data.data;
 				}
@@ -79,4 +79,8 @@ export default {
 page {
 	background-color: $pg;
 }
+.btn{
+	margin-top: 20px;
+	width: 70%;
+}
 </style>

+ 12 - 5
pages/market/two/purchaser/buy/list.vue

@@ -8,8 +8,8 @@
 				<view class="top">
 					<view class="title omit">{{ item.goodsName }}</view>
 					<view class="state" v-if="item.isRelease == 0" @click.stop="del(item)" style="color: #f44336">删除</view>
-					<view class="state" style="color: #4581fb" v-if="item.isRelease == 1">发布中</view>
-					<view class="state" style="color: #4CAF50" v-if="item.isOrders == 1">已接单</view>
+					<view class="state" style="color: #4581fb" v-if="item.isRelease == 1 && item.isOrders == 0">发布中</view>
+					<view class="state" style="color: #4caf50" v-if="item.isRelease == 1 && item.isOrders == 1">已接单</view>
 				</view>
 				<view class="con">
 					<view class="flex fs">
@@ -23,9 +23,10 @@
 				</view>
 				<view class="op">
 					<view class="flex">
-						<view class="f rline" v-if="item.isRelease == 0" @click.stop="edit(item)">编辑</view>
-						<view class="f" v-if="item.isRelease == 0" style="color: #4581fb" @click.stop="op(item, 1)">发布</view>
-						<view class="f" v-if="item.isRelease == 1" style="color: #f44336" @click.stop="op(item, 0)">取消发布</view>
+						<view class="f rline" v-if="item.isRelease == 0 && item.isOrders == 0" @click.stop="edit(item)">编辑</view>
+						<view class="f" v-if="item.isRelease == 0 && item.isOrders == 0" style="color: #4581fb" @click.stop="op(item, 1)">发布</view>
+						<view class="f" v-if="item.isRelease == 1 && item.isOrders == 0" style="color: #f44336" @click.stop="op(item, 0)">取消发布</view>
+						<view class="f" v-if="item.isRelease == 1 && item.isOrders == 1" style="color: #4581fb" @click.stop="confirm(item, 0)">前往确认</view>
 					</view>
 				</view>
 			</view>
@@ -80,9 +81,15 @@ export default {
 		detail(item) {
 			uni.navigateTo({ url: '/pages/market/two/purchaser/buy/detail?id=' + item.id });
 		},
+		//编辑
 		edit(item) {
 			uni.navigateTo({ url: '/pages/market/two/purchaser/buy/add?id=' + item.id });
 		},
+		//前往确认
+		confirm(item) {
+			uni.navigateTo({ url: '/pages/market/two/purchaser/buy/detail?id=' + item.id });
+		},
+		//取消发布或发布
 		op(item, isRelease) {
 			uni.showModal({
 				title: '提示',