|
@@ -41,7 +41,15 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="报关品名" prop="declarationName" :rules="[{ required: true, message: '请输入报关品名!' }]">
|
|
|
- <a-input placeholder="请输入报关品名" v-model="declareElements.declarationName"></a-input>
|
|
|
+ <!-- <a-input placeholder="请输入报关品名" v-model="declareElements.declarationName"></a-input> -->
|
|
|
+ <a-select v-model="declareElements.declarationName" show-search :filterOption="filterOption">
|
|
|
+ <a-select-option
|
|
|
+ v-for="(item,index) in productNameOption"
|
|
|
+ :key="index"
|
|
|
+ :value="item.value">
|
|
|
+ {{item.text}}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -246,16 +254,20 @@ export default {
|
|
|
//品名下拉框数据
|
|
|
//获取类别数据字典
|
|
|
getOption(){
|
|
|
- debugger
|
|
|
Dictionaries({code:'customs_declaration_elements'}).then(res => {
|
|
|
this.arrOption = res
|
|
|
})
|
|
|
- debugger
|
|
|
- Dictionaries({code:'declarationName'}).then(res=>{
|
|
|
+ Dictionaries({code:'declaration_name'}).then(res=>{
|
|
|
this.productNameOption = res
|
|
|
- debugger
|
|
|
})
|
|
|
},
|
|
|
+ //报关品名下拉框模糊搜索
|
|
|
+ filterOption(input, option) {
|
|
|
+ return (
|
|
|
+ option.componentOptions.children[0].text
|
|
|
+ .toLowerCase()
|
|
|
+ .indexOf(input.toLowerCase()) >= 0
|
|
|
+ )},
|
|
|
//英文品名转化大写
|
|
|
convertUppercase(val){
|
|
|
this.declareElements.englishProductName = val.toUpperCase()
|