|
|
|
@ -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',
|
|
|
|
|
},
|
|
|
|
|
// -----------------
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|