/**
  * ebay销售漏扫描报表导出
  * @author zqt
  */
 public function act_ebayNoScanOutputOn()
 {
     $start = strtotime($_POST['ebayNoScanStart']);
     $end = strtotime($_POST['ebayNoScanEnd']);
     $accountIdArr = $_POST['ebayNoScanAccount'];
     if (empty($accountIdArr)) {
         $statusStr = '账号为空,请选择!';
         echo '<script language="javascript">
                 alert("' . $statusStr . '");
                 history.back();
               </script>';
         exit;
     }
     if ($start > $end) {
         $statusStr = '起始时间大于结束时间,错误!';
         echo '<script language="javascript">
                 alert("' . $statusStr . '");
                 history.back();
               </script>';
         exit;
     }
     $packinglists = M('interfacePc')->getMaterList();
     // 获取全部包材记录
     foreach ($packinglists as $packinglist) {
         $packings[$packinglist['id']]['pmName'] = $packinglist['pmName'];
         $packings[$packinglist['id']]['pmCost'] = $packinglist['pmCost'];
     }
     unset($packinglists);
     $carrierLists = M('InterfaceTran')->getCarrierList(2);
     //获取所有的运输方式
     foreach ($carrierLists as $carrierList) {
         $carriers[$carrierList['id']] = $carrierList['carrierNameCn'];
     }
     unset($carrierLists);
     $channelLists = M('InterfaceTran')->getChannelList();
     //获取全部运输方式下的渠道记录
     foreach ($channelLists as $channelList) {
         $channels[$channelList['id']] = $channelList['channelName'];
     }
     unset($channelLists);
     $staffLists = array();
     //$staffInfoLists = CommonModel::getStaffInfoList (); // 获取全部人员,这里要换成接口,
     //        foreach ( $staffInfoLists as $staffInfoList ) {
     //            $staffLists [$staffInfoList ['global_user_id']] = $staffInfoList ['global_user_name'];
     //        }
     //        unset($staffInfoLists);
     $table = 'unshipped';
     //查询的是未发货还是发货,发货为shipped,这里默认为unshipped
     $orderIdsSTList = M('Order')->getOrderWarehouseOmorderIdsByWeighTime($table, $start, $end);
     $tmpIdsArr = array();
     foreach ($orderIdsSTList as $value) {
         $tmpIdsArr[] = $value['omOrderId'];
     }
     $tmpIdsStr = !empty($tmpIdsArr) ? implode(',', $tmpIdsArr) : '0';
     $orderStatusStr = '2';
     $accountIdStr = implode(',', $accountIdArr);
     $orderIdsISAList = M('Order')->getOrderIdsByISA($table, $tmpIdsStr, $orderStatusStr, $accountIdStr);
     //var_dump(M('Order')->getAllRunSql(), $orderIdsISAList);exit;
     $tmpIdsArr = array();
     $tmpIdsArr[] = 0;
     foreach ($orderIdsISAList as $value) {
         $tmpIdsArr[] = $value['id'];
     }
     $shipOrderList = M('Order')->getFullUnshippedOrderById($tmpIdsArr);
     print_r(M('Order')->getAllRunSql());
     //exit;
     print_r($shipOrderList);
     exit;
     F('order');
     $fileName = "export_ebay_test_" . date("Y-m-d_H_i_s") . ".xls";
     $excel = new ExportDataExcel('browser', $fileName);
     $excel->initialize();
     $excel->addRow(array('付款日期', 'ebay store', '交易号', '客户ID', '仓位号', '料号', '数量', '国家', '产品价格', 'ebay运费', '包裹总价值', '币种', '包装员', '挂号条码', '是/否', '重量', '邮费', '运输方式', '订单编号', '产品货本', '交易ID', 'ItemID', '是否复制订单', '是否补寄', '是否拆分订单', '包材', '包材费用', '是否组合料号', '扫描日期', '采购'));
     foreach ($shipOrderList as $key => $value) {
         // key代表最外层的维数
         /*
          * $value分别有7个对应的键,分别为 orderData,//订单表头数据记录 orderExtenData,//订单表扩展数据记录 orderUserInfoData,//订单表中客户的数据记录 orderWhInfoData,//物料对订单进行操作的数据记录 orderNote,//订单的备注(销售人员添加)记录 orderTracknumber,//订单的追踪号记录 orderAudit,//订单明细审核记录 orderDetail //订单明细记录
          */
         $orderData = $value['order'];
         // 订单表头数据记录,为一维数组
         $orderExtenData = $value['orderExtension'];
         // 扩展表头数据记录,为一维数组
         $orderUserInfoData = $value['orderUserInfo'];
         // 订单客户数据记录,为一维数组
         $orderWhInfoData = $value['orderWarehouse'];
         // 物料对订单进行操作的数据记录,为一维数组
         $orderNote = $value['orderNote'];
         // 订单备注记录,二维数组
         $orderTracknumber = $value['orderTracknumber'];
         // 订单跟踪号,二维数组
         //$orderAudit = $value ['orderAudit']; // 订单明细审核记录,二维数组
         $orderDetail = $value['orderDetail'];
         // 订单明细记录,三维数组
         $orderId = $orderData['id'];
         // ****订单编号 $ebay_id
         $orderPaidtime = @date('Y-m-d', $orderData['paymentTime']);
         // ****订单付款时间 paidtime
         $orderUserInfoEmail = $orderUserInfoData['email'];
         // ****客户邮箱 emial
         $platformUsername = $orderExtenData['platformUsername'];
         // ****客户平台登录名称 $ebay_userid,用扩展表中的该字段 ebay_username
         $username = @html_entity_decode($orderUserInfoData['username'], ENT_QUOTES, 'UTF-8');
         // ****客户真实名称(收件人) username
         $orderUserInfoStreet1 = @$orderUserInfoData['street'];
         // **** 街道地址 street1
         $orderUserInfoStreet2 = @$orderUserInfoData['address2'];
         // *** 街道地址2 steet2(一般订单会有两个街道地址)
         $orderUserInfoCity = $orderUserInfoData['city'];
         // **** 市 city
         $orderUserInfoState = $orderUserInfoData['state'];
         // **** 州 state
         $orderUserInfoCountryName = $orderUserInfoData['countryName'];
         // **** 国家全名
         // 客服部小霞提出 导出列 国家 显示英文 方便退款处理
         // $cnname = $country[$countryname];
         $orderUserInfoZip = $orderUserInfoData['zipCode'];
         // **** 邮编 zipCode
         $orderUserInfoTel = $orderUserInfoData['landline'];
         // **** 座机 landline
         $orderWhInfoActualShipping = $orderWhInfoData['actualShipping'];
         // ****实际运费,warehouse表中,ebay_shipfee
         $orderExtenFeedback = $orderExtenData['feedback'];
         // ****客户留言 ebay_note
         $OrderActualTotal = @round($orderData['actualTotal'], 2);
         // ****实际收款总价 $ebay_total
         $orderTracknumberOne = @$orderTracknumber[0]['tracknumber'];
         // ****追踪号,这里只读取记录数的第一条记录的追踪号 $ebay_tracknumber
         $accountName = @get_accountnamebyid($orderData['accountId']);
         // ****账号名称 $ebay_account
         $orderRecordnumber = @$orderData['recordNumber'];
         // ****订单编码(对应平台上的编码) $recordnumber0
         // $ebay_carrier = @$shipOrder['transportId'];//transportId ebay_carrier
         $orderUserInfoPhone = $orderUserInfoData['phone'];
         // ****客户手机号码 $ebay_phone
         $orderExtenCurrency = $orderExtenData['currency'];
         // ****币种 $ebay_currency
         $orderWhInfoPackersId = $orderWhInfoData['packersId'];
         // 包装人员Id
         $packinguser = $staffLists[$orderWhInfoPackersId];
         // 对应包装人员姓名
         // var_dump($packinguser);
         $OrderChannelId = $orderData['channelId'];
         // 渠道Id $channelId
         $orderCalcShipping = $orderData['calcShipping'];
         // 估算运费 $ordershipfee
         $orderExtenPayPalPaymentId = $orderExtenData['PayPalPaymentId'];
         // Paypal付款ID $ebay_ptid
         $orderExtenPayPalEmailAddress = $orderExtenData['PayPalEmailAddress'];
         // PayPal付款邮箱地址 $ebay_pp
         $isCopy = $orderData['isCopy'];
         // 默认为0为原始订单,1为被复制订单,2为复制订单
         $isCopy = $isCopy == '0' ? '' : ($isCopy == '1' ? '被复制订单' : '复制订单');
         // $ebay_noteb = $is_main_order==2 ? '复制 订单' : ($is_main_order==1 ? '被复制 订单' : '');
         $isBuji = $orderData['isBuji'];
         // 是否补寄订单。默认0正常订单;1为被补寄的订单;2为补寄产生的新订单
         $isBuji = $isBuji == '0' ? '' : ($isBuji == '1' ? '被补寄订单' : '补寄产生新订单');
         // $isBuji = isset ($sendreplacement[$isBuji]) ? $sendreplacement[$isBuji] : '';
         // $is_sendreplacement = $isBuji;
         $isSplit = $orderData['isSplit'];
         // 默认0正常订单;1为被拆分的订单;2为拆分产生的订单
         $isSplit = $isSplit == '0' ? '' : ($isSplit == '1' ? '被拆分订单' : '拆分产生新订单');
         // $ebay_splitorder
         $isCombinePackage = $orderData['combinePackage'];
         // 是否合并包裹。合并包裹状态,0为正常订单;1为合并包裹主订单;2为合并包裹子订单
         $isCombinePackage = $isCombinePackage == '0' ? '' : ($isCombinePackage == '1' ? '合并包裹主订单' : '合并包裹子订单');
         $OrderTransportId = $orderData['transportId'];
         // 运输方式Id $transportId
         $carrierName = $carriers[$OrderTransportId];
         // 运输方式名称 $ebay_carrier
         $address = $orderUserInfoStreet1 . "\n" . $orderUserInfoStreet2 . "\n" . $orderUserInfoCity . "\n" . $orderUserInfoState . "\n" . $orderUserInfoZip . "\n" . $orderUserInfoCountryName;
         // 字段拼接成地址
         $orderWhInfoWeighTime = date('Y-m-d', $orderWhInfoData['weighTime']);
         // 称重时间,亦可以当做发货时间 $scantime
         $OrderCalcWeight = $orderData['calcWeight'];
         // 估算重量,单位是kg $calculate_weight
         $orderWhInfoActualWeight = number_format($orderWhInfoData['actualWeight'] / 1000, 3);
         // 实际重量 $orderweight2
         $totalweight = $orderWhInfoActualWeight;
         // 总重量
         $mailway_c = $channels[$OrderChannelId];
         // 根据运输管理系统的接口获取
         //$isContainCombineSku = CommonModel::judge_contain_combinesku ( $orderId ); // $ebay_combineorder 判断订单是否包含组合料号,返回true or false
         $isContainCombineSku = false;
         //默认订单不含虚拟料号
         foreach ($orderDetail as $value) {
             if (get_isCombineSku($value['orderDetail']['sku'])) {
                 $isContainCombineSku = true;
                 break;
             }
         }
         if (count($orderDetail) == 1) {
             // 订单明细中只有一条记录时,订单中只有一种料号
             $orderDetailTotalData = array_pop($orderDetail);
             // 取得orderDetail中的这条总记录数据,包括orderDetailData和orderDetailExtenData
             $orderDetailData = $orderDetailTotalData['orderDetail'];
             // 明细中的常用数据
             $orderDetailExtenData = $orderDetailTotalData['orderDetailExtension'];
             // 明细中的扩展数据
             $orderDetailSku = $orderDetailData['sku'];
             // 该明细下的$sku
             $orderDetailExtenItemId = $orderDetailExtenData['itemId'];
             // itemId $ebay_itemid
             $orderDetailAmount = intval($orderDetailData['amount']);
             // $amount 该明细下的sku对应的数量
             $orderDetailRecordnumber = $orderDetailData['recordNumber'];
             // 该明细对应平台的recordnumber $recordnumber
             $orderDetailStoreId = $orderDetailData['storeId'];
             //料号所在仓库id
             $orderDetailItemPrice = round($orderDetailData['itemPrice'], 2) * $orderDetailAmount;
             // itemPrice(平台对应的销售单价)*对应数量 $ebay_itemprice
             $ebay_shipfee = round_num($OrderActualTotal - $orderDetailItemPrice, 2);
             // 订单总价-sku对应的总价得出运费,$ebay_shipfee
             //$skus = GoodsModel::get_realskuinfo ( $orderDetailSku ); // 获取该sku下对应的真实料号信息(包括料号转换及组合料号对应真实料号信息)
             $skus = get_realskuinfo($orderDetailSku);
             // 获取该sku下对应的真实料号信息(包括料号转换及组合料号对应真实料号信息)
             $values_skus = array_values($skus);
             // 得到sku的数量
             //$combineSku = GoodsModel::getCombineSkuinfo ( $sku ); // 判断该sku是否是组合料号,如果是返回combineSku,sku,count关系记录数据,不是则返回false
             if ($isContainCombineSku) {
                 // 为组合订单
                 $goods_costs = 0;
                 $combine_weight_list = array();
                 $goods_costs_list = array();
                 foreach ($skus as $k => $v) {
                     $goodsInfo2 = get_trueSkuInfo($k);
                     //获取真实料号信息
                     $combine_weight_list[$k] = $amount * $v * $goodsInfo2['goodsWeight'];
                     // 组合订单重量数组
                     $goods_costs_list[$k] = $amount * $v * $goodsInfo2['goodsCost'];
                     // 货本数组
                     $goods_costs += $amount * $v * $goodsInfo2['goodsCost'];
                 }
                 $row = array($orderWhInfoWeighTime, $accountName, $orderRecordnumber, $platformUsername, '', '', $amount * array_sum($values_skus), $orderUserInfoCountryName, $orderDetailItemPrice, $ebay_shipfee, $OrderActualTotal, $orderExtenCurrency, $packinguser, $orderTracknumberOne, validate_trackingnumber($orderTracknumberOne) ? '是' : '否', $orderWhInfoActualWeight, $orderCalcShipping, $carrierName, $orderId, $goods_costs, $orderExtenPayPalPaymentId, '', $isCopy, $isBuji, $isSplit, '', '', $isContainCombineSku ? '组合料号' : '', $mailway_c, $isCombinePackage, $orderExtenPayPalEmailAddress, '');
                 $excel->addRow($row);
                 foreach ($skus as $k => $v) {
                     $goodsInfo3 = get_trueSkuInfo($k);
                     $goods_cost = isset($goodsInfo3['goodsCost']) ? round($goodsInfo3['goodsCost'], 2) : 0;
                     $goods_location2Info = M('interfaceWh')->getSkuPosition($sku, $orderDetailStoreId);
                     $goods_location2 = $goods_location2Info['pName'];
                     // 仓位
                     $pmId = isset($goodsInfo3['pmId']) ? $goodsInfo3['pmId'] : '';
                     $ebay_packingmaterial = $packings[$pmId]['pmName'];
                     $ebay_packingCost = $packings[$pmId]['pmCost'];
                     $purchaseId = isset($goodsInfo3[0]['purchaseId']) ? $goodsInfo3[0]['purchaseId'] : '';
                     $cguser = @$staffLists[$purchaseId];
                     $ishipfee = round_num($goods_costs_list[$k] / array_sum($goods_costs_list) * $ebay_shipfee, 2);
                     // 根据货本比ebay运费
                     $iorderweight2 = round($combine_weight_list[$k] / array_sum($combine_weight_list) * $orderWhInfoActualWeight, 3);
                     $iordershipfee = round_num($combine_weight_list[$k] / array_sum($combine_weight_list) * $orderCalcShipping, 2);
                     $iprice = round_num(($goods_costs_list[$k] + $iordershipfee) / (array_sum($goods_costs_list) + $orderCalcShipping) * $ebay_itemprice, 2);
                     // 根据货本比产品价格 last modified by herman.xi @20130916
                     $row = array('', '', $orderDetailRecordnumber, '', $goods_location2, $k, $amount * $v, '', $iprice, $ishipfee, '', '', '', '', '', $iorderweight2, $iordershipfee, '', '', $goods_cost * $amount * $v, '', $orderDetailExtenItemId, '', '', '', $ebay_packingmaterial, $ebay_packingCost, '组合料号', '', '', '', $cguser);
                     $excel->addRow($row);
                 }
             } else {
                 // 非组合订单
                 $row = array($orderWhInfoWeighTime, $accountName, $orderRecordnumber, $platformUsername, $goods_location, $orderDetailSku, $orderDetailAmount * array_sum($values_skus), $orderUserInfoCountryName, $orderDetailItemPrice, $ebay_shipfee, $OrderActualTotal, $orderExtenCurrency, $packinguser, $orderTracknumberOne, validate_trackingnumber($orderTracknumberOne) ? '是' : '否', $orderWhInfoActualWeight, $orderCalcShipping, $carrierName, $orderId, $goods_costs, $orderExtenPayPalPaymentId, $orderDetailExtenItemId, $isCopy, $isBuji, $isSplit, $ebay_packingmaterial, $ebay_packingCost, '', $mailway_c, $isCombinePackage, $orderExtenPayPalEmailAddress, $cguser);
                 $excel->addRow($row);
             }
             unset($combine_weight_list);
             unset($goods_costs_list);
         } else {
             // 订单详细记录>1
             $cctotal = 0;
             $ebay_itemprice = 0;
             $goods_costs = 0;
             $goods_list = array();
             $goods_lists = array();
             $goods_weight_list = array();
             $goods_costs_list = array();
             $calculate_weight = 0;
             foreach ($orderDetail as $orderDetailTotalData) {
                 // $orderDetailTotalData ,包括orderDetailData和orderDetailExtenData
                 $orderDetailData = $orderDetailTotalData['orderDetail'];
                 // 明细中的常用数据
                 $orderDetailExtenData = $orderDetailTotalData['orderDetailExtension'];
                 // 明细中的扩展数据
                 $detail_id = $orderDetailData['id'];
                 $sku = $orderDetailData['sku'];
                 $skus = get_realskuinfo($sku);
                 $_ebay_itemprice = round($orderDetailData['itemPrice'], 2);
                 $ebay_itemprice += $orderDetailData['amount'] * $_ebay_itemprice;
                 foreach ($skus as $k => $v) {
                     $goodsInfo3 = get_trueSkuInfo($k);
                     $_ebay_amount = intval($orderDetailData['amount'] * $v);
                     $cctotal += $_ebay_amount;
                     $calculate_weight += $_ebay_amount * $goodsInfo3['goodsWeight'];
                     $goods_weight_list[$detail_id . $sku][$k] = $_ebay_amount * $goodsInfo3['goodsWeight'];
                     $goods_costs_list[$detail_id . $sku][$k] = round($goodsInfo3['goodsCost'], 2) * $_ebay_amount;
                     $goods_costs += round($goodsInfo3['goodsCost'], 2) * $_ebay_amount;
                 }
             }
             // echo "---------$ebay_itemprice--------";
             $ebay_shipfee = round_num($OrderActualTotal - $ebay_itemprice, 2);
             $row = array($orderWhInfoWeighTime, $accountName, $orderRecordnumber, $platformUsername, '', '', $cctotal, $orderUserInfoCountryName, $ebay_itemprice, $ebay_shipfee, $OrderActualTotal, $orderExtenCurrency, $packinguser, $orderTracknumberOne, validate_trackingnumber($orderTracknumberOne) ? '是' : '否', $orderWhInfoActualWeight, $orderCalcShipping, $carrierName, $orderId, $goods_costs, $orderExtenPayPalPaymentId, '', $isCopy, $isBuji, $isSplit, '', '', $isContainCombineSku ? '组合料号' : '', $mailway_c, $isCombinePackage, $orderExtenPayPalEmailAddress, '');
             $excel->addRow($row);
             foreach ($orderDetail as $orderDetailTotalData) {
                 // $orderDetailTotalData ,包括orderDetailData和orderDetailExtenData
                 $orderDetailData = $orderDetailTotalData['orderDetail'];
                 // 明细中的常用数据
                 $orderDetailExtenData = $orderDetailTotalData['orderDetailExtension'];
                 // 明细中的扩展数据
                 $detail_id = $orderDetailData['id'];
                 $skuDe = $orderDetailData['sku'];
                 $orderDetailStoreId = $orderDetailData['storeId'];
                 $recordnumber = $orderDetailData['recordNumber'];
                 $orderDetailExtenItemId = $orderDetailExtenData['itemId'];
                 // itemId $ebay_itemid
                 // $ebay_itemid = $detail_array['ebay_itemid'];
                 $amount = intval($orderDetailData['amount']);
                 $dshipingfee = $orderDetailData['shippingFee'];
                 $debay_itemprice = round($orderDetailData['itemPrice'], 2);
                 $goodsInfo3 = get_trueSkuInfo($skuDe);
                 $goods_cost = isset($goodsInfo3['goodsCost']) ? round($goodsInfo3['goodsCost'], 2) : 0;
                 $pmId = isset($goodsInfo3['pmId']) ? $goodsInfo3['pmId'] : 0;
                 $ebay_packingmaterial = $packings[$pmId]['pmName'];
                 $ebay_packingCost = $packings[$pmId]['pmCost'];
                 $purchaseId = isset($goodsInfo3['purchaseId']) ? $goodsInfo3['purchaseId'] : '';
                 $cguser = @$staffLists[$purchaseId];
                 $dordershipfee = round($orderCalcShipping * (array_sum($goods_weight_list[$detail_id . $skuDe]) / $calculate_weight), 2);
                 $dorderweight2 = round($orderWhInfoActualWeight * (array_sum($goods_weight_list[$detail_id . $skuDe]) / $calculate_weight), 3);
                 $isContainCombineSku = false;
                 //默认订单不含虚拟料号
                 foreach ($orderDetail as $value) {
                     if (get_isCombineSku($value['orderDetail']['sku'])) {
                         $isContainCombineSku = true;
                         break;
                     }
                 }
                 if ($isContainCombineSku) {
                     // 为组合料号
                     $skus = get_realskuinfo($skuDe);
                     foreach ($skus as $k => $v) {
                         ${$goods_locationInfo} = M('interfaceWh')->getSkuPosition($k, $orderDetailStoreId);
                         $goods_location = ${$goods_locationInfo}['pName'];
                         // 仓位
                         //$goods_location = CommonModel::getPositionBySku ( $k );
                         $goodsInfo3 = get_trueSkuInfo($k);
                         $goods_cost = isset($goodsInfo3['goodsCost']) ? round($goodsInfo3['goodsCost'], 2) : 0;
                         $pmId = isset($goodsInfo3['pmId']) ? $goodsInfo3['pmId'] : '';
                         $ebay_packingmaterial = $packings[$pmId]['pmName'];
                         $ebay_packingCost = $packings[$pmId]['pmCost'];
                         $purchaseId = isset($goodsInfo3['purchaseId']) ? $goodsInfo3['purchaseId'] : '';
                         $cguser = @$staffLists[$purchaseId];
                         // $iprice = round_num(($goods_costs_list[$detail_id.$k][$k]/array_sum($goods_costs_list[$detail_id.$k])) * $debay_itemprice * $amount,2); //根据货本比产品价格
                         $ishipfee = round_num($goods_costs_list[$detail_id . $skuDe][$k] / array_sum($goods_costs_list[$detail_id . $skuDe]) * $dshipingfee, 2);
                         // 根据货本比ebay运费
                         $iorderweight2 = round($goods_weight_list[$detail_id . $skuDe][$k] / array_sum($goods_weight_list[$detail_id . $skuDe]) * $dorderweight2, 3);
                         $iordershipfee = round_num($goods_weight_list[$detail_id . $skuDe][$k] / array_sum($goods_weight_list[$detail_id . $skuDe]) * $dordershipfee, 2);
                         $iprice = round_num(($goods_costs_list[$detail_id . $skuDe][$k] + $iordershipfee) / (array_sum($goods_costs_list[$detail_id . $skuDe]) + $dordershipfee) * $debay_itemprice * $amount, 2);
                         // 根据货本比产品价格 last modified by herman.xi @20130916
                         $row = array('', '', $recordnumber, '', $goods_location, $k, $amount * $v, '', $iprice, $ishipfee, '', '', '', '', '', $iorderweight2, $iordershipfee, '', '', $goods_cost * $amount * $v, '', $orderDetailExtenItemId, '', '', '', $ebay_packingmaterial, $ebay_packingCost, '组合料号', '', '', '', $cguser);
                         $excel->addRow($row);
                     }
                 } else {
                     $row = array('', '', $recordnumber, '', $goods_location, $skuDe, $amount, '', $debay_itemprice * $amount, $dshipingfee, '', '', '', '', '', $dorderweight2, $dordershipfee, '', '', $goods_cost * $amount, '', $orderDetailExtenItemId, '', '', '', $ebay_packingmaterial, $ebay_packingCost, '', '', '', '', $cguser);
                     $excel->addRow($row);
                 }
             }
             unset($goods_weight_list);
             unset($goods_costs_list);
         }
     }
     $excel->finalize();
     exit;
 }
    function content_53958196945922_00353992($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_date_format')) {
            include '/data/web/re.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="" 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['accounts'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['accounts']->_loop = false;
        $_smarty_tpl->tpl_vars['pid'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['plataccount']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['accounts']->key => $_smarty_tpl->tpl_vars['accounts']->value) {
            $_smarty_tpl->tpl_vars['accounts']->_loop = true;
            $_smarty_tpl->tpl_vars['pid']->value = $_smarty_tpl->tpl_vars['accounts']->key;
            ?>
                <option value="<?php 
            echo $_smarty_tpl->tpl_vars['pid']->value;
            ?>
" <?php 
            if ($_smarty_tpl->tpl_vars['g_platformId']->value == $_smarty_tpl->tpl_vars['pid']->value) {
                ?>
selected="selected"<?php 
            }
            ?>
><?php 
            echo get_platnamebyid($_smarty_tpl->tpl_vars['pid']->value);
            ?>
</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['g_platformId']->value) {
            ?>
                <?php 
            $_smarty_tpl->tpl_vars['accountid'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['accountid']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['plataccount']->value[$_smarty_tpl->tpl_vars['g_platformId']->value];
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['accountid']->key => $_smarty_tpl->tpl_vars['accountid']->value) {
                $_smarty_tpl->tpl_vars['accountid']->_loop = true;
                ?>
                <option value="<?php 
                echo $_smarty_tpl->tpl_vars['accountid']->value;
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['g_accountId']->value == $_smarty_tpl->tpl_vars['accountid']->value) {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo get_accountnamebyid($_smarty_tpl->tpl_vars['accountid']->value);
                ?>
</option>
                <?php 
            }
            ?>
                <?php 
        }
        ?>
                </select>
                </span>
            </td>
            <td style="padding-left:15px;">
                留言:
            </td>
            <input type="hidden" name="mod" value="Order" />
            <input type="hidden" name="act" value="index" />
            <input type="hidden" name="search" value="1" />
            <input type="hidden" name="page" value="<?php 
        echo $_smarty_tpl->tpl_vars['g_page']->value;
        ?>
" />
            <!--<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>
        </tr>
        <tr>
            <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['g_transportation']->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['types'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['types']->_loop = false;
        $_smarty_tpl->tpl_vars['statusid'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['statusmenus']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['types']->key => $_smarty_tpl->tpl_vars['types']->value) {
            $_smarty_tpl->tpl_vars['types']->_loop = true;
            $_smarty_tpl->tpl_vars['statusid']->value = $_smarty_tpl->tpl_vars['types']->key;
            ?>
                    <option value="<?php 
            echo $_smarty_tpl->tpl_vars['statusid']->value;
            ?>
" <?php 
            if ($_smarty_tpl->tpl_vars['statusid']->value == $_smarty_tpl->tpl_vars['g_ostatus']->value) {
                ?>
selected="selected"<?php 
            }
            ?>
><?php 
            echo get_statusmenunamebyid($_smarty_tpl->tpl_vars['statusid']->value);
            ?>
</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['g_ostatus']->value) {
            ?>
                    <?php 
            $_smarty_tpl->tpl_vars['typeid'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['typeid']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['statusmenus']->value[$_smarty_tpl->tpl_vars['g_ostatus']->value];
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['typeid']->key => $_smarty_tpl->tpl_vars['typeid']->value) {
                $_smarty_tpl->tpl_vars['typeid']->_loop = true;
                ?>
                    <option value="<?php 
                echo $_smarty_tpl->tpl_vars['typeid']->value;
                ?>
" <?php 
                if ($_smarty_tpl->tpl_vars['typeid']->value == $_smarty_tpl->tpl_vars['g_otype']->value) {
                    ?>
selected="selected"<?php 
                }
                ?>
><?php 
                echo get_statusmenunamebyid($_smarty_tpl->tpl_vars['typeid']->value);
                ?>
</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['g_Keywords']->value;
        ?>
" />
            </td>
            <td style="padding-left:15px;">
                <select name="KeywordsType">
                    <option value="*" style="width:157px;">请选择关键字类型</option>
                    <option value="platformUsername" <?php 
        if ($_smarty_tpl->tpl_vars['g_KeywordsType']->value == 'platformUsername') {
            ?>
selected="selected"<?php 
        }
        ?>
>买家ID</option>
                    <option value="email" <?php 
        if ($_smarty_tpl->tpl_vars['g_KeywordsType']->value == 'email') {
            ?>
selected="selected"<?php 
        }
        ?>
>买家邮箱</option>
                    <option value="recordNumber" <?php 
        if ($_smarty_tpl->tpl_vars['g_KeywordsType']->value == 'recordNumber') {
            ?>
selected="selected"<?php 
        }
        ?>
>RecordNo.</option>
                    <option value="PayPalPaymentId" <?php 
        if ($_smarty_tpl->tpl_vars['g_KeywordsType']->value == 'PayPalPaymentId') {
            ?>
selected="selected"<?php 
        }
        ?>
>paypal交易ID</option>
                    <option value="tracknumber" <?php 
        if ($_smarty_tpl->tpl_vars['g_KeywordsType']->value == 'tracknumber') {
            ?>
selected="selected"<?php 
        }
        ?>
>跟踪号</option>
                    <option value="id" <?php 
        if ($_smarty_tpl->tpl_vars['g_KeywordsType']->value == 'id') {
            ?>
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" id="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>
                    <option value="3" <?php 
        if ($_smarty_tpl->tpl_vars['searchTimeType']->value == 3) {
            ?>
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;
        ?>
" />-<input id="SYNC" type="button" value="同步计数" class="order-search"/>
            </td>
        </tr>
    </table>

    <div style="padding-left:17px;">
        <input type="submit" value="搜索" class="order-search" />
        <a href="#" id="AdvancedSearch1" onclick="AdvancedSearch()" class="unfold">高级搜索</a>
        <span style="color: green;" id="countForSYNC"></span>
    </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>
    <?php 
        if ($_GET['ostatus'] == '2' || $_GET['otype'] == '601') {
            ?>
        <a href="javascript:void(0);" style="display:none" onClick="applyRefund()">PAYPAL退款</a>
    <?php 
        }
        ?>
        <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>
    <a href="javascript:void(0);" onClick="handCaseRefund()">申请CASE单据</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'] == '911' && $_GET['otype'] == '115') {
            ?>
        <a href="#" onclick="reCulShippingWay()">海外仓运费计算</a>   <!-- 海外仓批量处理运输方式 <海外仓订单待处理> -->
    <?php 
        }
        ?>
    
    <?php 
        if ($_GET['ostatus'] == '911' && $_GET['otype'] == '916') {
            ?>
        <a href="#" onclick="owPrintLabel()">海外仓标签打印</a>   <!-- 海外仓订单打印 <海外仓订单待打> -->
    <?php 
        }
        ?>
    
	<?php 
        if ($_GET['ostatus'] == '100' && $_GET['otype'] == '700') {
            ?>
	<a href="#" onclick="taoBaoRemoveOrder()">标记刷单</a><!-- 淘宝标记订单为刷单 ADD BY chenwei 2013.9.17 -->
	<?php 
        }
        ?>
    
        <!--a href="javascript:void(0);" onClick="partPackage();">申请配货</a-->
    
	
	<!--a href="javascript:void(0)" onclick="print_order(1)">申请打印</a-->
	
	
	<!--a href="javascript:void(0)" onclick="print_order(0)">申请打印</a-->
	
	<a href="javascript:void(0);" onClick="old_shenqingdayin();">申请打印</a>
	<?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['order'], null, 0);
            ?>
    <?php 
            $_smarty_tpl->tpl_vars['orderExtenData'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderlist']->value['extens'], null, 0);
            ?>
    <?php 
            $_smarty_tpl->tpl_vars['orderUserInfoData'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderlist']->value['userinfo'], null, 0);
            ?>
    <?php 
            $_smarty_tpl->tpl_vars['orderNote'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderlist']->value['note'], 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['orderWarehouse'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderlist']->value['warehouse'], 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 get_accountnamebyid($_smarty_tpl->tpl_vars['orderData']->value['accountId']);
            ?>
</span>
                <span style="width:20%">平台:<?php 
            echo get_platnamebyid($_smarty_tpl->tpl_vars['orderData']->value['platformId']);
            ?>
</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 
            echo get_maternamebyid($_smarty_tpl->tpl_vars['orderData']->value['pmId']);
            ?>
</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%">扫描时间:<?php 
            if ($_smarty_tpl->tpl_vars['orderWarehouse']->value['weighTime']) {
                echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['orderWarehouse']->value['weighTime'], "%Y-%m-%d %H:%I:%S");
            } else {
                ?>
--<?php 
            }
            ?>
</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'];
            } else {
                ?>
--<?php 
            }
            ?>
" 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>
                <span style="width:20%;">卖家邮箱:<input value="<?php 
            if ($_smarty_tpl->tpl_vars['orderExtenData']->value['PayPalEmailAddress'] != '') {
                echo $_smarty_tpl->tpl_vars['orderExtenData']->value['PayPalEmailAddress'];
            } else {
                ?>
--<?php 
            }
            ?>
" style="width:168px;border:none; background-color: #f2f2f2; outline:none;" readonly/></span>
                <br />
                <span style="width:20%">运输:<?php 
            if ($_smarty_tpl->tpl_vars['orderData']->value['transportId']) {
                echo get_carriernamebyid($_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) {
                    ?>
                    	<?php 
                    echo $_smarty_tpl->tpl_vars['orderTracknumber']->value[0]['tracknumber'];
                    ?>

                        <!--<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;
                        ?>
                        <?php 
                        echo $_smarty_tpl->tpl_vars['orderTrack']->value['tracknumber'];
                        ?>
 | 
                        <!--<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'];
            ?>
&nbsp;<?php 
            echo $_smarty_tpl->tpl_vars['orderUserInfoData']->value['currency'];
            ?>
</span>
                <?php 
            if ($_smarty_tpl->tpl_vars['orderExtenData']->value['feedback'] != '') {
                ?>
                <span style="width:55%;color:red;"><span style="color:#000;margin-right:0px;">留言:</span><?php 
                echo $_smarty_tpl->tpl_vars['orderExtenData']->value['feedback'];
                ?>

                </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['orderDetailData'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['orderDetailData']->_loop = false;
            $_smarty_tpl->tpl_vars['omOrderdetailId'] = new Smarty_Variable();
            $_from = $_smarty_tpl->tpl_vars['orderlist']->value['detail'];
            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['orderDetailData']->key => $_smarty_tpl->tpl_vars['orderDetailData']->value) {
                $_smarty_tpl->tpl_vars['orderDetailData']->_loop = true;
                $_smarty_tpl->tpl_vars['omOrderdetailId']->value = $_smarty_tpl->tpl_vars['orderDetailData']->key;
                $_smarty_tpl->tpl_vars['smarty']->value['foreach']['foo']['index']++;
                ?>
                        	<?php 
                $_smarty_tpl->tpl_vars['orderDetail'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderDetailData']->value['base'], null, 0);
                ?>
                            <?php 
                $_smarty_tpl->tpl_vars['orderDetailExten'] = new Smarty_variable($_smarty_tpl->tpl_vars['orderDetailData']->value['extens'], null, 0);
                ?>
                            <?php 
                $_smarty_tpl->tpl_vars['skuinfos'] = new Smarty_variable(get_orderskulist($_smarty_tpl->tpl_vars['orderDetail']->value['sku']), null, 0);
                ?>
        				<?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;"><?php 
                    echo $_smarty_tpl->tpl_vars['skuinfos']->value['isCombine'];
                    ?>
</div>
                            </td>
                        </tr>
                        <?php 
                }
                ?>
                        <?php 
                if ($_smarty_tpl->tpl_vars['skuinfos']->value['isCombine'] > '1') {
                    ?>
                        <?php 
                    $_smarty_tpl->tpl_vars['combinesku'] = new Smarty_variable($_smarty_tpl->tpl_vars['skuinfos']->value['combinesku'], null, 0);
                    ?>
                        <tr>
                            <td class="unpicurl">
                                <a href="javascript:void(0)" id="imgb-<?php 
                    echo $_smarty_tpl->tpl_vars['combinesku']->value['skupic'];
                    ?>
" data-sku="imgb-<?php 
                    echo $_smarty_tpl->tpl_vars['combinesku']->value['skupic'];
                    ?>
" class="fancybox" style="margin-left:0;">
                                	<img src="" class="skuimg" id="imgs-<?php 
                    echo $_smarty_tpl->tpl_vars['combinesku']->value['skupic'];
                    ?>
" width="60" height="60" data-sku="<?php 
                    echo $_smarty_tpl->tpl_vars['combinesku']->value['skupic'];
                    ?>
" data-spu="<?php 
                    echo $_smarty_tpl->tpl_vars['combinesku']->value['spu'];
                    ?>
">
                                </a>
                                <br />
                                <span><?php 
                    echo $_smarty_tpl->tpl_vars['orderDetail']->value['recordNumber'];
                    ?>
</span>
                            </td>
                            <td><?php 
                    echo $_smarty_tpl->tpl_vars['combinesku']->value['sku'];
                    ?>
</td>
                            <td><?php 
                    echo $_smarty_tpl->tpl_vars['orderDetail']->value['amount'];
                    ?>
</td>
                            <td><?php 
                    echo $_smarty_tpl->tpl_vars['orderDetail']->value['itemPrice'];
                    ?>
</td>
                            <td><?php 
                    echo $_smarty_tpl->tpl_vars['orderDetail']->value['shippingFee'];
                    ?>
</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td class="unpicurl" width="10%">
                                <a href="<?php 
                    echo get_itemurl($_smarty_tpl->tpl_vars['orderDetailExten']->value['itemId']);
                    ?>
" target="_blank" title="<?php 
                    echo $_smarty_tpl->tpl_vars['orderDetailExten']->value['itemId'];
                    ?>
"><?php 
                    echo $_smarty_tpl->tpl_vars['orderDetailExten']->value['itemTitle'];
                    ?>
</a>
                            </td>
                            <td>&nbsp;</td>
                            <td>
                                <!--<font color="green" >是</font>-->
                                <font color="red" >否</font>
                            </td>
                        </tr>
                        <?php 
                    $_smarty_tpl->tpl_vars['realsku'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['realsku']->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['skuinfos']->value['realsku'];
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars['realsku']->key => $_smarty_tpl->tpl_vars['realsku']->value) {
                        $_smarty_tpl->tpl_vars['realsku']->_loop = true;
                        ?>
                        <?php 
                        $_smarty_tpl->tpl_vars['skudaily'] = new Smarty_variable(get_skudailystatus($_smarty_tpl->tpl_vars['realsku']->value['sku']), null, 0);
                        ?>
                        <tr>
                            <td class="unpicurl">组合料号</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['realsku']->value['sku'];
                        ?>
</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['realsku']->value['amount'] * $_smarty_tpl->tpl_vars['orderDetail']->value['amount'];
                        ?>
</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['realsku']->value['enableCount'];
                        ?>
</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['skudaily']->value['waitingSendCount'];
                        ?>
</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['skudaily']->value['interceptSendCount'];
                        ?>
</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['skudaily']->value['waitingAuditCount'];
                        ?>
</td>
                            <td><?php 
                        echo get_reservecount($_smarty_tpl->tpl_vars['realsku']->value['sku']);
                        ?>
</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['skudaily']->value['averageDailyCount'];
                        ?>
</td>
                            <td><?php 
                        if ($_smarty_tpl->tpl_vars['skudaily']->value['is_warning'] === '1') {
                            ?>
<font color="red">是</font><?php 
                        }
                        if ($_smarty_tpl->tpl_vars['skudaily']->value['is_warning'] === '0') {
                            ?>
<font color="green">否</font><?php 
                        }
                        ?>
</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['realsku']->value['purchaseName'];
                        ?>
</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['realsku']->value['goodsCost'];
                        ?>
</td>
                            <td class="unpicurl" width="10%">&nbsp;</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');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars['orderAuditVal']->key => $_smarty_tpl->tpl_vars['orderAuditVal']->value) {
                            $_smarty_tpl->tpl_vars['orderAuditVal']->_loop = true;
                            ?>
                            <?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>&nbsp;</td>
                        </tr>
                        <?php 
                    }
                    ?>
                        <?php 
                } else {
                    ?>
                        <?php 
                    $_smarty_tpl->tpl_vars['realsku'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['realsku']->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['skuinfos']->value['realsku'];
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars['realsku']->key => $_smarty_tpl->tpl_vars['realsku']->value) {
                        $_smarty_tpl->tpl_vars['realsku']->_loop = true;
                        ?>
                        <?php 
                        $_smarty_tpl->tpl_vars['skudaily'] = new Smarty_variable(get_skudailystatus($_smarty_tpl->tpl_vars['realsku']->value['sku']), null, 0);
                        ?>
                        <tr>
                            <td class="unpicurl">
                                <a href="javascript:void(0)" id="imgb-<?php 
                        echo $_smarty_tpl->tpl_vars['realsku']->value['skupic'];
                        ?>
" data-sku="imgb-<?php 
                        echo $_smarty_tpl->tpl_vars['realsku']->value['skupic'];
                        ?>
" class="fancybox" style="margin-left:0;">
                                	<img src="" class="skuimg" id="imgs-<?php 
                        echo $_smarty_tpl->tpl_vars['realsku']->value['skupic'];
                        ?>
" width="60" height="60" data-sku="<?php 
                        echo $_smarty_tpl->tpl_vars['realsku']->value['skupic'];
                        ?>
" data-spu="<?php 
                        echo $_smarty_tpl->tpl_vars['realsku']->value['spu'];
                        ?>
">
                                </a>
                                <br />
                                <span><?php 
                        echo $_smarty_tpl->tpl_vars['orderDetail']->value['recordNumber'];
                        ?>
</span>
                            </td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['realsku']->value['sku'];
                        ?>
</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['orderDetail']->value['amount'];
                        ?>
</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['orderDetail']->value['itemPrice'];
                        ?>
</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['orderDetail']->value['shippingFee'];
                        ?>
</td>
                            <td>skuinfo.enableCount}</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['skudaily']->value['waitingSendCount'];
                        ?>
</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['skudaily']->value['interceptSendCount'];
                        ?>
</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['skudaily']->value['waitingAuditCount'];
                        ?>
</td>
                            <td><?php 
                        echo get_reservecount($_smarty_tpl->tpl_vars['realsku']->value['sku']);
                        ?>
</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['skudaily']->value['averageDailyCount'];
                        ?>
</td>
                            <td><?php 
                        if ($_smarty_tpl->tpl_vars['skudaily']->value['is_warning'] === '1') {
                            ?>
<font color="red">是</font><?php 
                        } else {
                            ?>
<font color="green">否</font><?php 
                        }
                        ?>
</td>
                            <td><?php 
                        echo get_usernamebyid($_smarty_tpl->tpl_vars['realsku']->value['purchaseId']);
                        ?>
</td>
                            <td><?php 
                        echo $_smarty_tpl->tpl_vars['realsku']->value['goodsCost'];
                        ?>
</td>
                            <td class="unpicurl" width="10%">
                                <a href="<?php 
                        echo get_itemurl($_smarty_tpl->tpl_vars['orderDetailExten']->value['itemId']);
                        ?>
" target="_blank" title="<?php 
                        echo $_smarty_tpl->tpl_vars['orderDetailExten']->value['itemId'];
                        ?>
"><?php 
                        echo $_smarty_tpl->tpl_vars['orderDetailExten']->value['itemTitle'];
                        ?>
</a>
                            </td>
                            <td>&nbsp;</td>
                            <td>
                                <!--<font color="green" >是</font>-->
                                <font color="red" >否</font>
                            </td>
                        </tr>
                        <?php 
                    }
                    ?>
                        <?php 
                }
                ?>
                    	<?php 
            }
            if (!$_smarty_tpl->tpl_vars['orderDetailData']->_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) {
                if ($_smarty_tpl->tpl_vars['orderData']->value['isBuji'] == 2) {
                    ?>
补寄订单<?php 
                } else {
                    ?>
复制订单<?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'] != '') {
                        echo $_smarty_tpl->tpl_vars['ve']->value['content'];
                        ?>
&nbsp;<?php 
                    }
                    ?>
                <?php 
                }
                ?>
                </span>
                <?php 
            }
            ?>
                <?php 
            if ($_smarty_tpl->tpl_vars['orderData']->value['isLock'] == 1) {
                ?>
                	<span> 锁定人:<?php 
                echo get_usernamebyid($_smarty_tpl->tpl_vars['orderData']->value['lockUser']);
                ?>
 &nbsp;&nbsp; 锁定时间:<?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);
    }
Beispiel #3
0
 /**
  * 更新平台ID,获取权限允许的平台帐号
  */
 public function act_changePlatformId()
 {
     F('order');
     $platformId = $_POST['platformId'];
     $accountList = array();
     $accountReturnList = array();
     if (empty($platformId)) {
         self::$errMsg['104'] = '未获取到平台ID';
     } else {
         $platAccount = get_userplatacountpower(get_userid());
         $accountList = $platAccount[$platformId];
         if (is_array($accountList)) {
             foreach ($accountList as $v) {
                 $accountReturnList[$v] = get_accountnamebyid($v);
             }
         }
         self::$errMsg['200'] = 'ok';
     }
     return $accountReturnList;
 }