public static function remindService($params) { $service = ' select OrganName,Phone from jpd_organ where ID=' . $params['OrganID']; $serviceres = Yii::app()->jpdb->createCommand($service)->queryRow(); $scheme = 'SELECT SchID FROM `pap_quotation_scheme` where QuoID=' . $params['quoID']; $schemeres = Yii::app()->papdb->createCommand($scheme)->queryRow(); //获取支付方式折扣率 $discount = PapOrderDiscount::model()->find('OrderType=:OrderType', array(':OrderType' => 2)); if ($discount) { if ($params['Payment'] == 1) { $factdiscount = $discount['OrderAlipay'] ? $discount['OrderAlipay'] : 100; } else { if ($params['Payment'] == 2) { $factdiscount = $discount['OrderLogis'] ? $discount['OrderLogis'] : 100; } } } else { $factdiscount = 100; } $totalprices = self::Getsumprices($schemeres['SchID'], $factdiscount, trim($params['DealerID'], ',')); $msg = '尊敬的' . $serviceres['OrganName'] . '客户,您的报价单方案已生成,总计' . $totalprices . '元。回复 ' . $params['checkSN'] . 'Y 确认、' . $params['checkSN'] . 'N 拒绝。详情:'; $dealerinfo = QuotationService::getorganinfo(array('organID' => trim($params['DealerID'], ','), 'identity' => 2)); //收货地址 $addressql = ' select ContactName,State,City,District,Address from jpd_receive_address where ID=' . $params['AddressID']; $address = Yii::app()->jpdb->createCommand($addressql)->queryRow(); $address['site'] = Area::getaddress($address['State'], $address['City'], $address['District']) . $address['Address']; //获取报价单商品 $goodssql = ' SELECT GoodsID,Num from pap_quotation_goods where SchID=' . $schemeres['SchID']; $goodses = Yii::app()->papdb->createCommand($goodssql)->queryAll(); foreach ($goodses as $g) { $sql = ' select Name from pap_goods where ID=' . $g['GoodsID']; $gres = Yii::app()->papdb->createCommand($sql)->queryRow(); $msg .= $gres['Name'] . ',' . $g['Num'] . '个;'; } $msg .= '收货地址:' . $address['site'] . ';收货人:' . $address['ContactName'] . '。若有疑问请联系经销商:' . $dealerinfo['OrganName'] . ',电话:' . $dealerinfo['Phone'] . '。'; $res = F::sendSMS(array('msg' => $msg, 'phone' => $serviceres['Phone'])); if ($res['code'] == 0) { //发送成功,添加报价单短信确认数据 $time = $_SERVER['REQUEST_TIME']; $insertsql = ' insert into pap_quotation_confirm (QuoID,DealerID,ServiceID,CreateTime) values(' . $params['quoID'] . $params['DealerID'] . $params['OrganID'] . ',' . $time . ')'; $count = Yii::app()->papdb->createCommand($insertsql)->execute(); } return $res; }
</p> <div class="info-box"> <div id="serviceinfo" style="display:none"> <p class="m-top20"><b>修理厂信息</b></p> <ul class="zdyul m-top"> <li>修理厂名称:<span name="name"><?php echo $service['OrganName']; ?> </span></li> <li>联系电话:<span name="phone"><?php echo $service['Phone']; ?> </span></li> <li style="width:650px;padding-left:30px;text-indent:-30px">地址:<span name="address"><?php echo Area::getaddress($service[Province], $service[City], $service[Area]) . $service[Address]; ?> </span></li> <li style="width:650px;">客户类别及折扣:<span name="type"><?php echo $service['type']; ?> </span></li> <div style="clear:both"></div> <p class=" m-top5"></p> </ul> </div> <div style="clear:both"></div> <p class="m-top20"><b>经销商信息</b></p> <ul class="zdyul m-top"> <li>经销商名称:<span><?php echo $dealer['OrganName'];
public static function showAddress($province, $city, $area) { $address = Area::getaddress($province, $city, $area); return $address; }
public static function showaddress($data) { return Area::getaddress($data['State'], $data['City'], $data['District']) . $data['Address']; }
public static function getDealerinfodizhi($id) { $sql = 'select Province,City,Area from jpd_organ where ID="' . $id . '"'; $result = Yii::app()->jpdb->createCommand($sql)->queryRow(); return Area::getaddress($result['Province'], $result['City'], $result['Area']); }