| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | 
							- <?php defined('BASEPATH') OR exit('No direct script access allowed');
 
- class Ck extends Start_Controller {
 
- 	public function __construct(){
 
- 		parent::__construct();
 
- 		$this->load->_model('Model_ck','ck');
 
- 		$this->load->_model('Model_warehouse','warehouse');
 
- 		$this->load->_model('Model_specialstock','specialstock');
 
- 		$this->load->_model('Model_whlabel','whlabel');
 
- 		$this->load->_model('Model_typeclass','typeclass');
 
- 		$this->load->_model('Model_whlabel_fc','whlabel_fc');
 
- 	}
 
- 	//定义方法的调用规则 获取URI第二段值
 
-     public function _remap($arg,$arg_array)
 
-     {
 
- 		if($arg == 'kcyz')//添加
 
-         {
 
-              $this->_kcyz();
 
-         }
 
- 		else
 
- 		{
 
- 			 $this->_index();
 
- 		}
 
-     }
 
- 	public function _kcyz()
 
- 	{
 
- 		$post = $this->input->post(NULL, TRUE);
 
- 		if(isset($post['warehouse']))  
 
- 		{
 
- 			$warehouse = $this->input->post('warehouse',true);
 
- 		    $whlabel = $this->input->post('whlabel',true);
 
- 			$id = $this->input->post('id',true);
 
- 			$shop = $this->input->post('shop',true);
 
- 			$number = $this->input->post('number',true);
 
- 			$state = $this->input->post('state',true);
 
- 			$warehouse = $this->warehouse->read($warehouse);
 
- 			if(!$state)
 
- 			{
 
- 				$state = 207;
 
- 			}
 
- 			if(!$number)
 
- 			{
 
- 				$number = '001';
 
- 			}
 
- 			if(!$whlabel || $whlabel == '|')
 
- 			{
 
- 				echo json_encode(array('msg'=>'请先添加产品信息!','success'=>false));exit;
 
- 			}
 
- 			$z = $this->ck->get_kcyz($state,$warehouse,$shop,$number,$whlabel,'');
 
- 			if($z['t'] > '0')
 
- 			{
 
- 				echo $z['m'];
 
- 			}
 
- 			else
 
- 			{
 
- 				echo json_encode(array('success'=>true));exit;
 
- 			}
 
- 		}
 
- 	}
 
- }
 
 
  |