Browse Source

Signed-off-by: 1004749546@qq.com <1004749546@qq.com>
待办单 提交

1004749546@qq.com 4 years ago
parent
commit
3c12134e1d
4 changed files with 547 additions and 1 deletions
  1. 105 0
      api/checkOrder.js
  2. 8 1
      pages.json
  3. 425 0
      pages/toDoList/toDoList.vue
  4. 9 0
      pages/work/work.vue

+ 105 - 0
api/checkOrder.js

@@ -0,0 +1,105 @@
+import axios from '@/libs/axios.js'
+// 检测单模糊查询
+export const getCheckResult = params => {
+  return axios.request({
+    url: `checkResult/findList/${params.pageNo}/${params.pageSize}`,
+    method: 'post',
+    data: {
+      queryWord: params.queryWord,
+      resultState: params.resultState,
+      beginDate: params.beginDate,
+      endDate: params.endDate
+    }
+  })
+}
+// 删除检测单
+export const deleteCheckResult = params => {
+  return axios.request({
+    url: `checkResult/delete`,
+    method: 'post',
+    data: {
+      id: params.id
+    }
+  })
+}
+// 查询检测结果明细
+export const findCheckResultDetail = params => {
+  return axios.request({
+    url: `checkResult/findCheckResultDetail/${params.id}`,
+    method: 'post'
+  })
+}
+// 查询第一步详细
+export const findCheckRest = params => {
+  return axios.request({
+    url: `checkResult/findCheckRest/${params.id}`,
+    method: 'post'
+  })
+}
+// 检索客户车辆信息
+export const customerVehicleStore = params => {
+  return axios.request({
+    url: `customerVehicle/findList`,
+    method: 'post',
+    data: {
+      'condition': params.condition
+    }
+  })
+}
+// 查询检测方案
+export const getCheckScheme = params => {
+  return axios.request({
+    url: `checkScheme/findEnableList`,
+    method: 'post',
+    data: {}
+  })
+}
+// 查询技工
+export const findEmployeeList = params => {
+  return axios.request({
+    url: `employee/findOnJobList`,
+    method: 'post',
+    data: {}
+  })
+}
+// 保存车辆信息
+export const saveCheckVehicle = params => {
+  return axios.request({
+    url: `checkResultIn/saveCheckVehicle`,
+    method: 'post',
+    data: params
+  })
+}
+// 保存检测方案
+export const saveCheckScheme = params => {
+  return axios.request({
+    url: `checkResultIn/saveCheckScheme`,
+    method: 'post',
+    data: params
+  })
+}
+// 检测项指标结果录入
+export const saveCheckItemResult = params => {
+  return axios.request({
+    url: `checkResultIn/saveCheckItemResult`,
+    method: 'post',
+    data: params
+  })
+}
+// 一键设为良好
+export const saveCheckItemListResultOk = params => {
+  return axios.request({
+    url: `checkResultIn/saveCheckItemListResultOk`,
+    method: 'post',
+    data: params
+  })
+}
+// 检测结果录入--检测完成
+export const saveCheckResult = params => {
+  return axios.request({
+    url: `checkResultIn/saveCheckResult`,
+    method: 'post',
+    data: params
+  })
+}
+

+ 8 - 1
pages.json

@@ -171,7 +171,14 @@
             "style" : {
 				"navigationBarTitleText": "可点检门店"
 			}
-        }
+        },
+		{
+			"path": "pages/toDoList/toDoList",		//  待办单>待办单列表
+			"style": {
+				"navigationStyle": "custom" ,// 隐藏系统导航栏
+				"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+			}
+		}
     ],
 	"globalStyle": {
 		"navigationBarTitleText": "智能巡店",

+ 425 - 0
pages/toDoList/toDoList.vue

@@ -0,0 +1,425 @@
+<template>
+	<view class="pagesCons">
+		<!-- 自定义标题 -->
+		<u-navbar :is-back="false" :border-bottom="false" :background="background" id="navbar">
+			<view class="slot-wrap">
+				<view class="back-icon" @click="goBack">
+					<u-icon name="arrow-left" color="#fff" size="32"></u-icon>
+				</view>
+				<view class="left-icon">待办单</view>
+				<view class="right-icon">
+					<u-icon name="plus-circle" color="#fff" size="32"></u-icon>新增
+				</view>
+			</view>
+		</u-navbar>
+		<view class="tab-body">
+			    <view>
+					<u-tabs-swiper ref="uTabs" :list="tabList" name="dispName" :current="current" @change="tabsChange" :is-scroll="false"
+					 swiperWidth="750"></u-tabs-swiper>
+				</view>
+				<swiper class="check-list" :current="swiperCurrent" @transition="transition" @change="swiperChange" @animationfinish="animationfinish">
+					<swiper-item class="swiper-item" style="height: 100%;width: 100%;overflow: hidden;" v-for="(tabs, index) in tabList" :key="index">
+						<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom">
+							<view  
+							class="check-order-list" 
+							v-for="(item,index) in list" 
+							:key="item.id"
+							>
+								 <view class="check-row" @click="viewRow(item)">
+									 <view>{{item.carModelName}}</view>
+									 <view class="createDate">{{item.createDate}}</view>
+								 </view>
+								 <view class="check-row" @click="viewRow(item)">
+									 <view>
+										 {{item.vehicleNumber}}
+									</view>
+									 <view style="text-align: right;">
+										 <uni-font-icons size="14" type="icon-phone"></uni-font-icons>
+										 <text>{{item.customMobile}}</text>
+									 </view>
+									 <view style="width: 40upx;text-align: right;" v-if="item.resultState != 10">
+									 	 <uni-font-icons type="icon-xiangyoujiantou"></uni-font-icons>
+									 </view>
+								 </view>
+								 <view class="check-row">
+									 <view>
+										{{item.orderSource}}
+									 </view>
+									 <view style="text-align: right;">
+										 
+									 </view>
+								 </view>
+							 </view>
+							 <u-empty :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
+							 <view style="padding: 20upx;">
+								 <u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
+							 </view>
+						</scroll-view>
+					</swiper-item>
+				</swiper>
+		</view>
+		<!-- 工单查询 -->
+		<u-popup v-model="showSearch" class="search-popup" mode="right" :custom-style="{top:'var(--status-bar-height)'}" length="80%">
+				<view class="search-title">工单查询</view>
+				<view class="uni-list">
+					<view class="uni-list-cell">
+						<view class="uni-list-cell-left">
+							关键词:
+						</view>
+						<view class="uni-list-cell-db">
+							<input class="uni-input" v-model="queryWord" placeholder="工单、客户姓名、手机号、车牌号" />
+						</view>
+					</view>
+				</view>
+				<view class="uni-list">
+					<view class="uni-list-cell">
+						<view class="uni-list-cell-left">
+							开始时间:
+						</view>
+						<view class="uni-list-cell-db">
+							<picker mode="date" v-model="beginDate" :end="endDate" @change="bindBeginDateChange">
+								<view class="uni-input">{{beginDate}}</view>
+							</picker>
+						</view>
+					</view>
+				</view>
+				<view class="uni-list">
+					<view class="uni-list-cell">
+						<view class="uni-list-cell-left">
+							结束时间:
+						</view>
+						<view class="uni-list-cell-db">
+							<picker mode="date" v-model="endDate" :start="beginDate" @change="bindEndDateChange">
+								<view class="uni-input">{{endDate}}</view>
+							</picker>
+						</view>
+					</view>
+				</view>
+				<view class="uni-list-btns">
+					<button type="primary" @click="pageInit(false)">查询</button>
+					<button type="info" @click="resetForm">重置</button>
+				</view>
+			</u-popup>
+	</view>
+</template>
+
+<script>
+	import {getCheckResult, deleteCheckResult} from '@/api/checkOrder'
+	import { getLookUpDatas, listLookUp } from '@/api/data'
+	import { orderQueryLike, deleteOrder, finishOrder, smAddSerPerson } from '@/api/order'
+	import { clzConfirm } from '@/libs/tools.js'
+	export default {
+		components: {
+		},
+		data() {
+			return {
+				showSearch: false,
+				status: 'loadmore',
+				canEdit: false, 
+				canFinish: false, 
+				canDel: false, 
+				canView: false, 
+				canPay: false, 
+				noDataText: '暂无数据',
+				background: {
+					// 渐变色
+					backgroundImage: 'linear-gradient(45deg, rgb(85, 170, 255), rgb(21, 102, 223))'
+				},
+				tabList: [
+					  {
+						  dispName: '发给我的',
+						  typeId: 3
+					   },
+					  {
+					    dispName: '我创建的',
+					  	typeId: 1
+					  },
+					  {
+					    dispName: '全部',
+					  	typeId: 2
+					  },
+				  ],
+				current: 0,
+				swiperCurrent: 0,
+				// 查询条件
+				queryWord: '',
+				beginDate: '',
+				endDate: '',
+				typeId: '',
+				finishFlag: '',
+				orderFlag: '',
+				orderFlags: [],
+				pageNo: 1,
+				pageSize: 10,
+				list: [],
+				total: 0,
+				openAddServerStaff: false,  //  是否打开选择服务人员弹框
+				smOrderId: '',  //  移动扫码洗车服务id
+			}
+		},
+		onLoad() {
+			this.getRow()
+		},
+		methods:{
+			message(title){
+				uni.showToast({
+					icon:'none',
+					title: title
+				})
+			},
+			// tabs通知swiper切换
+			tabsChange(index) {
+				this.swiperCurrent = index;
+				this.list = []
+				this.status = "loading"
+			},
+			swiperChange(event){
+				console.log(event.detail)
+				this.list = []
+				this.status = "loading"
+			},
+			// swiper-item左右移动,通知tabs的滑块跟随移动
+			transition(e) {
+				let dx = e.detail.dx;
+				this.$refs.uTabs.setDx(dx);
+			},
+			// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
+			// swiper滑动结束,分别设置tabs和swiper的状态
+			animationfinish(e) {
+				let current = e.detail.current;
+				if(current != this.current){
+					this.$refs.uTabs.setFinishCurrent(current);
+					this.swiperCurrent = current;
+					this.current = current;
+					this.getRow()
+				}
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				console.log(this.list.length, this.total)
+				if(this.list.length < this.total){
+					this.pageNo += 1
+					this.getRow()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			// 查询列表
+			getRow (pageNo) {
+			  let _this = this
+			  if (pageNo) {
+			    this.pageNo = pageNo
+			  }
+			  
+			  let params = {
+			    pageNo: this.pageNo,
+			    pageSize: this.pageSize,
+			    queryWord: this.queryWord,
+			    queryBeginDate: this.beginDate,
+			    queryEndDate: this.endDate,
+			    typeId: this.typeId,
+			    finishFlag: this.finishFlag,
+			    orderFlag: this.orderFlag,
+				orderFlags: this.orderFlags,
+			    orderSource: this.orderSource
+			  }
+			  this.status = "loading"
+			  orderQueryLike(params).then(res => {
+				if (res.code == 200 || res.status == 204 || res.status == 200) {
+				  if(_this.pageNo>1){
+					  _this.list = _this.list.concat(res.data.list || [])
+				  }else{
+					  _this.list = res.data.list || []
+				  }
+				  _this.total = res.data.count || 0
+				} else {
+				  _this.list = []
+				  _this.total = 0
+				  _this.noDataText = res.message
+				}
+				_this.status = "loadmore"
+			  })
+			},
+			// 查询条件
+			openSearch(){
+				this.showSearch = true
+			},
+			bindBeginDateChange(e){
+				this.beginDate = e.target.value
+			},
+			bindEndDateChange(e){
+				this.endDate = e.target.value
+			},
+			// 重置
+			resetForm(){
+				this.queryWord = ''
+				this.beginDate = ''
+				this.endDate = ''
+				this.pageInit(true)
+			},
+			// 详细页
+			viewRow(item){
+				// 已完成的
+				uni.navigateTo({
+					url: "/pages/workOrder/orderDetails?id="+item.id
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page{
+		height: 100%;
+	}
+	/* 自定义导航栏样式 */
+	.slot-wrap {
+		display: flex;
+		align-items: center;
+		/* 如果您想让slot内容占满整个导航栏的宽度 */
+		flex: 1;
+		/* 如果您想让slot内容与导航栏左右有空隙 */
+		padding: 0 30rpx;
+		color: #fff;
+		font-size: 28upx;
+		.left-icon {
+			flex-grow: 1;
+			font-size: 32upx;
+			margin-right: 10upx;
+			text-align: center;
+		}
+		.right-icon {
+			padding-left: 50upx;
+		}
+		.uni-icons {
+			margin-right: 10upx;
+		}
+	}
+	.pagesCons{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		.tab-body{
+			.check-list{
+				height: calc(100vh - 120px);
+			}
+			.check-order-list{
+				background: #ffffff;
+				padding: 10upx 20upx;
+				margin: 25upx;
+				border-radius: 6upx;
+				box-shadow: 1px 1px 3px #EEEEEE;
+				.check-row{
+					display: flex;
+					align-items: center;
+					padding: 20upx 10upx;
+					font-size: 28upx;
+					&:first-child{
+						border-bottom: 1px dashed #F8F8F8;
+						font-size: 26upx;
+						.createDate{
+							color: #666;
+						}
+					}
+					&:last-child{
+						border-top: 1px dashed #F8F8F8;
+					}
+					> view{
+						&:first-child{
+							flex-grow: 1;
+						}
+					}
+					.action{
+						margin: 0 6rpx;
+						padding: 0 20rpx;
+						color: #fff;
+					}
+					.edit{
+						background-color: #f9ba09;
+					}
+					.view{
+						background-color: #ff7801;
+					}
+					.del{
+						background-color: #f72525;
+					}
+					.finish{
+						background-color: #2d8cf0;
+					}
+					.pay{
+						background-color: #10c71e;
+					}
+					.check-btns{
+						width: '50%';
+						display: flex;
+						align-items: center;
+						justify-content: flex-end;
+						> view{
+							margin-left: 35upx;
+							font-size: 28upx;
+						}
+					}
+					.u-tag{
+						border-radius: 0;
+					}
+					.uni-icons{
+						margin: 0 5upx;
+					}
+				}
+			}
+		}
+	}
+   .slot-wrap {
+		display: flex;
+		align-items: center;
+		/* 如果您想让slot内容占满整个导航栏的宽度 */
+		flex: 1;
+		/* 如果您想让slot内容与导航栏左右有空隙 */
+		padding: 0 30rpx 0 0;
+		color: #fff;
+		font-size: 28upx;
+		.left-icon{
+			flex-grow: 1;
+			font-size: 32upx;
+		}
+		.right-icon{
+			padding-left:50upx;
+		}
+		.uni-icons{
+			margin-right: 10upx;
+		}
+	}
+	.search-popup{
+		.search-title{
+			text-align: center;
+			padding: 22upx;
+			color: #333;
+			border-bottom: 1px solid #eee;
+		}
+		.uni-list{
+			margin: 20upx;
+			.uni-list-cell{
+				display: flex;
+				align-items: center;
+				border-bottom: 1px dashed #EEEEEE;
+				.uni-list-cell-db{
+					flex: 1;
+				}
+				.uni-input{
+					height: 2.5em;
+					line-height: 2.5em;
+				}
+			}
+		}
+		.uni-list-btns{
+			display: flex;
+			padding: 20upx;
+			uni-button{
+				font-size: 28upx;
+				margin: 0 30upx;
+				flex:1;
+			}
+		}
+		
+	}
+</style>

+ 9 - 0
pages/work/work.vue

@@ -37,6 +37,15 @@
 						target: 'page',
 						auth: true
 					},
+					{
+						id: 'tcgl',
+						icon: 'daiban',
+						color: '#ffaf69',
+						name: '待办单',
+						url:'/pages/toDoList/toDoList',
+						target: 'page',
+						auth: true
+					},
 				],
 			}
 		},