|
|
|
@ -5,7 +5,7 @@ import { ref, unref } from 'vue'
|
|
|
|
|
import { BasicColumn, FormSchema } from '/@/components/Table'
|
|
|
|
|
import { getDictOption } from '/@/utils/dictUtil'
|
|
|
|
|
// 下拉框数据接口
|
|
|
|
|
import { GetClientListByCode, GetCarrierSelectList, GetControllerClientList } from '/@/api/common'
|
|
|
|
|
import { GetClientListByCode, GetCarrierSelectList, GetControllerClientList, getOrgList } from '/@/api/common'
|
|
|
|
|
import {
|
|
|
|
|
GetPackageSelectList,
|
|
|
|
|
GetOrderContactListByClientId,
|
|
|
|
@ -23,7 +23,8 @@ import {
|
|
|
|
|
GetSaleList,
|
|
|
|
|
GetCustomerServiceList,
|
|
|
|
|
GetVouchingClerkList,
|
|
|
|
|
GetLaneUserList
|
|
|
|
|
GetLaneUserList,
|
|
|
|
|
GetClientSourceSelectList
|
|
|
|
|
} from '/@/views/operation/seaexport/api/BookingLedger'
|
|
|
|
|
import { useOptionsStore } from '/@/store/modules/options'
|
|
|
|
|
const optionsStore = useOptionsStore()
|
|
|
|
@ -56,15 +57,11 @@ const FntradeTerm = ref([])
|
|
|
|
|
getDictOption('packing_type').then((res) => {
|
|
|
|
|
FntradeTerm.value = res
|
|
|
|
|
})
|
|
|
|
|
// 单提份数字典
|
|
|
|
|
// 单提份数/副本份数字典
|
|
|
|
|
const FnnoBill = ref([])
|
|
|
|
|
getDictOption('no_bill').then((res) => {
|
|
|
|
|
FnnoBill.value = res
|
|
|
|
|
})
|
|
|
|
|
// 副本份数字典
|
|
|
|
|
const FncopyNoBill = ref([])
|
|
|
|
|
getDictOption('copy_no_bill').then((res) => {
|
|
|
|
|
FncopyNoBill.value = res
|
|
|
|
|
console.log(FnnoBill.value)
|
|
|
|
|
})
|
|
|
|
|
// 销售字典
|
|
|
|
|
const salerCodeDict = ref([])
|
|
|
|
@ -209,11 +206,13 @@ export const basicInfoFormSchema: FormSchema[] = [
|
|
|
|
|
mode: 'SECRET_COMBOBOX_MODE_DO_NOT_USE',
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
cno.value = e
|
|
|
|
|
cno.value = obj.contractNote
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onBlur: () => {
|
|
|
|
|
formActionType ? formActionType.linkageForm(cno) : null
|
|
|
|
|
if (cno.value) {
|
|
|
|
|
formActionType ? formActionType.linkageForm(cno) : null
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1303,7 +1302,7 @@ export const noteFormSchema: FormSchema[] = [
|
|
|
|
|
component: 'Select',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
// defaultValue: '',
|
|
|
|
|
defaultValue: null,
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
options: FnnoBill,
|
|
|
|
@ -1320,10 +1319,10 @@ export const noteFormSchema: FormSchema[] = [
|
|
|
|
|
component: 'Select',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
// defaultValue: '',
|
|
|
|
|
defaultValue: null,
|
|
|
|
|
colProps: { span: 5 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
options: FncopyNoBill,
|
|
|
|
|
options: FnnoBill,
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
@ -1722,11 +1721,13 @@ export const cargoInfoFormSchema2: FormSchema[] = [
|
|
|
|
|
field: 'goodsName',
|
|
|
|
|
label: '品名',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
labelSlot: 'goodsName',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
show: ({ values }) => {
|
|
|
|
|
return !values.isPreOrder
|
|
|
|
|
},
|
|
|
|
|
defaultValue: null,
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
@ -2018,8 +2019,6 @@ export const otherInfoFormSchema: FormSchema[] = [
|
|
|
|
|
componentProps: ({ formModel, formActionType }) => {
|
|
|
|
|
return {
|
|
|
|
|
api: GetSaleList,
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
labelField: 'pinYinCode',
|
|
|
|
|
showName: 'userName',
|
|
|
|
|
valueField: 'userName',
|
|
|
|
@ -2027,89 +2026,18 @@ export const otherInfoFormSchema: FormSchema[] = [
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
onChange: async (e, obj) => {
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
const saleDeptIdArr: any = []
|
|
|
|
|
formModel.saleId = obj.id
|
|
|
|
|
formModel.saleOrgId = obj.defaultOrgId
|
|
|
|
|
formModel.saleDeptId = obj.deptId
|
|
|
|
|
if (formActionType) {
|
|
|
|
|
const saleDeptDict: any = []
|
|
|
|
|
obj.saleOrgList.forEach((item) => {
|
|
|
|
|
saleDeptDict.push({ label: item.orgName, value: item.orgId })
|
|
|
|
|
})
|
|
|
|
|
if (obj.defaultOrgId) {
|
|
|
|
|
await GetDeptList({ orgId: obj.defaultOrgId }).then((res) => {
|
|
|
|
|
res.data.forEach((item) => {
|
|
|
|
|
saleDeptIdArr.push({ label: item.orgName, value: item.id })
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const { updateSchema } = formActionType
|
|
|
|
|
updateSchema([
|
|
|
|
|
{
|
|
|
|
|
label: '所属分部',
|
|
|
|
|
field: 'saleOrgId',
|
|
|
|
|
component: 'Select',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
calssName: 'saleOrgId',
|
|
|
|
|
// defaultValue: '',
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
allowClear: true,
|
|
|
|
|
options: saleDeptDict,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
formModel.saleDeptId = ''
|
|
|
|
|
GetDeptList({ orgId: e }).then((res) => {
|
|
|
|
|
let Arr: any = []
|
|
|
|
|
res.data.forEach((item) => {
|
|
|
|
|
Arr.push({ label: item.orgName, value: item.id })
|
|
|
|
|
})
|
|
|
|
|
updateSchema({
|
|
|
|
|
label: '所属部门',
|
|
|
|
|
field: 'saleDeptId',
|
|
|
|
|
component: 'Select',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
// defaultValue: '',
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
allowClear: true,
|
|
|
|
|
options: Arr,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '所属部门',
|
|
|
|
|
field: 'saleDeptId',
|
|
|
|
|
component: 'Select',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
// defaultValue: '',
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
componentProps: {
|
|
|
|
|
allowClear: true,
|
|
|
|
|
options: saleDeptIdArr,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
])
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
formModel.saleDeptName = obj.deptName
|
|
|
|
|
formModel.saleOrgName = obj.defaultOrgName
|
|
|
|
|
}
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.saleId = null
|
|
|
|
|
formModel.saleOrgId = null
|
|
|
|
|
formModel.saleDeptId = null
|
|
|
|
|
formModel.saleDeptName = null
|
|
|
|
|
formModel.saleOrgName = null
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2339,38 +2267,38 @@ export const otherInfoFormSchema: FormSchema[] = [
|
|
|
|
|
{
|
|
|
|
|
label: '',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
field: 'sourceName',
|
|
|
|
|
field: 'sourceId',
|
|
|
|
|
show: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '业务来源',
|
|
|
|
|
field: 'sourceId',
|
|
|
|
|
field: 'sourceName',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
option: optionsStore.getOptionsByCode('GetClientSourceSelectList'),
|
|
|
|
|
api: GetClientSourceSelectList,
|
|
|
|
|
labelField: 'sourceName',
|
|
|
|
|
valueField: 'id',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
valueField: 'sourceName',
|
|
|
|
|
immediate: false,
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
onChange: async (e, obj) => {
|
|
|
|
|
console.log(obj)
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.sourceCode = obj.sourceCode
|
|
|
|
|
formModel.sourceCode = obj.sourceName
|
|
|
|
|
formModel.sourceId = obj.id
|
|
|
|
|
}
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.sourceCode = null
|
|
|
|
|
formModel.sourceCode = null
|
|
|
|
|
formModel.sourceId = null
|
|
|
|
|
}
|
|
|
|
|
formModel.sourceDetailId = null
|
|
|
|
|
formModel.sourceDetailName = null
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '来源明细',
|
|
|
|
@ -2424,49 +2352,47 @@ export const otherInfoFormSchema: FormSchema[] = [
|
|
|
|
|
colProps: { span: 12 }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '所属分部',
|
|
|
|
|
label: '',
|
|
|
|
|
field: 'saleOrgId',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '所属分部',
|
|
|
|
|
field: 'saleOrgName',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
calssName: 'saleOrgId',
|
|
|
|
|
dynamicDisabled: ({ values }) => {
|
|
|
|
|
return !values.saleId
|
|
|
|
|
},
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
option: optionsStore.getOptionsByCode('GetOrgList'),
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
api: getOrgList,
|
|
|
|
|
labelField: 'label',
|
|
|
|
|
valueField: 'value',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
},
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
immediate: false,
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (obj) {
|
|
|
|
|
console.log(obj)
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.saleOrgName = obj.label
|
|
|
|
|
} else {
|
|
|
|
|
formModel.saleOrgName = ''
|
|
|
|
|
formModel.saleOrgId = obj.id
|
|
|
|
|
}
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.saleOrgName = null
|
|
|
|
|
formModel.saleOrgId = null
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'saleDeptName',
|
|
|
|
|
field: 'saleDeptId',
|
|
|
|
|
label: '',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
show: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'saleDeptName',
|
|
|
|
|
label: '',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
show: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'saleDeptId',
|
|
|
|
|
label: '所属部门',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
required: false,
|
|
|
|
@ -2474,19 +2400,21 @@ export const otherInfoFormSchema: FormSchema[] = [
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
option: optionsStore.getOptionsByCode('GetDeptList'),
|
|
|
|
|
allowClear: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
labelField: 'orgName',
|
|
|
|
|
valueField: 'id',
|
|
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
api: GetDeptList,
|
|
|
|
|
params: {
|
|
|
|
|
orgId: formModel.saleOrgId
|
|
|
|
|
},
|
|
|
|
|
labelField: 'orgName',
|
|
|
|
|
valueField: 'orgName',
|
|
|
|
|
resultField: 'data',
|
|
|
|
|
immediate: false,
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (obj) {
|
|
|
|
|
formModel.saleDeptName = obj.label
|
|
|
|
|
} else {
|
|
|
|
|
formModel.saleDeptName = ''
|
|
|
|
|
console.log(obj)
|
|
|
|
|
if (e && obj) {
|
|
|
|
|
formModel.saleDeptId = obj.id
|
|
|
|
|
}
|
|
|
|
|
if (!e && !obj) {
|
|
|
|
|
formModel.saleDeptId = null
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|