Merge branch 'zth' into dev

szh-new
张同海 3 months ago
commit e09b75b99e

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

@ -873,7 +873,10 @@
}) })
GetViewListDetail(JSON.stringify(ApiData)) GetViewListDetail(JSON.stringify(ApiData))
} }
function ViewTableAdd() { async function ViewTableAdd() {
if (!rowId.value) {
await handleSave(false)
}
let ApiData: any = { id: rowId.value, ids: [] } let ApiData: any = { id: rowId.value, ids: [] }
Viewlist.value.forEach((e: any, i) => { Viewlist.value.forEach((e: any, i) => {
if (e.selected) { if (e.selected) {
@ -924,6 +927,7 @@
display: flex; display: flex;
.Form { .Form {
flex: 1; flex: 1;
margin-right: 10px;
} }
.mt-4 { .mt-4 {
margin-left: 10px; margin-left: 10px;

@ -50,16 +50,14 @@
</hot-table> </hot-table>
</div> </div>
</div> </div>
<!-- <div class="SearchBox" v-if="TotTableType"> <div class="SearchBox">
<BasicForm class="Form" @register="registerSearchBoxForm" /> <BasicForm class="Form" @register="registerSearchBoxForm" />
<div class="ButtonBox"> <div class="ButtonBox">
<a-button size="default" @click="handleReset"> </a-button> <a-button size="default" @click="handleReset"> </a-button>
<a-button type="primary" size="default" class="mt-4" @click="handleSearch"> <a-button type="primary" size="default" class="mt-4" @click="submit"> </a-button>
查询
</a-button>
</div> </div>
</div> </div>
<div class="HotTable" v-if="TotTableType"> <div class="HotTable">
<div> <div>
<a-button type="link" @click="ViewTableAdd" class="pl0"> <a-button type="link" @click="ViewTableAdd" class="pl0">
<span class="iconfont icon-new_document"></span> <span class="iconfont icon-new_document"></span>
@ -74,7 +72,11 @@
:indeterminate="ViewlsomeCheck" :indeterminate="ViewlsomeCheck"
v-if="Viewlist.length !== 0" 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 <img
v-show="!Viewlist.length" v-show="!Viewlist.length"
class="hot-tb-no-data" class="hot-tb-no-data"
@ -83,7 +85,7 @@
/> />
</hot-table> </hot-table>
</div> </div>
</div> --> </div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2" tab="电子文档" :disabled="!rowId"> <a-tab-pane key="2" tab="电子文档" :disabled="!rowId">
<DsFile ref="dsFile" fileType="infoclient" :id="rowId" /> <DsFile ref="dsFile" fileType="infoclient" :id="rowId" />
@ -114,7 +116,7 @@
</a-tabs> </a-tabs>
<!--右下角按钮--> <!--右下角按钮-->
<template #footer> <template #footer>
<!-- <a-button <a-button
pre-icon="ant-design:check-circle-outlined" pre-icon="ant-design:check-circle-outlined"
type="primary" type="primary"
:loading="loading" :loading="loading"
@ -122,8 +124,8 @@
@click="Confirm()" @click="Confirm()"
> >
确认执行 确认执行
</a-button> --> </a-button>
<!-- <a-button <a-button
pre-icon="ant-design:check-circle-outlined" pre-icon="ant-design:check-circle-outlined"
type="primary" type="primary"
:loading="loading" :loading="loading"
@ -131,7 +133,7 @@
@click="Cancel()" @click="Cancel()"
> >
取消执行 取消执行
</a-button> --> </a-button>
<a-button <a-button
pre-icon="ant-design:close-outlined" pre-icon="ant-design:close-outlined"
type="warning" type="warning"
@ -157,7 +159,7 @@
@click="handleSave(true)" @click="handleSave(true)"
>保存并关闭</a-button >保存并关闭</a-button
> >
<!-- <a-button <a-button
pre-icon="ant-design:check-circle-outlined" pre-icon="ant-design:check-circle-outlined"
type="primary" type="primary"
:loading="loading" :loading="loading"
@ -165,7 +167,7 @@
@click="MakeFee()" @click="MakeFee()"
> >
生成费用 生成费用
</a-button> --> </a-button>
</template> </template>
</BasicModal> </BasicModal>
</template> </template>
@ -187,11 +189,13 @@
ApiInfo, ApiInfo,
ApiListDetail, ApiListDetail,
ApiDelDetail, ApiDelDetail,
// ApiMakeFee, ApiMakeFee,
// ApiDetailView, ApiConfirm,
// ApiAddCtn, ApiCancel,
// ApiConfirm, ApiDetailView,
// ApiCancel, ApiAddCtn,
ApiEndDetailView,
ApiEndAddCtn,
} from './api' } from './api'
import { GetClientListByCode } from '/@/api/common' import { GetClientListByCode } from '/@/api/common'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
@ -199,6 +203,8 @@
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
import DsFile from '/@/components/File/index.vue' import DsFile from '/@/components/File/index.vue'
//
import { getDictOption } from '/@/utils/dictUtil'
// //
import FeeTable from '/@/components/CostEntry/feeTable.vue' import FeeTable from '/@/components/CostEntry/feeTable.vue'
// Emits // Emits
@ -213,14 +219,37 @@
showActionButtonGroup: false, showActionButtonGroup: false,
submitFunc: submit, submitFunc: submit,
}) })
const rentDirectId = ref(2)
const TotTableType = ref(false)
async function submit() { async function submit() {
let queryCondition: any = await handleSearch()
const values = await validate() const values = await validate()
if (values.rentDirectId == 1) { console.log(values.rentDirectId)
TotTableType.value = true 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 { } 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) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
@ -228,8 +257,8 @@
setModalProps({ confirmLoading: false, loading: true }) setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate isUpdate.value = !!data?.isUpdate
activeKey.value = '1' activeKey.value = '1'
TotTableType.value = false
// Viewlist.value.splice(0) Viewlist.value.splice(0)
list.value.splice(0) list.value.splice(0)
if (unref(isUpdate)) { if (unref(isUpdate)) {
// setModalProps({ confirmLoading: true }); // setModalProps({ confirmLoading: true });
@ -241,30 +270,20 @@
setFieldsValue({ setFieldsValue({
...res.data, ...res.data,
}) })
submit() // submit()
GetListDetail() GetListDetail()
// ViewlallCheck.value = false ViewlallCheck.value = false
// ViewlsomeCheck.value = false ViewlsomeCheck.value = false
// handleReset() handleReset()
// GetViewListDetail('[]')
} }
} else { } else {
rowId.value = '' rowId.value = ''
rentDirectId.value = 2
handleReset()
} }
setModalProps({ loading: false }) 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() { function GetListDetail() {
ApiListDetail({ ApiListDetail({
queryCondition: `[{ FieldName: 'Pid', FieldValue: '${rowId.value}', ConditionalType: 1 }]`, queryCondition: `[{ FieldName: 'Pid', FieldValue: '${rowId.value}', ConditionalType: 1 }]`,
@ -292,57 +311,57 @@
}) })
}) })
} }
// function MakeFee() { function MakeFee() {
// ApiMakeFee({ id: rowId.value }).then((res) => { ApiMakeFee({ id: rowId.value }).then((res) => {
// notification.success({ message: res.message, duration: 3 }) notification.success({ message: res.message, duration: 3 })
// }) })
// } }
// function Confirm() { function Confirm() {
// let type: boolean = true let type: boolean = true
// let ApiData: any = { let ApiData: any = {
// id: rowId.value, id: rowId.value,
// ids: [], ids: [],
// } }
// list.value.forEach((e: any, i) => { list.value.forEach((e: any, i) => {
// if (e.selected) { if (e.selected) {
// if (e.id) { if (e.id) {
// ApiData.ids.push(e.id) ApiData.ids.push(e.id)
// } else { } else {
// type = false type = false
// } }
// } }
// }) })
// if (type) { if (type) {
// ApiConfirm(ApiData).then((res) => { ApiConfirm(ApiData).then((res) => {
// notification.success({ message: res.message, duration: 3 }) notification.success({ message: res.message, duration: 3 })
// }) })
// } else { } else {
// notification.success({ message: '', duration: 3 }) notification.success({ message: '请先保存明细表', duration: 3 })
// } }
// } }
// function Cancel() { function Cancel() {
// let type: boolean = true let type: boolean = true
// let ApiData: any = { let ApiData: any = {
// id: rowId.value, id: rowId.value,
// ids: [], ids: [],
// } }
// list.value.forEach((e: any, i) => { list.value.forEach((e: any, i) => {
// if (e.selected) { if (e.selected) {
// if (e.id) { if (e.id) {
// ApiData.ids.push(e.id) ApiData.ids.push(e.id)
// } else { } else {
// type = false type = false
// } }
// } }
// }) })
// if (type) { if (type) {
// ApiCancel(ApiData).then((res) => { ApiCancel(ApiData).then((res) => {
// notification.success({ message: res.message, duration: 3 }) notification.success({ message: res.message, duration: 3 })
// }) })
// } else { } else {
// notification.success({ message: '', duration: 3 }) notification.success({ message: '请先保存明细表', duration: 3 })
// } }
// } }
async function handleSave(exit) { async function handleSave(exit) {
try { try {
const values = await validate() const values = await validate()
@ -405,6 +424,8 @@
const ctnDict = ref([]) const ctnDict = ref([])
// //
const ContainerOwnerDict = ref([]) const ContainerOwnerDict = ref([])
//
const ctnSourceDict = ref([])
// //
const PortDict = ref([]) const PortDict = ref([])
// // // //
@ -731,7 +752,7 @@
list.value[changes[0][0]]['ctnall'] = dict?.ctnName list.value[changes[0][0]]['ctnall'] = dict?.ctnName
list.value[changes[0][0]]['ctnCode'] = dict?.ediCode list.value[changes[0][0]]['ctnCode'] = dict?.ediCode
} }
if (changes[0][1] === 'oldContainerOwner') { if (changes[0][1] === 'ctnOwner') {
const res = ContainerOwnerDict.value.length const res = ContainerOwnerDict.value.length
? ContainerOwnerDict.value ? ContainerOwnerDict.value
: (await GetClientListByCode({ code: 'leasing' }))?.data : (await GetClientListByCode({ code: 'leasing' }))?.data
@ -740,10 +761,11 @@
return item.pinYinCode === changes[0][3] return item.pinYinCode === changes[0][3]
}) })
if (item) dict = item[0] if (item) dict = item[0]
list.value[changes[0][0]]['oldContainerOwner'] = dict?.pinYinCode list.value[changes[0][0]]['ctnOwner'] = dict?.pinYinCode
list.value[changes[0][0]]['oldContainerOwnerId'] = dict?.id list.value[changes[0][0]]['ctnOwnerId'] = dict?.id
} }
if ( if (
changes[0][1] === 'port' ||
changes[0][1] === 'pickupPort' || changes[0][1] === 'pickupPort' ||
changes[0][1] === 'dropoffPort' || changes[0][1] === 'dropoffPort' ||
changes[0][1] === 'rentalPort' changes[0][1] === 'rentalPort'
@ -756,7 +778,11 @@
return item.portName === changes[0][3] return item.portName === changes[0][3]
}) })
if (item) dict = item[0] 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') { if (changes[0][1] === 'pickupPort') {
list.value[changes[0][0]]['pickupPort'] = dict?.portName list.value[changes[0][0]]['pickupPort'] = dict?.portName
list.value[changes[0][0]]['pickupPortid'] = dict?.id list.value[changes[0][0]]['pickupPortid'] = dict?.id
@ -800,138 +826,402 @@
} }
} }
//--------------------------------------- tab1 View --------------------------------------- //--------------------------------------- tab1 View ---------------------------------------
// const [ const [
// registerSearchBoxForm, registerSearchBoxForm,
// { resetFields: resetSearchBoxFields, validate: validateSearchBox }, { resetFields: resetSearchBoxFields, validate: validateSearchBox },
// ] = useForm({ ] = useForm({
// labelWidth: 100, labelWidth: 100,
// schemas: formSearchBoxSchema, schemas: formSearchBoxSchema,
// showActionButtonGroup: false, showActionButtonGroup: false,
// submitFunc: submit, submitFunc: submit,
// }) })
// const Viewlist = ref<any>([]) const Viewlist = ref<any>([])
// // //
// const ViewlallCheck = ref(false) const ViewlallCheck = ref(false)
// //
// const ViewlsomeCheck = ref(false) const ViewlsomeCheck = ref(false)
// watchEffect(() => { watchEffect(() => {
// // //
// if (ViewlallCheck.value) { if (ViewlallCheck.value) {
// Viewlist.value.forEach((item: any) => { Viewlist.value.forEach((item: any) => {
// item.selected = true item.selected = true
// }) })
// } else { } else {
// // //
// Viewlist.value.forEach((item: any) => { Viewlist.value.forEach((item: any) => {
// item.selected = false item.selected = false
// }) })
// } }
// }) })
// watch( watch(
// Viewlist.value, Viewlist.value,
// (val) => { (val) => {
// let a = 0 let a = 0
// let b = 0 let b = 0
// val.forEach((item: any) => { val.forEach((item: any) => {
// if (item.selected) { if (item.selected) {
// a += 1 a += 1
// } else { } else {
// b += 1 b += 1
// } }
// }) })
// if (a == 0) { if (a == 0) {
// ViewlallCheck.value = false ViewlallCheck.value = false
// } }
// if (b == 0) { if (b == 0) {
// ViewlallCheck.value = true ViewlallCheck.value = true
// } }
// if (a != 0 && b != 0) { if (a != 0 && b != 0) {
// ViewlsomeCheck.value = true ViewlsomeCheck.value = true
// } else { } else {
// ViewlsomeCheck.value = false ViewlsomeCheck.value = false
// } }
// }, },
// { {
// deep: true, deep: true,
// }, },
// ) )
// const Viewsettings = { const columns2 = [
// height: '163', {
// readOnly: true, data: 'selected',
// // autoWrapRow: true, type: 'checkbox',
// // autoWrapCol: true, title: ' ',
// // width: 32,
// rowHeights: 26, className: 'htCenter',
// fixedColumnsLeft: 1, readOnly: false,
// // },
// hiddenColumns: { // -----------------
// columns: [1, 2, 3, 4, 5, 6, 7, 8], {
// indicators: true, title: '主键Id',
// }, width: 200,
// // // data: 'id',
// // enterMoves: 'row', },
// // columnSorting: false, {
// // // title: '箱型代码',
// // afterValidate: function (isValid, value, row, prop, source) { width: 120,
// // if (!isValid) { data: 'ctnCode',
// // hotTb.value.hotInstance.setDataAtRowProp(row, prop, '') },
// // } {
// // }, title: '箱主',
// columns: columns, width: 120,
// // () data: 'ctnOwnerId',
// licenseKey: 'non-commercial-and-evaluation', },
// // // {
// // async afterChange(changes, source) {}, title: '当前港口代码',
// } width: 120,
// function handleReset() { data: 'portid',
// resetSearchBoxFields() },
// handleSearch() {
// } title: '当前港口五字码',
// async function handleSearch() { width: 120,
// const values = await validateSearchBox() data: 'portCode',
// 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 }) title: '箱号',
// } else { width: 120,
// ApiData.push({ FieldName: item, FieldValue: values[item], ConditionalType: 1 }) 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)) // GetViewListDetail(JSON.stringify(ApiData))
// } }
// function ViewTableAdd() { async function ViewTableAdd() {
// let ApiData: any = { id: rowId.value, ids: [] } if (!rowId.value) {
// Viewlist.value.forEach((e: any, i) => { await handleSave(false)
// if (e.selected) { }
// ApiData.ids.push(e.id) let ApiData: any = { id: rowId.value, ids: [] }
// } Viewlist.value.forEach((e: any, i) => {
// }) if (e.selected) {
// console.log(ApiData.ids) ApiData.ids.push(e.id)
// if (ApiData.ids.length) { }
// ApiAddCtn(ApiData).then(async (res) => { })
// if (res.succeeded) { console.log(ApiData.ids)
// const res: API.DataResult = await ApiInfo({ id: unref(rowId) }) if (ApiData.ids.length) {
// if (res.succeeded) { let res: any = null
// allCheck.value = false if (rentDirectId.value == 2) {
// someCheck.value = false res = await ApiAddCtn(ApiData)
// ViewlallCheck.value = false } else {
// ViewlsomeCheck.value = false res = await ApiEndAddCtn(ApiData)
// submit() }
// GetListDetail()
// handleReset() if (res.succeeded) {
// GetViewListDetail('[]') const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
// } if (res.succeeded) {
// // getData(false) allCheck.value = false
// notification.success({ message: res.message, duration: 3 }) someCheck.value = false
// } ViewlallCheck.value = false
// }) ViewlsomeCheck.value = false
// } submit()
// } GetListDetail()
handleReset()
}
// getData(false)
notification.success({ message: res.message, duration: 3 })
}
}
}
//--------------------------------------- tab3 --------------------------------------- //--------------------------------------- tab3 ---------------------------------------
// //
const broReceiveData = ref([]) const broReceiveData = ref([])
@ -951,13 +1241,14 @@
position: absolute; position: absolute;
left: 15px; left: 15px;
} }
// .SearchBox { .SearchBox {
// display: flex; display: flex;
// .Form { .Form {
// flex: 1; flex: 1;
// } margin-right: 10px;
// .mt-4 { }
// margin-left: 10px; .mt-4 {
// } margin-left: 10px;
// } }
}
</style> </style>

@ -11,12 +11,16 @@ enum Api {
editDetail = '/containerManagementApi/CM_RentOut_Detail/EditCM_RentOut_Detail', editDetail = '/containerManagementApi/CM_RentOut_Detail/EditCM_RentOut_Detail',
delDetail = '/containerManagementApi/CM_RentOut_Detail/DeleteCM_RentOut_Detail', delDetail = '/containerManagementApi/CM_RentOut_Detail/DeleteCM_RentOut_Detail',
// Confirm = '/containerManagementApi/CM_RentOut/CM_RentOut_Confirm', Confirm = '/containerManagementApi/CM_RentOut/CM_RentOut_Confirm',
// Cancel = '/containerManagementApi/CM_RentOut/CM_RentOut_Cancel', Cancel = '/containerManagementApi/CM_RentOut/CM_RentOut_Cancel',
// MakeFee = '/containerManagementApi/CM_RentOut/CM_RentOut_MakeFee', 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) // 列表 (Auth)
@ -77,43 +81,61 @@ export function ApiDelDetail(data: PageRequest) {
}) })
} }
// // 租箱租入明细视图 (Auth) // 租箱租入_生成费用 (Auth)
// export function ApiDetailView(data: PageRequest) { export function ApiMakeFee(data: PageRequest) {
// return request<DataResult>({ return request<DataResult>({
// url: Api.DetailView, url: Api.MakeFee,
// method: 'post', method: 'post',
// data, data,
// }) })
// } }
// // 租箱租入退租_添加 (Auth) // 租箱租入_确认 (Auth)
// export function ApiAddCtn(data: PageRequest) { export function ApiConfirm(data: PageRequest) {
// return request<DataResult>({ return request<DataResult>({
// url: Api.AddCtn, url: Api.Confirm,
// method: 'post', method: 'post',
// data, data,
// }) })
// } }
// // 租箱租入_生成费用 (Auth) // 租箱租入_取消 (Auth)
// export function ApiMakeFee(data: PageRequest) { export function ApiCancel(data: PageRequest) {
// return request<DataResult>({ return request<DataResult>({
// url: Api.MakeFee, url: Api.Cancel,
// method: 'post', method: 'post',
// data, data,
// }) })
// } }
// // 租箱租入_确认 (Auth)
// export function ApiConfirm(data: PageRequest) { // 租箱租出 待租出 明细视图 (Auth)
// return request<DataResult>({ export function ApiDetailView(data: PageRequest) {
// url: Api.Confirm, return request<DataResult>({
// method: 'post', url: Api.DetailView,
// data, method: 'post',
// }) data,
// } })
// // 租箱租入_取消 (Auth) }
// export function ApiCancel(data: PageRequest) { // 租箱租出_添加 (Auth)
// return request<DataResult>({ export function ApiAddCtn(data: PageRequest) {
// url: Api.Cancel, return request<DataResult>({
// method: 'post', url: Api.AddCtn,
// data, 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 { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue' import { Tag } from 'ant-design-vue'
import { GetCtnSelectList, GetClientListByCode } from '/@/api/common' 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' import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
// 字典 // 字典
@ -474,12 +477,13 @@ export const formSchema: FormSchema[] = [
export const formSearchBoxSchema: FormSchema[] = [ export const formSearchBoxSchema: FormSchema[] = [
{ {
field: 'rentCustomerName', field: 'ctnOwnerId',
label: '租箱客户', label: '箱主',
component: 'ApiSelect', component: 'ApiSelect',
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
colProps: { span: 6 }, colProps: { span: 6 },
// api: GetClientListByCode({ code: 'leasing' }),
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
allowClear: true, 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', field: 'cntrno',
label: '箱号', label: '箱号',
component: 'Input', component: 'Input',
colProps: { span: 10 }, colProps: { span: 6 },
}, },
] ]

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

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

@ -26,6 +26,16 @@ if (ctnDict.data && ctnDict.data.length) {
} }
const unitDict = await getDictOption('fee_unit') const unitDict = await getDictOption('fee_unit')
feeUnitDict = feeUnitDict.concat(unitDict) 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[] = [ export const columns: BasicColumn[] = [
{ {
title: '费用名称', title: '费用名称',
@ -135,14 +145,16 @@ export const formSchema: FormSchema[] = [
label: '费用名称', label: '费用名称',
required: true, required: true,
defaultValue: '', defaultValue: '',
component: 'ApiSelect', component: 'Select',
colProps: { span: 12 }, colProps: { span: 12 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: GetFeeCodeSelectList, options: feeCodeList,
labelField: 'name', allowClear: true,
valueField: 'code', showSearch: true,
resultField: 'data', filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => { onChange: (v, obj) => {
console.log(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', // field: 'customerName',
// label: '结算对象', // label: '结算对象',

Loading…
Cancel
Save