Browse Source

二级市场收购商发布需求列表修改

linbl 1 year ago
parent
commit
7a8e6769ca
1 changed files with 16 additions and 45 deletions
  1. 16 45
      pages/market/two/purchaser/buy/list.vue

+ 16 - 45
pages/market/two/purchaser/buy/list.vue

@@ -6,17 +6,17 @@
 		<view class="goodsManageList">
 			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
 				<view class="top">
-					<view class="title omit">八角茴香(未磨) (可食用)八角茴香(未磨) (可食用)八角茴香(未磨) (可食用)</view>
+					<view class="title omit">{{ item.goodsName }}</view>
 					<view class="icon">&#xe852;</view>
 					<view class="clear"></view>
 				</view>
 				<view class="con">
 					<view class="flex fs">
 						<view class="f left" style="flex: 0.5">
-							<view class="tag">净重:50吨</view>
+							<view class="tag">商品量:{{ item.goodsQuantity }}</view>
 						</view>
 						<view class="f left">
-							<view class="tag">2023-08-03 22:37:02</view>
+							<view class="tag">{{ item.createTime }}</view>
 						</view>
 					</view>
 				</view>
@@ -42,27 +42,26 @@
 export default {
 	data() {
 		return {
-			tab: [
-				{ name: '全部', goodsStatus: '' },
-				{ name: '未报价', goodsStatus: 1 },
-				{ name: '已报价', goodsStatus: 0 },
-				// { name: '已接单', goodsStatus: 0 },
-				// { name: '已确认', goodsStatus: 0 },
-				// { name: '已完成', goodsStatus: 0 }
+			tab: [//isRelease:是否发布[0=待发布,1=已发布]  isOrders:是否被接单[0=待接单,1=已被接单]
+				{ name: '全部', isRelease: '' ,isOrders: ''},
+				{ name: '待发布', isRelease: 0 ,isOrders: 0},
+				{ name: '发布中', isRelease: 1 ,isOrders: 0},
+				{ name: '已接单', isRelease: 1 ,isOrders: 1},
+				//{ name: '已确认', isRelease: 1 ,isOrders: 1},
+				//{ name: '已完成', isRelease: 1 ,isOrders: 1}
 			],
-			list: [{}, {}, {}, {}, {}],
-			param: { pageNo: 1, pageSize: 10, isOrders: 0 },
+			list: [],
+			param: { pageNo: 1, pageSize: 10 },
 			loadMore: true
 		};
 	},
 	onLoad(e) {
-		//this.getData();
-		this.goodsDemandList()
+		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 => {
@@ -71,38 +70,10 @@ 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;
+			this.param.isRelease = e.isRelease;
+			this.param.isOrders = e.isOrders;
 			this.refresh();
 		},
 		detail(item) {