Example #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');
 }
 public function view_delete()
 {
     if ($_GET['id']) {
         $id = intval($_GET['id']);
         $data = array('is_delete' => 1);
         WhTransportPartitionModel::update($data, $id);
     }
     header("location:index.php?mod=whTransportPartition&act=index");
 }
 /**
  *	通过渠道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;
 }
Example #4
0
.barcode{ text-align: center; float: left;}
.fontWeight{ font-weight: bold;}
.text{padding-bottom: 5px;}
.code{text-align:center;border-top:1px dashed #000;padding-top:5px;}
</style>
</head>

<body>			 
<?php 
$nums = isset($_POST['nums']) ? intval($_POST['nums']) : 0;
$partionId = isset($_POST['partions']) ? intval($_POST['partions']) : 0;
if (empty($partionId)) {
    echo "请先选择分区";
    exit;
}
$partion = WhTransportPartitionModel::find($partionId);
if (!$partion) {
    echo "分区不存在";
    exit;
}
$partionName = $partion['title'];
for ($j = 0; $j < $nums; $j++) {
    $data = array('partitionId' => $partion['id'], 'totalWeight' => 0, 'totalNum' => 0, 'partion' => $partion['title'], 'status' => 0, 'printUserId' => $_SESSION['userId'], 'printTime' => time(), 'modifyTime' => 0);
    $id = WhOrderPartionPrintModel::insert($data);
    //$userId = $_SESSION['userId'];
    //echo $userId;
    //$msg = orderPartionModel::insertPrintRecord($partionName,$userId);
    if ($id) {
        //$id = $msg;
        ?>
				  
Example #5
0
 /**
  * 分区操作
  * @author czq
  */
 public function act_checkPartion()
 {
     if (!$_SESSION['userId']) {
         $result = array('status' => 0, 'msg' => '请先登录系统');
         echo json_encode($result);
         exit;
     }
     $shipOrderId = trim($_REQUEST['shipOrderId']);
     $shipOrder = WhShippingOrderModel::find($shipOrderId);
     if (empty($shipOrder)) {
         $result = array('status' => 'A00', 'msg' => '发货单信息不存在');
         echo json_encode($result);
         exit;
     }
     if ($shipOrder['orderStatus'] != PKS_WDISTRICT) {
         $result = array('status' => 'A00', 'msg' => '发货单非待分区状态,不能分区');
         echo json_encode($result);
         exit;
     }
     if (empty($shipOrder['channelId'])) {
         $result = array('status' => 'A00', 'msg' => '发货单在申请运输方式中,请稍后分区');
         echo json_encode($result);
         exit;
     }
     $partition = WhTransportPartitionModel::getPartition($shipOrder['channelId'], $shipOrder['countryName']);
     if ($partition) {
         $vo = WhOrderPartionRecordsModel::find("shipOrderId='" . $shipOrderId . "'");
         if (!$vo) {
             $data = array('shipOrderId' => $shipOrderId, 'packageId' => 0, 'partitionId' => $partition['id'], 'weight' => $shipOrder['orderWeight'], 'partion' => $partition['title'], 'scanUserId' => $_SESSION['userId'], 'scanTime' => time(), 'modifyTime' => 0, 'note' => '', 'is_delete' => 0, 'storeId' => 0);
             WhOrderPartionRecordsModel::insert($data);
             $result = array('status' => $partition['code'], 'partition' => $partition['partition'], 'msg' => $partition['title']);
         } else {
             if ($vo['packageId']) {
                 $result = array('status' => 'A00', 'partition' => $partition['partition'], 'msg' => '已打包,不能再分区');
             } else {
                 $result = array('status' => $partition['code'], 'partition' => $partition['partition'], 'msg' => '包裹已分拣,分区为: ' . $partition['title']);
             }
         }
     } else {
         $result = array('status' => 'A00', 'partition' => '', 'msg' => '当前国家未分区,请联系销售人员');
     }
     echo json_encode($result);
     exit;
 }