newPunch.wxml 6.53 KB
<!--pages/index/rank/rank.wxml-->
<view class="punch_detail">
    <view class="title_card">
        <van-cell-group border="{{ false }}">
            <van-field  value="{{ form.taskTitle }}" placeholder="请输入标题" border="{{ false }}" bind:change="onfieldChange" />
        </van-cell-group>
        <view class="grey_line"></view>
        <view class="box_card">
            <van-cell-group border="{{ false }}">
                <van-field value="{{ form.taskDesc }}" type="textarea" placeholder="请输入" autosize  border="{{ false }}" bind:change="onfieldDescChange" />
            </van-cell-group>
        </view>
        <view class="tip_card">
            <van-uploader accept='image' file-list="{{ fileList }}" deletable="{{ true }}" bind:after-read="afterRead" bind:delete="delFile">
                <view class="tip_item">
                    <image class="pic" src="/img/answer/tp1.png" alt="" />
                </view>
            </van-uploader>
            <!-- <view class="tip_item">
                <image class="pic" src="/img/answer/sp1.png" alt="" />
            </view>
            <view class="tip_item">
                <image class="pic" src="/img/answer/yp1.png" alt="" />
            </view> -->
        </view>
    </view>
    <view class="white_card">
        <view class="bold_font">需要提交数据</view>
        <view>
            <van-switch checked="{{ form.hasData }}" size='20' active-value='1' inactive-value='2' bind:change="onSwitch" />
        </view>
    </view>
    <view class="grey_line"></view>
    <view class="white_card_nopadding" wx:if="{{form.hasData == 1}}">
        <van-cell-group border="{{ false }}">
            <van-cell title="统计单位" value="{{ form.statisticsUnit }}" is-link label="请选择统计单位" border="{{ false }}" bindtap="openUnitShow" />
        </van-cell-group>
    </view>
    <view class="white_card" wx:if="{{form.hasData == 1}}">
        <view>允许补卡</view>
        <view>
            <van-switch checked="{{ form.allowRepairCard }}" size='20' bind:change="onChange" active-value='1' inactive-value='2' />
        </view>
    </view>
    <view class="sm_grey_font">
        开启后,在打卡周期内,学生家长可对未打卡的任务进行补卡。
    </view>
    <view class="white_card_nopadding">
        <van-cell-group border="{{ false }}">
            <van-cell title="开始时间" value="{{ form.startDate }}" is-link border="{{ false }}" bindtap="openStartTimeShow" />
        </van-cell-group>
    </view>
    <view class="white_card_nopadding">
        <van-cell-group border="{{ false }}">
            <van-cell title="打卡周期" value="{{ form.taskCycle + ' 天'}}" is-link border="{{ false }}" bindtap="openClockCycleShow" />
        </van-cell-group>
    </view>
    <view class="white_card_nopadding">
        <van-cell-group border="{{ false }}">
            <van-cell title="打卡频次" value="{{ form.taskFrequency }}" is-link border="{{ false }}" bindtap="openClockRateShow" />
        </van-cell-group>
    </view>

    <view class="clearance"></view>
    <view class="white_card_nopadding">
        <van-cell-group border="{{ false }}">
            <van-cell title="打卡提醒" value="{{ form.remindTime }}" is-link border="{{ false }}" bindtap="openClockRemindShow" />
        </van-cell-group>
    </view>
    <view class="white_card_nopadding">
        <van-cell-group border="{{ false }}">
            <van-cell title="缺卡打卡提醒" value="{{ form.lackNum + ' 次' }}" is-link border="{{ false }}" bindtap="openClockLackShow" />
        </van-cell-group>
    </view>

    <view class="sm_grey_font">
        学生如缺卡达到一定条件,将会提醒家长
    </view>
    <view class="white_card_nopadding">
        <van-cell-group border="{{ false }}" >
            <van-cell title="提交时必须包含" value="{{ form.submitCondition }}" is-link border="{{ false }}" bindtap="openContainShow" />
        </van-cell-group>
    </view>

    <view class="clearance"></view>
    <view class="btn">
        <van-button type="info" round block bindtap="createTask">创建打卡</van-button>
    </view>

    <!--统计单位-->
    <van-popup show="{{ unitShow }}" position="bottom" custom-style="height: 40%;" round bind:close="closeUnitShow">
        <van-picker columns="{{ columnsUnit }}" bind:confirm="changeUnitShow" bind:cancel="closeUnitShow" show-toolbar title="统计单位" />
    </van-popup>

    <!--开始时间-->
    <van-popup show="{{ startTimeShow }}" position="bottom" custom-style="height: 40%;" round bind:close="closeStartTimeShow">
        <!-- <van-picker columns="{{ columnsStartTime }}" bind:confirm="changeStartTimeShow" bind:cancel="closeStartTimeShow" show-toolbar title="开始时间" /> -->
        <van-datetime-picker title="开始时间" type="date" value="{{ form.startTimeShow }}" min-date="{{ minDate }}" bind:confirm="changeStartTimeShow" bind:cancel="closeStartTimeShow" formatter="{{ formatter }}" />
    </van-popup>

    <!--打卡周期-->
    <van-popup show="{{ clockCycleShow }}" position="bottom" custom-style="height: 40%;" round bind:close="closeClockCycleShow">
        <van-picker columns="{{ columnsClockCycle }}" bind:confirm="changeClockCycleShow" bind:cancel="closeClockCycleShow" show-toolbar title="打卡周期" />
    </van-popup>

    <!--打卡频次-->
    <van-popup show="{{ clockRateShow }}" position="bottom" custom-style="height: 40%;" round bind:close="closeClockRateShow">
        <van-picker columns="{{ columnsClockRate }}" bind:confirm="changeClockRateShow" bind:cancel="closeClockRateShow" show-toolbar title="打卡频次" />
    </van-popup>

    <!--打卡提醒-->
    <van-popup show="{{ clockRemindShow }}" position="bottom" custom-style="height: 40%;" round bind:close="closeClockRemindShow">
        <van-picker columns="{{ columnsClockRemind }}" bind:confirm="changeClockRemindShow" bind:cancel="closeClockRemindShow" show-toolbar title="打卡提醒" />
    </van-popup>

    <!--打卡缺卡提醒-->
    <van-popup show="{{ clockLackShow }}" position="bottom" custom-style="height: 40%;" round bind:close="closeClockLackShow">
        <van-picker columns="{{ columnsClockLack }}" bind:confirm="changeClockLackShow" bind:cancel="closeClockLackShow" show-toolbar title="缺卡打卡提醒" />
    </van-popup>

    <!-- 必须包含 -->
    <van-popup show="{{ containShow }}" position="bottom" custom-style="height: 40%;" round bind:close="closeContainShow">
        <van-picker columns="{{ columnsContain }}" bind:confirm="changeContainShow" bind:cancel="closeContainShow" show-toolbar title="提交时必须包含" />
    </van-popup>
</view>