Your Name 3 年之前
父节点
当前提交
792a9a0aac
共有 3 个文件被更改,包括 24 次插入6 次删除
  1. 4 3
      service/agent/database/order_process.php
  2. 10 3
      service/agent/lib/Order.php
  3. 10 0
      service/setting/database/role.php

+ 4 - 3
service/agent/database/order_process.php

@@ -161,11 +161,11 @@ return array
             'desc'      => '金额',
             'match'     => 'option',
             'update'    => 'text',
-            'value'     => Dever::input('soft_price', '0'),
+            'const'     => Dever::input('soft_price', '0'),
             'show'      => 'cstatus=2',
         ),
 
-         'option_price'      => array
+        'option_price'      => array
         (
             'type'      => 'decimal-11,2',
             'name'      => '赠送期权价值',
@@ -173,8 +173,9 @@ return array
             'desc'      => '金额',
             'match'     => 'option',
             'update'    => 'text',
-            // 'value'     => Dever::input('soft_price', '0'),
+            'const'     => Dever::input('option_price', '0'),
             'show'      => 'audit=1',
+            'list'      => true,
         ),
 
         'desc'      => array

+ 10 - 3
service/agent/lib/Order.php

@@ -656,7 +656,7 @@ class Order
         $button = array();
         $cstatus = ',cstatus,soft_price';
         $soft_price = 0;
-        if ($role['soft'] && $role['soft'] && $info['price'] > 0 && $info['status'] > 1) {
+        if ($role['soft'] && $info['price'] > 0 && $info['status'] > 1) {
             //$cstatus = ',cstatus';
             //$soft = '【<a href="" style="color:blue">拆分代理费</a>】';
             if (strstr($role['soft'], '%')) {
@@ -665,7 +665,14 @@ class Order
             }
             $soft_price = $role['soft'];
         }
-
+        $option_price = 0;
+        if($role['option_price'] && $info['price'] > 0 && $info['status'] > 0){
+            if(strstr($role['option_price'],'%')){
+                $role['option_price'] = str_replace('%','',$role['option_price']);
+                $role['option_price'] = $info['price'] * ($role['option_price']/100);
+            }
+            $option_price = $role['option_price'];
+        }
         if (Dever::load('manage/auth')->checkFunc('agent.order', 'edit', '备注')) {
             $purl = Dever::url('project/database/update?project=agent&table=order&where_id='.$info['id'].'&col=admin_desc', 'manage');
             $button[] = array
@@ -730,7 +737,7 @@ class Order
                     $cstatus = ',prize_type';
                 }
             }
-            $purl = Dever::url('project/database/update?project=agent&table=order_process&order_id='.$info['id'].'&status=1&col=order_id,status,audit,price,option_price,desc'.$cstatus.'&price='.$info['price'].'&soft_price=' . $soft_price, 'manage');
+            $purl = Dever::url('project/database/update?project=agent&table=order_process&order_id='.$info['id'].'&status=1&col=order_id,status,audit,price,option_price,desc'.$cstatus.'&price='.$info['price'].'&soft_price=' . $soft_price.'&option_price='.$option_price, 'manage');
             if (isset($process[1]) && $process[1]) {
                 $purl .= '&where_id=' . $process[1]['id'];
             }

+ 10 - 0
service/setting/database/role.php

@@ -127,6 +127,16 @@ return array
             'update'    => 'text',
         ),
 
+        'option_price'      => array
+        (
+            'type'      => 'varchar-50',
+            'name'      => '赠送期权价值-如果填写赠送期权价值,如带有%号,就表示是百分比,如10%',
+            'default'   => '0',
+            'desc'      => '软件服务费',
+            'match'     => 'option',
+            'update'    => 'text',
+        ),
+
         'profit'      => array
         (
             'type'      => 'int-11',