index.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\grid\GridView;
  4. use yii\widgets\ActiveForm;
  5. use yii\bootstrap\Nav;
  6. /* @var $this yii\web\View */
  7. /* @var $searchModel app\models\OrderreturnSearch */
  8. /* @var $dataProvider yii\data\ActiveDataProvider */
  9. $this->title = 'Orderreturns';
  10. $this->params['breadcrumbs'][] = $this->title;
  11. ?>
  12. <div style="display:inline-block;">
  13. <?php
  14. echo Nav::widget([
  15. 'options' => ['class' => 'navbar-nav navbar-left'],
  16. 'items' => [
  17. ['label' => '美国仓', 'url' => ['/site/index','shop'=>1]],
  18. ['label' => '亚马逊', 'url' => ['/site/index','shop'=>2]],
  19. ],
  20. ]);
  21. ?>
  22. </div>
  23. <div class="orderreturn-index">
  24. <h1><?php echo $shop==1?"美国仓":"亚马逊"; ?></h1>
  25. <p>
  26. <?= Html::a('创建', ['create'], ['class' => 'btn btn-success']) ?>
  27. </p>
  28. <p>
  29. <?php
  30. $model=new app\models\UploadExcel();
  31. $form=ActiveForm::begin([
  32. 'id' => 'upload-excel',
  33. 'action'=>'/site/export?shop='.$shop,
  34. 'method'=>'post',
  35. 'options'=>[
  36. 'enctype'=>'multipart/form-data',
  37. ]
  38. ]);
  39. ?>
  40. <?= Html::activeFileInput($model, 'excel', $options = []) ?>
  41. <?= Html::submitButton('Submit', ['class' => 'btn btn-primary']) ?>
  42. <?php ActiveForm::end() ?>
  43. </p>
  44. <?php echo $this->render('_search', ['model' => $searchModel]); ?>
  45. <?= GridView::widget([
  46. 'dataProvider' => $dataProvider,
  47. // 'filterModel' => $searchModel,
  48. 'columns' => [
  49. ['class' => 'yii\grid\SerialColumn'],
  50. 'id',
  51. 'deliveryid',
  52. 'website',
  53. 'customer',
  54. 'delivery',
  55. 'origin_goodsinfo',
  56. 'goodsinfo',
  57. 'usage',
  58. 'receiptdate',
  59. 'num',
  60. 'mark',
  61. ['class' => 'yii\grid\ActionColumn'],
  62. ],
  63. ]); ?>
  64. </div>