|
@@ -26,6 +26,9 @@
|
|
|
optionFilterProp='label'
|
|
|
:params="{pageSize:-1}"
|
|
|
/>
|
|
|
+ <!-- <a-select v-model:value="model.customerId" showSearch :filterOption="filterOption">
|
|
|
+ <a-select-option v-for="item in customerOption" :key="item.id" :value="item.id">{{ item.label }}</a-select-option>
|
|
|
+ </a-select> -->
|
|
|
<!-- <a-input v-model:value="model.customer" placeholder="请输入客户(customer)" ></a-input> -->
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -56,6 +59,7 @@
|
|
|
import { message } from 'ant-design-vue';
|
|
|
import {ApiSelect} from '/@/components/Form/index';
|
|
|
import{CustomerOption} from '../../saleCode/saleInquiryForm/SaleInquiryForm.api';
|
|
|
+ var customerOption = ref([])
|
|
|
var visible = ref(false);
|
|
|
var form = ref();
|
|
|
var addProjectModalRef = ref()
|
|
@@ -80,6 +84,7 @@
|
|
|
};
|
|
|
function getTable(){
|
|
|
visible.value = true
|
|
|
+ getCustomerOption()
|
|
|
}
|
|
|
function handleOk(){
|
|
|
form.value.validate().then(async () => {
|
|
@@ -99,6 +104,13 @@
|
|
|
console.log('error', error);
|
|
|
});
|
|
|
}
|
|
|
+ async function getCustomerOption(){
|
|
|
+ var record=await CustomerOption({pageSize:-1})
|
|
|
+ record.records.map(item=>{
|
|
|
+ item.label = item.name+'-'+item.currency
|
|
|
+ })
|
|
|
+ customerOption.value= record.records
|
|
|
+ }
|
|
|
function handleCancel(){
|
|
|
emit('success')
|
|
|
visible.value = false
|
|
@@ -109,7 +121,21 @@
|
|
|
notes:'',
|
|
|
}
|
|
|
form.value.resetFields()
|
|
|
+
|
|
|
}
|
|
|
+ function filterOption(input, option) {
|
|
|
+ //update-begin-author:taoyan date:2022-11-8 for: issues/218 所有功能表单的下拉搜索框搜索无效
|
|
|
+ let value = '', label = '';
|
|
|
+ try {
|
|
|
+ value = option.value;
|
|
|
+ label = option.children()[0].children;
|
|
|
+ }catch (e) {
|
|
|
+ console.log('获取下拉项失败', e)
|
|
|
+ }
|
|
|
+ let str = input.toLowerCase();
|
|
|
+ return value.toLowerCase().indexOf(str) >= 0 || label.toLowerCase().indexOf(str) >= 0;
|
|
|
+ //update-end-author:taoyan date:2022-11-8 for: issues/218 所有功能表单的下拉搜索框搜索无效
|
|
|
+ }
|
|
|
defineExpose({
|
|
|
getTable
|
|
|
});
|