/** * 订单退货 * @params null * @return null */ public function doreship() { if (!$order_id) { $order_id = $_POST['order_id']; } else { $_POST['order_id'] = $order_id; } $sdf = $_POST; $this->begin(); $obj_checkorder = kernel::service('b2c_order_apps', array('content_path' => 'b2c_order_checkorder')); if (!$obj_checkorder->check_order_reship($sdf['order_id'], $sdf, $message)) { $this->end(false, $message); } $sdf['op_id'] = $this->user->user_id; $sdf['opname'] = $this->user->user_data['account']['login_name']; $reship =& $this->app->model('reship'); $sdf['reship_id'] = $reship->gen_id(); $reship->op_id = $this->user->user_id; $reship->op_name = $this->user->user_data['account']['login_name']; // 处理支付单据. $b2c_order_reship = b2c_order_reship::getInstance($this->app, $reship); if ($b2c_order_reship->generate($sdf, $this, $message)) { //ajx crm $obj_apiv = kernel::single('b2c_apiv_exchanges_request'); $req_arr['order_id'] = $sdf['order_id']; $obj_apiv->rpc_caller_request($req_arr, 'orderupdatecrm'); $this->end(true, app::get('b2c')->_('退货成功')); } else { $this->end(false, $message); } }
/** * 订单退货 * @params null * @return null */ public function doreship() { if (!$order_id) { $order_id = $_POST['order_id']; } else { $_POST['order_id'] = $order_id; } $sdf = $_POST; $this->begin(); $obj_checkorder = kernel::service('b2c_order_apps', array('content_path' => 'b2c_order_checkorder')); if (!$obj_checkorder->check_order_reship($sdf['order_id'], $sdf, $message)) { $this->end(false, $message); } $sdf['op_id'] = $this->user->user_id; $sdf['opname'] = $this->user->user_data['account']['login_name']; $reship = $this->app->model('reship'); $sdf['reship_id'] = $reship->gen_id(); $reship->op_id = $this->user->user_id; $reship->op_name = $this->user->user_data['account']['login_name']; // 处理支付单据. $b2c_order_reship = b2c_order_reship::getInstance($this->app, $reship); if ($b2c_order_reship->generate($sdf, $this, $message)) { if ($order_object = kernel::service('b2c_order_rpc_async')) { $order_object->modifyActive($sdf['order_id']); } $this->end(true, app::get('b2c')->_('退货成功')); } else { $this->end(false, $message); } }