0
0
wangsaitao преди 8 месеца
родител
ревизия
e33d5446a0
променени са 2 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 2 2
      application/admin/view/orders/self_add3.html
  2. 2 1
      application/common/model/UserConveyCate.php

+ 2 - 2
application/admin/view/orders/self_add3.html

@@ -9,7 +9,7 @@
                     <div class="col-sm-12">
                         <div class="form-group">
                             <label class="control-label">部门</label></br>
-                            <input type="hidden" name="dep_id" id="dep">
+                            <input type="hidden" name="dep_id" value="{$dep_id|default=0}" id="dep">
                             <el-select v-model="dep_id" size="small" clearable style="width: 100%" filterable placeholder="请选择">
                                 <el-option
                                         v-for="item in dep"
@@ -232,7 +232,7 @@
                 types: {:json_encode($order_convey_type)},
             type: '',
                 prioritys:{:json_encode($priority)},
-            priority: "2",
+            priority: "",
                 devices: {:json_encode($order_device)},
             device: '',
                 xq_time: '',

+ 2 - 1
application/common/model/UserConveyCate.php

@@ -9,7 +9,7 @@ class UserConveyCate extends Base
 
     // 更新用户常用运送类型
     public function updateCate($userId,$conveyCateId){
-        $info = Db::name('user_convey_cate')->where('user_id',$userId)->where($conveyCateId)->find();
+        $info = Db::name('user_convey_cate')->where('user_id',$userId)->where('convey_cate_id',$conveyCateId)->find();
         if($info){
             $ret = Db::name('user_convey_cate')->where('id',$info['id'])->setInc('nums',1);
         }else{
@@ -30,6 +30,7 @@ class UserConveyCate extends Base
 
     public function sortUserCates($lists,$userId){
         $cates = $this->getUserCates($userId);
+        $cates = $cates?array_unique($cates):[];
         if(!$cates){
             return $lists;
         }