diff --git a/src/components/ActionBar/index.vue b/src/components/ActionBar/index.vue index 5dcb6fcc..2f5482f4 100644 --- a/src/components/ActionBar/index.vue +++ b/src/components/ActionBar/index.vue @@ -232,7 +232,6 @@ const submitHandle = async () => { await props.submit() } - defineExpose({ toPage }) return { t, openPrint, diff --git a/src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue b/src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue index 318b6fe8..d53f4923 100644 --- a/src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue @@ -873,7 +873,10 @@ }) GetViewListDetail(JSON.stringify(ApiData)) } - function ViewTableAdd() { + async function ViewTableAdd() { + if (!rowId.value) { + await handleSave(false) + } let ApiData: any = { id: rowId.value, ids: [] } Viewlist.value.forEach((e: any, i) => { if (e.selected) { @@ -924,6 +927,7 @@ display: flex; .Form { flex: 1; + margin-right: 10px; } .mt-4 { margin-left: 10px; diff --git a/src/views/ContainerManagement/RentOut/TenantAuditStepModal.vue b/src/views/ContainerManagement/RentOut/TenantAuditStepModal.vue index 89cba6bb..c210e254 100644 --- a/src/views/ContainerManagement/RentOut/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/RentOut/TenantAuditStepModal.vue @@ -50,16 +50,14 @@ - + @@ -114,7 +116,7 @@ @@ -187,11 +189,13 @@ ApiInfo, ApiListDetail, ApiDelDetail, - // ApiMakeFee, - // ApiDetailView, - // ApiAddCtn, - // ApiConfirm, - // ApiCancel, + ApiMakeFee, + ApiConfirm, + ApiCancel, + ApiDetailView, + ApiAddCtn, + ApiEndDetailView, + ApiEndAddCtn, } from './api' import { GetClientListByCode } from '/@/api/common' import { useMessage } from '/@/hooks/web/useMessage' @@ -199,6 +203,8 @@ import { useOptionsStore } from '/@/store/modules/options' const optionsStore = useOptionsStore() import DsFile from '/@/components/File/index.vue' + // 字典 + import { getDictOption } from '/@/utils/dictUtil' // 应收表格组件 import FeeTable from '/@/components/CostEntry/feeTable.vue' // 声明Emits @@ -213,14 +219,37 @@ showActionButtonGroup: false, submitFunc: submit, }) - - const TotTableType = ref(false) + const rentDirectId = ref(2) async function submit() { + let queryCondition: any = await handleSearch() const values = await validate() - if (values.rentDirectId == 1) { - TotTableType.value = true + console.log(values.rentDirectId) + ViewlallCheck.value = false + ViewlsomeCheck.value = false + console.log(queryCondition) + + if (values.rentDirectId == 2) { + ApiDetailView({ + queryCondition, + pageCondition: { pageIndex: 1, pageSize: 999, sortConditions: [] }, + }).then((res) => { + Viewlist.value.splice(0) + res.data.forEach((item) => { + Viewlist.value.push(item) + }) + rentDirectId.value = values.rentDirectId + }) } else { - TotTableType.value = false + ApiEndDetailView({ + queryCondition, + pageCondition: { pageIndex: 1, pageSize: 999, sortConditions: [] }, + }).then((res) => { + Viewlist.value.splice(0) + res.data.forEach((item) => { + Viewlist.value.push(item) + }) + rentDirectId.value = values.rentDirectId + }) } } const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { @@ -228,8 +257,8 @@ setModalProps({ confirmLoading: false, loading: true }) isUpdate.value = !!data?.isUpdate activeKey.value = '1' - TotTableType.value = false - // Viewlist.value.splice(0) + + Viewlist.value.splice(0) list.value.splice(0) if (unref(isUpdate)) { // setModalProps({ confirmLoading: true }); @@ -241,30 +270,20 @@ setFieldsValue({ ...res.data, }) - submit() + // submit() GetListDetail() - // ViewlallCheck.value = false - // ViewlsomeCheck.value = false - // handleReset() - // GetViewListDetail('[]') + ViewlallCheck.value = false + ViewlsomeCheck.value = false + handleReset() } } else { rowId.value = '' + rentDirectId.value = 2 + handleReset() } setModalProps({ loading: false }) }) - // function GetViewListDetail(queryCondition) { - // ApiDetailView({ - // queryCondition, - // pageCondition: { pageIndex: 1, pageSize: 999, sortConditions: [] }, - // }).then((res) => { - // Viewlist.value.splice(0) - // res.data.forEach((item) => { - // Viewlist.value.push(item) - // }) - // }) - // } function GetListDetail() { ApiListDetail({ queryCondition: `[{ FieldName: 'Pid', FieldValue: '${rowId.value}', ConditionalType: 1 }]`, @@ -292,57 +311,57 @@ }) }) } - // function MakeFee() { - // ApiMakeFee({ id: rowId.value }).then((res) => { - // notification.success({ message: res.message, duration: 3 }) - // }) - // } - // function Confirm() { - // let type: boolean = true - // let ApiData: any = { - // id: rowId.value, - // ids: [], - // } - // list.value.forEach((e: any, i) => { - // if (e.selected) { - // if (e.id) { - // ApiData.ids.push(e.id) - // } else { - // type = false - // } - // } - // }) - // if (type) { - // ApiConfirm(ApiData).then((res) => { - // notification.success({ message: res.message, duration: 3 }) - // }) - // } else { - // notification.success({ message: '请先保存明细表', duration: 3 }) - // } - // } - // function Cancel() { - // let type: boolean = true - // let ApiData: any = { - // id: rowId.value, - // ids: [], - // } - // list.value.forEach((e: any, i) => { - // if (e.selected) { - // if (e.id) { - // ApiData.ids.push(e.id) - // } else { - // type = false - // } - // } - // }) - // if (type) { - // ApiCancel(ApiData).then((res) => { - // notification.success({ message: res.message, duration: 3 }) - // }) - // } else { - // notification.success({ message: '请先保存明细表', duration: 3 }) - // } - // } + function MakeFee() { + ApiMakeFee({ id: rowId.value }).then((res) => { + notification.success({ message: res.message, duration: 3 }) + }) + } + function Confirm() { + let type: boolean = true + let ApiData: any = { + id: rowId.value, + ids: [], + } + list.value.forEach((e: any, i) => { + if (e.selected) { + if (e.id) { + ApiData.ids.push(e.id) + } else { + type = false + } + } + }) + if (type) { + ApiConfirm(ApiData).then((res) => { + notification.success({ message: res.message, duration: 3 }) + }) + } else { + notification.success({ message: '请先保存明细表', duration: 3 }) + } + } + function Cancel() { + let type: boolean = true + let ApiData: any = { + id: rowId.value, + ids: [], + } + list.value.forEach((e: any, i) => { + if (e.selected) { + if (e.id) { + ApiData.ids.push(e.id) + } else { + type = false + } + } + }) + if (type) { + ApiCancel(ApiData).then((res) => { + notification.success({ message: res.message, duration: 3 }) + }) + } else { + notification.success({ message: '请先保存明细表', duration: 3 }) + } + } async function handleSave(exit) { try { const values = await validate() @@ -405,6 +424,8 @@ const ctnDict = ref([]) // 箱主字段 const ContainerOwnerDict = ref([]) + // 箱来源 + const ctnSourceDict = ref([]) // 港口字段 const PortDict = ref([]) // // 币别字段 @@ -731,7 +752,7 @@ list.value[changes[0][0]]['ctnall'] = dict?.ctnName list.value[changes[0][0]]['ctnCode'] = dict?.ediCode } - if (changes[0][1] === 'oldContainerOwner') { + if (changes[0][1] === 'ctnOwner') { const res = ContainerOwnerDict.value.length ? ContainerOwnerDict.value : (await GetClientListByCode({ code: 'leasing' }))?.data @@ -740,10 +761,11 @@ return item.pinYinCode === changes[0][3] }) if (item) dict = item[0] - list.value[changes[0][0]]['oldContainerOwner'] = dict?.pinYinCode - list.value[changes[0][0]]['oldContainerOwnerId'] = dict?.id + list.value[changes[0][0]]['ctnOwner'] = dict?.pinYinCode + list.value[changes[0][0]]['ctnOwnerId'] = dict?.id } if ( + changes[0][1] === 'port' || changes[0][1] === 'pickupPort' || changes[0][1] === 'dropoffPort' || changes[0][1] === 'rentalPort' @@ -756,7 +778,11 @@ return item.portName === changes[0][3] }) if (item) dict = item[0] - + if (changes[0][1] === 'port') { + list.value[changes[0][0]]['port'] = dict?.portName + list.value[changes[0][0]]['portid'] = dict?.id + list.value[changes[0][0]]['portCode'] = dict?.ediCode + } if (changes[0][1] === 'pickupPort') { list.value[changes[0][0]]['pickupPort'] = dict?.portName list.value[changes[0][0]]['pickupPortid'] = dict?.id @@ -800,138 +826,402 @@ } } //--------------------------------------- tab1 View --------------------------------------- - // const [ - // registerSearchBoxForm, - // { resetFields: resetSearchBoxFields, validate: validateSearchBox }, - // ] = useForm({ - // labelWidth: 100, - // schemas: formSearchBoxSchema, - // showActionButtonGroup: false, - // submitFunc: submit, - // }) - // const Viewlist = ref([]) - // // 全部勾选 - // const ViewlallCheck = ref(false) + const [ + registerSearchBoxForm, + { resetFields: resetSearchBoxFields, validate: validateSearchBox }, + ] = useForm({ + labelWidth: 100, + schemas: formSearchBoxSchema, + showActionButtonGroup: false, + submitFunc: submit, + }) + const Viewlist = ref([]) + // 全部勾选 + const ViewlallCheck = ref(false) // 部分勾选 - // const ViewlsomeCheck = ref(false) - // watchEffect(() => { - // // 全选 - // if (ViewlallCheck.value) { - // Viewlist.value.forEach((item: any) => { - // item.selected = true - // }) - // } else { - // // 取消全选 - // Viewlist.value.forEach((item: any) => { - // item.selected = false - // }) - // } - // }) - // watch( - // Viewlist.value, - // (val) => { - // let a = 0 - // let b = 0 - // val.forEach((item: any) => { - // if (item.selected) { - // a += 1 - // } else { - // b += 1 - // } - // }) - // if (a == 0) { - // ViewlallCheck.value = false - // } - // if (b == 0) { - // ViewlallCheck.value = true - // } - // if (a != 0 && b != 0) { - // ViewlsomeCheck.value = true - // } else { - // ViewlsomeCheck.value = false - // } - // }, - // { - // deep: true, - // }, - // ) - // const Viewsettings = { - // height: '163', - // readOnly: true, - // // autoWrapRow: true, - // // autoWrapCol: true, - // // 每行的高度 - // rowHeights: 26, - // fixedColumnsLeft: 1, - // // 需要隐藏的列 - // hiddenColumns: { - // columns: [1, 2, 3, 4, 5, 6, 7, 8], - // indicators: true, - // }, - // // // 控制回车移动 - // // enterMoves: 'row', - // // columnSorting: false, - // // // 如果通过复制或者填写校验出现错误,清空输入框 - // // afterValidate: function (isValid, value, row, prop, source) { - // // if (!isValid) { - // // hotTb.value.hotInstance.setDataAtRowProp(row, prop, '') - // // } - // // }, - // columns: columns, - // // 此行直接复制,必须(非商用) - // licenseKey: 'non-commercial-and-evaluation', - // // // 定义所有单元格发生变化的回调处理 - // // async afterChange(changes, source) {}, - // } - // function handleReset() { - // resetSearchBoxFields() - // handleSearch() - // } - // async function handleSearch() { - // const values = await validateSearchBox() - // console.log(values) - // let ApiData: any = [] - // Object.keys(values).forEach((item) => { - // if (values[item]) { - // console.log(values[item].split(',')) + const ViewlsomeCheck = ref(false) + watchEffect(() => { + // 全选 + if (ViewlallCheck.value) { + Viewlist.value.forEach((item: any) => { + item.selected = true + }) + } else { + // 取消全选 + Viewlist.value.forEach((item: any) => { + item.selected = false + }) + } + }) + watch( + Viewlist.value, + (val) => { + let a = 0 + let b = 0 + val.forEach((item: any) => { + if (item.selected) { + a += 1 + } else { + b += 1 + } + }) + if (a == 0) { + ViewlallCheck.value = false + } + if (b == 0) { + ViewlallCheck.value = true + } + if (a != 0 && b != 0) { + ViewlsomeCheck.value = true + } else { + ViewlsomeCheck.value = false + } + }, + { + deep: true, + }, + ) + const columns2 = [ + { + data: 'selected', + type: 'checkbox', + title: ' ', + width: 32, + className: 'htCenter', + readOnly: false, + }, + // ----------------- + { + title: '主键Id', + width: 200, + data: 'id', + }, + { + title: '箱型代码', + width: 120, + data: 'ctnCode', + }, + { + title: '箱主', + width: 120, + data: 'ctnOwnerId', + }, + { + title: '当前港口代码', + width: 120, + data: 'portid', + }, + { + title: '当前港口五字码', + width: 120, + data: 'portCode', + }, + // ----------------- + + { + title: '箱号', + width: 120, + data: 'cntrno', + }, + + { + title: '箱型', + width: 120, + data: 'ctnall', + }, + { + title: '箱主', + width: 120, + data: 'ctnOwner', + }, + { + title: '箱来源', + width: 120, + data: 'ctnSourceId', + }, + { + title: '箱当前业务', + width: 120, + data: 'CtnBizStateId', + }, + { + title: '箱状态', + width: 120, + data: 'CtnStateId', + }, + { + title: '箱流转状态!', + width: 120, + data: 'CtnFlowStateId', + }, + { + title: '当前港口', + width: 120, + data: 'port', + type: 'dropdown', + }, + { + title: '业务编号/提单号', + width: 120, + data: 'mblno', + }, + { + title: '船名航次', + width: 120, + data: 'vesselVoyno', + }, + { + title: '状态时间', + width: 120, + data: 'stateTime', + }, + { + title: '查看变动日志', + width: 120, + data: 'stateTime', + }, + ] + const Viewsettings2 = { + height: '163', + readOnly: true, + // 每行的高度 + rowHeights: 26, + fixedColumnsLeft: 1, + // 需要隐藏的列 + hiddenColumns: { + columns: [1, 2, 3, 4, 5], + indicators: true, + }, + columns: columns2, + // 此行直接复制,必须(非商用) + licenseKey: 'non-commercial-and-evaluation', + } + const columns3 = [ + { + data: 'selected', + type: 'checkbox', + title: ' ', + width: 32, + className: 'htCenter', + readOnly: false, + }, + // ----------------- + { + title: '箱型', + width: 120, + data: 'ctncode', + }, + { + title: '起租地点Code', + width: 120, + data: 'RentalPortCode', + }, + { + title: '起租地点ID', + width: 120, + data: 'RentalPortid', + }, + { + title: '提箱港口Code', + width: 120, + data: 'pickupPortCode', + }, + { + title: '提箱港口ID', + width: 120, + data: 'pickupPortid', + }, + { + title: '还箱港口Code', + width: 120, + data: 'dropoffPortCode', + }, + { + title: '还箱港口ID', + width: 120, + data: 'dropoffPortid', + }, + + // ----------------- + { + title: '箱号', + width: 120, + data: 'cntrno', + }, + { + title: '箱型', + width: 120, + data: 'ctnall', + }, + { + title: '箱主', + width: 120, + data: 'ctnOwner', + }, + { + title: '租箱客户', + width: 120, + data: 'rentCustomerName', + }, + { + title: '箱来源', + width: 120, + data: 'ctnSourceId', + }, + { + title: '箱当前业务', + width: 120, + data: 'ctnBizStateId', + }, + { + title: '箱状态', + width: 120, + data: 'ctnStateId', + }, + { + title: '箱流转状态', + width: 120, + data: 'ctnFlowStateId', + }, + { + title: '租箱日期', + width: 120, + data: 'bsdate', + }, + { + title: '开始计费日期', + width: 120, + data: 'feeStartDate', + }, + { + title: '币别', + width: 120, + data: 'currency', + }, + { + title: '日租金', + width: 120, + data: 'dailyRate', + }, + { + title: '提箱费', + width: 120, + data: 'pickupFee', + }, + { + title: '还箱费', + width: 120, + data: 'dropoffFee', + }, + { + title: '提箱日期', + width: 120, + data: 'pickupDate', + }, + { + title: '还箱日期', + width: 120, + data: 'dropoffDate', + }, + { + title: '起租地点', + width: 120, + data: 'rentalPort', + }, + { + title: '提箱港口', + width: 120, + data: 'pickupPort', + }, + { + title: '还箱港口', + width: 120, + data: 'dropoffPort', + }, + { + title: '业务编号', + width: 120, + data: 'mblno', + }, + { + title: '船名航次', + width: 120, + data: 'vesselVoyno', + }, + ] + const Viewsettings3 = { + height: '163', + readOnly: true, + // 每行的高度 + rowHeights: 26, + fixedColumnsLeft: 1, + // 需要隐藏的列 + hiddenColumns: { + columns: [1, 2, 3, 4, 5, 6, 7], + indicators: true, + }, + columns: columns3, + // 此行直接复制,必须(非商用) + licenseKey: 'non-commercial-and-evaluation', + } + async function handleReset() { + await resetSearchBoxFields() + submit() + } + async function handleSearch() { + const values = await validateSearchBox() + console.log(values) + let ApiData: any = [] + Object.keys(values).forEach((item) => { + if (values[item]) { + console.log(values[item].split(',')) + + if (item == 'cntrno') { + ApiData.push({ FieldName: item, FieldValue: values[item], ConditionalType: 15 }) + } else { + ApiData.push({ FieldName: item, FieldValue: values[item], ConditionalType: 1 }) + } + } + }) + console.log(ApiData) + return JSON.stringify(ApiData) + // GetViewListDetail(JSON.stringify(ApiData)) + } + async function ViewTableAdd() { + if (!rowId.value) { + await handleSave(false) + } + let ApiData: any = { id: rowId.value, ids: [] } + Viewlist.value.forEach((e: any, i) => { + if (e.selected) { + ApiData.ids.push(e.id) + } + }) + console.log(ApiData.ids) + if (ApiData.ids.length) { + let res: any = null + if (rentDirectId.value == 2) { + res = await ApiAddCtn(ApiData) + } else { + res = await ApiEndAddCtn(ApiData) + } - // if (item == 'cntrno') { - // ApiData.push({ FieldName: item, FieldValue: values[item], ConditionalType: 15 }) - // } else { - // ApiData.push({ FieldName: item, FieldValue: values[item], ConditionalType: 1 }) - // } - // } - // }) - // GetViewListDetail(JSON.stringify(ApiData)) - // } - // function ViewTableAdd() { - // let ApiData: any = { id: rowId.value, ids: [] } - // Viewlist.value.forEach((e: any, i) => { - // if (e.selected) { - // ApiData.ids.push(e.id) - // } - // }) - // console.log(ApiData.ids) - // if (ApiData.ids.length) { - // ApiAddCtn(ApiData).then(async (res) => { - // if (res.succeeded) { - // const res: API.DataResult = await ApiInfo({ id: unref(rowId) }) - // if (res.succeeded) { - // allCheck.value = false - // someCheck.value = false - // ViewlallCheck.value = false - // ViewlsomeCheck.value = false - // submit() - // GetListDetail() - // handleReset() - // GetViewListDetail('[]') - // } - // // getData(false) - // notification.success({ message: res.message, duration: 3 }) - // } - // }) - // } - // } + if (res.succeeded) { + const res: API.DataResult = await ApiInfo({ id: unref(rowId) }) + if (res.succeeded) { + allCheck.value = false + someCheck.value = false + ViewlallCheck.value = false + ViewlsomeCheck.value = false + submit() + GetListDetail() + handleReset() + } + // getData(false) + notification.success({ message: res.message, duration: 3 }) + } + } + } //--------------------------------------- tab3 --------------------------------------- // 应收传到应付的数据 const broReceiveData = ref([]) @@ -951,13 +1241,14 @@ position: absolute; left: 15px; } - // .SearchBox { - // display: flex; - // .Form { - // flex: 1; - // } - // .mt-4 { - // margin-left: 10px; - // } - // } + .SearchBox { + display: flex; + .Form { + flex: 1; + margin-right: 10px; + } + .mt-4 { + margin-left: 10px; + } + } diff --git a/src/views/ContainerManagement/RentOut/api.ts b/src/views/ContainerManagement/RentOut/api.ts index f18de517..3f417e73 100644 --- a/src/views/ContainerManagement/RentOut/api.ts +++ b/src/views/ContainerManagement/RentOut/api.ts @@ -11,12 +11,16 @@ enum Api { editDetail = '/containerManagementApi/CM_RentOut_Detail/EditCM_RentOut_Detail', delDetail = '/containerManagementApi/CM_RentOut_Detail/DeleteCM_RentOut_Detail', - // Confirm = '/containerManagementApi/CM_RentOut/CM_RentOut_Confirm', - // Cancel = '/containerManagementApi/CM_RentOut/CM_RentOut_Cancel', - // MakeFee = '/containerManagementApi/CM_RentOut/CM_RentOut_MakeFee', + Confirm = '/containerManagementApi/CM_RentOut/CM_RentOut_Confirm', + Cancel = '/containerManagementApi/CM_RentOut/CM_RentOut_Cancel', + MakeFee = '/containerManagementApi/CM_RentOut/CM_RentOut_MakeFee', - // DetailView = '/containerManagementApi/CM_RentOut/CM_RentOut_Detail_View', - // AddCtn = '/containerManagementApi/CM_RentOut/CM_RentOut_AddCtn', + + + DetailView = '/containerManagementApi/CM_RentOut/CM_RentOut_NeedRent_View', + AddCtn = '/containerManagementApi/CM_RentOut/CM_RentOut_AddCtn', + EndDetailView = '/containerManagementApi/CM_RentOut/CM_RentOut_NeedEndLease_View', + EndAddCtn = '/containerManagementApi/CM_RentOut/CM_RentOut_EndLease_AddCtn', } // 列表 (Auth) @@ -77,43 +81,61 @@ export function ApiDelDetail(data: PageRequest) { }) } -// // 租箱租入明细视图 (Auth) -// export function ApiDetailView(data: PageRequest) { -// return request({ -// url: Api.DetailView, -// method: 'post', -// data, -// }) -// } -// // 租箱租入退租_添加 (Auth) -// export function ApiAddCtn(data: PageRequest) { -// return request({ -// url: Api.AddCtn, -// method: 'post', -// data, -// }) -// } -// // 租箱租入_生成费用 (Auth) -// export function ApiMakeFee(data: PageRequest) { -// return request({ -// url: Api.MakeFee, -// method: 'post', -// data, -// }) -// } -// // 租箱租入_确认 (Auth) -// export function ApiConfirm(data: PageRequest) { -// return request({ -// url: Api.Confirm, -// method: 'post', -// data, -// }) -// } -// // 租箱租入_取消 (Auth) -// export function ApiCancel(data: PageRequest) { -// return request({ -// url: Api.Cancel, -// method: 'post', -// data, -// }) -// } \ No newline at end of file +// 租箱租入_生成费用 (Auth) +export function ApiMakeFee(data: PageRequest) { + return request({ + url: Api.MakeFee, + method: 'post', + data, + }) +} +// 租箱租入_确认 (Auth) +export function ApiConfirm(data: PageRequest) { + return request({ + url: Api.Confirm, + method: 'post', + data, + }) +} +// 租箱租入_取消 (Auth) +export function ApiCancel(data: PageRequest) { + return request({ + url: Api.Cancel, + method: 'post', + data, + }) +} + +// 租箱租出 待租出 明细视图 (Auth) +export function ApiDetailView(data: PageRequest) { + return request({ + url: Api.DetailView, + method: 'post', + data, + }) +} +// 租箱租出_添加 (Auth) +export function ApiAddCtn(data: PageRequest) { + return request({ + url: Api.AddCtn, + method: 'post', + data, + }) +} + +// 租箱租出 待退租 明细_视图 (Auth) +export function ApiEndDetailView(data: PageRequest) { + return request({ + url: Api.EndDetailView, + method: 'post', + data, + }) +} +// 租箱租出退租_添加 (Auth) +export function ApiEndAddCtn(data: PageRequest) { + return request({ + url: Api.EndAddCtn, + method: 'post', + data, + }) +} \ No newline at end of file diff --git a/src/views/ContainerManagement/RentOut/columns.tsx b/src/views/ContainerManagement/RentOut/columns.tsx index 11276b45..17e47f61 100644 --- a/src/views/ContainerManagement/RentOut/columns.tsx +++ b/src/views/ContainerManagement/RentOut/columns.tsx @@ -2,7 +2,10 @@ import { ref } from 'vue' import { BasicColumn, FormSchema } from '/@/components/Table' import { Tag } from 'ant-design-vue' import { GetCtnSelectList, GetClientListByCode } from '/@/api/common' -import { GetDeptList } from '/@/views/operation/seaexport/api/BookingLedger' +import { + GetDeptList, + GetClientPortSelectList, +} from '/@/views/operation/seaexport/api/BookingLedger' import { useOptionsStore } from '/@/store/modules/options' const optionsStore = useOptionsStore() // 字典 @@ -474,12 +477,13 @@ export const formSchema: FormSchema[] = [ export const formSearchBoxSchema: FormSchema[] = [ { - field: 'rentCustomerName', - label: '租箱客户', + field: 'ctnOwnerId', + label: '箱主', component: 'ApiSelect', required: false, dynamicDisabled: false, colProps: { span: 6 }, + // api: GetClientListByCode({ code: 'leasing' }), componentProps: ({ formModel }) => { return { allowClear: true, @@ -521,10 +525,28 @@ export const formSearchBoxSchema: FormSchema[] = [ } }, }, + { + field: 'port', + label: '当前港口', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: () => { + return { + api: GetClientPortSelectList, + resultField: 'data', + labelField: 'pinYinCode', + showName: 'portName', + valueField: 'id', + immediate: false, + } + }, + }, { field: 'cntrno', label: '箱号', component: 'Input', - colProps: { span: 10 }, + colProps: { span: 6 }, }, ] diff --git a/src/views/ContainerManagement/RentOut/index.vue b/src/views/ContainerManagement/RentOut/index.vue index 90f2cbb1..85e4e069 100644 --- a/src/views/ContainerManagement/RentOut/index.vue +++ b/src/views/ContainerManagement/RentOut/index.vue @@ -17,14 +17,14 @@ 删除 - +