|
|
@@ -135,7 +135,7 @@
|
|
|
:orgType="formData.orgType"
|
|
|
@submitHandler="onSelect"
|
|
|
></DialogSelect>
|
|
|
- <DialogThreeState ref="DialogThreeState"> </DialogThreeState>
|
|
|
+ <!-- <DialogThreeState ref="DialogThreeState"> </DialogThreeState> -->
|
|
|
</DialogCom>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -351,17 +351,88 @@ export default {
|
|
|
}
|
|
|
if (this.formData.id) {
|
|
|
//编辑
|
|
|
+ let msg = "";
|
|
|
+ if(obj.status=='1'&&obj.isDistribute=='0'){
|
|
|
+ console.log(obj.status=='1'&&obj.isDistribute=='0')
|
|
|
+ msg = "是否确认修改?";
|
|
|
+ this.$modal
|
|
|
+ .confirm(msg)
|
|
|
+ .then(function () {
|
|
|
+ return editEvaluate(obj);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$message.success("编辑成功");
|
|
|
+ this.$emit("success");
|
|
|
+ this.onHide();
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ if(obj.isComplete==true){
|
|
|
+ msg = "因存在已完成任务,本次修改内容将下周期生效";
|
|
|
+ this.$modal
|
|
|
+ .confirm(msg)
|
|
|
+ .then(function () {
|
|
|
+ return editEvaluate(obj);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$message.success("编辑成功");
|
|
|
+ this.$emit("success");
|
|
|
+ this.onHide();
|
|
|
+ this.getList();
|
|
|
|
|
|
- editEvaluate(obj).then((res) => {
|
|
|
- let { code, msg } = res;
|
|
|
- if (code == 200) {
|
|
|
- this.$message.success(msg);
|
|
|
- this.$emit("success");
|
|
|
- this.onHide();
|
|
|
- } else {
|
|
|
- this.$message.error(msg);
|
|
|
- }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ if(obj.isHaveTask==false){
|
|
|
+ msg = "是否确认修改?";
|
|
|
+ this.$modal
|
|
|
+ .confirm(msg)
|
|
|
+ .then(function () {
|
|
|
+ return editEvaluate(obj);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$message.success("编辑成功");
|
|
|
+ this.$emit("success");
|
|
|
+ this.onHide();
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ msg = "因不存在已完成任务,本次修改内容将立即生效";
|
|
|
+
|
|
|
+ this.$modal
|
|
|
+ .confirm(msg)
|
|
|
+ .then(function () {
|
|
|
+ return editEvaluate(obj);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$message.success("编辑成功");
|
|
|
+ this.$emit("success");
|
|
|
+ this.onHide();
|
|
|
+ this.getList();
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // editEvaluate(obj).then((res) => {
|
|
|
+ // console.log(obj);
|
|
|
+ // let { code, msg } = res;
|
|
|
+ // if (code == 200) {
|
|
|
+ // this.$message.success(msg);
|
|
|
+ // this.$emit("success");
|
|
|
+ // this.onHide();
|
|
|
+ // } else {
|
|
|
+ // this.$message.error(msg);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
} else {
|
|
|
//新增
|
|
|
addEvaluate(obj).then((res) => {
|