|
|
@ -68,9 +68,12 @@ |
|
|
|
|
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
<div class="new_bot_box" v-if="datacontent.requestStatus==5"> |
|
|
|
<div class="new_bot_box"> |
|
|
|
<view class="new_btn_bot bot_pos uni-flex"> |
|
|
|
<button class="new_save_btn " style="width: 100%;" @click="cancle()">取消</button> |
|
|
|
<button v-if="datacontent.requestStatus==1||datacontent.requestStatus==5" class="new_save_btn " |
|
|
|
style="width: 100%; margin-right: 10rpx;" @click="cancel()">取消</button> |
|
|
|
<button v-if="datacontent.requestStatus==9" class="new_save_btn " |
|
|
|
style="width: 100%; margin-left: 10rpx;" @click="finish()">完成</button> |
|
|
|
</view> |
|
|
|
</div> |
|
|
|
<comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage> |
|
|
@ -80,7 +83,8 @@ |
|
|
|
<script> |
|
|
|
import { |
|
|
|
getThirdLocationRequestDetail, |
|
|
|
thirdLocationRequestCancle |
|
|
|
thirdLocationRequestFinish, |
|
|
|
thirdLocationRequestCancel |
|
|
|
} from '@/api/index.js'; |
|
|
|
import { |
|
|
|
showConfirmMsg, |
|
|
@ -157,48 +161,57 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
cancle() { |
|
|
|
showConfirmMsg("是否确认取消?", callback => { |
|
|
|
finish() { |
|
|
|
showConfirmMsg("是否确认完成?", callback => { |
|
|
|
if (callback) { |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中", |
|
|
|
mask: true |
|
|
|
}) |
|
|
|
thirdLocationRequestCancle(this.datacontent.id).then(res => { |
|
|
|
thirdLocationRequestFinish(this.datacontent.id).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
uni.showToast({ |
|
|
|
title:"取消成功" |
|
|
|
}) |
|
|
|
navigateBack(1) |
|
|
|
if (res.error) { |
|
|
|
this.showMessage("完成失败" + res.error.message) |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: "完成成功" |
|
|
|
}) |
|
|
|
navigateBack(1) |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showMessage("取消失败" + error) |
|
|
|
this.showMessage("完成失败" + error) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
async finsh() { |
|
|
|
uni.showLoading({ |
|
|
|
title: "提交中", |
|
|
|
mask: true |
|
|
|
|
|
|
|
cancel() { |
|
|
|
showConfirmMsg("是否确认取消?", callback => { |
|
|
|
if (callback) { |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中", |
|
|
|
mask: true |
|
|
|
}) |
|
|
|
thirdLocationRequestCancel(this.datacontent.id).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.error) { |
|
|
|
this.showMessage("取消失败" + res.error.message) |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: "取消成功" |
|
|
|
}) |
|
|
|
navigateBack(1) |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showMessage("取消失败" + error) |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
try { |
|
|
|
var jobList = await getkittingRequestJobByRequest(this.datacontent.number) |
|
|
|
var handleResult = await kittingRequestHandle(this.datacontent.id) |
|
|
|
|
|
|
|
var isHaveNewJobList = []; |
|
|
|
jobList.forEach(res => { |
|
|
|
isHaveNewJobList.push(res.kittingRequestNumber); |
|
|
|
}) |
|
|
|
var isHaveNewJob = await iskittingHasNewJob(isHaveNewJobList) |
|
|
|
uni.hideLoading() |
|
|
|
this.showMessage(isHaveNewJob) |
|
|
|
} catch (error) { |
|
|
|
uni.hideLoading() |
|
|
|
this.showMessage(error) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
showCommitSuccessMessage() { |
|
|
|