Merge branch 'master' of http://122.51.230.86:3000/dianliang/lanan-repair-app
This commit is contained in:
commit
6beb19936c
@ -118,7 +118,7 @@ export default {
|
|||||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
border-left: 4rpx solid #FFB323;
|
border-left: 4rpx solid #FFB323;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
margin-bottom: 30rpx;
|
margin: 15rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-top {
|
.order-top {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<image mode="aspectFit" src="@/static/icons/tabbar/order.png" v-show="aindex != 2"></image>
|
<image mode="aspectFit" src="@/static/icons/tabbar/order.png" v-show="aindex != 2"></image>
|
||||||
<image mode="aspectFit" src="@/static/icons/tabbar/order-checked.png" v-show="aindex == 2"></image>
|
<image mode="aspectFit" src="@/static/icons/tabbar/order-checked.png" v-show="aindex == 2"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="">工单处理</view>
|
<view class="">工单</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="box" :class="{active: aindex == 3}" @click="getgogo(3)">-->
|
<!-- <view class="box" :class="{active: aindex == 3}" @click="getgogo(3)">-->
|
||||||
<!-- <view class="imgs">-->
|
<!-- <view class="imgs">-->
|
||||||
@ -172,8 +172,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getgogo(index) {
|
getgogo(index) {
|
||||||
|
|
||||||
|
|
||||||
if (index == 1) {
|
if (index == 1) {
|
||||||
this.aindex = index
|
this.aindex = index
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
|
@ -35,6 +35,9 @@
|
|||||||
<scroll-view scroll-y="true" class="itemContent" bindscrolltolower="onReachBottom"
|
<scroll-view scroll-y="true" class="itemContent" bindscrolltolower="onReachBottom"
|
||||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
<order-card v-for="(item, index) in orderList" :key="index" :order="item"></order-card>
|
<order-card v-for="(item, index) in orderList" :key="index" :order="item"></order-card>
|
||||||
|
<view style="text-align: center" v-if="orderList.length==0">
|
||||||
|
<image class="" src="@/static/images/nothing.png" ></image>
|
||||||
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -68,7 +71,7 @@ export default {
|
|||||||
imgUrlPrex:config.baseImageUrl,
|
imgUrlPrex:config.baseImageUrl,
|
||||||
userInfo: {
|
userInfo: {
|
||||||
avatar: undefined,
|
avatar: undefined,
|
||||||
nickname: '曾廷'
|
nickname: ''
|
||||||
},
|
},
|
||||||
menuList: [
|
menuList: [
|
||||||
{
|
{
|
||||||
@ -77,7 +80,12 @@ export default {
|
|||||||
icon: require('@/static/icons/homeMenuIcon/menu1.png'),
|
icon: require('@/static/icons/homeMenuIcon/menu1.png'),
|
||||||
path: '/pages-order/addOrder/addOrder'
|
path: '/pages-order/addOrder/addOrder'
|
||||||
},
|
},
|
||||||
{title: '预约开单', desc: '查询预约记录', icon: require('@/static/icons/homeMenuIcon/menu1.png'), path: '/pages-order/appointOrder/appointOrder'}
|
{
|
||||||
|
title: '预约开单',
|
||||||
|
desc: '查询预约记录',
|
||||||
|
icon: require('@/static/icons/homeMenuIcon/menu1.png'),
|
||||||
|
path: '/pages-order/appointOrder/appointOrder'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
bannerIndex: 0,
|
bannerIndex: 0,
|
||||||
shopList: [],
|
shopList: [],
|
||||||
@ -89,34 +97,6 @@ export default {
|
|||||||
//下来刷新状态
|
//下来刷新状态
|
||||||
isTriggered:false,
|
isTriggered:false,
|
||||||
orderList: [
|
orderList: [
|
||||||
{
|
|
||||||
orderNo: '1209840149750105501',
|
|
||||||
flag: 1, flagStr: '待处理', carNum: '川A 184AO1',
|
|
||||||
carModel: '一汽奥迪 2024款 A6L',
|
|
||||||
projectList: [
|
|
||||||
{ name: '清洗内饰', id: 1 },
|
|
||||||
{ name: '内饰精洗除臭', id: 2 },
|
|
||||||
{ name: '烘干底板胶及脚垫', id: 3 }
|
|
||||||
],
|
|
||||||
userName: '张三',
|
|
||||||
userPhone: '157****6879',
|
|
||||||
appointDate: '2024-10-20 12:00',
|
|
||||||
counselorName: '李相东'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orderNo: '1209840149750105501',
|
|
||||||
flag: 1, flagStr: '待处理', carNum: '川A 184AO1',
|
|
||||||
carModel: '一汽奥迪 2024款 A6L',
|
|
||||||
projectList: [
|
|
||||||
{ name: '清洗内饰', id: 1 },
|
|
||||||
{ name: '内饰精洗除臭', id: 2 },
|
|
||||||
{ name: '烘干底板胶及脚垫', id: 3 }
|
|
||||||
],
|
|
||||||
userName: '张三',
|
|
||||||
userPhone: '157****6879',
|
|
||||||
appointDate: '2024-10-20 12:00',
|
|
||||||
counselorName: '李相东'
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
defaultAvatar: require('@/static/icons/avatar.png')
|
defaultAvatar: require('@/static/icons/avatar.png')
|
||||||
}
|
}
|
||||||
@ -130,8 +110,6 @@ export default {
|
|||||||
if(!this.$msgSocket){
|
if(!this.$msgSocket){
|
||||||
this.$startMsgSocket(getTenantId(),getStrData("userId"))
|
this.$startMsgSocket(getTenantId(),getStrData("userId"))
|
||||||
}
|
}
|
||||||
this.orderList = []
|
|
||||||
this.getOrderList()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@ -142,6 +120,7 @@ export default {
|
|||||||
}else{
|
}else{
|
||||||
//直接取缓存中的用户信息
|
//直接取缓存中的用户信息
|
||||||
this.userInfo = getUserInfo()
|
this.userInfo = getUserInfo()
|
||||||
|
this.onRefresherrefresh()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -173,11 +152,11 @@ export default {
|
|||||||
* 查本人待处理工单
|
* 查本人待处理工单
|
||||||
*/
|
*/
|
||||||
getOrderList(){
|
getOrderList(){
|
||||||
this.orderList = []
|
let paramsObj = {pageNo: this.pageNo, pageSize: this.pageSize, isFinish: "0"}
|
||||||
request({
|
request({
|
||||||
url: '/admin-api/repair/tickets/pageType',
|
url: '/admin-api/repair/tickets/pageType',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params:{pageNo:this.pageNo,pageSize:this.pageSize,isFinish:"0"}
|
params:paramsObj
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="searchBox">
|
<view class="searchBox">
|
||||||
<input class="searchInput" type="text" placeholder="车牌号查询工单" placeholder-style="font-size: 28rpx">
|
<input class="searchInput" type="text" v-model="searchText" placeholder="工单号、车牌号、手机号、客户姓名" placeholder-style="font-size: 28rpx">
|
||||||
<text class="searchBtn">搜索</text>
|
<text class="searchBtn" @click="onRefresherrefresh">搜索</text>
|
||||||
|
<text class="searchBtn" @click="clearText">清空</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
@ -15,9 +16,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="orderList">
|
<view class="orderList">
|
||||||
<view v-for="(item, index) in orderList" :key="index" class="orderItem">
|
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" bindscrolltolower="onReachBottom"
|
||||||
<order-card :order="item"></order-card>
|
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
|
<order-card v-for="(item, index) in orderList" :key="index" :order="item"></order-card>
|
||||||
|
<view style="text-align: center" v-if="orderList.length==0">
|
||||||
|
<image class="" src="@/static/images/nothing.png" ></image>
|
||||||
</view>
|
</view>
|
||||||
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<tabBarVue msg="2"></tabBarVue>
|
<tabBarVue msg="2"></tabBarVue>
|
||||||
@ -25,10 +30,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import request from '../../utils/request';
|
|
||||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||||
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
||||||
import OrderCard from "@/components/orderCard.vue";
|
import OrderCard from "@/components/orderCard.vue";
|
||||||
|
import request from '@/utils/request';
|
||||||
|
import {formatTimestamp,getOrderStatusText,getDictByCode} from "@/utils/utils";
|
||||||
|
import {
|
||||||
|
getToken,
|
||||||
|
getUserInfo,
|
||||||
|
getStrData,
|
||||||
|
getTenantId
|
||||||
|
} from '@/utils/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -38,10 +50,14 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
searchText:"",
|
||||||
payShow: false,
|
payShow: false,
|
||||||
activeKey: 0,
|
activeKey: 0,
|
||||||
pageNum: 1,
|
pageNo: 1,
|
||||||
totalPages: 0,
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
//下来刷新状态
|
||||||
|
isTriggered:false,
|
||||||
imageUrl: '',
|
imageUrl: '',
|
||||||
tabList: [
|
tabList: [
|
||||||
{
|
{
|
||||||
@ -50,153 +66,124 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
title: '已完成'
|
title: '全部'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
orderList: [
|
orderList: [
|
||||||
{
|
|
||||||
orderNo: '1209840149750105501',
|
|
||||||
flag: 1, flagStr: '待处理', carNum: '川A 184AO1',
|
|
||||||
carModel: '一汽奥迪 2024款 A6L',
|
|
||||||
projectList: [
|
|
||||||
{ name: '清洗内饰', id: 1 },
|
|
||||||
{ name: '内饰精洗除臭', id: 2 },
|
|
||||||
{ name: '烘干底板胶及脚垫', id: 3 }
|
|
||||||
],
|
],
|
||||||
userName: '张三',
|
|
||||||
userPhone: '157****6879',
|
|
||||||
appointDate: '2024-10-20 12:00',
|
|
||||||
counselorName: '李相东'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
orderNo: '1209840149750105501',
|
|
||||||
flag: 2, flagStr: '已完成', carNum: '川A 184AO1',
|
|
||||||
carModel: '一汽奥迪 2024款 A6L',
|
|
||||||
projectList: [
|
|
||||||
{ name: '清洗内饰', id: 1 },
|
|
||||||
{ name: '内饰精洗除臭', id: 2 },
|
|
||||||
{ name: '烘干底板胶及脚垫', id: 3 }
|
|
||||||
],
|
|
||||||
userName: '张三',
|
|
||||||
userPhone: '157****6879',
|
|
||||||
appointDate: '2024-10-20 12:00',
|
|
||||||
counselorName: '李相东'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
changeActive: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// this.orderList = []
|
if(!getToken()){
|
||||||
// this.getList()
|
uni.reLaunch({
|
||||||
},
|
url: '/pages/login/login'
|
||||||
onReachBottom() {
|
|
||||||
if (this.pageNum >= this.totalPages) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '没有下一页数据',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
})
|
||||||
} else {
|
}else{
|
||||||
this.pageNum++
|
//直接取缓存中的用户信息
|
||||||
this.getList()
|
this.userInfo = getUserInfo()
|
||||||
|
this.onRefresherrefresh()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getList() {
|
/**
|
||||||
let data = {
|
* 上滑加载数据
|
||||||
pageSize: 20,
|
*/
|
||||||
pageNo: this.pageNum
|
onReachBottom() {
|
||||||
|
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
||||||
|
if (this.pageNo * this.pageSize >= this.total) {
|
||||||
|
uni.$u.toast('没有更多数据了')
|
||||||
|
return
|
||||||
}
|
}
|
||||||
switch (this.activeKey) {
|
//页码+1,调用获取数据的方法获取第二页数据
|
||||||
case 0:
|
this.pageNo++
|
||||||
break;
|
//此处调用自己获取数据列表的方法
|
||||||
case 1:
|
this.getOrderList()
|
||||||
data.status = "06"
|
},
|
||||||
break;
|
/**
|
||||||
case 2:
|
* 下拉刷新数据
|
||||||
data.status = '00'
|
*/
|
||||||
break
|
onRefresherrefresh(){
|
||||||
default:
|
this.isTriggered = true
|
||||||
break
|
this.pageNo = 1
|
||||||
}
|
this.total = 0
|
||||||
if (this.changeActive) {
|
|
||||||
this.orderList = []
|
this.orderList = []
|
||||||
|
this.getOrderList()
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 清空
|
||||||
|
*/
|
||||||
|
clearText(){
|
||||||
|
this.searchText = ""
|
||||||
|
this.onRefresherrefresh()
|
||||||
|
},
|
||||||
|
getOrderList(){
|
||||||
|
let paramsObj = {pageNo: this.pageNo, pageSize: this.pageSize, isFinish: "0"}
|
||||||
|
console.log("this.searchText",this.searchText)
|
||||||
|
if(''!=this.searchText){
|
||||||
|
paramsObj['ticketNo'] = this.searchText
|
||||||
}
|
}
|
||||||
this.changeActive = false
|
if(1==this.activeKey){
|
||||||
await request({
|
//查所有订单
|
||||||
url: '/userClient/order/page',
|
paramsObj['selectType'] = "all"
|
||||||
|
}
|
||||||
|
request({
|
||||||
|
url: '/admin-api/repair/tickets/pageType',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params:paramsObj
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 200) {
|
console.log(res)
|
||||||
this.orderList = this.orderList.concat(res.rows)
|
if (res.code == 200) {
|
||||||
let total = res.total
|
let thisPageRecords = []
|
||||||
this.totalPages = Math.ceil(total / this.pageSize);
|
if(res.data && res.data.hasOwnProperty("records")){
|
||||||
|
for (let i = 0; i < res.data.records.length; i++) {
|
||||||
|
let order = res.data.records[i]
|
||||||
|
let viewOrder = {
|
||||||
|
id:order.id,
|
||||||
|
orderNo:order.ticketNo,
|
||||||
|
flag:1,
|
||||||
|
ticketsStatus:order.ticketsStatus,
|
||||||
|
ticketsWorkStatus:order.ticketsWorkStatus,
|
||||||
|
flagStr:getOrderStatusText(order.ticketsStatus,order.ticketsWorkStatus),
|
||||||
|
carNum:order.carNo,
|
||||||
|
carModel:order.carBrandName,
|
||||||
|
userName:order.userName,
|
||||||
|
userPhone:order.userMobile,
|
||||||
|
counselorName:order.adviserName,
|
||||||
|
}
|
||||||
|
if(order.booking){
|
||||||
|
viewOrder['appointDate'] = formatTimestamp(order.createTime)
|
||||||
|
}
|
||||||
|
let projectList = []
|
||||||
|
if(order.itemList){
|
||||||
|
for (let j = 0; j < order.itemList.length; j++) {
|
||||||
|
let itemObj = order.itemList[j]
|
||||||
|
if("01"==itemObj.itemType){
|
||||||
|
projectList.push({
|
||||||
|
id:itemObj.id,
|
||||||
|
name:itemObj.itemName
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
viewOrder['projectList'] = projectList
|
||||||
|
thisPageRecords.push(viewOrder)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//判断 如果获取的数据的页码不是第一页,就让之前赋值获取过的数组数据 concat连接 刚获取的第n页数据
|
||||||
|
if (this.pageNo != 1) {
|
||||||
|
this.orderList = this.orderList.concat(thisPageRecords)
|
||||||
|
} else {
|
||||||
|
this.orderList = thisPageRecords
|
||||||
|
}
|
||||||
|
//将获取的总条数赋值
|
||||||
|
this.total = res.data.total
|
||||||
|
this.isTriggered = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeTabFun(id) {
|
changeTabFun(id) {
|
||||||
this.activeKey = id
|
this.activeKey = id
|
||||||
this.changeActive = true
|
this.onRefresherrefresh()
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
getStatus(status) {
|
|
||||||
switch (status) {
|
|
||||||
case '0':
|
|
||||||
return '待支付'
|
|
||||||
case '1':
|
|
||||||
return '已支付'
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async goPay(data) {
|
|
||||||
let that = this
|
|
||||||
await request({
|
|
||||||
url: '/userClient/pay/toPay',
|
|
||||||
method: 'get',
|
|
||||||
params: {orderId: data.id}
|
|
||||||
}).then((ress) => {
|
|
||||||
|
|
||||||
wx.requestPayment({
|
|
||||||
timeStamp: ress.data.timeStamp, // 时间戳,从1970年1月1日00:00:00至今的秒数,即当前的时间
|
|
||||||
nonceStr: ress.data.nonceStr, // 随机字符串,长度为32个字符以下。
|
|
||||||
package: ress.data.package, // 统一下单接口返回的 prepay_id 参数值,格式如“prepay_id=*”
|
|
||||||
signType: ress.data.signType, // 签名算法类型,默认为 MD5,支持RSA等其他加密算法
|
|
||||||
paySign: ress.data.paySign, // 签名,详见签名生成算法
|
|
||||||
success: function (res) {
|
|
||||||
console.log('成功', res);
|
|
||||||
if (res.errMsg = 'requestPayment:ok') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功'
|
|
||||||
})
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
// 支付成功后的回调函数, res.errMsg = 'requestPayment:ok'
|
|
||||||
},
|
|
||||||
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
convertToImage() {
|
|
||||||
|
|
||||||
uni.canvasToTempFilePath({
|
|
||||||
|
|
||||||
canvasId: 'myQrcode',
|
|
||||||
success: function (res) {
|
|
||||||
// 在H5平台下,tempFilePath 为 base64
|
|
||||||
// this.imageUrl = res.tempFilePath.replace(/[\r\n]/g, "")
|
|
||||||
document.getElementById("dl-pay-img").setAttribute("src", res.tempFilePath.replace(/[\r\n]/g, ""))
|
|
||||||
this.$forceUpdate()
|
|
||||||
console.log(this.imageUrl, 200);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
popupChange({show}) {
|
|
||||||
if (show) {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
gotoDetail(row) {
|
gotoDetail(row) {
|
||||||
if (row.goodsType === '2') {
|
if (row.goodsType === '2') {
|
||||||
@ -209,11 +196,6 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
gotoEvaluate(row) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages-order/orderDetail/evaluate?info=' + encodeURIComponent(JSON.stringify(row))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -288,7 +270,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.orderList {
|
.orderList {
|
||||||
padding: 30rpx 0;
|
//padding: 30rpx 0;
|
||||||
|
padding-top: 10rpx;
|
||||||
|
height: calc(100% - 90rpx);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
row-gap: 20rpx;
|
row-gap: 20rpx;
|
||||||
|
BIN
static/images/nothing.png
Normal file
BIN
static/images/nothing.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
Loading…
Reference in New Issue
Block a user