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

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

@ -1,5 +1,4 @@
import { BasicColumn, FormSchema } from '/@/components/Table' import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
import { GetCtnSelectList } from '/@/api/common' import { GetCtnSelectList } from '/@/api/common'
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
@ -15,128 +14,14 @@ export const columns: BasicColumn[] = [
width: 150, width: 150,
}, },
{ {
title: '集装箱类型', title: '箱皮重',
dataIndex: 'ctnType', dataIndex: 'ctnWeight',
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',
sorter: true, sorter: true,
width: 200, width: 200,
}, },
{ {
title: '箱皮重', title: '箱生产时间',
dataIndex: 'ctnWeight', dataIndex: 'productionDate',
sorter: true, sorter: true,
width: 200, width: 200,
}, },
@ -150,8 +35,8 @@ export const columns: BasicColumn[] = [
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'CtnName', field: 'cntrno',
label: '表现形式', label: '集装箱号',
component: 'Input', component: 'Input',
colProps: { span: 6 }, colProps: { span: 6 },
}, },
@ -167,20 +52,14 @@ export const formSchema: FormSchema[] = [
{ {
field: 'cntrno', field: 'cntrno',
label: '集装箱号', label: '集装箱号',
component: 'InputTextArea', component: 'Input',
required: true, colProps: { span: 20 },
colProps: { span: 24 },
componentProps: {
placeholder: '请输入,多个箱号请以“,”逗号间隔',
rows: 3,
},
}, },
{ {
field: 'ctnall', field: 'ctnall',
label: '箱型', label: '箱型',
component: 'ApiSelect', component: 'ApiSelect',
colProps: { span: 6 }, colProps: { span: 20 },
required: true,
componentProps: () => { componentProps: () => {
return { return {
api: GetCtnSelectList, 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', field: 'ctnWeight',
label: '箱皮重', label: '箱皮重',
component: 'Input', component: 'InputNumber',
colProps: { span: 6 }, colProps: { span: 20 },
}, },
{ {
field: 'productionDate', field: 'productionDate',
label: '生产日期', label: '生产日期',
component: 'Input', component: 'DatePicker',
colProps: { span: 6 }, colProps: { span: 20 },
componentProps: {
showTime: false,
style: 'width:100%',
},
}, },
{ {
field: 'ctnValue_Base', field: 'ctnValue_Base',
label: '箱初期成本', label: '箱初期成本',
component: 'Input', component: 'InputNumber',
colProps: { span: 6 }, colProps: { span: 20 },
}, },
] ]

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save