Esempio n. 1
0
?>
</textarea>
                <span>(最多可输入100个字符)</span>
            </p>


            <p class='m-top20' id="NoResult">
                &nbsp;<span class='f14' style='vertical-align: top;'>审核反馈:</span>
                <textarea rows='2' cols='50' id="noResultText" readonly><?php 
echo $data->NoResult;
?>
</textarea><br/>
            </p>
            <br />
            <?php 
$order = PapReturnGoods::model()->find('ReturnID=:returnID', array(':returnID' => $data['ID']));
$res = PapOrder::model()->findByPk($order['OrderID']);
?>
            <input type="hidden" id="pym" value="<?php 
echo $res['Payment'];
?>
">
            <?php 
if ($data->Type == 1) {
    ?>
                <span style="color: red">亲:注意哟!待收货(
                    物流代收
                    )订单,退货没有退款!</span>
            <?php 
}
?>
Esempio n. 2
0
 /**
  * 经销商物流退款-未收货
  */
 public function actionReturnposts()
 {
     $this->pageTitle = Yii::app()->name . '-' . "付款";
     $returnID = $_GET['returnID'];
     if ($returnID) {
         $lists[] = 1;
         $model = PapReturnOrder::model()->updateBypk($returnID, array('Status' => 4, 'PayMethod' => 2));
         if ($model) {
             $list = PapReturnGoods::model()->findAll("ReturnID=:ID", array(":ID" => $returnID));
             foreach ($list as $v) {
                 if (!in_array($v['OrderID'], $lists)) {
                     $model = PapOrder::model()->updateByPk($v['OrderID'], array("ReturnStatus" => 4));
                     $lists[] = $v['OrderID'];
                 }
             }
             //更改待审核提醒为已操作
             RemindService::updateRemindStatus($returnID, 4);
         }
         $this->redirect(array('Index'));
     } else {
         throw new CHttpException(404, '页面不存在');
     }
 }
Esempio n. 3
0
                </ul>
            <?php 
    }
    ?>
            <div class="float_l goods_show" style="height:<?php 
    echo $count > 1 ? $count * 135 + 1 : $count * 135;
    ?>
px;min-height:135px">
                <div class="goods_show1 float_l">
                    <div class="zwq_color m_top20">¥<?php 
    echo $data->RealPrice;
    ?>
</div>
                </div>
                 <?php 
    $return = PapReturnGoods::model()->findAll('OrderID=:orderid', array(':orderid' => $data['ID']));
    foreach ($return as $key => $value) {
        $return['ReturnID'] = $value['ReturnID'];
    }
    if ($return) {
        $returnorder = PapReturnOrder::model()->findByPk($return['ReturnID']);
    }
    ?>
                <div class="goods_show2 float_l">
                    <div class="m-top5">
                        <div>
                            <?php 
    if ($data->Payment == 1) {
        ?>
                                支付宝担保
                            <?php 
Esempio n. 4
0
 /**
  *    响应嘉配订单支付通知
  *
  *    @author    Garbin
  *    @param     int    $order_id
  *    @param     array  $notify_result
  *    @return    bool
  */
 public static function respondNotify($order_id, $notify_result)
 {
     $where = "ID = {$order_id}";
     //$data = array('RefundStatus' => $notify_result['trade_status']);
     //   $orderdata=array('ReturnStatus'=>'1','Status' => $notify_result['target']);
     switch ($notify_result['target']) {
         case RORDER_READY:
             $where .= ' AND Status <= ' . RORDER_PENDING;
             $data['AlipayTN'] = $notify_result['trade_no'];
             $data['Status'] = RORDER_READY;
             break;
         case RORDER_PENDING:
             // 付款, 待发货
             $where .= ' AND Status <= ' . RORDER_PENDING;
             $data['AlipayTN'] = $notify_result['trade_no'];
             $data['Status'] = RORDER_PENDING;
             $data['CreateTime'] = time();
             //更改提醒状态为已操作
             $returninfo = PapReturnOrder::model()->findByPk($order_id);
             RemindService::updateRemindStatus($order_id, 4, $returninfo['DealerID']);
             //发送待发货提醒给修理厂
             $params = array('OrganID' => $returninfo['ServiceID'], 'OrganType' => 3, 'HandleID' => $order_id);
             $params['type'] = array('name' => 'THD', 'key' => 5);
             RemindService::sendRemind($params, $returninfo);
             break;
         case RORDER_ACCEPTED:
             // 待收货
             $where .= ' AND Status <= ' . RORDER_ACCEPTED;
             $where .= ' AND Status >= ' . RORDER_PENDING;
             $data['Status'] = RORDER_ACCEPTED;
             $data['DeliveryTime'] = time();
             break;
         case RORDER_ABNORMAL:
             //已收货,完成
             $where .= ' AND Status <= ' . RORDER_ABNORMAL;
             $where .= ' AND Status >= ' . RORDER_ACCEPTED;
             $data['Status'] = RORDER_ABNORMAL;
             $return = PapReturnGoods::model()->find('ReturnID=:returnID', array(':returnID' => $order_id));
             if ($return) {
                 $orderID = $return['OrderID'];
                 if ($orderID) {
                     $wheres = "ID = {$orderID}";
                     PapOrder::model()->updateAll(array('ReturnStatus' => 4), $wheres);
                 }
             }
             break;
             //            case RORDER_READY_PAYPAL://退款 待付款
             //                  $where .= ' AND Status = ' . RORDER_READY_PAYPA;
             //                  $data['Status']=RORDER_READY_PAYPAL;
             //                  break;
             //            case RORDER_PAYPAL_FINISHED://退款完成
             //                  $where .= ' AND Status =' .RORDER_PAYPAL_FINISHED;
             //                  $data['Status']=RORDER_PAYPAL_FINISHED;
             //                  break;
     }
     //PapReturnOrder::model()->updateByPk($order_id,$data)
     //PapReturnOrder::model()->updateAll($data, $where)
     if (PapReturnOrder::model()->updateAll($data, $where)) {
         return true;
     } else {
         return false;
     }
 }
Esempio n. 5
0
 public function actionOrderGoods()
 {
     $this->layout = '//layouts/base';
     $goodsid = Yii::app()->request->getParam('goods');
     $version = Yii::app()->request->getParam('Version');
     $order = Yii::app()->request->getParam('Order');
     $return = Yii::app()->request->getParam('return');
     $quo = Yii::app()->request->getParam('quo');
     //版本信息
     $good = DealergoodsService::getmongoversion($goodsid, $version);
     $result = $good['GoodsInfo'];
     $result['SellerID'] = $result['OrganID'];
     if ($order) {
         $model = PapOrderGoods::model()->find(array('select' => 'ProPrice as Price,Quantity,MakeID,CarID,Year,ModelID', 'condition' => "OrderID={$order} and GoodsID={$goodsid}"))->attributes;
         $result['Quantity'] = $model['Quantity'];
         $result['Price'] = $model['Price'];
         $car = array('make' => $model['MakeID'], 'series' => $model['CarID'], 'year' => $model['Year'], 'model' => $model['ModelID']);
     } else {
         if ($return) {
             $model = PapReturnGoods::model()->find(array('select' => 'Price,OrderID', 'condition' => "ReturnID='{$return}' and GoodsID='{$goodsid}'"))->attributes;
             $result['Quantity'] = $model['Quantity'];
             $result['Price'] = $model['Price'];
             $ordermodel = PapOrderGoods::model()->find(array('select' => 'MakeID,CarID,Year,ModelID', 'condition' => "OrderID={$model['OrderID']} and GoodsID={$goodsid}"))->attributes;
             $car = array('make' => $ordermodel['MakeID'], 'series' => $ordermodel['CarID'], 'year' => $ordermodel['Year'], 'model' => $ordermodel['ModelID']);
         } else {
             if ($quo) {
                 $model = PapQuotationGoods::model()->findByPk($quo, array('select' => 'Price,Num', 'condition' => "GoodsID='{$goodsid}'"))->attributes;
                 $result['Quantity'] = $model['Num'];
                 $result['Price'] = $model['Price'];
             } else {
                 $this->redirect(array('index'));
             }
         }
     }
     //发货公告
     $model = new PapGoodsSendnotice();
     $notice = $model->find("OrganID = {$result['SellerID']}");
     //商品基本信息
     $result['GoodsID'] = $goodsid;
     $result['BrandName'] = $result['Brand'];
     $goods = PapGoods::model()->findByPk($goodsid, array('select' => 'IsSale,CommentNo'));
     $result['IsSale'] = $goods->attributes['IsSale'];
     $result['CommentNo'] = $goods->attributes['CommentNo'];
     if ($result['oeno']) {
         $oe = '';
         foreach ($result['oeno'] as $v) {
             $oe .= $v . ',';
         }
         $result['OENO'] = substr($oe, 0, -1);
     } else {
         $result['OENO'] = '';
     }
     //最小交易金额
     $result['MinTurnover'] = PapOrderMinTurnover::model()->find("OrganID=:ID", array(":ID" => $result['SellerID']))->attributes['MinTurnover'];
     //店家积分
     $result['TotalScore'] = DefaultService::getrecord($result['SellerID']);
     //店家信息
     $organInfo = Organ::model()->findByPk($result['SellerID'])->attributes;
     $result['OrganName'] = $organInfo['OrganName'];
     $result['QQ'] = $organInfo['QQ'];
     $result['Phone'] = $organInfo['Phone'];
     $result['Address'] = array(Area::getCity($organInfo['Province']), Area::getCity($organInfo['City']), Area::getCity($organInfo['Area']));
     //大类子类标准名称
     $result['StandCodeName'] = Gcategory::model()->find(array('select' => 'Name', 'condition' => "Code='{$result['StandCode']}'"))->attributes['Name'];
     $cpArr = MallService::getCategory($result['StandCode']);
     $result['BigName'] = $cpArr['BigParts'];
     $result['SubName'] = $cpArr['SubParts'];
     $result['sub'] = $cpArr['sub'];
     $result['ValidityType'] = $result['spec']['ValidityType'];
     $result['ValidityDate'] = $result['spec']['ValidityDate'];
     $result['BganCompany'] = $result['spec']['BganCompany'] ? $result['spec']['BganCompany'] : '';
     //标品
     $result['BganGoodsNO'] = $result['spec']['BganGoodsNO'] ? $result['spec']['BganGoodsNO'] : '';
     //标商
     $result['Unit'] = $result['spec']['Unit'] ? $result['spec']['Unit'] : '';
     //单位ID
     $result['UnitName'] = GoodsUnit::model()->findByPk($result['Unit'])->attributes['UnitName'];
     //单位
     $result['MinQuantity'] = $result['pack']['MinQuantity'] ? $result['pack']['MinQuantity'] : '';
     //最小包装
     // 图片
     if (!$result['img']) {
         $result['Images'][0]['ImageUrl'] = 'dealer/goods-img-big.jpg';
         $result['Images'][0]['BigImage'] = 'dealer/goods-img-big.jpg';
     } else {
         foreach ($result['img'] as $k => $v) {
             $result['Images'][$k]['MallImage'] = $v['MallImage'];
             $result['Images'][$k]['ImageUrl'] = $v['ImageUrl'];
             if (!$v['BigImage']) {
                 $result['Images'][$k]['BigImage'] = $v['ImageUrl'];
             } else {
                 $result['Images'][$k]['BigImage'] = $v['BigImage'];
             }
         }
     }
     if (!$result) {
         $this->redirect(array('index'));
     }
     $carmodeltext = MallService::getCarmodeltxt($car);
     $carfit = $car;
     $carfit['goodsid'] = $goodsid;
     $fitres = MallService::checkCarfit($carfit);
     $rows = $this->Getmaincate($result['SellerID']);
     $cate = $this->findsub($rows);
     $this->pageTitle = Yii::app()->name . '-' . "订单商品详情";
     //获取经销商客服列表
     $csparams['organID'] = $result['SellerID'];
     $csparams['type'] = 1;
     $csinfo = CsService::getcslists($csparams);
     $this->render('ordergoods', array('r' => $result, 'cate' => $cate, 'carmodeltext' => $carmodeltext, 'fitres' => $fitres['success'] == 1 ? 1 : 0, 'csinfo' => $csinfo, 'car' => $car, 'data' => $notice, 'goodsid' => $goodsid));
 }
Esempio n. 6
0
 public function actionNoreturnprice()
 {
     if (!$_POST['ID']) {
         $this->redirect(array('index'));
     }
     $id = $_POST['ID'];
     //后台ajax post:ID
     $m = PapReturnOrder::model()->findByPk($id);
     if (!$m) {
         $this->redirect(array('index'));
     }
     $order = PapReturnGoods::model()->findAll("ReturnID={$id}");
     foreach ($order as $v) {
         //$v['OrderID'] 退货商品表PapReturnGoods的OrderID对应PapOrder的ID
         PapOrder::model()->updateByPk($v['OrderID'], array('ReturnStatus' => 0), 'ReturnStatus = 11');
     }
     $edit = PapReturnOrder::model()->updateByPk($id, array("Status" => 16), "Status = 11 or Status = 12");
     if ($edit > 0) {
         //更改待审核提醒状态为已操作
         RemindService::updateRemindStatus($id, 4, $m['ServiceID']);
         echo json_encode(array('success' => 1));
     } else {
         echo json_encode(array('error' => '取消退货单失败,请稍后再试!'));
     }
 }
Esempio n. 7
0
 public static function getpassprice()
 {
     $ID = Yii::app()->request->getParam('ID');
     $model = PapReturnOrder::model()->updateByPk($ID, array("Status" => 14));
     $lists[] = 1;
     if ($model) {
         $list = PapReturnGoods::model()->findAll("ReturnID=:ID", array(":ID" => $ID));
         foreach ($list as $v) {
             if (!in_array($v['OrderID'], $lists)) {
                 $model = PapOrder::model()->updateByPk($v['OrderID'], array("ReturnStatus" => 14));
                 //订单状态 退款完成
                 $lists[] = $v['OrderID'];
             }
         }
     }
     return $model;
 }