index.wxml 8.07 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>
jie zhang's avatar
jie zhang committed
56

张杰's avatar
张杰 committed
57
      <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
张杰's avatar
张杰 committed
58
    </view>
张杰's avatar
张杰 committed
59
    <view style='width:100vw;height:140rpx;'></view>
60
    <view wx:if="{{isX}}" style='height:70rpx;'></view>
张杰's avatar
张杰 committed
61 62
  </scroll-view>
</view>
张杰's avatar
张杰 committed
63 64

<!-- 睡觉 -->
张杰's avatar
张杰 committed
65 66 67 68
<view hidden='{{controlIndex != 1}}'>
  <!-- 滑动区域 -->
  <scroll-view style='height:calc(100vh - 50px - 2rpx - 20rpx - 140rpx)' scroll-y='true'>
    <view style='margin:20rpx'>
张杰's avatar
张杰 committed
69
      <view wx:for="{{sleepRecord}}" wx:for-index="dietIndex" wx:key="{{item.signSummaryId}}">
张杰's avatar
张杰 committed
70
        <view wx:for="{{item.recordItems}}" wx:for-item="r" wx:key="{{item.id}}">
71
          <view class='kg-quantity-cell'>
72
            <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>
73 74
          </view>
        </view>
张杰's avatar
张杰 committed
75 76
      </view>
    </view>
张杰's avatar
张杰 committed
77 78 79
    <view wx:if="{{!hidePhoto}}">
      <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{remark}}' bindinput='remarkInput'></textarea>
      <view class='kg-separater'></view>
张杰's avatar
张杰 committed
80
      <button class='img_title' open-type='getUserInfo'>拍照</button>
张杰's avatar
张杰 committed
81
      <view class='kg-separater ' style='height:2rpx;'></view>
张杰's avatar
张杰 committed
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
      <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
99
    <view style='width:100vw;height:140rpx;'></view>
100
    <view wx:if="{{isX}}" style='height:70rpx;'></view>
张杰's avatar
张杰 committed
101 102 103 104 105 106
  </scroll-view>
</view>

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

  <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
119
    <view style='margin:20rpx'>
张杰's avatar
张杰 committed
120
      <view wx:for="{{wcRecord}}" wx:for-index="dietIndex" wx:key="{{item.signSummaryId}}">
张杰's avatar
张杰 committed
121 122 123 124 125 126 127 128 129 130 131
        <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}}">
132 133
        <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
134
          <text class='kg-text-normal-gray' style='margin-top:20rpx;color: black;' space="ensp">{{item.wcString}}</text>
135
        </view>
张杰's avatar
张杰 committed
136
      </view>
张杰's avatar
张杰 committed
137
    </view> -->
张杰's avatar
张杰 committed
138 139 140
    <view wx:if="{{!hidePhoto}}">
      <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{remark}}' bindinput='remarkInput'></textarea>
      <view class='kg-separater'></view>
张杰's avatar
张杰 committed
141
      <button class='img_title' open-type='getUserInfo'>拍照</button>
张杰's avatar
张杰 committed
142
      <view class='kg-separater ' style='height:2rpx;'></view>
张杰's avatar
张杰 committed
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
      <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
160
    <view style='width:100vw;height:140rpx;'></view>
161
    <view wx:if="{{isX}}" style='height:70rpx;'></view>
张杰's avatar
张杰 committed
162 163 164 165
  </scroll-view>
</view>


166
<template wx:if="{{isHideBtn == false}}" is="operate_btn" data="{{title:'保存', isX:isX}}"></template>