Your Name 3 anos atrás
pai
commit
929bb55422

+ 2 - 2
service/agent/database/option_account.php

@@ -249,8 +249,8 @@ return array
             'name'      => '实际补贴期权价值-单位:元',
             'default'   => '0',
             'desc'      => '实际补贴期权价值',
-            'match'     => 'option',
-            // 'update'    => 'text',
+            'match'     => 'is_numeric',
+            'update'    => 'text',
             // 'list'      => true,
         ),
 

+ 22 - 22
service/agent/lib/Option_account.php

@@ -258,28 +258,28 @@ Class Option_account{
 		$audit = Dever::param('audit',$data);
 		$num = Dever::param('num',$data);
 		$info = Dever::db('agent/option_account')->find($id);
-		if (!$info) {
-			if ($price <= $zh_price){
-				$zj_price = $price;
-			} elseif ($price > $zh_price) {
-				$zj_price = $price - $zh_price;
-			}
-			$w['where_id'] = $id;
-			$w['zj_price'] = $zj_price;
-			// print_R($w);die;
-			Dever::db('agent/option_account')->update($w);
-		}
-		if (!$info['zj_price'] || $info['zj_price'] <=0) {
-			if ($info['price'] <= $info['zh_price']) {
-				$zj_price = $info['price'];
-			} elseif ($info['price'] > $info['zh_price']) {
-				$zj_price = $info['price'] - $info['zh_price'];
-			}
-			$w['where_id'] = $info['id'];
-			$w['zj_price'] = $zj_price;
-			// print_R($w);die;
-			Dever::db('agent/option_account')->update($w);
-		}
+		// if (!$info) {
+		// 	if ($price <= $zh_price){
+		// 		$zj_price = $price;
+		// 	} elseif ($price > $zh_price) {
+		// 		$zj_price = $price - $zh_price;
+		// 	}
+		// 	$w['where_id'] = $id;
+		// 	$w['zj_price'] = $zj_price;
+		// 	// print_R($w);die;
+		// 	Dever::db('agent/option_account')->update($w);
+		// }
+		// if (!$info['zj_price'] || $info['zj_price'] <=0) {
+		// 	if ($info['price'] <= $info['zh_price']) {
+		// 		$zj_price = $info['price'];
+		// 	} elseif ($info['price'] > $info['zh_price']) {
+		// 		$zj_price = $info['price'] - $info['zh_price'];
+		// 	}
+		// 	$w['where_id'] = $info['id'];
+		// 	$w['zj_price'] = $zj_price;
+		// 	// print_R($w);die;
+		// 	Dever::db('agent/option_account')->update($w);
+		// }
 		if($audit){
 			if ($audit == 1) {
 				$where['where_id'] = $id;