Commit 6ac81df2 authored by Facius's avatar Facius

完工成功之后再调配件

parent 71b8807f
......@@ -428,7 +428,7 @@
return param
},
saveComplete(){// 保存完工信息
this.submitParts()
// this.submitParts() // 不调这个接口;没完工不能调提交配件
const param = this.handleSaveData()
this.$u.api.saveCompleteData(param,this.orderId).then((res)=>{
if (res.code == 200) {
......@@ -573,7 +573,7 @@
const params = {
workOrderId: this.orderId,
applyType: '10',
parts: lists
parts: lists ? JSON.stringify(lists) : ''
}
this.$u.api.createParts(params).then(res => {
if (res.code !== 200) {
......@@ -587,7 +587,6 @@
},
// 提交订单
orderFinish(){
this.submitParts()
const param = this.handleSaveData()
// 完工事件埋点
getApp().track('order_finish', {id: this.vuex_user.id, mobile: this.vuex_user.mobile, orderId: Number(this.orderId)})
......@@ -596,6 +595,7 @@
if(this.inGuaranteePeriod === 'Y'){
this.$u.api.inOrderFinish(this.orderId).then((res)=>{
if (res.code == 200) {
this.submitParts()
this.$refs.uToast.show({
title: '提交成功',
type: 'success',
......
......@@ -80,7 +80,7 @@
</view>
</u-popup>
<!-- 已申请配件列表 -->
<ApplyList :show.sync="showApplyList" :list="partsList" @action="handleClickCell" @operate="handleOperate" @apply="handleApply"></ApplyList>
<!-- <ApplyList :show.sync="showApplyList" :list="partsList" @action="handleClickCell" @operate="handleOperate" @apply="handleApply"></ApplyList> -->
</template>
</view>
</template>
......@@ -94,7 +94,7 @@
import Record from "@/components/order/performanceRecord.vue"
import Detail from "@/components/order/detail.vue"
import BottomButtons from "@/components/order/bottomButtons.vue"
import ApplyList from "@/components/parts/applyList.vue"
// import ApplyList from "@/components/parts/applyList.vue"
let now = new Date(new Date().toLocaleDateString()).getTime();
export default {
components: {
......@@ -105,7 +105,7 @@
Record,
Detail,
BottomButtons,
ApplyList
// ApplyList
},
mixins: [baseFile],
data() {
......@@ -166,7 +166,7 @@
timeout: false,
timestamp: 0,
showCountTime : false, // 从上个页面传入是否显示倒计时
showApplyList: false, // 显示已申请配件列表
// showApplyList: false, // 显示已申请配件列表
partsList: [], // 已申请的配件列表
partsCount: 0
}
......@@ -182,7 +182,7 @@
}
},
buttons() {
//id: 0 主流程; 1 过程反馈;2 异常签到; 3 现场拍照; 4 件申请
//id: 0 主流程; 1 过程反馈;2 异常签到; 3 现场拍照; 4 件申请
// label: 按钮文字,
// type: 'image' 上图片下文字;'text' 纯文字,
// image: 图片名,
......@@ -214,7 +214,7 @@
id: 3
},
{
label: '件申请',
label: '件申请',
type: 'image',
image: 'peijian.png',
show: this.allowFeedback,
......@@ -340,7 +340,7 @@
} else {
this.loadOrderRecord() // 履约记录
this.getSignDistance() // 定位
this.getOrderPartsSum()
// this.getOrderPartsSum() // 备件单数量
}
},
onShow() {
......@@ -458,17 +458,17 @@
}
});
},
getOrderPartsSum() { // 获取订单配件数量
this.$u.api.getOrderPartsSum(this.orderId).then((res) => {
if (res.code == 200) {
if (res.data) {
this.partsCount = res.data.totalPartCount
}
} else {
console.log(res.message)
}
});
},
// getOrderPartsSum() { // 获取订单配件数量
// this.$u.api.getOrderPartsSum(this.orderId).then((res) => {
// if (res.code == 200) {
// if (res.data) {
// this.partsCount = res.data.totalPartCount
// }
// } else {
// console.log(res.message)
// }
// });
// },
getSignDistance(){
let self = this
var data={}
......@@ -652,12 +652,12 @@
},
handleApplyParts() { // 点击了配件申请按钮
if (this.buttons[3].count > 0) { // 已经有配件,弹出配件列表
this.showApplyList = true
this.getApplyList()
} else { // 没有配件,跳到配件申请
// if (this.buttons[3].count > 0) { // 已经有配件,弹出配件列表
// this.showApplyList = true
// this.getApplyList()
// } else { // 没有配件,跳到配件申请
this.toApplyParts()
}
// }
},
async getApplyList() {
let res = await this.$u.api.applyList({
......
......@@ -17,7 +17,7 @@
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
</view>
<view class="message">当前还未选择配件,请点击添加</view>
<view class="message">当前还未选择配件,请点击添加,添加后在'我的->备件订单'查看</view>
<button class="add-button" plain="true" @click="$u.throttle(addParts, 500)">去添加</button>
</view>
<view v-else class="list">
......@@ -257,7 +257,8 @@ export default {
font-size: 26rpx;
font-weight: 400;
color: #999999;
line-height: 26rpx;
line-height: 36rpx;
text-align: center;
}
.add-button {
margin: 42rpx 0 20rpx 0;
......
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