市场专员业绩提成bug修正

master
zhengyongxing 5 years ago
parent 44feb6957d
commit 944a424b3c

@ -632,19 +632,25 @@ class MarketPercentageController extends ThinkController
$data['time'] = strtotime($data['timestart']); $data['time'] = strtotime($data['timestart']);
$data['create_time'] = time(); $data['create_time'] = time();
$is_save = M("tax_radio","tab_")->add($data); $is_hav = M("tax_radio","tab_")
->where(['time'=>strtotime($data['timestart'])])
->find();
if ($is_save) { if ($is_hav) {
$this->success("保存成功",U("index")); $is_save = M("tax_radio","tab_")
->where(['time'=>strtotime($data['timestart'])])
->add($data);
} else { } else {
$this->error("保存失败"); $is_save = M("tax_radio","tab_")->add($data);
} }
$this->success("保存成功",U("index"));
} else { } else {
$data = M("tax_radio","tab_") $data = M("tax_radio","tab_")
->field("tax_radio,time timestart") ->field("tax_radio,time timestart")
->order("time DESC") ->order("create_time DESC")
->find(); ->find();
$data['timestart'] = Date("Y-m",$data['timestart']); $data['timestart'] = Date("Y-m",$data['timestart']);

Loading…
Cancel
Save