Beispiel #1
0
 public function view_orderPartion()
 {
     $navlist = array(array('url' => '', 'title' => '出库'), array('url' => '', 'title' => '分区扫描'));
     $secnev = 3;
     $toplevel = 2;
     $secondlevel = 27;
     global $memc_obj;
     $userId = $_SESSION['userId'];
     $this->smarty->assign('navlist', $navlist);
     $this->smarty->assign('secnev', $secnev);
     $this->smarty->assign('toplevel', $toplevel);
     $this->smarty->assign('secondlevel', $secondlevel);
     /*
             $partion    =   array(
                                 '中国邮政平邮(深圳)第一区',
                                 '中国邮政平邮(深圳)第二区',
                                 '中国邮政平邮(深圳)第三区',
                                 '中国邮政平邮(深圳)第四区',
                                 '中国邮政平邮(深圳)第五区',
                                 '中国邮政平邮(深圳)第六区',
                                 '中国邮政平邮(福建)第七区',
                                 '中国邮政平邮(深圳)第八区',
                                 '中国邮政平邮(泉州)第九区',
                                 '中国邮政平邮(深圳)第十区',
                                 '中国邮政挂号(深圳)',
                                 '中国邮政挂号(深圳)第四区',
                                 '中国邮政挂号(福建)第七区',
                                 '中国邮政挂号(深圳)第八区',
                                 '中国邮政挂号(泉州)第九区',
                                 'EUB',
                                 'UPS美国专线',
                                 'Global Mail',
                                 '非德国Global Mail',
                                 '德国邮政挂号',
                                 '香港小包平邮',
                                 '香港小包挂号',
                                 '俄速通挂号',
                                 '俄速通平邮',
                                 '新加坡DHL GM平邮',
                                 '新加坡DHL GM挂号',
                                 '瑞士小包平邮A区',
                                 '瑞士小包平邮B区',
                                 '瑞士小包平邮C区',
                                 '瑞士小包平邮D区',
                                 '瑞士小包平邮S区',
                                 '瑞士小包挂号A区',
                                 '瑞士小包挂号B区',
                                 '瑞士小包挂号C区',
                                 '瑞士小包挂号D区',
                                 '瑞士小包挂号S区',
                                 '比利时小包EU'
                             );
     */
     $partion = WhTransportPartitionModel::select("is_delete=0 AND status=1");
     $this->smarty->assign("partion", $partion);
     $toptitle = '分区扫描操作';
     //头部title
     $this->smarty->assign('toptitle', $toptitle);
     $this->smarty->display('orderPartion.htm');
 }
 /**
  * 发货单打印首页
  * @author cmf
  */
 public function view_index()
 {
     $navlist = array(array('url' => '', 'title' => '仓库设置 '), array('url' => '', 'title' => ' 运输方式分区列表'));
     $toplevel = 4;
     $secondlevel = 20;
     $toptitle = '仓库设置 - 运输方式分区列表';
     $transportlist = $this->getTransportList();
     $list = WhTransportPartitionModel::select("is_delete=0");
     foreach ($list as $key => $val) {
         $list[$key]['transportId'] = $transportlist[$val['transportId']]['carrierNameCn'];
     }
     $this->smarty->assign('list', $list);
     $this->smarty->assign('transportlist', $transportlist);
     $this->smarty->assign('toptitle', $toptitle);
     $this->smarty->assign('navlist', $navlist);
     $this->smarty->assign('toplevel', $toplevel);
     $this->smarty->assign('secondlevel', $secondlevel);
     $this->smarty->display('whTransportPartition_index.htm');
 }
 /**
  *	通过渠道ID和国家名获取分区
  *  @param $channelId
  *  @param @country
  *  @return array()
  *  @author cmf
  *  @modify czq
  */
 public function getPartition($channelId = 0, $country = '')
 {
     if (!$channelId) {
         return array();
     }
     $list = WhTransportPartitionModel::select("channelId='" . $channelId . "' AND status=1 AND is_delete=0");
     $result = array();
     if ($list) {
         foreach ($list as $val) {
             $countrylist = json_decode($val['countryWhiteList'], true);
             if (!$countrylist || in_array($country, $countrylist)) {
                 unset($val['countryWhiteList']);
                 $val['code'] = 'A' . substr('0' . $val['partition'], -2);
                 $result = $val;
                 break;
             }
         }
     }
     return $result;
 }