Browse Source

抽出菜单

mym 1 year ago
parent
commit
09e42f1914
4 changed files with 293 additions and 3 deletions
  1. 2 2
      common/http.js
  2. 19 1
      pages.json
  3. 136 0
      pages/market/one/confirm/apply.vue
  4. 136 0
      pages/market/one/confirm/people.vue

+ 2 - 2
common/http.js

@@ -1,8 +1,8 @@
-const ip = 'http://192.168.88.34:8080'; //线下
+const ip = 'http://192.168.88.36:8080'; //线下
 //const ip = 'http://114.118.9.159:8080/prod-api'; //线上
 /**
  * 封装的http请求
- */
+ */ 
 const request = (opt) => {
 	opt = opt || {};
 	opt.url = ip + opt.url || '';

+ 19 - 1
pages.json

@@ -462,7 +462,25 @@
 			}
 
 		}
-	],
+	    ,{
+            "path" : "pages/market/one/confirm/people",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "边民确认",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/market/one/confirm/apply",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "申报确认",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
 	"tabBar": {
 		"color": "#7A7E83",
 		"selectedColor": "#4581fb",

+ 136 - 0
pages/market/one/confirm/apply.vue

@@ -0,0 +1,136 @@
+<template>
+	<view>
+		<view class="goodsList">
+			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
+				<view class="title">{{ item.enterpriseName }}
+					<view class="state" v-if="item.peopleConfirmStatus == 0">
+						<text class="icon">&#xe830;</text>
+						<text>未确认</text>
+					</view>
+					<view class="state" v-if="item.peopleConfirmStatus == 1 && item.apply == 0">
+						<text class="icon" style="color: #13ce66">&#xe830;</text>
+						<text>已确认</text>
+					</view>
+					<view class="state" v-if="item.resaleStatus == 1">
+						<text class="icon" style="color: #13ce66">&#xe830;</text>
+						<text>已转售</text>
+					</view>
+					<view class="state" v-if="item.finishStatus == 3">
+						<text class="icon" style="color: #f44336">&#xe622;</text>
+						<text>已取消</text>
+					</view>
+				</view>
+
+				<image src="../../../../static/news.jpg" mode="aspectFill" class="pic"></image>
+				<view class="con">
+					<view class="productName omit">{{ item.goodsNames }}</view>
+					<view class="desc omit">
+						<text>重量 {{ item.totalWeight }}</text>
+						<text>{{ item.tradeAreaName }}</text>
+					</view>
+					<view class="price">¥ {{ item.totalPrice }}</view>
+				</view>
+				<view class="clear"></view>
+				<view class="op">
+					<view class="date">{{ item.createTime }}</view>
+					<template v-if="item.peopleConfirmStatus == 1 && item.applyConfirmStatus == 0">
+						<view class="an" style="color: #f44336"  @click.stop="applyOrder(item.id)">进口申报确认</view>
+					</template>
+				</view>
+			</view>
+			<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
+			<u-empty v-if="!loadMore && list.length == 0"></u-empty>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			param: {
+				pageNo: 1,
+				pageSize: 10
+			},
+			user:this.getUser(),
+			list: [],
+			loadMore: true,
+			confirmType: 1,//边民确认类型[1=刷脸,2=指纹]
+			id: '',
+			flag: '',
+		};
+	},
+	onLoad() {
+		this.getData();
+		uni.$on('face', res => {
+			if(this.flag == 2) {
+				this.http.request({
+					url: '/level-one-server/app/TbOrder/applyOrder',
+					data: { orderId: this.id },
+					success: resp => {
+						uni.showToast({ title: '进口申报确认成功' });
+						this.refresh();
+					}
+				});
+			}
+		})
+	},
+	methods: {
+		getData() {
+			this.http.request({
+				url: '/level-one-server/app/TbOrder/getList',
+				loading: 'false',
+				data: this.param,
+				success: res => {
+					this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
+					if (res.data.data) {
+						this.list.push(...res.data.data);
+					}
+				}
+			});
+		},
+		detail(item) {
+			uni.navigateTo({url: '/pages/market/one/leader/detail?id=' + item.id});
+		},
+		resale(item) {
+			uni.navigateTo({url: '/pages/market/two/leader/resale?item=' + JSON.stringify(item)});
+		},
+		// 刷新数据
+		refresh() {
+			this.loadMore = true;
+			this.param.pageNo = 1;
+			this.list = [];
+			this.getData();
+		},
+		//边民进口申报确认
+		applyOrder(id) {
+			this.id = id;
+			this.flag = 2;
+			uni.navigateTo({url: '/pages/authentication/face'});
+		},
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.refresh();
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	//上拉加载
+	onReachBottom() {
+		if (this.loadMore) {
+			this.param.pageNo++;
+			this.getData();
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background-color: $pg;
+}
+.state{
+	margin-right: -70px;
+}
+</style>

+ 136 - 0
pages/market/one/confirm/people.vue

@@ -0,0 +1,136 @@
+<template>
+	<view>
+		<view class="goodsList">
+			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
+				<view class="title">{{ item.enterpriseName }}
+					<view class="state" v-if="item.peopleConfirmStatus == 0">
+						<text class="icon">&#xe830;</text>
+						<text>未确认</text>
+					</view>
+					<view class="state" v-if="item.peopleConfirmStatus == 1 && item.apply == 0">
+						<text class="icon" style="color: #13ce66">&#xe830;</text>
+						<text>已确认</text>
+					</view>
+					<view class="state" v-if="item.resaleStatus == 1">
+						<text class="icon" style="color: #13ce66">&#xe830;</text>
+						<text>已转售</text>
+					</view>
+					<view class="state" v-if="item.finishStatus == 3">
+						<text class="icon" style="color: #f44336">&#xe622;</text>
+						<text>已取消</text>
+					</view>
+				</view>
+
+				<image src="../../../../static/news.jpg" mode="aspectFill" class="pic"></image>
+				<view class="con">
+					<view class="productName omit">{{ item.goodsNames }}</view>
+					<view class="desc omit">
+						<text>重量 {{ item.totalWeight }}</text>
+						<text>{{ item.tradeAreaName }}</text>
+					</view>
+					<view class="price">¥ {{ item.totalPrice }}</view>
+				</view>
+				<view class="clear"></view>
+				<view class="op">
+					<view class="date">{{ item.createTime }}</view>
+					<template v-if="item.peopleConfirmStatus == 0">
+						<view class="an" style="color: #f44336"  @click.stop="confirmOrder(item.id)">边民确认</view>
+					</template>
+				</view>
+			</view>
+			<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
+			<u-empty v-if="!loadMore && list.length == 0"></u-empty>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			param: {
+				pageNo: 1,
+				pageSize: 10
+			},
+			user:this.getUser(),
+			list: [],
+			loadMore: true,
+			confirmType: 1,//边民确认类型[1=刷脸,2=指纹]
+			id: '',
+			flag: '',
+		};
+	},
+	onLoad() {
+		this.getData();
+		uni.$on('face', res => {
+			if(this.flag == 1) {
+				this.http.request({
+					url: '/level-one-server/app/TbOrder/confirmOrder',
+					data: { orderId: this.id , confirmType: this.confirmType},
+					success: resp => {
+						uni.showToast({ title: '订单确认成功' });
+						this.refresh();
+					}
+				});
+			}
+		})
+	},
+	methods: {
+		getData() {
+			this.http.request({
+				url: '/level-one-server/app/TbOrder/getList',
+				loading: 'false',
+				data: this.param,
+				success: res => {
+					this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
+					if (res.data.data) {
+						this.list.push(...res.data.data);
+					}
+				}
+			});
+		},
+		detail(item) {
+			uni.navigateTo({url: '/pages/market/one/leader/detail?id=' + item.id});
+		},
+		resale(item) {
+			uni.navigateTo({url: '/pages/market/two/leader/resale?item=' + JSON.stringify(item)});
+		},
+		// 刷新数据
+		refresh() {
+			this.loadMore = true;
+			this.param.pageNo = 1;
+			this.list = [];
+			this.getData();
+		},
+		//边民确认订单
+		confirmOrder(id) {
+			this.id = id;
+			this.flag = 1;
+			uni.navigateTo({url: '/pages/authentication/face'});
+		},
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.refresh();
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	//上拉加载
+	onReachBottom() {
+		if (this.loadMore) {
+			this.param.pageNo++;
+			this.getData();
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background-color: $pg;
+}
+.state{
+	margin-right: -70px;
+}
+</style>