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