Commit f9d72738 authored by 张杰's avatar 张杰
parents bc884846 29c4e2c0
...@@ -7,8 +7,9 @@ Page({ ...@@ -7,8 +7,9 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
signSummaryId:"", signSummaryId: "",
recordDetail: {}, recordDetail: {},
showAuditBtn: true,
recordTypes: { recordTypes: {
"diet_morning": '早餐', "diet_morning": '早餐',
"diet_afternoon": "午餐", "diet_afternoon": "午餐",
...@@ -33,6 +34,7 @@ Page({ ...@@ -33,6 +34,7 @@ Page({
//加载详情 //加载详情
getRecordDetailForSignId: function() { getRecordDetailForSignId: function() {
request.getRecordDetailForSignId(this.data.signSummaryId).then(res => { request.getRecordDetailForSignId(this.data.signSummaryId).then(res => {
console.log(res)
if (res) { if (res) {
var dateStr = res.recordDate.substr(0, 10) var dateStr = res.recordDate.substr(0, 10)
let show_day = new Array('周日', '周一', '周二', '周三', '周四', '周五', '周六'); let show_day = new Array('周日', '周一', '周二', '周三', '周四', '周五', '周六');
...@@ -61,9 +63,13 @@ Page({ ...@@ -61,9 +63,13 @@ Page({
var r = wcRecord[j] var r = wcRecord[j]
r.z_recordType = this.data.recordTypes[r.recordType] r.z_recordType = this.data.recordTypes[r.recordType]
} }
if (res.state == "finish") {
this.setData({
showAuditBtn: false
})
}
this.setData({ this.setData({
recordDetail: res, recordDetail: res
}) })
} }
...@@ -76,9 +82,12 @@ Page({ ...@@ -76,9 +82,12 @@ Page({
}) })
}, },
auditSignSummary: function (signSummaryId){ auditSignSummary: function(signSummaryId) {
console.log(signSummaryId) console.log(signSummaryId)
request.auditSignSummary(signSummaryId).then(res => { request.auditSignSummary(signSummaryId).then(res => {
this.setData({
showAuditBtn: false
})
wx.showToast({ wx.showToast({
title: '审核成功!', title: '审核成功!',
icon: 'none', icon: 'none',
...@@ -94,8 +103,8 @@ Page({ ...@@ -94,8 +103,8 @@ Page({
}, },
operateTap: function (e) { operateTap: function(e) {
this.auditSignSummary(this.data.signSummaryId ) this.auditSignSummary(this.data.signSummaryId)
}, },
/** /**
......
...@@ -59,4 +59,4 @@ ...@@ -59,4 +59,4 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<template is="operate_btn" data="{{title:'通过'}}"></template> <template is="operate_btn" data="{{title:'通过'}}" wx:if="{{showAuditBtn}}"></template>
\ No newline at end of file \ No newline at end of file
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