Commit 04b2589d authored by 李超鹏's avatar 李超鹏

完工调试

parent 2a6ebb23
......@@ -110,6 +110,15 @@ let orderApiFun = function(vm){
* 保存售后记录
*/
let saveCompleteData = async (params = {},orderId) => await vm.$u.post(prefix+ vm.vuex_token+'/order/'+ orderId +'/maintain/saveMaintainInfoV2', params);
/**
* 保内工单完工
*/
let inOrderFinish = async (orderId) => await vm.$u.post(prefix + vm.vuex_token+'/order/'+ orderId +'/finishedAndConfirm',{}, {'content-type': 'application/x-www-form-urlencoded'});
/**
* 保外工单完工
*/
let outOrderFinish = async (params = {},orderId) => await vm.$u.post(prefix + vm.vuex_token+'/order/'+ orderId +'/v1/finishedAndConfirmOutGuaranteePeriod', params, {'content-type': 'application/x-www-form-urlencoded'});
const orderApi = {
listByRecommendOrder,
......@@ -134,7 +143,9 @@ let orderApiFun = function(vm){
getSignDistance,
getCompleteConfigAndData,
getMeasure,
saveCompleteData
saveCompleteData,
inOrderFinish,
outOrderFinish
}
return orderApi
}
......
......@@ -81,7 +81,7 @@
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
暂存
</u-button>
<u-button class="btn-submit" @click="nextStep" v-if="tabIndex===list.length - 1"
<u-button class="btn-submit" @click="orderFinish" v-if="tabIndex===list.length - 1"
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
交付
</u-button>
......@@ -116,6 +116,7 @@
orderId:0,
categoryId:0,
orderServiceType:'',
inGuaranteePeriod:'',
list: [],
tabIndex: 0,
scrollTop: 0, //tab标题的滚动条位置
......@@ -186,10 +187,12 @@
this.orderId = option.orderId
this.categoryId = option.categoryId
this.orderServiceType = decodeURIComponent(option.orderServiceType)
this.inGuaranteePeriod = option.inGuaranteePeriod
} else {
this.orderId = 9708719
this.categoryId = 88
this.orderServiceType = '安装'
this.inGuaranteePeriod = 'Y'
}
this.getCompleteData()
},
......@@ -269,6 +272,18 @@
}
})
},
orderFinish(){
let self = this
if(self.inGuaranteePeriod === 'Y'){
self.$u.api.inOrderFinish(self.orderId).then((res)=>{
console.log(res)
})
}else{
self.$u.api.outOrderFinish({customerPayType:'CASH'}, self.orderId).then((res)=>{
console.log(res)
})
}
},
getTakeStatus(event) {
this.takeStatus = event.status
this.fileIndex = event.index.toString()
......
......@@ -538,6 +538,7 @@
url: 'pages/order/complete?orderId='+this.order.orderId
+ "&categoryId=" + this.order.categoryId
+ "&orderServiceType=" + this.order.orderServiceType
+ "&inGuaranteePeriod=" + this.order.inGuaranteePeriod
})
},
rejectOrder() { // 拒单
......
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