Commit 95ff399f by zhangxw

用领评审确认内容改动

1 parent da3dbf3b
...@@ -15,5 +15,10 @@ module.exports = { ...@@ -15,5 +15,10 @@ module.exports = {
return api.post('dj.api.smartcarlife.construction.summary.status', { return api.post('dj.api.smartcarlife.construction.summary.status', {
...params ...params
}) })
},
/**获取技师列表数据(过滤已禁用的数据) */
getTechnicianList(data) {
let params = data || {}
return api.post('dj.api.smartcarlife.roleTechnician.list.effective', {...params})
} }
} }
\ No newline at end of file \ No newline at end of file
// pages/tabRepairOrder/components/Screening/index.js // pages/tabRepairOrder/components/Screening/index.js
import api from '~/api/api' import api from '../../api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({ Component({
...@@ -89,7 +89,7 @@ Component({ ...@@ -89,7 +89,7 @@ Component({
}) })
wx.showLoading() wx.showLoading()
// 获取技师数据 // 获取技师数据
api.getQYTechnicianList({ api.getTechnicianList({
yqMerchantId: wx.$util.getUserInfo()?.isSuper ? '' : wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId yqMerchantId: wx.$util.getUserInfo()?.isSuper ? '' : wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
}).then(respone => { }).then(respone => {
wx.hideLoading() wx.hideLoading()
......
...@@ -174,9 +174,9 @@ Page({ ...@@ -174,9 +174,9 @@ Page({
data?.list?.forEach((val, index) => { data?.list?.forEach((val, index) => {
if (val.startTime) val.startTime = new Date(val.startTime).format("yyyy-MM-dd hh:mm:ss"); if (val.startTime) val.startTime = new Date(val.startTime).format("yyyy-MM-dd hh:mm:ss");
if (val.successTime) val.successTime = new Date(val.successTime).format("yyyy-MM-dd hh:mm:ss"); if (val.successTime) val.successTime = new Date(val.successTime).format("yyyy-MM-dd hh:mm:ss");
val.statuscolor = val.constructionStatus == 1 ? '#347BFF' : val.constructionStatus == 0 ? '#FF9D0A' : '' val.statuscolor = val.constructionStatus == 1 || val.constructionStatus == 2 ? '#347BFF' : val.constructionStatus == 0 ? '#FF9D0A' : ''
val.statusbackground = val.constructionStatus == 1 ? '#EAF1FF' : val.constructionStatus == 0 ? '#FFF5E6' : '' val.statusbackground = val.constructionStatus == 1 || val.constructionStatus == 2 ? '#EAF1FF' : val.constructionStatus == 0 ? '#FFF5E6' : ''
val.statusText = val.constructionStatus == 1 ? '已施工' : val.constructionStatus == 0 ? '待施工' : '' val.statusText = val.constructionStatus == 1 ? '已施工' : val.constructionStatus == 0 ? '待施工' : val.constructionStatus == 2 ? '客户返工' : ''
val.customerName = val.customer?.customerName val.customerName = val.customer?.customerName
val.mainTechnicianName = val.mainTechnicianList?.find(v => v.technicianType == 0)?.technicianName // 主技师 val.mainTechnicianName = val.mainTechnicianList?.find(v => v.technicianType == 0)?.technicianName // 主技师
const [subTechnicianName_1 = '', subTechnicianName_2 = ''] = const [subTechnicianName_1 = '', subTechnicianName_2 = ''] =
......
...@@ -39,5 +39,10 @@ module.exports = { ...@@ -39,5 +39,10 @@ module.exports = {
// 施工单返工 // 施工单返工
reworkAPI(data) { reworkAPI(data) {
return api.post('dj.api.smartcarlife.construction.rework', data) return api.post('dj.api.smartcarlife.construction.rework', data)
},
/**获取技师列表数据(过滤已禁用的数据) */
getTechnicianList(data) {
let params = data || {}
return api.post('dj.api.smartcarlife.roleTechnician.list.effective', {...params})
} }
} }
...@@ -15,23 +15,18 @@ Component({ ...@@ -15,23 +15,18 @@ Component({
this.setData({ this.setData({
scrollTop: 0 scrollTop: 0
}) })
let { infoData } = this.data let { detailInfo } = this.data
if (infoData) { this.setData({
this.getDetailInfo(infoData) infoData: wx.$util.deepClone(detailInfo)
} }, () => {
this.getDetailInfo(this.data.infoData)
})
} }
} }
}, },
title: String, title: String,
detailInfo: { detailInfo: {
type: Object, type: Object
observer: function(n) {
if (n) {
this.setData({
infoData: wx.$util.deepClone(n)
})
}
}
}, },
userPermissions: Array userPermissions: Array
}, },
......
// tabRepairOrder/components/reviewPopup/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
// 审核通过
confirm() {
this.triggerEvent('confirm')
},
// 不通过
cancel() {
this.triggerEvent('cancel')
},
// 关闭
close() {
this.triggerEvent('close')
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabRepairOrder/components/reviewPopup/index.wxss */
.popclass {
font-size: var(--fontSize32);
color: #292D33;
.title {
margin-top: var(--fontSize32);
text-align: center;
font-weight: 500;
}
.content {
margin: var(--fontSize32) var(--fontSize48) var(--fontSize48);
padding: 0 var(--fontSize30);
text-align: center;
font-size: var(--fontSize30);
color: #5A5E66;
}
.popup-footer {
height: var(--fontSize100);
display: flex;
align-items: center;
justify-content: center;
border-top: var(--fontSize1) solid #EBEDF0;
.btn {
flex: 1;
height: 100%;
text-align: center;
line-height: var(--fontSize100);
}
.cancel {
border-right: var(--fontSize1) solid #EBEDF0;
}
.confirm {
font-weight: 500;
color: #347BFF;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--tabRepairOrder/components/reviewPopup/index.wxml-->
<van-popup lock-scroll catchtouchmove="noScroll" custom-style="width:var(--fontSize622);" round z-index="999999" custom-class="popclass" closeable show="{{ show }}" bind:close="close">
<view class="title">审核施工单</view>
<view class="content">
驻店零售/区域经理可审核每笔技师施工单的施工结果
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="cancel btn text-center" bind:tap="cancel">不通过</view>
<view class="confirm btn text-center" bind:tap="confirm">审核通过</view>
</view>
</van-popup>
\ No newline at end of file \ No newline at end of file
...@@ -74,7 +74,7 @@ Component({ ...@@ -74,7 +74,7 @@ Component({
hour: date.getHours(), hour: date.getHours(),
minute: date.getMinutes(), minute: date.getMinutes(),
second: date.getSeconds(), second: date.getSeconds(),
dateStr: date.format('yyyy/MM/dd')?.replace(/\//g, '-') dateStr: date.format('yyyy-MM-dd')?.replace(/\//g, '-')
} }
} catch (error) { } catch (error) {
return this.getCurrentTimeData() return this.getCurrentTimeData()
...@@ -91,7 +91,7 @@ Component({ ...@@ -91,7 +91,7 @@ Component({
hour: today.getHours(), hour: today.getHours(),
minute: today.getMinutes(), minute: today.getMinutes(),
second: today.getSeconds(), second: today.getSeconds(),
dateStr: today.format('yyyy/MM/dd')?.replace(/\//g, '-') dateStr: today.format('yyyy-MM-dd')?.replace(/\//g, '-')
} }
}, },
...@@ -126,7 +126,7 @@ Component({ ...@@ -126,7 +126,7 @@ Component({
const hours = [] const hours = []
// 根据是否是当前日期决定小时范围 // 根据是否是当前日期决定小时范围
const isToday = defaultTime.dateStr === today.format('yyyy/MM/dd')?.replace(/\//g, '-') const isToday = defaultTime.dateStr === today.format('yyyy-MM-dd')?.replace(/\//g, '-')
const hourLimit = isToday ? today.getHours() + 1 : 24 const hourLimit = isToday ? today.getHours() + 1 : 24
for (let hour = 0; hour < hourLimit; hour++) { for (let hour = 0; hour < hourLimit; hour++) {
hours.push(hour.toString().padStart(2, '0')); hours.push(hour.toString().padStart(2, '0'));
...@@ -139,9 +139,8 @@ Component({ ...@@ -139,9 +139,8 @@ Component({
const minutes = [] const minutes = []
const seconds = [] const seconds = []
const isToday = defaultTime.dateStr === today.format('yyyy/MM/dd')?.replace(/\//g, '-') const isToday = defaultTime.dateStr === today.format('yyyy-MM-dd')?.replace(/\//g, '-')
const isCurrentHour = defaultTime.hour === today.getHours() const isCurrentHour = defaultTime.hour === today.getHours()
console.log(defaultTime.hour, today.getHours())
// 分钟范围 // 分钟范围
const minuteLimit = (isToday && isCurrentHour) ? today.getMinutes() + 1 : 60 const minuteLimit = (isToday && isCurrentHour) ? today.getMinutes() + 1 : 60
for (let minute = 0; minute < minuteLimit; minute++) { for (let minute = 0; minute < minuteLimit; minute++) {
...@@ -200,7 +199,7 @@ Component({ ...@@ -200,7 +199,7 @@ Component({
const index = value[0] const index = value[0]
this.currentDate = days[index] this.currentDate = days[index]
const today = new Date().format('yyyy/MM/dd')?.replace(/\//g, '-') const today = new Date().format('yyyy-MM-dd')?.replace(/\//g, '-')
const timeType = this.currentDate != today ? 1 : 0 const timeType = this.currentDate != today ? 1 : 0
this.getAllTimeOrPartTime(timeType) this.getAllTimeOrPartTime(timeType)
}, },
...@@ -210,7 +209,7 @@ Component({ ...@@ -210,7 +209,7 @@ Component({
const { value } = e.detail const { value } = e.detail
const index = value[0] const index = value[0]
this.currentHour = hours[index] this.currentHour = hours[index]
const today = new Date().format('yyyy/MM/dd')?.replace(/\//g, '-') const today = new Date().format('yyyy-MM-dd')?.replace(/\//g, '-')
const timeType = this.currentDate != today ? 1 : 0 const timeType = this.currentDate != today ? 1 : 0
this.getAllTimeOrPartTimeMinute(timeType) this.getAllTimeOrPartTimeMinute(timeType)
}, },
...@@ -267,7 +266,7 @@ Component({ ...@@ -267,7 +266,7 @@ Component({
} }
const str = `${this.currentDate} ${this.currentHour}:${this.currentMinute}:${this.currentSecond}` const str = `${this.currentDate} ${this.currentHour}:${this.currentMinute}:${this.currentSecond}`
const result = new Date(str.replace(/-/g, '/')).format('yyyy/MM/dd hh:mm:ss')?.replace(/\//g, '-') const result = new Date(str.replace(/-/g, '/')).format('yyyy-MM-dd hh:mm:ss')?.replace(/\//g, '-')
this.triggerEvent('confirm', result) this.triggerEvent('confirm', result)
this.setData({ errorMsg: '' }) this.setData({ errorMsg: '' })
}, },
...@@ -329,7 +328,7 @@ Component({ ...@@ -329,7 +328,7 @@ Component({
const seconds = [] const seconds = []
let second_len = 60 let second_len = 60
const currentDateStr = today.format('yyyy/MM/dd')?.replace(/\//g, '-') const currentDateStr = today.format('yyyy-MM-dd')?.replace(/\//g, '-')
if (this.currentDate === currentDateStr && if (this.currentDate === currentDateStr &&
this.currentHour === today.getHours().toString().padStart(2, '0') && this.currentHour === today.getHours().toString().padStart(2, '0') &&
this.currentMinute === today.getMinutes().toString().padStart(2, '0')) { this.currentMinute === today.getMinutes().toString().padStart(2, '0')) {
......
...@@ -67,21 +67,6 @@ Page({ ...@@ -67,21 +67,6 @@ Page({
// 获取人员权限 // 获取人员权限
getStaffPermissions() { getStaffPermissions() {
// 假数据开始
const res = {
code: 0,
data: [{
name: '施工确认',
code: 'SHIGONGQUEREN'
}, {
name: '完成施工',
code: 'WANCHENGSHIGONG'
}]
}
this.setData({
userPermissions: res.data
})
return
let { userInfo } = this.data let { userInfo } = this.data
commonApi.staffPermissions({phone: userInfo?.phone}).then(res => { commonApi.staffPermissions({phone: userInfo?.phone}).then(res => {
console.log(res) console.log(res)
...@@ -97,10 +82,14 @@ Page({ ...@@ -97,10 +82,14 @@ Page({
}, },
// 获取详情数据 // 获取详情数据
getDetail(data) { getDetail(data) {
wx.showLoading({
title: '加载中'
})
api.getConstructionDetail({ api.getConstructionDetail({
id: data?.id, id: data?.id,
constructionCode: data?.constructionCode constructionCode: data?.constructionCode
}).then(res => { }).then(res => {
wx.hideLoading()
let { code, data, message } = res let { code, data, message } = res
const mainSelected = data?.mainTechnicianList?.filter(val => val.technicianType == 0)?.map(it => { return { technicianId: it.technicianId, staffName: it.technicianName, id: it.id, uuid: it.technicianUuid } }) const mainSelected = data?.mainTechnicianList?.filter(val => val.technicianType == 0)?.map(it => { return { technicianId: it.technicianId, staffName: it.technicianName, id: it.id, uuid: it.technicianUuid } })
const deputySelected = data?.mainTechnicianList?.filter(val => val.technicianType == 1)?.map(it => { return { technicianId: it.technicianId, staffName: it.technicianName, id: it.id, uuid: it.technicianUuid } }) const deputySelected = data?.mainTechnicianList?.filter(val => val.technicianType == 1)?.map(it => { return { technicianId: it.technicianId, staffName: it.technicianName, id: it.id, uuid: it.technicianUuid } })
...@@ -122,7 +111,7 @@ Page({ ...@@ -122,7 +111,7 @@ Page({
getTechnicianList() { getTechnicianList() {
let { userInfo } = this.data let { userInfo } = this.data
// 获取技师数据 // 获取技师数据
commonApi.getQYTechnicianList({ api.getTechnicianList({
yqMerchantId: !userInfo?.isSuper ? wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId : '' yqMerchantId: !userInfo?.isSuper ? wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId : ''
}).then(respone => { }).then(respone => {
wx.hideLoading() wx.hideLoading()
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<view class="item goods"> <view class="item goods">
<view class="title"> <view class="title">
<view class="box">商品信息</view> <view class="box">商品信息</view>
<block wx:if="{{confirmInfo.reworkFlag != 1 && filter.btnPermissions(userPermissions, 'SHIGONGQUEREN')}}">
<block wx:if="{{!editGoodsFlag}}"> <block wx:if="{{!editGoodsFlag}}">
<view class="edit-btn" bindtap="handleEditGoods"> <view class="edit-btn" bindtap="handleEditGoods">
<image src="{{IMG_URL}}repair-order/relate-goods.png" mode=""/>关联商品 <image src="{{IMG_URL}}repair-order/relate-goods.png" mode=""/>关联商品
...@@ -15,6 +16,7 @@ ...@@ -15,6 +16,7 @@
<view bindtap="handelGoodsConfirm">完成</view> <view bindtap="handelGoodsConfirm">完成</view>
</view> </view>
</block> </block>
</block>
</view> </view>
<view class="box"> <view class="box">
<block wx:for="{{goodsObj}}" wx:key="index"> <block wx:for="{{goodsObj}}" wx:key="index">
...@@ -68,6 +70,7 @@ ...@@ -68,6 +70,7 @@
<view class="item service"> <view class="item service">
<view class="title"> <view class="title">
<view class="box">施工单信息</view> <view class="box">施工单信息</view>
<block wx:if="{{filter.btnPermissions(userPermissions, 'SHIGONGQUEREN')}}">
<block wx:if="{{!editServiceFlag}}"> <block wx:if="{{!editServiceFlag}}">
<view class="edit-btn" bindtap="handleEditService">编辑</view> <view class="edit-btn" bindtap="handleEditService">编辑</view>
</block> </block>
...@@ -77,6 +80,7 @@ ...@@ -77,6 +80,7 @@
<view bindtap="handelServicesConfirm">完成</view> <view bindtap="handelServicesConfirm">完成</view>
</view> </view>
</block> </block>
</block>
</view> </view>
<view class="service-box"> <view class="service-box">
<block wx:if="{{!editServiceFlag}}"> <block wx:if="{{!editServiceFlag}}">
......
...@@ -5,6 +5,7 @@ import api from '../../api' ...@@ -5,6 +5,7 @@ import api from '../../api'
import { uploadImg, getSceneById, staffPermissions } from '~/api/api' import { uploadImg, getSceneById, staffPermissions } from '~/api/api'
import { setConfigInfo } from '~/store/index' import { setConfigInfo } from '~/store/index'
const app = getApp() const app = getApp()
let time = null
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -110,6 +111,10 @@ Page({ ...@@ -110,6 +111,10 @@ Page({
1: { 1: {
text: '已施工', text: '已施工',
color: '#35C376' color: '#35C376'
},
2: {
text: '客户返工',
color: '#35C376'
} }
}, },
outboundStatus: { outboundStatus: {
...@@ -168,32 +173,6 @@ Page({ ...@@ -168,32 +173,6 @@ Page({
onShow() {}, onShow() {},
// 人员权限 // 人员权限
getStaffPermissions() { getStaffPermissions() {
// 假数据开始
const res = {
code: 0,
data: [
{
name: '施工确认',
code: 'SHIGONGQUEREN'
},
{
name: '完成施工',
code: 'WANCHENGSHIGONG'
},
{
name: '物料出库',
code: 'WULIAOCHUKU'
},
{
name: '审核施工单',
code: 'SHENHESHIGONGDAN'
}
]
}
this.setData({
userPermissions: res.data
})
return
let { userInfo } = this.data let { userInfo } = this.data
staffPermissions({ phone: userInfo?.phone }).then(res => { staffPermissions({ phone: userInfo?.phone }).then(res => {
let { code, data, message } = res let { code, data, message } = res
...@@ -242,18 +221,57 @@ Page({ ...@@ -242,18 +221,57 @@ Page({
}) })
}, },
setTime() {
let _this = this
let { queryOptions } = _this.data
time = setTimeout(() => {
api
.getConstructionDetail({
id: queryOptions?.id,
constructionCode: queryOptions?.constructionCode
})
.then(res => {
let { code, data, message } = res
let { detailInfo } = this.data
this.setTime()
if (code == 0) {
if (data.startTime) {
data.startTime = new Date(data.startTime).format('yyyy-MM-dd hh:mm:ss')
}
_this.setData({
'detailInfo.outboundStatus': data?.outboundStatus,
'detailInfo.startTime': detailInfo.startTime ? detailInfo.startTime : data.startTime // 页面操作选了开始施工时间不做更新,未选择取更新后的时间(出库时间)
})
} else {
wx.$util.showToast(message)
}
})
}, 10 * 1000)
},
// 获取施工单详情 // 获取施工单详情
getDetail() { getDetail() {
let { queryOptions } = this.data let { queryOptions } = this.data
if (!queryOptions.id || !queryOptions.constructionCode) return if (!queryOptions.id || !queryOptions.constructionCode) return
wx.showLoading({
title: '加载中',
})
api api
.getConstructionDetail({ .getConstructionDetail({
id: queryOptions?.id, id: queryOptions?.id,
constructionCode: queryOptions?.constructionCode constructionCode: queryOptions?.constructionCode
}) })
.then(res => { .then(res => {
wx.hideLoading()
let { code, data, message } = res let { code, data, message } = res
let { detailInfo } = this.data
if (code == 0) { if (code == 0) {
// 未出库 轮询查订单状态,更新出库状态
if (data.outboundStatus == 0) {
this.setTime()
} else {
time && clearTimeout(time)
}
const mainTechnicianName = data?.mainTechnicianList?.find( const mainTechnicianName = data?.mainTechnicianList?.find(
val => val.technicianType == 0 val => val.technicianType == 0
)?.technicianName )?.technicianName
...@@ -279,7 +297,8 @@ Page({ ...@@ -279,7 +297,8 @@ Page({
'detailInfo.subTechnicianName': subTechnicianName, 'detailInfo.subTechnicianName': subTechnicianName,
'detailInfo.pictureList': data?.pictureList?.map(val => { 'detailInfo.pictureList': data?.pictureList?.map(val => {
return val.pictureUrl return val.pictureUrl
}) }),
'detailInfo.startTime': detailInfo.startTime ? detailInfo.startTime : data.startTime // 页面操作选了开始施工时间不做更新,未选择取更新后的时间(出库时间)
}, },
() => { () => {
if (data?.startTime && data?.endTime) { if (data?.startTime && data?.endTime) {
...@@ -618,10 +637,19 @@ Page({ ...@@ -618,10 +637,19 @@ Page({
} }
}) })
} }
if (!detailInfo?.startTime || !detailInfo?.endTime) if (!detailInfo?.startTime)
return wx.$util.showToast('请在页面中提交施工时间') return wx.$util.showToast('请在页面中提交施工时间')
if (!detailInfo?.pictureList?.length) if (!detailInfo?.pictureList?.length)
return wx.$util.showToast('请在页面中提交上传施工图片') return wx.$util.showToast('请在页面中提交上传施工图片')
if (!detailInfo.endTime) { // 未选择施工结束时间取当前时间
this.setData({
'detailInfo.endTime': new Date().format('yyyy-MM-dd hh:mm:ss')
}, () => {
this.calculateTimeDifference() // 自动计算施工时长
})
}
const pictureList = detailInfo?.pictureList?.map(val => { const pictureList = detailInfo?.pictureList?.map(val => {
return { return {
pictureUrl: val pictureUrl: val
...@@ -639,13 +667,19 @@ Page({ ...@@ -639,13 +667,19 @@ Page({
constructionDuration: detailInfo.constructionDuration, constructionDuration: detailInfo.constructionDuration,
pictureList: pictureList pictureList: pictureList
} }
wx.showLoading({
title: '加载中',
})
api api
.completeConstructionOrder(params) .completeConstructionOrder(params)
.then(res => { .then(res => {
wx.hideLoading()
let { code, message } = res let { code, message } = res
setTimeout(() => {
this.setData({ this.setData({
submitFlag: false submitFlag: false
}) })
}, 1000)
if (code == 0) { if (code == 0) {
wx.$router.redirectTo('repairOrderDetail', { wx.$router.redirectTo('repairOrderDetail', {
id: detailInfo.id, id: detailInfo.id,
...@@ -657,30 +691,44 @@ Page({ ...@@ -657,30 +691,44 @@ Page({
} }
}) })
.catch(() => { .catch(() => {
wx.hideLoading()
setTimeout(() => {
this.setData({ this.setData({
submitFlag: false submitFlag: false
}) })
}, 1000)
}) })
}, },
// 审核施工单 // 审核施工单
checkOrder() { checkOrder() {
this.setData({
reviewVisible: true
})
},
reviewEvent(type) {
let { detailInfo } = this.data let { detailInfo } = this.data
wx.showModal({ if (this.data.reviewFlag) return
title: '审核施工单', this.setData({
content: '驻店零售/区域经理可审核每笔技师施工单的施工结果', reviewFlag: true
confirmColor: '#347BFF', })
confirmText: '审核通过', wx.showLoading({
cancelText: '不通过', title: '加载中',
success(res) { })
api api.approvalRepairOrder({
.approvalRepairOrder({
id: detailInfo.id, id: detailInfo.id,
constructionCode: detailInfo.constructionCode, constructionCode: detailInfo.constructionCode,
approvalStatus: res.confirm ? 1 : res.cancel ? 2 : '' approvalStatus: type
}) }).then(result => {
.then(result => { wx.hideLoading()
this.reviewClose()
let { code, message } = result let { code, message } = result
setTimeout(() => {
this.setData({
reviewFlag: false
})
}, 1000)
if (code == 0) { if (code == 0) {
wx.$util.showToast('') wx.$util.showToast('')
wx.showToast({ wx.showToast({
...@@ -693,20 +741,46 @@ Page({ ...@@ -693,20 +741,46 @@ Page({
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
}).catch(() => {
wx.hideLoading()
setTimeout(() => {
this.setData({
reviewFlag: false
}) })
} }, 1000)
})
},
// 审核通过
reviewConfirm() {
this.reviewEvent(1)
},
// 审核不通过
reviewCancel() {
this.reviewEvent(2)
},
// 关闭审核弹窗
reviewClose() {
this.setData({
reviewVisible: false
}) })
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() {
time && clearTimeout(time)
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() {
time && clearTimeout(time)
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
"usingComponents": { "usingComponents": {
"time-select": "../../components/timeSelect/index", "time-select": "../../components/timeSelect/index",
"outbound-popup": "../../components/outboundPopup/index", "outbound-popup": "../../components/outboundPopup/index",
"rework-popup": "../../components/reworkPopup/index" "rework-popup": "../../components/reworkPopup/index",
"review-popup": "../../components/reviewPopup/index"
}, },
"navigationBarTitleText": "施工单详情" "navigationBarTitleText": "施工单详情"
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!