Charlie 9 anni fa
parent
commit
f6320f0240

+ 0 - 1
www/index.php

@@ -1,5 +1,4 @@
 <?php
-
     //phpinfo();
     date_default_timezone_set('PRC');
     $yii = __DIR__.'/../framework/yii.php';

+ 9 - 2
www/protected/controllers/ROrderController.php

@@ -131,6 +131,8 @@ class ROrderController extends AdminController{
 
         $status = intval(Yii::app()->request->getParam('status',1));
 
+        $count = intval(Yii::app()->request->getParam('count',1));
+
         $booking_time = intval(Yii::app()->request->getParam('booking_time', time()));
 
         $deal_time = intval(Yii::app()->request->getParam('deal_time', time()));
@@ -141,6 +143,10 @@ class ROrderController extends AdminController{
         $technician_id = intval(Yii::app()->request->getParam('technician', 0));
         $technician_name = Yii::app()->request->getParam('technician_name', '');
 
+        if(!$count){
+            CommonFn::requestAjax(false, '购买数量错误');
+        }
+
         // 保洁师信息检查
         // 根据ID直接查询保洁师信息(优先使用联想功能)
         if ($technician_id != 0) {
@@ -307,6 +313,7 @@ class ROrderController extends AdminController{
         $order->booking_time = $booking_time;
         $order->deal_time = $deal_time;
         $order->remark = $remark;
+        $order->count = $count;
 
         //$order->station = new MongoId($station);
         // 是否通知保洁师
@@ -314,7 +321,7 @@ class ROrderController extends AdminController{
         $order->technician = $technician_id;
         $order->technician_name = $technician_name;
 
-        $arr_order = array('cancel_time','refund_time','finish_time','status','booking_time','deal_time','remark', 'station', 'technician', 'technician_name');
+        $arr_order = array('cancel_time','refund_time','finish_time','status','count','booking_time','deal_time','remark', 'station', 'technician', 'technician_name');
 
         $success = $order->save(true,$arr_order);
 
@@ -569,7 +576,7 @@ class ROrderController extends AdminController{
         $rOrder->order_time   = intval($order_time);
         $rOrder->price        = intval($price);
         $rOrder->final_price  = intval($final_price);
-        $rOrder->precedence   = intval($precedence);
+        //$rOrder->precedence   = intval($precedence);
         $rOrder->coupons      = $coupons;
         $rOrder->user         = $user;
         $rOrder->status       = intval($status);

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

@@ -150,8 +150,10 @@ class ROrder extends MongoAr
         $newRow['cancel_time_str'] = $newRow['cancel_time']?CommonFn::sgmdate("Y年n月d日:H:i:s", $newRow['cancel_time'],1):'';
         $newRow['refund_time_str'] = $newRow['refund_time']?CommonFn::sgmdate("Y年n月d日:H:i:s", $newRow['refund_time'],1):'';
 
+
         $newRow['sum_price'] = 0;
         $newRow['price'] = CommonFn::get_val_if_isset($row,'price',0);
+        $newRow['af_sum_price'] = $newRow['price'];
         $newRow['final_price'] = intval(CommonFn::get_val_if_isset($row,'final_price',0));
         $newRow['sum_price'] = $newRow['final_price'];
         $newRow['memo'] = CommonFn::get_val_if_isset($row,'memo','');

+ 23 - 2
www/protected/views/rOrder/index.php

@@ -75,6 +75,16 @@
                                         </div>
                                     </div>
                                 </li>
+                                <li class="f_item">
+                                    <div class="box">
+                                        <div class="f_label">
+                                            <span>数量: </span>
+                                        </div>
+                                        <div class="box_flex f_content">
+                                            <span id="counts" name="counts" style="width: 250px;"></span>
+                                        </div>
+                                    </div>
+                                </li>
                                 <li class="f_item">
                                     <div class="box">
                                         <div class="f_label">
@@ -385,7 +395,16 @@
                         </div>
                     </div>
                 </li>
-
+                <li class="f_item">
+                    <div class="box">
+                        <div class="f_label">
+                            <span>购买数量: </span>
+                        </div>
+                        <div class="box_flex f_content">
+                            <input id="set_count" name="counts"  placeholder="1" />
+                        </div>
+                    </div>
+                </li>
                 <li class="f_item">
                     <div class="box">
                         <div class="f_label">
@@ -881,7 +900,7 @@
                     return get_filed_text(value, status_data);
                 }
             },
-            {field:'channel', title:'来源', width:50,sortable:false},
+            {field:'counts', title:'数量', width:50,sortable:false},
             {field:'score', title:'评价',width:20,
                 formatter:function(value, row) {
                     if (value == 100) {
@@ -1021,6 +1040,7 @@
 
             $("#on_loading").show();
             $('#pay_channel').html(data.pay_channel);
+            $('#counts').html(data.counts);
             $('#charge_id').html(data.charge_id);
             $('#memo').html(data.memo);
             $('#id_str').html(data.id);
@@ -1037,6 +1057,7 @@
             jq_content_form.form('clear');
             jq_resetTec_form.form('clear');
             $('#id_str').html('');
+            $('#counts').html('');
             $('#booking_time_str').val('');
             $('#deal_time_str').val('');
             jq_action_info.html('');