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/finance/feeSettlement/columns.tsx b/src/views/finance/feeSettlement/columns.tsx index 7ebdb911..60b379d9 100644 --- a/src/views/finance/feeSettlement/columns.tsx +++ b/src/views/finance/feeSettlement/columns.tsx @@ -2,15 +2,17 @@ import { BasicColumn, FormSchema } from '/@/components/Table' import { ref, } from 'vue' -import { GetClientListByCode, GetFeeCurrencySelectList,GetFeeCodeSelectList } from '/@/api/common' +import { GetClientListByCode, GetFeeCurrencySelectList, GetFeeCodeSelectList } from '/@/api/common' const feeDict = ref([]) +import { getBankList } from '/@/api/system/org' import { GetVesselSelectList, } from '/@/views/operation/seaexport/api/BookingLedger' -import { GetOrgList, ClientCommonGetStlMode, GetClientBankList,GetOrgBankList } from './api' +import { GetOrgList, ClientCommonGetStlMode, GetClientBankList, GetOrgBankList } from './api' let businessType: any = [ { value: 1, label: '海运出口' }, ] +const bankList = ref([]) import { Tag } from 'ant-design-vue' export const columns: BasicColumn[] = [ { @@ -264,12 +266,14 @@ export const detailForm: FormSchema[] = [ { field: 'id', label: '', + component: 'Input', colProps: { span: 4 }, show: false }, { field: 'mode', label: '', + component: 'Input', colProps: { span: 4 }, show: false }, @@ -316,6 +320,7 @@ export const detailForm: FormSchema[] = [ { field: 'settlementTypeId', label: '', + component: 'Input', colProps: { span: 4 }, show: false }, @@ -357,12 +362,14 @@ export const detailForm: FormSchema[] = [ { field: 'customerBankId', label: '', + component: 'Input', colProps: { span: 4 }, show: false }, { field: 'orgBankId', label: '', + component: 'Input', colProps: { span: 4 }, show: false }, @@ -370,7 +377,7 @@ export const detailForm: FormSchema[] = [ field: 'customerBankName', label: '客户银行', show: ({ values }) => { - return values.mode=='free'; + return values.mode == 'free'; }, colProps: { span: 4 }, component: 'ApiSelect', @@ -394,7 +401,7 @@ export const detailForm: FormSchema[] = [ queryCondition: JSON.stringify(queryStr), } GetClientBankList(data).then((res) => { - res.data.forEach(item=>{ + res.data.forEach(item => { item.showName = item.bankName + ' ' + item.bankAccountNo }) resolve(res) @@ -422,33 +429,20 @@ export const detailForm: FormSchema[] = [ field: 'customerAccount', label: '客户账号', show: ({ values }) => { - return values.mode=='free'; + return values.mode == 'free'; }, colProps: { span: 4 }, - dynamicDisabled:true, + dynamicDisabled: true, component: 'Input' }, { field: 'orgBankName', label: '收款账号', colProps: { span: 4 }, - component: 'ApiSelect', + component: 'Select', componentProps: ({ formModel }) => { return { - api: () => { - return new Promise((resolve) => { - GetOrgBankList().then((res) => { - res.data.forEach(item=>{ - item.showName = item.bankName + ' ' + item.bankAccountNo - }) - resolve(res) - }) - }) - }, - immediate: false, - labelField: 'showName', - valueField: 'showName', - resultField: 'data', + options:bankList.value, onChange: (e, obj) => { if (obj) { formModel.orgBankId = obj.id @@ -460,17 +454,12 @@ export const detailForm: FormSchema[] = [ } }, }, - { - field: 'relativeNO', - label: '相关号码', - colProps: { span: 4 }, - component: 'Input' - }, { field: 'saleDeptId', label: '', colProps: { span: 4 }, - show: false + show: false, + component: 'Input' }, { field: 'saleDeptName', @@ -486,19 +475,47 @@ export const detailForm: FormSchema[] = [ onChange: (e, obj) => { if (obj) { formModel.saleDeptId = obj.id + const queryobj = [{ + FieldName:'linkId', + FieldValue:obj.id, + ConditionalType:'1', + }] + const data = { + "queryCondition": JSON.stringify(queryobj), + "pageCondition": { + "pageIndex": 1, + "pageSize": 100, + "sortConditions": [] + }, + } + getBankList(data).then(res => { + res.data.forEach(item=>{ + item.label = item.bankName + ' ' + item.bankAccountNo + item.value = item.bankName + ' ' + item.bankAccountNo + }) + bankList.value = res.data + }) } if (!obj && !e) { formModel.saleDeptId = '' + bankList.value = [] } }, } }, }, + { + field: 'relativeNO', + label: '相关号码', + colProps: { span: 4 }, + component: 'Input' + }, { field: 'category', label: '', colProps: { span: 4 }, - show: false + show: false, + component: 'Input' }, { field: 'categoryText', @@ -557,7 +574,7 @@ export const markForm: FormSchema[] = [ component: 'InputTextArea', ifShow: ({ values }) => { console.log(values) - if(values.mode == '4'){ + if (values.mode == '4') { return true } else { return false @@ -1143,12 +1160,12 @@ export const freeSearchFormSchema: FormSchema[] = [ return { options: [ { - label:'应收', - value:'1' + label: '应收', + value: '1' }, { - label:'应付', - value:'2' + label: '应付', + value: '2' }, ], } diff --git a/src/views/finance/feeSettlement/detail/index.vue b/src/views/finance/feeSettlement/detail/index.vue index 9b2b7e37..ecabcdc6 100644 --- a/src/views/finance/feeSettlement/detail/index.vue +++ b/src/views/finance/feeSettlement/detail/index.vue @@ -106,6 +106,10 @@ + diff --git a/src/views/finance/feeSettlement/detail/invoiceTable.vue b/src/views/finance/feeSettlement/detail/invoiceTable.vue index 16abf7d9..e23103a7 100644 --- a/src/views/finance/feeSettlement/detail/invoiceTable.vue +++ b/src/views/finance/feeSettlement/detail/invoiceTable.vue @@ -103,6 +103,10 @@ + @@ -380,6 +384,7 @@ function addInfos() { const data = { currencyFrom: 'RMB', currencyTo: item.currency, + feeType: item.feeType } GetExchangeRate(data).then(res => { exchangarr.value.push(res.data) @@ -434,6 +439,7 @@ function addInfos() { const data = { currencyFrom: 'RMB', currencyTo: item.currency, + feeType: item.feeType } GetExchangeRate(data).then(res => { exchangarr.value.push(res.data) @@ -481,6 +487,7 @@ function addInfosFee() { const data = { currencyFrom: currency.value, currencyTo: item.currency, + feeType: item.feeType } GetExchangeRate(data).then(res => { exchangarr.value.push(res.data) diff --git a/src/views/finance/feeSettlement/index.vue b/src/views/finance/feeSettlement/index.vue index 7b9e82b4..2d4d4cc2 100644 --- a/src/views/finance/feeSettlement/index.vue +++ b/src/views/finance/feeSettlement/index.vue @@ -49,10 +49,10 @@ 新建自由结算 - + 新建发票结算 @@ -69,7 +69,7 @@ icon: 'clarity:note-edit-line', tooltip: '编辑', onClick: () => { - GoDetailed(true, record) + GoDetailed(record) }, }, ]" /> diff --git a/src/views/finance/paymentSettlement/columns.tsx b/src/views/finance/paymentSettlement/columns.tsx index 7fb207a7..fe1eab3f 100644 --- a/src/views/finance/paymentSettlement/columns.tsx +++ b/src/views/finance/paymentSettlement/columns.tsx @@ -35,7 +35,7 @@ export const columns: BasicColumn[] = [ }, { title: '结算方式', - dataIndex: 'settlementTypeName', + dataIndex: 'modeText', sorter: true, width: 80 }, diff --git a/src/views/finance/paymentSettlement/index.vue b/src/views/finance/paymentSettlement/index.vue index 4a736dd8..2abf0f60 100644 --- a/src/views/finance/paymentSettlement/index.vue +++ b/src/views/finance/paymentSettlement/index.vue @@ -22,7 +22,7 @@ class="action-divider" />
- + 新建自由结算 @@ -129,11 +129,21 @@ } // 编辑 const handleEdit = (row) => { - go(`/payment-settlement/detail?id=${row.id}`) + if(row.mode==1){ + go(`/payment-settlement/create?type=1&id=`+row.id) + } + if(row.mode==3){ + go(`/paymentSettlementFree?type=free&id=`+row.id) + } } // 新建 const create = (v) => { - go(`/payment-settlement/create?type=${v}`) + if(v==1){ + go(`/payment-settlement/create?type=${v}`) + } + if(v=='free'){ + go(`/paymentSettlementFree?type=${v}`) + } } onMounted(() => { //初始化字典选项 diff --git a/src/views/finance/paymentSettlement/paymentSettlementFree/api.js b/src/views/finance/paymentSettlement/paymentSettlementFree/api.js new file mode 100644 index 00000000..debd5bbd --- /dev/null +++ b/src/views/finance/paymentSettlement/paymentSettlementFree/api.js @@ -0,0 +1,159 @@ +import { request } from '/@/utils/request' + +// 获取列表 (Auth) +export function PaymentSettlementGetList(parameter) { + return request({ + url: '/feeApi/PaymentSettlement/GetList', + method: 'post', + data: parameter, + }) +} +export function GetOrgList() { + return request({ + url: '/mainApi/Common/GetOrgList', + method: 'get', + }) +} +export function InvoiceSettlementGetInvoiceList(parameter) { + return request({ + url: '/feeApi/InvoiceSettlement/GetInvoiceList', + method: 'post', + data: parameter, + }) +} +export function InvoiceSettlementGetInvoiceDetails(parameter) { + return request({ + url: '/feeApi/InvoiceSettlement/GetInvoiceDetails', + method: 'post', + data: parameter, + }) +} +export function InvoiceSettlementGetExchanges(parameter) { + return request({ + url: '/feeApi/InvoiceSettlement/GetExchanges', + method: 'post', + data: parameter, + }) +} + +export function GetExchangeRate(params) { + return request({ + url: '/feeApi/FeeCurrencyExchange/GetExchangeRate', + method: 'get', + params + }) +} + + +export function InvoiceSettlementSave(parameter) { + return request({ + url: '/feeApi/InvoiceSettlement/Save', + method: 'post', + data: parameter, + }) +} + +export function InvoiceSettlementGet(params) { + return request({ + url: '/feeApi/InvoiceSettlement/Get', + method: 'get', + params + }) +} + +export function ClientCommonGetStlMode(params) { + return request({ + url: '/mainApi/ClientCommon/GetStlMode', + method: 'get', + params + }) +} + +export function GetClientBankList(parameter) { + return request({ + url: '/mainApi/ClientBank/GetClientBankList', + method: 'post', + data: parameter, + }) +} + +export function PaymentSettlementDelete(parameter) { + return request({ + url: '/feeApi/PaymentSettlement/Delete', + method: 'post', + data: parameter, + }) +} + +export function GeneralInvoiceGet(params) { + return request({ + url: '/feeApi/GeneralInvoice/Get', + method: 'get', + params + }) +} + +export function PaymentSettlementSetLock(parameter) { + return request({ + url: '/feeApi/PaymentSettlement/SetLock', + method: 'post', + data: parameter, + }) +} + +export function PaymentSettlementDeleteDetail(parameter) { + return request({ + url: '/feeApi/PaymentSettlement/DeleteDetail', + method: 'post', + data: parameter, + }) +} + +export function PaymentFreeSettlementGetBizList(parameter) { + return request({ + url: '/feeApi/PaymentFreeSettlement/GetBizList', + method: 'post', + data: parameter, + }) +} + +export function PaymentFreeSettlementGetFees(parameter) { + return request({ + url: '/feeApi/PaymentFreeSettlement/GetFees', + method: 'post', + data: parameter, + }) +} + + +export function PaymentFreeSettlementSave(parameter) { + return request({ + url: '/feeApi/PaymentFreeSettlement/Save', + method: 'post', + data: parameter, + }) +} + +export function PaymentFreeSettlementGet(parameter) { + return request({ + url: '/feeApi/PaymentFreeSettlement/Get', + method: 'get', + params: parameter, + }) +} + +export function PaymentFreeSettlementGetExchangesAsync(parameter) { + return request({ + url: '/feeApi/PaymentFreeSettlement/GetCurrencies', + method: 'post', + data: parameter, + }) +} + +export function GetOrgBankList(parameter) { + return request({ + url: '/mainApi/ClientCommon/GetOrgBankList', + method: 'get', + data: parameter, + }) +} \ No newline at end of file diff --git a/src/views/finance/paymentSettlement/paymentSettlementFree/columns.tsx b/src/views/finance/paymentSettlement/paymentSettlementFree/columns.tsx new file mode 100644 index 00000000..d3232d01 --- /dev/null +++ b/src/views/finance/paymentSettlement/paymentSettlementFree/columns.tsx @@ -0,0 +1,1500 @@ +import { BasicColumn, FormSchema } from '/@/components/Table' +import { + ref, +} from 'vue' +import { GetClientListByCode, GetFeeCurrencySelectList, GetFeeCodeSelectList } from '/@/api/common' +const feeDict = ref([]) +import { getBankList } from '/@/api/system/org' +import { + GetVesselSelectList, +} from '/@/views/operation/seaexport/api/BookingLedger' +import { GetOrgList, ClientCommonGetStlMode, GetClientBankList, GetOrgBankList } from './api' +let businessType: any = [ + { value: 1, label: '海运出口' }, +] +const bankList = ref([]) +import { Tag } from 'ant-design-vue' +export const columns: BasicColumn[] = [ + { + title: '结算单号', + dataIndex: 'applicationNO', + width: 100, + }, + { + title: '状态', + dataIndex: 'isLocked', + width: 100, + }, + { + title: '结算单位', + dataIndex: 'customerName', + width: 100, + }, + { + title: '结算类别', + dataIndex: 'billType', + sorter: true, + width: 80, + customRender: ({ text }) => { + if (text === 1) { + return '收费' + } else if (text === 2) { + return '付费' + } + return text + } + }, + { + title: '结算方式', + dataIndex: 'modeText', + width: 100, + }, + { + title: '币别', + dataIndex: 'currency', + width: 100, + }, + { + title: 'RMB', + dataIndex: 'rmbAmount', + width: 100, + }, + { + title: 'USD', + dataIndex: 'usdAmount', + width: 100, + }, + { + title: '其他币别', + dataIndex: 'otherAmount', + width: 100, + }, + { + title: '未开票', + dataIndex: 'unInvoiceAmount', + width: 100, + }, + { + title: '结算日期', + dataIndex: 'settlementDate', + width: 100, + }, + { + title: '结算人', + dataIndex: 'createByName', + width: 100, + }, + { + title: '结算账户', + dataIndex: 'customerAccount', + width: 100, + }, + { + title: '银行账户', + dataIndex: 'customerBank', + width: 100, + }, + { + title: '是否导出凭证', + dataIndex: 'isExportVoucher', + width: 100, + }, + { + title: '禁止生成凭证', + dataIndex: 'isVoucherDisabled', + width: 100, + }, + { + title: '备注', + dataIndex: 'note', + width: 100, + }, + { + title: '发票号', + dataIndex: 'invoiceNO', + width: 100, + }, + { + title: '相关号码', + dataIndex: 'relativeNO', + width: 100, + }, + { + title: '原始金额', + dataIndex: 'originalAmount', + width: 100, + }, + { + title: '总账凭证号', + dataIndex: 'ledgerVoucherNO', + width: 100, + }, + { + title: '所属分部', + dataIndex: 'saleDeptName', + width: 100, + }, + { + title: '记账资料', + dataIndex: 'accountAmount', + width: 100, + }, + { + title: '预收支资料', + dataIndex: 'advanceAmount', + width: 100, + }, + { + title: '实收支资料', + dataIndex: 'ahsrAmount', + width: 100, + }, + { + title: '财务费用', + dataIndex: 'financialAmount', + width: 100, + }, + { + title: '预收支取用资料', + dataIndex: 'advanceAmount', + width: 100, + }, + { + title: '创建日期', + dataIndex: 'createTime', + width: 100, + }, + { + title: '申请单号', + dataIndex: 'applicationNO2', + width: 100, + }, + { + title: '发票申请单号', + dataIndex: 'applicationNO1', + width: 100, + }, + { + title: '结算单位银行', + dataIndex: 'customerBank', + width: 100, + }, + { + title: '结算单位账户', + dataIndex: 'customerAccount', + width: 100, + }, + { + title: '锁定时间', + dataIndex: 'lockTime', + width: 100, + }, + { + title: '锁定人', + dataIndex: 'lockUser', + width: 100, + }, + { + title: '撤销锁定时间', + dataIndex: 'unlockTime', + width: 100, + }, + { + title: '撤销锁定人', + dataIndex: 'unlockUser', + width: 100, + }, +] + +export const searchFormSchema: FormSchema[] = [ + { + field: 'billType', + label: '', + colProps: { span: 4 }, + component: 'Input', + show: false, + defaultValue: 1 + }, + { + field: 'settlementNO', + label: '结算单号', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'customerId', + label: '结算单位', + component: 'ApiSelect', + colProps: { span: 4 }, + componentProps: () => { + return { + api: GetClientListByCode, + labelField: 'pinYinCode', + valueField: 'shortName', + showName: 'shortName', + resultField: 'data', + immediate: false + } + } + }, + { + field: 'applicationNO', + label: '申请单号', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'ledgerVoucherNO', + label: '总账凭证号', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'settlementDate', + label: '结算日期', + component: 'DatePicker', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: { + allowClear: true + } + }, +] + +export const detailForm: FormSchema[] = [ + { + field: 'id', + label: '', + component: 'Input', + colProps: { span: 4 }, + show: false + }, + { + field: 'mode', + label: '', + component: 'Input', + colProps: { span: 4 }, + show: false + }, + { + field: 'customerId', + label: '', + colProps: { span: 4 }, + show: false, + component: 'Input' + }, + { + field: 'customerName', + label: '结算单位', + colProps: { span: 4 }, + dynamicDisabled: true, + component: 'Input' + }, + { + field: 'settlementDate', + label: '结算日期', + colProps: { span: 4 }, + component: 'DatePicker', + componentProps: { + showTime: true, + allowClear: true, + valueFormat: 'YYYY-MM-DD HH:00', + format: 'YYYY-MM-DD HH:00', + }, + }, + { + field: 'createByName', + label: '结算人', + colProps: { span: 4 }, + dynamicDisabled: true, + component: 'Input' + }, + { + field: 'currencyAmount', + label: '币别/金额', + colProps: { span: 4 }, + dynamicDisabled: true, + component: 'Input' + }, + { + field: 'settlementTypeId', + label: '', + component: 'Input', + colProps: { span: 4 }, + show: false + }, + { + field: 'settlementTypeName', + label: '结算方式', + colProps: { span: 4 }, + component: 'ApiSelect', + componentProps: ({ formModel }) => { + return { + api: ClientCommonGetStlMode, + resultField: 'data', + labelField: 'stlName', + valueField: 'stlName', + onChange: (e, obj) => { + if (obj) { + formModel.settlementTypeId = obj.id + } + if (!obj && !e) { + formModel.settlementTypeId = '' + } + }, + } + }, + }, + { + field: 'exchangeRate', + label: '汇率', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'line2', + component: 'Divider', + colProps: { + span: 24 + } + }, + { + field: 'customerBankId', + label: '', + component: 'Input', + colProps: { span: 4 }, + show: false + }, + { + field: 'orgBankId', + label: '', + component: 'Input', + colProps: { span: 4 }, + show: false + }, + { + field: 'customerBankName', + label: '客户银行', + show: ({ values }) => { + return values.mode == 'free'; + }, + colProps: { span: 4 }, + component: 'ApiSelect', + componentProps: ({ formModel }) => { + return { + api: () => { + return new Promise((resolve) => { + const queryStr = [ + { + FieldName: 'ClientId', + FieldValue: formModel.customerId, + ConditionalType: '0', + }, + ] + const data = { + pageCondition: { + pageIndex: 1, + pageSize: 20, + sortConditions: [], + }, + queryCondition: JSON.stringify(queryStr), + } + GetClientBankList(data).then((res) => { + res.data.forEach(item => { + item.showName = item.bankName + ' ' + item.bankAccountNo + }) + resolve(res) + }) + }) + }, + immediate: false, + labelField: 'showName', + valueField: 'bankName', + resultField: 'data', + onChange: (e, obj) => { + if (obj) { + formModel.customerBankId = obj.id + formModel.customerAccount = obj.bankAccountNo + } + if (!obj && !e) { + formModel.customerBankId = '' + formModel.customerAccount = '' + } + }, + } + }, + }, + { + field: 'customerAccount', + label: '客户账号', + show: ({ values }) => { + return values.mode == 'free'; + }, + colProps: { span: 4 }, + dynamicDisabled: true, + component: 'Input' + }, + { + field: 'orgBankName', + label: '收款账号', + colProps: { span: 4 }, + component: 'Select', + componentProps: ({ formModel }) => { + return { + options:bankList.value, + onChange: (e, obj) => { + if (obj) { + formModel.orgBankId = obj.id + } + if (!obj && !e) { + formModel.orgBankId = '' + } + }, + } + }, + }, + { + field: 'saleDeptId', + label: '', + colProps: { span: 4 }, + show: false, + component: 'Input' + }, + { + field: 'saleDeptName', + label: '所属分部', + colProps: { span: 4 }, + component: 'ApiSelect', + componentProps: ({ formModel }) => { + return { + api: GetOrgList, + resultField: 'data', + labelField: 'label', + valueField: 'label', + onChange: (e, obj) => { + if (obj) { + formModel.saleDeptId = obj.id + const queryobj = [{ + FieldName:'linkId', + FieldValue:obj.id, + ConditionalType:'1', + }] + const data = { + "queryCondition": JSON.stringify(queryobj), + "pageCondition": { + "pageIndex": 1, + "pageSize": 100, + "sortConditions": [] + }, + } + getBankList(data).then(res => { + res.data.forEach(item=>{ + item.label = item.bankName + ' ' + item.bankAccountNo + item.value = item.bankName + ' ' + item.bankAccountNo + }) + bankList.value = res.data + }) + } + if (!obj && !e) { + formModel.saleDeptId = '' + bankList.value = [] + } + }, + } + }, + }, + { + field: 'relativeNO', + label: '相关号码', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'category', + label: '', + colProps: { span: 4 }, + show: false, + component: 'Input' + }, + { + field: 'categoryText', + label: '业务类别', + colProps: { span: 4 }, + component: 'Select', + componentProps: ({ formModel }) => { + return { + options: [ + { + label: '货运收入', + value: '1' + }, + { + label: '利息收入', + value: '2' + }, + ], + onChange: (e, obj) => { + if (obj) { + formModel.category = obj.value + } + if (!obj && !e) { + formModel.category = '' + } + }, + } + }, + }, + { + field: 'ledgerVoucherNO', + label: '总账凭证号', + colProps: { span: 4 }, + component: 'Input' + }, +] + +export const markForm: FormSchema[] = [ + { + field: 'mode', + label: '', + colProps: { span: 4 }, + show: false + }, + { + field: 'line3', + component: 'Divider', + colProps: { + span: 24 + } + }, + { + field: 'voucherRemark', + label: '凭证备注', + colProps: { span: 8 }, + component: 'InputTextArea', + ifShow: ({ values }) => { + console.log(values) + if (values.mode == '4') { + return true + } else { + return false + } + }, + }, + { + field: 'note', + label: '备注', + colProps: { span: 8 }, + component: 'InputTextArea' + }, + { + field: 'line2', + component: 'Divider', + colProps: { + span: 24 + } + }, +] + +export const invoiceColum: BasicColumn[] = [ + { + title: '发票业务编号', + dataIndex: 'billNO', + width: 100, + }, + { + title: '发票号', + dataIndex: 'invoiceNO', + width: 100, + }, + { + title: '发票申请单号', + dataIndex: 'applicationNO', + width: 100, + }, + { + title: '开票单位', + dataIndex: 'customerName', + width: 100, + }, + { + title: '币别', + dataIndex: 'originalCurrency', + width: 100, + }, + { + title: '结算金额', + dataIndex: 'settlementAmount', + width: 100, + }, + { + title: '开票金额', + dataIndex: 'invoiceAmount', + width: 100, + }, + { + title: 'RMB申请金额', + dataIndex: 'rmbApplyAmount', + width: 100, + }, + { + title: 'USD申请金额', + dataIndex: 'usdApplyAmount', + width: 100, + }, + { + title: '发票抬头', + dataIndex: 'invoiceHeader', + width: 100, + }, + { + title: '开票日期', + dataIndex: 'invoiceDate', + width: 100, + }, +] + +export const invoiceDetailColum: BasicColumn[] = [ + { + title: '委托编号', + dataIndex: 'customerNo', + width: 100, + }, + { + title: '主提单号', + dataIndex: 'mblno', + width: 100, + }, + { + title: '委托单位', + dataIndex: 'clientName', + width: 100, + }, + { + title: '开船日期', + dataIndex: 'etd', + width: 100, + }, + { + title: '业务来源', + dataIndex: 'sourceName', + width: 100, + }, + { + title: '费用名称', + dataIndex: 'feeName', + width: 100, + }, + { + title: '收付', + dataIndex: 'feeType', + width: 100, + }, + { + title: '结算金额', + dataIndex: 'settlementAmount', + width: 100, + }, + { + title: '原始币别', + dataIndex: 'originalCurrency', + width: 100, + }, + { + title: '原始汇率', + dataIndex: 'originalRate', + width: 100, + }, + { + title: '折算汇率', + dataIndex: 'exchangeRate', + width: 100, + }, + { + title: '发票折算汇率', + dataIndex: 'applicationNO', + width: 100, + }, + { + title: '原始金额', + dataIndex: 'originalAmount', + width: 100, + }, + { + title: '揽货人', + dataIndex: 'saleName', + width: 100, + }, + { + title: '录入方式', + dataIndex: 'inputMethod', + width: 100, + }, + { + title: '会计期间', + dataIndex: 'accountDate', + width: 100, + }, + { + title: '更改单', + dataIndex: 'changeOrder', + width: 100, + }, +] + +export const invoiceTableColums: BasicColumn[] = [ + { + title: '发票类别', + dataIndex: 'category', + width: 100, + }, + { + title: '发票锁定', + dataIndex: 'isLocked', + width: 80, + }, + { + title: '发票业务编号', + dataIndex: 'billNO', + width: 100, + }, + { + title: '开票单位', + dataIndex: 'customerName', + width: 100, + }, + { + title: '币别', + dataIndex: 'currency', + width: 60, + }, + { + title: '开票金额', + dataIndex: 'invoiceAmount', + width: 80, + }, + { + title: '申请金额', + dataIndex: 'applyAmount', + width: 80, + }, + { + title: '未结金额', + dataIndex: 'unsettledAmountText', + width: 100, + }, + { + title: '本次结算金额', + dataIndex: 'originalCurrency', + width: 100, + }, + { + title: '原币金额', + dataIndex: 'originalAmountText', + width: 100, + }, + { + title: '发票抬头', + dataIndex: 'invoiceHeader', + width: 100, + }, + { + title: '开票日期', + dataIndex: 'invoiceDate', + width: 100, + }, + { + title: '开票人', + dataIndex: 'operatorName', + width: 100, + }, + { + title: '所属分部', + dataIndex: 'saleDeptName', + width: 100, + }, + { + title: '备注', + dataIndex: 'note', + width: 100, + }, + { + title: '发票类型', + dataIndex: 'modeText', + width: 100, + }, + { + title: '发票税率', + dataIndex: 'taxRate', + width: 100, + }, + + + +] + +export const invoiceSearchFormSchema: FormSchema[] = [ + { + field: 'customerId', + label: '开票单位', + component: 'ApiSelect', + colProps: { span: 6 }, + componentProps: () => { + return { + api: GetClientListByCode, + labelField: 'pinYinCode', + valueField: 'id', + showName: 'shortName', + resultField: 'data', + immediate: true + } + } + }, + { + field: 'billNO', + label: '编号检索', + colProps: { span: 6 }, + component: 'Input' + }, + { + field: 'invoiceHeader', + label: '发票抬头', + colProps: { span: 6 }, + component: 'Input' + }, + { + field: 'currency', + label: '币别', + colProps: { span: 6 }, + component: 'ApiSelect', + componentProps: () => { + return { + api: GetFeeCurrencySelectList, + labelField: 'codeName', + valueField: 'codeName', + resultField: 'data' + } + } + }, + { + field: 'invoiceDate', + label: '开票日期', + component: 'DatePicker', + required: false, + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: { + allowClear: true + } + }, + { + field: 'saleDeptId', + label: '所属分部', + component: 'ApiSelect', + colProps: { span: 6 }, + componentProps: () => { + return { + api: GetOrgList, + resultField: 'data', + labelField: 'label', + valueField: 'label', + } + } + }, +] + +export const invoiceTableDetailColums: BasicColumn[] = [ + { + title: '委托编号', + dataIndex: 'customerNo', + width: 100, + }, + { + title: '主提单号', + dataIndex: 'mblno', + width: 100, + }, + { + title: '委托单位', + dataIndex: 'clientName', + width: 100, + }, + { + title: '开船日期', + dataIndex: 'etd', + width: 100, + }, + { + title: '业务来源', + dataIndex: 'sourceName', + width: 100, + }, + { + title: '费用名称', + dataIndex: 'feeName', + width: 100, + }, + { + title: '收付', + dataIndex: 'feeType', + width: 100, + }, + { + title: '申请金额', + dataIndex: 'applyAmount', + width: 100, + }, + { + title: '结算金额', + dataIndex: 'orderSettlementAmount', + width: 100, + }, + { + title: '原始币别', + dataIndex: 'originalCurrency', + width: 100, + }, + { + title: '原始金额', + dataIndex: 'originalAmount', + width: 100, + }, + { + title: '揽货人', + dataIndex: 'saleName', + width: 100, + }, +] + +export const freeTableColums: BasicColumn[] = [ + { + title: '委托编号', + dataIndex: 'customerNo', + width: 100, + }, + { + title: '主提单号', + dataIndex: 'mblno', + width: 100, + }, + { + title: '委托单位', + dataIndex: 'clientName', + width: 100, + }, + { + title: '结费单位', + dataIndex: 'customerName', + width: 100, + }, + { + title: 'RMB未收', + dataIndex: 'unchargedRMB', + width: 100, + }, + { + title: 'USD未收', + dataIndex: 'unchargedUSD', + width: 100, + }, + { + title: '其他未收', + dataIndex: 'unchargedOther', + width: 100, + }, + { + title: 'RMB收未开票', + dataIndex: 'unpaidInvoiceRMB', + width: 100, + }, + { + title: 'USD收未开票', + dataIndex: 'unpaidInvoiceUSD', + width: 100, + }, + { + title: 'RMB未付', + dataIndex: 'unpaidRMB', + width: 100, + }, + { + title: 'USD未付', + dataIndex: 'unpaidUSD', + width: 100, + }, + { + title: '其他未付', + dataIndex: 'unpaidOther', + width: 100, + }, + { + title: '业务类别', + dataIndex: 'businessType', + width: 100, + }, + { + title: '开船日期', + dataIndex: 'etd', + width: 100, + }, + { + title: '报关单号', + dataIndex: 'customNo', + width: 100, + }, + { + title: '订舱编号', + dataIndex: 'bookingNo', + width: 100, + }, + { + title: '经营单位', + dataIndex: 'enterprise', + width: 100, + }, + { + title: '揽货人', + dataIndex: 'operator', + width: 100, + }, + { + title: '会计期间', + dataIndex: 'accountDate', + width: 100, + }, + { + title: '操作', + dataIndex: 'operator', + width: 100, + }, + { + title: '录入人', + dataIndex: 'createByName', + width: 100, + }, + { + title: '起运港', + dataIndex: 'loadPort', + width: 100, + }, + { + title: '目的港', + dataIndex: 'dischargePort', + width: 100, + }, + { + title: '船 名', + dataIndex: 'vessel', + width: 100, + }, + { + title: '航次', + dataIndex: 'voyage', + width: 100, + }, + { + title: '更改单', + dataIndex: 'changeOrder', + width: 100, + }, + { + title: '备注', + dataIndex: 'note', + width: 100, + }, + { + title: '分提单号', + dataIndex: 'hblno', + width: 100, + }, + { + title: '所属分部', + dataIndex: 'saleDeptName', + width: 100, + }, +] + +export const freeSearchFormSchema: FormSchema[] = [ + { + label: '费用对象', + field: 'customerId', + component: 'ApiSelect', + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: () => { + return { + api: GetClientListByCode, + labelField: 'pinYinCode', + showName: 'shortName', + valueField: 'id', + resultField: 'data', + immediate: false + } + } + }, + { + field: 'mblno:hblno:bookingNO:customerNo', + label: '编号检索', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'businessDate', + label: '业务日期', + component: 'DatePicker', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: { + allowClear: true + } + }, + { + field: 'feeType', + label: '收/付', + component: 'Select', + required: true, + colProps: { span: 4 }, + defaultValue: '2', + componentProps: () => { + return { + options: [ + { + label: '应收', + value: '1' + }, + { + label: '应付', + value: '2' + }, + ], + } + }, + }, + { + label: '费用名称', + field: 'feeName', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: () => { + return { + api: () => { + return new Promise((resolve) => { + GetFeeCodeSelectList().then((res) => { + res.data.forEach((item) => { + item.label = item.code + '-' + item.name + }) + resolve(res) + }) + }) + }, + immediate: false, + valueField: 'id', + resultField: 'data', + // mode: 'multiple', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, + }, + { + field: 'businessType', + label: '业务类型', + component: 'Select', + colProps: { span: 4 }, + componentProps: () => { + return { + options: businessType, + } + }, + }, + { + field: 'invoiceNO', + label: '发票号', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'currency', + label: '币别', + colProps: { span: 4 }, + component: 'ApiSelect', + componentProps: () => { + return { + api: GetFeeCurrencySelectList, + labelField: 'codeName', + valueField: 'codeName', + resultField: 'data' + } + } + }, + { + field: 'debitNo', + label: '对账编号', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'accountDate', + label: '会计期间', + component: 'DatePicker', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: { + allowClear: true + } + }, + { + label: '船名', + field: 'vesselId', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: () => { + return { + api: GetVesselSelectList, + immediate: false, + labelField: 'vesselName', + valueField: 'id', + resultField: 'data' + } + } + }, + { + field: 'voyage', + label: '航次', + colProps: { span: 4 }, + component: 'Input' + }, + { + label: '核算单位', + field: 'enterprise', + component: 'ApiSelect', + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: () => { + return { + api: GetClientListByCode, + labelField: 'pinYinCode', + showName: 'shortName', + valueField: 'id', + resultField: 'data', + immediate: false + } + } + }, +] + +export const freeTableDetailColums: BasicColumn[] = [ + { + title: '客户名称', + dataIndex: 'customerName', + width: 100, + }, + { + title: '收付', + dataIndex: 'feeType', + width: 100, + }, + { + title: '费用名称', + dataIndex: 'feeName', + width: 100, + }, + { + title: '金额', + dataIndex: 'totalAmount', + width: 100, + }, + { + title: '币别', + dataIndex: 'currency', + width: 100, + }, + { + title: '未结金额', + dataIndex: 'restAmount', + width: 100, + }, + { + title: '本次结算金额', + dataIndex: 'amount', + width: 100, + }, + { + title: '原始汇率', + dataIndex: 'originalRate', + width: 100, + }, + { + title: '开票金额', + dataIndex: 'invoiceAmount', + width: 100, + }, + { + title: '发票号', + dataIndex: 'invoiceNO', + width: 100, + }, + { + title: '备注', + dataIndex: 'remark', + width: 100, + }, + { + title: '录入方式', + dataIndex: 'inputMethod', + width: 100, + }, +] + +export const freeColum: BasicColumn[] = [ + { + title: '委托编号', + dataIndex: 'customerNo', + width: 100, + }, + { + title: '主提单号', + dataIndex: 'mblno', + width: 100, + }, + { + title: '分提单号', + dataIndex: 'hblno', + width: 100, + }, + { + title: '委托单位', + dataIndex: 'clientName', + width: 100, + }, + { + title: '开船日期', + dataIndex: 'etd', + width: 100, + }, + { + title: '业务来源', + dataIndex: 'sourceName', + width: 100, + }, + { + title: '费用名称', + dataIndex: 'feeName', + width: 100, + }, + { + title: '收付', + dataIndex: 'feeType', + width: 100, + }, + { + title: '费用对象', + dataIndex: 'customerName', + width: 100, + }, + { + title: '结算金额', + dataIndex: 'settlementAmount', + width: 100, + }, + { + title: '原始币别', + dataIndex: 'originalCurrency', + width: 100, + }, + { + title: '原始汇率', + dataIndex: 'originalRate', + width: 100, + }, + { + title: '折算汇率', + dataIndex: 'exchangeRate', + width: 100, + }, + { + title: '原始金额', + dataIndex: 'originalAmount', + width: 100, + }, + { + title: '揽货人', + dataIndex: 'saleName', + width: 100, + }, + { + title: '经营单位', + dataIndex: 'enterprise', + width: 100, + }, + { + title: '报关单号', + dataIndex: 'customNo', + width: 100, + }, + { + title: '会计期间', + dataIndex: 'accountDate', + width: 100, + }, + { + title: '更改单', + dataIndex: 'changeOrder', + width: 100, + }, + { + title: '备注', + dataIndex: 'note', + width: 100, + }, + { + title: '录入方式', + dataIndex: 'inputMethod', + width: 100, + }, + { + title: '所属分部', + dataIndex: 'saleDeptName', + width: 100, + }, + { + title: '船名', + dataIndex: 'changeOrder', + width: 100, + }, + { + title: '航次', + dataIndex: 'vesselName', + width: 100, + }, + { + title: '船公司', + dataIndex: 'carrierName', + width: 100, + }, +] + +export const freeDetailColum: BasicColumn[] = [ + { + title: '收付', + dataIndex: 'feeType', + width: 100, + }, + { + title: '币别', + dataIndex: 'currency', + width: 100, + }, + { + title: '金额', + dataIndex: 'amount', + width: 100, + }, +] \ No newline at end of file diff --git a/src/views/finance/paymentSettlement/paymentSettlementFree/index.vue b/src/views/finance/paymentSettlement/paymentSettlementFree/index.vue new file mode 100644 index 00000000..b4984094 --- /dev/null +++ b/src/views/finance/paymentSettlement/paymentSettlementFree/index.vue @@ -0,0 +1,555 @@ + + + + \ No newline at end of file diff --git a/src/views/finance/paymentSettlement/paymentSettlementFree/invoiceTable.vue b/src/views/finance/paymentSettlement/paymentSettlementFree/invoiceTable.vue new file mode 100644 index 00000000..a4e3b478 --- /dev/null +++ b/src/views/finance/paymentSettlement/paymentSettlementFree/invoiceTable.vue @@ -0,0 +1,677 @@ + + + + + \ No newline at end of file diff --git a/src/views/operation/invoiceApply/columns.tsx b/src/views/operation/invoiceApply/columns.tsx index 18c4f3c8..7092d793 100644 --- a/src/views/operation/invoiceApply/columns.tsx +++ b/src/views/operation/invoiceApply/columns.tsx @@ -31,11 +31,12 @@ const CategoryData = [ const bankList = ref([]) as any const customerList = ref([]) as any import { - GetControllerClientList,GetCustomerServiceList + GetCustomerServiceList } from '/@/views/operation/seaexport/api/BookingLedger' + import { GetClientBankList, GetOrgList } from './api' -import { GetFeeCurrencySelectList,GetFeeCodeSelectList,GetClientListByCode } from '/@/api/common' +import { GetFeeCurrencySelectList,GetFeeCodeSelectList,GetClientListByCode,GetControllerClientList } from '/@/api/common' export const searchFormSchema: FormSchema[] = [ { field: 'applicationNO', @@ -270,6 +271,12 @@ export const detailColumns: BasicColumn[] = [ width: 100, align: 'left', }, + { + title: '主提单号', + dataIndex: 'mblno', + width: 100, + align: 'left', + }, { title: '订舱编号', dataIndex: 'bookingNO', @@ -387,6 +394,12 @@ export const detailColumns: BasicColumn[] = [ ] export const detailSearchFormSchema: FormSchema[] = [ + { + field: 'number', + label: '编号', + component: 'Input', + colProps: { span: 4 }, + }, { label: '', field: 'customerId', @@ -450,6 +463,7 @@ export const detailSearchFormSchema: FormSchema[] = [ label: '收付', component: 'Select', colProps: { span: 4 }, + defaultValue: '1', componentProps: { options: [ { diff --git a/src/views/operation/invoiceApply/detail/InvoiceDetails.vue b/src/views/operation/invoiceApply/detail/InvoiceDetails.vue index 7d8a1cd1..6c8b39a3 100644 --- a/src/views/operation/invoiceApply/detail/InvoiceDetails.vue +++ b/src/views/operation/invoiceApply/detail/InvoiceDetails.vue @@ -203,8 +203,27 @@ const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, ge }, beforeFetch: (p) => { const data = formatParams(p) - data.otherQueryCondition = getForm().getFieldsValue().FeeRange + data.otherQueryCondition = {} + if (getForm().getFieldsValue().FeeRange) { + data.otherQueryCondition.FeeRange = getForm().getFieldsValue().FeeRange + } + if (getForm().getFieldsValue().number) { + data.otherQueryCondition.number = getForm().getFieldsValue().number + } queryData.value = JSON.parse(JSON.stringify(formatParams(p))) + let queryData1 = [] as any + if(formatParams(p).queryCondition){ + queryData1 = JSON.parse(formatParams(p).queryCondition) + } + let i = queryData1.length + while (i--) { + if (queryData1[i].FieldName === 'number') { + queryData1.splice(i, 1) + } else if (queryData1[i].FieldName === 'FeeRange') { + queryData1.splice(i, 1) + } + } + data.queryCondition = JSON.stringify(queryData1) return data }, columns: detailColumns, @@ -281,7 +300,7 @@ function changeApply() { const data = { currencyFrom: 'RMB', currencyTo: item.currency, - feeType: item.feeType + feeType: 1 } GetExchangeRate(data).then(res => { exchangeData.value.push(res.data) @@ -573,9 +592,9 @@ function addDetailed() { customerId: item.customerId }) }) - const queryDataStr = JSON.parse(queryData.value.queryCondition) + const queryDataStr1 = JSON.parse(queryData.value.queryCondition) const arr = [] as any - queryDataStr.forEach(item => { + queryDataStr1.forEach(item => { if (item.FieldName == 'feeType') { arr.push(item) } @@ -619,6 +638,7 @@ function addDetailed() { const data = { currencyFrom: 'RMB', currencyTo: item.currency, + feeType: 1 } GetExchangeRate(data).then(res => { exchangeData.value.push(res.data) diff --git a/src/views/operation/invoiceApply/detail/index.vue b/src/views/operation/invoiceApply/detail/index.vue index 272cdef8..eda395e3 100644 --- a/src/views/operation/invoiceApply/detail/index.vue +++ b/src/views/operation/invoiceApply/detail/index.vue @@ -63,11 +63,11 @@ -
+
{{ form.statusText }}
-
+
{{ form.statusText }}
@@ -163,7 +163,7 @@ {{ item.name - }} + }} @@ -219,7 +219,7 @@ const form = ref({ invoiceNO: '', category: 0, statusText: '未提交', - status:0, + status: 0, applicationNO: '', isRMB: false, isYB: false @@ -293,9 +293,17 @@ const bankForm = [ onChange: (e, obj) => { if (obj) { formModel.customerBankId = obj.id + setFieldsValue({ + invoiceHeader: obj.invoiceHeader, + customerAddTel: obj.invoiceAddress + ' ' + obj.invoiceTel + }) } if (!obj && !e) { formModel.customerBankId = '' + setFieldsValue({ + invoiceHeader: '', + customerAddTel: '' + }) } }, } @@ -511,14 +519,14 @@ const bottomForm = [ customerBankId: res.data[0].id, customerBankName: res.data[0].name, }) - if (res.data[0].invoiceHeaders.length > 0) { + if (res.data[0].invoiceHeader) { setFieldsValue({ - invoiceHeader: res.data[0].invoiceHeaders[0].header, - customerAddTel: res.data[0].invoiceHeaders[0].addressTel + invoiceHeader: res.data[0].invoiceHeader, + customerAddTel: res.data[0].invoiceAddress + ' ' + res.data[0].invoiceTel }) } else { setFieldsValue({ - invoiceHeaders: '', + invoiceHeader: '', customerAddTel: '' }) } @@ -526,7 +534,7 @@ const bottomForm = [ setFieldsValue({ customerBankId: '', customerBankName: '', - invoiceHeaders: '', + invoiceHeader: '', customerAddTel: '' }) } @@ -648,7 +656,6 @@ const bottomFormEdit = [ { label: '客户名称', field: 'customerName', - required: true, component: 'DEdit', colProps: { span: 4 }, componentProps: (e) => { @@ -886,7 +893,7 @@ function handleWithdraw() { } else { loading.value = false } - }).catch(()=>{ + }).catch(() => { loading.value = false }) } @@ -1023,14 +1030,14 @@ function changeCust(id, name) { customerBankId: res.data[0].id, customerBankName: res.data[0].name, }) - if (res.data[0].invoiceHeaders && res.data[0].invoiceHeaders.length > 0) { + if (res.data[0].invoiceHeader) { setFieldsValue({ - invoiceHeader: res.data[0].invoiceHeaders[0].header, - customerAddTel: res.data[0].invoiceHeaders[0].addressTel + invoiceHeader: res.data[0].invoiceHeader, + customerAddTel: res.data[0].invoiceAddress + ' ' + res.data[0].invoiceTel }) } else { setFieldsValue({ - invoiceHeaders: '', + invoiceHeader: '', customerAddTel: '' }) } @@ -1038,7 +1045,7 @@ function changeCust(id, name) { setFieldsValue({ customerBankId: '', customerBankName: '', - invoiceHeaders: '', + invoiceHeader: '', customerAddTel: '' }) } @@ -1325,7 +1332,8 @@ function handleSelect(value) { /deep/ .ant-checkbox-wrapper-checked .ant-checkbox-disabled+span { color: #257afa; } -.orange{ + +.orange { color: #ffa500; } diff --git a/src/views/operation/invoiceIssue/api.js b/src/views/operation/invoiceIssue/api.js index c850acb9..0baf6591 100644 --- a/src/views/operation/invoiceIssue/api.js +++ b/src/views/operation/invoiceIssue/api.js @@ -190,4 +190,19 @@ export function GetClientBankList(parameter) { method: 'post', data: parameter, }) +} + +export function Reverse(parameter) { + return request({ + url: '/feeApi/GeneralInvoice/Reverse', + method: 'post', + data: parameter, + }) +} +export function ApiQuery(parameter) { + return request({ + url: '/feeApi/GeneralInvoice/ApiQuery', + method: 'post', + params: parameter, + }) } \ No newline at end of file diff --git a/src/views/operation/invoiceIssue/detail/applyInvoice.vue b/src/views/operation/invoiceIssue/detail/applyInvoice.vue index cf085c11..c6900e6b 100644 --- a/src/views/operation/invoiceIssue/detail/applyInvoice.vue +++ b/src/views/operation/invoiceIssue/detail/applyInvoice.vue @@ -461,6 +461,7 @@ function addDetailFree() { const data = { currencyFrom: 'RMB', currencyTo: item.currency, + feeType: 1 } GetExchangeRate(data).then(res => { exchangarr.value.push(res.data) @@ -744,6 +745,7 @@ function addDetailed() { const data = { currencyFrom: 'RMB', currencyTo: item.currency, + feeType: 1 } GetExchangeRate(data).then(res => { exchangarr.value.push(res.data) diff --git a/src/views/operation/invoiceIssue/detail/index.vue b/src/views/operation/invoiceIssue/detail/index.vue index 8030df45..1e4e57db 100644 --- a/src/views/operation/invoiceIssue/detail/index.vue +++ b/src/views/operation/invoiceIssue/detail/index.vue @@ -63,17 +63,17 @@ 开票 - + 冲红 - + + 查看发票 - 手动登记 + 手动登记
@@ -280,11 +280,11 @@
-
+
@@ -380,6 +380,30 @@ + + + + + + 直接冲红 + 开票有误 + 销货退回 + 服务中止 + 销售折让 + + + + + 销方 + 购方 + + + + + + + + @@ -391,8 +415,8 @@ import applyInvoice from './applyInvoice.vue' import invoiceFile from './invoiceFile.vue' import { DownOutlined } from '@ant-design/icons-vue' import { - GetInvoiceCodeList, GetUserListAll, DeleteInvoiceDetail, - GeneralInvoiceSave, GeneralInvoiceGet, FreeInvoiceSave, + GetInvoiceCodeList, GetUserListAll, DeleteInvoiceDetail,ApiQuery, + GeneralInvoiceSave, GeneralInvoiceGet, FreeInvoiceSave, Reverse, GeneralInvoiceGetList, GeneralInvoiceInitiate, GetClientBankList } from '../api' import { useMessage } from '/@/hooks/web/useMessage' @@ -418,7 +442,7 @@ defineComponent({ HotTable, }) registerAllModules() - +const redForm = ref({}) as any const detailForm = [ { field: 'divider-selects', @@ -648,6 +672,10 @@ const applyInvoiceRef = ref(null) as any function open() { applyInvoiceRef.value.init() } +const redFlag = ref(false) +function openRed() { + redFlag.value = true +} function handleSelectAccount(val) { accountList.value.forEach(item => { if (item.bankName == val) { @@ -788,12 +816,28 @@ const handFlag = ref(false) function openHand() { handFlag.value = true } +function lookInvoice(){ + loading.value = true + ApiQuery({id:route.query.id}).then(res=>{ + if(res.succeeded){ + if(res.data[0].pdfUrl){ + window.open(res.data[0].pdfUrl) + } else { + createMessage.warning('开票中') + } + } + loading.value = false + }).catch(()=>{ + loading.value = false + }) +} const invoiceFileRef = ref('') function openFile() { invoiceFileRef.value.init() } const router = useRouter() const go = useGo() +const redloading = ref(false) // 自由开票左边 发票开出整体逻辑和发票申请差不多 按费用开需要将原始币别 原始金额处理(如果不是rmb) 按业务开就是处理好汇率就行 function updateListFreeLeft(val) { const data = { @@ -826,6 +870,24 @@ function updateListFreeLeft(val) { loading.value = false }) } +function sureRed() { + const data = { + invoiceId: route.query.id, + orderNo: form.value.billNO, + ...redForm.value + } + redloading.value = true + Reverse(data).then(res => { + if (res.succeeded) { + createMessage.success('操作成功') + redFlag.value = false + getDetail() + } + redloading.value = false + }).catch(() => { + redloading.value = false + }) +} // 申请开票 function handleUpdate(val) { const data = { diff --git a/src/views/operation/invoiceIssue/index.vue b/src/views/operation/invoiceIssue/index.vue index 11a77141..bb6fff28 100644 --- a/src/views/operation/invoiceIssue/index.vue +++ b/src/views/operation/invoiceIssue/index.vue @@ -72,7 +72,7 @@ icon: 'clarity:note-edit-line', tooltip: '编辑', onClick: () => { - GoDetailed(true, record) + GoDetailed(record) }, }, ]" /> 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() {}