szh-new
张同海 4 months ago
parent 4720bdcecc
commit 2353c7a9ad

@ -3,7 +3,8 @@
v-bind="$attrs"
:use-wrapper="true"
title="箱状态批量维护"
width="55%"
width="30%"
:height="600"
@register="registerModal"
@ok="handleSave"
>

@ -1,5 +1,4 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
import { GetCtnSelectList } from '/@/api/common'
export const columns: BasicColumn[] = [
{
@ -15,128 +14,14 @@ export const columns: BasicColumn[] = [
width: 150,
},
{
title: '集装箱类型',
dataIndex: 'ctnType',
sorter: true,
width: 200,
},
{
title: '新旧箱',
dataIndex: 'usedState',
sorter: true,
width: 200,
},
{
title: '箱主',
dataIndex: 'ctnOwner',
sorter: true,
width: 200,
},
{
title: '业务所属分部',
dataIndex: 'corpid',
sorter: true,
width: 200,
},
{
title: '箱来源',
dataIndex: 'ctnSource',
sorter: true,
width: 200,
},
{
title: '箱业务状态',
dataIndex: 'ctnBizState',
sorter: true,
width: 200,
},
{
title: '箱业务编号',
dataIndex: 'billno',
sorter: true,
width: 200,
},
{
title: '关联放箱单号',
dataIndex: 'ctnReleaseNo',
sorter: true,
width: 200,
},
{
title: '箱状态',
dataIndex: 'ctnState',
sorter: true,
width: 200,
},
{
title: '箱损坏',
dataIndex: 'ctnBreakState',
sorter: true,
width: 200,
},
{
title: '是否上线',
dataIndex: 'isOnline',
sorter: true,
width: 200,
},
{
title: '空重箱',
dataIndex: 'isHeavy',
sorter: true,
width: 200,
},
{
title: '当前港口',
dataIndex: 'portid',
sorter: true,
width: 200,
},
{
title: '码头或场站',
dataIndex: 'depot',
sorter: true,
width: 200,
},
{
title: '运输工具',
dataIndex: 'vehicleName',
sorter: true,
width: 200,
},
{
title: '当前业务编号',
dataIndex: 'mblno',
sorter: true,
width: 200,
},
{
title: '业务委托单位',
dataIndex: 'customerName',
sorter: true,
width: 200,
},
{
title: 'ETD',
dataIndex: 'etd',
sorter: true,
width: 200,
},
{
title: 'ETA',
dataIndex: 'eta',
sorter: true,
width: 200,
},
{
title: '状态时间',
dataIndex: 'stateTime',
title: '箱皮重',
dataIndex: 'ctnWeight',
sorter: true,
width: 200,
},
{
title: '箱皮重',
dataIndex: 'ctnWeight',
title: '箱生产时间',
dataIndex: 'productionDate',
sorter: true,
width: 200,
},
@ -150,8 +35,8 @@ export const columns: BasicColumn[] = [
export const searchFormSchema: FormSchema[] = [
{
field: 'CtnName',
label: '表现形式',
field: 'cntrno',
label: '集装箱号',
component: 'Input',
colProps: { span: 6 },
},
@ -167,20 +52,14 @@ export const formSchema: FormSchema[] = [
{
field: 'cntrno',
label: '集装箱号',
component: 'InputTextArea',
required: true,
colProps: { span: 24 },
componentProps: {
placeholder: '请输入,多个箱号请以“,”逗号间隔',
rows: 3,
},
component: 'Input',
colProps: { span: 20 },
},
{
field: 'ctnall',
label: '箱型',
component: 'ApiSelect',
colProps: { span: 6 },
required: true,
colProps: { span: 20 },
componentProps: () => {
return {
api: GetCtnSelectList,
@ -190,140 +69,26 @@ export const formSchema: FormSchema[] = [
}
},
},
{
field: 'usedState',
label: '新旧箱',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnOwner',
label: '箱主',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'corpid',
label: '业务所属分部',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnSource',
label: '箱来源',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnBizState',
label: '箱业务状态',
component: 'InputNumber',
colProps: { span: 6 },
},
{
field: 'billno',
label: '箱业务编号',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnReleaseNo',
label: '关联放箱单号',
component: 'Input',
colProps: { span: 6 },
required: true,
},
{
field: 'ctnState',
label: '箱状态',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnBreakState',
label: '箱损坏',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'isOnline',
label: '是否上线',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'isHeavy',
label: '空重箱',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'portid',
label: '当前港口',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'depot',
label: '码头或场站',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'vehicleName',
label: '运输工具',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'mblno',
label: '当前业务编号',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'customerName',
label: '业务委托单位',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'etd',
label: 'ETD',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'eta',
label: 'ETA',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'stateTime',
label: '状态时间',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnWeight',
label: '箱皮重',
component: 'Input',
colProps: { span: 6 },
component: 'InputNumber',
colProps: { span: 20 },
},
{
field: 'productionDate',
label: '生产日期',
component: 'Input',
colProps: { span: 6 },
component: 'DatePicker',
colProps: { span: 20 },
componentProps: {
showTime: false,
style: 'width:100%',
},
},
{
field: 'ctnValue_Base',
label: '箱初期成本',
component: 'Input',
colProps: { span: 6 },
component: 'InputNumber',
colProps: { span: 20 },
},
]

@ -2,12 +2,12 @@
<div>
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit">
<template #tableTitle>
<a-button type="link" @click="handleCreate" :disabled="checkPermissions('op:ctn:add')">
<a-button type="link" @click="handleCreate">
<span class="iconfont icon-piliangbianji"></span>
批量维护
维护
</a-button>
</template>
<template #bodyCell="{ column, record }">
<!-- <template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
@ -15,12 +15,11 @@
icon: 'ant-design:file-search-outlined',
tooltip: '编辑',
onClick: handleAudit.bind(null, record),
disabled: checkPermissions('op:ctn:edit'),
},
]"
/>
</template>
</template>
</template> -->
</BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
</div>
@ -67,10 +66,10 @@
postParam.pageCondition.sortConditions = []
}
let condition: API.ConditionItem[] = []
if (!!data.CtnName) {
if (!!data.cntrno) {
condition.push({
FieldName: 'CtnName',
FieldValue: data.CtnName,
FieldName: 'cntrno',
FieldValue: data.cntrno,
ConditionalType: 1,
})
}
@ -95,12 +94,12 @@
canResize: true,
resizeHeightOffset: 35,
immediate: true,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
// actionColumn: {
// width: 80,
// title: '',
// dataIndex: 'action',
// fixed: 'right',
// },
})
function handleCreate() {
openModal(true, {
@ -110,12 +109,12 @@
}
function handleAudit(record: Recordable) {
if (!checkPermissions('op:ctn:edit')) {
// if (!checkPermissions('op:ctn:edit')) {
openModal(true, {
record,
isUpdate: true,
})
}
// }
}
function handleSuccess() {
reload()

@ -168,7 +168,7 @@ export const formSchema: FormSchema[] = [
field: 'cntrno',
label: '集装箱号',
component: 'InputTextArea',
required: true,
// required: true,
colProps: { span: 24 },
componentProps: {
placeholder: '请输入,多个箱号请以“,”逗号间隔',
@ -180,7 +180,7 @@ export const formSchema: FormSchema[] = [
label: '箱型',
component: 'ApiSelect',
colProps: { span: 6 },
required: true,
// required: true,
componentProps: () => {
return {
api: GetCtnSelectList,
@ -246,7 +246,7 @@ export const formSchema: FormSchema[] = [
label: '关联放箱单号',
component: 'Input',
colProps: { span: 6 },
required: true,
// required: true,
},
{
field: 'ctnState',

@ -49,7 +49,7 @@
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const { notification } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: CADformSchema,
@ -92,7 +92,7 @@
loading.value = true
const res: API.DataResult = await editClientBank(values)
if (res.succeeded) {
createMessage.success(res.message)
notification.success({ message: res.message, duration: 3 })
emit('success')
//
if (!exit) {

@ -166,7 +166,7 @@
console.log(Number(nval) > 2, !rowId.value, rowId.value)
if (Number(nval) > 2 && !rowId.value) {
activeKey.value = oval
notification.warning('请先保存!')
notification.warning({ message: '请先保存!', duration: 3 })
console.log(nval, oval)
}
})
@ -450,10 +450,10 @@
async function handleSave(exit) {
try {
const values = await validate().catch(() => {
notification.warning('请补全基本信息中必填内容!')
notification.warning({ message: '请补全基本信息中必填内容!', duration: 3 })
})
// const values1 = await validate1().catch(() => {
// notification.warning('')
// notification.warning({ message: '', duration: 3 })
// })
// if (values && values1) {
if (values) {
@ -529,7 +529,7 @@
// // })
// })
notification.success(res.message)
notification.success({ message: res.message, duration: 3 })
emit('success')
// //
// if (!exit) {
@ -542,7 +542,7 @@
// }
// }
} else {
notification.error(res.message)
notification.error({ message: res.message, duration: 3 })
}
// exit && closeModal()
@ -683,7 +683,7 @@
})
DeleteInvoiceHeader(ApiData).then((res) => {
if (res.succeeded) {
notification.success(res.message)
notification.success({ message: res.message, duration: 3 })
}
})
}

@ -63,7 +63,7 @@
// loading
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const { notification } = useMessage()
const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(
async (data) => {
@ -105,10 +105,8 @@
})
loading.value = false
if (res.succeeded) {
createMessage.success(res.message)
notification.success({ message: res.message, duration: 3 })
emit('success')
} else {
createMessage.error(res.message)
}
exit && closeModal()
} finally {

@ -59,20 +59,20 @@
// loading
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] =
useForm({
const { notification } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] = useForm({
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
})
const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(async (data) => {
const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(
async (data) => {
resetFields()
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
setModalProps({ confirmLoading: true });
setModalProps({ confirmLoading: true })
updateFormField(updateSchema)
rowId.value = data.record.id
const res: API.DataResult = await GetClientParamInfo({ id: unref(rowId) })
@ -84,11 +84,12 @@
} else {
setFieldsValue({
customerId: data.clientId,
customerName: data.customerName
customerName: data.customerName,
})
}
setModalProps({ loading: false })
})
},
)
const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'))
@ -100,10 +101,8 @@
const res: API.DataResult = await EditClientParam(values)
loading.value = false
if (res.succeeded) {
createMessage.success(res.message)
notification.success({ message: res.message, duration: 3 })
emit('success')
} else {
createMessage.error(res.message)
}
exit && closeModal()
} finally {

@ -72,7 +72,7 @@
import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema, formSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
const { notification } = useMessage()
import { useGo } from '/@/hooks/web/usePage'
const go = useGo()
import { useAppStore } from '/@/store/modules/app'
@ -223,7 +223,7 @@
ids: ids,
})
if (res.succeeded) {
createMessage.success(res.message)
notification.success({ message: res.message, duration: 3 })
reload()
}
}

@ -49,7 +49,7 @@
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const { notification } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: formSchema,
@ -90,7 +90,7 @@
const res: API.DataResult = await ApiEdit(values)
console.log(res)
if (res.succeeded) {
createMessage.success(res.message)
notification.success({ message: res.message, duration: 3 })
emit('success')
//
if (!exit) {
@ -102,8 +102,6 @@
await refresh()
}
}
} else {
createMessage.error(res.message)
}
exit && closeModal()

@ -49,7 +49,7 @@
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const { notification } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: formSchema,
@ -90,7 +90,7 @@
const res: API.DataResult = await ApiEdit(values)
console.log(res)
if (res.succeeded) {
createMessage.success(res.message)
notification.success({ message: res.message, duration: 3 })
emit('success')
//
if (!exit) {
@ -102,8 +102,6 @@
await refresh()
}
}
} else {
createMessage.error(res.message)
}
exit && closeModal()

@ -49,7 +49,7 @@
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const { notification } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: formSchema,
@ -90,7 +90,7 @@
const res: API.DataResult = await ApiEdit(values)
console.log(res)
if (res.succeeded) {
createMessage.success(res.message)
notification.success({ message: res.message, duration: 3 })
emit('success')
//
if (!exit) {
@ -102,8 +102,6 @@
await refresh()
}
}
} else {
createMessage.error(res.message)
}
exit && closeModal()

@ -49,7 +49,7 @@
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const { notification } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: formSchema,
@ -90,7 +90,7 @@
const res: API.DataResult = await ApiEdit(values)
console.log(res)
if (res.succeeded) {
createMessage.success(res.message)
notification.success({ message: res.message, duration: 3 })
emit('success')
//
if (!exit) {
@ -102,8 +102,6 @@
await refresh()
}
}
} else {
createMessage.error(res.message)
}
exit && closeModal()

@ -49,7 +49,7 @@
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const { notification } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: formSchema,
@ -89,7 +89,7 @@
// loading.value = true;
const res: API.DataResult = await ApiEdit(values)
if (res.succeeded) {
createMessage.success(res.message)
notification.success({ message: res.message, duration: 3 })
emit('success')
//
if (!exit) {
@ -101,8 +101,6 @@
await refresh()
}
}
} else {
createMessage.error(res.message)
}
exit && closeModal()

@ -54,7 +54,7 @@
import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
import DsFile from '/@/components/File/index.vue'
const { createMessage } = useMessage()
const { notification } = useMessage()
const props = defineProps({
clientId: { type: String },
})
@ -139,9 +139,6 @@
function handleOk() {
visible.value = true
}
function waiting() {
createMessage.warning('待开发')
}
function handleCreate() {
openModal(true, {
clientId: props.clientId,

Loading…
Cancel
Save