提交 5e262824 authored 作者: fengzy's avatar fengzy

'调整费用报销与借款单逻辑'

上级 11121b83
...@@ -70,7 +70,9 @@ class flow_emfkClassModel extends flowModel ...@@ -70,7 +70,9 @@ class flow_emfkClassModel extends flowModel
$sql = " mid ='$id' and `table`='c_emfk' "; $sql = " mid ='$id' and `table`='c_emfk' ";
$flow_bill = m('flow_bill')->getone($sql,'allcheckid'); $flow_bill = m('flow_bill')->getone($sql,'allcheckid');
$allcheckid=explode(',',$flow_bill['allcheckid']); $allcheckid=explode(',',$flow_bill['allcheckid']);
$option = m('option')->getall('pid = 1497 and num =1 order by sort desc','num,name,value,sort'); $optionid = m('option')->getone("num = 'em_manager' ",'id');
$id=$optionid['id'];
$option = m('option')->getall("num = '$id' and num =1 order by sort desc",'num,name,value,sort');
foreach ($option as $key => $value) { foreach ($option as $key => $value) {
if(in_array($value['value'], $allcheckid)){ if(in_array($value['value'], $allcheckid)){
$checkid= $value['value']; $checkid= $value['value'];
...@@ -79,7 +81,7 @@ class flow_emfkClassModel extends flowModel ...@@ -79,7 +81,7 @@ class flow_emfkClassModel extends flowModel
} }
if(empty($checkid)){ if(empty($checkid)){
$option = m('option')->getall('pid = 1497 and num =2 order by sort desc','num,name,value,sort,`explain`'); $option = m('option')->getall("pid ='$id' and num =2 order by sort desc",'num,name,value,sort,`explain`');
foreach ($option as $key => $value) { foreach ($option as $key => $value) {
if(in_array($value['value'], $allcheckid)){ if(in_array($value['value'], $allcheckid)){
$checkid= $value['value']; $checkid= $value['value'];
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论