chenrui преди 4 години
родител
ревизия
48b828f919
променени са 10 файла, в които са добавени 129 реда и са изтрити 159 реда
  1. 3 3
      App.vue
  2. 20 0
      api/cleared.js
  3. 0 29
      api/officialPartnerGoldLog.js
  4. 0 35
      api/receiveAddress.js
  5. 7 6
      pages.json
  6. 19 15
      pages/cleared/chooseNetwork.vue
  7. 28 28
      pages/cleared/index.vue
  8. 8 8
      pages/cleared/network.vue
  9. 23 14
      pages/cleared/searchModal.vue
  10. 21 21
      pages/index/index.vue

+ 3 - 3
App.vue

@@ -1,7 +1,7 @@
 <script>
-	const uat_URL = 'https://lese.test.sxzxyj.net/gc-channel/' // 预发布
-	// const uat_URL = 'http://192.168.16.102:8303/gc-channel/' // 本地
-	const pro_URL = 'https://lese.sxzxyj.net/gc-channel/'  // 生产
+	// const uat_URL = 'https://lese.test.sxzxyj.net/gc-driver/' // 预发布
+	const uat_URL = 'http://192.168.16.197:8304/gc-driver/' // 本地
+	const pro_URL = 'https://lese.sxzxyj.net/gc-driver/'  // 生产
 	const buildType = 0 // 打包环境对应类型,1 生产 0 预发布
 	const buildURL = buildType ? pro_URL : uat_URL // 打包后实际对应的url
 	const envText = ['预发布环境','生产环境']

+ 20 - 0
api/cleared.js

@@ -0,0 +1,20 @@
+import axios from '@/libs/axios.js';
+
+// 全部待清运网点列表
+export const waitToCleanList = params => {
+	let url = `cleanStation/waitToCleanList/${params.pageNo}/${params.pageSize}`
+	delete params.pageNo
+	delete params.pageSize
+	return axios.request({
+		url: url,
+		method: 'post',
+		data: params
+	})
+};
+// 网点设备列表信息
+export const stationDevice = params => {
+  return axios.request({
+    url: `cleanDevice/getWaitToCleanDetailList/${params.stationNo}`,
+    method: 'post',
+  })
+};

+ 0 - 29
api/officialPartnerGoldLog.js

@@ -1,29 +0,0 @@
-import axios from '@/libs/axios.js';
-
-// 交易记录列表
-export const getGoldLogList = params => {
-	let url = `officialPartnerGoldLog/query/${params.pageNo}/${params.pageSize}`
-	delete params.pageNo
-	delete params.pageSize
-	return axios.request({
-		url: url,
-		method: 'post',
-		data: params
-	})
-};
-// 撤销单据
-export const GoldLogCancel = params => {
-  return axios.request({
-    url: `officialPartnerGoldLog/cancel/${params.id}`,
-    method: 'get',
-  })
-};
-
-// 总计乐豆数
-export const GoldLogTotal = params => {
-	return axios.request({
-	  url: `officialPartnerGoldLog/total`,
-	  method: 'post',
-	  data: params
-	})
-}

+ 0 - 35
api/receiveAddress.js

@@ -1,35 +0,0 @@
-import axios from '@/libs/axios.js';
-
-// 根据客户编号查找收货地址
-export const findAddressBycustomerNo = params => {
-  return axios.request({
-    url: `receiveaddress/findBycustomerNo/${params.customerNo}`,
-    method: 'get'
-  })
-};
-
-// 收货地址删除
-export const deleteAddress = params => {
-  return axios.request({
-    url: `receiveaddress/delete/${params.id}`,
-    method: 'get'
-  })
-};
-
-// 收货地址列表查询(不分页)
-export const getAddressList = params => {
-  return axios.request({
-    url: `receiveaddress/querylist`,
-    method: 'post',
-	data: params
-  })
-};
-
-// 收货地址保存
-export const saveAddress = params => {
-  return axios.request({
-    url: `receiveaddress/save`,
-    method: 'post',
-	data: params
-  })
-};

+ 7 - 6
pages.json

@@ -3,6 +3,12 @@
 		"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
 	},
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+		{
+			"path": "pages/cleared/chooseNetwork",
+			"style": {
+				"navigationBarTitleText": "待清运网点"
+			}
+		},
 		{
 			"path": "pages/login/login",
 			"style": {
@@ -29,12 +35,7 @@
 				"navigationBarTitleText": "配送地图"
 			}
 		},
-		{
-			"path": "pages/cleared/chooseNetwork",
-			"style": {
-				"navigationBarTitleText": "待清运网点"
-			}
-		},
+		
 		{
 			"path": "pages/cleared/network",
 			"style": {

+ 19 - 15
pages/cleared/chooseNetwork.vue

@@ -33,16 +33,16 @@
 					<view class="cell-item-c" @tap="goPage(item)">
 						<view class="cell-item-info">
 							<view class="cell-item-info-network">
-								咸阳市秦都区文彩舫东区
-								<u-badge type="success" bgColor="#c90101" :count="8" :offset="[-10,-32]" size="mini"></u-badge>
+								{{item.stationName}}
+								<u-badge type="success" bgColor="#c90101" :count="item.unCleanNum" :offset="[-10,-32]" size="mini"></u-badge>
 							</view>
 							<view class="cell-item-info-weight">
 								<view class="cell-item-weight-bar">
-									15.25kg
+									{{item.totalWeight}}kg
 									<u-badge class="badge" type="primary" bgColor="#01c9b2" count="总" :offset="[0,0]"></u-badge>
 								</view>
 								<view class="cell-item-weight-bar">
-									15.25kg
+									{{item.maxWeight}}kg
 									<u-badge class="badge" type="warning" bgColor="#05695d" count="最大" :offset="[0,0]"></u-badge>
 								</view>
 							</view>
@@ -66,14 +66,14 @@
 
 <script>
 	import searchModal from '@/pages/cleared/searchModal.vue'
-	import { getGoldLogList, GoldLogCancel, GoldLogTotal } from '@/api/officialPartnerGoldLog.js'
+	import { waitToCleanList } from '@/api/cleared.js'
 	export default{
 		components: { searchModal },
 		data(){
 			return{
 				listdata: [{id:1},{id:2}],
 				pageNo: 1,  //  当前页码
-				pageSize: 40,  //  每页条数
+				pageSize: 10,  //  每页条数
 				total: 0,  //  数据总条数
 				noDataText: '暂无数据',  //  列表请求状态提示语
 				status: 'loadmore',  //  加载中状态
@@ -84,8 +84,8 @@
 				openScreen: false, //  是否打开筛选
 				searchForm: {
 					//  查询条件
-					bundleName: '',  //  网点名称
-					custMobile: '', // 排序方式
+					stationName: '',  //  网点名称
+					orderType: 'max', // 排序方式
 				},
 				btnStyle: {  //  自定义按钮样式
 					borderColor: '#07c160',
@@ -95,7 +95,8 @@
 			}
 		},
 		onShow() {
-			// this.refresh({})
+			this.openScreen = false  //  关闭筛选框
+			this.refresh(this.searchForm)
 		},
 		methods: {
 			//  加入清运单
@@ -131,6 +132,7 @@
 			},
 			// 获取查询参数 刷新列表
 			refresh(params){
+				this.searchForm = params
 				this.listdata = []
 				this.total = 0
 				this.searchHandle(1)
@@ -138,10 +140,12 @@
 			// 搜索查询
 			searchHandle (pageNo) {
 				this.status = "loading"
-				pageNo ? this.pageNo = pageNo : null
-				getGoldLogList({
+				pageNo ? this.pageNo = pageNo : null,
+				waitToCleanList({
 					pageNo: this.pageNo,
-					pageSize: this.pageSize
+					pageSize: this.pageSize,
+					stationName: this.searchForm.stationName,
+					orderType: this.searchForm.orderType
 				}).then(res => {
 					if (res.status == 200) {
 						res.data.list.map(item => {
@@ -166,7 +170,7 @@
 			//  查看详情
 			goPage(row){
 				uni.navigateTo({
-				    url: '/pages/cleared/network'
+				    url: '/pages/cleared/network?stationNo=' + item.stationNo
 				})
 			},
 			// scroll-view到底部加载更多
@@ -242,7 +246,7 @@
 				box-shadow: 3rpx 3rpx 5rpx #eee;
 				display: flex;
 				align-items: center;
-				padding: $uni-spacing-col-base $uni-spacing-row-base;
+				padding: 30rpx 20rpx;
 				// 多选框
 				.cell-item-checkbox{
 					flex-shrink: 0;
@@ -256,7 +260,7 @@
 						flex-grow: 1;
 						.cell-item-info-network{
 							word-break: break-all;
-							margin-bottom: $uni-spacing-col-base;
+							margin-bottom: 26rpx;
 							display: inline-block;
 							position: relative;
 						}

+ 28 - 28
pages/cleared/index.vue

@@ -44,7 +44,7 @@
 	</view>
 </template>
 <script>
-	import { getGoldLogList, GoldLogCancel, GoldLogTotal } from '@/api/officialPartnerGoldLog.js'
+	// import { getGoldLogList, GoldLogCancel, GoldLogTotal } from '@/api/officialPartnerGoldLog.js'
 	export default {
 		data() {
 			return {
@@ -80,12 +80,12 @@
 				  content: '撤销单据后乐豆将全部退回给原支付账号,确认撤销吗?',
 				  success(res) {
 				    if (res.confirm) {
-				      GoldLogCancel({ id: row.id }).then(ret => {
-						  if(ret.status == 200){
-							  uni.showToast({ title: ret.message, icon: 'none' })
-							  _this.searchHandle(1)
-						  }
-					  })
+				   //    GoldLogCancel({ id: row.id }).then(ret => {
+						 //  if(ret.status == 200){
+							//   uni.showToast({ title: ret.message, icon: 'none' })
+							//   _this.searchHandle(1)
+						 //  }
+					  // })
 				    }
 				  }
 				})
@@ -94,27 +94,27 @@
 			searchHandle (pageNo) {
 				this.status = "loading"
 				pageNo ? this.pageNo = pageNo : null
-				getGoldLogList({
-					pageNo: this.pageNo,
-					pageSize: this.pageSize,
-					customerMobile: ''
-				}).then(res => {
-					if (res.status == 200) {
-						if(this.pageNo>1){
-							this.listdata = this.listdata.concat(res.data.list || [])
-						}else{
-							this.listdata = res.data.list || []
-							this.scrollTop = 0
-						}
-						this.total = res.data.count || 0
-						this.noDataText = '暂无数据'
-					} else {
-						this.noDataText = res.message
-						this.listdata = []
-						this.total = 0
-					}
-					this.status = "loadmore"
-				})
+				// getGoldLogList({
+				// 	pageNo: this.pageNo,
+				// 	pageSize: this.pageSize,
+				// 	customerMobile: ''
+				// }).then(res => {
+				// 	if (res.status == 200) {
+				// 		if(this.pageNo>1){
+				// 			this.listdata = this.listdata.concat(res.data.list || [])
+				// 		}else{
+				// 			this.listdata = res.data.list || []
+				// 			this.scrollTop = 0
+				// 		}
+				// 		this.total = res.data.count || 0
+				// 		this.noDataText = '暂无数据'
+				// 	} else {
+				// 		this.noDataText = res.message
+				// 		this.listdata = []
+				// 		this.total = 0
+				// 	}
+				// 	this.status = "loadmore"
+				// })
 			},
 			//  查看详情
 			goPage(row){

+ 8 - 8
pages/cleared/network.vue

@@ -55,7 +55,7 @@
 </template>
 
 <script>
-	// import { stationDetail, stationDevice } from '@/api/station.js'
+	import { stationDevice } from '@/api/cleared.js'
 	export default {
 		data() {
 			return {
@@ -106,13 +106,13 @@
 			},
 			//  设备信息
 			getDevice(){
-				// stationDevice({ stationNo: this.stationNo }).then(res => {
-				// 	if(res.status == 200){
-				// 		this.deviceData = res.data
-				// 	}else{
-				// 		this.deviceData = []
-				// 	}
-				// })
+				stationDevice({ stationNo: this.stationNo }).then(res => {
+					if(res.status == 200){
+						this.deviceData = res.data
+					}else{
+						this.deviceData = []
+					}
+				})
 			},
 			//  根据垃圾类型获取兑换规则
 			getRule(type){

+ 23 - 14
pages/cleared/searchModal.vue

@@ -4,9 +4,9 @@
 		<u-popup v-model="isShow" class="search-popup" mode="right" @close="handleClose" length="85%">
 			<view class="search-title">筛选</view>
 			<u-form class="form-content" :model="form" ref="uForm" label-width="150">
-				<u-form-item label="网点名称:" prop="bundleName" class="form-item"><u-input v-model="form.bundleName" :maxlength="30" placeholder="请输入网点名称" /></u-form-item>
-				<u-form-item label="排序方式:" prop="custMobile" class="form-item">
-					<view @tap="openSort=true" :style="{color: form.custMobile?null:'#c0c4cc'}">{{custMobileName}}</view>
+				<u-form-item label="网点名称:" prop="stationName" class="form-item"><u-input v-model="form.stationName" :maxlength="30" placeholder="请输入网点名称" /></u-form-item>
+				<u-form-item label="排序方式:" prop="orderType" class="form-item">
+					<view @tap="openSort=true" :style="{color: form.orderType?null:'#c0c4cc'}">{{orderTypeName}}</view>
 				</u-form-item>
 			</u-form>
 			<view class="uni-list-btns">
@@ -55,15 +55,15 @@ export default {
 			},
 			isShow: this.visible, // 显示隐藏
 			form: {
-				bundleName: '',  //  套餐名称
-				custMobile: '', // 客户手机
+				stationName: '',  //  套餐名称
+				orderType: '', // 客户手机
 			},
 			list: [
-				{ label: '按内置单箱体最大投放量降序', value: '11' },
-				{ label: '按网点可回收物投放总量降序', value: '22' }
+				{ label: '按内置单箱体最大投放量降序', value: 'max' },
+				{ label: '按网点可回收物投放总量降序', value: 'total' }
 			],
 			openSort: false,  //  选择
-			custMobileName: '请选择',
+			orderTypeName: '请选择',
 			selectDefault: [0],  //  下拉默认选中项
 		};
 	},
@@ -73,8 +73,17 @@ export default {
 	methods: {
 		//  初始化数据
 		init(){
-			this.form.bundleName = this.defaultParams.bundleName ? this.defaultParams.bundleName : ''
-			this.form.custMobile = this.defaultParams.custMobile ? this.defaultParams.custMobile : ''
+			this.form.stationName = this.defaultParams.stationName ? this.defaultParams.stationName : ''
+			this.form.orderType = this.defaultParams.orderType ? this.defaultParams.orderType : ''
+			if(this.defaultParams.orderType){
+				this.list.map((item, index) => {
+					if(item.value == this.form.orderType){
+						this.orderTypeName = this.list[index].label
+						this.selectDefault[0] = index
+					}
+				})
+				
+			}
 		},
 		// 关闭弹窗
 		handleClose() {
@@ -83,8 +92,8 @@ export default {
 		// 查询
 		handleSearch() {
 			let params = {
-				bundleName: this.form.bundleName,
-				custMobile: this.form.custMobile,
+				stationName: this.form.stationName,
+				orderType: this.form.orderType,
 			};
 			this.$emit('refresh', params)
 			this.isShow = false
@@ -98,8 +107,8 @@ export default {
 		//  确定
 		confirm(v){
 			this.selectDefault = v
-			this.form.custMobile = this.list[v[0]].value
-			this.custMobileName = this.list[v[0]].label
+			this.form.orderType = this.list[v[0]].value
+			this.orderTypeName = this.list[v[0]].label
 		}
 	}
 };

+ 21 - 21
pages/index/index.vue

@@ -47,7 +47,7 @@
 	</view>
 </template>
 <script>
-	import { getGoldLogList, GoldLogCancel, GoldLogTotal } from '@/api/officialPartnerGoldLog.js'
+	// import { getGoldLogList, GoldLogCancel, GoldLogTotal } from '@/api/officialPartnerGoldLog.js'
 	import { scanCode } from '@/libs/tools.js'
 	export default {
 		data() {
@@ -122,26 +122,26 @@
 			searchHandle (pageNo) {
 				this.status = "loading"
 				pageNo ? this.pageNo = pageNo : null
-				getGoldLogList({
-					pageNo: this.pageNo,
-					pageSize: this.pageSize
-				}).then(res => {
-					if (res.status == 200) {
-						if(this.pageNo>1){
-							this.listdata = this.listdata.concat(res.data.list || [])
-						}else{
-							this.listdata = res.data.list || []
-							this.scrollTop = 0
-						}
-						this.total = res.data.count || 0
-						this.noDataText = '暂无数据'
-					} else {
-						this.noDataText = res.message
-						this.listdata = []
-						this.total = 0
-					}
-					this.status = "loadmore"
-				})
+				// getGoldLogList({
+				// 	pageNo: this.pageNo,
+				// 	pageSize: this.pageSize
+				// }).then(res => {
+				// 	if (res.status == 200) {
+				// 		if(this.pageNo>1){
+				// 			this.listdata = this.listdata.concat(res.data.list || [])
+				// 		}else{
+				// 			this.listdata = res.data.list || []
+				// 			this.scrollTop = 0
+				// 		}
+				// 		this.total = res.data.count || 0
+				// 		this.noDataText = '暂无数据'
+				// 	} else {
+				// 		this.noDataText = res.message
+				// 		this.listdata = []
+				// 		this.total = 0
+				// 	}
+				// 	this.status = "loadmore"
+				// })
 			},
 			//  移除
 			removeFun(row){