海运出口详情bug

szh-new
lijingjia 4 months ago
parent f90e9e93ed
commit e9ed935adf

@ -177,7 +177,7 @@
}
}
}
const timer = ref(0)
function emitChange() {
emit('options-change', unref(getOptions))
}
@ -192,13 +192,12 @@
const handleSearch = debounce( async (v) => {
const api = props.api
if (!api || !isFunction(api)) return
options.value = []
loading.value = true
const res = await api({queryKey: v , ...props.params})
loading.value = false
options.value = res.data
emitChange()
})
const res = await api({queryKey: v , ...props.params})
loading.value = false
options.value = res.data
emitChange()
}, 100)
return { handleSearch, state, attrs, getOptions, loading, t, handleFetch, handleChange, props, getPopupContainer }
},
})

@ -730,7 +730,13 @@ export const basicInfoFormSchema: FormSchema[] = [
},
},
{
label: '',
field: 'truckerId',
component: 'Input',
show: false,
},
{
field: 'trucker',
label: '车队',
labelSlot: 'truckerId',
component: 'ApiSelect',
@ -742,29 +748,30 @@ export const basicInfoFormSchema: FormSchema[] = [
return {
api: GetClientListByCode,
params: { code: 'truck' },
labelField: 'shortName',
valueField: 'id',
labelField: 'pinYinCode',
valueField: 'shortName',
showName: 'shortName',
resultField: 'data',
immediate: false,
onChange: (e, obj) => {
if (obj) {
formModel.trucker = obj.shortName
formModel.truckerId = obj.id
} else {
formModel.trucker = ''
formModel.truckerId = ''
}
},
}
},
},
{
label: '船公司名称',
field: 'carrier',
label: '船公司id',
field: 'carrierId',
component: 'Input',
show: false,
},
{
label: '船公司',
field: 'carrierId',
field: 'carrier',
labelSlot: 'carrierId',
component: 'ApiSelect',
required: false,
@ -774,25 +781,19 @@ export const basicInfoFormSchema: FormSchema[] = [
return {
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
const arr = getOptions('carrier')
resolve(arr)
})
},
labelField: 'name',
api: GetClientListByCode,
params: { code: 'carrier' },
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'id',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
valueField: 'shortName',
resultField: 'data',
onChange: (e, obj) => {
if (obj) {
formModel.carrier = obj.shortName
if (e) {
formModel.carrierId = obj.id
} else {
formModel.carrier = ''
formModel.carrierId = ''
}
},
}
}
},
},
@ -1569,12 +1570,6 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
allowClear: true,
},
},
{
label: '',
field: 'trucker',
component: 'Input',
show: false,
},
{
field: 'closeDocDate',
label: '截单日期',

Loading…
Cancel
Save