szh-new
张同海 4 months ago
parent dc2970cec9
commit c97deace38

@ -9,11 +9,27 @@
<MainInfo :data="details"></MainInfo>
<!-- 应收表格 -->
<div class="fee-card-box mt15">
<FeeTable tbType="receive" :height="height" :type="type" :broData="broPayData" :id="data.id" :details="details" @broInsert="broReceive"></FeeTable>
<FeeTable
tbType="receive"
:height="height"
:type="type"
:broData="broPayData"
:id="data.id"
:details="details"
@broInsert="broReceive"
></FeeTable>
</div>
<!-- 应付表格 -->
<div class="fee-card-box mt15">
<FeeTable tbType="pay" :height="height" :broData="broReceiveData" :type="type" :id="data.id" :details="details" @broInsert="broPay"></FeeTable>
<FeeTable
tbType="pay"
:height="height"
:broData="broReceiveData"
:type="type"
:id="data.id"
:details="details"
@broInsert="broPay"
></FeeTable>
</div>
<FeeStatistic :id="data.id" />
</div>
@ -33,8 +49,8 @@
//
height: {
type: [String, Number],
default: '300'
}
default: '300',
},
})
const data = ref(null)
// data.value = props.details
@ -56,13 +72,13 @@
console.log(val)
data.value = val
},
{ immediate: true, deep: true }
{ immediate: true, deep: true },
)
</script>
<style scoped>
.fee-card-box {
border: 1px solid #E8EBED;
border: 1px solid #e8ebed;
padding: 0 20px 20px;
}
</style>
</style>

@ -26,8 +26,8 @@ export const columns: BasicColumn[] = [
width: 200,
},
{
title: '备注',
dataIndex: '',
title: '备注',
dataIndex: 'remark',
sorter: true,
width: 200,
},
@ -38,8 +38,8 @@ export const columns: BasicColumn[] = [
width: 200,
},
{
title: '购入价格',
dataIndex: '',
title: '购入价格',
dataIndex: 'ctnValue_BuyingPrice',
sorter: true,
width: 200,
},
@ -138,14 +138,14 @@ export const formSchema: FormSchema[] = [
colProps: { span: 20 },
},
{
field: 'ctnValue_Base',
label: '购入价格',
field: 'ctnValue_BuyingPrice',
label: '购入价格',
component: 'InputNumber',
colProps: { span: 20 },
},
{
field: 'note',
label: '备注',
field: 'remark',
label: '备注',
component: 'InputTextArea',
colProps: { span: 20 },
componentProps: {

@ -47,9 +47,9 @@
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const select = ref([])
const loading = ref(false)
const rowId = ref('')
const rowId = ref()
const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100,
@ -60,21 +60,14 @@
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
// setModalProps({ confirmLoading: true });
rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
setFieldsValue({
...res.data,
})
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
}
// setModalProps({ confirmLoading: false });
} else {
setFieldsValue({ permissionIdentity: unref(2) })
select.value = data.select
if (select.value.length) {
console.log(select.value)
let cntrno = ''
select.value.forEach((item: any) => {
cntrno = cntrno ? `${cntrno},${item.cntrno}` : item.cntrno
})
setFieldsValue({ cntrno })
}
setModalProps({ loading: false })
})
@ -83,23 +76,16 @@
try {
const values = await validate()
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
// loading.value = true;
const res: API.DataResult = await ApiMultiEdit(values)
console.log(res)
if (res.succeeded) {
createMessage.success(res.message)
emit('success')
//
if (!exit) {
if (unref(isUpdate)) {
await refresh()
} else {
rowId.value = res.data
isUpdate.value = true
await refresh()
}
rowId.value = res.data
select.value = []
await refresh()
}
} else {
createMessage.error(res.message)

@ -504,7 +504,7 @@ export const formSchema: FormSchema[] = [
component: 'ApiSelect',
colProps: { span: 6 },
defaultValue: '',
componentProps: ({ formModel }) => {
componentProps: () => {
return {
api: () => {
return new Promise((resolve) => {
@ -519,17 +519,57 @@ export const formSchema: FormSchema[] = [
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {},
}
},
},
{
field: 'ctnBreakState',
field: 'ctnBreakStateId',
label: '箱损坏',
component: 'Input',
component: 'ApiSelect',
colProps: { span: 6 },
defaultValue: '',
componentProps: () => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('CM_BreakState').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
{
field: 'ctnFlowStateId',
label: '状态变动',
component: 'ApiSelect',
colProps: { span: 6 },
defaultValue: '',
componentProps: () => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('CM_CtnFlowState').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
{
field: 'isHeavy',
label: '空重箱',
@ -548,6 +588,13 @@ export const formSchema: FormSchema[] = [
defaultValue: '',
show: false,
},
{
label: '',
field: 'portCode',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'portid',
label: '当前港口',
@ -565,6 +612,7 @@ export const formSchema: FormSchema[] = [
},
onChange: (v, obj) => {
formModel.port = obj?.label || ''
formModel.portCode = obj?.ediCode || ''
},
}
},
@ -704,8 +752,8 @@ export const InfoColumns: BasicColumn[] = [
width: 150,
},
{
title: '状态变动',
dataIndex: 'usedState',
title: '状态变动',
dataIndex: 'ctnFlowState',
sorter: true,
width: 150,
},

@ -40,7 +40,7 @@
const [registerModal, { openModal }] = useModal()
const [registerInfoModal, { openModal: openInfoModal }] = useModal()
const [registerTable, { reload, getForm }] = useTable({
const [registerTable, { reload, getForm, getSelectRows }] = useTable({
title: '集装箱信息列表',
api: async (p) => {
const res: API.DataResult = await ApiList(p)
@ -105,9 +105,11 @@
},
})
function handleCreate() {
const select = getSelectRows()
openModal(true, {
isParent: false,
isUpdate: false,
select,
})
}
function handleAudit(record: Recordable) {

@ -5,8 +5,8 @@
title="箱状态详情"
width="55%"
@register="registerModal"
@ok="handleSave"
>
<!-- @ok="handleSave" -->
<BasicTable @register="registerTable"> </BasicTable>
</BasicModal>
</template>
@ -16,11 +16,12 @@
import { ApiChangeList } from '../StateChange/api'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { InfoColumns } from './columns'
import { formatParams } from '/@/hooks/web/common'
const cntrno = ref('')
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false, loading: true })
reload()
cntrno.value = data.cntrno
reload()
setModalProps({ loading: false })
})
@ -33,20 +34,9 @@
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: () => {
var currentPageInfo: any = getPaginationRef()
var data = getForm().getFieldsValue()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
postParam.queryCondition = JSON.stringify(condition)
return postParam
beforeFetch: (p) => {
p['cntrno'] = cntrno.value
return formatParams(p)
},
columns: InfoColumns,
pagination: true,

@ -51,8 +51,32 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="电子文档" disabled></a-tab-pane>
<a-tab-pane key="3" tab="费用" disabled></a-tab-pane>
<a-tab-pane key="2" tab="电子文档" :disabled="!rowId">
<DsFile ref="dsFile" fileType="infoclient" :id="rowId" />
</a-tab-pane>
<a-tab-pane key="3" tab="费用" :disabled="!rowId">
<div class="fee-card-box mt15">
<FeeTable
tbType="receive"
:height="height"
type="1"
:broData="broPayData"
:id="rowId"
@broInsert="broReceive"
></FeeTable>
</div>
<!-- 应付表格 -->
<div class="fee-card-box mt15">
<FeeTable
tbType="pay"
:height="height"
type="1"
:broData="broReceiveData"
:id="rowId"
@broInsert="broPay"
></FeeTable>
</div>
</a-tab-pane>
</a-tabs>
<!--右下角按钮-->
<template #footer>
@ -92,17 +116,23 @@
registerAllModules()
import 'handsontable/dist/handsontable.full.css'
import { formSchema } from './columns'
import { GetCtnSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
import {
GetCtnSelectList,
GetClientPortSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger'
import { ApiEdit, ApiInfo, ApiListDetail, ApiDelDetail } from './api'
import { GetClientListByCode } from '/@/api/common'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
import DsFile from '/@/components/File/index.vue'
//
import FeeTable from '/@/components/CostEntry/feeTable.vue'
// Emits
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const height = ref(300)
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: formSchema,
@ -113,6 +143,7 @@
resetFields()
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
activeKey.value = '1'
if (unref(isUpdate)) {
// setModalProps({ confirmLoading: true });
rowId.value = data.record.id
@ -123,12 +154,9 @@
setFieldsValue({
...res.data,
})
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
}
// setModalProps({ confirmLoading: false });
} else {
setFieldsValue({ permissionIdentity: unref(2) })
rowId.value = ''
}
setModalProps({ loading: false })
})
@ -139,6 +167,7 @@
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
values.bodyList = list.value
// loading.value = true;
const res: API.DataResult = await ApiEdit(values)
console.log(res)
@ -185,6 +214,8 @@
const ctnDict = ref([])
//
const ContainerOwnerDict = ref([])
//
const PortDict = ref([])
watchEffect(() => {
//
if (allCheck.value) {
@ -257,11 +288,33 @@
width: 120,
data: 'oldContainerOwnerId',
},
{
title: '提箱港口ID',
width: 120,
data: 'pickupPortid',
},
{
title: '提箱港口五字码',
width: 120,
data: 'pickupPortCode',
},
{
title: '还箱港口ID',
width: 120,
data: 'dropoffPortid',
},
{
title: '还箱港口五字码',
width: 120,
data: 'dropoffPortCode',
},
// -----------------
{
title: '租箱业务号',
width: 200,
data: 'billno',
readOnly: true,
},
{
title: '箱号',
@ -284,23 +337,23 @@
process(dict)
},
},
{
title: '原箱主',
width: 120,
data: 'oldContainerOwner',
type: 'dropdown',
// (process)
source: async (query, process) => {
const res = ContainerOwnerDict.value.length
? ContainerOwnerDict.value
: (await GetClientListByCode({ code: 'leasing' }))?.data
if (!ContainerOwnerDict.value.length) ContainerOwnerDict.value = res
const dict = res.map((res) => {
return res.pinYinCode
})
process(dict)
},
},
// {
// title: '',
// width: 120,
// data: 'oldContainerOwner',
// type: 'dropdown',
// // (process)
// source: async (query, process) => {
// const res = ContainerOwnerDict.value.length
// ? ContainerOwnerDict.value
// : (await GetClientListByCode({ code: 'leasing' }))?.data
// if (!ContainerOwnerDict.value.length) ContainerOwnerDict.value = res
// const dict = res.map((res) => {
// return res.pinYinCode
// })
// process(dict)
// },
// },
{
title: '租箱业务',
width: 120,
@ -375,25 +428,36 @@
type: 'date',
dateFormat: 'YYYY-MM-DD',
},
{
title: '提箱港口名称',
width: 120,
data: 'pickupPort',
},
{
title: '提箱港口',
width: 120,
data: 'pickupPortid',
},
{
title: '还箱港口名称',
width: 120,
data: 'dropoffPort',
data: 'pickupPort',
type: 'dropdown',
// (process)
source: async (query, process) => {
const res = PortDict.value.length ? PortDict.value : (await GetClientPortSelectList())?.data
if (!PortDict.value.length) PortDict.value = res
const dict = res.map((res) => {
return res.portName
})
process(dict)
},
},
{
title: '还箱港口',
width: 120,
data: 'dropoffPortid',
data: 'dropoffPort',
type: 'dropdown',
// (process)
source: async (query, process) => {
const res = PortDict.value.length ? PortDict.value : (await GetClientPortSelectList())?.data
if (!PortDict.value.length) PortDict.value = res
const dict = res.map((res) => {
return res.portName
})
process(dict)
},
},
{
title: '业务编号/提单号',
@ -415,7 +479,7 @@
fixedColumnsLeft: 1,
//
hiddenColumns: {
columns: [1, 2, 3, 4],
columns: [1, 2, 3, 4, 5, 6, 7, 8],
indicators: true,
},
//
@ -447,7 +511,7 @@
if (changes[0][1] === 'oldContainerOwner') {
const res = ContainerOwnerDict.value.length
? ContainerOwnerDict.value
: (await GetCtnSelectList())?.data
: (await GetClientListByCode({ code: 'leasing' }))?.data
if (!ContainerOwnerDict.value.length) ContainerOwnerDict.value = res
const item = res.filter((item) => {
return item.pinYinCode === changes[0][3]
@ -456,6 +520,28 @@
list.value[changes[0][0]]['oldContainerOwner'] = dict?.pinYinCode
list.value[changes[0][0]]['oldContainerOwnerId'] = dict?.id
}
if (changes[0][1] === 'pickupPort' || changes[0][1] === 'dropoffPort') {
const res = PortDict.value.length
? PortDict.value
: (await GetClientPortSelectList())?.data
if (!PortDict.value.length) PortDict.value = res
const item = res.filter((item) => {
return item.portName === changes[0][3]
})
if (item) dict = item[0]
console.log(dict)
if (changes[0][1] === 'pickupPort') {
list.value[changes[0][0]]['pickupPort'] = dict?.portName
list.value[changes[0][0]]['pickupPortid'] = dict?.id
list.value[changes[0][0]]['pickupPortCode'] = dict?.ediCode
}
if (changes[0][1] === 'dropoffPort') {
list.value[changes[0][0]]['dropoffPort'] = dict?.portName
list.value[changes[0][0]]['dropoffPortid'] = dict?.id
list.value[changes[0][0]]['dropoffPortCode'] = dict?.ediCode
}
}
}
},
}
@ -482,6 +568,19 @@
})
}
}
//--------------------------------------- tab3 ---------------------------------------
//
const broReceiveData = ref([])
//
const broPayData = ref([])
//
const broReceive = (v) => {
broReceiveData.value = v
}
//
const broPay = (v) => {
broPayData.value = v
}
</script>
<style lang="less" scoped>
.ds-goods-tb-check {

@ -10,6 +10,32 @@ enum Api {
listDetail = '/containerManagementApi/CM_RentIn_Detail/GetCM_RentIn_DetailList',
editDetail = '/containerManagementApi/CM_RentIn_Detail/EditCM_RentIn_Detail',
delDetail = '/containerManagementApi/CM_RentIn_Detail/DeleteCM_RentIn_Detail',
Confirm = '/containerManagementApi/CM_RentIn/CM_RentIn_Confirm',
Cancel = '/containerManagementApi/CM_RentIn/CM_RentIn_Cancel',
}
// 租箱租入_确认 (Auth)
export function ApiConfirm(data: PageRequest) {
return request<DataResult>({
url: Api.Confirm,
method: 'post',
headers:{
'Content-Type':'application/json-patch+json'
},
data,
})
}
// 租箱租入_取消 (Auth)
export function ApiCancel(data: PageRequest) {
return request<DataResult>({
url: Api.Cancel,
method: 'post',
headers:{
'Content-Type':'application/json-patch+json'
},
data,
})
}
// 列表 (Auth)
export function ApiList(data: PageRequest) {

@ -1,7 +1,7 @@
import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
import { GetCtnSelectList } from '/@/api/common'
import { GetCtnSelectList, GetClientListByCode } from '/@/api/common'
import { GetDeptList } from '/@/views/operation/seaexport/api/BookingLedger'
import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore()
@ -24,75 +24,84 @@ const usedStateList = [
]
export const columns: BasicColumn[] = [
{
title: '箱业务号',
dataIndex: 'cntrno',
title: '箱业务号',
dataIndex: 'billno',
sorter: true,
width: 150,
},
{
title: '租箱/退租',
dataIndex: 'rentDirect',
title: '业务类型',
dataIndex: 'businessType',
sorter: true,
width: 150,
},
{
title: '租箱类型',
dataIndex: 'isOnline',
title: '租箱业务',
dataIndex: 'rentDirect',
sorter: true,
width: 200,
width: 150,
},
{
title: '业务状态',
dataIndex: 'usedState',
title: '租箱类型',
dataIndex: 'rentType',
sorter: true,
width: 200,
width: 150,
},
{
title: '所属分部',
dataIndex: 'ctnOwner',
title: '业务状态',
dataIndex: 'billState',
sorter: true,
width: 200,
},
{
title: '原箱主',
dataIndex: 'ctnSource',
dataIndex: 'oldContainerOwner',
sorter: true,
width: 200,
},
{
title: '业务日期',
dataIndex: 'ctnBizState',
dataIndex: 'bsdate',
sorter: true,
width: 200,
},
{
title: '会计期间',
dataIndex: 'billno',
dataIndex: 'accdate',
sorter: true,
width: 200,
},
{
title: '业务锁定',
dataIndex: 'ctnState',
dataIndex: 'isBusinessLocking',
sorter: true,
width: 200,
customRender: ({ text }) => {
if (text) {
return <Tag color="success"></Tag>
} else {
return <Tag color="error"></Tag>
}
return text
},
},
{
title: '费用锁定',
dataIndex: 'ctnBreakState',
sorter: true,
width: 200,
},
{
title: '费用状态',
dataIndex: 'depot',
dataIndex: 'isFeeLocking',
sorter: true,
width: 200,
customRender: ({ text }) => {
if (text) {
return <Tag color="success"></Tag>
} else {
return <Tag color="error"></Tag>
}
return text
},
},
{
title: '备注',
dataIndex: 'vehicleName',
dataIndex: 'remark',
sorter: true,
width: 200,
},
@ -111,9 +120,10 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input',
colProps: { span: 4 },
},
{
field: 'rentDirect',
label: '租箱/退租',
label: '租箱业务',
component: 'ApiSelect',
colProps: { span: 4 },
defaultValue: '',
@ -168,14 +178,15 @@ export const formSchema: FormSchema[] = [
show: false,
},
{
field: 'custno',
label: '租箱业务',
field: 'rentDirect',
label: '租箱业务',
component: 'Input',
colProps: { span: 6 },
show: false,
},
{
field: 'rentDirect',
label: '租箱/退租',
field: 'rentDirectId',
label: '租箱业务',
component: 'ApiSelect',
colProps: { span: 6 },
defaultValue: '',
@ -184,6 +195,9 @@ export const formSchema: FormSchema[] = [
api: () => {
return new Promise((resolve) => {
getDictOption('CM_RentDirect').then((res) => {
res.forEach((item) => {
item.value = parseInt(item.value)
})
resolve(res)
})
})
@ -194,28 +208,66 @@ export const formSchema: FormSchema[] = [
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {},
onChange: (e, obj) => {
if (e && obj) {
formModel.rentDirect = obj.label
} else {
formModel.rentDirect = ''
}
},
}
},
},
{
field: 'rentType',
label: '短租/长租',
label: '租箱类型',
component: 'Input',
colProps: { span: 6 },
},
{
label: '原箱主名称',
field: 'oldContainerOwner',
field: 'billState',
label: '业务状态',
component: 'Input',
defaultValue: '',
show: false,
colProps: { span: 6 },
},
{
field: 'oldContainerOwnerId',
label: '原箱主',
component: 'Input',
colProps: { span: 6 },
show: false,
},
{
field: 'oldContainerOwner',
label: '原箱主',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
allowClear: true,
showSearch: true,
api: GetClientListByCode,
params: { code: 'leasing' },
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
resultField: 'data',
immediate: false,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (e && obj) {
formModel.oldContainerOwnerId = obj.id
}
if (!e && !obj) {
formModel.oldContainerOwnerId = ''
}
},
}
},
},
{
field: 'bsdate',
@ -225,31 +277,44 @@ export const formSchema: FormSchema[] = [
defaultValue: '',
componentProps: {
showTime: true,
allowClear: true,
style: 'width:100%',
},
},
{
field: 'accdate',
label: '会计期间',
component: 'DatePicker',
component: 'MonthPicker',
colProps: { span: 6 },
defaultValue: '',
componentProps: {
showTime: true,
style: 'width:100%',
allowClear: true,
valueFormat: 'YYYY-MM',
format: 'YYYY-MM',
},
},
{
field: 'isBusinessLocking',
label: '业务锁定',
component: 'Input',
component: 'Switch',
defaultValue: false,
colProps: { span: 6 },
componentProps: {
checkedChildren: '是',
unCheckedChildren: '否',
},
},
{
field: 'isFeeLocking',
label: '费用锁定',
component: 'Input',
component: 'Switch',
defaultValue: false,
colProps: { span: 6 },
componentProps: {
checkedChildren: '是',
unCheckedChildren: '否',
},
},
{
field: 'remark',

@ -1,6 +1,6 @@
<template>
<div>
<BasicTable class="ds-table" @register="registerTable">
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit">
<template #tableTitle>
<a-button type="link" @click="handleCreate">
<span class="iconfont icon-tianjia"></span>
@ -12,28 +12,42 @@
cancel-text="否"
@confirm="handleDel"
>
<a-button type="link" disabled>
<a-button type="link">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button>
</a-popconfirm>
<a-button type="link" @click="handleCreate" disabled>
<span class="iconfont icon-tianjia"></span>
<a-button type="link" @click="Confirm" disabled>
<span class="iconfont icon-yiwancheng2"></span>
确认执行
</a-button>
<a-button type="link" @click="handleCreate" disabled>
<span class="iconfont icon-tianjia"></span>
<a-button type="link" @click="Cancel" disabled>
<span class="iconfont icon-weiwancheng"></span>
取消确认
</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: handleAudit.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { ApiList, ApiDel } from './api'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { ApiList, ApiDel, ApiConfirm, ApiCancel } from './api'
import { useModal } from '/@/components/Modal'
import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema } from './columns'
@ -84,6 +98,29 @@
isUpdate: false,
})
}
function Confirm() {
const select = getSelectRows()
if (select.length !== 1) {
notification.warning({ message: '请选择一条数据', duration: 3 })
} else {
ApiConfirm(select[0].id).then((res) => {
notification.success({ message: res.message, duration: 3 })
reload()
})
}
}
function Cancel() {
const select = getSelectRows()
if (select.length !== 1) {
notification.warning({ message: '请选择一条数据', duration: 3 })
} else {
ApiCancel(select[0].id).then((res) => {
notification.success({ message: res.message, duration: 3 })
reload()
})
}
}
function handleDel() {
const select = getSelectRows()
let ApiData: any = {
@ -107,4 +144,10 @@
function handleSuccess() {
reload()
}
function handleAudit(record) {
openModal(true, {
record,
isUpdate: true,
})
}
</script>

@ -43,7 +43,7 @@ export const columns: BasicColumn[] = [
},
{
title: '状态变动',
dataIndex: 'ctnState',
dataIndex: 'ctnFlowState',
sorter: true,
width: 200,
},

@ -7,13 +7,31 @@ enum Api {
multiEdit = '/containerManagementApi/CM_State_Change/CM_State_Change_Multi',
Changeinfo = '/containerManagementApi/CM_State_Change/GetCM_State_Change',
Changedel = '/containerManagementApi/CM_State_Change/DeleteCM_State_Change',
OnLine='/containerManagementApi/CM_State_Change/CM_State_Change_Multi_OnLine',
OffLine='/containerManagementApi/CM_State_Change/CM_State_Change_Multi_OffLine',
info = '/containerManagementApi/CM_CurrentState/GetCM_CurrentStateInfo',
del = '/mainApi/CodeCtn/BatchDelCodeCtn',
BasicsList = '/mainApi/CodeCtn/GetBasicsCodeCtnList',
ExistList = '/mainApi/CodeCtn/GetExistCodeCtnList',
Import = '/mainApi/CodeCtn/ImportCodeCtn',
}
// 批量上线 (Auth)
export function ApiOnLine(data: PageRequest) {
return request<DataResult>({
url: Api.OnLine,
method: 'post',
data,
})
}
// 批量下线 (Auth)
export function ApiOffLine(data: PageRequest) {
return request<DataResult>({
url: Api.OffLine,
method: 'post',
data,
})
}
// 列表 (Auth)
export function ApiChangeList(data: PageRequest) {
return request<DataResult>({

@ -17,7 +17,7 @@
<script lang="ts" setup>
import { ref } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { ApiChangeList, ApiChangeDel } from './api'
import { ApiChangeList, ApiChangeDel, ApiOnLine, ApiOffLine } from './api'
import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
@ -68,7 +68,7 @@
})
}
ApiChangeDel(ApiData).then((res) => {
ApiOnLine(ApiData).then((res) => {
console.log(res)
notification.success({ message: res.message, duration: 3 })
reload()
@ -88,7 +88,7 @@
})
}
ApiChangeDel(ApiData).then((res) => {
ApiOffLine(ApiData).then((res) => {
console.log(res)
notification.success({ message: res.message, duration: 3 })
reload()

@ -21,7 +21,7 @@ import {
GetServiceSelectList,
GetVoynoSelectList,
GetVesselSelectList,
GetClientGoodsList
GetClientGoodsList,
} from '/@/views/operation/seaexport/api/BookingLedger'
import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore()
@ -134,7 +134,7 @@ export const basicInfoFormSchema: FormSchema[] = [
if (!e && !obj) {
formModel.customerId = ''
}
}
},
}
},
},
@ -143,7 +143,7 @@ export const basicInfoFormSchema: FormSchema[] = [
label: '客户编号',
component: 'Input',
required: false,
colProps: { span: 4 }
colProps: { span: 4 },
},
{
field: 'shipperCnId',
@ -175,9 +175,9 @@ export const basicInfoFormSchema: FormSchema[] = [
if (!e && !obj) {
formModel.shipperCnId = null
}
}
},
}
}
},
},
{
field: 'accountDate',
@ -189,7 +189,7 @@ export const basicInfoFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: {
valueFormat: 'YYYY-MM',
format: 'YYYY-MM'
format: 'YYYY-MM',
},
},
{
@ -199,7 +199,7 @@ export const basicInfoFormSchema: FormSchema[] = [
required: false,
dynamicDisabled: true,
colProps: { span: 4 },
colSlot: 'isBusinessLocking'
colSlot: 'isBusinessLocking',
},
{
field: 'blType',
@ -224,21 +224,21 @@ export const basicInfoFormSchema: FormSchema[] = [
if (!v && !obj) {
formModel.blType = null
}
}
},
}
}
},
},
{
field: 'blTypeCode',
label: '装运方式',
component: 'Input',
show: false
show: false,
},
{
label: '',
component: 'Input',
field: 'sourceCode',
show: false
show: false,
},
{
label: '业务来源',
@ -359,7 +359,7 @@ export const basicInfoFormSchema: FormSchema[] = [
label: '结算方式',
slot: 'stlName',
component: 'Input',
colProps: { span: 4 }
colProps: { span: 4 },
},
{
field: 'stlDate',
@ -367,7 +367,7 @@ export const basicInfoFormSchema: FormSchema[] = [
slot: 'stlDate',
component: 'Input',
// defaultValue: '',
colProps: { span: 4 }
colProps: { span: 4 },
},
{
label: '揽货人',
@ -450,12 +450,12 @@ export const basicInfoFormSchema: FormSchema[] = [
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
},
},
})
})
}
}
},
},
},
{
label: '所属部门',
@ -507,7 +507,7 @@ export const basicInfoFormSchema: FormSchema[] = [
if (!e && !obj) {
formModel.operatorId = null
}
}
},
}
},
},
@ -515,7 +515,7 @@ export const basicInfoFormSchema: FormSchema[] = [
field: 'operatorId',
label: '',
component: 'Input',
show: false
show: false,
},
{
label: '客服',
@ -542,7 +542,7 @@ export const basicInfoFormSchema: FormSchema[] = [
if (!e && !obj) {
formModel.customerService = null
}
}
},
}
},
},
@ -550,7 +550,7 @@ export const basicInfoFormSchema: FormSchema[] = [
field: 'customerService',
label: '',
component: 'Input',
show: false
show: false,
},
{
label: '单证',
@ -577,7 +577,7 @@ export const basicInfoFormSchema: FormSchema[] = [
if (!e && !obj) {
formModel.doc = null
}
}
},
}
},
},
@ -585,7 +585,7 @@ export const basicInfoFormSchema: FormSchema[] = [
field: 'doc',
label: '',
component: 'Input',
show: false
show: false,
},
{
label: '海外客服',
@ -611,7 +611,7 @@ export const basicInfoFormSchema: FormSchema[] = [
if (!e && !obj) {
formModel.foreignCustomerService = null
}
}
},
}
},
},
@ -619,7 +619,7 @@ export const basicInfoFormSchema: FormSchema[] = [
field: 'foreignCustomerService',
label: '',
component: 'Input',
show: false
show: false,
},
{
label: '所属分部',
@ -647,15 +647,15 @@ export const basicInfoFormSchema: FormSchema[] = [
} else {
formModel.saleOrgName = ''
}
}
},
}
}
},
},
{
field: 'saleDeptName',
label: '',
component: 'Input',
show: false
show: false,
},
{
field: 'saleDeptId',
@ -680,9 +680,9 @@ export const basicInfoFormSchema: FormSchema[] = [
} else {
formModel.saleDeptName = ''
}
}
},
}
}
},
},
{
label: '',
@ -750,9 +750,9 @@ export const basicInfoFormSchema: FormSchema[] = [
if (!e && !obj) {
formModel.truckerId = ''
}
}
},
}
}
},
},
{
label: '船公司id',
@ -786,9 +786,9 @@ export const basicInfoFormSchema: FormSchema[] = [
if (!e && !obj) {
formModel.carrierId = ''
}
}
},
}
}
},
},
{
label: '订舱代理',
@ -821,7 +821,7 @@ export const basicInfoFormSchema: FormSchema[] = [
if (!e && !obj) {
formModel.forwarderId = ''
}
}
},
}
},
},
@ -858,9 +858,9 @@ export const basicInfoFormSchema: FormSchema[] = [
if (!e && !obj) {
formModel.shipAgencyId = ''
}
}
},
}
}
},
},
{
label: '',
@ -893,9 +893,9 @@ export const basicInfoFormSchema: FormSchema[] = [
if (!e && !obj) {
formModel.yardId = ''
}
}
},
}
}
},
},
{
label: '',
@ -932,7 +932,7 @@ export const basicInfoFormSchema: FormSchema[] = [
},
}
},
}
},
// {
// field: 'czRemark',
// label: '操作备注',
@ -989,9 +989,9 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
formModel.shipper = obj.label
formModel.shipperContent = obj.content
}
}
},
}
}
},
},
{
label: ' ',
@ -1000,8 +1000,8 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
defaultValue: '',
colProps: { span: 24 },
componentProps: {
slice: [30, 35, 40]
}
slice: [30, 35, 40],
},
},
// {
// field: 'fhr',
@ -1073,9 +1073,9 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
formModel.consignee = obj.label
formModel.consigneeContent = obj.content
}
}
},
}
}
},
},
// {
// field: 'shr',
@ -1112,8 +1112,8 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
defaultValue: '',
colProps: { span: 24 },
componentProps: {
slice: [30, 35, 40]
}
slice: [30, 35, 40],
},
},
{
label: '',
@ -1177,9 +1177,9 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
formModel.notifyParty = obj.label
formModel.notifyPartyContent = obj.content
}
}
},
}
}
},
},
// {
// field: 'tzr',
@ -1223,9 +1223,9 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
defaultValue: '',
colProps: { span: 24 },
componentProps: {
slice: [30, 35, 40]
}
}
slice: [30, 35, 40],
},
},
]
export const mailingInfoFormSchemaR: FormSchema[] = [
@ -1296,7 +1296,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
labelField: 'voyNo',
valueField: 'voyNo',
resultField: 'data',
immediate: false
immediate: false,
}
},
},
@ -1327,9 +1327,9 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
formModel.receiptPlace = null
formModel.receiptPlaceId = null
}
}
},
}
}
},
},
{
label: '收货地',
@ -1342,7 +1342,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
label: '收货地Id',
field: 'receiptPlaceId',
component: 'Input',
show: false
show: false,
},
{
label: '装货港代码',
@ -1369,9 +1369,9 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
formModel.loadPortId = null
formModel.loadPort = null
}
}
},
}
}
},
},
{
label: '装货港',
@ -1384,7 +1384,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
label: '装货港Id',
field: 'loadPortId',
component: 'Input',
show: false
show: false,
},
{
label: '中转港代码',
@ -1413,7 +1413,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
formModel.transPortId = null
formModel.transPort = null
}
}
},
}
},
},
@ -1428,7 +1428,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
label: '中转港Id',
field: 'transPortId',
component: 'Input',
show: false
show: false,
},
{
label: '卸货港代码',
@ -1457,9 +1457,9 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
formModel.dischargePortId = null
formModel.dischargePort = null
}
}
},
}
}
},
},
{
label: '卸货港',
@ -1472,7 +1472,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
label: '卸货港Id',
field: 'dischargePortId',
component: 'Input',
show: false
show: false,
},
{
label: '交货地代码',
@ -1516,7 +1516,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
label: '交货地Id',
field: 'deliveryPlaceId',
component: 'Input',
show: false
show: false,
},
{
field: 'closingDate',
@ -1529,7 +1529,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
componentProps: {
showTime: true,
allowClear: true,
valueFormat: 'YYYY-MM-DD HH:mm'
valueFormat: 'YYYY-MM-DD HH:mm',
},
},
{
@ -1543,7 +1543,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
componentProps: {
showTime: true,
allowClear: true,
valueFormat: 'YYYY-MM-DD HH:mm'
valueFormat: 'YYYY-MM-DD HH:mm',
},
},
{
@ -1605,7 +1605,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
if (!v && !obj) {
formModel.termDelivery = null
}
}
},
}
},
},
@ -1613,7 +1613,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
field: 'termDelivery',
label: '贸易方式',
component: 'Select',
show: false
show: false,
},
{
field: 'tradeTermCode',
@ -1638,7 +1638,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
if (!v && !obj) {
formModel.tradeTerm = null
}
}
},
}
},
},
@ -2032,9 +2032,9 @@ export const mastetMoreFormSchema: FormSchema[] = [
if (e) {
formModel.masterConsigneeContent = e.res
}
}
},
}
}
},
},
{
label: '',
@ -2073,7 +2073,7 @@ export const cargoInfoFormSchema1: FormSchema[] = [
span: 12,
},
componentProps: {
slice: [14, 15]
slice: [14, 15],
},
},
{
@ -2084,9 +2084,9 @@ export const cargoInfoFormSchema1: FormSchema[] = [
dynamicDisabled: false,
colProps: { span: 12 },
componentProps: {
slice: [30, 35, 40]
}
}
slice: [30, 35, 40],
},
},
]
export const cargoInfoFormSchema2: FormSchema[] = [
{
@ -2138,7 +2138,7 @@ export const cargoInfoFormSchema2: FormSchema[] = [
formActionType ? formActionType.submit() : null
}, 10)
}
}
},
}
},
},
@ -2162,14 +2162,14 @@ export const cargoInfoFormSchema2: FormSchema[] = [
component: 'InputNumber',
required: false,
colProps: { span: 12 },
}
},
]
export const cargoInfoFormSchema3: FormSchema[] = [
{
label: '',
field: 'goodsId',
component: 'Input',
show: false
show: false,
},
{
field: 'goodsName',
@ -2197,7 +2197,7 @@ export const cargoInfoFormSchema3: FormSchema[] = [
formModel.goodsId = null
formModel.hsCode = null
}
}
},
}
},
},
@ -2386,8 +2386,8 @@ export const otherInfoFormSchema: FormSchema[] = [
// defaultValue: '',
colProps: { span: 8 },
componentProps: {
autoSize: { minRows: 3, maxRows: 3 }
}
autoSize: { minRows: 3, maxRows: 3 },
},
},
{
field: 'bookingRemark',
@ -2398,8 +2398,8 @@ export const otherInfoFormSchema: FormSchema[] = [
// defaultValue: '',
colProps: { span: 8 },
componentProps: {
autoSize: { minRows: 3, maxRows: 3 }
}
autoSize: { minRows: 3, maxRows: 3 },
},
},
{
field: 'closeDocRemark',
@ -2410,8 +2410,8 @@ export const otherInfoFormSchema: FormSchema[] = [
// defaultValue: '',
colProps: { span: 8 },
componentProps: {
autoSize: { minRows: 3, maxRows: 3 }
}
autoSize: { minRows: 3, maxRows: 3 },
},
},
{
field: 'issueType',
@ -2445,7 +2445,7 @@ export const otherInfoFormSchema: FormSchema[] = [
formModel.noBill = null
formModel.copyNoBill = null
}
}
},
}
},
},
@ -2453,7 +2453,7 @@ export const otherInfoFormSchema: FormSchema[] = [
field: 'issueTypeCode',
label: '签单方式code',
component: 'Input',
show: false
show: false,
},
{
field: 'issueDate',
@ -2491,7 +2491,7 @@ export const otherInfoFormSchema: FormSchema[] = [
formModel.issuePlace = null
formModel.issuePlaceId = null
}
}
},
}
},
},
@ -2500,13 +2500,13 @@ export const otherInfoFormSchema: FormSchema[] = [
field: 'issuePlace',
component: 'Input',
required: false,
colProps: { span: 4 }
colProps: { span: 4 },
},
{
label: '签单地Id',
field: 'issuePlaceId',
component: 'Input',
show: false
show: false,
},
{
field: 'mblFrt',
@ -2535,7 +2535,7 @@ export const otherInfoFormSchema: FormSchema[] = [
if (!e && !obj) {
formModel.mblFrtCode = null
}
}
},
}
},
},
@ -2582,9 +2582,9 @@ export const otherInfoFormSchema: FormSchema[] = [
formModel.prepareAtId = null
formModel.prepareAtCode = null
}
}
},
}
}
},
},
{
field: 'service',
@ -2613,7 +2613,7 @@ export const otherInfoFormSchema: FormSchema[] = [
if (!e && !obj) {
formModel.serviceCode = null
}
}
},
}
},
},
@ -2621,7 +2621,7 @@ export const otherInfoFormSchema: FormSchema[] = [
field: 'serviceCode',
label: '运输条款代码',
component: 'Input',
show: false
show: false,
},
{
field: 'noBill',
@ -2654,9 +2654,9 @@ export const otherInfoFormSchema: FormSchema[] = [
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
},
},
},
]
// 客户类别下拉框数据
@ -2672,7 +2672,7 @@ export const personFormSchema: FormSchema[] = [
field: 'id',
label: '',
component: 'Input',
show: false
show: false,
},
{
field: 'customerType',
@ -2733,23 +2733,23 @@ export const personFormSchema: FormSchema[] = [
formModel.tel = ''
}
// 设置关系人下拉
GetOrderContactListByClientId({ id: v }).then(res => {
personList.value = res.data.map(item => {
GetOrderContactListByClientId({ id: v }).then((res) => {
personList.value = res.data.map((item) => {
return {
label: item.shortName,
value: item.id
value: item.id,
}
})
})
}
},
}
}
},
},
{
field: 'customerName',
label: '',
component: 'Input',
show: false
show: false,
},
{
field: 'customerContactId',
@ -2770,15 +2770,15 @@ export const personFormSchema: FormSchema[] = [
} else {
formModel.name = null
}
}
},
}
}
},
},
{
field: 'name',
label: '',
component: 'Input',
show: false
show: false,
},
{
label: '邮箱',
@ -2798,15 +2798,15 @@ export const personFormSchema: FormSchema[] = [
defaultValue: '',
component: 'Input',
show: false,
colProps: { span: 24 }
colProps: { span: 24 },
},
{
field: 'note',
label: '备注',
defaultValue: '',
component: 'InputTextArea',
colProps: { span: 24 }
}
colProps: { span: 24 },
},
]
// 关系人表格

Loading…
Cancel
Save