| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <?php
- use yii\helpers\Html;
- use yii\grid\GridView;
- use yii\widgets\ActiveForm;
- use yii\bootstrap\Nav;
- use yii\grid\CheckboxColumn;
- use yii\helpers\Url;
- /* @var $this yii\web\View */
- /* @var $searchModel app\models\OrderreturnSearch */
- /* @var $dataProvider yii\data\ActiveDataProvider */
- $this->title = 'Orderreturns';
- $this->params['breadcrumbs'][] = $this->title;
- ?>
- <div style="display:inline-block;">
- <?php
- echo Nav::widget([
- 'options' => ['class' => 'navbar-nav navbar-left'],
- 'items' => [
- ['label' => '美国仓', 'url' => ['/site/index','shop'=>1]],
- ['label' => '亚马逊', 'url' => ['/site/index','shop'=>2]],
- ],
- ]);
- ?>
- </div>
- <div class="orderreturn-index">
-
- <h1><?php echo $shop==1?"美国仓":"亚马逊"; ?></h1>
- <p class="order—create">
- <?= Html::a('创建', ['create'], ['class' => 'btn btn-success ']) ?>
- </p>
- <p>
- <?php
- $model=new app\models\UploadExcel();
- $form=ActiveForm::begin([
- 'id' => 'upload-excel',
- 'action'=>'/site/export?shop='.$shop,
- 'method'=>'post',
- 'options'=>[
- "class"=>"upload-excel",
- 'enctype'=>'multipart/form-data',
- ]
- ]);
- ?>
- <?= Html::activeFileInput($model, 'excel', $options = []) ?>
- <?= Html::submitButton('Submit', ['class' => 'btn btn-primary']) ?>
- <?php ActiveForm::end() ?>
- </p>
- <?php echo $this->render('_search', ['model' => $searchModel]); ?>
- <?= GridView::widget([
- 'dataProvider' => $dataProvider,
- 'showFooter' => true,
- // 'filterModel' => $searchModel,
- 'id' => 'grid',
- 'columns' => [
- [
- 'class'=>CheckboxColumn::className(),
- 'name'=>'id',
- 'headerOptions' => ['width'=>'30'],
- 'footer' => '<button href="#" class="btn btn-default btn-xs btn-delete" url="'. Url::toRoute('site/delete-all') .'">批量删除</button>',
- 'footerOptions' => ['colspan' => 5],
- ],
- 'id',
- 'deliveryid',
- 'website',
- 'customer',
- 'delivery',
- 'origin_goodsinfo',
- 'goodsinfo',
- 'usage',
- 'receiptdate',
- 'num',
- 'mark',
- ['class' => 'yii\grid\ActionColumn', 'header' => '管理操作', 'footerOptions' => ['class'=>'hide']],
- // ['class' => 'yii\grid\ActionColumn'],
- ],
- ]); ?>
-
- </div>
- <?php
- $script = <<< js
- $(".btn-delete").on("click", function(){
- var ids = $("#grid").yiiGridView("getSelectedRows");
- var self = $(this);
- if(ids.length == 0) return false;
- $.ajax({
- url:self.attr("url"),
- type:"post",
- data:{id:ids},
- success:function(res){
-
- }
- });
- });
- js;
- $this->registerJs($script);
- ?>
|