zhouzhendong 4 лет назад
Родитель
Сommit
5d9df2999f

+ 2 - 2
app/Http/Controllers/UserDutyCheckController.php

@@ -49,8 +49,8 @@ class UserDutyCheckController extends Controller
         if (!$user_id) app('LogService')->log(__METHOD__, "进出场扫码(未绑定设备)__" . __FUNCTION__, json_encode($importAndExportQRCodeType));
         if ($userLaborToken && $user_id) {
             $userDetail = UserDetail::query()->find($user_id);
-            if ($userDetail->black_status==1)return "<h1 style='color: darkred;text-align:center'>系统识别此用户异常,请联系管理员!</h1>";
             if($userDetail){
+                if ($userDetail->black_status==1)return "<h1 style='color: darkred;text-align:center'>系统识别此用户异常,请联系管理员!</h1>";
                 if($importAndExportQRCodeType=='import') return redirect('personnel/checking-in/userDutyCheck/updateUserLaborCompanies/' . $userDetail->mobile_phone)->with("importAndExportQRCodeType", $importAndExportQRCodeType);
                 $userDutyCheck = $this->importAndExportDutyCheck($user_id, $importAndExportQRCodeType);
                 $error=$this->hasError($userDutyCheck);
@@ -78,7 +78,7 @@ class UserDutyCheckController extends Controller
         $mobile_phone = $request->input('mobile_phone');
         $this->validatorPhone($request)->validate();
         $userDetail = UserDetail::query()->where('mobile_phone', $mobile_phone)->first();
-        if ($userDetail->black_status==1)return "<h1 style='color: darkred;text-align:center'>系统识别此用户异常,请联系管理员!</h1>";
+        if ($userDetail&&$userDetail->black_status==1)return "<h1 style='color: darkred;text-align:center'>系统识别此用户异常,请联系管理员!</h1>";
         if (!$userDetail) return redirect('personnel/checking-in/userDutyCheck/createUserDetail/' . $mobile_phone)->with("importAndExportQRCodeType", $importAndExportQRCodeType);
         if (Cache::has('dutyCheckTokenUser_'.$userDetail->user_id)) return "<h1 style='color: red;text-align:center'>请使用原有设备进行打卡,如无法使用原有设备请联系管理人员解绑设备!</h1>";
         if($importAndExportQRCodeType=='import') return redirect('personnel/checking-in/userDutyCheck/updateUserLaborCompanies/' . $userDetail->mobile_phone)->with("importAndExportQRCodeType", $importAndExportQRCodeType);

+ 3 - 1
resources/views/rejected/create.blade.php

@@ -846,6 +846,8 @@
                         this.itemInputting[key] = '';
                     }
                     this.itemInputting['amount'] = '1';
+                    this.itemInputting['packageImages'] = [];
+                    this.itemInputting['commodityImages'] = [];
                 },
                 cleanError: function () {
                     for (let key in this.errors) {
@@ -984,6 +986,7 @@
                 },
                 checkImageWhetherNeed(item){
                     if (this.billInputting.id_owner==4)return 0;//幼岚非必要上传外箱及产品图
+                    if (this.billInputting.id_owner==10 && item.id_quality_label==3)return 0;
                     if (item.id_quality_label!=1){
                         if (item.commodityImages.length===0){
                             tempTip.setDuration(3000);
@@ -1035,7 +1038,6 @@
                         }
                     }
                     let formData = _this.getDamagedFormData(_this.itemInputting);
-
                     axios.post(url, formData,{'Content-Type':'multipart/form-data'}).then(function (response) {
                         _this.cleanError();
                         if (response.data.success === 'true') {

+ 4 - 1
resources/views/rejected/edit.blade.php

@@ -602,7 +602,7 @@
                         @foreach($qualityLabels as $qualityLabel)
                     {id:'{{$qualityLabel->id}}',name:'{{$qualityLabel->name}}'},
                     @endforeach
-                ]
+                ],
             },
             mounted:function () {
                 let _this=this;
@@ -709,6 +709,8 @@
                         this.itemInputting[key]='';
                     }
                     this.itemInputting['amount']='1';
+                    this.itemInputting['packageImages'] = [];
+                    this.itemInputting['commodityImages'] = [];
                 },
                 cleanError:function(){
                     for(let key in this.errors){
@@ -864,6 +866,7 @@
                 },
                 checkImageWhetherNeed(item){
                     if (this.billInputting.id_owner==4)return 0;//幼岚非必要上传外箱及产品图
+                    if (this.billInputting.id_owner==10 && item.id_quality_label==3)return 0;
                     if (item.id_quality_label!=1){
                         if (item.commodityImages.length===0){
                             tempTip.setDuration(3000);