public function view_edit() { if ($_POST['submit']) { $id = intval($_POST['id']); $data = array('title' => $_POST['title'], 'shortTitle' => $_POST['shortTitle'], 'transportId' => $_POST['transportId'], 'channelId' => $_POST['channelId'], 'channelName' => isset($_POST['channelName']) ? $_POST['channelName'] : '', 'partition' => $_POST['partition'], 'priority' => $_POST['priority'], 'countryWhiteList' => json_encode($_POST['countryWhiteList']), 'backAddress' => $_POST['backAddress'], 'modifiedtime' => time(), 'editUserId' => $_SESSION['userId'], 'status' => intval($_POST['status'])); WhTransportPartitionModel::update($data, $id); header("location:index.php?mod=whTransportPartition&act=index"); } else { $id = intval($_GET['id']); $data = WhTransportPartitionModel::find($id); $data['countryWhiteList'] = json_decode($data['countryWhiteList'], true); $transportlist = CommonModel::getShipingTypeList(); //获取运输方式 $countrylist = CommonModel::getCountryList(); //获取国建列表 $channellist = CommonModel::getCarrierChannelByIds($data['transportId']); //获取国家渠道信息 $this->smarty->assign('data', $data); $this->smarty->assign('countrylist', $countrylist); $this->smarty->assign('transportlist', $transportlist); $this->smarty->assign('channellist', $channellist); $this->smarty->display('whTransportPartition_edit.htm'); } }
.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; ?>