Browse Source

保存提示

morphone1995 4 năm trước cách đây
mục cha
commit
c7127f88ff

+ 4 - 2
src/components/icss/AddMedicinePrompt.vue

@@ -171,7 +171,8 @@ export default {
       isShowTip: false,
       showType: -1, // 1 诊断  2  药品   3检验套餐 4检验细项  5检查 6手术和操作
       editCount: -1, // 页面会否被编辑 >0被编辑   =0 未编辑
-      startCount: -1
+      startCount: -1,
+      isSaveSuccess: false // 是否保存成功
     };
   },
   watch: {
@@ -286,7 +287,7 @@ export default {
     //   next();
     // }
 
-    if (this.startCount !== this.editCount) {
+    if (this.startCount !== this.editCount && !this.isSaveSuccess) {
       this.$confirm('还有未保存的内容,确定要退出当前页面吗?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -509,6 +510,7 @@ export default {
             if (res.data.code === '0') {
               this.isSuccessUpload = 0; // 修改文件上传状态为0
               this.warning(res.data.msg || '保存成功', 'success');
+              this.isSaveSuccess = true; // 保存成功,可正常退出
               //返回带搜索条件的首页
               this.$router.push({
                 name: 'MedicinePrompt',

+ 16 - 1
src/components/icss/dept/DeptManage.vue

@@ -336,7 +336,22 @@ export default {
       this.uploadInfo = '导入中...';
       api.importDeptRecord(formData, header).then(res => {
         // console.log('导入文件结果', '===================', res);
-        if (res.data === '' && res.status === 200) {
+        if (res.data.code === '00000001') {
+          this.$confirm(`数据存在异常,导入失败,请修改后再试`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else if (res.data === '' && res.status === 200) {
           this.$confirm(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',

+ 16 - 1
src/components/icss/disease/ChemicalAndCommonMapping.vue

@@ -333,7 +333,22 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importDiseaseRecord(formData, header).then(res => {
-        if (res.data === '' && res.status === 200) {
+        if (res.data.code === '00000001') {
+          this.$confirm(`数据存在异常,导入失败,请修改后再试`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else if (res.data === '' && res.status === 200) {
           this.$confirm(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',

+ 16 - 1
src/components/icss/drug/DrugManage.vue

@@ -333,7 +333,22 @@ export default {
       this.uploadInfo = '导入中...';
       api.importDrugRecord(formData, header).then(res => {
         // console.log(res, '======================res导入结果');
-        if (res.data === '' && res.status === 200) {
+        if (res.data.code === '00000001') {
+          this.$confirm(`数据存在异常,导入失败,请修改后再试`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else if (res.data === '' && res.status === 200) {
           this.$confirm(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',

+ 16 - 1
src/components/icss/fusion/Fusion.vue

@@ -330,7 +330,22 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importFusionRecord(formData, header).then(res => {
-        if (res.data === '' && res.status === 200) {
+        if (res.data.code === '00000001') {
+          this.$confirm(`数据存在异常,导入失败,请修改后再试`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else if (res.data === '' && res.status === 200) {
           this.$confirm(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',

+ 25 - 4
src/components/icss/lis/AddLis.vue

@@ -117,14 +117,13 @@ export default {
       },
       saveDisable: false, //保存按钮禁止点击
       showDrop: false, //下拉框显示文字
-      searchType: 2
+      searchType: 2 // 1:套餐   2: 细项
       // queryText: ''
     };
   },
   created() {
     //修改
     const { isEdit, data } = this.$route.params;
-    console.log(data,'data');
     if (isEdit) {
       this.isEdit = isEdit;
       this.editId = data.id;
@@ -133,6 +132,10 @@ export default {
       this.form.hisDetailName = data.hisDetailName;
       this.form.searchTextPre = data.uniqueName;
     }
+    if (isEdit && data.hisName !== '' && data.hisDetailName === '') {
+      this.searchType = 1;
+      console.log('改变searchType为1');
+    }
   },
   methods: {
     // 搜索列表
@@ -172,7 +175,7 @@ export default {
     handleclick() {},
 
     handleChoose(val) {
-      console.log('点击选中option', val);
+      // console.log('点击选中option', val);
       this.form.searchTextPre = val;
       this.form.searchText = val;
     },
@@ -186,10 +189,28 @@ export default {
 
     // 建立关联-参数处理
     submitForm() {
-      console.log(this.searchType,'searchType');
+      console.log(this.searchType, 'searchType');
+
       this.$refs.relationForm.validate(valid => {
         if (valid) {
           const { searchText, hisName, hisDetailName } = this.form;
+          // 当标准术语是套餐时,细项必须为空
+          if (this.searchType === 1 && hisDetailName !== '') {
+            this.warning('医院术语与标准术语类型不匹配,请修改');
+            return;
+          }
+
+          // 当标准术语是细项时,医院术语套餐和细项均不能为空
+          if (this.searchType === 2) {
+            if (hisName === '') {
+              this.warning('医院术语与标准术语类型不匹配,请修改');
+              return;
+            } else if (hisDetailName === '') {
+              this.warning('医院术语与标准术语类型不匹配,请修改');
+              return;
+            }
+          }
+
           let params = {
             hisName: hisName,
             uniqueName: searchText,

+ 16 - 1
src/components/icss/lis/Lis.vue

@@ -338,7 +338,22 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importLisRecord(formData, header).then(res => {
-        if (res.data === '' && res.status === 200) {
+        if (res.data.code === '00000001') {
+          this.$confirm(`数据存在异常,导入失败,请修改后再试`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else if (res.data === '' && res.status === 200) {
           this.$confirm(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',

+ 16 - 1
src/components/icss/operation/Operation.vue

@@ -338,7 +338,22 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importOperationRecord(formData, header).then(res => {
-        if (res.data === '' && res.status === 200) {
+        if (res.data.code === '00000001') {
+          this.$confirm(`数据存在异常,导入失败,请修改后再试`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else if (res.data === '' && res.status === 200) {
           this.$confirm(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',

+ 17 - 1
src/components/icss/pacs/Pacs.vue

@@ -332,7 +332,23 @@ export default {
       };
       this.uploadInfo = '导入中...';
       api.importPacsRecord(formData, header).then(res => {
-        if (res.data === '' && res.status === 200) {
+        // code === '00000001'  导入失败统一提示 数据存在异常,导入失败,请修改后再试
+        if (res.data.code === '00000001') {
+          this.$confirm(`数据存在异常,导入失败,请修改后再试`, '提示', {
+            confirmButtonText: '确定',
+            // cancelButtonText: '取消',
+            cancelButtonClass: 'cancelSure',
+            confirmButtonClass: 'sure',
+            customClass: 'exportConfirm',
+            type: 'warning'
+          })
+            .then(() => {})
+            .catch(() => {});
+          this.getDataList(); // 重新获取列表
+          setTimeout(() => {
+            this.uploadInfo = '导入';
+          }, 300);
+        } else if (res.data === '' && res.status === 200) {
           this.$confirm(`导入成功`, '提示', {
             confirmButtonText: '确定',
             // cancelButtonText: '取消',