海运出口详情使用数据仓库

szh-new
lijingjia 5 months ago
parent 7c5fbe6119
commit adb360ee24

@ -115,7 +115,6 @@
options.value = []
if (option && option.length) {
options.value = option
console.log(options.value)
emitChange()
return
}

@ -1,7 +1,23 @@
/*
* @Author: lijingjia lijj_xl@163.com
* @Date: 2024-06-18 15:03:29
* @Description:
*/
import {
GetClientSourceSelectList,
GetClientStlModeSelectList,
GetVesselSelectList
GetVesselSelectList,
GetVoynoSelectList,
GetClientLanesSelectList,
GetSaleList,
GetDeptList,
GetCustomerServiceList,
GetVouchingClerkList,
GetClientPortSelectList,
GetIssueTypeSelectList,
GetClientFrtSelectList,
GetServiceSelectList,
GetPackageSelectList
} from '/@/views/operation/seaexport/api/BookingLedger'
export default {
// 业务来源
@ -21,5 +37,71 @@ export default {
return GetVesselSelectList().then(res => {
return res.data
})
}
},
// 航次
GetVoynoSelectList: () => {
return GetVoynoSelectList().then(res => {
return res.data
})
},
// 航线
GetClientLanesSelectList: () => {
return GetClientLanesSelectList().then(res => {
return res.data
})
},
// 揽货人
GetSaleList: () => {
return GetSaleList().then(res => {
return res.data
})
},
// 所属部门
GetDeptList: () => {
return GetDeptList().then(res => {
return res.data
})
},
// 客服人员/操作人
GetCustomerServiceList: () => {
return GetCustomerServiceList().then(res => {
return res.data
})
},
// 单证
GetVouchingClerkList: () => {
return GetVouchingClerkList().then(res => {
return res.data
})
},
// 收货地/签单地/预付地点/到付地点/装货港/中转港/卸货港/目的地/交货地
GetClientPortSelectList: () => {
return GetClientPortSelectList().then(res => {
return res.data
})
},
// 签单方式
GetIssueTypeSelectList: () => {
return GetIssueTypeSelectList().then(res => {
return res.data
})
},
// 付费方式
GetClientFrtSelectList: () => {
return GetClientFrtSelectList().then(res => {
return res.data
})
},
// 运输条款
GetServiceSelectList: () => {
return GetServiceSelectList().then(res => {
return res.data
})
},
// 包装
GetPackageSelectList: () => {
return GetPackageSelectList().then(res => {
return res.data
})
},
}

@ -11,16 +11,38 @@ export const useOptionsStore = defineStore({
id: 'ds-options',
state: () => ({
// 业务来源
GetClientSourceSelectList: [],
GetClientSourceSelectList: null,
// 结算方式
GetClientStlModeSelectList: [],
GetClientStlModeSelectList: null,
// 船名
GetVesselSelectList: [],
GetVesselSelectList: null,
// 航次
GetVoynoSelectList: null,
// 航线
GetClientLanesSelectList: null,
// 揽货人/海外客服
GetSaleList: null,
// 所属部门
GetDeptList: null,
// 客服/操作
GetCustomerServiceList: null,
// 单证
GetVouchingClerkList: null,
// 收货地/签单地/预付地点/到付地点/装货港/中转港/卸货港/目的地/交货地
GetClientPortSelectList: null,
// 签单方式
GetIssueTypeSelectList: null,
// 付费方式
GetClientFrtSelectList: null,
// 运输条款
GetServiceSelectList: null,
// 包装/品名
GetPackageSelectList: null
}),
getters: {
// 通过code获取下拉字典code)就是接口尾部单词
getOptionsByCode: (store) => (code) => {
if (store.$state[code].length) {
if (store.$state[code] !== null) {
// 如果state中下拉存储字段有值直接返回
return store.$state[code]
} else {

@ -103,7 +103,7 @@
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
}
let condition: API.ConditionItem[] = []
if (!!data.businessType) {

@ -6,24 +6,8 @@ import { FormSchema } from '/@/components/Table'
import { getDictOption } from '/@/utils/dictUtil'
import { getOptions } from '/@/hooks/dict'
import {
// GetControllerClientList,
GetClientSourceDetailSelectList,
GetVesselSelectList,
GetVoynoSelectList,
GetClientLanesSelectList,
GetSaleList,
GetDeptList,
GetCustomerServiceList,
GetVouchingClerkList,
GetClientPortSelectList,
// GetYardClientList,
// GetCustomClientList,
// GetTruckClientList,
// GetAgentClientList,
GetWareHouseClientList,
GetIssueTypeSelectList,
GetClientFrtSelectList,
GetServiceSelectList,
GetPackageSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger'
import { useOptionsStore } from '/@/store/modules/options'
@ -490,15 +474,14 @@ export const basicInfoFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: () => {
return {
api: GetVoynoSelectList,
option: optionsStore.getOptionsByCode('GetVoynoSelectList'),
labelField: 'voyNo',
valueField: 'voyNo',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
}
},
}
},
{
label: '船司航线',
@ -517,10 +500,9 @@ export const basicInfoFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetClientLanesSelectList,
option: optionsStore.getOptionsByCode('GetClientLanesSelectList'),
labelField: 'laneName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
@ -591,12 +573,11 @@ export const basicInfoFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: ({ formModel, formActionType }) => {
return {
option: optionsStore.getOptionsByCode('GetSaleList'),
allowClear: true,
showSearch: true,
api: GetSaleList,
labelField: 'userName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
@ -709,23 +690,16 @@ export const basicInfoFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: () => {
return {
option: optionsStore.getOptionsByCode('GetDeptList'),
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
GetDeptList().then((res) => {
resolve(res)
})
})
},
labelField: 'orgName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
}
},
}
},
{
label: '客服员',
@ -739,12 +713,11 @@ export const basicInfoFormSchema: FormSchema[] = [
return {
api: () => {
return new Promise((resolve) => {
GetCustomerServiceList().then((res) => {
res.data.forEach((e) => {
e.userName = `${e.userCode}/${e.userName}`
})
resolve(res)
const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetCustomerServiceList')))
data.forEach((e) => {
e.userName = `${e.userCode}/${e.userName}`
})
resolve({ data })
})
},
labelField: 'userName',
@ -768,12 +741,11 @@ export const basicInfoFormSchema: FormSchema[] = [
return {
api: () => {
return new Promise((resolve) => {
GetCustomerServiceList().then((res) => {
res.data.forEach((e) => {
e.userName = `${e.userCode}/${e.userName}`
})
resolve(res)
const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetCustomerServiceList')))
data.forEach((e) => {
e.userName = `${e.userCode}/${e.userName}`
})
resolve({ data })
})
},
labelField: 'userName',
@ -797,12 +769,11 @@ export const basicInfoFormSchema: FormSchema[] = [
return {
api: () => {
return new Promise((resolve) => {
GetVouchingClerkList().then((res) => {
res.data.forEach((e) => {
e.userName = `${e.userCode}/${e.userName}`
})
resolve(res)
const data = optionsStore.getOptionsByCode('GetVouchingClerkList')
data.forEach((e) => {
e.userName = `${e.userCode}/${e.userName}`
})
resolve({ data })
})
},
labelField: 'userName',
@ -824,12 +795,11 @@ export const basicInfoFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: () => {
return {
option: optionsStore.getOptionsByCode('GetSaleList'),
allowClear: true,
showSearch: true,
api: GetSaleList,
labelField: 'userName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
@ -1017,12 +987,12 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
showSearch: true,
api: () => {
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((e) => {
e.portName = `${e.portName}/${e.ediCode}`
})
resolve(res)
const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')))
data.forEach((item) => {
item.portName = `${item.portName}(${item.ediCode})`
})
console.log(data)
resolve({ data })
})
},
labelField: 'portName',
@ -1154,12 +1124,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
showSearch: true,
api: () => {
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((e) => {
e.ediCode = `${e.portName}/${e.ediCode}`
})
resolve(res)
const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')))
data.forEach((e) => {
e.ediCode = `${e.portName}/${e.ediCode}`
})
resolve({ data })
})
},
labelField: 'ediCode',
@ -1262,12 +1231,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
showSearch: true,
api: () => {
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((e) => {
e.portName = `${e.portName}/${e.ediCode}`
})
resolve(res)
const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')))
data.forEach((e) => {
e.portName = `${e.portName}/${e.ediCode}`
})
resolve({ data })
})
},
labelField: 'portName',
@ -1360,12 +1328,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
showSearch: true,
api: () => {
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((e) => {
e.ediCode = `${e.portName}/${e.ediCode}`
})
resolve(res)
const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')))
data.forEach((e) => {
e.ediCode = `${e.portName}/${e.ediCode}`
})
resolve({ data })
})
},
labelField: 'ediCode',
@ -1442,12 +1409,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
showSearch: true,
api: () => {
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((e) => {
e.ediCode = `${e.portName}/${e.ediCode}`
})
resolve(res)
const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')))
data.forEach((e) => {
e.ediCode = `${e.portName}/${e.ediCode}`
})
resolve({ data })
})
},
labelField: 'ediCode',
@ -1532,12 +1498,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
showSearch: true,
api: () => {
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((e) => {
e.ediCode = `${e.portName}/${e.ediCode}`
})
resolve(res)
const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')))
data.forEach((e) => {
e.ediCode = `${e.portName}/${e.ediCode}`
})
resolve({ data })
})
},
labelField: 'ediCode',
@ -1613,12 +1578,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
colProps: { span: 5 },
componentProps: () => {
return {
option: optionsStore.getOptionsByCode('GetIssueTypeSelectList'),
allowClear: true,
showSearch: true,
api: GetIssueTypeSelectList,
labelField: 'billType',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
@ -1651,12 +1615,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
showSearch: true,
api: () => {
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((e) => {
e.ediCode = `${e.portName}/${e.ediCode}`
})
resolve(res)
const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')))
data.forEach((e) => {
e.ediCode = `${e.portName}/${e.ediCode}`
})
resolve({ data })
})
},
labelField: 'ediCode',
@ -1692,12 +1655,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
colProps: { span: 5 },
componentProps: () => {
return {
option: optionsStore.getOptionsByCode('GetClientFrtSelectList'),
allowClear: true,
showSearch: true,
api: GetClientFrtSelectList,
labelField: 'cnName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
@ -1725,12 +1687,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
showSearch: true,
api: () => {
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((e) => {
e.portName = `${e.portName}/${e.ediCode}`
})
resolve(res)
const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')))
data.forEach((e) => {
e.portName = `${e.portName}/${e.ediCode}`
})
resolve({ data })
})
},
labelField: 'portName',
@ -1770,12 +1731,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
showSearch: true,
api: () => {
return new Promise((resolve) => {
GetClientPortSelectList().then((res) => {
res.data.forEach((e) => {
e.portName = `${e.portName}/${e.ediCode}`
})
resolve(res)
const data = JSON.parse(JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')))
data.forEach((e) => {
e.portName = `${e.portName}/${e.ediCode}`
})
resolve({ data })
})
},
labelField: 'portName',
@ -1810,12 +1770,11 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
colProps: { span: 5 },
componentProps: () => {
return {
option: optionsStore.getOptionsByCode('GetServiceSelectList'),
allowClear: true,
showSearch: true,
api: GetServiceSelectList,
labelField: 'enName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
@ -2292,23 +2251,23 @@ export const cargoInfoFormSchema2: FormSchema[] = [
colProps: { span: 6 },
componentProps: ({ formActionType, formModel }) => {
return {
option: optionsStore.getOptionsByCode('GetPackageSelectList'),
allowClear: true,
showSearch: true,
api: GetPackageSelectList,
labelField: 'packageName',
valueField: 'id',
resultField: 'data',
onChange: (e) => {
if (e) {
ListData.goodsName.forEach((item) => {
if (item.value == e) {
formModel.kindPkgsName = item.label
}
GetPackageSelectList().then((res) => {
res.data.forEach((item) => {
if (item.id == e) {
formModel.kindPkgsName = item.cnExplain
}
})
setTimeout(() => {
formActionType ? formActionType.submit() : null
}, 10)
})
setTimeout(() => {
formActionType ? formActionType.submit() : null
}, 10)
}
},
filterOption: (input: string, option: any) => {
@ -2361,12 +2320,11 @@ export const cargoInfoFormSchema3: FormSchema[] = [
colProps: { span: 8 },
componentProps: () => {
return {
option: optionsStore.getOptionsByCode('GetPackageSelectList'),
allowClear: true,
showSearch: true,
api: GetPackageSelectList,
labelField: 'packageName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},

@ -1428,6 +1428,9 @@
.catch((err) => {
console.log(err)
})
}
function frompre() {
}
function getSampleBill() {
SampleBill(id.value)

@ -189,6 +189,17 @@
optionsStore.getOptionsByCode('GetVesselSelectList')
optionsStore.getOptionsByCode('GetClientStlModeSelectList')
optionsStore.getOptionsByCode('GetClientSourceSelectList')
optionsStore.getOptionsByCode('GetVoynoSelectList')
optionsStore.getOptionsByCode('GetClientLanesSelectList')
optionsStore.getOptionsByCode('GetSaleList')
optionsStore.getOptionsByCode('GetDeptList')
optionsStore.getOptionsByCode('GetCustomerServiceList')
optionsStore.getOptionsByCode('GetVouchingClerkList')
optionsStore.getOptionsByCode('GetClientPortSelectList')
optionsStore.getOptionsByCode('GetIssueTypeSelectList')
optionsStore.getOptionsByCode('GetClientFrtSelectList')
optionsStore.getOptionsByCode('GetServiceSelectList')
optionsStore.getOptionsByCode('GetPackageSelectList')
})
},
beforeFetch: () => {

Loading…
Cancel
Save