|
@@ -23,7 +23,7 @@ class Agreement
|
|
|
if ($source == 2) {
|
|
|
|
|
|
$aid = Dever::load('passport/user')->check(false);
|
|
|
-
|
|
|
+ $aid = 2;
|
|
|
if (!$aid || $aid <= 0) {
|
|
|
Dever::alert('请先登录');
|
|
|
}
|
|
@@ -59,7 +59,7 @@ class Agreement
|
|
|
}
|
|
|
|
|
|
if ($aid && $aid != $info['aid']) {
|
|
|
- Dever::alert('您没有权限查看');
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if (isset($p['date'])) {
|
|
@@ -68,6 +68,12 @@ class Agreement
|
|
|
if (isset($p['total'])) {
|
|
|
$info['jiaofu_total'] = $p['total'];
|
|
|
}
|
|
|
+ if (isset($p['qiquan'])) {
|
|
|
+ $info['jiaofu_qiquan'] = $p['qiquan'];
|
|
|
+ }
|
|
|
+ if (isset($p['yuanshi'])) {
|
|
|
+ $info['jiaofu_yuanshi'] = $p['yuanshi'];
|
|
|
+ }
|
|
|
|
|
|
$method = 'pdf_' . $agreement['type'];
|
|
|
return $this->$method($agreement, $info);
|
|
@@ -85,7 +91,7 @@ class Agreement
|
|
|
}
|
|
|
|
|
|
|
|
|
- public function name($agreement, $info, $status = -1, $source = 1, $date = false, $total = false)
|
|
|
+ public function name($agreement, $info, $status = -1, $source = 1, $date = false, $total = false, $qiquan = false, $yuanshi = false)
|
|
|
{
|
|
|
if (!$agreement) {
|
|
|
$agreement = Dever::db('setting/agreement')->find(array('type' => 6));
|
|
@@ -121,6 +127,12 @@ class Agreement
|
|
|
if ($total) {
|
|
|
$param['total'] = $total;
|
|
|
}
|
|
|
+ if ($qiquan) {
|
|
|
+ $param['qiquan'] = $qiquan;
|
|
|
+ }
|
|
|
+ if ($yuanshi) {
|
|
|
+ $param['yuanshi'] = $yuanshi;
|
|
|
+ }
|
|
|
$param = Dever::encode(Dever::json_encode($param));
|
|
|
$link = Dever::url('option/lib/agreement.show?p=' . $param);
|
|
|
if ($source == 1) {
|
|
@@ -429,6 +441,16 @@ class Agreement
|
|
|
$info['jiaofu_date'] = date("Y年m月d日");
|
|
|
}
|
|
|
|
|
|
+ if (!isset($info['jiaofu_total'])) {
|
|
|
+ $info['jiaofu_total'] = '0.00';
|
|
|
+ }
|
|
|
+ if (!isset($info['jiaofu_qiquan'])) {
|
|
|
+ $info['jiaofu_qiquan'] = '0.00';
|
|
|
+ }
|
|
|
+ if (!isset($info['jiaofu_yuanshi'])) {
|
|
|
+ $info['jiaofu_yuanshi'] = '0.00';
|
|
|
+ }
|
|
|
+
|
|
|
if (isset($info['qdate']) && $info['qdate']) {
|
|
|
$qdate = date('Y年m月d日', $info['qdate']);
|
|
|
} else {
|