seimin лет назад: 2
Родитель
Сommit
ce5ae0ce13

+ 5 - 4
assets/js/controllers/customform/customformCtrl.js

@@ -22328,6 +22328,7 @@ appFormly.controller("CustomformCtrl", [
22328
                             $scope.onChangeComplexity = function(item){
22328
                             $scope.onChangeComplexity = function(item){
22329
                               if($scope.complexityConfirm.complexity.value == $scope.complexity){
22329
                               if($scope.complexityConfirm.complexity.value == $scope.complexity){
22330
                                 $scope.complexityConfirm.updateReason = '';
22330
                                 $scope.complexityConfirm.updateReason = '';
22331
+                                $scope.complexityConfirm.auditor = null;
22331
                               }
22332
                               }
22332
                             }
22333
                             }
22333
                             $scope.ok = function () {
22334
                             $scope.ok = function () {
@@ -22339,7 +22340,7 @@ appFormly.controller("CustomformCtrl", [
22339
                                     });
22340
                                     });
22340
                                     return;
22341
                                     return;
22341
                                 }
22342
                                 }
22342
-                                if (!$scope.complexityConfirm.auditor){
22343
+                                if ($scope.complexityConfirm.complexity.value != $scope.complexity && !$scope.complexityConfirm.auditor){
22343
                                     Alert.swal({
22344
                                     Alert.swal({
22344
                                         title: "操作失败",
22345
                                         title: "操作失败",
22345
                                         text: "请选择审核人!",
22346
                                         text: "请选择审核人!",
@@ -22347,7 +22348,7 @@ appFormly.controller("CustomformCtrl", [
22347
                                     });
22348
                                     });
22348
                                     return;
22349
                                     return;
22349
                                 }
22350
                                 }
22350
-                                if ($scope.complexityConfirm.complexity.value != $scope.complexity&&!$scope.complexityConfirm.updateReason.trim()){
22351
+                                if ($scope.complexityConfirm.complexity.value != $scope.complexity && !$scope.complexityConfirm.updateReason.trim()){
22351
                                     Alert.swal({
22352
                                     Alert.swal({
22352
                                         title: "操作失败",
22353
                                         title: "操作失败",
22353
                                         text: "请填写升级原因!",
22354
                                         text: "请填写升级原因!",
@@ -22357,7 +22358,7 @@ appFormly.controller("CustomformCtrl", [
22357
                                 }
22358
                                 }
22358
                                 api_wechatfile.getDictionary({"key":"incident_integral_state","type":"list"}).then(function(res){
22359
                                 api_wechatfile.getDictionary({"key":"incident_integral_state","type":"list"}).then(function(res){
22359
                                   // var auditState = $scope.complexityConfirm.complexity.value == $scope.complexity?res.find(v=>v.value == 1):res.find(v=>v.value == 0);
22360
                                   // var auditState = $scope.complexityConfirm.complexity.value == $scope.complexity?res.find(v=>v.value == 1):res.find(v=>v.value == 0);
22360
-                                  var auditState = res.find(v=>v.value == 0);
22361
+                                  var auditState = $scope.complexityConfirm.complexity.value != $scope.complexity ? res.find(v=>v.value == 0) : res.find(v=>v.value == 1);
22361
                                   var postData = { 
22362
                                   var postData = { 
22362
                                     incidentIntegral: {
22363
                                     incidentIntegral: {
22363
                                       incidentId:incidentData.id,
22364
                                       incidentId:incidentData.id,
@@ -22367,7 +22368,7 @@ appFormly.controller("CustomformCtrl", [
22367
                                       sourceScore:$scope.complexity,
22368
                                       sourceScore:$scope.complexity,
22368
                                       currentScore:$scope.complexityConfirm.complexity.value,
22369
                                       currentScore:$scope.complexityConfirm.complexity.value,
22369
                                       updateReason:$scope.complexityConfirm.updateReason.trim() || undefined,
22370
                                       updateReason:$scope.complexityConfirm.updateReason.trim() || undefined,
22370
-                                      auditUser: $scope.complexityConfirm.auditor.id
22371
+                                      auditUser: $scope.complexityConfirm.auditor ? $scope.complexityConfirm.auditor.id : undefined
22371
                                     }
22372
                                     }
22372
                                   }
22373
                                   }
22373
                                   console.log(postData)
22374
                                   console.log(postData)

+ 1 - 1
assets/views/incident/tpl/toIntegralMechanism.tpl.html

@@ -22,7 +22,7 @@
22
             </div>
22
             </div>
23
         </div>
23
         </div>
24
     </div>
24
     </div>
25
-    <div class="form-group incidentsearch" style="margin:0 auto;width: 300px;">
25
+    <div class="form-group incidentsearch" style="margin:0 auto;width: 300px;" ng-if="!flag || (flag && complexityConfirm.complexity.value != complexity)">
26
         <div class="input-group" style="margin:8px 0 0;">
26
         <div class="input-group" style="margin:8px 0 0;">
27
             <div class="control-label pull-left margin-top-5 margin-right-5">
27
             <div class="control-label pull-left margin-top-5 margin-right-5">
28
                 <label class="demoincident">审核人<span class="red">*</span></label>:</div>
28
                 <label class="demoincident">审核人<span class="red">*</span></label>:</div>