往来单位 业务来源 来源明细 调整

feature-JimuReport-1106-yjl
张同海 1 month ago
parent a6b03038d7
commit aefe52581f

@ -107,19 +107,19 @@
RData = props.unCheckedChildren RData = props.unCheckedChildren
} }
} else { } else {
if (props.label == '来源明细') { // if (props.label == '') {
appStore.getSourceData.forEach((item) => { // appStore.getSourceData.forEach((item) => {
item.children.forEach((item2) => { // item.children.forEach((item2) => {
if (item2.id == state.value) { // if (item2.id == state.value) {
RData = item2.detailName // RData = item2.detailName
} // }
}) // })
}) // })
// RData = props.ShowName // // RData = props.ShowName
} else { // } else {
RData = state.value RData = state.value
// RData = state.value ? state.value.replace(/\"/g, '') : '' // RData = state.value ? state.value.replace(/\"/g, '') : ''
} // }
} }
} }

@ -1,3 +1,4 @@
import { ref } from 'vue'
import { FormSchema } from '/@/components/Table' import { FormSchema } from '/@/components/Table'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
@ -8,7 +9,10 @@ import {
GetCustomerServiceList, GetCustomerServiceList,
GetOperatorUserList, GetOperatorUserList,
GetVouchingClerkList, GetVouchingClerkList,
GetClientSourceSelectList,
GetClientSourceDetailSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger' } from '/@/views/operation/seaexport/api/BookingLedger'
const sourceDetailId = ref<any>([])
let ClientCountryList = [] let ClientCountryList = []
const res4: API.DataResult = await getClientCountrySelectList() const res4: API.DataResult = await getClientCountrySelectList()
if (res4.succeeded) { if (res4.succeeded) {
@ -589,20 +593,43 @@ export const EditformSchema: FormSchema[] = [
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: (e) => { componentProps: (En) => {
const { formActionType, formModel } = e
return { return {
allowClear: true, api: GetClientSourceSelectList,
showSearch: true,
option: optionsStore.getOptionsByCode('GetClientSourceSelectList'),
labelField: 'sourceName', labelField: 'sourceName',
valueField: 'id', valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },
onChange: async (e, obj) => {
const { formModel, formActionType } = En
if (e && obj) {
formModel.sourceId = obj.value
formModel.sourceName = obj.label
}
if (!e && !obj) {
formModel.sourceId = ''
formModel.sourceName = ''
}
if (e) {
const FnsourceDetailId: any = await GetClientSourceDetailSelectList({
id: e,
})
if (FnsourceDetailId.succeeded) {
sourceDetailId.value.splice(0)
FnsourceDetailId.data.forEach((e) => {
sourceDetailId.value.push({ label: e.detailName, value: e.id })
})
}
if (formActionType) {
formModel.sourceDetailId = ''
}
}
},
onEdit: () => { onEdit: () => {
const { formActionType } = e const { formActionType } = En
formActionType ? formActionType.linkageForm(e) : null formActionType ? formActionType.linkageForm(En) : null
}, },
} }
}, },
@ -619,12 +646,31 @@ export const EditformSchema: FormSchema[] = [
field: 'sourceDetailId', field: 'sourceDetailId',
component: 'DEdit', component: 'DEdit',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: (e) => { dynamicDisabled: ({ values }) => {
return !values.sourceId
},
componentProps: (En) => {
return { return {
allowClear: true, allowClear: true,
options: sourceDetailId.value,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
const { formModel } = En
if (e && obj) {
formModel.sourceDetailId = obj.value
formModel.sourceDetailName = obj.label
}
if (!e && !obj) {
formModel.sourceDetailId = ''
formModel.sourceDetailName = ''
}
},
onEdit: () => { onEdit: () => {
const { formActionType } = e const { formActionType } = En
formActionType ? formActionType.linkageForm(e) : null formActionType ? formActionType.linkageForm(En) : null
}, },
} }
}, },

@ -1,3 +1,4 @@
import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table' import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue' import { Tag } from 'ant-design-vue'
// 字典 // 字典
@ -16,13 +17,9 @@ import {
GetCustomerServiceList, GetCustomerServiceList,
GetOperatorUserList, GetOperatorUserList,
GetVouchingClerkList, GetVouchingClerkList,
GetClientSourceSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger' } from '/@/views/operation/seaexport/api/BookingLedger'
import { useOptionsStore } from '/@/store/modules/options' const sourceDetailId = ref<any>([])
const optionsStore = useOptionsStore()
import { useRoute } from 'vue-router'
import { placeholderSign } from 'element-plus/es/components/table-v2/src/private'
import { max } from 'lodash'
const route = useRoute()
// exports {} // exports {}
let ClientFrtList = [] let ClientFrtList = []
const res: API.DataResult = await getClientFrtSelectList() const res: API.DataResult = await getClientFrtSelectList()
@ -929,71 +926,79 @@ export const formSchema: FormSchema[] = [
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formActionType, formModel }) => {
return {
allowClear: true,
showSearch: true,
option: optionsStore.getOptionsByCode('GetClientSourceSelectList'),
labelField: 'sourceName',
valueField: 'id',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: async (e, obj) => {
if (e && obj) {
formModel.sourceId = obj.value
formModel.sourceName = obj.label
}
if (!e && !obj) {
formModel.sourceId = ''
formModel.sourceName = ''
}
if (e) {
if (formActionType) {
const { updateSchema } = formActionType
let Arr: any = []
await GetClientSourceDetailSelectList({ id: e }).then((res) => {
res.data.forEach((item) => {
Arr.push({ label: item.detailName, value: item.id })
})
})
updateSchema({
label: '来源明细',
field: 'sourceDetailId',
component: 'Select',
required: false,
dynamicDisabled: ({ values }) => {
return !values.sourceId
},
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
allowClear: true,
options: Arr,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (e && obj) {
formModel.sourceDetailId = obj.value
formModel.sourceDetailName = obj.label
}
if (!e && !obj) {
formModel.sourceDetailId = ''
formModel.sourceDetailName = ''
}
},
}
},
})
}
}
formModel.sourceDetailId = ''
},
}
},
}, },
// {
// label: '业务来源',
// field: 'sourceId',
// component: 'ApiSelect',
// required: false,
// dynamicDisabled: false,
// colProps: { span: 4 },
// componentProps: ({ formActionType, formModel }) => {
// return {
// allowClear: true,
// showSearch: true,
// option: optionsStore.getOptionsByCode('GetClientSourceSelectList'),
// labelField: 'sourceName',
// valueField: 'id',
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// onChange: async (e, obj) => {
// if (e && obj) {
// formModel.sourceId = obj.value
// formModel.sourceName = obj.label
// }
// if (!e && !obj) {
// formModel.sourceId = ''
// formModel.sourceName = ''
// }
// if (e) {
// if (formActionType) {
// const { updateSchema } = formActionType
// let Arr: any = []
// await GetClientSourceDetailSelectList({ id: e }).then((res) => {
// res.data.forEach((item) => {
// Arr.push({ label: item.detailName, value: item.id })
// })
// })
// updateSchema({
// label: '来源明细',
// field: 'sourceDetailId',
// component: 'Select',
// required: false,
// dynamicDisabled: ({ values }) => {
// return !values.sourceId
// },
// colProps: { span: 4 },
// componentProps: ({ formModel }) => {
// return {
// allowClear: true,
// options: Arr,
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// onChange: (e, obj) => {
// if (e && obj) {
// formModel.sourceDetailId = obj.value
// formModel.sourceDetailName = obj.label
// }
// if (!e && !obj) {
// formModel.sourceDetailId = ''
// formModel.sourceDetailName = ''
// }
// },
// }
// },
// })
// }
// }
// formModel.sourceDetailId = ''
// },
// }
// },
// },
// 来源明细Name // 来源明细Name
{ {
label: '', label: '',
@ -1001,11 +1006,11 @@ export const formSchema: FormSchema[] = [
component: 'Input', component: 'Input',
show: false, show: false,
}, },
{ {
field: 'sourceDetailId',
label: '来源明细', label: '来源明细',
field: 'sourceDetailId',
component: 'Select', component: 'Select',
required: false,
colProps: { span: 4 }, colProps: { span: 4 },
}, },

Loading…
Cancel
Save