Commit 089fb905 authored by SmileFei's avatar SmileFei

审核操作完善

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