From 9552d51276d1000961cbcb3b67474c3fd9093614 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Wed, 28 Aug 2013 01:41:49 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=20namespace=20order?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E8=8B=A5=E5=B9=B2=E6=93=8D=E4=BD=9C=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86pdf=E9=87=8C=E7=9A=84=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E8=B4=9F=E8=B4=A3=E4=BA=BA=E5=92=8C=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=B4=9F=E8=B4=A3=E4=BA=BA=E8=81=8C=E7=A7=B0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/models/order/Manager/Offlineapp.php | 13 +++++++++++++ application/models/order/Order.php | 2 +- application/models/order/mount/PdfForm.php | 10 ++++++++++ application/models/order/mount/PdfOperate.php | 1 + 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/application/models/order/Manager/Offlineapp.php b/application/models/order/Manager/Offlineapp.php index 1262301e..3b01191d 100644 --- a/application/models/order/Manager/Offlineapp.php +++ b/application/models/order/Manager/Offlineapp.php @@ -45,6 +45,19 @@ class Offlineapp //接收 public function receive($id) { + if(empty($id) || !is_numeric($id)) + { + return "参数错误"; + } + + $data = array( + + ); + $sql="update dataorder set status=4,ts_received=now() where id=?"; + $rs = $this->db->query($sql,array($id)); + $row = $rs->fetch(); + + } diff --git a/application/models/order/Order.php b/application/models/order/Order.php index 5d2ba4a1..606aab2a 100644 --- a/application/models/order/Order.php +++ b/application/models/order/Order.php @@ -268,7 +268,7 @@ class Order $pdf->template = $this->config->offline->template; $pdf->heihetemplate = $this->config->offline->heihetemplate; - $formData['project'].='['.$formData['project_title'].' | '.$formData['project_type'].' | '.$formData['project_id'].']'; + $formData['project'].='['.$formData['project_title'].' | '.$formData['project_type'].' | '.$formData['project_id'].' | ' . $formData['leader'] . ' | ' .$formData['leadertitle']. ']'; $pdf->data = $formData; if (isset($formData['westdclist'])) $pdf->drawWestdc(); diff --git a/application/models/order/mount/PdfForm.php b/application/models/order/mount/PdfForm.php index bdf39446..058efb0c 100644 --- a/application/models/order/mount/PdfForm.php +++ b/application/models/order/mount/PdfForm.php @@ -110,6 +110,16 @@ class PdfForm implements \Order\listener\PdfFormEvents return "请填写项目标题"; } + if(empty($formData['leader'])) + { + return "请填写项目负责人"; + } + + if(empty($formData['leadertitle'])) + { + return "请填写项目负责人职称"; + } + if(empty($formData['project'])) { return "请填写用途"; diff --git a/application/models/order/mount/PdfOperate.php b/application/models/order/mount/PdfOperate.php index affe3b47..7d49fdf1 100644 --- a/application/models/order/mount/PdfOperate.php +++ b/application/models/order/mount/PdfOperate.php @@ -46,6 +46,7 @@ class PdfOperate implements \Order\listener\PdfEvents $formData['username'] = $formData['realname']; unset($formData['realname']); unset($formData['save']); + if ($row) { $s = $dbh->update($this->tbl_offlineapp,$formData," id={$row['id']} "); return $s;