<h1>渠道优惠券兑换管理</h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <!-- <p> <//?= Html::a('Create Moffice Score Event', ['create'], ['class' => 'btn btn-success']) ?> </p> --> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['label' => '渠道名称', 'value' => function ($model, $key, $index, $column) { //return MHd201509t6::gethd201509t6StatusOption($model->status); $office = app\models\MOffice::findOne(["office_id" => $model->office_id]); if (empty($office)) { return "--"; } else { return $office->title; } }, 'headerOptions' => array('style' => 'width:220px;')], 'create_time', 'score', 'memo', 'code', ['attribute' => 'status', 'label' => '审核状态', 'value' => function ($model, $key, $index, $column) { return MOfficeScoreEvent::getOseStatusOption($model->status); }, 'filter' => MOfficeScoreEvent::getOseStatusOption(), 'headerOptions' => array('style' => 'width:120px;')], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update}', 'buttons' => ['update' => function ($url, $model) { return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, ['title' => Yii::t('yii', 'Update'), 'data-pjax' => '0']); }]]]]); ?> </div>
<?php $office = MOffice::findOne(["office_id" => $model->office_id]); if (empty($office)) { $title = "--"; } else { $title = $office->title; } echo "<h1>渠道名称: " . $title . "</h1>"; echo "<h3>代金卷: " . MOfficeScoreEvent::getCatNameOption($model->cat) . "</h3>"; echo "<h3>减积分: " . $model->score . "</h3>"; echo "<h3>时间: " . $model->create_time . "</h3>"; ?> <br> <?php echo $form->field($model, 'status')->dropDownList(MOfficeScoreEvent::getOseStatusOption()); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? '新增' : '修改', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>
<//?= Html::a('Create Moffice Score Event', ['create'], ['class' => 'btn btn-success']) ?> </p> --> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'memo', 'score', 'create_time', 'code', ['attribute' => 'status', 'label' => '审核状态', 'format' => 'html', 'value' => function ($model, $key, $index, $column) { $flag = ""; if ($model->status == 1) { $flag = "<span class='glyphicon glyphicon-ok' style='color:green'></span>"; } else { if ($model->status == 2) { $flag = "<span class='glyphicon glyphicon-remove' style='color:red'></span>"; } } return MOfficeScoreEvent::getOseStatusOption($model->status) . " " . $flag; }, 'filter' => MOfficeScoreEvent::getOseStatusOption(), 'headerOptions' => array('style' => 'width:120px;')]]]); ?> </div> <script type="text/javascript"> $(document).ready(function() { $('#dyj30').click (function () { //alert('confirmAjax'); var cat =101; if (!confirm("确定要兑换吗?")) return;