diff --git a/src/hooks/dict/index.ts b/src/hooks/dict/index.ts index e91e87dd..6bfa4c06 100644 --- a/src/hooks/dict/index.ts +++ b/src/hooks/dict/index.ts @@ -1,5 +1,5 @@ /* - * @Desc: + * @Desc: * @Author: lijj * @Date: 2024-07-17 08:39:50 */ @@ -15,7 +15,7 @@ export async function feeUnitDict() { let feeUnitDict = [] const ctnDict = await GetCtnSelectList() if (ctnDict.data && ctnDict.data.length) { - const ctn = ctnDict.data.map(item => { + const ctn = ctnDict.data.map((item) => { return { value: item.ediCode, label: item.ctnName, name: item.ctnName } }) feeUnitDict = [...ctn] @@ -25,6 +25,20 @@ export async function feeUnitDict() { return feeUnitDict } +// 费用标准字典 name=>code +export async function feeUnitDict2() { + // 计费标准下拉框数据 + let feeUnitDict = [] + const ctnDict = await GetCtnSelectList() + if (ctnDict.data && ctnDict.data.length) { + const ctn = ctnDict.data.map((item) => { + return { value: item.ctnName, label: item.ctnName, name: item.ctnName } + }) + feeUnitDict = [...ctn] + } + const unitDict = await getDictOption('fee_unit') + feeUnitDict = feeUnitDict.concat(unitDict) + return feeUnitDict +} // 往来单位相关的下拉数据 -export function getOptions(code) { -} \ No newline at end of file +export function getOptions(code) {} diff --git a/src/views/baseinfo/infoclient/EditColumns.tsx b/src/views/baseinfo/infoclient/EditColumns.tsx index 25d9c732..5a0f98d9 100644 --- a/src/views/baseinfo/infoclient/EditColumns.tsx +++ b/src/views/baseinfo/infoclient/EditColumns.tsx @@ -8,6 +8,7 @@ import { getNotifications, getClientSourceSelectList, GetTenantBanks, + GetBankList, } from './api' import { GetUserList, GetAllClientList } from '/@/api/common' import { @@ -18,6 +19,8 @@ import { GetClientSourceSelectList, GetClientSourceDetailSelectList, } from '/@/views/operation/seaexport/api/BookingLedger' +import { useUserStore } from '/@/store/modules/user' +const userStore: any = useUserStore() const sourceDetailId = ref([]) let ClientSourceList = [] const res3: API.DataResult = await getClientSourceSelectList() @@ -60,19 +63,41 @@ if (res13.succeeded) { }) } let rmbAccountData: any = [] -const res14: API.DataResult = await GetTenantBanks({ currency: 'CNY' }) +const res14: API.DataResult = await GetBankList({ + queryCondition: `[{"FieldName":"linkId","FieldValue":"${userStore.getUserInfo.orgId}","ConditionalType":1},{"FieldName":"currency","FieldValue":"RMB","ConditionalType":1}]`, + pageCondition: { pageIndex: 1, pageSize: 9999, sortConditions: [] }, + otherQueryCondition: '', +}) if (res14.succeeded) { rmbAccountData = [] res14.data.forEach((e) => { - rmbAccountData.push({ label: `${e.bankName}-${e.bankAccountNo}`, value: e.id, ...e }) + console.log(e) + + if (e.accountName && e.id) { + rmbAccountData.push({ + label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`, + value: e.id, + ...e, + }) + } }) } let usdAccountData: any = [] -const res15: API.DataResult = await GetTenantBanks({ currency: 'USD' }) +const res15: API.DataResult = await GetBankList({ + queryCondition: `[{"FieldName":"linkId","FieldValue":"${userStore.getUserInfo.orgId}","ConditionalType":1},{"FieldName":"currency","FieldValue":"USD","ConditionalType":1}]`, + pageCondition: { pageIndex: 1, pageSize: 9999, sortConditions: [] }, + otherQueryCondition: '', +}) if (res15.succeeded) { usdAccountData = [] res15.data.forEach((e) => { - usdAccountData.push({ label: `${e.bankName}-${e.bankAccountNo}`, value: e.id, ...e }) + if (e.accountName && e.id) { + usdAccountData.push({ + label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`, + value: e.id, + ...e, + }) + } }) } export const EditformSchema: FormSchema[] = [ @@ -884,7 +909,7 @@ export const EditformSchema2: FormSchema[] = [ field: 'rmbAccountId', label: '人民币账户', component: 'DEdit', - colProps: { span: 4 }, + colProps: { span: 8 }, defaultValue: '', componentProps: (En) => { return { @@ -928,7 +953,7 @@ export const EditformSchema2: FormSchema[] = [ field: 'usdAccountId', label: '美金账户', component: 'DEdit', - colProps: { span: 4 }, + colProps: { span: 8 }, defaultValue: '', componentProps: (En) => { return { diff --git a/src/views/baseinfo/infoclient/FeeCustTemplate/TenantAuditStepModal.vue b/src/views/baseinfo/infoclient/FeeCustTemplate/TenantAuditStepModal.vue index f0cea9a9..578a667b 100644 --- a/src/views/baseinfo/infoclient/FeeCustTemplate/TenantAuditStepModal.vue +++ b/src/views/baseinfo/infoclient/FeeCustTemplate/TenantAuditStepModal.vue @@ -53,7 +53,7 @@ import { formSchema } from './columns' // 相关接口 import { ApiEdit, ApiBulkEdit, ApiBulkEditDetails, ApiInfo } from './api' - import { feeUnitDict } from '/@/hooks/dict/index' + import { feeUnitDict2 } from '/@/hooks/dict/index' // 提升消息混入 import { useMessage } from '/@/hooks/web/useMessage' import { useUserStore } from '/@/store/modules/user' @@ -110,7 +110,7 @@ setFieldsValue({ ...res.data, }) - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() res.data.details.forEach((item) => { UnitList.forEach((e: any) => { if (e.value == item.unit) { @@ -131,7 +131,7 @@ ...res.data, id: '', }) - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() res.data.details.forEach((item) => { delete item.id UnitList.forEach((e: any) => { @@ -152,7 +152,7 @@ isBulk: true, }) // 添加 对应单位 单票输入 - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() unitArr.value.splice(0) BulkInfoArr.value.splice(0) ids.value.forEach(async (e) => { @@ -207,7 +207,7 @@ setFieldsValue({ ...res.data, }) - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() res.data.details.forEach((item) => { UnitList.forEach((e: any) => { if (e.value == item.unit) { diff --git a/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx b/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx index 452b84eb..e9747d1d 100644 --- a/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx +++ b/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx @@ -149,21 +149,26 @@ export const columns: BasicColumn[] = [ }, }, { - dataIndex: 'carrierId', + dataIndex: 'carrier', title: '船公司', - sorter: true, width: 200, - customRender: ({ record }) => { - let name = '' - carrierIdList.value.some((item: any) => { - if (record.carrierId == item.id) { - name = item.cnName - return true - } - }) - return name - }, }, + // { + // dataIndex: 'carrierId', + // title: '船公司', + // sorter: true, + // width: 200, + // customRender: ({ record }) => { + // let name = '' + // carrierIdList.value.some((item: any) => { + // if (record.carrierId == item.id) { + // name = item.cnName + // return true + // } + // }) + // return name + // }, + // }, { dataIndex: 'forwarderId', title: '订舱口', @@ -977,6 +982,16 @@ export const formSchema: FormSchema[] = [ showName: 'cnName', valueField: 'id', resultField: 'data', + onChange: (e, obj) => { + if (e && obj) { + formModel.carrier = obj.label + formModel.carrierId = obj.value + } + if (!e && !obj) { + formModel.carrier = '' + formModel.carrierId = '' + } + }, } }, }, diff --git a/src/views/baseinfo/infoclient/FeeCustTemplate/feeField.vue b/src/views/baseinfo/infoclient/FeeCustTemplate/feeField.vue index 85bf45c1..b9574104 100644 --- a/src/views/baseinfo/infoclient/FeeCustTemplate/feeField.vue +++ b/src/views/baseinfo/infoclient/FeeCustTemplate/feeField.vue @@ -77,7 +77,7 @@ import { getColumns, DeleteDetails, ApiBulkEditDetails } from './api' // import { GetFeeTemplateDetailList, BatchDelFeeTemplateDetail } from '../api' // 引入计费标准字典 - import { feeUnitDict } from '/@/hooks/dict/index' + import { feeUnitDict2 } from '/@/hooks/dict/index' // 引入字典数据 import { getDictOption } from '/@/utils/dictUtil' import AdvancedSearch from '/@/components/Form/src/components/AdvancedSearch.vue' @@ -222,7 +222,7 @@ const SetData = async (data) => { list.value.splice(0) const customerTypeList: any = await getDictOption('djy_cust_prop') - const unitList: any = await feeUnitDict() + const unitList: any = await feeUnitDict2() const unitList2: any = await getDictOption('fee_unit') console.log(unitList, unitList2) @@ -347,7 +347,7 @@ }) process(dict) } else { - const results = await feeUnitDict() + const results = await feeUnitDict2() unitDict.value = results const dict = results.map((item) => { return item.name diff --git a/src/views/baseinfo/infoclient/api.ts b/src/views/baseinfo/infoclient/api.ts index 9fceaab3..4efda390 100644 --- a/src/views/baseinfo/infoclient/api.ts +++ b/src/views/baseinfo/infoclient/api.ts @@ -24,6 +24,8 @@ enum Api { CreateSubmit = '/mainApi/ClientStakeholder/CreateSubmit', GetTenantBanks = '/mainApi/ClientAccountDate/GetTenantBanks', + GetBankList = '/mainApi/Bank/GetBankList', + // orgId } // 确定往来单位是否已使用 (Auth) @@ -198,3 +200,11 @@ export function GetTenantBanks(data: PageRequest) { params: data, }) } +// 获取组织机构银行账户列表 (Auth) +export function GetBankList(data: PageRequest) { + return request({ + url: Api.GetBankList, + method: 'post', + data: data, + }) +} diff --git a/src/views/baseinfo/infoclient/columns.tsx b/src/views/baseinfo/infoclient/columns.tsx index 952265a6..f9317f6a 100644 --- a/src/views/baseinfo/infoclient/columns.tsx +++ b/src/views/baseinfo/infoclient/columns.tsx @@ -9,6 +9,7 @@ import { getClientCountrySelectList, getNotifications, GetTenantBanks, + GetBankList, } from './api' import { getOrgList, GetFeeCurrencySelectList, GetUserList, GetAllClientList } from '/@/api/common' import { @@ -20,6 +21,8 @@ import { GetVouchingClerkList, GetClientSourceSelectList, } from '/@/views/operation/seaexport/api/BookingLedger' +import { useUserStore } from '/@/store/modules/user' +const userStore: any = useUserStore() const sourceDetailId = ref([]) // exports {} let ClientFrtList = [] @@ -63,22 +66,40 @@ if (res13.succeeded) { }) } let rmbAccountData: any = [] -const res14: API.DataResult = await GetTenantBanks({ currency: 'CNY' }) +const res14: API.DataResult = await GetBankList({ + queryCondition: `[{"FieldName":"linkId","FieldValue":"${userStore.getUserInfo.orgId}","ConditionalType":1},{"FieldName":"currency","FieldValue":"RMB","ConditionalType":1}]`, + pageCondition: { pageIndex: 1, pageSize: 9999, sortConditions: [] }, + otherQueryCondition: '', +}) if (res14.succeeded) { rmbAccountData = [] res14.data.forEach((e) => { + console.log(e) + if (e.accountName && e.id) { - rmbAccountData.push({ label: `${e.bankName}-${e.bankAccountNo}`, value: e.id, ...e }) + rmbAccountData.push({ + label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`, + value: e.id, + ...e, + }) } }) } let usdAccountData: any = [] -const res15: API.DataResult = await GetTenantBanks({ currency: 'USD' }) +const res15: API.DataResult = await GetBankList({ + queryCondition: `[{"FieldName":"linkId","FieldValue":"${userStore.getUserInfo.orgId}","ConditionalType":1},{"FieldName":"currency","FieldValue":"USD","ConditionalType":1}]`, + pageCondition: { pageIndex: 1, pageSize: 9999, sortConditions: [] }, + otherQueryCondition: '', +}) if (res15.succeeded) { usdAccountData = [] res15.data.forEach((e) => { if (e.accountName && e.id) { - usdAccountData.push({ label: `${e.bankName}-${e.bankAccountNo}`, value: e.id, ...e }) + usdAccountData.push({ + label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`, + value: e.id, + ...e, + }) } }) } @@ -1345,7 +1366,7 @@ export const formSchema2: FormSchema[] = [ field: 'rmbAccountId', label: '人民币账户', component: 'Select', - colProps: { span: 4 }, + colProps: { span: 8 }, defaultValue: '', componentProps: (En) => { return { @@ -1387,7 +1408,7 @@ export const formSchema2: FormSchema[] = [ field: 'usdAccountId', label: '美金账户', component: 'Select', - colProps: { span: 4 }, + colProps: { span: 8 }, defaultValue: '', componentProps: (En) => { return { diff --git a/src/views/fee/FeeCustTemplate/TenantAuditStepModal.vue b/src/views/fee/FeeCustTemplate/TenantAuditStepModal.vue index 58abf45a..034f18f1 100644 --- a/src/views/fee/FeeCustTemplate/TenantAuditStepModal.vue +++ b/src/views/fee/FeeCustTemplate/TenantAuditStepModal.vue @@ -53,7 +53,7 @@ import { formSchema } from './columns' // 相关接口 import { ApiEdit, ApiBulkEdit, ApiBulkEditDetails, ApiInfo } from './api' - import { feeUnitDict } from '/@/hooks/dict/index' + import { feeUnitDict2 } from '/@/hooks/dict/index' // 提升消息混入 import { useMessage } from '/@/hooks/web/useMessage' import { useUserStore } from '/@/store/modules/user' @@ -112,7 +112,7 @@ setFieldsValue({ ...res.data, }) - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() res.data.details.forEach((item) => { UnitList.forEach((e: any) => { if (e.value == item.unit) { @@ -154,7 +154,7 @@ ...res.data, id: '', }) - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() res.data.details.forEach((item) => { delete item.id UnitList.forEach((e: any) => { @@ -175,7 +175,7 @@ isBulk: true, }) // 添加 对应单位 单票输入 - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() unitArr.value.splice(0) BulkInfoArr.value.splice(0) ids.value.forEach(async (e) => { @@ -229,7 +229,7 @@ setFieldsValue({ ...res.data, }) - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() res.data.details.forEach((item) => { UnitList.forEach((e: any) => { if (e.value == item.unit) { diff --git a/src/views/fee/FeeCustTemplate/columns.tsx b/src/views/fee/FeeCustTemplate/columns.tsx index e13adf11..faf31b61 100644 --- a/src/views/fee/FeeCustTemplate/columns.tsx +++ b/src/views/fee/FeeCustTemplate/columns.tsx @@ -169,21 +169,26 @@ export const columns: BasicColumn[] = [ }, }, { - dataIndex: 'carrierId', + dataIndex: 'carrier', title: '船公司', - sorter: true, width: 200, - customRender: ({ record }) => { - let name = '' - carrierIdList.value.some((item: any) => { - if (record.carrierId == item.id) { - name = item.cnName - return true - } - }) - return name - }, }, + // { + // dataIndex: 'carrierId', + // title: '船公司', + // sorter: true, + // width: 200, + // customRender: ({ record }) => { + // let name = '' + // carrierIdList.value.some((item: any) => { + // if (record.carrierId == item.id) { + // name = item.cnName + // return true + // } + // }) + // return name + // }, + // }, { dataIndex: 'forwarderId', title: '订舱口', @@ -612,7 +617,7 @@ export const searchFormSchema: FormSchema[] = [ labelSlot: 'carrierId', component: 'ApiSelect', colProps: { span: 4 }, - componentProps: () => { + componentProps: ({ formModel }) => { return { api: GetCarrierSelectList, labelField: 'pinYinCode', @@ -884,13 +889,23 @@ export const viewSearchFormSchema: FormSchema[] = [ labelSlot: 'carrierId', component: 'ApiSelect', colProps: { span: 4 }, - componentProps: () => { + componentProps: ({ formModel }) => { return { api: GetCarrierSelectList, labelField: 'pinYinCode', showName: 'cnName', valueField: 'id', resultField: 'data', + onChange: (e, obj) => { + if (e && obj) { + formModel.carrier = obj.label + formModel.carrierId = obj.value + } + if (!e && !obj) { + formModel.carrier = '' + formModel.carrierId = '' + } + }, } }, }, @@ -1275,13 +1290,23 @@ export const formSchema: FormSchema[] = [ labelSlot: 'carrierId', component: 'ApiSelect', colProps: { span: 6 }, - componentProps: () => { + componentProps: ({ formModel }) => { return { api: GetCarrierSelectList, labelField: 'pinYinCode', showName: 'cnName', valueField: 'id', resultField: 'data', + onChange: (e, obj) => { + if (e && obj) { + formModel.carrier = obj.label + formModel.carrierId = obj.value + } + if (!e && !obj) { + formModel.carrier = '' + formModel.carrierId = '' + } + }, } }, }, diff --git a/src/views/fee/FeeCustTemplate/feeField.vue b/src/views/fee/FeeCustTemplate/feeField.vue index 234b40cc..1575f1bd 100644 --- a/src/views/fee/FeeCustTemplate/feeField.vue +++ b/src/views/fee/FeeCustTemplate/feeField.vue @@ -77,7 +77,7 @@ import { getColumns, DeleteDetails, ApiBulkEditDetails } from './api' // import { GetFeeTemplateDetailList, BatchDelFeeTemplateDetail } from '../api' // 引入计费标准字典 - import { feeUnitDict } from '/@/hooks/dict/index' + import { feeUnitDict2 } from '/@/hooks/dict/index' // 引入字典数据 import { getDictOption } from '/@/utils/dictUtil' import AdvancedSearch from '/@/components/Form/src/components/AdvancedSearch.vue' @@ -222,7 +222,7 @@ const SetData = async (data) => { list.value.splice(0) const customerTypeList: any = await getDictOption('djy_cust_prop') - const unitList: any = await feeUnitDict() + const unitList: any = await feeUnitDict2() const unitList2: any = await getDictOption('fee_unit') console.log(unitList, unitList2) @@ -351,7 +351,7 @@ }) process(dict) } else { - const results = await feeUnitDict() + const results = await feeUnitDict2() unitDict.value = results const dict = results.map((item) => { return item.name diff --git a/src/views/system/org/columns.tsx b/src/views/system/org/columns.tsx index 27843ede..7c7a1708 100644 --- a/src/views/system/org/columns.tsx +++ b/src/views/system/org/columns.tsx @@ -597,7 +597,7 @@ export const BankformSchema: FormSchema[] = [ field: 'currency', label: '币别', component: 'ApiSelect', - defaultValue: 'CNY', + defaultValue: 'RMB', colProps: { span: 12 }, componentProps: () => { return { @@ -609,6 +609,9 @@ export const BankformSchema: FormSchema[] = [ filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, + onChange: (e, obj) => { + console.log(e, obj) + }, } }, }, diff --git a/src/views/taskmanage/taskList/BLConfirmation/index.vue b/src/views/taskmanage/taskList/BLConfirmation/index.vue index e12688e5..a056c701 100644 --- a/src/views/taskmanage/taskList/BLConfirmation/index.vue +++ b/src/views/taskmanage/taskList/BLConfirmation/index.vue @@ -39,25 +39,10 @@ - + + 主单确认 + @@ -69,6 +54,7 @@ GetSeaExportBillManageInfo, BookingOrderGet, SetSteps, + SetTaskStatus, } from '../../api' import Info from './info.vue' import { useMessage } from '/@/hooks/web/useMessage' @@ -105,9 +91,15 @@ } } const RefInfo = ref(null) + const isMainBL = ref(false) async function ClickTasksUnit(data) { activeSteps.value = null activeId.value = data.id + isMainBL.value = false + activeStepsArr.value.splice(0) + if (data.isMainBL) { + isMainBL.value = true + } activeStepsArr.value = data.steps data.steps.forEach((item, index) => { if (!item.isCompleted && activeSteps.value == null) { @@ -156,16 +148,23 @@ ApiData = { ...item } } }) - - ApiData.steps[activeSteps.value].isCompleted = true + if (!isMainBL.value) { + ApiData.steps[activeSteps.value].isCompleted = true + } // 是否自动同步更新主任务状态 (嵇工 说 最好是手动设置一下确保万无一失) ApiData.autoSync = true - const res = await SetSteps(ApiData) + let res: any = null + if (isMainBL.value) { + res = await SetTaskStatus(ApiData) + } else { + res = await SetSteps(ApiData) + } if (res.succeeded) { createMessage.success(res.message) init(true) } } + function FnSetTaskStatus() {}