Commit 6ac81df2 authored by Facius's avatar Facius

完工成功之后再调配件

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