本协议由以下双方于{$time}签订:
-合同编号:{$code}
+合同编号:{$sn}
甲方:海南万盟天下科技有限公司
注册地址:海南省海口市南海大道26号海口国家高新区创业孵化中心A楼5层A1-1268室
联系电话:13067391751
@@ -237,8 +237,6 @@ and open the template in the editor.diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index f411f529a..260dc2c8c 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -443,38 +443,13 @@ class SafeController extends BaseController{ public function safeDocument() { $time = time(); - $today = date('Y-m-d'); - $username = $_REQUEST['username']; - $tsession =S($today); - if(S($username)) { - $code = S($username); - }else { - if(!empty($tsession)) { - $num = $tsession + 1; - }else { - $num = 1; - } - $promoteRs = M('promote','tab_')->where(['account'=>$username])->getField('create_time',true); - $code = date('Ymd',$promoteRs[0])."_".$num; - } + $loginPromote = $this->getLoginPromote(); + $sn = date('Ymd') . '-' . strtoupper(substr(md5($loginPromote['id']), 8, 16)); $endTime = date('Y-m-d',strtotime('+1 year')); $this->assign('time',date('Y-m-d',$time)); $this->assign('endTime',$endTime); - $this->assign('code',$code); - $this->assign('username',$username); + $this->assign('sn',$sn); $this->display(); } - - public function ajaxAgree() { - $username = $_REQUEST['username']; - $code = $_REQUEST['code']; - $today = date('Y-m-d'); - if(empty(S($username))) { - S($username, $code); - $t = S($today); - S($today,$t+1); - } - $this->ajaxReturn(['code'=>10000]); - } } \ No newline at end of file diff --git a/Application/Home/View/default/Safe/safeDocument.html b/Application/Home/View/default/Safe/safeDocument.html index a2f05aaf3..3395e8ae0 100644 --- a/Application/Home/View/default/Safe/safeDocument.html +++ b/Application/Home/View/default/Safe/safeDocument.html @@ -51,7 +51,7 @@ and open the template in the editor.
本协议由以下双方于{$time}签订:
-合同编号:{$code}
+合同编号:{$sn}
甲方:海南万盟天下科技有限公司
注册地址:海南省海口市南海大道26号海口国家高新区创业孵化中心A楼5层A1-1268室
联系电话:13067391751
@@ -237,8 +237,6 @@ and open the template in the editor.