Exemple #1
0
            <!--<span class="tab-hd-con bor_right" key="current4"><a href="javascript:;">异常订单</a></span>--> 
        </div>
        <div class="tab-bd dom-display dom-display8">
            <div class="tab-bd-con current1"> 
                <?php 
//                var_dump(InquiryService::getinqlists($params));
$this->widget('widgets.default.WGridView', array('dataProvider' => InquiryService::getinqlists(array()), 'columns' => array(array('name' => '#', 'value' => '$data[rowNO]'), array('name' => '询价单编号', 'value' => ' $data["InquirySn"]'), array('name' => '发起方', 'value' => 'QuotationService::getservicename($data["OrganID"])'), array('name' => '询价时间', 'value' => 'date("Y-m-d H:i:s",$data["CreateTime"])'), array('name' => '状态', 'type' => 'raw', 'value' => '$data["stamsg"]'), array('name' => '询价单详情', 'type' => 'raw', 'value' => '$data["Info"]'))));
?>
                <div><a class="indexmore" href="<?php 
echo Yii::app()->createUrl("pap/inquirylist/index");
?>
">查看更多</a></div>
            </div>
            <div class="tab-bd-con current2" style="display: none;"> 
                <?php 
$this->widget('widgets.default.WGridView', array('dataProvider' => InquiryService::getinqlists(array('status' => 0)), 'columns' => array(array('name' => '#', 'value' => '$data[rowNO]'), array('name' => '询价单编号', 'value' => ' $data["InquirySn"]'), array('name' => '发起方', 'value' => 'QuotationService::getservicename($data["OrganID"])'), array('name' => '询价时间', 'value' => 'date("Y-m-d H:i:s",$data["CreateTime"])'), array('name' => '状态', 'type' => 'raw', 'value' => '$data["stamsg"]'), array('name' => '询价单详情', 'type' => 'raw', 'value' => '$data["Info"]'))));
?>
                <div><a class="indexmore" href="<?php 
echo Yii::app()->createUrl("pap/inquirylist/index/sta/0");
?>
">查看更多</a></div>
            </div>
            <div class="tab-bd-con current3" style="display: none;"> 
                <?php 
//                var_dump(SellerorderService::getSellOrderList(array('Status' => 2, 'pageSize' => 10)));
$Orderlist = SellerorderService::getSellOrderList(array('Status' => 2, 'pageSize' => 10, 'starttime' => 1));
// var_dump($Orderlist);exit;
$this->widget('widgets.default.WGridView', array('dataProvider' => $Orderlist['dataProvider'], 'columns' => array(array('name' => '#', 'value' => '$data[rowNO]'), array('name' => '下单时间', 'value' => 'SellerorderService::returnTime($data[CreateTime])'), array('name' => '订单编号', 'value' => '$data[OrderSN]'), array('name' => '机构名称', 'value' => '$data[BuyerName]'), array('name' => '总金额', 'value' => '¥.$data[RealPrice]'), array('name' => '订单详情', 'type' => 'raw', 'value' => '$data[Info]'))));
?>
                <div><a class="indexmore" href="<?php 
echo Yii::app()->createUrl("pap/sellerorder/index", array('Status' => 2, 'type' => 2));
Exemple #2
0
 public function actionSaveedit()
 {
     $data = $_POST;
     $data['quoprices'] = $data['totalprices'];
     $data['shipprices'] = 0;
     if ($data['type'] == 1) {
         //报价单
         if ($data['quoid'] && $data['schid']) {
             //修改
             QuotationService::editscheme($data);
         } else {
             //新建
             QuotationService::newscheme($data);
         }
     } else {
         //询价单
         if ($data['schid']) {
             //修改
             InquiryService::editscheme($data);
         } else {
             //新建
             InquiryService::newscheme($data);
         }
     }
 }
Exemple #3
0
 public function actionInquirydetail()
 {
     $inquiryid = Yii::app()->request->getParam('inquiryID');
     if (!$inquiryid) {
         throw new CHttpException('404');
     }
     //获取询价单信息
     $inquiryinfo = RPCClient::call('InquiryorderService_getinquirybyid', $inquiryid);
     if (!$inquiryinfo) {
         throw new CHttpException('404', '没有该询价单');
     }
     //获取发送经销商信息
     $dealerID = str_replace(',', '', $inquiryinfo['DealerID']);
     $sql_senddealer = 'select * from jpd_organ where ID=' . $dealerID;
     $delaer_info = InquiryorderService::excutesql(array('sql' => $sql_senddealer, 'db' => 'jpd'));
     //获取附件信息
     $inquiryimgs = RPCClient::call('InquiryorderService_getinquiryimgs', $inquiryid);
     //获取配件信息
     $sql = 'select * from pap_inquiry_category where InquiryID=' . $inquiryid;
     $categpry = InquiryorderService::excutesql(array('sql' => $sql, 'db' => 'pap'));
     if (!empty($categpry)) {
         $datacate = new CArrayDataProvider($categpry, array('pagination' => array('pageSize' => count($categpry))));
     } else {
         $datacate = '';
     }
     $prams = array('inquiryID' => $inquiryid, 'dealerids' => $inquiryinfo['DealerID']);
     $res;
     if ($inquiryinfo['Make']) {
         $paramas['Make'] = $inquiryinfo['Make'];
         $paramas['Car'] = $inquiryinfo['Car'];
         $paramas['Year'] = $inquiryinfo['Year'];
         $paramas['Model'] = $inquiryinfo['Model'];
         $res = InquiryService::getcarmodel($paramas);
     }
     //获取报价单信息
     $sql_findquo = 'select * from pap_quotation where InquiryID=' . $inquiryid . ' and IfSend="2"';
     $ars = InquiryorderService::excutesql(array('sql' => $sql_findquo, 'db' => 'pap'));
     $schinfo = '';
     $discount;
     if (!empty($ars)) {
         $schparams['quoid'] = $ars[0]['QuoID'];
         $schparams['type'] = 6;
         $schparams['sid'] = Yii::app()->user->getOrganID();
         $schinfo = QuotationService::getschemelists($schparams);
         //获取经销商最小交易额
         $miniprice = 0;
         $sql_findmini = 'select MinTurnover from pap_order_min_turnover where OrganID=' . $ars[0]['DealerID'];
         $lms_results = InquiryorderService::excutesql(array('sql' => $sql_findmini, 'db' => 'pap'));
         if ($lms_results && $lms_results[0]['MinTurnover']) {
             $miniprice = $lms_results[0]['MinTurnover'];
         }
         //获取经销商的折扣率
         $sql_finddiscount = 'select * from pap_order_discount where OrderType=2 ';
         $discount = InquiryorderService::excutesql(array('sql' => $sql_finddiscount, 'db' => 'pap'));
         if ($discount) {
             $discount[0]['OrderAlipay'] = $discount[0]['OrderAlipay'] ? $discount[0]['OrderAlipay'] . '%' : '';
             $discount[0]['OrderLogis'] = $discount[0]['OrderLogis'] ? $discount[0]['OrderLogis'] . '%' : '';
         }
     }
     //如果报价单已确认,查询订单ID
     $goodsdata;
     $sumtotal = 0;
     if (!empty($ars) && $ars[0]['OrderID']) {
         $sql_find_sum = 'select GoodsAmount from pap_order where ID=' . $ars[0]['OrderID'];
         $sum = Yii::app()->papdb->createCommand($sql_find_sum)->queryRow();
         $sumtotal = $sum['GoodsAmount'];
         $sql_find_goods = 'select * from pap_order_goods where OrderID=' . $ars[0]['OrderID'];
         $goodsinfo = Yii::app()->papdb->createCommand($sql_find_goods)->queryAll();
         $rearray = array();
         $partlevel = Yii::app()->getParams()->PartsLevel;
         $totals = 0;
         foreach ($goodsinfo as $key => $value) {
             //插入配件档次
             $pat_sql = 'select PartsLevel from pap_goods where ID=' . $value['GoodsID'];
             $final = Yii::app()->papdb->createCommand($pat_sql)->queryRow();
             $value['PL'] = $partlevel[$final['PartsLevel']];
             $value['GoodsOE'] = '<div style="width: 120px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="' . $value['GoodsOE'] . '" >' . $value['GoodsOE'] . '</div>';
             //self::getmaxlength($value['GoodsOE'], 8, true);
             $value['rowNo'] = $key + 1;
             $value['GoodsName'] = '<div  href="javascript:void(0);" goodsid="' . $value['GoodsID'] . '"  orderid="' . $value['OrderID'] . '" version="' . $value['Version'] . '" class="quottion_goods_href" title="' . $value['GoodsName'] . '"  style="width: 100px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;cursor:pointer;">' . $value['GoodsName'] . '</div>';
             $value['GoodsNum'] = '<div   href="javascript:void(0);" goodsid="' . $value['GoodsID'] . '"  orderid="' . $value['OrderID'] . '" version="' . $value['Version'] . '" class="quottion_goods_href"  title="' . $value['GoodsNum'] . '" style="width: 80px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;cursor:pointer;">' . $value['GoodsNum'] . '</div>';
             $rearray[$key] = $value;
         }
         $goodsdata = new CArrayDataProvider($rearray, array('pagination' => array('pageSize' => count($rearray))));
     }
     //己方地址
     $address = RPCClient::call('InquiryorderService_getaddressid', Yii::app()->user->getOrganID());
     $addressprovider = RPCClient::call('InquiryorderService_dataproviderpage', $address);
     $model = new JpdReceiveAddress();
     $this->render('inquirydetail', array('inquiryinfo' => $inquiryinfo, 'res' => $res, 'imsgs' => $inquiryimgs, 'category' => $datacate ? $datacate : '', 'schinfo' => $schinfo ? $schinfo['schinfo'] : $schinfo, 'model' => $model, 'quoinfo' => $ars ? $ars[0] : $ars, 'address' => $addressprovider, 'discount' => $discount ? $discount[0] : $discount, 'mini' => $miniprice, 'goodsdata' => $goodsdata ? $goodsdata : '', 'sumtotal' => $sumtotal, 'dealer_info' => $delaer_info ? $delaer_info[0] : ''));
 }
Exemple #4
0
 public function actionViewquo()
 {
     $params['inqid'] = Yii::app()->request->getParam('inqid');
     //获取询价单信息
     $inqres = InquiryService::getinqinfo($params['inqid']);
     //查询是否已经发送报价单
     $params['type'] = 1;
     $quoid = InquiryService::ifsendquo($params);
     if ($quoid) {
         //获取报价单方案
         $schparams['quoid'] = $quoid;
         $schparams['type'] = 4;
         $res = QuotationService::getschemelists($schparams);
     }
     $this->render('viewquo', array('inqres' => $inqres, 'schinfo' => $res['schinfo'], 'quoinfo' => $res['quoinfo']));
 }
Exemple #5
0
    <input type="hidden" id="ifupdate" value="<?php 
echo $update;
?>
">
    <div class="bor_back">
        <p class="txxx">商品信息<span class="float_r" style="margin-right:20px ;*margin-top:-35px"><a href="<?php 
echo Yii::app()->createUrl('/pap/inquirylist/scheme', $url);
?>
" class="color_blue" style="font-weight:400">返回方案页</a></span></p>
        <div class="txxx_info4">
            <span>适用车系:</span>
            <?php 
$this->widget('widgets.default.WGoodsModel', array('scope' => 'epc', 'notlink' => 'N', 'link' => 'Y', 'all' => 'N', 'make' => $inqres['baseinfo']['Make'], 'series' => $inqres['baseinfo']['Car'], 'year' => $inqres['baseinfo']['Year'], 'model' => $inqres['baseinfo']['Model'], 'dealerID' => 'exist'));
?>
            <?php 
$res = InquiryService::getpartssource($inqid);
if ($res) {
    echo '<span style="padding-left:10px;">配件信息:</span>';
    $params = array('empty' => '请选择配件品类', 'id' => 'parts', 'class' => 'width150 select');
    $params['options'] = $res['options'];
    echo CHtml::dropDownlist('parts', '', $res['cpnames'], $params);
}
?>
            <!--经销商商品--->
            <?php 
$this->renderpartial('/quotation/goods', array('goodslist' => $goodslist));
?>
        </div>
    </div>

    <!--报价单商品--->