From aa5496e8f2ecff231aa0959ab3c4150262aa98ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?=
<14166000+zhangtonghai@user.noreply.gitee.com>
Date: Sat, 2 Nov 2024 18:33:49 +0800
Subject: [PATCH 1/2] 11/02
---
src/hooks/dict/index.ts | 22 ++++++--
src/views/baseinfo/infoclient/EditColumns.tsx | 14 ++++-
.../FeeCustTemplate/TenantAuditStepModal.vue | 10 ++--
.../infoclient/FeeCustTemplate/columns.tsx | 39 +++++++++----
.../infoclient/FeeCustTemplate/feeField.vue | 6 +-
src/views/baseinfo/infoclient/columns.tsx | 16 +++++-
.../FeeCustTemplate/TenantAuditStepModal.vue | 10 ++--
src/views/fee/FeeCustTemplate/columns.tsx | 55 ++++++++++++++-----
src/views/fee/FeeCustTemplate/feeField.vue | 6 +-
src/views/system/org/columns.tsx | 5 +-
.../taskList/BLConfirmation/index.vue | 41 +++++++-------
11 files changed, 149 insertions(+), 75 deletions(-)
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..7526f933 100644
--- a/src/views/baseinfo/infoclient/EditColumns.tsx
+++ b/src/views/baseinfo/infoclient/EditColumns.tsx
@@ -60,11 +60,15 @@ if (res13.succeeded) {
})
}
let rmbAccountData: any = []
-const res14: API.DataResult = await GetTenantBanks({ currency: 'CNY' })
+const res14: API.DataResult = await GetTenantBanks({ currency: 'RMB' })
if (res14.succeeded) {
rmbAccountData = []
res14.data.forEach((e) => {
- 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 = []
@@ -72,7 +76,11 @@ const res15: API.DataResult = await GetTenantBanks({ currency: 'USD' })
if (res15.succeeded) {
usdAccountData = []
res15.data.forEach((e) => {
- usdAccountData.push({ label: `${e.bankName}-${e.bankAccountNo}`, value: e.id, ...e })
+ usdAccountData.push({
+ label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`,
+ value: e.id,
+ ...e,
+ })
})
}
export const EditformSchema: FormSchema[] = [
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/columns.tsx b/src/views/baseinfo/infoclient/columns.tsx
index 952265a6..a5e43b43 100644
--- a/src/views/baseinfo/infoclient/columns.tsx
+++ b/src/views/baseinfo/infoclient/columns.tsx
@@ -63,12 +63,18 @@ if (res13.succeeded) {
})
}
let rmbAccountData: any = []
-const res14: API.DataResult = await GetTenantBanks({ currency: 'CNY' })
+const res14: API.DataResult = await GetTenantBanks({ currency: 'RMB' })
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,
+ })
}
})
}
@@ -78,7 +84,11 @@ 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,
+ })
}
})
}
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() {}