public static function getSkuDailyStatus($sku) { self::initDB(); $sql = "SELECT * FROM `om_sku_daily_status` WHERE sku = '{$sku}' "; $query = self::$dbConn->query($sql); $goodsInfo = self::$dbConn->fetch_array($query); if (!$goodsInfo) { return false; } $goodsInfo['purchaseName'] = UserModel::getUsernameById($goodsInfo['purchaseId']); $goodsInfo['enableCount'] = 0; //OldsystemModel::getEnableGoodscount($sku); return $goodsInfo; }
public function view_skuInfo() { $sku = isset($_GET['sku']) ? trim($_GET['sku']) : ""; //$spu = ExportsToXlsModel::getGoods($sku); $spu = GoodsModel::getSkuList($sku); $spu = $spu['spu']; $where = "where spu = '{$spu}'"; $skuinfo = OmAvailableModel::getTNameList("pc_goods", "*", $where); $skuStock = array(); foreach ($skuinfo as $key => $value) { $sku = $value['sku']; //获取库存 $skuStock = WarehouseAPIModel::getSkuStock($sku); //获取料号信息 //$skumsg = ExportsToXlsModel::getGoods($sku); $skumsg = GoodsModel::getSkuList($sku); //获取缓存表信息 $where = "where sku='{$sku}'"; $skuStatics = OmAvailableModel::getTNameList("om_sku_daily_status", "*", $where); $skuStockList = array(); $skuStockList['nums'] = $skuStock; $skuStockList['sku'] = $skumsg['sku']; $skuStockList['spu'] = $skumsg['spu']; $skuStockList['goodsName'] = $skumsg['goodsName']; $skuStockList['goodsCost'] = $skumsg['goodsCost']; $skuStockList['goodsWeight'] = $skumsg['goodsWeight']; $skuStockList['AverageDailyCount'] = $skuStatics['AverageDailyCount']; $skuStockList['waitingSendCount'] = $skuStatics['waitingSendCount']; $skuStockList['xuniCount'] = $skuStatics['waitingSendCount']; $skuStockList['goodsStatus'] = $skumsg['goodsStatus']; $path = $skumsg['goodsCategory']; $cateName = GoodsModel::getCategoryInfoByPath($path); $skuStockList['cateName'] = $cateName['name']; $skuStockList['isNew'] = $skumsg['isNew']; $skuStockList['pmId'] = $skumsg['pmId']; $pmName = GoodsModel::getMaterInfoById($skumsg['pmId']); $skuStockList['pmName'] = $pmName['pmName']; //print_r($pmName); $pName = $skumsg['purchaseId']; $skuStockList['pName'] = UserModel::getUsernameById($pName); $skuStockList['isPacking'] = $skumsg['isPacking']; $skuStockList['whName'] = "深圳A仓"; $skuStock_arr[] = $skuStockList; } $this->smarty->assign("skuStockList", $skuStock_arr); //print_r($skuStockList); $this->smarty->display("skuInfo.htm"); }
public static function combineOrder($orderIdArr) { self::initDB(); BaseModel::begin(); //开始事务 $serchSql = "SELECT * FROM om_unshipped_order WHERE id in ('" . join("','", $orderIdArr) . "') and is_delete = 0 and storeId = 1 "; $querySql = self::$dbConn->query($serchSql); $serchSqlArr = self::$dbConn->fetch_array_all($querySql); //判断一:订单数量统计 if (count($serchSqlArr) < 2) { self::$errCode = "1111"; self::$errMsg = "合并订单最少需要选择两个或两个以上的订单!"; return false; } $platfrom = omAccountModel::getPlatformSuffixById($serchSqlArr[0]['platformId']); $extension = $platfrom['suffix']; //获取后缀名称 $temporderStatus = ""; //相同状态一 $temporderStatus2 = ""; //相同状态二 $userinfo = array(); //订单相同条件 $orderSn = array(); //订单编号 $onlineTotal = 0; //线上总价 $actualTotal = 0; //实际收款总价 $calcWeight = 0; //估算重量,单位是kg $calcShipping = 0; //估算运费 foreach ($serchSqlArr as $selectArr) { $orderSn[] = $selectArr['id']; $onlineTotal += $selectArr['onlineTotal']; $actualTotal += $selectArr['actualTotal']; $calcWeight += $selectArr['calcWeight']; $calcShipping += $selectArr['calcShipping']; //判断二:订单被其他人 <锁定> 订单判断 if ($selectArr['isLock'] == 1) { self::$errCode = "2222"; self::$errMsg = "订单[" . $selectArr['id'] . "]已经被 [" . UserModel::getUsernameById($selectArr['lockUser']) . "] 锁定,不能合并操作。"; return false; } //判断三:已合并订单,无法再次合并判断 if (in_array($selectArr['combineOrder'], array(1, 2))) { self::$errCode = "3333"; self::$errMsg = "订单[" . $selectArr['id'] . "]已经有订单合并操作,不能重复订单合并。"; return false; } //判断四:已合并包裹订单,无法合并判断 if (in_array($selectArr['combinePackage'], array(1, 2))) { self::$errCode = "4444"; self::$errMsg = "订单[" . $selectArr['id'] . "]是合并包裹订单,不能订单合并操作。"; return false; } //判断五:订单信息不相同判断 $userinfsql = "SELECT * FROM om_unshipped_order_userInfo WHERE omOrderId = {$selectArr['id']}"; $userinfsql = self::$dbConn->fetch_first($userinfsql); $tempArr = array(); $tempArr['accountId'] = trim($selectArr['accountId']); $tempArr['platformUsername'] = trim($userinfsql['platformUsername']); $tempArr['username'] = trim($userinfsql['username']); $tempArr['countryName'] = trim($userinfsql['countryName']); $tempArr['state'] = trim($userinfsql['state']); $tempArr['city'] = trim($userinfsql['city']); $tempArr['street'] = trim($userinfsql['street']); $tempArr['currency'] = trim($userinfsql['currency']); //币种判断 if (!empty($userinfo) && $userinfo != $tempArr) { self::$errCode = "5555"; self::$errMsg = "订单信息不相同,无法合并订单操作。"; return false; } $userinfo = $tempArr; //订单信息相同,进入下次比较。 //判断六:同状态判断 $orderStatus = ""; //订单状态一 $orderType = ""; //订单状态二 $orderStatus = $selectArr['orderStatus']; $orderType = $selectArr['orderType']; if (!empty($temporderStatus) && $temporderStatus != $orderStatus) { self::$errCode = "6666"; self::$errMsg = "订单不在同一文件夹,无法合并订单操作。"; return false; } $temporderStatus = $orderStatus; if (!empty($temporderStatus2) && $temporderStatus2 != $orderType) { self::$errCode = "6666"; self::$errMsg = "订单不在同一文件夹,无法合并订单操作。"; return false; } $orderExtensql = "SELECT * FROM om_unshipped_order_extension_" . $extension . " WHERE omOrderId = {$selectArr['id']}"; $orderExtensql = self::$dbConn->fetch_first($orderExtensql); $temporderStatus2 = $orderType; } $insertOrder = array(); $insertOrder['orderData'] = $serchSqlArr[0]; $insert_userinfo = $userinfsql; unset($insert_userinfo['omOrderId']); $insertOrder['orderUserInfoData'] = $insert_userinfo; $insert_orderExtensql = $orderExtensql; unset($insert_orderExtensql['omOrderId']); $insertOrder['orderExtenData'] = $insert_orderExtensql; //$insertOrder['orderNote'] = $userinfsql; unset($insertOrder['orderData']['id']); $insertOrder['orderData']['onlineTotal'] = $onlineTotal; $insertOrder['orderData']['actualTotal'] = $actualTotal; $insertOrder['orderData']['calcWeight'] = $calcWeight; $insertOrder['orderData']['calcShipping'] = $calcShipping; $insertOrder['orderData']['orderAddTime'] = time(); $insertOrder['orderData']['combineOrder'] = 2; $insertOrder['orderData']['orderAttribute'] = 3; //$insertOrder['orderDetail'] = array(); $detailSql = "SELECT * FROM om_unshipped_order_detail WHERE omOrderId in ('" . join("','", $orderIdArr) . "') and is_delete = 0 and storeId = 1 "; $detailSql = self::$dbConn->query($detailSql); $detailSqlArr = self::$dbConn->fetch_array_all($detailSql); $orderDetail = array(); foreach ($detailSqlArr as $value) { //$orderDetailData = array(); //$orderDetailExtenData = array(); $obj_orderDetail = $value; unset($obj_orderDetail['id']); unset($obj_orderDetail['omOrderId']); $orderDetailData = $obj_orderDetail; $detailExtenSql = "SELECT * FROM om_unshipped_order_detail_extension_" . $extension . " WHERE omOrderdetailId = '" . $value['id'] . "' "; $detailExtenSql = self::$dbConn->query($detailExtenSql); $detailExtenSqlArr = self::$dbConn->fetch_array($detailExtenSql); $obj_orderDetailExten = $detailExtenSqlArr; unset($obj_orderDetailExten['omOrderdetailId']); $orderDetailExtenData = $obj_orderDetailExten; $orderDetail[] = array('orderDetailData' => $orderDetailData, 'orderDetailExtenData' => $orderDetailExtenData); } $insertOrder['orderDetail'] = $orderDetail; //var_dump($insertOrder); exit; if ($insertId = OrderAddModel::insertAllOrderRowNoEvent($insertOrder)) { //echo $split_log .= 'insert success!' . "\n"; exit; //var_dump($_mainId,$_spitId); exit; if (!OrderLogModel::insertOrderLog($insertId, '合并产生新订单')) { BaseModel::rollback(); self::$errCode = '001'; self::$errMsg = "合并失败!"; return false; } if (!OrderRecordModel::insertCombineRecord($serchSqlArr[0]['id'], $insertId)) { BaseModel::rollback(); self::$errCode = '002'; self::$errMsg = "合并订单失败添加记录失败!"; return false; } $updateOrder = array(); $updateOrder['is_delete'] = 1; $updateOrder['combineOrder'] = 1; if (!OrderindexModel::updateOrder("om_unshipped_order", $updateOrder, " WHERE id in ('" . join("','", $orderSn) . "')")) { BaseModel::rollback(); //事物回滚 self::$errCode = "0012"; self::$errMsg = "合并更新原始订单失败!"; return false; } } else { //$split_log .= '补寄新订单产生失败!' . "\n"; BaseModel::rollback(); self::$errCode = '003'; self::$errMsg = "合并新订单产生失败"; return false; } BaseModel::commit(); self::$errCode = '200'; self::$errMsg = "合并新订单成功!"; return TRUE; }
public static function getPurchaseInfoBySku($sku) { self::initDB(); $sql = "SELECT purchaseId FROM `pc_goods` WHERE sku = '{$sku}' and is_delete = 0 "; $query = self::$dbConn->query($sql); $goodsInfo = self::$dbConn->fetch_array($query); if (empty($goodsInfo)) { return false; } return UserModel::getUsernameById($goodsInfo['purchaseId']); }
public function view_iqcExportExcel() { header("Content-type:text/html;charset=utf-8"); $condition = array(); $where = ""; $sku = trim($_POST['sku']); $d_status = $_POST['d_status']; //导出类型:0->显示所以信息 1:->不良品统计表导出 $isCombine = $_POST['isCombine']; //是否合并:0->需要合并 1:->默认不合并 $sellerId = $_POST['sellerId']; //大卖家ID $j_status = $_POST['j_status']; //检测类型 $t_status = $_POST['t_status']; //SKU分类检测 if (!empty($_POST['startTime']) && !empty($_POST['endTime'])) { $startTime = strtotime(trim($_POST['startTime'])); //开始时间 $endTime = strtotime(trim($_POST['endTime'])); //结束时间 $condition[] = "checkTime BETWEEN {$startTime} AND {$endTime}"; $startTime = trim($_POST['startTime']); //开始时间 $endTime = trim($_POST['endTime']); //结束时间 } $condition[] = "sellerId = '{$sellerId}'"; if (!empty($j_status)) { $condition[] = "checkTypeID = '{$j_status}'"; } if (!empty($t_status)) { $condition[] = "skuTypeCheckID = '{$t_status}'"; } if (!empty($sku)) { $condition[] = "sku = '{$sku}'"; } $combine = false; if ($d_status == 1) { if ($isCombine == 0) { $combine = true; $condition[] = "rejectsNum > 0 GROUP BY sku"; } else { $condition[] = "rejectsNum > 0"; } } $where = "where " . implode(" and ", $condition); $IqcCompleteInfoAct = new IqcCompleteInfoAct(); $iqcCompleteInfoList = $IqcCompleteInfoAct->act_iqcCompleteInfo($where, $combine); //echo "<pre>"; print_r($iqcCompleteInfoList); exit; //检测类型 $qcStandard = new qcStandardAct(); $detectionTypeArrList = $qcStandard->act_detectionTypeList($this->where); $detectionTypeArr = array(); foreach ($detectionTypeArrList as $listValue) { $detectionTypeArr[$listValue['id']] = $listValue['typeName']; } //SKU分类检测 $qcStandard = new qcStandardAct(); $skuTypeQcArrList = $qcStandard->act_skuTypeQcList($this->where); $skuTypeQcArr = array(); foreach ($skuTypeQcArrList as $skuTypeList) { $skuTypeQcArr[$skuTypeList['id']] = $skuTypeList['typeName']; } //echo "<pre>";print_r($detectionTypeArrList); exit; $objPHPExcel = new PHPExcel(); $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")->setLastModifiedBy("Maarten Balliauw")->setTitle("Office 2007 XLSX Test Document")->setSubject("Office 2007 XLSX Test Document")->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")->setKeywords("office 2007 openxml php")->setCategory("Test result file"); $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A1', '导出类型'); $objPHPExcel->setActiveSheetIndex(0)->setCellValue('B1', '料号'); $objPHPExcel->setActiveSheetIndex(0)->setCellValue('C1', '名称'); $objPHPExcel->setActiveSheetIndex(0)->setCellValue('D1', '到货数'); $objPHPExcel->setActiveSheetIndex(0)->setCellValue('E1', '检测类型'); $objPHPExcel->setActiveSheetIndex(0)->setCellValue('F1', '抽检数'); $objPHPExcel->setActiveSheetIndex(0)->setCellValue('G1', 'SKU分类检测'); $objPHPExcel->setActiveSheetIndex(0)->setCellValue('H1', '不良数'); $objPHPExcel->setActiveSheetIndex(0)->setCellValue('I1', '不良原因'); $objPHPExcel->setActiveSheetIndex(0)->setCellValue('J1', '检测人'); $objPHPExcel->setActiveSheetIndex(0)->setCellValue('K1', '检测时间'); $objPHPExcel->setActiveSheetIndex(0)->setCellValue('L1', '大卖家'); //echo "<pre>"; print_r($iqcCompleteInfoList); exit; if ($d_status == 1) { $objPHPExcel->setActiveSheetIndex(0)->getCell('A2')->setValueExplicit('不良品统计表', PHPExcel_Cell_DataType::TYPE_STRING); } else { $objPHPExcel->setActiveSheetIndex(0)->getCell('A2')->setValueExplicit('检测信息统计', PHPExcel_Cell_DataType::TYPE_STRING); } $a = 2; if (!empty($iqcCompleteInfoList)) { foreach ($iqcCompleteInfoList as $key => $iqcExportArr) { //echo $skuTypeQcArr[$iqcExportArr['skuTypeCheckID']]; echo "<br>"; if (is_numeric($iqcExportArr['checkUser'])) { $username = UserModel::getUsernameById($iqcExportArr['checkUser']); if (!empty($username)) { $iqcExportArr['checkUser'] = $username; } } $objPHPExcel->setActiveSheetIndex(0)->setCellValue('B' . $a, $iqcExportArr['sku']); //SKU导出类型修改 add by chenwei 2013.12.20 //$objPHPExcel->setActiveSheetIndex(0)->getCell('B'.$a)->setValueExplicit($iqcExportArr['sku'], PHPExcel_Cell_DataType::TYPE_STRING); $objPHPExcel->setActiveSheetIndex(0)->getCell('C' . $a)->setValueExplicit(Deal_SC($iqcExportArr['goodsName']), PHPExcel_Cell_DataType::TYPE_STRING); $objPHPExcel->setActiveSheetIndex(0)->getCell('D' . $a)->setValueExplicit($iqcExportArr['arrivalNum'], PHPExcel_Cell_DataType::TYPE_STRING); $objPHPExcel->setActiveSheetIndex(0)->getCell('E' . $a)->setValueExplicit($detectionTypeArr[$iqcExportArr['checkTypeID']], PHPExcel_Cell_DataType::TYPE_STRING); $objPHPExcel->setActiveSheetIndex(0)->getCell('F' . $a)->setValueExplicit($iqcExportArr['checkNum'], PHPExcel_Cell_DataType::TYPE_NUMERIC); $objPHPExcel->setActiveSheetIndex(0)->getCell('G' . $a)->setValueExplicit(@$skuTypeQcArr[$iqcExportArr['skuTypeCheckID']], PHPExcel_Cell_DataType::TYPE_STRING); $objPHPExcel->setActiveSheetIndex(0)->getCell('H' . $a)->setValueExplicit($iqcExportArr['rejectsNum'], PHPExcel_Cell_DataType::TYPE_NUMERIC); //TYPE_NUMERIC 数值型 ADD BY chenwei 2013.12.20 $objPHPExcel->setActiveSheetIndex(0)->getCell('I' . $a)->setValueExplicit($iqcExportArr['rejectsReason'], PHPExcel_Cell_DataType::TYPE_STRING); $objPHPExcel->setActiveSheetIndex(0)->getCell('J' . $a)->setValueExplicit($iqcExportArr['checkUser'], PHPExcel_Cell_DataType::TYPE_STRING); $objPHPExcel->setActiveSheetIndex(0)->getCell('K' . $a)->setValueExplicit(date("Y-m-d H:i:s", $iqcExportArr['checkTime']), PHPExcel_Cell_DataType::TYPE_STRING); $objPHPExcel->setActiveSheetIndex(0)->getCell('L' . $a)->setValueExplicit('赛维网络', PHPExcel_Cell_DataType::TYPE_STRING); //echo $a.' '.$iqcExportArr['sku'].' '.$iqcExportArr['goodsName'].'<br/>'; $a++; } } $objPHPExcel->getActiveSheet(0)->getStyle('A1:N500')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER); $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('A')->setWidth(20); $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('B')->setWidth(30); $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('C')->setWidth(50); $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('F')->setWidth(10); $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('E')->setWidth(20); $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('D')->setWidth(10); $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('G')->setWidth(20); $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('H')->setWidth(10); $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('I')->setWidth(50); $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('J')->setWidth(15); $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('K')->setWidth(30); $objPHPExcel->setActiveSheetIndex(0)->getColumnDimension('L')->setWidth(20); $title = "QcWorkInfoExport" . date('Y-m-d'); $titlename = "QcWorkInfoExport" . date('Y-m-d') . ".xls"; $objPHPExcel->getActiveSheet()->setTitle($title); $objPHPExcel->setActiveSheetIndex(0); header('Content-Type: application/vnd.ms-excel'); header("Content-Disposition: attachment;filename={$titlename}"); header('Cache-Control: max-age=0'); $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); $objWriter->save('php://output'); exit; }
public function act_judgeLock() { $id = $_REQUEST['id']; $ret = OrderModifyModel::judegLock($id); if (!$ret) { self::$errCode = OrderModifyModel::$errCode; self::$errMsg = OrderModifyModel::$errMsg; return false; } else { if ($ret[0]['isLock'] != '1') { return true; } else { if ($ret[0]['lockUser'] != $_SESSION['sysUserId']) { $account = UserModel::getUsernameById($ret[0]['lockUser']); self::$errCode = "001"; self::$errMsg = "订单已被用户" . $account . '于' . date("Y-m-d H:i", $ret[0]['lockTime']) . '锁定!'; return false; //失败则设置错误码和错误信息, 返回false } else { return true; } } } }
function content_5311970714c639_26047770($_smarty_tpl) { if (!is_callable('smarty_modifier_date_format')) { include 'E:\\erpNew\\order.valsun.cn\\lib\\template\\smarty\\plugins\\modifier.date_format.php'; } echo $_smarty_tpl->getSubTemplate('header.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0); ?> <link type="text/css" rel="stylesheet" href="css/orderindex.css"> <script language="javascript" src="js/orderindex.js"></script> <script language="javascript" src="js/orderRefund.js"></script> <script src="./js/My97DatePicker/WdatePicker.js" type="text/javascript"></script> <script type="text/javascript" src="./js/fancyBox/source/jquery.fancybox.js?v=2.1.3"></script> <link rel="stylesheet" type="text/css" href="./js/fancyBox/source/jquery.fancybox.css?v=2.1.2" media="screen" /> <div class="fourvar order-fourvar"> <form action="index.php?mod=orderindex&act=getOrderList&search=1" method="get" id="getOrderList"> <table> <tr> <td style="padding-left:17px;"> 平台: </td> <td> <select name="platformId" id="platformId" style="width:157px" onchange="changePlatform()"> <option value="">全部</option> <?php $_smarty_tpl->tpl_vars['va'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['va']->_loop = false; $_from = $_smarty_tpl->tpl_vars['platform']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['va']->key => $_smarty_tpl->tpl_vars['va']->value) { $_smarty_tpl->tpl_vars['va']->_loop = true; ?> <option value="<?php echo $_smarty_tpl->tpl_vars['va']->value['id']; ?> " <?php if ($_smarty_tpl->tpl_vars['searchPlatformId']->value == $_smarty_tpl->tpl_vars['va']->value['id']) { ?> selected="selected"<?php } ?> ><?php echo $_smarty_tpl->tpl_vars['va']->value['platform']; ?> </option> <?php } ?> </select> </td> <td style="padding-left:17px;"> 账号: </td> <td> <span id="selectAccountList"> <select name="accountId" id="accountId" style="width:157px"> <option value="">全部账号</option> <?php if ($_smarty_tpl->tpl_vars['searchPlatformId']->value) { ?> <?php $_smarty_tpl->tpl_vars['va'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['va']->_loop = false; $_from = $_smarty_tpl->tpl_vars['accountList']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['va']->key => $_smarty_tpl->tpl_vars['va']->value) { $_smarty_tpl->tpl_vars['va']->_loop = true; ?> <option value="<?php echo $_smarty_tpl->tpl_vars['va']->value['id']; ?> " <?php if ($_smarty_tpl->tpl_vars['searchAccountId']->value == $_smarty_tpl->tpl_vars['va']->value['id']) { ?> selected="selected"<?php } ?> ><?php echo $_smarty_tpl->tpl_vars['va']->value['account']; ?> </option> <?php } ?> <?php } ?> </select> </span> </td> <td style="padding-left:15px;"> 留言: </td> <input type="hidden" name="mod" value="orderindex" /> <input type="hidden" name="act" value="getOrderList" /> <input type="hidden" name="search" value="1" /> <!--<input type="hidden" id="ostatus" name="ostatus" value="<?php echo $_smarty_tpl->tpl_vars['ostatus']->value; ?> " /> <input type="hidden" name="otype" value="<?php echo $_smarty_tpl->tpl_vars['otype']->value; ?> " />--> <td> <select name="isNote" style="width:157px"> <option value="">全部</option> <option value="1" <?php if ($_smarty_tpl->tpl_vars['searchIsNote']->value == 1) { ?> selected="selected"<?php } ?> >有留言</option> <option value="2" <?php if ($_smarty_tpl->tpl_vars['searchIsNote']->value == 2) { ?> selected="selected"<?php } ?> >无留言</option> </select> </td> <td style="padding-left:17px;"> 评价: </td> <td> <select name="reviews" style="width:157px"> <option value="">全部</option> <option value="1" <?php if ($_smarty_tpl->tpl_vars['searchReviews']->value == 1) { ?> selected="selected"<?php } ?> >无评论</option> <option value="2" <?php if ($_smarty_tpl->tpl_vars['searchReviews']->value == 2) { ?> selected="selected"<?php } ?> >好评</option> <option value="3" <?php if ($_smarty_tpl->tpl_vars['searchReviews']->value == 3) { ?> selected="selected"<?php } ?> >中评</option> <option value="4" <?php if ($_smarty_tpl->tpl_vars['searchReviews']->value == 4) { ?> selected="selected"<?php } ?> >差评</option> </select> </td> <td style="padding-left:17px;"> 补寄: </td> <td> <select name="isBuji" style="width:157px"> <option value="">全部</option> <option value="1" <?php if ($_smarty_tpl->tpl_vars['searchIsBuji']->value == 1) { ?> selected="selected"<?php } ?> >是</option> <option value="2" <?php if ($_smarty_tpl->tpl_vars['searchIsBuji']->value == 2) { ?> selected="selected"<?php } ?> >否</option> </select> </td> <!--<td style="padding-left:17px;"> 跟踪号: </td> <td> <select name="isTracknumber" style="width:157px"> <option value="">全部</option> <option value="1" <?php if ($_smarty_tpl->tpl_vars['searchIsTracknumber']->value == 1) { ?> selected="selected"<?php } ?> >有</option> <option value="2" <?php if ($_smarty_tpl->tpl_vars['searchIsTracknumber']->value == 2) { ?> selected="selected"<?php } ?> >无</option> </select> </td>--> </tr> <tr> <td style="padding-left:17px;"> 运输类型: </td> <td> <select name="transportationType" id="transportationType" onchange="changeTransportation()" style="width:157px"> <option value="">全部</option> <option value="1" <?php if ($_smarty_tpl->tpl_vars['searchTransportationType']->value == 1) { ?> selected="selected"<?php } ?> >快递</option> <option value="2" <?php if ($_smarty_tpl->tpl_vars['searchTransportationType']->value == 2) { ?> selected="selected"<?php } ?> >非快递</option> </select> </td> <td style="padding-left:13px;"> 运输方式: </td> <td id="selectTransportation"> <select name="transportation" id="transportation" style="width:157px"> <option value="">未设置运输方式</option> <?php $_smarty_tpl->tpl_vars['vf'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['vf']->_loop = false; $_from = $_smarty_tpl->tpl_vars['transportation']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['vf']->key => $_smarty_tpl->tpl_vars['vf']->value) { $_smarty_tpl->tpl_vars['vf']->_loop = true; ?> <option value="<?php echo $_smarty_tpl->tpl_vars['vf']->value['id']; ?> " <?php ob_start(); echo $_smarty_tpl->tpl_vars['vf']->value['id']; $_tmp1 = ob_get_clean(); if ($_smarty_tpl->tpl_vars['searchTransportation']->value == $_tmp1) { ?> selected="selected"<?php } ?> ><?php echo $_smarty_tpl->tpl_vars['vf']->value['carrierNameCn']; ?> </option> <?php } ?> </select> </td> <td style="padding-left:17px;"> 锁定: </td> <td> <select name="isLock" style="width:157px"> <option value="">全部</option> <option value="1" <?php if ($_smarty_tpl->tpl_vars['searchIsLock']->value == 1) { ?> selected="selected"<?php } ?> >是</option> <option value="2" <?php if ($_smarty_tpl->tpl_vars['searchIsLock']->value == 2) { ?> selected="selected"<?php } ?> >否</option> </select> </td> <td style="padding-left:17px;"> 状态: </td> <td> <select name="ostatus" id="ostatus" style="width:157px" onchange="changeOstatus()"> <option value="">--ALL--</option> <?php $_smarty_tpl->tpl_vars['va'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['va']->_loop = false; $_from = $_smarty_tpl->tpl_vars['ostatusList']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['va']->key => $_smarty_tpl->tpl_vars['va']->value) { $_smarty_tpl->tpl_vars['va']->_loop = true; ?> <option value="<?php echo $_smarty_tpl->tpl_vars['va']->value['statusCode']; ?> " <?php if ($_smarty_tpl->tpl_vars['ostatus']->value == $_smarty_tpl->tpl_vars['va']->value['statusCode']) { ?> selected="selected"<?php } ?> ><?php echo $_smarty_tpl->tpl_vars['va']->value['statusName']; ?> </option> <?php } ?> </select> </td> <td style="padding-left:17px;"> 类别: </td> <td> <select name="otype" id="otype" style="width:157px"> <option value="">--ALL--</option> <?php if ($_smarty_tpl->tpl_vars['otypeList']->value) { ?> <?php $_smarty_tpl->tpl_vars['va'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['va']->_loop = false; $_from = $_smarty_tpl->tpl_vars['otypeList']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['va']->key => $_smarty_tpl->tpl_vars['va']->value) { $_smarty_tpl->tpl_vars['va']->_loop = true; ?> <option value="<?php echo $_smarty_tpl->tpl_vars['va']->value['statusCode']; ?> " <?php if ($_smarty_tpl->tpl_vars['otype']->value == $_smarty_tpl->tpl_vars['va']->value['statusCode']) { ?> selected="selected"<?php } ?> ><?php echo $_smarty_tpl->tpl_vars['va']->value['statusName']; ?> </option> <?php } ?> <?php } ?> </select> </td> </tr> </table> <table> <tr> <td style="padding-left:17px;"> 关键字: </td> <td style="padding-left:19px;"> <input name="Keywords" value="<?php echo $_smarty_tpl->tpl_vars['searchKeywords']->value; ?> " /> </td> <td style="padding-left:15px;"> <select name="KeywordsType"> <option value="0" style="width:157px;">请选择关键字类型</option> <option value="1" <?php if ($_smarty_tpl->tpl_vars['searchKeywordsType']->value == 1) { ?> selected="selected"<?php } ?> >买家ID</option> <option value="2" <?php if ($_smarty_tpl->tpl_vars['searchKeywordsType']->value == 2) { ?> selected="selected"<?php } ?> >买家邮箱</option> <option value="3" <?php if ($_smarty_tpl->tpl_vars['searchKeywordsType']->value == 3) { ?> selected="selected"<?php } ?> >RecordNo.</option> <option value="4" <?php if ($_smarty_tpl->tpl_vars['searchKeywordsType']->value == 4) { ?> selected="selected"<?php } ?> >paypal交易ID</option> <option value="5" <?php if ($_smarty_tpl->tpl_vars['searchKeywordsType']->value == 5) { ?> selected="selected"<?php } ?> >跟踪号</option> <option value="6" <?php if ($_smarty_tpl->tpl_vars['searchKeywordsType']->value == 6) { ?> selected="selected"<?php } ?> >系统编号</option> </select> </td> <td style="padding-left:17px;"> 每页显示数量设置: </td> <td style="padding-left:15px;"> <select id="pnum" name="pnum"> <option value="5" <?php if ($_smarty_tpl->tpl_vars['g_pnum']->value == 5) { ?> selected="selected"<?php } ?> >极速浏览(每页5条)</option> <option value="20" <?php if ($_smarty_tpl->tpl_vars['g_pnum']->value == 20) { ?> selected="selected"<?php } if ($_smarty_tpl->tpl_vars['g_pnum']->value == 0) { ?> selected="selected"<?php } ?> >高速浏览(每页20条)</option> <option value="50" <?php if ($_smarty_tpl->tpl_vars['g_pnum']->value == 50) { ?> selected="selected"<?php } ?> >普通浏览(每页50条)</option> <option value="100" <?php if ($_smarty_tpl->tpl_vars['g_pnum']->value == 100) { ?> selected="selected"<?php } ?> >懒人浏览(每页100条)</option> </select> </td> </tr> </table> <table id="AdvancedSearch" class="advanced-search" style="<?php if ($_smarty_tpl->tpl_vars['searchOrderType']->value != '' || $_smarty_tpl->tpl_vars['searchSku']->value != '' || $_smarty_tpl->tpl_vars['searchOrderTime1']->value != '') { ?> display:block<?php } if ($_smarty_tpl->tpl_vars['searchOrderType']->value == '' && $_smarty_tpl->tpl_vars['searchSku']->value == '' && $_smarty_tpl->tpl_vars['searchOrderTime1']->value == '') { ?> display:none<?php } ?> "> <tr> <td style="padding-left:17px;"> 订单种类: </td> <td> <select name="selectOrderType"> <option value="">全部</option> <option value="1" <?php if ($_smarty_tpl->tpl_vars['searchOrderType']->value == 1) { ?> selected="selected"<?php } ?> >单料号单件</option> <option value="2" <?php if ($_smarty_tpl->tpl_vars['searchOrderType']->value == 2) { ?> selected="selected"<?php } ?> >单料号多件</option> <option value="3" <?php if ($_smarty_tpl->tpl_vars['searchOrderType']->value == 3) { ?> selected="selected"<?php } ?> >多料号</option> </select> </td> <td style="padding-left:17px;"> SKU: </td> <td> <input name="sku" type="text" value="<?php echo $_smarty_tpl->tpl_vars['searchSku']->value; ?> "/> </td> </tr> <tr> <td style="padding-left:17px;"> 国家: </td> <td> <input name="country" value="<?php echo $_smarty_tpl->tpl_vars['searchCountry']->value; ?> " /> </td> <td style="padding-left:17px;"> 州: </td> <td> <input name="state" value="<?php echo $_smarty_tpl->tpl_vars['searchState']->value; ?> " /> </td> <td style="padding-left:17px;"> 城市: </td> <td style="padding-left:19px;"> <input name="city" value="<?php echo $_smarty_tpl->tpl_vars['searchCity']->value; ?> " /> </td> <td style="padding-left:17px;"> 邮编: </td> <td style="padding-left:19px;"> <input name="zipCode" value="<?php echo $_smarty_tpl->tpl_vars['searchZipCode']->value; ?> " /> </td> </tr> <tr> <td style="padding-left:17px;"> <select name="searchTimeType"> <option value="1" <?php if ($_smarty_tpl->tpl_vars['searchTimeType']->value == 1) { ?> selected="selected"<?php } ?> >付款时间</option> <option value="2" <?php if ($_smarty_tpl->tpl_vars['searchTimeType']->value == 2) { ?> selected="selected"<?php } ?> >扫描时间</option> </select> </td> <td> <!--input name="OrderTime1" type="text" value="<?php echo $_smarty_tpl->tpl_vars['searchOrderTime1']->value; ?> " onclick="WdatePicker()"/>-<input name="OrderTime2" type="text" value="<?php echo $_smarty_tpl->tpl_vars['searchOrderTime12']->value; ?> " onclick="WdatePicker()"/--> <input name="OrderTime1" id="OrderTime1" type="text" value="<?php echo $_smarty_tpl->tpl_vars['searchOrderTime1']->value; ?> " />-<input name="OrderTime2" id="OrderTime2" type="text" value="<?php echo $_smarty_tpl->tpl_vars['searchOrderTime2']->value; ?> " /> </td> </tr> </table> <div style="padding-left:17px;"> <input type="submit" value="搜索" class="order-search" /> <a href="#" id="AdvancedSearch1" onclick="AdvancedSearch()" class="unfold">高级搜索</a> </div> </form> </div> <div class="servar order-servar"> <table> <tr> <td width="10%"> <span> <label> <input name="allselect" id="allselect" type="checkbox" orderids="" value="" onclick="allselect()"/>全选 </label> </span> </td> <td> <?php if ($_GET['ostatus'] == '100' && $_GET['otype'] == '101') { ?> <a href="#" onclick="combinePackage()">包裹合并</a> <?php } ?> <?php if ($_GET['ostatus'] == '100' && $_GET['otype'] == '106') { ?> <a href="#" onclick="cancelCombine()">取消包裹合并</a> <?php } ?> <?php if ($_GET['ostatus'] == '100' && $_GET['otype'] == '103') { ?> <a href="#" onclick="splitOverWeight()">超重拆分</a><!-- ADD BY zqt 2013.9.17 --> <?php } ?> <?php if ($_GET['ostatus'] != '2') { ?> <a href="#" onclick="combineOrder()">订单合并</a> <!-- 合并订单 ADD BY chenwei 2013.9.11 --> <?php } ?> <!--<a href="#">发站内信</a>--> <!--<a href="#">取消交易</a>--> <a href="javascript:void(0);" onClick="splitorder()">订单拆分</a> <a href="javascript:void(0);" onClick="applyRefund()">PAYPAL退款</a> <?php if ($_smarty_tpl->tpl_vars['ostatus']->value == '770') { ?> <a href="javascript:void(0);" onClick="abnormalStockSplit()">缺货拆分</a> <?php } ?> <a href="javascript:void(0);" onClick="handRefund()">手工退款</a> <?php if ($_GET['ostatus'] == '200' && $_GET['otype'] == '201') { ?> <a href="javascript:void(0);" onClick="superOrder();">确认超大</a> <?php } ?> <?php if ($_GET['ostatus'] == '900') { ?> <a href="javascript:void(0);" onclick="temporarilySend()" >暂时不寄</a><!-- 暂不寄操作 ADD BY chenwei 2013.9.12 --> <?php } ?> <a href="javascript:void(0);" onClick="unLockOrder();">解锁订单</a><!-- 解锁订单 ADD BY zyp 2013.9.14 --> <?php if ($_GET['ostatus'] != 2) { ?> <a href="javascript:void(0);" onclick="batchMove();">批量修改</a> <?php } ?> <a href="javascript:void(0);" onclick="onlineeubtracknumber();" >线上EUB申请</a> <a href="javascript:void(0);" onclick="thelineeubtracknumber();" >线下EUB申请</a> <?php if ($_GET['ostatus'] == '100' && $_GET['otype'] == '700') { ?> <a href="#" onclick="taoBaoRemoveOrder()">标记刷单</a><!-- 淘宝标记订单为刷单 ADD BY chenwei 2013.9.17 --> <?php } ?> <?php if ($_GET['ostatus'] == 200 && $_GET['otype'] == 203) { ?> <a href="javascript:void(0);" onClick="partPackage();">申请配货</a> <?php } ?> <?php if ($_GET['ostatus'] == 100 || $_GET['ostatus'] == 200 && $_GET['otype'] == 204 || $_GET['otype'] == 552 || $_GET['otype'] == 802) { ?> <a href="javascript:void(0)" onclick="print_order(1)">申请打印</a> <?php } ?> <?php if ($_GET['ostatus'] == 200 && $_GET['otype'] == 203) { ?> <a href="javascript:void(0)" onclick="print_order(0)">申请打印</a> <?php } ?> <?php if ($_GET['ostatus'] == '100' && $_GET['otype'] == '731') { ?> <a href="#" onclick="export_ups_us_xml()">UPS美国专线订单导出</a> <?php } ?> <select id="exportstoxls" name="exportstoxls" onchange="exportstoxls()"> <option value="0" style="width:157px;">将订单导出到</option> <option value="1">常规列表导出xls</option> <option value="2">EUB导入格式导出</option> <option value="3">EUB导入料号导出</option> </select> <!-- <a href="#" >手动申请发货(需求不明)</a> --> </td> </tr> </table> </div> <div class="bottomvar"> <span id="showSelectNum"></span> <?php if ($_smarty_tpl->tpl_vars['status']->value == '') { ?> <div class="pagination"> <?php echo $_smarty_tpl->tpl_vars['show_page']->value; ?> </div> <?php } ?> </div> <div class="main order-main" align="center"> <?php $_smarty_tpl->tpl_vars['orderlist'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['orderlist']->_loop = false; $_smarty_tpl->tpl_vars['omOrderId'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['omOrderList']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['orderlist']->key => $_smarty_tpl->tpl_vars['orderlist']->value) { $_smarty_tpl->tpl_vars['orderlist']->_loop = true; $_smarty_tpl->tpl_vars['omOrderId']->value = $_smarty_tpl->tpl_vars['orderlist']->key; ?> <?php $_smarty_tpl->tpl_vars['orderData'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderlist']->value['orderData'], null, 0); ?> <?php $_smarty_tpl->tpl_vars['orderExtenData'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderlist']->value['orderExtenData'], null, 0); ?> <?php $_smarty_tpl->tpl_vars['orderUserInfoData'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderlist']->value['orderUserInfoData'], null, 0); ?> <?php $_smarty_tpl->tpl_vars['orderNote'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderlist']->value['orderNote'], null, 0); ?> <?php $_smarty_tpl->tpl_vars['orderTracknumber'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderlist']->value['orderTracknumber'], null, 0); ?> <?php $_smarty_tpl->tpl_vars['orderAudit'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderlist']->value['orderAudit'], null, 0); ?> <?php $_smarty_tpl->tpl_vars['combinePackage'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderlist']->value['combinePackage'], null, 0); ?> <input type="hidden" id="orderStatus_<?php echo $_smarty_tpl->tpl_vars['orderData']->value['id']; ?> " name="orderStatus_<?php echo $_smarty_tpl->tpl_vars['orderData']->value['id']; ?> " value="<?php echo $_smarty_tpl->tpl_vars['orderData']->value['orderStatus']; ?> " /> <input type="hidden" id="orderType_<?php echo $_smarty_tpl->tpl_vars['orderData']->value['id']; ?> " name="orderType_<?php echo $_smarty_tpl->tpl_vars['orderData']->value['id']; ?> " value="<?php echo $_smarty_tpl->tpl_vars['orderData']->value['orderType']; ?> " /> <table cellspacing="0" width="100%"> <tr class="title"> <td valign="middle" style="border-right:1px #999 solid;padding:0;" width="11%"> <input class="checkclass" name="ckb" type="checkbox" value="<?php echo $_smarty_tpl->tpl_vars['orderData']->value['id']; ?> " onclick="displayselect(this.value,0);" /> <input type="hidden" id="invoice_<?php echo $_smarty_tpl->tpl_vars['orderData']->value['id']; ?> " name="invoice_<?php echo $_smarty_tpl->tpl_vars['orderData']->value['id']; ?> " value="<?php echo $_smarty_tpl->tpl_vars['AbOrderShow']->value[$_smarty_tpl->tpl_vars['orderData']->value['id']]; ?> " /> <?php echo $_smarty_tpl->getSubTemplate("editField.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0); ?> </td> <td colspan="3" align="left"> <span style="width:20%">账号:<?php echo $_smarty_tpl->tpl_vars['account']->value[$_smarty_tpl->tpl_vars['orderData']->value['accountId']]; ?> </span> <span style="width:20%">平台: <?php $_smarty_tpl->tpl_vars['va'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['va']->_loop = false; $_from = $_smarty_tpl->tpl_vars['platform']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['va']->key => $_smarty_tpl->tpl_vars['va']->value) { $_smarty_tpl->tpl_vars['va']->_loop = true; ?> <?php if ($_smarty_tpl->tpl_vars['va']->value['id'] == $_smarty_tpl->tpl_vars['orderData']->value['platformId']) { echo $_smarty_tpl->tpl_vars['va']->value['platform']; } ?> <?php } ?> </span> <span style="width:20%">下单时间:<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['orderData']->value['ordersTime'], "%Y-%m-%d %H:%I:%S"); ?> </span> <span style="width:20%">重量:<?php echo $_smarty_tpl->tpl_vars['orderData']->value['calcWeight']; ?> KG</span> <br /> <span style="width:20%">系统编号:<?php echo $_smarty_tpl->tpl_vars['omOrderId']->value; ?> </span> <span style="width:20%;">买家ID:<input value="<?php echo $_smarty_tpl->tpl_vars['orderUserInfoData']->value['platformUsername']; ?> " style="width:168px;border:none; background-color: #f2f2f2; outline:none;" readonly/></span> <span style="width:20%">付款时间:<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['orderData']->value['paymentTime'], "%Y-%m-%d %H:%I:%S"); ?> </span> <span style="width:20%">包材:<?php if ($_smarty_tpl->tpl_vars['pm']->value[$_smarty_tpl->tpl_vars['orderData']->value['pmId']]) { echo $_smarty_tpl->tpl_vars['pm']->value[$_smarty_tpl->tpl_vars['orderData']->value['pmId']]; } else { ?> --<?php } ?> </span> <br /> <span style="width:20%">RecordNo.:<?php echo $_smarty_tpl->tpl_vars['orderData']->value['recordNumber']; ?> </span> <span style="width:20%;">买家姓名:<input value="<?php echo $_smarty_tpl->tpl_vars['orderUserInfoData']->value['username']; ?> " style="width:168px;border:none; background-color: #f2f2f2; outline:none;" readonly/></span> <span style="width:20%">扫描时间:--</span> <span style="width:20%">交易ID:<?php if ($_smarty_tpl->tpl_vars['orderExtenData']->value['PayPalPaymentId']) { echo $_smarty_tpl->tpl_vars['orderExtenData']->value['PayPalPaymentId']; } else { ?> --<?php } ?> </span> <br /> <span style="width:20%">发往国家:<?php echo $_smarty_tpl->tpl_vars['orderUserInfoData']->value['countryName']; ?> </span> <span style="width:20%;">买家邮箱:<input value="<?php if ($_smarty_tpl->tpl_vars['orderUserInfoData']->value['email'] != '') { echo $_smarty_tpl->tpl_vars['orderUserInfoData']->value['email']; } ?> " style="width:168px;border:none; background-color: #f2f2f2; outline:none;" readonly/></span> <span style="width:20%">运费:<?php echo $_smarty_tpl->tpl_vars['orderData']->value['calcShipping']; ?> </span> <br /> <span style="width:20%">运输:<?php if ($_smarty_tpl->tpl_vars['transportationList']->value[$_smarty_tpl->tpl_vars['orderData']->value['transportId']]) { echo $_smarty_tpl->tpl_vars['transportationList']->value[$_smarty_tpl->tpl_vars['orderData']->value['transportId']]; } else { ?> --<?php } ?> </span> <span style="width:20%">跟踪号: <?php if ($_smarty_tpl->tpl_vars['orderTracknumber']->value) { ?> <?php if ($_smarty_tpl->tpl_vars['orderData']->value['transportId'] == 6) { ?> <input value="<?php echo $_smarty_tpl->tpl_vars['orderTracknumber']->value[0]['tracknumber']; ?> " style="width:168px;border:none; background-color: #f2f2f2; outline:none;" readonly/> <?php } else { ?> <select id="orderTracknumber"> <?php $_smarty_tpl->tpl_vars['orderTrack'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['orderTrack']->_loop = false; $_smarty_tpl->tpl_vars['orderTrackId'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['orderTracknumber']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['orderTrack']->key => $_smarty_tpl->tpl_vars['orderTrack']->value) { $_smarty_tpl->tpl_vars['orderTrack']->_loop = true; $_smarty_tpl->tpl_vars['orderTrackId']->value = $_smarty_tpl->tpl_vars['orderTrack']->key; ?> <option value=""><?php echo $_smarty_tpl->tpl_vars['orderTrack']->value['tracknumber']; ?> </option> <?php } ?> </select> <?php } ?> <?php } else { ?> --<?php } ?> </span> <span style="width:20%">金额:<?php echo $_smarty_tpl->tpl_vars['orderData']->value['actualTotal']; ?> <?php echo $_smarty_tpl->tpl_vars['orderUserInfoData']->value['currency']; ?> </span> <?php if ($_smarty_tpl->tpl_vars['orderExtenData']->value['feedback'] != '') { ?> <span style="width:100%">留言: <input value="<?php echo $_smarty_tpl->tpl_vars['orderExtenData']->value['feedback']; ?> " style="color:#009d9b;width:1000px;border:none; background-color: #f2f2f2; outline:none;" readonly/> </span> <?php } ?> </td> </tr> <tr> <td colspan="3"> <div style="padding:10px;"> <table width="100%"> <tr class="title"> <td> 图片 </td> <!--<td> RecordNo. </td>--> <td> 料号 </td> <td> 数量 </td> <td> 售价 </td> <td> sfee </td> <td> 实际库存 </td> <td> 待发货 </td> <td> 被拦截 </td> <td> 待审核 </td> <td> 已预定 </td> <td> 每天均量 </td> <td> 预警 </td> <td> 采购 </td> <td> 成本(RMB) </td> <td> 链接 </td> <td> 审核 </td> <td> 配货 </td> </tr> <?php $_smarty_tpl->tpl_vars['orderDetail'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['orderDetail']->_loop = false; $_smarty_tpl->tpl_vars['omOrderdetailId'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['orderlist']->value['orderDetail']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } $_smarty_tpl->tpl_vars['smarty']->value['foreach']['foo']['index'] = -1; foreach ($_from as $_smarty_tpl->tpl_vars['orderDetail']->key => $_smarty_tpl->tpl_vars['orderDetail']->value) { $_smarty_tpl->tpl_vars['orderDetail']->_loop = true; $_smarty_tpl->tpl_vars['omOrderdetailId']->value = $_smarty_tpl->tpl_vars['orderDetail']->key; $_smarty_tpl->tpl_vars['smarty']->value['foreach']['foo']['index']++; ?> <?php $_smarty_tpl->tpl_vars['orderDetailData'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderDetail']->value['orderDetailData'], null, 0); ?> <?php $_smarty_tpl->tpl_vars['orderDetailExtenData'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderDetail']->value['orderDetailExtenData'], null, 0); ?> <?php if ($_smarty_tpl->tpl_vars['orderDetailData']->value['sku']) { ?> <?php $_smarty_tpl->tpl_vars['skuinfo'] = new Smarty_variable(GoodsModel::getSkuinfo($_smarty_tpl->tpl_vars['orderDetailData']->value['sku']), null, 0); ?> <?php $_smarty_tpl->tpl_vars['skusellinfo'] = new Smarty_variable(PurchaseAPIModel::getSkuDailyStatus($_smarty_tpl->tpl_vars['orderDetailData']->value['sku']), null, 0); ?> <?php $_smarty_tpl->tpl_vars['virtualSku'] = new Smarty_variable(GoodsModel::getCompleteSkuinfo($_smarty_tpl->tpl_vars['orderDetailData']->value['sku']), null, 0); ?> <?php } ?> <?php if ($_smarty_tpl->getVariable('smarty')->value['foreach']['foo']['index'] != 0) { ?> <tr> <td colspan="17"> <div style=" border-bottom:#999999 dashed 1px; margin-left:5px; margin-right:5px;"></div> </td> </tr> <?php } ?> <tr> <td class="unpicurl"> <?php $_smarty_tpl->tpl_vars['explodesku'] = new Smarty_variable(func_explode($_smarty_tpl->tpl_vars['orderDetailData']->value['sku']), null, 0); ?> <a href="javascript:void(0)" id="imgb-<?php echo $_smarty_tpl->tpl_vars['explodesku']->value; ?> " data-sku="imgb-<?php echo $_smarty_tpl->tpl_vars['explodesku']->value; ?> " class="fancybox" style="margin-left:0;"> <img src="" class="skuimg" id="imgs-<?php echo $_smarty_tpl->tpl_vars['explodesku']->value; ?> " width="60" height="60" data-sku="<?php echo $_smarty_tpl->tpl_vars['explodesku']->value; ?> " data-spu="<?php echo $_smarty_tpl->tpl_vars['skuinfo']->value['spu']; ?> "> </a> <br /> <span><?php echo $_smarty_tpl->tpl_vars['orderDetailData']->value['recordNumber']; ?> </span> </td> <td> <?php if ($_smarty_tpl->tpl_vars['orderDetailData']->value['sku']) { echo $_smarty_tpl->tpl_vars['orderDetailData']->value['sku']; } else { ?> --<?php } ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['orderDetailData']->value['amount']) { echo $_smarty_tpl->tpl_vars['orderDetailData']->value['amount']; } else { ?> --<?php } ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['orderDetailData']->value['itemPrice']) { echo $_smarty_tpl->tpl_vars['orderDetailData']->value['itemPrice']; } else { ?> --<?php } ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['orderDetailData']->value['shippingFee']) { echo $_smarty_tpl->tpl_vars['orderDetailData']->value['shippingFee']; } else { ?> --<?php } ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['skuinfo']->value['enableCount']) { echo $_smarty_tpl->tpl_vars['skuinfo']->value['enableCount']; } else { ?> 0<?php } ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['skusellinfo']->value['waitingSendCount']) { echo $_smarty_tpl->tpl_vars['skusellinfo']->value['waitingSendCount']; } else { ?> 0<?php } ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['skusellinfo']->value['interceptSendCount']) { echo $_smarty_tpl->tpl_vars['skusellinfo']->value['interceptSendCount']; } else { ?> 0<?php } ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['skusellinfo']->value['waitingAuditCount']) { echo $_smarty_tpl->tpl_vars['skusellinfo']->value['waitingAuditCount']; } else { ?> 0<?php } ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['skusellinfo']->value['enableCount']) { echo $_smarty_tpl->tpl_vars['skusellinfo']->value['enableCount']; } else { ?> 0<?php } ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['skusellinfo']->value['averageDailyCount']) { echo $_smarty_tpl->tpl_vars['skusellinfo']->value['averageDailyCount']; } else { ?> 0<?php } ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['skusellinfo']->value['is_warning'] === '1') { ?> <font color="red">是</font><?php } if ($_smarty_tpl->tpl_vars['skusellinfo']->value['is_warning'] === '0') { ?> <font color="green">否</font><?php } ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['skuinfo']->value['purchaseName']) { echo $_smarty_tpl->tpl_vars['skuinfo']->value['purchaseName']; } else { ?> --<?php } ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['skuinfo']->value['goodsCost']) { echo $_smarty_tpl->tpl_vars['skuinfo']->value['goodsCost']; } else { ?> --<?php } ?> </td> <td class="unpicurl" width="10%"> <?php if ($_smarty_tpl->tpl_vars['orderDetailExtenData']->value['itemTitle']) { ?> <a href="<?php if ($_smarty_tpl->tpl_vars['orderData']->value['platformId'] == 1) { ?> http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=<?php echo $_smarty_tpl->tpl_vars['orderDetailExtenData']->value['itemId']; echo $_smarty_tpl->tpl_vars['ebaylistingurl']->value; } elseif ($_smarty_tpl->tpl_vars['orderData']->value['platformId'] == 2) { ?> http://www.aliexpress.com/item/New-1mm-Silver-Metallic-Caviar-Beads-Studs-Nail-Art-Glitter-Nail-Decoration-13229/<?php echo $_smarty_tpl->tpl_vars['orderDetailExtenData']->value['itemId']; ?> .html<?php } elseif ($_smarty_tpl->tpl_vars['orderData']->value['platformId'] == 11) { ?> http://www.amazon.com/gp/product/<?php echo $_smarty_tpl->tpl_vars['orderDetailExtenData']->value['itemId']; } ?> " target="_blank">(<?php echo $_smarty_tpl->tpl_vars['orderDetailExtenData']->value['itemId']; ?> ) <?php echo $_smarty_tpl->tpl_vars['orderDetailExtenData']->value['itemTitle']; ?> </a><?php } else { ?> --<?php } ?> </td> <td> <?php if (!$_smarty_tpl->tpl_vars['virtualSku']->value) { ?> <?php $_smarty_tpl->tpl_vars['orderAuditVal'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['orderAuditVal']->_loop = false; $_from = $_smarty_tpl->tpl_vars['orderAudit']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } $_smarty_tpl->tpl_vars['orderAuditVal']->total = $_smarty_tpl->_count($_from); $_smarty_tpl->tpl_vars['orderAuditVal']->iteration = 0; foreach ($_from as $_smarty_tpl->tpl_vars['orderAuditVal']->key => $_smarty_tpl->tpl_vars['orderAuditVal']->value) { $_smarty_tpl->tpl_vars['orderAuditVal']->_loop = true; $_smarty_tpl->tpl_vars['orderAuditVal']->iteration++; $_smarty_tpl->tpl_vars['orderAuditVal']->last = $_smarty_tpl->tpl_vars['orderAuditVal']->iteration === $_smarty_tpl->tpl_vars['orderAuditVal']->total; $_smarty_tpl->tpl_vars['smarty']->value['foreach']['auditVal']['last'] = $_smarty_tpl->tpl_vars['orderAuditVal']->last; ?> <?php if ($_smarty_tpl->tpl_vars['orderAuditVal']->value['sku'] == $_smarty_tpl->tpl_vars['orderDetailData']->value['sku']) { ?> <span><?php if ($_smarty_tpl->tpl_vars['orderAuditVal']->value['auditStatus'] == '1') { ?> <font color="green" >通过</font><?php } elseif ($_smarty_tpl->tpl_vars['orderAuditVal']->value['auditStatus'] == '2') { ?> <font color="red" >拦截</font><?php } else { ?> <font color="orange" >状态有误</font><?php } ?> </span> <?php } ?> <?php } ?> <?php } ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['AbOrderListArr']->value[$_smarty_tpl->tpl_vars['orderData']->value['id']][$_smarty_tpl->tpl_vars['orderDetailData']->value['sku']] == 1) { ?> <font color="green" >是</font> <?php } else { ?> <font color="red" >否</font> <?php } ?> </td> </tr> <?php if ($_smarty_tpl->tpl_vars['virtualSku']->value) { ?> <?php $_smarty_tpl->tpl_vars['sskuinfo'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['sskuinfo']->_loop = false; $_smarty_tpl->tpl_vars['ssku'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['virtualSku']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['sskuinfo']->key => $_smarty_tpl->tpl_vars['sskuinfo']->value) { $_smarty_tpl->tpl_vars['sskuinfo']->_loop = true; $_smarty_tpl->tpl_vars['ssku']->value = $_smarty_tpl->tpl_vars['sskuinfo']->key; ?> <?php $_smarty_tpl->tpl_vars['sskusellinfo'] = new Smarty_variable(PurchaseAPIModel::getSkuDailyStatus($_smarty_tpl->tpl_vars['ssku']->value), null, 0); ?> <tr> <td class="unpicurl"> 组合料号 </td> <td> <?php echo $_smarty_tpl->tpl_vars['ssku']->value; ?> </td> <td> <?php echo $_smarty_tpl->tpl_vars['sskuinfo']->value['count'] * $_smarty_tpl->tpl_vars['orderDetailData']->value['amount']; ?> </td> <td> </td> <td> </td> <td> <?php echo $_smarty_tpl->tpl_vars['sskuinfo']->value['enableCount']; ?> </td> <td> <?php echo $_smarty_tpl->tpl_vars['sskusellinfo']->value['waitingSendCount']; ?> </td> <td> <?php echo $_smarty_tpl->tpl_vars['sskusellinfo']->value['interceptSendCount']; ?> </td> <td> <?php echo $_smarty_tpl->tpl_vars['sskusellinfo']->value['waitingAuditCount']; ?> </td> <td> <?php echo $_smarty_tpl->tpl_vars['sskusellinfo']->value['enableCount']; ?> </td> <td> <?php echo $_smarty_tpl->tpl_vars['sskusellinfo']->value['averageDailyCount']; ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['sskusellinfo']->value['is_warning'] === '1') { ?> <font color="red">是</font><?php } if ($_smarty_tpl->tpl_vars['sskusellinfo']->value['is_warning'] === '0') { ?> <font color="green">否</font><?php } ?> </td> <td> <?php echo $_smarty_tpl->tpl_vars['sskuinfo']->value['purchaseName']; ?> </td> <td> <?php if ($_smarty_tpl->tpl_vars['sskuinfo']->value['goodsCost']) { echo $_smarty_tpl->tpl_vars['sskuinfo']->value['goodsCost']; } else { ?> --<?php } ?> </td> <td class="unpicurl" width="10%"> </td> <td> <?php $_smarty_tpl->tpl_vars['orderAuditVal'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['orderAuditVal']->_loop = false; $_from = $_smarty_tpl->tpl_vars['orderAudit']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } $_smarty_tpl->tpl_vars['orderAuditVal']->total = $_smarty_tpl->_count($_from); $_smarty_tpl->tpl_vars['orderAuditVal']->iteration = 0; foreach ($_from as $_smarty_tpl->tpl_vars['orderAuditVal']->key => $_smarty_tpl->tpl_vars['orderAuditVal']->value) { $_smarty_tpl->tpl_vars['orderAuditVal']->_loop = true; $_smarty_tpl->tpl_vars['orderAuditVal']->iteration++; $_smarty_tpl->tpl_vars['orderAuditVal']->last = $_smarty_tpl->tpl_vars['orderAuditVal']->iteration === $_smarty_tpl->tpl_vars['orderAuditVal']->total; $_smarty_tpl->tpl_vars['smarty']->value['foreach']['auditVal']['last'] = $_smarty_tpl->tpl_vars['orderAuditVal']->last; ?> <?php if ($_smarty_tpl->tpl_vars['orderAuditVal']->value['sku'] == $_smarty_tpl->tpl_vars['ssku']->value) { ?> <span><?php if ($_smarty_tpl->tpl_vars['orderAuditVal']->value['auditStatus'] == '1') { ?> <font color="green" >通过</font><?php } elseif ($_smarty_tpl->tpl_vars['orderAuditVal']->value['auditStatus'] == '2') { ?> <font color="red" >拦截</font><?php } else { ?> <font color="orange" >状态有误</font><?php } ?> </span> <?php } ?> <?php } ?> </td> <td> </td> </tr> <?php } ?> <?php } ?> <!--tr align="left"> <td class="unpicurl" align="center"> <?php $_smarty_tpl->tpl_vars['explodesku'] = new Smarty_variable(func_explode($_smarty_tpl->tpl_vars['orderDetailData']->value['sku']), null, 0); ?> <a href="javascript:void(0)" id="imgb-<?php echo $_smarty_tpl->tpl_vars['explodesku']->value; ?> " data-sku="imgb-<?php echo $_smarty_tpl->tpl_vars['explodesku']->value; ?> " class="fancybox" style="margin-left:0;"> <img src="" class="skuimg" id="imgs-<?php echo $_smarty_tpl->tpl_vars['explodesku']->value; ?> " width="60" height="60" data-sku="<?php echo $_smarty_tpl->tpl_vars['explodesku']->value; ?> " data-spu="<?php echo $_smarty_tpl->tpl_vars['skuinfo']->value['spu']; ?> "> </a> <br /> <span style="width:100%;margin-right:0; color:#009d9b;"><?php echo $_smarty_tpl->tpl_vars['orderDetailData']->value['recordNumber']; ?> </span> </td> <td style="width:1010px;"> <span style="width:18%;margin-right:5px;"><?php if ($_smarty_tpl->tpl_vars['virtualSku']->value) { ?> 组合料号:<?php } else { ?> 料号:<?php } ?> <input value="<?php echo $_smarty_tpl->tpl_vars['orderDetailData']->value['sku']; ?> " style="color:#06F;cursor:pointer;width:auto;border:none; background-color: #fff; outline:none;" onclick="javascrip:window.open('index.php?act=skuInfo&mod=skuInfo&sku=<?php echo $_smarty_tpl->tpl_vars['orderDetailData']->value['sku']; ?> ')" readonly/></span> <?php if (!$_smarty_tpl->tpl_vars['virtualSku']->value) { ?> <span style="width:9%;margin-right:5px;">数量:<input value="<?php echo $_smarty_tpl->tpl_vars['orderDetailData']->value['amount']; ?> " style="color:#009d9b;width:40px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:11%;margin-right:5px;">售价:<input value="<?php echo $_smarty_tpl->tpl_vars['orderDetailData']->value['itemPrice']; ?> " style="width:67px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:15%;margin-right:5px;">sfee:<input value="<?php echo $_smarty_tpl->tpl_vars['orderDetailData']->value['shippingFee']; ?> " style="width:53px;border:none; background-color: #fff; outline:none;" readonly/></span> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['skuinfo']->value['purchaseName']) { ?> <?php if ($_smarty_tpl->tpl_vars['skusellinfo']->value['is_warning'] == 1) { ?> <font color="red">预警</font><?php } ?> <span style="width:9%;margin-right:5px;">实际库存:<input value="<?php echo $_smarty_tpl->tpl_vars['skuinfo']->value['enableCount']; ?> " style="width:28px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:9%;margin-right:5px;">待发货:<input value="<?php echo $_smarty_tpl->tpl_vars['skusellinfo']->value['waitingSendCount']; ?> " style="width:28px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:9%;margin-right:5px;">被拦截:<input value="<?php echo $_smarty_tpl->tpl_vars['skusellinfo']->value['interceptSendCount']; ?> " style="width:28px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:9%;margin-right:5px;">待审核:<input value="<?php echo $_smarty_tpl->tpl_vars['skusellinfo']->value['waitingAuditCount']; ?> " style="width:28px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:9%;margin-right:5px;">已预订:<input value="<?php echo $_smarty_tpl->tpl_vars['skusellinfo']->value['enableCount']; ?> " style="width:28px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:9%;margin-right:5px;">每天均量:<input value="<?php echo $_smarty_tpl->tpl_vars['skusellinfo']->value['averageDailyCount']; ?> " style="width:28px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:9%;margin-right:5px;">消耗库存天数:<input value="<?php if ($_smarty_tpl->tpl_vars['sskusellinfo']->value['AverageDailyCount'] > 0) { echo ceil($_smarty_tpl->tpl_vars['orderDetailData']->value['amount'] / $_smarty_tpl->tpl_vars['skusellinfo']->value['AverageDailyCount']); } else { ?> 0<?php } ?> " style="width:28px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:10%;margin-right:5px;">采购:<input value="<?php echo $_smarty_tpl->tpl_vars['skuinfo']->value['purchaseName']; ?> " style="width:60px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:15%;margin-right:0;">成本:<input value="<?php echo $_smarty_tpl->tpl_vars['skuinfo']->value['goodsCost']; ?> RMB" style="width:80px;border:none; background-color: #fff; outline:none;" readonly/></span> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['virtualSku']->value) { ?> <?php $_smarty_tpl->tpl_vars['sskuinfo'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['sskuinfo']->_loop = false; $_smarty_tpl->tpl_vars['ssku'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['virtualSku']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['sskuinfo']->key => $_smarty_tpl->tpl_vars['sskuinfo']->value) { $_smarty_tpl->tpl_vars['sskuinfo']->_loop = true; $_smarty_tpl->tpl_vars['ssku']->value = $_smarty_tpl->tpl_vars['sskuinfo']->key; ?> <?php $_smarty_tpl->tpl_vars['sskusellinfo'] = new Smarty_variable(PurchaseAPIModel::getSkuDailyStatus($_smarty_tpl->tpl_vars['ssku']->value), null, 0); ?> <br /> <span style="width:18%;margin-right:5px;">sku:<input value="<?php echo $_smarty_tpl->tpl_vars['ssku']->value; ?> " style="width:auto;border:none; background-color: #fff;color:#06F;cursor:pointer; outline:none;" onclick="javascrip:window.open('index.php?act=skuInfo&mod=skuInfo&sku=<?php echo $_smarty_tpl->tpl_vars['ssku']->value; ?> ')" readonly/></span> <span style="width:9%;margin-right:5px;">数量:<input value="<?php echo $_smarty_tpl->tpl_vars['sskuinfo']->value['count'] * $_smarty_tpl->tpl_vars['orderDetailData']->value['amount']; ?> " style="width:40px;border:none; color:#009d9b;background-color: #fff; outline:none;" readonly/></span> <span style="width:11%;margin-right:5px;">售价:<input value="<?php echo $_smarty_tpl->tpl_vars['orderDetailData']->value['itemPrice']; ?> " style="width:67px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:15%;margin-right:5px;">sfee:<input value="<?php echo $_smarty_tpl->tpl_vars['orderDetailData']->value['shippingFee']; ?> " style="width:53px;border:none; background-color: #fff; outline:none;" readonly/></span> <?php if ($_smarty_tpl->tpl_vars['skusellinfo']->value['is_warning'] == 1) { ?> <font color="red">预警</font><?php } ?> <span style="width:9%;margin-right:5px;">实际库存:<input value="<?php echo $_smarty_tpl->tpl_vars['sskuinfo']->value['enableCount']; ?> " style="width:28px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:9%;margin-right:5px;">待发货:<input value="<?php echo $_smarty_tpl->tpl_vars['sskusellinfo']->value['waitingSendCount']; ?> " style="width:28px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:9%;margin-right:5px;">被拦截:<input value="<?php echo $_smarty_tpl->tpl_vars['sskusellinfo']->value['interceptSendCount']; ?> " style="width:28px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:9%;margin-right:5px;">待审核:<input value="<?php echo $_smarty_tpl->tpl_vars['sskusellinfo']->value['waitingAuditCount']; ?> " style="width:28px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:9%;margin-right:5px;">已预订:<input value="<?php echo $_smarty_tpl->tpl_vars['sskusellinfo']->value['enableCount']; ?> " style="width:28px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:9%;margin-right:5px;">每天均量:<input value="<?php echo $_smarty_tpl->tpl_vars['sskusellinfo']->value['averageDailyCount']; ?> " style="width:28px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:9%;margin-right:5px;">消耗库存天数:<input value="<?php if ($_smarty_tpl->tpl_vars['sskusellinfo']->value['AverageDailyCount'] > 0) { echo ceil($_smarty_tpl->tpl_vars['sskuinfo']->value['count'] * $_smarty_tpl->tpl_vars['orderDetailData']->value['amount'] / $_smarty_tpl->tpl_vars['sskusellinfo']->value['AverageDailyCount']); } else { ?> 0<?php } ?> " style="width:28px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:10%;margin-right:5px;">采购:<input value="<?php echo $_smarty_tpl->tpl_vars['sskuinfo']->value['purchaseName']; ?> " style="width:60px;border:none; background-color: #fff; outline:none;" readonly/></span> <span style="width:15%;margin-right:0;">成本:<input value="<?php echo $_smarty_tpl->tpl_vars['sskuinfo']->value['goodsCost']; ?> RMB" style="width:80px;border:none; background-color: #fff; outline:none;" readonly/></span> <?php $_smarty_tpl->tpl_vars['orderAuditVal'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['orderAuditVal']->_loop = false; $_from = $_smarty_tpl->tpl_vars['orderAudit']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } $_smarty_tpl->tpl_vars['orderAuditVal']->total = $_smarty_tpl->_count($_from); $_smarty_tpl->tpl_vars['orderAuditVal']->iteration = 0; foreach ($_from as $_smarty_tpl->tpl_vars['orderAuditVal']->key => $_smarty_tpl->tpl_vars['orderAuditVal']->value) { $_smarty_tpl->tpl_vars['orderAuditVal']->_loop = true; $_smarty_tpl->tpl_vars['orderAuditVal']->iteration++; $_smarty_tpl->tpl_vars['orderAuditVal']->last = $_smarty_tpl->tpl_vars['orderAuditVal']->iteration === $_smarty_tpl->tpl_vars['orderAuditVal']->total; $_smarty_tpl->tpl_vars['smarty']->value['foreach']['auditVal']['last'] = $_smarty_tpl->tpl_vars['orderAuditVal']->last; ?> <?php if ($_smarty_tpl->tpl_vars['orderAuditVal']->value['sku'] == $_smarty_tpl->tpl_vars['ssku']->value) { ?> <span style="width:30%">采购审核:<?php if ($_smarty_tpl->tpl_vars['orderAuditVal']->value['auditStatus'] == '1') { ?> <font color="green" >通过</font><?php } elseif ($_smarty_tpl->tpl_vars['orderAuditVal']->value['auditStatus'] == '2') { ?> <font color="red" >拦截</font><?php } else { ?> <font color="orange" >状态有误</font><?php } ?> </span> <?php } ?> <?php } ?> <?php } ?> <?php } ?> <?php $_smarty_tpl->tpl_vars['orderAuditVal'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['orderAuditVal']->_loop = false; $_from = $_smarty_tpl->tpl_vars['orderAudit']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } $_smarty_tpl->tpl_vars['orderAuditVal']->total = $_smarty_tpl->_count($_from); $_smarty_tpl->tpl_vars['orderAuditVal']->iteration = 0; foreach ($_from as $_smarty_tpl->tpl_vars['orderAuditVal']->key => $_smarty_tpl->tpl_vars['orderAuditVal']->value) { $_smarty_tpl->tpl_vars['orderAuditVal']->_loop = true; $_smarty_tpl->tpl_vars['orderAuditVal']->iteration++; $_smarty_tpl->tpl_vars['orderAuditVal']->last = $_smarty_tpl->tpl_vars['orderAuditVal']->iteration === $_smarty_tpl->tpl_vars['orderAuditVal']->total; $_smarty_tpl->tpl_vars['smarty']->value['foreach']['auditVal']['last'] = $_smarty_tpl->tpl_vars['orderAuditVal']->last; ?> <?php if ($_smarty_tpl->tpl_vars['orderAuditVal']->value['sku'] == $_smarty_tpl->tpl_vars['orderDetailData']->value['sku']) { ?> <span style="width:30%">采购审核:<?php if ($_smarty_tpl->tpl_vars['orderAuditVal']->value['auditStatus'] == '1') { ?> <font color="green" >通过</font><?php } elseif ($_smarty_tpl->tpl_vars['orderAuditVal']->value['auditStatus'] == '2') { ?> <font color="red" >拦截</font><?php } else { ?> <font color="orange" >状态有误</font><?php } ?> </span> <?php } ?> <?php } ?> </td> <td class="unpicurl" style="width:13%;"> <?php if ($_smarty_tpl->tpl_vars['orderDetailExtenData']->value['itemTitle']) { ?> <a href="<?php if ($_smarty_tpl->tpl_vars['orderData']->value['platformId'] == 1) { ?> http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=<?php echo $_smarty_tpl->tpl_vars['orderDetailExtenData']->value['itemId']; echo $_smarty_tpl->tpl_vars['ebaylistingurl']->value; } elseif ($_smarty_tpl->tpl_vars['orderData']->value['platformId'] == 2) { ?> http://www.aliexpress.com/item/New-1mm-Silver-Metallic-Caviar-Beads-Studs-Nail-Art-Glitter-Nail-Decoration-13229/<?php echo $_smarty_tpl->tpl_vars['orderDetailExtenData']->value['itemId']; ?> .html<?php } elseif ($_smarty_tpl->tpl_vars['orderData']->value['platformId'] == 11) { ?> http://www.amazon.com/gp/product/<?php echo $_smarty_tpl->tpl_vars['orderDetailExtenData']->value['itemId']; } ?> " target="_blank">(<?php echo $_smarty_tpl->tpl_vars['orderDetailExtenData']->value['itemId']; ?> ) <?php echo $_smarty_tpl->tpl_vars['orderDetailExtenData']->value['itemTitle']; ?> </a><?php } else { ?> --<?php } ?> </td> </tr--> <?php } if (!$_smarty_tpl->tpl_vars['orderDetail']->_loop) { ?> <tr> <td colspan="17" > <span>订单明细为空,请核实订单的信息!</span> </td> </tr> <?php } ?> </table> </div> </td> </tr> <tr class="title"> <td align="center"> <span style="width:auto;"> <?php $_smarty_tpl->tpl_vars['vk'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['vk']->_loop = false; $_from = $_smarty_tpl->tpl_vars['statusMenu']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['vk']->key => $_smarty_tpl->tpl_vars['vk']->value) { $_smarty_tpl->tpl_vars['vk']->_loop = true; ?> <?php if ($_smarty_tpl->tpl_vars['orderData']->value['orderType'] == '') { ?> <?php if ($_smarty_tpl->tpl_vars['vk']->value['statusCode'] == $_smarty_tpl->tpl_vars['orderData']->value['orderStatus']) { echo $_smarty_tpl->tpl_vars['vk']->value['statusName']; } ?> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['orderData']->value['orderType'] != '') { ?> <?php if ($_smarty_tpl->tpl_vars['vk']->value['statusCode'] == $_smarty_tpl->tpl_vars['orderData']->value['orderType']) { echo $_smarty_tpl->tpl_vars['vk']->value['statusName']; } ?> <?php } ?> <?php } ?> </span> </td> <td colspan="2"> <span style="width:38%">同步时间:<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['orderData']->value['orderAddTime'], "%Y-%m-%d %H:%I:%S"); ?> </span> <span style="width:20%"> <?php if ($_smarty_tpl->tpl_vars['orderData']->value['combinePackage'] == 1 && $_smarty_tpl->tpl_vars['combinePackage']->value['son'] != '') { ?> 该订单为#[<?php echo $_smarty_tpl->tpl_vars['combinePackage']->value['son']; ?> ]#合并包裹发货 <?php } ?> <?php if ($_smarty_tpl->tpl_vars['orderData']->value['combinePackage'] == 2 && $_smarty_tpl->tpl_vars['combinePackage']->value['main'] != '') { ?> 该订单被<?php echo $_smarty_tpl->tpl_vars['combinePackage']->value['main']; ?> 合并 <?php } ?> </span> <span> <?php if ($_smarty_tpl->tpl_vars['orderData']->value['isSplit'] == 1) { ?> 被拆分的订单 <?php } ?> <?php if ($_smarty_tpl->tpl_vars['orderData']->value['isSplit'] == 2) { ?> 拆分产生的订单 <?php } ?> </span> <span> <?php if ($_smarty_tpl->tpl_vars['orderData']->value['isCopy'] == 1) { ?> 被复制订单 <?php } ?> <?php if ($_smarty_tpl->tpl_vars['orderData']->value['isCopy'] == 2) { ?> <?php if ($_smarty_tpl->tpl_vars['orderData']->value['isBuji'] == 2) { ?> 补寄订单 <?php } else { ?> 复制订单 <?php } ?> <?php } ?> </span> <span> <?php if ($_smarty_tpl->tpl_vars['orderData']->value['combineOrder'] == 2) { ?> 合并订单 <?php } ?> </span> <?php if ($_smarty_tpl->tpl_vars['orderNote']->value) { ?> <span> 备注: <?php $_smarty_tpl->tpl_vars['ve'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['ve']->_loop = false; $_from = $_smarty_tpl->tpl_vars['orderNote']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['ve']->key => $_smarty_tpl->tpl_vars['ve']->value) { $_smarty_tpl->tpl_vars['ve']->_loop = true; ?> <?php if ($_smarty_tpl->tpl_vars['ve']->value['content'] != '') { ?> <?php echo $_smarty_tpl->tpl_vars['ve']->value['content']; ?> <?php } ?> <?php } ?> </span> <?php } ?> <?php if ($_smarty_tpl->tpl_vars['orderData']->value['isLock'] == 1) { ?> <span> 锁定人:<?php $_smarty_tpl->tpl_vars['lockUser'] = new Smarty_variable(UserModel::getUsernameById($_smarty_tpl->tpl_vars['orderData']->value['lockUser']), null, 0); echo $_smarty_tpl->tpl_vars['lockUser']->value; ?> 锁定时间:<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['orderData']->value['lockTime'], "%Y-%m-%d %H:%I:%S"); ?> </span> <?php } ?> </td> </tr> </table> <?php } if (!$_smarty_tpl->tpl_vars['orderlist']->_loop) { ?> <span>还没有相应的订单信息哦!</span> <?php } ?> </div> <div class="bottomvar"> <span id="showSelectNum2"></span> <?php if ($_smarty_tpl->tpl_vars['status']->value == '') { ?> <div class="pagination"> <?php echo $_smarty_tpl->tpl_vars['show_page']->value; ?> </div> <?php } ?> </div> <?php echo $_smarty_tpl->getSubTemplate('orderBatchMove.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0); ?> <?php echo $_smarty_tpl->getSubTemplate('footer.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0); ?> <?php echo $_smarty_tpl->getSubTemplate('cancelCombine.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0); }
public function view_exportsToXls1() { error_reporting(E_ALL); /*$searchPlatformId = isset($_GET['platformId']) ? $_GET['platformId'] : ''; //搜索平台 $searchAccountId = isset($_GET['accountId']) ? $_GET['accountId'] : ''; //搜索账号 $searchIsNote = isset($_GET['isNote']) ? $_GET['isNote'] : ''; //是否有留言 $searchTransportationType = isset($_GET['transportationType']) ? $_GET['transportationType'] : '';//运输类型 $searchTransportation = isset($_GET['transportation']) ? $_GET['transportation'] : ''; //运输方式 $searchIsBuji = isset($_GET['isBuji']) ? $_GET['isBuji'] : ''; //是否补寄订单 $searchIsLock = isset($_GET['isLock']) ? $_GET['isLock'] : ''; //是否锁定 $searchOrderTime1 = isset($_GET['OrderTime1']) ? $_GET['OrderTime1'] : ''; //搜索下单初始时间 $searchOrderTime2 = isset($_GET['OrderTime2']) ? $_GET['OrderTime2'] : ''; //搜索下单结束时间 //order_detail表 $searchReviews = isset($_GET['reviews']) ? $_GET['reviews'] : ''; //是否评价 $searchSku = isset($_GET['sku']) ? $_GET['sku'] : ''; //sku $searchOmOrderId = ''; //订单编号 $searchOrderType = isset($_GET['selectOrderType']) ? $_GET['selectOrderType'] : '';*/ //foreach($_GET as $k=>$v){ // //if(isset($_)) // } $type = isset($_GET['type']) ? trim($_GET['type']) : ""; $order = isset($_GET['order']) ? trim($_GET['order']) : ""; $where = " WHERE "; $where_arr = array(); $accountList = $_SESSION['accountList']; $platformList = $_SESSION['platformList']; //echo "<pre>"; print_r($accountList); exit; $platformsee = array(); for ($i = 0; $i < count($platformList); $i++) { $platformsee[] = $platformList[$i]; } if ($platformsee) { $where_arr[] = ' da.platformId IN ( ' . join(',', $platformsee) . ' ) '; } $accountsee = array(); for ($i = 0; $i < count($accountList); $i++) { $accountsee[] = $accountList[$i]; } if ($accountsee) { $where_arr[] = ' da.accountId IN ( ' . join(",", $accountsee) . ' ) '; } if ($type == 1) { $arr = explode(",", $order); $ostatus = $arr[0]; $otype = $arr[1]; $where_arr[] = " da.is_delete=0 "; if ($ostatus) { $where_arr[] = " da.orderStatus='{$ostatus}' "; } if ($otype) { $where_arr[] = " da.orderType='{$otype}' "; } //$where = "where da.orderStatus='{$ostatus}' and da.orderType='{$otype}' and da.is_delete=0"; } elseif ($type == 2) { $where_arr[] = " da.id in({$order}) "; } $where .= join(' AND ', $where_arr); //echo $where; exit; $orderarr = OrderindexModel::showSearchOrderList("om_unshipped_order", $where); //echo count($orderarr); exit; $exporter = new ExportDataExcel("browser", "xls1" . $date . ".xls"); //echo "<pre>"; print_r($orderarr[98]);exit; $exporter->initialize(); // starts streaming data to web browser $exporter->addRow(array("日期", "账号", "订单编号", "重量", "邮费", "运输方式", "交易号", "客户ID", "仓位号", "料号", "数量", "国家", "包裹总价值", "币种", "包装员", "挂号条码", "是/否")); foreach ($orderarr as $key => $value) { $paymentTime = date("Y-m-d", $value['orderData']['paymentTime']); $accountArr = OmAccountModel::accountInfo($value['orderData']['accountId']); $account = $accountArr['account']; //$account = $account['account']; $orderid = $key; $weight = $value['orderWarehouse']['actualWeight']; $shipfee = $value['orderWarehouse']['actualShipping']; $packagerId = $value['orderWarehouse']['packagerId']; $packager = UserModel::getUsernameById($packagerId); $transportation = CommonModel::getCarrierList(); //所有的 $transportationList = array(); foreach ($transportation as $tranValue) { if ($tranValue['id'] == $value['orderData']['transportId']) { $transport = $tranValue['carrierNameCn']; break; } //$transportationList[$tranValue['id']] = $tranValue['carrierNameCn']; } //$plateform = exportsToXlsModel::plateformIdToName($value['orderData']['platformId']); $plateformArr = OmAccountModel::platformListById($value['orderData']['platformId']); $plateform = $plateformArr[$value['orderData']['platformId']]; //$plateform = $plateform['platform']; $transId = $value['orderExtenData']['transId']; $currency = $value['orderExtenData']['currency']; $userId = $value['orderUserInfoData']['platformUsername']; $countryName = $value['orderUserInfoData']['countryName']; $actualTotal = $value['orderData']['actualTotal']; $recordNumber = $value['orderData']['recordNumber']; $trackNumber = $value['orderTracknumber'][0]['tracknumber']; $orderDetails = $value['orderDetail']; if (count($orderDetails) == 1) { foreach ($value['orderDetail'] as $key => $detail) { $skuId = $key; } $exporter->addRow(array($paymentTime, $account, $orderid, $weight, $shipfee, $transport, $recordNumber, $userId, "", $orderDetails[$skuId]['orderDetailData']['sku'], $orderDetails[$skuId]['orderDetailData']['amount'], $countryName, $actualTotal, $currency, $packager, $trackNumber, "")); } else { $exporter->addRow(array($paymentTime, $account, $orderid, $weight, $shipfee, $transport, $recordNumber, $userId, "", "", "", $countryName, $actualTotal, $currency, $packager, $trackNumber, "")); foreach ($orderDetails as $detail) { $exporter->addRow(array($paymentTime, $account, $orderid, "", "", $transport, "", "", "", $detail['orderDetailData']['sku'], $detail['orderDetailData']['amount'], $countryName, "", "", "", "", "")); } } } $exporter->finalize(); // writes the footer, flushes remaining data to browser. exit; }
function content_5319cba229dd99_23082575($_smarty_tpl) { if (!is_callable('smarty_function_html_checkboxes')) { include 'E:\\erpNew\\order.valsun.cn\\lib\\template\\smarty\\plugins\\function.html_checkboxes.php'; } echo $_smarty_tpl->getSubTemplate("header.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0); ?> <script type="text/javascript" src="./js/usercompense.js"></script> <!--<div class="servar"> </div>--> <div class="main"> <div id="accordion"> <h3>平台账号权限控制-<?php $_smarty_tpl->tpl_vars['uidUser'] = new Smarty_variable(UserModel::getUsernameById($_smarty_tpl->tpl_vars['uid']->value), null, 0); echo $_smarty_tpl->tpl_vars['uidUser']->value; ?> </h3> <div> <form name="powerFrom" id="powerFrom" action="index.php?mod=omAccount&act=showUserCompense" method="post"> <input type="hidden" name="action" value="accountpower" /> <input type="hidden" id="uid" name="uid" value="<?php echo $_smarty_tpl->tpl_vars['uid']->value; ?> " /> <?php $_smarty_tpl->tpl_vars['viewaccountlist'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['viewaccountlist']->_loop = false; $_smarty_tpl->tpl_vars['pid'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['arr_all_platform_account']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['viewaccountlist']->key => $_smarty_tpl->tpl_vars['viewaccountlist']->value) { $_smarty_tpl->tpl_vars['viewaccountlist']->_loop = true; $_smarty_tpl->tpl_vars['pid']->value = $_smarty_tpl->tpl_vars['viewaccountlist']->key; ?> <?php $_smarty_tpl->tpl_vars['platformName'] = new Smarty_variable($_smarty_tpl->tpl_vars['viewaccountlist']->value['platform'], null, 0); ?> <?php $_smarty_tpl->tpl_vars['acountlists'] = new Smarty_variable($_smarty_tpl->tpl_vars['viewaccountlist']->value['acountlists'], null, 0); ?> <input type="checkbox" id="checkboxes_platform_<?php echo $_smarty_tpl->tpl_vars['pid']->value; ?> " name="checkboxes_platform[]" <?php if ($_smarty_tpl->tpl_vars['visible_platform_account']->value[$_smarty_tpl->tpl_vars['pid']->value]) { ?> checked='checked'<?php } ?> value="<?php echo $_smarty_tpl->tpl_vars['pid']->value; ?> " onclick="platformCheckBox(<?php echo $_smarty_tpl->tpl_vars['pid']->value; ?> );" /> <b><?php echo $_smarty_tpl->tpl_vars['platformName']->value; ?> </b><br> <?php $_smarty_tpl->tpl_vars['viewaccount'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['viewaccount']->_loop = false; $_smarty_tpl->tpl_vars['aid'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['acountlists']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['viewaccount']->key => $_smarty_tpl->tpl_vars['viewaccount']->value) { $_smarty_tpl->tpl_vars['viewaccount']->_loop = true; $_smarty_tpl->tpl_vars['aid']->value = $_smarty_tpl->tpl_vars['viewaccount']->key; ?> <?php if ($_smarty_tpl->tpl_vars['viewaccount']->value != '') { ?> <input type="checkbox" id="checkboxes_account_<?php echo $_smarty_tpl->tpl_vars['aid']->value; ?> " name="checkboxes_account_<?php echo $_smarty_tpl->tpl_vars['pid']->value; ?> []" <?php if (in_array($_smarty_tpl->tpl_vars['aid']->value, $_smarty_tpl->tpl_vars['visible_platform_account']->value[$_smarty_tpl->tpl_vars['pid']->value])) { ?> checked='checked'<?php } ?> value="<?php echo $_smarty_tpl->tpl_vars['aid']->value; ?> " /> <?php echo $_smarty_tpl->tpl_vars['viewaccount']->value; ?> <?php } ?> <?php } ?> <br> <?php } ?> <!--<div id="tabs-2"> <p>待开发权限.</p> </div>--> <input type="submit" value="update" /> </form> </div> <h3>文件夹移动权限设置</h3> <div> <!--<form name="powerFrom" id="powerFrom" action="index.php?mod=omAccount&act=showUserCompense" method="post"> <input type="hidden" name="action" value="movefolder" /> <input type="hidden" name="uid" value="<?php echo $_smarty_tpl->tpl_vars['uid']->value; ?> " />--> <!--<p><?php echo smarty_function_html_checkboxes(array('id' => "checkboxes_movefolder", 'name' => "checkboxes_movefolder", 'options' => $_smarty_tpl->tpl_vars['StatusMenu']->value, 'checked' => $_smarty_tpl->tpl_vars['key_visible_movefolder']->value, 'separator' => " "), $_smarty_tpl); ?> </p>--> <table cellpadding="0" cellspacing="0" style="border:0;"> <tr> <td> 移出 </td> <td> 移入 </td> </tr> <tr> <td> <select id="select_movefolder" name="select_movefolder" size="14"> <?php $_smarty_tpl->tpl_vars['statusvalue'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['statusvalue']->_loop = false; $_smarty_tpl->tpl_vars['statusId'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['StatusMenu']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['statusvalue']->key => $_smarty_tpl->tpl_vars['statusvalue']->value) { $_smarty_tpl->tpl_vars['statusvalue']->_loop = true; $_smarty_tpl->tpl_vars['statusId']->value = $_smarty_tpl->tpl_vars['statusvalue']->key; ?> <option value="<?php echo $_smarty_tpl->tpl_vars['statusId']->value; ?> " onclick="showInfolderList(<?php echo $_smarty_tpl->tpl_vars['statusId']->value; ?> );"><?php echo $_smarty_tpl->tpl_vars['statusvalue']->value; ?> </option> <?php } ?> </select> </td> <td> <!--<div id="infolderlist" style="text-align:right; border:#CCC solid 1px;">--> <?php $_smarty_tpl->tpl_vars['statusvalue'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['statusvalue']->_loop = false; $_smarty_tpl->tpl_vars['statusId'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['StatusMenu']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['statusvalue']->key => $_smarty_tpl->tpl_vars['statusvalue']->value) { $_smarty_tpl->tpl_vars['statusvalue']->_loop = true; $_smarty_tpl->tpl_vars['statusId']->value = $_smarty_tpl->tpl_vars['statusvalue']->key; ?> <input type="checkbox" id="checkboxes_movefolder<?php echo $_smarty_tpl->tpl_vars['statusId']->value; ?> " onclick="clickmovefolder(<?php echo $_smarty_tpl->tpl_vars['statusId']->value; ?> );" name="checkboxes_movefolder" value="<?php echo $_smarty_tpl->tpl_vars['statusId']->value; ?> " /> <?php echo $_smarty_tpl->tpl_vars['statusvalue']->value; ?> <?php } ?> </td> </tr> </table> <!--</div>--> <!--<input type="submit" value="update" /> </form>--> </div> <h3>文件夹显示权限设置</h3> <div> <p> <?php $_smarty_tpl->tpl_vars['statusGroupList'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['statusGroupList']->_loop = false; $_smarty_tpl->tpl_vars['statusCode'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['statusGroupLists']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['statusGroupList']->key => $_smarty_tpl->tpl_vars['statusGroupList']->value) { $_smarty_tpl->tpl_vars['statusGroupList']->_loop = true; $_smarty_tpl->tpl_vars['statusCode']->value = $_smarty_tpl->tpl_vars['statusGroupList']->key; ?> <input type="checkbox" id="checkboxes_showfolder<?php echo $_smarty_tpl->tpl_vars['statusCode']->value; ?> " name="checkboxes_showfolder0" subCode="<?php echo $_smarty_tpl->tpl_vars['statusGroupList']->value['subCode']; ?> " value="<?php echo $_smarty_tpl->tpl_vars['statusCode']->value; ?> " onclick="clickMainCheckBox(<?php echo $_smarty_tpl->tpl_vars['statusCode']->value; ?> );" /> <b><?php echo $_smarty_tpl->tpl_vars['statusGroupList']->value['name']; ?> </b><br> <?php $_smarty_tpl->tpl_vars['statusGroup'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['statusGroup']->_loop = false; $_smarty_tpl->tpl_vars['statusCode2'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['statusGroupList']->value['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['statusGroup']->key => $_smarty_tpl->tpl_vars['statusGroup']->value) { $_smarty_tpl->tpl_vars['statusGroup']->_loop = true; $_smarty_tpl->tpl_vars['statusCode2']->value = $_smarty_tpl->tpl_vars['statusGroup']->key; ?> <input type="checkbox" id="checkboxes_showfolder<?php echo $_smarty_tpl->tpl_vars['statusGroup']->value['statusCode']; ?> " onclick="clickSubCheckBox(<?php echo $_smarty_tpl->tpl_vars['statusCode']->value; ?> );" name="checkboxes_showfolder" groupId="<?php echo $_smarty_tpl->tpl_vars['statusCode']->value; ?> " value="<?php echo $_smarty_tpl->tpl_vars['statusGroup']->value['statusCode']; ?> " <?php if (in_array($_smarty_tpl->tpl_vars['statusGroup']->value['statusCode'], $_smarty_tpl->tpl_vars['visible_showfolder']->value)) { ?> checked='checked'<?php } ?> /> <?php echo $_smarty_tpl->tpl_vars['statusGroup']->value['statusName']; ?> <?php } ?> <br><br> <?php } ?> </p> <input type="button" value="提交" onclick="updateShowFolders();"/> </div> <h3>订单编辑权限设置</h3> <div> <p> <?php $_smarty_tpl->tpl_vars['optionvalue'] = new Smarty_Variable(); $_smarty_tpl->tpl_vars['optionvalue']->_loop = false; $_smarty_tpl->tpl_vars['optionId'] = new Smarty_Variable(); $_from = $_smarty_tpl->tpl_vars['editorder_options']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } foreach ($_from as $_smarty_tpl->tpl_vars['optionvalue']->key => $_smarty_tpl->tpl_vars['optionvalue']->value) { $_smarty_tpl->tpl_vars['optionvalue']->_loop = true; $_smarty_tpl->tpl_vars['optionId']->value = $_smarty_tpl->tpl_vars['optionvalue']->key; ?> <input type="checkbox" id="checkboxes_orderoptions<?php echo $_smarty_tpl->tpl_vars['optionId']->value; ?> " name="checkboxes_orderoptions" value="<?php echo $_smarty_tpl->tpl_vars['optionId']->value; ?> " <?php if (in_array($_smarty_tpl->tpl_vars['optionId']->value, $_smarty_tpl->tpl_vars['visible_editorder']->value)) { ?> checked='checked'<?php } ?> /> <?php echo $_smarty_tpl->tpl_vars['optionvalue']->value; ?> <?php } ?> </p> <input type="button" value="提交" onclick="updateOrderOptions();"/> </div> </div> <!--<table cellspacing="0" width="100%"> <tr class="title"> <td align="left">平台账号权限控制</td> </tr> <tr class="odd"> <td> </td> </tr> <tr class="title"> <td align="left">文件夹移动权限设置</td> </tr> <tr class="odd"> </tr> </table>--> </div> <?php echo $_smarty_tpl->getSubTemplate("footer.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0); }
function getBookTable($title, $author) { $link = ''; $bookModel = new BookModel(); $userModel = new UserModel(); $book = $bookModel->getBook($title, $author); $reviews = array(); $reviews = $bookModel->getBookReview($book->idBook); //echo $reviews[0]->description; $result = ''; $reviews_res = ""; $r = null; $price = $book->price; require "testdb.php"; if (isset($_SESSION['login_user'])) { $username = $_SESSION['login_user']; $query = "SELECT idUser FROM users WHERE username LIKE '{$username}'"; $result = mysql_query($query) or die(mysql_error()); while ($row = mysql_fetch_array($result)) { $idUser = $row[0]; $query2 = "SELECT * FROM reading WHERE idUser = {$idUser} AND idBook = {$book->idBook}"; $result2 = mysql_query($query2) or die(mysql_error()); while ($row = mysql_fetch_array($result2)) { $date = date('Y-m-d'); $end_date = date("Y-m-d", strtotime($row['enddate'])); if ($end_date > $date) { $price = 0; } } } } mysql_close(); if (isset($_SESSION['login_user'])) { if ($price == 0) { $link = $book->location; } else { $link = "payment.php"; } } if ($book != null) { $_SESSION['current_book'] = $book->idBook; $grade = 0; if ($book->noGrades > 0) { $grade = $book->grades / $book->noGrades; } $result = "\n\t\t\t\t\t<div class='row popular'>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<h3>{$book->title} – {$book->author}</h3>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class='row produs'>\n\t\t\t\t\t\t\t\t<div class='produs_sus' style=''>\n\t\t\t\t\t\t\t\t\t<div class='large-4 column poza_produs'>\n\t\t\t\t\t\t\t\t\t\t<img src='{$book->cover}' width='250' height='375' alt=''>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class='large-4 column produs_centru'>\n\t\t\t\t\t\t\t\t\t\t<p><span>Publish year : </span>{$book->rYear}<br></p>\n\t\t\t\t\t\t\t\t\t\t<p><span>Author : </span> <span class='al'>{$book->author}</span></a><br></p>\n\t\t\t\t\t\t\t\t\t\t<p><span>Category : </span> {$book->category}<br></p>\n\t\t\t\t\t\t\t\t\t\t<p><span>Publisher : </span> <span class='al'>{$book->publisher}</span></a><br></p>\n\t\t\t\t\t\t\t\t\t\t<p><span>Grade : </span> <span class='al'>{$grade}</span></a><br></p>\n\t\t\t\t\t\t\t\t\t\t<form action='' method='post'>\n\t\t\t\t\t\t\t\t\t\t\t<fieldset class='rating'>\n\t\t\t\t\t\t\t\t\t\t\t\t<legend>Please rate:</legend>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' id='star5' name='star5' value='5' /><label for='star5' title='Rocks!'>5 stars</label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' id='star4' name='star4' value='4' /><label for='star4' title='Pretty good'>4 stars</label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' id='star3' name='star3' value='3' /><label for='star3' title='Meh'>3 stars</label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' id='star2' name='star2' value='2' /><label for='star2' title='Kinda bad'>2 stars</label>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='submit' id='star1' name='star1' value='1' /><label for='star1' title='Sucks big time'>1 star</label>\n\t\t\t\t\t\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\t\t\t\$(function() {\n\t\t\t\t\t\t\t\t\t\tc_rate('ratem',19.4,17);\t\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t\t\t</div><!--end of produs_centru-->\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t<form action='' method='post'>\n\t\t\t\t\t\t\t\t<div class='large-4 column column produs_right'>\n\t\t\t\t\t\t\t\t\t<p class='pret'>\n\t\t\t\t\t\t\t\t\t\tPrice : {$price} Lei\n\t\t\t\t\t\t\t\t\t</p><br>\n\n\t\t\t\t\t\t\t\t\t<a href = '{$link}?title={$book->title}&author={$book->author}¤t_book={$book->idBook}&link_book={$book->location}' class='button info'>Read me</a>\n\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</div>\n\t\t\t\n\n\t\n\t\t\t\t\t\t<div class='large-12 column'>\t\n\t\t\t\t\t\t\t<h3>Description</h3>\n\t\t\t\t\t\t\t<div class='descriere_produs'>\t\t\n\t\t\t\t\t\t\t\t<p>{$book->description}</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\t\n\n\t\t\t\t\t"; $reviews_res = "<div class = 'large-12 column'>\n\t\t\t\t\t\t\t<h3>Reviews</h3>\n\t\t\t\t\t\t\t <div class='comentarii_utilizatori'> "; foreach ($reviews as $r) { if ($r->approved == 1) { $reviews_res = $reviews_res . " <div class='row'>\n\t\t\t\t\t\t<div class='large-12 column user'>" . $userModel->getUsernameById($r->idUser) . " : </div>\n\t\t\t\t\t\t<div class='large-12 column continut_comentariu'>" . $r->description . "</div><br></div>"; } } $reviews_res = $reviews_res . "\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\n\t\n\t\t\t\t\t\t<div class='clear'></div> \n\t\t\t\t\t\t \n\t\t\t\t\t\t<div class='large-12 column'> \n\t\t\t\t\t\t\t<h3>Add a review</h3>\n\t\t\t\t\t\t\t\t <form name='comentariiprodus1' action='' method='post'> \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t <div class='textar'>\n\t\t\t\t\t\t\t\t\t<div>Your review : </div>\n\t\t\t\t\t\t\t\t\t<textarea name='comment' cols='47' rows='10' class='contact_input' style='height:100px'></textarea> \n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class='rand_jos'>\n\t\t\t\t\t\t\t\t\t<!--<a href = '#' class = 'button info'>SEND </a>-->\n\t\t\t\t\t\t\t\t\t<input class = 'button info' name='addreview' type='submit' value=' Send '>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t </form> \n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>"; } return $result . $reviews_res; }
function act_getSkuInfo() { global $memc_obj; $sku_name = ''; $cate = ''; $sku = $_POST['sku']; if (is_numeric($sku) && $sku > 1000000) { //此sku为goods_code $goods_codes = WhStandardModel::goods_codeTosku($sku); $sku = $goods_codes['sku']; } //读取数据库 $categoryStr = ""; //$time1 = time(); //SKU信息API接口 $OmAvailableApiAct = new OmAvailableApiAct(); $skuInfo = $OmAvailableApiAct->act_getGoodsInfoBySku($sku); $skuInfo = $skuInfo['data']; //$skuInfo = $memc_obj->get_extral('pc_goods_'.$sku); $reSku = $skuInfo['sku']; //接口返回SKU $reSpu = $skuInfo['spu']; //接口返回SKU $skuName = $skuInfo['goodsName']; //产品描述 $purchaseId = $skuInfo['purchaseId']; //采购人ID $goodsCategory = $skuInfo['goodsCategory']; //SKU分类path $qcCategoryListAct = new qcCategoryListAct(); $where = 'WHERE is_delete=0 and path= "' . $goodsCategory . '"'; $categoryList = $qcCategoryListAct->act_getCategoryList('*', $where); $getCategoryArr = $qcCategoryListAct->act_getCategoryArr(); //获取产品类别列表信息 $sampleTypeListId = empty($categoryList) ? 1 : $categoryList[0]['sampleTypeId']; $qcStandard = new qcStandardAct(); $skuTypeQcArrList = $qcStandard->act_skuTypeQcList(''); $sampleTypeList = array(); $categoryInfo_ids = array(); $categoryInfo = array(); foreach ($skuTypeQcArrList as $skuTypeQcArrListValue) { $categoryInfo[$skuTypeQcArrListValue['id']] = $skuTypeQcArrListValue['typeName']; $sampleTypeList[$skuTypeQcArrListValue['id']] = $skuTypeQcArrListValue['typeName'] . " " . $skuTypeQcArrListValue['describe']; } $goodsCategoryNameArray = explode("-", $goodsCategory); $goodsCategoryName = array(); foreach ($goodsCategoryNameArray as $cvalue) { $goodsCategoryName[] = $getCategoryArr[$cvalue]; } $goodsCategoryNameStr = join('-', $goodsCategoryName); //$categoryInfo_ids = array_keys($categoryInfo_ids); //$categoryStr = $sampleTypeList[$sampleTypeListId]; //$img_return = $OmAvailableApiAct->act_getAllPic($reSpu, 'F');//图片接口 //var_dump($img_return); exit; $data = UserCacheModel::qccenterGetErpGoodscount($sku); $goods_count = $data['goods_count']; /*$goods_location = $data['goods_location']; $cguser = $data['cguser'];*/ //$categoryL = explode('-',$goodsCategory); /*foreach($category as $c_key=>$categoryArr){ if(in_array($categoryL[0],$categoryArr)){ if($c_key == '1'){ //SKU分类信息API接口 $cate = 1; $goodsCategorySt = $memc_obj->get_extral('pc_goods_category_'.$goodsCategory); $categoryStr = "{$goodsCategorySt['name']}:功能检测"; break; }else if($c_key == '2'){ //SKU分类信息API接口 $cate = 2; $goodsCategorySt = $memc_obj->get_extral('pc_goods_category_'.$goodsCategory); $categoryStr = "{$goodsCategorySt['name']}:尺寸质量检测"; break; }else if($c_key == '3'){ //SKU分类信息API接口 $cate = 3; $goodsCategorySt = $memc_obj->get_extral('pc_goods_category_'.$goodsCategory); $categoryStr = "{$goodsCategorySt['name']}:对图检测"; break; } }else{ continue; } }*/ $where = "where sku='{$sku}' and is_delete=0 and sellerId=1 and getUserId='{$_SESSION['sysUserId']}' and detectStatus=1 order by getTime asc limit 1"; $list = WhStandardModel::getNowWhList("*", $where); $num = $list[0]['num']; $infoid = $list[0]['id']; $goods_location = $list[0]['location']; $cguser = UserModel::getUsernameById($list[0]['purchaseId']); //$goods_count = 'TEST'; $where2 = "where sampleTypeId='{$sampleTypeListId}' and minimumLimit<='{$num}' and maximumLimit>='{$num}' limit 1"; $list2 = DetectStandardModel::getNowStandardList("*", $where2); //如果是正常回测,获取待定回测信息备注 $pendingInfo = PendingProductsModel::getPendingProductsList('backNote', ' WHERE infoId=' . $infoid); if ($pendingInfo) { $backNote = $pendingInfo[0]['backNote']; } //$time2 = time(); //echo ($time2-$time1); if ($list) { self::$errCode = "200"; $info = array(); $info['info'] = "{$reSku} {$skuName} <br> 产品分类: {$goodsCategoryNameStr} <br>【 来货 {$num} 个,现有库存 " . $goods_count . " 个,仓位:" . $goods_location . ",采购:{$cguser} 】"; $info['category'] = $sampleTypeListId; $info['categoryInfo'] = $categoryInfo; $info['sku'] = $reSku; $info['spu'] = $reSpu; $info['num'] = $num; $info['infoid'] = $infoid; $info['cate'] = $list2; $info['images'] = $img_return['data']['Description'][0]; $info['backNote'] = !empty($backNote) ? $backNote : ''; return $info; } else { self::$errCode = "003"; self::$errMsg = "未找到该料号[{$sku}]对于的{$_SESSION['userName']}领取记录!"; return false; } }