Merge branch 'feature/market_percentage' of wmtx/platform into release

市场专员业绩提成bug修正
master
廖金灵 5 years ago committed by Gogs
commit 9a8c22405b

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

Loading…
Cancel
Save