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