Commit 089094d2 authored by 郭晓清's avatar 郭晓清

Merge branch 'master' of https://git.banshouhui.com/lijundan/self-support

# Conflicts:
#	src/pages/order/detail.vue
parents 20a4ad96 4aec5b1c
......@@ -8,6 +8,7 @@ const UNI_APP = {
apiUrl: 'http://192.168.1.22', //java端域名请求头
// apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
},
qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
qn_base_url: 'https://qn-static.banshouhui.com/self-support/',
qn_asset_url: 'http://deudn.c.pp.cc/',
}
module.exports = UNI_APP;
......@@ -7,7 +7,8 @@ const UNI_APP = {
systemUrl: {
apiUrl:'https://system.banshouhui.com', //java端域名请求头
},
qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
qn_base_url: 'https://qn-static.banshouhui.com/self-support/',
qn_asset_url: 'https://qn-static.banshouhui.com'
}
module.exports = UNI_APP;
......@@ -7,6 +7,7 @@ const UNI_APP = {
systemUrl: {
apiUrl: 'https://system.dev.banshouhui.com', //java端域名请求头
},
qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
qn_base_url: 'https://qn-static.banshouhui.com/self-support/',
qn_asset_url: 'https://qn-static.banshouhui.com'
}
module.exports = UNI_APP;
......@@ -159,7 +159,8 @@ export default {
setUserData(userInfo) {
if (userInfo && userInfo.token) {
// 如果已经登录则直接获取相关信息
this.$u.vuex('vuex_token',userInfo.token); // RTOKENf22df8e7b9db396f560e8f61bebceea2000cb05c
this.$u.vuex('vuex_token',userInfo.token);
this.$u.vuex('vuex_token',"RTOKEN7493e6defc2f1a77782f105dc297a9366763fec5");
this.$u.vuex('vuex_user', userInfo);
this.$u.vuex('vuex_wx_uid', userInfo.wxopenid);
} else {
......
......@@ -8,93 +8,109 @@ let orderApiFun = function(vm){
* 工单数量查询接口
*/
let listOrderCount = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/wokerOrder/queryOrdersCount/V2', params);
/**
* 工单列表接口
*/
let listOrder = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/revision/' + vm.vuex_token + '/list', params);
/**
* 获取师傅的预约日历
*/
let workerCalendar = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/wokerOrder/appointment/calendar', params);
/**
* 师傅预约
*/
let workerAppointment = async (params = {}, orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/' + vm.vuex_token + '/'+orderId, params)
// 联系顾客时间更新接口,暂时没有
/**
* 师傅签到接口
* 师傅签到接口
*/
let maintainWorkerCheckin = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token + '/order/'+orderId+'/maintainWorkerCheckin', params,{'content-type': 'application/x-www-form-urlencoded'});
/**
* 订单详情查询
* 订单详情查询
*/
let orderDetail = async (params = {},orderId) => await vm.$u.get('/wxh-worker-rest/rest/order/revision/'+ vm.vuex_token+'/'+orderId, params);
/* 过程反馈查询接口 */
let feedbackConfig = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/v2/getFeedBack/' + vm.vuex_token, params)
/* 预约+过程反馈 接口 */
let traceAndAppointment = async (params = {}, orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/' + vm.vuex_token + `/`+orderId, params)
/* 师傅拒单 */
let rejectOrder = async (params = {}, orderId) => await vm.$u.get(prefix + vm.vuex_token + `/order/${orderId}/workerReject/V2`, params)
/**
* 查询工单操作记录列表接口
*/
let listOrderRecord = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/record/'+ vm.vuex_token+'/listOrderRecord/'+params.orderId, params);
/**
* 接单
*/
let orderAccept = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token+'/order/'+orderId+'/accept', params);
/**
* 抢单
*/
let orderGan = async (params = {},orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/revision/applets/'+ vm.vuex_token+'/order/acceptAppletsOrder', params,{'content-type': 'application/x-www-form-urlencoded'});
/**
* 获取拍照标准
*/
let orderStandard = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token+'/photo/standard', params);
/**
* 保存图片信息
*/
let saveImage = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token + '/order/'+orderId+'/maintain/saveImage', params);
/**
* 获取师傅水印 or 默认水印
*/
let getWatermark = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/photo/watermark', params);
/**
* 获取师傅开放可选时间段
*/
let openTimerange = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/wokerOrder/appointment/timerange', params);
/**
* 联系时间接口
*/
let contactTime = async (params = {},orderId) => await vm.$u.get('/wxh-worker-rest/rest/order/record/'+ vm.vuex_token+'/contact/'+orderId, params);
/**
* 检查是否可以拒单
*/
let checkRejectable = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/'+ vm.vuex_token+'/wokerOrder/checkRejectable', params);
/**
* 获取签到距离
*/
let getSignDistance = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/' + vm.vuex_token + `/wokerOrder/sign/distance`, params)
/**
* 获取订单的完工项目(配置+数据)
*/
let getCompleteConfigAndData= async (orderId) => await vm.$u.get(prefix+ vm.vuex_token+'/order/'+ orderId +'/maintain/info');
/**
* 查询措施
*/
let getMeasure= async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/service/'+ vm.vuex_token+'/measure/queryMeasureItems', params);
/**
* 保存售后记录
*/
let saveCompleteData = async (params = {},orderId) => await vm.$u.post(prefix+ vm.vuex_token+'/order/'+ orderId +'/maintain/saveMaintainInfoV2', params);
const orderApi = {
listByRecommendOrder,
listOrderCount,
......@@ -106,7 +122,6 @@ let orderApiFun = function(vm){
listOrderRecord,
orderAccept,
orderGan,
maintainWorkerCheckin,
feedbackConfig,
traceAndAppointment,
rejectOrder,
......@@ -116,10 +131,13 @@ let orderApiFun = function(vm){
openTimerange,
contactTime,
checkRejectable,
getSignDistance
getSignDistance,
getCompleteConfigAndData,
getMeasure,
saveCompleteData
}
return orderApi
}
module.exports = {
orderApiFun
}
\ No newline at end of file
}
......@@ -96,9 +96,9 @@
},
data() {
return {
currentDay: 0,
currentDay: null,
currentTime: null,
appointTime: now,
appointTime: null,
appointRange: "",
num: 0,
hasLast: false
......@@ -106,9 +106,9 @@
},
watch: {
title() {
this.currentDay = 0
this.appointTime = now
this.currentDay = null
this.currentTime = null
this.appointTime = null
this.appointRange = ""
}
},
......
......@@ -8,11 +8,11 @@
</template>
<script>
import objMixin from './objMixin'
import arrMixin from './arrMixin'
export default {
name: 'XhRadio',
components: {},
mixins: [objMixin],
mixins: [arrMixin],
props: {},
filters:{},
data() {
......
......@@ -75,21 +75,14 @@
deep:true,
immediate: true,
},
// 'value'(val, oldVal){
// if(val){
// this.imgList = val.map(img =>{
// return {path:img}
// })
// }
// }
},
mounted() {
if(this.value){
this.imgList = this.value.map(img =>{
return {path: img}
return {path: img, src:img}
})
this.setValue()
}
this.setValue()
},
methods: {
selectUpload(){
......
......@@ -72,7 +72,7 @@
},
watch: {
specificationId(val, oldVal){
this.initComponent()
this.initComponent()
},
},
mounted() {
......
......@@ -33,7 +33,7 @@
<view>
<view v-if="showCountTime" class="bottom-left-view">
<view :class="['bottom-tag-view', {'timeout': timeout}]"><text>{{tagText}}</text></view>
<u-count-down :timestamp="timestamp" font-size="44"
<u-count-down :timestamp="timestamp" font-size="44" show-days
:color="timeout ? '#FA5A49' : '#FF930D'" @change="handleChange" ref="order-count-down"></u-count-down>
</view>
<view v-else-if="showTime">
......@@ -98,42 +98,12 @@
data() {
return {
timeout: false,
timestamp: 0,
timestamp: 0,
orderType: 0
};
},
computed: {
/*
orderStatus:
待接单 orderStatus<31 工单状态小于31
待预约 orderStatus == 31 and appointmentDatetime == null 工单状态等于30并且预约时间为空
待签到 orderStatus == 31 and appointmentDatetime is not null 工单状态等于30并且预约时间不为空
待完工 orderStatus >31 and orderStatus < 80 工单状态大于31 小于80
审核中 orderStatus ==85 or orderStatus == 87 工单状态 等于85 或者 等于有87
异常 orderStatus ==86 or orderStatus == 88 工单状态 等于86 或者 等于有88
已完工 orderStatus in(80,81,89,110) 工单状态 等于80 or 81 or 89 or 110
*/
orderText() { // 按钮文字
if (!this.orderType) {
if (this.orderData.orderStatus < 31) {
this.orderType = 0
} else if (this.orderData.orderStatus == 31) {
if (this.orderData.appointmentDatetime) {
return this.orderType = 2
} else {
this.orderType = 1
}
} else if (this.orderData.orderStatus > 31 && this.orderData.orderStatus < 80) {
this.orderType = 3
} else if (this.orderData.orderStatus == 85 && this.orderData.orderStatus == 87) {
this.orderType = 4
} else if (this.orderData.orderStatus == 86 && this.orderData.orderStatus == 88) {
this.orderType = 5
} else if ([80, 81, 89, 110].indexOf(this.orderData.orderStatus) != -1) {
this.orderType = 6
} else {
this.orderType = 0
}
}
return this.typeTexts[this.orderType]
},
buttonStyle() { // 按钮样式
......@@ -229,12 +199,43 @@
'exception': 5, // 异常单、
'finish': 6, //已完工
}
},
orderType() {
return this.types[this.type]
}
},
created() {
/*
orderStatus:
待接单 orderStatus<31 工单状态小于31
待预约 orderStatus == 31 and appointmentDatetime == null 工单状态等于30并且预约时间为空
待签到 orderStatus == 31 and appointmentDatetime is not null 工单状态等于30并且预约时间不为空
待完工 orderStatus >31 and orderStatus < 80 工单状态大于31 小于80
审核中 orderStatus ==85 or orderStatus == 87 工单状态 等于85 或者 等于有87
异常 orderStatus ==86 or orderStatus == 88 工单状态 等于86 或者 等于有88
已完工 orderStatus in(80,81,89,110) 工单状态 等于80 or 81 or 89 or 110
*/
if (!this.type) {
if (this.orderData.orderStatus < 31) {
this.orderType = 0
} else if (this.orderData.orderStatus == 31) {
if (this.orderData.appointmentDatetime) {
return this.orderType = 2
} else {
this.orderType = 1
}
} else if (this.orderData.orderStatus > 31 && this.orderData.orderStatus < 80) {
this.orderType = 3
} else if (this.orderData.orderStatus == 85 && this.orderData.orderStatus == 87) {
this.orderType = 4
} else if (this.orderData.orderStatus == 86 && this.orderData.orderStatus == 88) {
this.orderType = 5
} else if ([80, 81, 89, 110].indexOf(this.orderData.orderStatus) != -1) {
this.orderType = 6
} else {
this.orderType = 0
}
} else {
this.orderType = this.types[this.type]
}
this.timeout = this.orderData.currentOverTime < new Date().getTime()
this.timestamp = Math.round(Math.abs(this.orderData.currentOverTime - new Date().getTime()) / 1000)
},
......@@ -247,7 +248,6 @@
this.$emit('click')
},
handleChange(timestamp) {
console.log(timestamp)
if (this.timeout) this.$refs['order-count-down'].seconds += 2
if (timestamp == 0 && !this.timeout) {
setTimeout(()=> {
......
......@@ -32,11 +32,12 @@
<style lang="scss" scoped>
.content {
height: 100vh;
height: 100vh;
background-color: #f4f5f7;
padding: 0rpx 30rpx 0 30rpx;
overflow-y: auto;
&.fixed {
height: 100vh;
display: flex;
flex-direction: column;
}
......
......@@ -4,7 +4,7 @@
该组件仅用于拍照后返回图片,与业务不关联,目前最多一次可以拍10张图片
```
### 因为相机组件需要全屏展示,所以加载该组件需要在当前页面隐藏顶部导航栏和底部的TabBar
### 因为相机组件需要全屏展示,所以加载该组件需要在当前页面隐藏顶部导航栏,底部的TabBar以及其他页面元素
```
uni.hideTabBar()
```
......
......@@ -18,7 +18,7 @@
</view>
</view>
<!-- 订单推荐吸顶 -->
<u-sticky offset-top="60">
<u-sticky offset-top="0">
<view class="sticky">
<text>订单推荐</text>
</view>
......@@ -35,17 +35,24 @@
立即入驻
</u-button>
</view>
<view v-else-if="!needSettled && orderList.length > 0" class="order-item-view">
<view v-for="(item, index) in orderList" :key="index">
<OrderCell :orderData="item" type="waitAccept" :location="location" @click="handleClick(item.orderId)"
@action="handleAction(item.orderId)"> </OrderCell>
<template v-else>
<!-- 入驻成功之后无推荐订单 -->
<view v-if="orderList.length <= 0 && loadedOrder" class="no-order-view">
<NoOrder />
</view>
<u-loadmore :status="currentLoadStatus" bgColor="#f2f2f2"></u-loadmore>
</view>
<!-- 入驻成功之后无推荐订单 -->
<view v-else-if="!needSettled && orderList.length <= 0" class="no-order-view">
<NoOrder/>
</view>
<view v-else class="order-item-view">
<!-- <scroll-view scroll-y style="margin-bottom: 20rpx;" @scrolltolower="reachBottom"
scroll-anchoring> -->
<view v-for="(item, index) in orderList" :key="index">
<OrderCell :orderData="item" type="waitAccept" :location="location"
@click="handleClick(item.orderId)" @action="handleAction(item.orderId)">
</OrderCell>
</view>
<u-loadmore :status="currentLoadStatus" bgColor="#F4F5F7"></u-loadmore>
<!-- </scroll-view> -->
</view>
</template>
</view>
</view>
<!-- </view> -->
......@@ -60,7 +67,7 @@
<script>
import util from "@/utils/util.js";
import TabBarPage from "@/components/tabBarList/index.vue"
import TabBarPage from "@/components/tabBarList/index.vue"
import NoOrder from "@/components/order/noOrder.vue"
const app = getApp();
import OrderCell from "@/components/order/index.vue";
......@@ -68,7 +75,7 @@
export default {
components: {
OrderCell,
TabBarPage,
TabBarPage,
NoOrder
},
data() {
......@@ -78,23 +85,22 @@
title: false,
title: "Hello",
loaded: false,
loadedOrder: false,
needSettled: true,
count: 0, // 推荐订单数量
messageList: [],
loadStatus: ["more", "loading", "noMore"],
currentLoadStatus: "loading",
orderList: [],
search: {
token: "",
pageNumber: 0,
pageSize: 10,
pageSize: 100,
},
bottomLoading: false
};
},
watch: {
vuex_token(val, oldVal) {
// 监听token变化,如果更新则重新加载页面数据
// 监听token变化,如果更新则重新加载页面数据
console.log('', val, oldVal)
val && this.initSettleInfo()
}
......@@ -120,43 +126,47 @@
},
shouyeyouImage() {
return process.uniEnv.qn_base_url + 'shouyeyou.png'
},
weiruzhuImage() {
return process.uniEnv.qn_base_url + 'weiruzhu.png'
},
weiruzhuImage() {
return process.uniEnv.qn_base_url + 'weiruzhu.png'
},
},
onLoad() {
this.getOrderCount()
onLoad() {
this.getOrderCount()
},
onShow() {
// 每次进入页面都刷新入驻状态
if (this.vuex_token) {
this.initSettleInfo();
}
// else {
// // 初始化订单数据
// this.loadOrderList();
// }
},
onPullDownRefresh() {
console.log('------下拉刷新------')
// 下拉刷洗
this.initSettleInfo()
},
onReachBottom() {
console.log('----------底部-------------', this.currentLoadStatus)
if (this.currentLoadStatus != 'loadmore') return
this.currentLoadStatus == 'loading'
this.loadOrderList()
},
// onPageScroll(obj) {
// console.log('---------scroll---------', obj)
// },
methods: {
handleClick(orderId) { // 点击了cell
console.log('点击了cell')
console.log('点击了cell')
this.viewOderItem(orderId)
},
handleAction(orderId) { // 点击了按钮
console.log('点击了按钮')
this.viewOderItem(orderId)
},
viewOderItem(orderId) { // 跳转工单详情页面
uni.navigateTo({
url: 'pages/order/detail?id=' + orderId
})
},
viewOderItem(orderId) { // 跳转工单详情页面
uni.navigateTo({
url: 'pages/order/detail?id=' + orderId
})
},
async initSettleInfo() {
let self = this;
......@@ -165,15 +175,17 @@
if (result && result.record) {
vm.loaded = true;
vm.needSettled = result.needSettled;
vm.needSettled = false
vm.status = Number(result.record.status || '0');
// vm.status = 8
}
};
await app.getBaseInfo(self, callBack);
this.orderList = []
// 加载消息列表
self.loadMessageList();
self.search.pageNumber = 0
self.loadedOrder = false
self.loadOrderList();
},
loadMessageList() {
......@@ -193,14 +205,54 @@
},
loadOrderList() {
console.log('-----------准备加载推荐列表-----------')
this.search.pageNumber += 1
let self = this;
// 加载订单列表
self.search.token = self.vuex_token;
self.$u.api.listByRecommendOrder(self.search).then((res) => {
uni.stopPullDownRefresh() // 结束下拉刷新
self.loadedOrder = true
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
// if (res.data.list) {
// if (res.data.list.length == 0 && res.data.total > 0) {
// res.data.total = 15
// res.data.list = [{
// orderServiceType: '安装', // 服务类型:安装、维修
// categoryName: '充电桩', // 品类:充电桩
// orderBusinessTypeText: '分配单', // 业务类型:分配单、订单池
// orderNumber: 'OR2021041809827', // 工单编号
// contactName: '郭小清', // 客户信息
// contactPhone: '13631612077', // 联系方式
// contactAddress: '湾街道荔枝花园D座125号', // 详细地址
// contactAddressLatitud: '116.3896', // 联系人地址经度
// contactAddressLongitud: '39.91917', // 联系人地址纬度
// orderStatus: 0, // 工单状态
// appointmentDatetime: '', // 预约时间
// currentWillOverTime: 10000, // 剩余时间
// currentOverTime: new Date().getTime() + 10000, // 超过时间点
// auditDatetime: '2021.04.19 12:45:09', // 审核时间
// submissionTime: '2021.04.19 16:24:48', // 提交时间
// auditResults: {}, // 审核结果
// orderBusinessType: 'R', // 业务类型 R 为抢单
// orderId: '1100000216'
// }]
// res.data.list = [...res.data.list, ...res.data.list, ...res.data.list, ...res.data
// .list,
// ...res.data.list, ...res.data.list, ...res.data.list, ...res.data.list, ...
// res
// .data.list, ...res.data.list
// ]
// }
// }
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
if (res.code == 200) {
if (res.data && res.data.list && res.data.list.length > 0) {
if (res.data && res.data.list && res.data.list.length > 0) {
if (self.search.pageNumber == 1) {
self.orderList = []
}
self.orderList.push(...res.data.list);
self.currentLoadStatus = res.data.total > self.orderList.length ? 'loadmore' : 'nomore'
}
} else {
console.log(res.message, "初始化订单列表异常");
......@@ -210,29 +262,12 @@
onRestore() {
this.triggered = "restore";
},
reachBottom() {
console.log("-----bottom will-----");
if (this.bottomLoading || this.currentLoadStatus == this.loadStatus[2]) {
return;
}
console.log("-----bottom did-----");
this.bottomLoading = true;
setTimeout(() => {
// 加载更多数据
// ...
this.orderList.push(...[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]);
// 加载完成
this.currentLoadStatus = false /*是否还有*/ ?
this.loadStatus[1] :
this.loadStatus[2];
this.$nextTick(function() {
this.bottomLoading = false;
});
}, 1000);
},
// reachBottom() {
// console.log(this.currentLoadStatus)
// if (this.currentLoadStatus != 'loadmore') return
// this.currentLoadStatus == 'loading'
// this.loadOrderList()
// },
// clickSwiper(index) {},
handleScroll() {
console.log("-----scroll-------");
......@@ -276,29 +311,29 @@
});
}
},
// 获取订单数量
getOrderCount() {
var self = this; // 加载订单列表
self.$u.api.listOrderCount().then((res) => {
if (res.code == 200) {
console.log("===", res.data)
if (res.data) {
var count = 0
for (var i in res.data) {
count += res.data[i]
}
// 修改tab总数
uni.setTabBarBadge({
index: 1,
text: String(count)
})
}
} else {
console.log(res.message, "获取订单数量失败!");
}
});
},
// 获取订单数量
getOrderCount() {
var self = this; // 加载订单列表
self.$u.api.listOrderCount().then((res) => {
if (res.code == 200) {
console.log("===", res.data)
if (res.data) {
var count = 0
for (var i in res.data) {
count += res.data[i]
}
// 修改tab总数
uni.setTabBarBadge({
index: 1,
text: String(count)
})
}
} else {
console.log(res.message, "获取订单数量失败!");
}
});
},
},
};
</script>
......@@ -414,24 +449,26 @@
background-color: #ffffff;
border-radius: 12rpx;
min-height: 460rpx;
.tip-view-image {
width: 328rpx;
height: 200rpx;
margin-top: 30rpx;
.tip-view-image {
width: 328rpx;
height: 200rpx;
margin-top: 30rpx;
}
.tip-other {
font-size: 28rpx;
color: #333333;
margin-bottom: 20rpx;
}
.settle-button {
}
.settle-button {}
}
.order-item-view {
background-color: #F4F5F7;
border-radius: 12rpx;
border-radius: 12rpx;
margin-bottom: 20rpx;
}
}
}
......
......@@ -77,13 +77,22 @@
</scroll-view>
</view>
<view class="btn-wrap flex-xc">
<u-button class="btn-submit" @click="nextStep" :custom-style="buttonStyle"
<u-button class="btn-submit" @click="saveComplete"
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
暂存
</u-button>
<u-button class="btn-submit" @click="nextStep" v-if="tabIndex===list.length - 1"
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
交付
</u-button>
<u-button class="btn-submit" @click="nextStep" :custom-style="buttonStyle" v-else
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
下一步
</u-button>
</view>
</view>
<take-photo v-else @close="closeTake"></take-photo>
<u-toast ref="uToast" />
</view>
</template>
<script>
......@@ -176,12 +185,13 @@
if (option) {
this.orderId = option.orderId
this.categoryId = option.categoryId
this.orderServiceType = option.orderServiceType
this.orderServiceType = decodeURIComponent(option.orderServiceType)
} else {
this.orderId = 9708719
this.categoryId = 88
this.orderServiceType = '安装'
}
this.getCompleteData()
},
onReady() {
this.$refs.uForm.setRules(this.rules);
......@@ -192,18 +202,6 @@
//console.log(this.form.name, 'form.name')
},
computed: {
getCompleteData() {
let self = this
if(self.orderId){
self.$u.api.getCompleteConfigAndData(self.orderId).then((res) => {
if (res.code == 200) {
self.list = res.data.config
} else {
console.log(res.message, "获取订单详情失败!");
}
});
}
},
mixingImage() {
return process.uniEnv.qn_base_url + 'mixing.png'
},
......@@ -226,6 +224,51 @@
}
},
methods: {
getCompleteData() {//获取工单配置的完工项目
let self = this
if(self.orderId){
self.$u.api.getCompleteConfigAndData(self.orderId).then((res) => {
if (res.code == 200) {
self.list = res.data.config
self.form = res.data.value
} else {
console.log(res.message, "获取订单完工项目失败!");
}
});
}
},
saveComplete(){// 保存完工信息
let self = this
let param = {}
self.list.forEach((panel)=>{
param[panel.panelFieldsName] = []
panel.items.forEach((group) =>{
group.items.forEach((ele)=>{
if(self.form[ele.fieldsName]){
param[panel.panelFieldsName].push({
"fieldsName": ele.fieldsName,
"fieldsType": ele.fieldsType,
"fieldsValue": self.form[ele.fieldsName],
"required": ele.required,
})
}
})
})
})
self.$u.api.saveCompleteData(param,self.orderId).then((res)=>{
if (res.code == 200) {
this.$refs.uToast.show({
title: '保存成功',
type: 'success',
})
} else {
this.$refs.uToast.show({
title: res.message,
type: 'error',
})
}
})
},
getTakeStatus(event) {
this.takeStatus = event.status
this.fileIndex = event.index.toString()
......@@ -260,10 +303,9 @@
}else{
this.$set(this.form,innerItem.fieldsName,data.value)
}
console.log(this.form, 'this.form')
},
nextStep() {
if (this.tabIndex < this.list.length) {
if (this.tabIndex < this.list.length - 1) {
this.tabIndex++
this.arr = []
this.$nextTick(function() {
......@@ -600,5 +642,15 @@
.btn-wrap {
width: 100%;
padding: 20rpx 0 40rpx 0;
display: flex;
justify-content: center;
align-items: center;
}
.btn-save {
color: #FFFFFF;
background-color: #2272FF;
font-size: 32rpx;
font-weight: bold;
}
</style>
......@@ -44,18 +44,20 @@
<view v-else class="order-item-more">
<view class="line-view"></view>
<view class="order-cell between-cell">
<text>品牌:</text>
<text class="cell-title">品牌:</text>
<text>{{ order.brandName }}</text>
</view>
<view class="order-cell between-cell">
<text>数量:</text>
<text class="cell-title">数量:</text>
<text>x{{ order.orderProductCount }}</text>
</view>
<view class="order-cell between-cell">
<text>充电桩信息:</text>
<text class="cell-title">充电桩信息:</text>
<text>{{ order.serviceContent }}</text>
</view>
<!-- <view class="order-cell between-cell">
<!-- <view class="order-cell between-cell">
<text>备注:</text>
<text>{{ order.serviceContent }}</text>
</view> -->
......@@ -765,6 +767,7 @@
.order-item-more {
font-size: 26rpx;
color: #333333;
text-align: right;
.line-view {
background-color: #F4F5F7;
height: 2rpx;
......@@ -954,7 +957,7 @@
color: #333333;
line-height: 48rpx;
margin-bottom: 10rpx;
text-align: left;
}
.between-cell {
......@@ -962,4 +965,8 @@
justify-content: space-between;
align-items: flex-start;
}
.cell-title {
text-align: left;
flex-shrink: 0;
}
</style>
......@@ -3,27 +3,14 @@
<view class="feedback-box bg">
<u-navbar back-icon-color="#FFFFFF" :background="background" title="过程反馈" titleColor="#FFFFFF" :border-bottom="false"></u-navbar>
<view class="content u-p-l-30 u-p-r-30">
<!-- <view class="width-320 u-m-t-20">
<u-subsection
:bold="false"
:current="curSub"
:list="subList"
active-color="white"
bg-color="white"
height="72"
inactive-color="#666"
button-color="#2272FF"
border-radius="36"
></u-subsection>
</view> -->
<view class="top-tab">
<u-tabs
:list="tabList"
<u-tabs
:list="options"
:current="curTab"
height="60"
gutter="89"
bar-height="4"
bar-width="44"
bar-height="4"
bar-width="44"
bg-color="none"
active-color="#FFFFFF"
inactive-color="#DEDEDE"
......@@ -32,41 +19,47 @@
@change="changeTab"
></u-tabs>
</view>
<!-- <view class="con-box">
</view> -->
<view class="content-view">
<view class="con-box">
<view class="title">{{feedback.own.title}}</view>
<view class="u-flex u-flex-wrap">
<view
v-for="(item, index) in options[curTab]"
:key="index"
@click="changeOwn(index)"
:class="{'txt-item':true,'active': (trace.reasonRelegation == index)}">
<text class="txt">{{item}}</text>
<view class="con-box">
<view class="title">{{ traceTitles[0] }}</view>
<view class="u-flex u-flex-wrap">
<view
v-for="(item, index) in options[curTab]['owns']"
:key="index"
@click="changeOwn(index, item.name, item.types)"
:class="{ 'txt-item': true, active: curOwn == index }"
>
<text class="txt">{{ item.name }}</text>
</view>
</view>
</view>
<u-gap height="30"></u-gap>
<view class="title">{{feedback.type.title}}</view>
<view class="u-flex u-flex-wrap">
<view
v-for="(txt, index) in options[curTab][trace.reasonRelegation]"
:key="index"
@click="changeType(txt)"
:class="{'txt-item':true,'active': (trace.reason == txt)}" style="width: 306rpx;margin-right: 18rpx">
<text class="txt">{{txt}}</text>
<u-gap height="30"></u-gap>
<view class="title">{{ traceTitles[1] }}</view>
<view class="u-flex u-flex-wrap">
<view
v-for="(txt, index) in options[curTab]['owns'][curOwn]['types']"
:key="index"
@click="changeType(index, txt)"
:class="{ 'txt-item': true, active: trace.reason == txt }"
style="width: 306rpx;margin-right: 18rpx"
>
<text class="txt">{{ txt }}</text>
</view>
</view>
<view class="input-view" v-show="showRemark">
<u-input v-model="trace.remark" class="textarea" height="156" type="textarea" placeholder="请补充详细说明,以便于记录您的接单信用分"></u-input>
</view>
</view>
<view class="input-view" v-show="showRemark">
<u-input v-model="trace.remark" class="textarea" height="156" type="textarea" placeholder="请补充详细说明,以便于记录您的接单信用分"></u-input>
<view class="time-view">
<appoint-time
:dateList="dateList"
:title="appointTitle"
:timeList="timeList"
@dateChange="dateChange"
@timeChange="timeChange"
@weekChange="weekChange"
></appoint-time>
</view>
</view>
<view class="time-view">
<appoint-time :dateList="dateList" :title="appointTitle" :timeList="timeList" @dateChange="dateChange" @timeChange="timeChange" @weekChange="weekChange"></appoint-time>
</view>
</view>
</view>
<view class="bottom-view">
<button class="btn, bottom-btn" @click="submitForm" :loading="submiting" :disabled="disabledSubmit"><text class="button-text">确定</text></button>
......@@ -75,425 +68,436 @@
</template>
<script>
let now = new Date(new Date().toLocaleDateString()).getTime()
import appointTime from '@/components/appoint/appoint-time.vue'
export default {
data() {
return {
orderId: null,
categoryId: null,
showRemark: false,
submiting: false,
dateList: [
{day: now, timeRange: []},
{day: now + (1*86400000), timeRange: []},
{day: now + (2*86400000), timeRange: []},
{day: now + (3*86400000), timeRange: []},
{day: now + (4*86400000), timeRange: []},
{day: now + (5*86400000), timeRange: []},
{day: now + (6*86400000), timeRange: []},
],
timeList: [
{"name":"06:00-08:00","pkey":"appointment_range_8","disabled":false},
{"name":"08:00-10:00","pkey":"appointment_range_10","disabled":false},
{"name":"10:00-12:00","pkey":"appointment_range_12","disabled":false},
{"name":"12:00-14:00","pkey":"appointment_range_14","disabled":false},
{"name":"14:00-16:00","pkey":"appointment_range_16","disabled":false},
{"name":"16:00-18:00","pkey":"appointment_range_18","disabled":false},
{"name":"18:00-20:00","pkey":"appointment_range_20","disabled":false},
{"name":"20:00-22:00","pkey":"appointment_range_22","disabled":false},
{"name":"22:00-24:00","pkey":"appointment_range_24","disabled":false}
],
background: {
backgroundColor: 'none',
},
tabList: [{name: '报单'}, {name: '改约'}],
curTab: 0,
feedback: {
own:{
title:'问题归属',
},
type:{
title:'问题类型',
},
},
appoint:{
'报单': '下次联系时间',
'改约': '预约时间',
},
config: null,
options: [],
trace: {
reasonType: '报单', // 反馈类型
reasonRelegation: '', // 反馈归属
reason: '', // 反馈原因
appointmentDatetime: null, // 预约时间
appointmentDatetimeRange: '', // 预约时间段类型
nextTraceDatetime: '', // 下次跟踪时间
remark: '', // 备注
let now = new Date(new Date().toLocaleDateString()).getTime();
import appointTime from '@/components/appoint/appoint-time.vue';
export default {
data() {
return {
orderId: null,
categoryId: null,
background: {
backgroundColor: 'none'
},
feedback: null,
options: [
{
name: '报备',
owns: [
{
name: '客户',
types: ['等客户报装电表', '等客户与物业沟通', '等客户改造电源', '客户不确定安装时间', '等客户通知安装时间', '客户电话未打通', '客户反馈暂不安装']
},
{ name: '个人', types: [] },
{ name: '客观', types: [] }
]
},
appointTitle: "预约时间",
num: 0,
};
},
components:{
appointTime
},
watch: {
vuex_token(val) {
this.initPageData()
{ name: '改约', owns: [{ name: '客户', types: ['有事耽搁', '未带齐工具', '个人改约', '其他'] }, { name: '个人', types: [] }, { name: '客观', types: [] }] }
],
dateList: [
{ day: now, timeRange: [] },
{ day: now + 1 * 86400000, timeRange: [] },
{ day: now + 2 * 86400000, timeRange: [] },
{ day: now + 3 * 86400000, timeRange: [] },
{ day: now + 4 * 86400000, timeRange: [] },
{ day: now + 5 * 86400000, timeRange: [] },
{ day: now + 6 * 86400000, timeRange: [] }
],
timeList: [
{ name: '06:00-08:00', pkey: 'appointment_range_8', disabled: false },
{ name: '08:00-10:00', pkey: 'appointment_range_10', disabled: false },
{ name: '10:00-12:00', pkey: 'appointment_range_12', disabled: false },
{ name: '12:00-14:00', pkey: 'appointment_range_14', disabled: false },
{ name: '14:00-16:00', pkey: 'appointment_range_16', disabled: false },
{ name: '16:00-18:00', pkey: 'appointment_range_18', disabled: false },
{ name: '18:00-20:00', pkey: 'appointment_range_20', disabled: false },
{ name: '20:00-22:00', pkey: 'appointment_range_22', disabled: false },
{ name: '22:00-24:00', pkey: 'appointment_range_24', disabled: false }
],
traceTitles: ['问题归属', '问题类型'],
appointTitle: '预约时间',
appoint: ['下次联系时间', '预约时间'],
trace: {
reasonType: '报单', // 反馈类型
reasonRelegation: '', // 反馈归属
reason: '', // 反馈原因
appointmentDatetime: null, // 预约时间
appointmentDatetimeRange: '', // 预约时间段类型
nextTraceDatetime: '', // 下次跟踪时间
remark: '' // 备注
},
dateItem: null,
timeItem: null,
showRemark: false,
submiting: false,
curTab: 0,
curOwn: 0,
num: 0
};
},
components: {
appointTime
},
watch: {
vuex_token(val) {
this.initPageData();
}
},
computed: {
disabledSubmit() {
let self = this;
if (self.trace.reasonType && self.trace.reasonType == '报备') {
if (self.trace.reasonRelegation && self.trace.reason && self.trace.nextTraceDatetime && self.trace.appointmentDatetimeRange) {
return false;
}
} else if (self.trace.reasonType && self.trace.reasonType == '改约') {
if (self.trace.reasonRelegation && self.trace.reason && self.trace.appointmentDatetime && self.trace.appointmentDatetimeRange) {
return false;
}
}
return true;
}
},
async onLoad(e) {
this.orderId = 1;
this.categoryId = 88;
if (e) {
this.orderId = e.orderId || null;
this.categoryId = e.categoryId || null;
}
uni.showLoading({
title: '数据加载中',
mask: true
});
await this.initPageData();
},
methods: {
/* 初始化页面数据 */
async initPageData() {
let self = this;
await Promise.all([self.loadCalendar(), self.loadTimerange()]);
let params = { categoryId: self.categoryId };
let res = await self.$u.api.feedbackConfig(params);
if (res && res.code == 200) {
self.feedback = res.data;
self.buildConfig();
}
uni.hideLoading();
},
computed: {
disabledSubmit() {
let self = this
if(self.trace.reasonType && self.trace.reasonType == '报备'){
if(self.trace.reasonRelegation && self.trace.reason
&& self.trace.nextTraceDatetime && self.trace.appointmentDatetimeRange) {
return false
/* 组装数据项参数 */
buildConfig() {
let self = this;
if (self.feedback) {
let tabs = Object.keys(self.feedback);
let tabVals = Object.values(self.feedback);
let configs = [];
tabs.forEach(function(tab, index) {
let row = tabVals[index];
let owns = Object.keys(row);
let ownVals = Object.values(row);
configs[index] = { name: tab, owns: [] };
if(tab == '改约') {
self.appoint[index] = '预约时间'
} else if(tab == '报备') {
self.appoint[index] = '下次联系时间'
}
} else if(self.trace.reasonType && self.trace.reasonType == '改约') {
if(self.trace.reasonRelegation && self.trace.reason
&& self.trace.appointmentDatetime && self.trace.appointmentDatetimeRange) {
return false
}
}
owns.forEach(function(own, key) {
configs[index]['owns'][key] = { name: own, types: ownVals[key] };
});
});
return true
},
},
async onLoad(e) {
this.orderId = 1
this.categoryId = 88
if(e) {
this.orderId = e.orderId || null
this.categoryId = e.categoryId || null
// 数组改写需要刷新绑定数据
self.options = configs;
this.initParams()
}
uni.showLoading({
title: "数据加载中",
mask: true
})
await this.initPageData()
},
methods: {
/* 初始化页面数据 */
async initPageData() {
let self = this
let params = {categoryId: self.categoryId}
let pse = await Promise.all([self.$u.api.feedbackConfig(params), self.loadCalendar(), self.loadTimerange()])
let res = pse[0]
if(res && res.code == 200) {
self.config = res.data
self.initParams()
self.buildConfig()
}
uni.hideLoading()
},
/* 组装参数 */
buildConfig() {
let self = this
if(self.config) {
let tabs = Object.keys(self.config)
let list = Object.values(self.config)
tabs.forEach(function(tab, index){
self.tabList[index] = {name: tab}
self.options[index] = list[index]
})
}
},
/* 初始化参数 */
initParams() {
let self = this
if(self.config) {
let tabs = Object.keys(self.config)
let list = Object.values(self.config)
let relegation = Object.keys(list[self.curTab])[0]
let types = Object.values(list[self.curTab][relegation])
self.trace.reasonType = tabs[self.curTab]
self.trace.reasonRelegation = relegation
self.trace.reason = types[0]
if(self.trace.reasonType == '改约') {
self.showRemark = true
self.appointTitle = '预约时间'
if(self.dateList && self.timeList) {
self.timeList.map((item, index) => {
if(self.dateList.indexOf(item.pkey) > -1) {
item.disabled = true
} else {
item.disabled = false
}
})
}
} else {
self.showRemark = false
self.trace.remark = ''
self.appointTitle = '下次联系时间'
/* 初始化参数 */
initParams() {
let self = this;
if (self.options) {
let tabList = self.options[self.curTab]
self.trace.reasonType = tabList.name;
self.trace.reasonRelegation = tabList['owns'][self.curOwn].name;
self.trace.reason = tabList['owns'][self.curOwn]['types'][0];
self.appointTitle = self.appoint[self.curTab]
self.trace.remark = '';
if (self.trace.reasonType == '改约') {
self.showRemark = true;
if (self.dateList && self.timeList) {
self.timeList.map((item, index) => {
item.disabled = false
})
if (self.dateItem
&& self.dateItem.timeRange.indexOf(item.pkey) > -1) {
item.disabled = true;
} else {
item.disabled = false;
}
});
}
} else {
self.showRemark = false;
self.timeList.map((item, index) => {
item.disabled = false;
});
}
},
/* 加载日历数据 */
async loadCalendar() {
let self = this
let params = {
num: this.num
}
let res = await this.$u.api.workerCalendar(params)
if(res && res.code == 200) {
self.dateList = res.data
}
},
/* 加载预约时间段 */
async loadTimerange() {
let self = this
let res = await this.$u.api.openTimerange()
if(res && res.code == 200) {
let list = res.data
list.map((item, index) => {
item.disabled = false
})
self.timeList = list
}
},
/* 加载日历数据 */
async loadCalendar() {
let self = this;
let res = await this.$u.api.workerCalendar({num: this.num});
if (res && res.code == 200) {
self.dateList = res.data;
}
},
/* 加载预约时间段 */
async loadTimerange() {
let self = this;
let res = await this.$u.api.openTimerange();
if (res && res.code == 200) {
let list = res.data;
list.map((item, index) => {
item.disabled = false;
});
self.timeList = list;
}
},
/**
* 切换tab项
*/
changeTab(index) {
this.curTab = index;
this.initParams();
},
changeOwn(index, own, types) {
let self = this;
self.curOwn = index;
self.trace.reasonRelegation = own;
self.trace.reason = types[0];
},
changeType(index, type) {
this.trace.reason = type;
},
weekChange(data) {
// 点击下一周
console.log(data, 'week-data');
if (data && data.time) {
let num = data.num;
let time = data.time;
this.num = num;
if (num == 0) {
this.loadCalendar();
} else {
this.loadCalendar();
}
},
/**
* 切换tab项
*/
changeTab(index) {
this.curTab = index;
this.initParams()
},
changeOwn(key) {
let self = this
self.trace.reasonRelegation = key
self.trace.reason = self.options[self.curTab][key][0]
},
changeType(key) {
this.trace.reason = key
},
weekChange(data){
// 点击下一周
console.log(data,'week-data')
if (data && data.time) {
let num = data.num
let time = data.time
this.num = num
if (num == 0) {
this.loadCalendar()
}
},
dateChange(data) {
// 点击日期选择
console.log(data, 'week-data');
let self = this;
self.dateItem = data.item
if (self.trace.reasonType == '报备') {
self.trace.appointmentDatetime = null;
self.trace.nextTraceDatetime = data.item.day;
self.timeList.map((item, index) => {
item.disabled = false;
});
} else if (self.trace.reasonType == '改约') {
self.trace.appointmentDatetime = data.item.day;
self.trace.nextTraceDatetime = null;
self.timeList.map((item, index) => {
if (data.item.timeRange.indexOf(item.pkey) > -1) {
item.disabled = true;
} else {
this.loadCalendar()
item.disabled = false;
}
}
},
dateChange(data){
// 点击日期选择
console.log(data,'week-data')
let self = this
if(self.trace.reasonType == '报备') {
self.trace.appointmentDatetime = null
self.trace.nextTraceDatetime = data.item.day
self.timeList.map((item, index) => {
item.disabled = false
})
} else if(self.trace.reasonType == '改约') {
self.trace.appointmentDatetime = data.item.day
self.trace.nextTraceDatetime = null
self.timeList.map((item, index) => {
if(data.item.timeRange.indexOf(item.pkey) > -1) {
item.disabled = true
} else {
item.disabled = false
}
})
}
},
timeChange(data){
// 时间段选择变化
console.log(data,'week-data')
this.trace.appointmentDatetimeRange = data.item
},
async submitForm() {
let self = this
self.orderId = 666
if(!self.orderId) {
uni.showToast({
icon:error,
title:"工单ID不能为空"
})
return false
}
self.submiting = true
let res = await self.$u.api.traceAndAppointment(self.trace, self.orderId)
self.submiting = false
},
});
}
self.trace.appointmentDatetimeRange = '';
},
timeChange(data) {
// 时间段选择变化
console.log(data, 'week-data');
this.trace.appointmentDatetimeRange = data.item.pkey;
this.timeItem = data.item
},
async submitForm() {
let self = this;
self.orderId = 666;
if (!self.orderId) {
uni.showToast({
icon: error,
title: '工单ID不能为空'
});
return false;
}
self.submiting = true;
let res = await self.$u.api.traceAndAppointment(self.trace, self.orderId);
self.submiting = false;
}
}
};
</script>
<style lang="scss">
.bg {
width: 750rpx;
height: 100vh;
overflow: auto;
background-color: #F4F5F7;
background-image: linear-gradient(to top, #F4F5F7 0%, #2272FF 50%);
background-size: 750rpx 600rpx;
background-repeat: no-repeat;
}
.feedback-box {
.bg {
width: 750rpx;
height: 100vh;
overflow: auto;
background-color: #f4f5f7;
background-image: linear-gradient(to top, #f4f5f7 0%, #2272ff 50%);
background-size: 750rpx 600rpx;
background-repeat: no-repeat;
}
.feedback-box {
display: flex;
flex-direction: column;
.header {
padding: 12rpx 30rpx 40rpx 30rpx;
display: flex;
flex-direction: column;
.header {
padding: 12rpx 30rpx 40rpx 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
.title {
font-size: 40rpx;
font-weight: bold;
color: #FFFFFF;
}
justify-content: space-between;
align-items: center;
.title {
font-size: 40rpx;
font-weight: bold;
color: #ffffff;
}
}
/deep/ .u-subsection{
padding:4rpx!important;
}
.top-tab{
text-align: center;
}
.content {
display: flex;
flex-direction: column;
overflow: hidden;
margin-bottom: 188rpx;
.content-view {
height: 100%;
}
/deep/ .u-subsection {
padding: 4rpx !important;
}
.top-tab {
text-align: center;
}
.content {
display: flex;
flex-direction: column;
overflow: hidden;
margin-bottom: 188rpx;
.content-view {
height: 100%;
border-radius: 12rpx;
overflow: auto;
margin-top: 30rpx;
.time-view {
border-radius: 12rpx;
overflow: auto;
margin-top:30rpx;
.time-view {
border-radius: 12rpx;
background-color: #FFFFFF;
padding-bottom: 20rpx;
}
background-color: #ffffff;
padding-bottom: 20rpx;
}
}
.bottom-view {
position: fixed;
bottom: 44rpx;
width: 100%;
}
.bottom-view {
position: fixed;
bottom: 44rpx;
width: 100%;
}
.bottom-btn {
height: 104rpx;
width: 600rpx;
display: flex;
align-items: center;
justify-content: center;
.button-text {
font-size: 32rpx;
font-weight: bold;
}
.bottom-btn {
height: 104rpx;
width: 600rpx;
display: flex;
align-items: center;
justify-content: center;
.button-text {
font-size: 32rpx;
font-weight: bold;
}
}
.con-box {
padding: 30rpx 30rpx 8rpx 30rpx;
border-radius: 12rpx;
background-color: #ffffff;
.title {
font-weight: bold;
font-size: 32rpx;
line-height: 32rpx;
color: #333;
}
.con-box{
padding: 30rpx 30rpx 8rpx 30rpx;
border-radius: 12rpx;
background-color: #FFFFFF;
.title{
font-weight: bold;
font-size: 32rpx;
line-height: 32rpx;
color: #333;
}
&>.u-flex{
margin-top:40rpx;
margin-right:-24rpx;
.txt-item{
border-radius: 12rpx;
padding:24rpx 24rpx;
width: 196rpx;
height: 72rpx;
text-align: center;
margin-right: 22rpx;
margin-bottom: 20rpx;
background-color: #F4F5F7;
&.active{
background-color: #2272FF;
.txt{
color: #fff;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
& > .u-flex {
margin-top: 40rpx;
margin-right: -24rpx;
.txt-item {
border-radius: 12rpx;
padding: 24rpx 38rpx;
width: 196rpx;
height: 72rpx;
text-align: center;
margin-right: 22rpx;
margin-bottom: 20rpx;
background-color: #f4f5f7;
&.active {
background-color: #2272ff;
.txt {
color: #fff;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
}
.txt{
display:block;
font-size: 26rpx;
line-height: 26rpx;
color: #333;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.input-view {
margin-bottom: 24rpx;
}
.textarea{
/deep/ .u-input{
textarea{
margin-top:20rpx;
border: 2rpx solid #ECECEC;
padding:18rpx 30rpx;
}
}
}
}
.btn{
padding:30rpx;
border-radius: 52rpx;
line-height: 44rpx;
font-size:32rpx;
text-align: center;
background-color: #2272FF;
color:#fff;
&::after{
content:'';
height:0;
border: none;
}
.txt {
display: block;
font-size: 26rpx;
line-height: 26rpx;
color: #333;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
button[disabled]:not([type]) {
background: #D1D4D4;
color: #FFFFFF;
.input-view {
margin-bottom: 24rpx;
}
.btn{
padding:30rpx;
border-radius: 52rpx;
line-height: 44rpx;
font-size:32rpx;
text-align: center;
background-color: #2272FF;
color:#fff;
&::after{
content:'';
height:0;
.textarea {
/deep/ .u-input {
textarea {
margin-top: 20rpx;
border: 2rpx solid #ececec;
padding: 18rpx 30rpx;
}
}
}
.width-320{
width:320rpx;
}
.btn {
padding: 30rpx;
border-radius: 52rpx;
line-height: 44rpx;
font-size: 32rpx;
text-align: center;
background-color: #2272ff;
color: #fff;
&::after {
content: '';
height: 0;
border: none;
}
}
button[disabled]:not([type]) {
background: #d1d4d4;
color: #ffffff;
}
.btn {
padding: 30rpx;
border-radius: 52rpx;
line-height: 44rpx;
font-size: 32rpx;
text-align: center;
background-color: #2272ff;
color: #fff;
&::after {
content: '';
height: 0;
}
}
.width-320 {
width: 320rpx;
}
</style>
......@@ -176,6 +176,7 @@
},
reachBottom(e) {
console.log('-------底部-------', this.loadStatus)
if (this.loadStatus != 'loadmore') return
this.loadStatus == 'loading'
this.getOrderList(this.currentIndex)
......@@ -194,6 +195,40 @@
var self = this;
self.$u.api.listOrder(param).then((res) => {
if (res.code == 200) {
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
// res.data.type = self.orderType
// if (res.data.list) {
// if (res.data.list.length == 0 && res.data.total > 0) {
// res.data.total = 15
// res.data.list = [{
// orderServiceType: '安装', // 服务类型:安装、维修
// categoryName: '充电桩', // 品类:充电桩
// orderBusinessTypeText: '分配单', // 业务类型:分配单、订单池
// orderNumber: 'OR2021041809827', // 工单编号
// contactName: '郭小清', // 客户信息
// contactPhone: '13631612077', // 联系方式
// contactAddress: '湾街道荔枝花园D座125号', // 详细地址
// contactAddressLatitud: '116.3896', // 联系人地址经度
// contactAddressLongitud: '39.91917', // 联系人地址纬度
// orderStatus: 0, // 工单状态
// appointmentDatetime: '', // 预约时间
// currentWillOverTime: 10000, // 剩余时间
// currentOverTime: new Date().getTime() + 10000, // 超过时间点
// auditDatetime: '2021.04.19 12:45:09', // 审核时间
// submissionTime: '2021.04.19 16:24:48', // 提交时间
// auditResults: {}, // 审核结果
// orderBusinessType: 'R', // 业务类型 R 为抢单
// orderId: '1100000216'
// }]
// res.data.list = [...res.data.list, ...res.data.list, ...res.data.list, ...res.data
// .list,
// ...res.data.list, ...res.data.list, ...res.data.list, ...res.data.list, ...
// res
// .data.list, ...res.data.list
// ]
// }
// }
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
// 后台需要返回type,防止数据返回延迟期间点击了其他的tab
if (res.data.type != self.orderType) return
self.triggered = false;
......@@ -228,7 +263,7 @@
item.count = res.data.toCheckinCount
} else if (item.name === '待完工') {
item.count = res.data.toFinishCount
} else if (item.name === '待审核') {
} else if (item.name === '审核中') {
item.count = res.data.reviewingCount
} else if (item.name === '异常单') {
item.count = res.data.exceptionCount
......
......@@ -39,7 +39,7 @@ uploader.getQnToken = function(params) {
*region: 地区 默认为:ECN
*/
resolve({
visitPrefix: data.host || '',
visitPrefix: data.host || globalUrl.qn_asset_url,
token: data.token || '',
folderPath: data.folderPath || '',
region: "ECN"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment