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()
```
......
This diff is collapsed.
......@@ -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>
This diff is collapsed.
......@@ -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