|
@@ -237,6 +237,7 @@
|
|
|
saveDisable: false ,
|
|
|
hasQuestion: 1, //是否有问题词
|
|
|
disNameExist: true, //诊断名称是否存在
|
|
|
+ hasNoUniqueName: false, //是否存在没有公表项的化验
|
|
|
isReady:false,
|
|
|
showDiagList: false
|
|
|
}
|
|
@@ -661,17 +662,7 @@
|
|
|
}
|
|
|
|
|
|
if(errStrList.length >0 ||codeErrorNum > 0 ||formulaListErrNum > 0) {
|
|
|
- this.$alert(errorStr,'错误信息',{
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
- confirmButtonText: '确定',
|
|
|
- callback: action => {
|
|
|
- /*this.$message({
|
|
|
- type: 'info',
|
|
|
- message: `action: ${ action }`
|
|
|
- });*/
|
|
|
- }
|
|
|
- });
|
|
|
- return
|
|
|
+ this.errorTips(errorStr)
|
|
|
}
|
|
|
// this.showDelDialog()
|
|
|
return this.diagBaseVerifyData(type)
|
|
@@ -699,7 +690,12 @@
|
|
|
}
|
|
|
if(labArr.length > 0) {
|
|
|
this.labVerifyData(labArr, loading).then(() =>{
|
|
|
- this.verifyDiagBase(loading)
|
|
|
+ if(this.hasNoUniqueName) {
|
|
|
+ loading.close()
|
|
|
+ return
|
|
|
+ }else {
|
|
|
+ this.verifyDiagBase(loading)
|
|
|
+ }
|
|
|
})
|
|
|
} else {
|
|
|
this.verifyDiagBase(loading)
|
|
@@ -713,8 +709,13 @@
|
|
|
this.isReady=false
|
|
|
if(res.data.code === '0') {
|
|
|
const data = res.data.data
|
|
|
+ let errorStr = ''
|
|
|
for (let i = 0; i < data.length; i++ ) {
|
|
|
if(!data[i].uniqueName) { //判断是否存在公表项
|
|
|
+ if(!this.hasNoUniqueName) {
|
|
|
+ this.hasNoUniqueName = true
|
|
|
+ }
|
|
|
+ errorStr +=`<p>第${+data[i].index+1}行化验公表项不存在</p>`
|
|
|
this.disFeatureListResult[data[i].index].verifyUnique="公表项不存在"
|
|
|
} else {
|
|
|
this.disFeatureListResult[data[i].index].verifyUnique=""
|
|
@@ -733,15 +734,18 @@
|
|
|
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ console.log('errorStr', errorStr)
|
|
|
+ if(errorStr) {
|
|
|
+ this.errorTips(errorStr)
|
|
|
+ }
|
|
|
this.disFeatureList = JSON.parse(JSON.stringify(this.disFeatureListResult))
|
|
|
this.disFeatureListResult = JSON.parse(JSON.stringify(this.disFeatureListResult))
|
|
|
- console.log('this.disFeatureListResult', this.disFeatureList)
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.warning(res.msg)
|
|
|
loading.close()
|
|
|
+ return
|
|
|
}
|
|
|
}).catch(()=>{ this.isReady=false;loading.close()})
|
|
|
},
|
|
@@ -803,14 +807,7 @@
|
|
|
resolve();
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
- warning(msg, type,time) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: msg,
|
|
|
- type: type || 'warning',
|
|
|
- duration:time || '3000'
|
|
|
- })
|
|
|
- },
|
|
|
+
|
|
|
handleInp(index,e,type,itemType){ //分组不能输入负数
|
|
|
const value = e;
|
|
|
if(type === 'FeatureNumber') { //序号只能输入数字和.
|
|
@@ -887,12 +884,26 @@
|
|
|
return this.disFormulaList = JSON.parse(JSON.stringify(this.disFormulaList))
|
|
|
}
|
|
|
},
|
|
|
- warning(msg,type){
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message:msg,
|
|
|
- type:type||'warning'
|
|
|
- })
|
|
|
+ warning(msg, type,time) {
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: msg,
|
|
|
+ type: type || 'warning',
|
|
|
+ duration:time || '3000'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ errorTips(errorStr) {
|
|
|
+ this.$alert(errorStr,'错误信息',{
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ callback: action => {
|
|
|
+ /*this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: `action: ${ action }`
|
|
|
+ });*/
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
}
|