|
@@ -37,7 +37,7 @@
|
|
<el-input v-model.trim="form.hisCode" clearable style="minWidth: 240px"></el-input>
|
|
<el-input v-model.trim="form.hisCode" clearable style="minWidth: 240px"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="16" v-if="type == 1">
|
|
|
|
|
|
+ <el-col :span="16" v-if="type == 1 || type == 2">
|
|
<el-form-item :label="detail+':'" prop="hisDetailName">
|
|
<el-form-item :label="detail+':'" prop="hisDetailName">
|
|
<el-input
|
|
<el-input
|
|
v-model.trim="form.hisDetailName"
|
|
v-model.trim="form.hisDetailName"
|
|
@@ -201,12 +201,14 @@ export default {
|
|
drugList: [],
|
|
drugList: [],
|
|
tableData: [],
|
|
tableData: [],
|
|
mapList: [],
|
|
mapList: [],
|
|
- getIndex: 6
|
|
|
|
|
|
+ getIndex: 6,
|
|
|
|
+ ty:this.type,
|
|
|
|
+ searchType:''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
//修改
|
|
//修改
|
|
- if (this.data != {}) {
|
|
|
|
|
|
+ if (JSON.stringify(this.data) != '{}') {
|
|
this.isEdit = true;
|
|
this.isEdit = true;
|
|
this.editId = this.data.id;
|
|
this.editId = this.data.id;
|
|
this.form.hisName = this.data.hisName;
|
|
this.form.hisName = this.data.hisName;
|
|
@@ -255,9 +257,17 @@ export default {
|
|
this.uniqueNameList = [];
|
|
this.uniqueNameList = [];
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ if (this.type == 1) {
|
|
|
|
+ const { hisName, hisDetailName } = this.form;
|
|
|
|
+ this.ty = 2; // 1-化验大项、2-化验小项
|
|
|
|
+ if (hisName !== '' && hisDetailName === '') {
|
|
|
|
+ this.ty = 1;
|
|
|
|
+ }
|
|
|
|
+ this.searchType = this.ty;
|
|
|
|
+ }
|
|
this.showDrop = true;
|
|
this.showDrop = true;
|
|
let params = {
|
|
let params = {
|
|
- type: this.type,
|
|
|
|
|
|
+ type: this.ty ? this.ty : this.type,
|
|
inputStr: query,
|
|
inputStr: query,
|
|
sex: 3,
|
|
sex: 3,
|
|
age: 0
|
|
age: 0
|
|
@@ -328,7 +338,7 @@ export default {
|
|
},
|
|
},
|
|
getTermMatching() {
|
|
getTermMatching() {
|
|
let params = {
|
|
let params = {
|
|
- type: this.ty ? this.ty : this.type,
|
|
|
|
|
|
+ type: this.type,
|
|
inputStr: this.form.hisName
|
|
inputStr: this.form.hisName
|
|
};
|
|
};
|
|
api.getTermMatching(params).then(res => {
|
|
api.getTermMatching(params).then(res => {
|
|
@@ -354,6 +364,21 @@ export default {
|
|
source
|
|
source
|
|
} = this.form;
|
|
} = 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 = {
|
|
let params = {
|
|
hisName: hisName,
|
|
hisName: hisName,
|
|
uniqueName: searchText,
|
|
uniqueName: searchText,
|