wupengfei 2 سال پیش
والد
کامیت
cdc7842b0e
2فایلهای تغییر یافته به همراه6 افزوده شده و 5 حذف شده
  1. 2 1
      application/synth/controller/Offer.php
  2. 4 4
      application/synth/view/offer/index_search.html

+ 2 - 1
application/synth/controller/Offer.php

@@ -32,7 +32,8 @@ class Offer extends Controller
 
         $this->title = '列表管理';
         $all_type = \app\common\model\OfferType::getAllType();
-        $this->all_type = array_merge(['0'=>['id'=>0,'title'=>'全部']],array_column($all_type,null,'id'));
+        $all_type = array_merge([['id'=>0,'title'=>'全部']],$all_type);
+        $this->all_type = array_column($all_type,null,'id');
         $this->status_arr = [0=>'全部','1'=>'审批中',2=>'审批通过',3=>'审批拒绝',9=>'已取消'];
         $sel_where = [];
         $time = explode(' - ',input('create_at'));

+ 4 - 4
application/synth/view/offer/index_search.html

@@ -8,15 +8,15 @@
             </div>
         </div>
         <div class="layui-form-item layui-inline">
-            <label class="layui-form-label">出差类型</label>
+            <label class="layui-form-label">呈批类型</label>
             <div class="layui-input-inline">
                 <select class="layui-select" name="type">
                     <option value="0">全部</option>
                     {foreach $all_type as $k=>$v}
-                        {if $Think.get.type > -1 && $Think.get.type eq $k}
-                        <option selected value="{$k}">{$v.title}</option>
+                        {if $Think.get.type > -1 && $Think.get.type eq $v.id}
+                        <option selected value="{$v.id}">{$v.title}</option>
                         {else}
-                        <option  value="{$k}">{$v.title}</option>
+                        <option  value="{$v.id}">{$v.title}</option>
                         {/if}
                     {/foreach}
                 </select>