north 7 năm trước cách đây
mục cha
commit
ac3d051129

+ 0 - 1
www/protected/controllers/HouseKeepingController.php

@@ -52,7 +52,6 @@ class HouseKeepingController extends AdminController
         if ($status != 100) {
             $criteria->status('==', $status);
         }
-        $criteria->status_time('!=',0);
         $criteria->sort('time',EMongoCriteria::SORT_DESC);
 
         $cursor = HouseKeeping::model()->findAll($criteria);

+ 14 - 1
www/protected/modules/j/controllers/HouseKeepingController.php

@@ -88,7 +88,6 @@ class HouseKeepingController extends JBaseController
         $status_time = intval(Yii::app()->request->getParam('status_time', ''));
         $server_end_time = intval(Yii::app()->request->getParam('server_end_time', ''));
         $id = Yii::app()->request->getParam('id');
-
         if (!CommonFn::isMongoId($id)) {
             CommonFn::requestAjax(false, '修改失败', array());
         }
@@ -158,6 +157,19 @@ class HouseKeepingController extends JBaseController
 
     }
 
+
+    public function actionFlag()
+    {
+        $id = Yii::app()->request->getParam('id');
+        if (!CommonFn::isMongoId($id)) {
+            CommonFn::requestAjax(false, '修改失败', array());
+        }
+        $h = HouseKeeping::get(new MongoId($id));
+        $h->flag = 1;
+        $success = $h->save();
+        CommonFn::requestAjax($success, '修改成功', array());
+    }
+
     public function actionAdd()
     {
         $mobile = (Yii::app()->request->getParam('mobile', ''));
@@ -194,6 +206,7 @@ class HouseKeepingController extends JBaseController
         $h->status_time = $status_time;
         $h->tech = $tech;
         $h->contract = 1;
+        $h->flag = 0;
         $h->time = time();
         $result = $h->save();
         if ($result) {

+ 2 - 0
www/protected/modules/o2o/models/HouseKeeping.php

@@ -29,6 +29,7 @@
      public $contract;//签约状态
      public $time;//创建时间
      public $store_id;//store id
+     public $flag;//默认为读
 
 
      //服务形式
@@ -112,6 +113,7 @@
          $newRow['contract_str'] = self::$contract_option[intval($newRow['contract'])];
          $newRow['type_str'] = self::$type_option[intval($newRow['type'])];
          $newRow['cart_str'] = self::$cart_options[intval($newRow['cart'])];
+         $newRow['flag'] = CommonFn::get_val_if_isset($row,'flag',0);
          foreach ($newRow['skill'] as $k => $v) {
              $newRow['skill_str'][] = self::$skill_options[intval($v)];
          }

+ 11 - 6
www/protected/views/houseKeeping/index.php

@@ -501,13 +501,18 @@
          },*/
 
         {field:'status_time', title:'预约时间', width:70,sortable:true,formatter: function(value, row){
-          var now=new Date(value*1000);
+          if (value == 0) {
+            return '未预约';
+          } else {
+            var now=new Date(value*1000);
+
+            var   month=now.getMonth()+1;
+            var   date=now.getDate();
+            var   hour = now.getHours();
+            var   minute = now.getMinutes();
+            return   month+"月"+date+"日"+hour+":"+minute;
+          }
 
-          var   month=now.getMonth()+1;
-          var   date=now.getDate();
-          var   hour = now.getHours();
-          var   minute = now.getMinutes();
-          return   month+"月"+date+"日"+hour+":"+minute;
         }
         },
        /* {field:'yc_time', title:'预产期', width:70,sortable:true,formatter: function(value, row){