index.wxml 7.89 KB
Newer Older
张杰's avatar
张杰 committed
1 2
<!-- pages/add_record/index.wxml -->
<import src='/template/operate_btn/index.wxml'></import>
张杰's avatar
张杰 committed
3

张杰's avatar
张杰 committed
4
<view class='kg-separater ' style='height:2rpx;'></view>
张杰's avatar
张杰 committed
5 6
<view class="segmentedControl">
  <!-- 循环遍历 -->
张杰's avatar
张杰 committed
7
  <block wx:for="{{radioValues}}" wx:key="{{item}}">
张杰's avatar
张杰 committed
8 9 10
    <text data-index="{{index}}" bindtap="indexChanged" class="{{clazz[index]}}">{{item.value}}</text>
  </block>
</view>
张杰's avatar
张杰 committed
11
<view class='kg-separater'></view>
张杰's avatar
张杰 committed
12 13
<view hidden='{{controlIndex != 0}}'>
  <!-- 滑动区域 -->
张杰's avatar
张杰 committed
14
  <scroll-view style='height:calc(100vh - 50px - 2rpx - 20rpx)' scroll-y='true'>
张杰's avatar
张杰 committed
15
    <template is="section_header" data="{{title:'分类',rightTitle:!hidePhoto ? '清除' : ''}}"></template>
张杰's avatar
张杰 committed
16
    <!-- 分类选项 -->
张杰's avatar
张杰 committed
17
    <view class="category">
张杰's avatar
张杰 committed
18
      <view wx:for="{{categorys}}" wx:key="{{item}}">
19
        <view class="eat_category_btn {{typeIndex == index ? 'selected' : ''}}" bindtap='tapType' data-index='{{index}}'>
张杰's avatar
张杰 committed
20
          {{item}}
张杰's avatar
张杰 committed
21
        </view>
张杰's avatar
张杰 committed
22
      </view>
张杰's avatar
张杰 committed
23
    </view>
张杰's avatar
张杰 committed
24 25 26
    <view class='kg-separater'></view>
    <!-- 数量 -->
    <view style='margin:20rpx'>
张杰's avatar
张杰 committed
27
      <view wx:for="{{eatRecord}}" wx:for-index="dietIndex" wx:key="{{item.signSummaryId}}">
张杰's avatar
张杰 committed
28
        <view wx:for="{{item.recordItems}}" wx:for-item="r" wx:key="{{item.id}}">
29
          <view class='kg-quantity-cell'>
30
            <template is='quantity_cell' data="{{title:item.recordStudentName,type:r.cellType,unit:r.cellUnit, options: r.cellOptions, selectOptionIndex:r.optionIndex, cellIndex:dietIndex, inputValue:r.value}}"></template>
31 32
          </view>
        </view>
张杰's avatar
张杰 committed
33
      </view>
张杰's avatar
张杰 committed
34
    </view>
张杰's avatar
张杰 committed
35

36
    <view wx:if="{{!hidePhoto}}">
张杰's avatar
张杰 committed
37
      <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{remark}}' bindinput='remarkInput'></textarea>
38
      <view class='kg-separater'></view>
张杰's avatar
张杰 committed
39
      <button class='img_title' open-type='getUserInfo'>拍照</button>
张杰's avatar
张杰 committed
40
      <view class='kg-separater ' style='height:2rpx;'></view>
41 42
      <view class='home-student-picture-item' style='padding-left:20rpx;padding-bottom:40rpx;'>
        <!-- 选择的图片 -->
张杰's avatar
张杰 committed
43
        <view wx:for="{{pictureUrl}}" wx:key="{{item}}">
44
          <view class='add_picture_view'>
张杰's avatar
张杰 committed
45
            <image src='{{item}}' class='add_picture' catchtap='previewPic' data-index='{{index}}' mode='aspectFill'></image>
46 47 48
            <image src='/src/img/cancel.png' class='delete' bindtap='deleteImg' data-index='{{index}}'></image>
          </view>
        </view>
张杰's avatar
张杰 committed
49
        <view wx:if="{{pictureUrl.length < 2}}">
张杰's avatar
张杰 committed
50 51 52 53
          <!-- 添加图片按钮 -->
          <view class='add_picture_view' bindtap='addPicture'>
            <image src='/src/img/take_photo.png' class='add_picture'></image>
          </view>
张杰's avatar
张杰 committed
54
        </view>
张杰's avatar
张杰 committed
55
      </view>
张杰's avatar
张杰 committed
56
      <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
张杰's avatar
张杰 committed
57
    </view>
张杰's avatar
张杰 committed
58
    <view style='width:100vw;height:140rpx;'></view>
张杰's avatar
张杰 committed
59 60
  </scroll-view>
</view>
张杰's avatar
张杰 committed
61 62

<!-- 睡觉 -->
张杰's avatar
张杰 committed
63 64 65 66
<view hidden='{{controlIndex != 1}}'>
  <!-- 滑动区域 -->
  <scroll-view style='height:calc(100vh - 50px - 2rpx - 20rpx - 140rpx)' scroll-y='true'>
    <view style='margin:20rpx'>
张杰's avatar
张杰 committed
67
      <view wx:for="{{sleepRecord}}" wx:for-index="dietIndex" wx:key="{{item.signSummaryId}}">
张杰's avatar
张杰 committed
68
        <view wx:for="{{item.recordItems}}" wx:for-item="r" wx:key="{{item.id}}">
69
          <view class='kg-quantity-cell'>
70
            <template is='quantity_cell' data="{{title:item.recordStudentName,type:r.cellType,unit:r.cellUnit, options: r.cellOptions, selectOptionIndex:r.optionIndex, cellIndex:dietIndex, inputValue:r.value}}"></template>
71 72
          </view>
        </view>
张杰's avatar
张杰 committed
73 74
      </view>
    </view>
张杰's avatar
张杰 committed
75 76 77
    <view wx:if="{{!hidePhoto}}">
      <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{remark}}' bindinput='remarkInput'></textarea>
      <view class='kg-separater'></view>
张杰's avatar
张杰 committed
78
      <button class='img_title' open-type='getUserInfo'>拍照</button>
张杰's avatar
张杰 committed
79
      <view class='kg-separater ' style='height:2rpx;'></view>
张杰's avatar
张杰 committed
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
      <view class='home-student-picture-item' style='padding-left:20rpx;padding-bottom:40rpx;'>
        <!-- 选择的图片 -->
        <view wx:for="{{pictureUrl}}" wx:key="{{item}}">
          <view class='add_picture_view'>
            <image src='{{item}}' class='add_picture' catchtap='previewPic' data-index='{{index}}' mode='aspectFill'></image>
            <image src='/src/img/cancel.png' class='delete' bindtap='deleteImg' data-index='{{index}}'></image>
          </view>
        </view>
        <view wx:if="{{pictureUrl.length < 2}}">
          <!-- 添加图片按钮 -->
          <view class='add_picture_view' bindtap='addPicture'>
            <image src='/src/img/take_photo.png' class='add_picture'></image>
          </view>
        </view>
      </view>
      <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
    </view>
张杰's avatar
张杰 committed
97
    <view style='width:100vw;height:140rpx;'></view>
张杰's avatar
张杰 committed
98 99 100 101 102 103
  </scroll-view>
</view>

<!-- WC -->
<view hidden='{{controlIndex != 2}}'>
  <scroll-view style='height:calc(100vh - 50px - 2rpx - 20rpx - 140rpx)' scroll-y='true'>
张杰's avatar
张杰 committed
104 105 106 107 108 109 110 111 112 113 114 115

  <template is="section_header" data="{{title:'分类'}}"></template>
    <!-- 分类选项 -->
    <view class="category">
      <view wx:for="{{wcCategorys}}" wx:key="{{item}}">
        <view class="eat_category_btn {{typeIndex == index ? 'selected' : ''}}" bindtap='tapType' data-index='{{index}}'>
          {{item}}
        </view>
      </view>
    </view>
    <view class='kg-separater'></view>

张杰's avatar
张杰 committed
116
    <view style='margin:20rpx'>
张杰's avatar
张杰 committed
117
      <view wx:for="{{wcRecord}}" wx:for-index="dietIndex" wx:key="{{item.signSummaryId}}">
张杰's avatar
张杰 committed
118 119 120 121 122 123 124 125 126 127 128
        <view wx:for="{{item.recordItems}}" wx:for-item="r" wx:key="{{item.id}}">
          <view class='kg-quantity-cell'>
            <template is='quantity_cell' data="{{title:item.recordStudentName,type:r.cellType,unit:r.cellUnit, options: r.cellOptions, selectOptionIndex:r.optionIndex, cellIndex:dietIndex, inputValue:r.value}}"></template>
          </view>
        </view>
      </view>
    </view>


    <!-- <view style='margin:20rpx'>
      <view wx:for="{{wcRecord}}" wx:for-index="dietIndex" wx:key="{{item.signSummaryId}}">
129 130
        <view class='kg-quantity-cell'>
          <template is='quantity_cell' data="{{title:item.recordStudentName,type:item.cellType,unit:item.cellUnit, options: item.cellOptions, selectOptionIndex:item.optionIndex, cellIndex:dietIndex, inputValue:item.value}}"></template>
张杰's avatar
张杰 committed
131
          <text class='kg-text-normal-gray' style='margin-top:20rpx;color: black;' space="ensp">{{item.wcString}}</text>
132
        </view>
张杰's avatar
张杰 committed
133
      </view>
张杰's avatar
张杰 committed
134
    </view> -->
张杰's avatar
张杰 committed
135 136 137
    <view wx:if="{{!hidePhoto}}">
      <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{remark}}' bindinput='remarkInput'></textarea>
      <view class='kg-separater'></view>
张杰's avatar
张杰 committed
138
      <button class='img_title' open-type='getUserInfo'>拍照</button>
张杰's avatar
张杰 committed
139
      <view class='kg-separater ' style='height:2rpx;'></view>
张杰's avatar
张杰 committed
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
      <view class='home-student-picture-item' style='padding-left:20rpx;padding-bottom:40rpx;'>
        <!-- 选择的图片 -->
        <view wx:for="{{pictureUrl}}" wx:key="{{item}}">
          <view class='add_picture_view'>
            <image src='{{item}}' class='add_picture' catchtap='previewPic' data-index='{{index}}' mode='aspectFill'></image>
            <image src='/src/img/cancel.png' class='delete' bindtap='deleteImg' data-index='{{index}}'></image>
          </view>
        </view>
        <view wx:if="{{pictureUrl.length < 2}}">
          <!-- 添加图片按钮 -->
          <view class='add_picture_view' bindtap='addPicture'>
            <image src='/src/img/take_photo.png' class='add_picture'></image>
          </view>
        </view>
      </view>
      <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
    </view>
张杰's avatar
张杰 committed
157
    <view style='width:100vw;height:140rpx;'></view>
张杰's avatar
张杰 committed
158 159 160 161
  </scroll-view>
</view>


张杰's avatar
张杰 committed
162
<template wx:if="{{isHideBtn == false}}" is="operate_btn" data="{{title:'保存'}}"></template>