租箱租出 等

szh-new
张同海 3 months ago
parent 36bee31fb8
commit d95916cf3e

@ -227,7 +227,6 @@
const submitHandle = async () => {
await props.submit()
}
defineExpose({ toPage })
return {
t,
openPrint,

@ -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;

@ -50,16 +50,14 @@
</hot-table>
</div>
</div>
<!-- <div class="SearchBox" v-if="TotTableType">
<div class="SearchBox">
<BasicForm class="Form" @register="registerSearchBoxForm" />
<div class="ButtonBox">
<a-button size="default" @click="handleReset"> </a-button>
<a-button type="primary" size="default" class="mt-4" @click="handleSearch">
查询
</a-button>
<a-button type="primary" size="default" class="mt-4" @click="submit"> </a-button>
</div>
</div>
<div class="HotTable" v-if="TotTableType">
<div class="HotTable">
<div>
<a-button type="link" @click="ViewTableAdd" class="pl0">
<span class="iconfont icon-new_document"></span>
@ -74,7 +72,11 @@
:indeterminate="ViewlsomeCheck"
v-if="Viewlist.length !== 0"
/>
<hot-table ref="hotTb" :data="Viewlist" :settings="Viewsettings">
<hot-table
ref="hotTb"
:data="Viewlist"
:settings="rentDirectId == 2 ? Viewsettings2 : Viewsettings3"
>
<img
v-show="!Viewlist.length"
class="hot-tb-no-data"
@ -83,7 +85,7 @@
/>
</hot-table>
</div>
</div> -->
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="电子文档" :disabled="!rowId">
<DsFile ref="dsFile" fileType="infoclient" :id="rowId" />
@ -114,7 +116,7 @@
</a-tabs>
<!--右下角按钮-->
<template #footer>
<!-- <a-button
<a-button
pre-icon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
@ -122,8 +124,8 @@
@click="Confirm()"
>
确认执行
</a-button> -->
<!-- <a-button
</a-button>
<a-button
pre-icon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
@ -131,7 +133,7 @@
@click="Cancel()"
>
取消执行
</a-button> -->
</a-button>
<a-button
pre-icon="ant-design:close-outlined"
type="warning"
@ -157,7 +159,7 @@
@click="handleSave(true)"
>保存并关闭</a-button
>
<!-- <a-button
<a-button
pre-icon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
@ -165,7 +167,7 @@
@click="MakeFee()"
>
生成费用
</a-button> -->
</a-button>
</template>
</BasicModal>
</template>
@ -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<any>([])
// //
// const ViewlallCheck = ref(false)
const [
registerSearchBoxForm,
{ resetFields: resetSearchBoxFields, validate: validateSearchBox },
] = useForm({
labelWidth: 100,
schemas: formSearchBoxSchema,
showActionButtonGroup: false,
submitFunc: submit,
})
const Viewlist = ref<any>([])
//
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',
},
// -----------------
// if (item == 'cntrno') {
// ApiData.push({ FieldName: item, FieldValue: values[item], ConditionalType: 15 })
// } else {
// ApiData.push({ FieldName: item, FieldValue: values[item], ConditionalType: 1 })
// }
// }
// })
{
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))
// }
// 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 })
// }
// })
// }
// }
}
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 (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;
}
}
</style>

@ -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<DataResult>({
// url: Api.DetailView,
// method: 'post',
// data,
// })
// }
// // 租箱租入退租_添加 (Auth)
// export function ApiAddCtn(data: PageRequest) {
// return request<DataResult>({
// url: Api.AddCtn,
// method: 'post',
// data,
// })
// }
// // 租箱租入_生成费用 (Auth)
// export function ApiMakeFee(data: PageRequest) {
// return request<DataResult>({
// url: Api.MakeFee,
// method: 'post',
// data,
// })
// }
// // 租箱租入_确认 (Auth)
// export function ApiConfirm(data: PageRequest) {
// return request<DataResult>({
// url: Api.Confirm,
// method: 'post',
// data,
// })
// }
// // 租箱租入_取消 (Auth)
// export function ApiCancel(data: PageRequest) {
// return request<DataResult>({
// url: Api.Cancel,
// method: 'post',
// data,
// })
// }
// 租箱租入_生成费用 (Auth)
export function ApiMakeFee(data: PageRequest) {
return request<DataResult>({
url: Api.MakeFee,
method: 'post',
data,
})
}
// 租箱租入_确认 (Auth)
export function ApiConfirm(data: PageRequest) {
return request<DataResult>({
url: Api.Confirm,
method: 'post',
data,
})
}
// 租箱租入_取消 (Auth)
export function ApiCancel(data: PageRequest) {
return request<DataResult>({
url: Api.Cancel,
method: 'post',
data,
})
}
// 租箱租出 待租出 明细视图 (Auth)
export function ApiDetailView(data: PageRequest) {
return request<DataResult>({
url: Api.DetailView,
method: 'post',
data,
})
}
// 租箱租出_添加 (Auth)
export function ApiAddCtn(data: PageRequest) {
return request<DataResult>({
url: Api.AddCtn,
method: 'post',
data,
})
}
// 租箱租出 待退租 明细_视图 (Auth)
export function ApiEndDetailView(data: PageRequest) {
return request<DataResult>({
url: Api.EndDetailView,
method: 'post',
data,
})
}
// 租箱租出退租_添加 (Auth)
export function ApiEndAddCtn(data: PageRequest) {
return request<DataResult>({
url: Api.EndAddCtn,
method: 'post',
data,
})
}

@ -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 },
},
]

@ -17,14 +17,14 @@
删除
</a-button>
</a-popconfirm>
<!-- <a-button type="link" @click="Confirm">
<a-button type="link" @click="Confirm">
<span class="iconfont icon-yiwancheng2"></span>
确认执行
</a-button>
<a-button type="link" @click="Cancel">
<span class="iconfont icon-weiwancheng"></span>
取消确认
</a-button> -->
</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
@ -47,11 +47,7 @@
<script lang="ts" setup>
import { ref } from 'vue'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import {
ApiList,
ApiDel,
// , ApiConfirm, ApiCancel
} from './api'
import { ApiList, ApiDel, ApiConfirm, ApiCancel } from './api'
import { useModal } from '/@/components/Modal'
import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema } from './columns'
@ -102,42 +98,42 @@
isUpdate: false,
})
}
// function Confirm() {
// const select = getSelectRows()
// let ApiData: any = {
// id: '',
// ids: [],
// }
// if (select.length === 0) {
// notification.warning({ message: '', duration: 3 })
// return false
// } else {
// ApiData.ids = select.map((item) => {
// return item.id
// })
// }
// ApiConfirm(ApiData).then((res) => {
// notification.success({ message: res.message, duration: 3 })
// })
// }
// function Cancel() {
// const select = getSelectRows()
// let ApiData: any = {
// id: '',
// ids: [],
// }
// if (select.length === 0) {
// notification.warning({ message: '', duration: 3 })
// return false
// } else {
// ApiData.ids = select.map((item) => {
// return item.id
// })
// }
// ApiCancel(ApiData).then((res) => {
// notification.success({ message: res.message, duration: 3 })
// })
// }
function Confirm() {
const select = getSelectRows()
let ApiData: any = {
id: '',
ids: [],
}
if (select.length === 0) {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
return false
} else {
ApiData.ids = select.map((item) => {
return item.id
})
}
ApiConfirm(ApiData).then((res) => {
notification.success({ message: res.message, duration: 3 })
})
}
function Cancel() {
const select = getSelectRows()
let ApiData: any = {
id: '',
ids: [],
}
if (select.length === 0) {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
return false
} else {
ApiData.ids = select.map((item) => {
return item.id
})
}
ApiCancel(ApiData).then((res) => {
notification.success({ message: res.message, duration: 3 })
})
}
function handleDel() {
const select = getSelectRows()

@ -1,52 +1,47 @@
{
"id": "1825822581882753024",
"businessType": 102,
"rentDirectId": 2,
"rentTypeId": 1,
"billState": "",
"rentCustomerId": "1790269205392789504",
"rentCustomerName": "青岛东胜",
"bsdate": "2024-08-14 00:00:00",
"accdate": "2024-08",
"isBusinessLocking": false,
"isFeeLocking": false,
"remark": "",
"bodyList": [
"code": 0,
"multiCode": "Data_Query_Success",
"count": 1,
"message": "",
"succeeded": true,
"data": [
{
"id": "1825822581899530240",
"pid": "1825822581882753024",
"cntrno": "1",
"ctnCode": "22R0",
"ctnall": "20RF",
"id": "1825815950054789120",
"billno": "ZC240820005",
"cntrno": "2",
"ctnCode": "22G0",
"ctnall": "20GP",
"ctnSourceId": null,
"ctnBizStateId": null,
"isOnlineId": 0,
"ctnStateId": null,
"ctnFlowStateId": null,
"ctnOwnerId": null,
"ctnOwner": null,
"rentCustomerId": "",
"rentCustomerName": null,
"rentDirectId": 2,
"rentDirect": "租出",
"rentTypeId": 1,
"rentType": "长租",
"billState": null,
"ctnReleaseNo": "1",
"bsdate": "2024-08-13",
"feeStartDate": "08/07/2024",
"bsdate": "2024-08-07 00:00:00",
"feeStartDate": "2024-08-14 00:00:00",
"currency": "HKD",
"dailyRate": 1,
"pickupFee": 1,
"pickupDate": "2024-08-05",
"dropoffFee": 1,
"dropoffDate": "2024-08-06",
"dailyRate": 1.0,
"pickupFee": 2.0,
"pickupDate": "2024-08-06 00:00:00",
"dropoffFee": 2.0,
"dropoffDate": "2024-08-14 00:00:00",
"rentalPortid": "1816306937097228288",
"rentalPortCode": "CNTAO",
"rentalPort": "QINGDAO,CHINA",
"pickupPortid": "1816306937097228288",
"pickupPortCode": "CNTAO",
"pickupPort": "QINGDAO,CHINA",
"pickupPortid": "1795717773662490624",
"pickupPortCode": "1212",
"pickupPort": "Test001",
"dropoffPortid": "1816306937097228288",
"dropoffPortCode": "CNTAO",
"dropoffPort": "QINGDAO,CHINA",
"mblno": "1",
"vesselVoyno": "1",
"rentDetailId": "",
"selected": false
"mblno": "2",
"vesselVoyno": "2"
}
]
],
"additionalData": null
}

@ -26,6 +26,16 @@ if (ctnDict.data && ctnDict.data.length) {
}
const unitDict = await getDictOption('fee_unit')
feeUnitDict = feeUnitDict.concat(unitDict)
let feeCodeList: any = []
const res: API.DataResult = await GetFeeCodeSelectList()
if (res.succeeded) {
feeCodeList = []
res.data.forEach((e) => {
console.log(e)
feeCodeList.push({ ...e, label: `${e.name}/${e.code}`, value: e.code })
})
}
export const columns: BasicColumn[] = [
{
title: '费用名称',
@ -135,14 +145,16 @@ export const formSchema: FormSchema[] = [
label: '费用名称',
required: true,
defaultValue: '',
component: 'ApiSelect',
component: 'Select',
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
api: GetFeeCodeSelectList,
labelField: 'name',
valueField: 'code',
resultField: 'data',
options: feeCodeList,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
console.log(obj)
@ -156,7 +168,35 @@ export const formSchema: FormSchema[] = [
},
}
},
// defaultValue: '',
// component: 'ApiSelect',
// colProps: { span: 12 },
// componentProps: ({ formModel }) => {
// return {
// api: GetFeeCodeSelectList,
// labelField: 'name',
// valueField: 'code',
// showName: 'NameCode',
// resultField: 'data',
// filterOption: (input: string, option: any) => {
// console.log(input, option)
// // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// onChange: (v, obj) => {
// console.log(obj)
// if (obj) {
// formModel['feeName'] = obj.label
// formModel['feeId'] = obj.id
// } else {
// formModel['feeName'] = ''
// formModel['feeId'] = ''
// }
// },
// }
// },
},
// {
// field: 'customerName',
// label: '结算对象',

Loading…
Cancel
Save