|
@@ -244,11 +244,11 @@ class Purchin extends Base
|
|
|
//维护台账信息
|
|
|
Db::execute("UPDATE `wsm_standing_book` SET `wsm_in_code`=CONCAT(IFNULL(`wsm_in_code`,''),',{$wsm_in_code}'),`updatetime`='" . date('Y-m-d H:i:s') . "' WHERE `cgdNo`='{$cgdNo}'");
|
|
|
|
|
|
+ //库存品,只能由库管操作入库
|
|
|
+ $own_roleid = Db::name('user_role')->where(['is_del' => 0, 'status' => 1, 'uid' => $this->uid])->value('roleid');
|
|
|
+ if (!in_array($own_roleid, config('app.wsm_cgder_role'))) throw new Exception('只能由库管人员操作');
|
|
|
+
|
|
|
if($status==1){
|
|
|
- //库存品,只能由库管操作入库
|
|
|
- $own_roleid = Db::name('user_role')->where(['is_del' => 0, 'status' => 1, 'uid' => $this->uid])->value('roleid');
|
|
|
- if (!in_array($own_roleid, config('app.wsm_cgder_role'))) throw new Exception('只能由库管人员操作');
|
|
|
-
|
|
|
Db::commit();
|
|
|
return app_show(0,'新建成功',["wsm_in_code"=>$wsm_in_code]);
|
|
|
}
|