|
@@ -67,10 +67,10 @@
|
|
|
<el-option
|
|
|
v-for="(item,idx) in uniqueNameList"
|
|
|
:key="idx"
|
|
|
- :label="searchType === 2 ? `${item.uniqueName}(${item.name})` : item"
|
|
|
- :value="searchType === 2 ? `${item.uniqueName}(${item.name})` : item"
|
|
|
- :title="searchType === 2 ? `${item.uniqueName}(${item.name})` : item"
|
|
|
- @click.native="handleChoose(searchType === 2 ? item.uniqueName : item)"
|
|
|
+ :label="searchType == 2 ? `${item.uniqueName}(${item.name})` : item"
|
|
|
+ :value="searchType == 2 ? `${item.uniqueName}(${item.name})` : item"
|
|
|
+ :title="searchType == 2 ? `${item.uniqueName}(${item.name})` : item"
|
|
|
+ @click.native="handleChoose(searchType == 2 ? item.uniqueName : item)"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -130,10 +130,10 @@ export default {
|
|
|
this.editId = data.id;
|
|
|
this.form.hisName = data.hisName;
|
|
|
this.form.searchText = data.uniqueName;
|
|
|
- this.form.hisDetailName = data.hisDetailName;
|
|
|
+ this.form.hisDetailName = data.hisDetailName||'';
|
|
|
this.form.searchTextPre = data.uniqueName;
|
|
|
}
|
|
|
- if (isEdit && data.hisName !== '' && data.hisDetailName === '') {
|
|
|
+ if (isEdit && data.hisName !='' && !data.hisDetailName) {
|
|
|
this.searchType = 1;
|
|
|
// console.log('改变searchType为1');
|
|
|
}
|
|
@@ -148,7 +148,7 @@ export default {
|
|
|
}
|
|
|
const { hisName, hisDetailName } = this.form;
|
|
|
let type = 2; // 1-化验大项、2-化验小项
|
|
|
- if (hisName !== '' && hisDetailName === '') {
|
|
|
+ if (hisName != '' && hisDetailName == '') {
|
|
|
type = 1;
|
|
|
}
|
|
|
this.searchType = type;
|
|
@@ -161,9 +161,9 @@ export default {
|
|
|
};
|
|
|
api.retrievalSearch(params).then(res => {
|
|
|
this.showDrop = false;
|
|
|
- if (res.data.code === '0') {
|
|
|
+ if (res.data.code == '0') {
|
|
|
this.uniqueNameList =
|
|
|
- type === 1 ? res.data.data.lisNames : res.data.data.lisDetailNames;
|
|
|
+ type == 1 ? res.data.data.lisNames : res.data.data.lisDetailNames;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -193,28 +193,26 @@ export default {
|
|
|
|
|
|
// 建立关联-参数处理
|
|
|
submitForm() {
|
|
|
- console.log(this.searchType, 'searchType');
|
|
|
|
|
|
this.$refs.relationForm.validate(valid => {
|
|
|
if (valid) {
|
|
|
const { searchText, hisName, hisDetailName } = this.form;
|
|
|
// 当标准术语是套餐时,细项必须为空
|
|
|
- if (this.searchType === 1 && hisDetailName !== '') {
|
|
|
+ if (this.searchType == 1 && hisDetailName != '') {
|
|
|
this.warning('医院术语与标准术语类型不匹配,请修改');
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
// 当标准术语是细项时,医院术语套餐和细项均不能为空
|
|
|
- if (this.searchType === 2) {
|
|
|
- if (hisName === '') {
|
|
|
+ if (this.searchType == 2) {
|
|
|
+ if (hisName == '') {
|
|
|
this.warning('医院术语与标准术语类型不匹配,请修改');
|
|
|
return;
|
|
|
- } else if (hisDetailName === '') {
|
|
|
+ } else if (hisDetailName == '') {
|
|
|
this.warning('医院术语与标准术语类型不匹配,请修改');
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
let params = {
|
|
|
hisName: hisName,
|
|
|
uniqueName: searchText,
|
|
@@ -247,7 +245,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- if (err.code === '900010001') {
|
|
|
+ if (err.code == '900010001') {
|
|
|
return false;
|
|
|
}
|
|
|
this.warning(err);
|
|
@@ -257,7 +255,7 @@ export default {
|
|
|
// 映射关系不存在-建立关联
|
|
|
saveLisMapping(params, msg, type) {
|
|
|
api.saveOrUpdateLisRecord(params).then(res => {
|
|
|
- if (res.data.code === '0') {
|
|
|
+ if (res.data.code == '0') {
|
|
|
this.warning(res.data.msg || msg, type);
|
|
|
this.initForm();
|
|
|
this.$router.push({
|