Commit 86de414a authored by yanglilong's avatar yanglilong

'增加搜搜'

parent 27c96e5a
......@@ -61,9 +61,10 @@
allow-clear
@filterOption="filterCode"
@change="corpChange"
@search="corpSearch"
>
<a-select-option
v-for="item in corpCode"
v-for="item in comCorpCode"
:key="item.id"
:value="item.id + '$_' + item.longName"
>
......@@ -119,10 +120,11 @@
show-search
allow-clear
@filterOption="filterCode"
@search="codeSearch"
>
<a-select-option
v-for="item in planCode"
:key="item.id"
v-for="item in comPlanCode"
:key="item.id + '_' + item.longName"
:vlaue="item.longName"
>
{{ item.longName }}
......@@ -151,16 +153,6 @@
</a-radio-group>
</a-form-model-item>
</a-col>
<a-col :xl="4" :lg="6" :sm="12">
<a-form-model-item label="等待期时间" prop="waitingPeriodTime">
<a-date-picker
allow-clear
v-model="form.waitingPeriodTime"
placeholder="请选择等待期时间"
value-format="YYYY-MM-DD 00:00:00"
></a-date-picker>
</a-form-model-item>
</a-col>
<a-col :xl="4" :lg="6" :sm="12">
<a-form-model-item label="是否承担既往症" prop="isUndertakeAnamnesis">
<a-radio-group
......@@ -173,6 +165,8 @@
</a-radio-group>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :xl="9" :sm="12">
<a-form-model-item label="保卡复印件" prop="medCardCopeFiles">
<div class="upload-print">
......@@ -214,6 +208,8 @@
</div>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :xl="24" :lg="18" :sm="12" class="none-label clearfix">
<a-form-model-item label="button">
<a-button type="primary">
......@@ -257,7 +253,9 @@ export default {
previewImage: "",
companyCode: [],
corpCode: [],
comCorpCode: [],
planCode: [],
comPlanCode: [],
formRules: {},
};
},
......@@ -299,16 +297,56 @@ export default {
}
this._getCorporateCode(val);
},
corpSearch(val) {
if (!val) {
this.comCorpCode = this.corpCode;
return;
}
let noOne = this.corpCode.every((item) => {
return item.longName.indexOf(val) == -1;
});
if (noOne) {
this.comCorpCode = [
...this.corpCode,
{
longName: val,
id: "",
},
];
}
},
codeSearch(val) {
if (!val) {
this.comPlanCode = this.planCode;
return;
}
let noOne = this.planCode.every((item) => {
return item.longName.indexOf(val) == -1;
});
if (noOne) {
this.comPlanCode = [
...this.planCode,
{
longName: val,
id: "",
},
];
}
},
corpChange(val) {
// 因为接口要name 但是查计划要用id
this.form.planName = undefined;
if (!val) {
return false;
}
console.log(val);
this.form.corpName = val.split("$_")[1];
val = val.split("$_")[0];
this._getPlanCode(val);
if (val) {
this._getPlanCode(val);
} else {
this.planCode = [];
this.comPlanCode = [];
}
},
uploadMedImg(file) {
console.log(file);
......@@ -393,6 +431,7 @@ export default {
})
.then((res) => {
this.corpCode = res.content || [];
this.comCorpCode = res.content || [];
});
},
_getPlanCode(val) {
......@@ -403,6 +442,7 @@ export default {
})
.then((res) => {
this.planCode = res.content || [];
this.comPlanCode = res.content || [];
});
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment