|
|
@@ -108,10 +108,12 @@ class Entrust extends Backend
|
|
|
$params['name'] = preg_replace('/\s+/','',$params['name']);//去掉所有空格
|
|
|
$params['user_id'] = Session::get('admin')['id'];
|
|
|
$userinfo = Db::name('admin')->where('id',$params['user_id'])->find();
|
|
|
+ $params['project'] = implode(',',$params['project']);
|
|
|
$params['user_name'] = $userinfo['username'];
|
|
|
$params['work_unit'] = $userinfo['company'];
|
|
|
$params['work_name'] = Db::name('company')->where('id',$userinfo['company'])->value('name');
|
|
|
$params['company'] = Db::name('company')->where('id',$params['company'])->value('name');
|
|
|
+
|
|
|
$is_exit = false;//默认样品编号唯一
|
|
|
if ($params['is_two'] == 1){//双样
|
|
|
for ($i=0;$i<2;$i++){
|
|
|
@@ -183,6 +185,7 @@ class Entrust extends Backend
|
|
|
if (empty($params)) {
|
|
|
$this->error(__('Parameter %s can not be empty', ''));
|
|
|
}
|
|
|
+ $params['project'] = implode(',',$params['project']);
|
|
|
$params = $this->preExcludeFields($params);
|
|
|
$result = false;
|
|
|
Db::startTrans();
|