szh-new
张同海 5 months ago
parent 5282f9fab8
commit 89a2e7ab3e

@ -0,0 +1,26 @@
import { request } from '/@/utils/request'
// ------------------------------------函电信息更改通知服务-----------------------------------------
// 列表 (Auth)
export function GetOpLetterChangeList(parameter) {
return request({
url: '/opApi/LetterChange/GetOpLetterChangeList',
method: 'post',
data: parameter,
})
}
// 编辑 (Auth)
export function EditOpLetterChange(parameter) {
return request({
url: '/opApi/LetterChange/EditOpLetterChange',
method: 'post',
data: parameter,
})
}
// 详情 (Auth)
export function GetOpLetterChangeInfo(parameter) {
return request({
url: '/opApi/LetterChange/GetOpLetterChangeInfo',
method: 'get',
params: parameter,
})
}

@ -0,0 +1,521 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore()
export const columns: BasicColumn[] = [
{
title: '主提单号',
dataIndex: 'mblno',
width: 150,
},
{
title: '卸货港',
dataIndex: 'dischargePort',
width: 150,
},
{
title: '船名航次',
dataIndex: 'vesselVoyNo',
width: 150,
},
{
title: '开船日期',
dataIndex: 'etd',
width: 150,
},
{
title: '件重尺',
dataIndex: 'pkc',
width: 150,
},
{
title: '箱型箱量',
dataIndex: 'cntr',
width: 150,
},
{
title: '更改项目',
dataIndex: 'projectName',
width: 150,
},
{
title: '原内容',
dataIndex: 'oldContent',
width: 150,
},
{
title: '现内容',
dataIndex: 'newContent',
width: 150,
},
{
title: '备注',
dataIndex: 'remark',
width: 150,
},
// {
// title: '状态',
// dataIndex: 'status',
// width: 100,
// customRender: ({ text }) => {
// if (text === 0) {
// return <Tag color="success">启用</Tag>
// } else if (text === 1) {
// return <Tag color="red">禁用</Tag>
// }
// return text
// },
// },
]
export const searchFormSchema: FormSchema[] = [
{
field: 'mblno',
label: '主提单号',
component: 'Input',
colProps: { span: 4 },
},
]
export const formSchema: FormSchema[] = [
{
label: '主键Id',
field: 'mainInfo.id',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: 'TO',
field: 'mainInfo.headTo',
component: 'Input',
defaultValue: '',
colProps: {
span: 24,
},
},
{
label: '业务编号',
field: 'mainInfo.bsno',
component: 'Input',
defaultValue: '',
dynamicDisabled: true,
colProps: {
span: 6,
},
},
{
label: 'ATTN',
field: 'mainInfo.headATTN',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: 'ATTN电话',
field: 'mainInfo.headATTNTel',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: 'ATTN传真',
field: 'mainInfo.headATTNFax',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: 'FROM电话',
field: 'mainInfo.headFromTel',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: 'FROM传真',
field: 'mainInfo.headFromFax',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
label: 'FROM邮箱',
field: 'mainInfo.headFromEmail',
component: 'Input',
defaultValue: '',
colProps: {
span: 6,
},
},
{
field: 'divider-selects',
component: 'Divider',
label: '变更通知详细信息',
colProps: {
span: 24,
},
},
{
label: '主键Id',
field: 'id',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: '主表Id',
field: 'letterId',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: '船名航次',
field: 'vesselVoyNo',
component: 'Input',
defaultValue: '',
colProps: {
span: 24,
},
},
{
label: '主提单号',
field: 'mblno',
component: 'Input',
defaultValue: '',
colProps: {
span: 24,
},
},
{
label: '卸货港',
field: 'dischargePort',
component: 'Input',
defaultValue: '',
colProps: {
span: 24,
},
},
{
label: '开船日期',
field: 'etd',
component: 'RangePicker',
defaultValue: '',
colProps: {
span: 24,
},
},
{
label: '件重尺',
field: 'pkc',
component: 'Input',
defaultValue: '',
colProps: {
span: 24,
},
},
{
label: '箱型箱量',
field: 'cntr',
component: 'Input',
defaultValue: '',
colProps: {
span: 24,
},
},
{
label: '更改项目',
field: 'projectName',
component: 'InputTextArea',
defaultValue: '',
colProps: {
span: 8,
},
componentProps: {
rows: 6,
},
},
{
label: '原内容',
field: 'oldContent',
component: 'InputTextArea',
defaultValue: '',
colProps: {
span: 8,
},
componentProps: {
rows: 6,
},
},
{
label: '现内容',
field: 'newContent',
component: 'InputTextArea',
defaultValue: '',
colProps: {
span: 8,
},
componentProps: {
rows: 6,
},
},
{
label: '备注',
field: 'remark',
component: 'InputTextArea',
defaultValue: '',
colProps: {
span: 24,
},
componentProps: {
rows: 3,
},
},
]
export const BankColumns: BasicColumn[] = [
{
title: '代码',
dataIndex: 'codeName',
width: 230,
align: 'left',
},
{
title: '币别',
dataIndex: 'currency',
width: 230,
align: 'left',
},
{
title: '银行名称',
dataIndex: 'bankName',
width: 230,
align: 'left',
},
{
title: '银行名称2',
dataIndex: 'bankName2',
width: 230,
align: 'left',
},
{
title: '银行账户',
dataIndex: 'bankAccountNo',
width: 230,
align: 'left',
},
{
title: '户头名称',
dataIndex: 'accountName',
width: 230,
align: 'left',
},
{
title: '科目代码',
dataIndex: 'subjectCode',
width: 230,
align: 'left',
},
{
title: '财务软件代码',
dataIndex: 'financeSoftCode',
width: 230,
align: 'left',
},
{
title: '是否默认',
dataIndex: 'isDefault',
width: 100,
customRender: ({ text }) => {
if (text === true) {
return <Tag color="success"></Tag>
} else if (text === false) {
return <Tag color="red"></Tag>
}
return text
},
},
{
title: '排序',
dataIndex: 'orderNo',
width: 100,
},
{
title: '状态',
dataIndex: 'status',
width: 100,
customRender: ({ text }) => {
if (text === 0) {
return <Tag color="success"></Tag>
} else if (text === 1) {
return <Tag color="red"></Tag>
}
return text
},
},
{
title: '备注',
dataIndex: 'note',
width: 100,
},
]
export const BankformSchema: FormSchema[] = [
{
field: 'divider-selects',
component: 'Divider',
label: '账户信息',
colProps: {
span: 24,
},
},
{
label: '',
field: 'id',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: '',
field: 'linkId',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: '代码',
field: 'codeName',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
field: 'currency',
label: '币别',
component: 'ApiSelect',
defaultValue: '',
colProps: { span: 12 },
componentProps: () => {
return {
allowClear: true,
showSearch: true,
option: optionsStore.getOptionsByCode('GetFeeCurrencySelectList'),
labelField: 'codeName',
valueField: 'codeName',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
{
label: '银行名称',
field: 'bankName',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '银行名称2',
field: 'bankName2',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '银行账户',
field: 'bankAccountNo',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '户头名称',
field: 'accountName',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '科目代码',
field: 'subjectCode',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '财务软件代码',
field: 'financeSoftCode',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '排序',
field: 'orderNo',
component: 'InputNumber',
defaultValue: '',
colProps: {
span: 12,
},
},
{
field: 'isDefault',
component: 'RadioButtonGroup',
label: '是否默认',
required: true,
componentProps: {
options: [
// { label: '是', value: 1 },
// { label: '否', value: 0 },
{ label: '是', value: true },
{ label: '否', value: false },
],
},
defaultValue: true,
colProps: {
span: 6,
},
},
{
field: 'status',
component: 'RadioButtonGroup',
label: '状态',
required: true,
componentProps: {
options: [
{ label: '启用', value: 0 },
{ label: '禁用', value: 1 },
],
},
defaultValue: 0,
colProps: {
span: 6,
},
},
]

@ -0,0 +1,140 @@
<template>
<BasicModal
v-bind="$attrs"
:use-wrapper="true"
title="变更通知"
width="60%"
@register="registerModal"
>
<BasicTable @register="registerLetterChangeTable">
<template #toolbar>
<a-button type="primary" @click="AddLetterChange"> </a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: EditLetterChange.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
<LetterChangeEdit
:letter-id="letterId"
@register="registerLetterChangeModal"
@success="handleSuccess"
/>
<!--右下角按钮-->
<template #footer>
<span></span>
<!-- <a-button
pre-icon="ant-design:close-outlined"
type="warning"
:loading="loading"
ghost
style="margin-right: 0.8rem"
@click="closeModal"
>取消</a-button
> -->
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { columns, searchFormSchema, formSchema, BankColumns } from './LetterChangeColumns'
import { BasicModal, useModalInner, useModal } from '/@/components/Modal'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { GetOpLetterChangeList } from './LetterApi'
import LetterChangeEdit from './LetterChangeEdit.vue'
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
const emit = defineEmits(['success', 'register'])
const loading = ref(false)
const letterId = ref()
const [registerModal] = useModalInner(async (data) => {
letterId.value = data.id
})
const [registerLetterChangeTable, { reload, getForm, getPaginationRef }] = useTable({
api: async (p) => {
const res: API.DataResult = await GetOpLetterChangeList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
resizeHeightOffset: 50,
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[] = []
condition.push({
FieldName: 'letterId',
FieldValue: letterId.value,
ConditionalType: 1,
})
if (!!data.mblno) {
condition.push({
FieldName: 'mblno',
FieldValue: data.mblno,
ConditionalType: 1,
})
}
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: true,
bordered: true,
showIndexColumn: true,
indexColumnProps: {
fixed: 'left',
},
canResize: true,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
})
const [registerLetterChangeModal, { openModal }] = useModal()
function AddLetterChange() {
openModal(true, {
isParent: false,
isUpdate: false,
letterId: letterId.value,
})
}
function EditLetterChange(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
})
}
function handleSuccess() {
// letterId.value = 0
reload()
}
</script>

@ -0,0 +1,137 @@
<template>
<BasicModal
v-bind="$attrs"
:use-wrapper="true"
:title="getTitle"
width="60%"
@register="registerModal"
@ok="handleSave"
>
<BasicForm @register="registerForm" />
<!--右下角按钮-->
<template #footer>
<a-button
pre-icon="ant-design:close-outlined"
type="warning"
:loading="loading"
ghost
style="margin-right: 0.8rem"
@click="closeModal"
>取消</a-button
>
<a-button
type="success"
:loading="loading"
pre-icon="ant-design:check-outlined"
style="margin-right: 0.8rem"
@click="handleSave(false)"
>仅保存</a-button
>
<a-button
pre-icon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
@click="handleSave(true)"
>保存并关闭</a-button
>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref, h } from 'vue'
import { BasicModal, useModalInner, useModal } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema, BankColumns } from './LetterChangeColumns'
import { GetOpLetterChangeList, EditOpLetterChange ,GetOpLetterChangeInfo} from './LetterApi'
import { editOrg, getOrgInfo, getOrgTree, getBankList } from '/@/api/system/org'
import { useMessage } from '/@/hooks/web/useMessage'
import { propTypes } from '/@/utils/propTypes'
const props = defineProps({
letterId: propTypes.object,
})
// Emits
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] = useForm({
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
})
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 GetOpLetterChangeInfo({ id: unref(rowId) })
if (res.succeeded) {
setFieldsValue({
...res.data,
})
}
} else {
setFieldsValue({ permissionIdentity: unref(2) })
}
setModalProps({ loading: false })
})
const getTitle = computed(() => (!unref(isUpdate) ? '新增变更通知' : '编辑变更通知'))
async function handleSave(exit) {
try {
setModalProps({ confirmLoading: true, loading: true })
let ApiData: any = {
mainInfo: {},
}
const values = await validate()
console.log(values)
Object.keys(values).forEach((item) => {
if (item.includes('mainInfo.')) {
// item.split('mainInfo.')
ApiData.mainInfo[item.split('mainInfo.')[1]] = values[item]
} else {
if (item == 'letterId' && !values.letterId) {
ApiData.letterId = props.letterId
} else {
ApiData[item] = values[item]
}
}
})
const res: API.DataResult = await EditOpLetterChange(ApiData)
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()
}
}
} else {
createMessage.error(res.message)
}
exit && closeModal()
} finally {
// loading.value = false;
setModalProps({ confirmLoading: false, loading: false })
}
}
async function refresh() {
const res: API.DataResult = await GetOpLetterChangeInfo({ id: unref(rowId) })
if (res.succeeded) {
await setFieldsValue({
...res.data,
})
}
}
</script>

@ -83,6 +83,10 @@
<button @click="FnTxxpLink">
<span class="iconfont icon-dayinxiaopiao"></span>提箱小票
</button>
<button @click="FnLetterChange">
<span class="iconfont icon-dayinxiaopiao"></span>变更通知
</button>
<LCDetails :letterId='details.id' @register="LCregisterModal" />
</div>
<!-- <div class="btn-list single-view-4" :style="{ width: '90px' }">
<a-upload
@ -816,6 +820,7 @@
</template>
<script lang="ts" setup>
import preOrder from './preOrder.vue'
import LCDetails from './Letter/LetterChangeDetails.vue'
import {
GetOpenPrintModuleList,
GetOpenPrintTemplateList,
@ -850,6 +855,7 @@
import { BookingTruckGetTruckListByBooking } from '/@/views/operation/seaexport/api/SendCar.js'
import { ref, reactive, getCurrentInstance, h, watch, onMounted } from 'vue'
import { Modal } from 'ant-design-vue'
import { useModal } from '/@/components/Modal'
import { useAppStore } from '/@/store/modules/app'
const appStore = useAppStore()
import { useRoute, useRouter } from 'vue-router'
@ -1396,9 +1402,7 @@
console.log(err)
})
}
function frompre() {
}
function frompre() {}
function getSampleBill() {
SampleBill(id.value)
.then((res) => {
@ -1453,6 +1457,14 @@
console.log(err)
})
}
const [LCregisterModal, { openModal: LCopenModal }] = useModal()
function FnLetterChange() {
LCopenModal(true, {
isParent: false,
isUpdate: false,
id: props.details.id,
})
}
function copyFun(data) {
const copyInput = document.createElement('input')
document.body.appendChild(copyInput)

@ -1071,6 +1071,7 @@
//
function FngetPageESeaeEdi() {
orderList.value.splice(0)
editIndex.value = 0
formState.value = {}
let ApiData = {
pageCondition: {
@ -1082,24 +1083,28 @@
}
GetShippingBillList(ApiData)
.then((res) => {
if (!res.succeeded) {
notification.error({ message: res.message, duration: 3 })
}
if (res.data.length > 0) {
res.data.forEach((e) => {
let isHBL = true
if (e.mblno == route.query.mblno) {
isHBL = false
}
orderList.value.push({ checked: true, isHBL, ...e })
})
formState.value = orderList.value[editIndex.value]
} else {
orderList.value.push({ checked: false })
orderList.value[editIndex.value].mblno = route.query.mblno
formState.value = orderList.value[editIndex.value]
if (res.succeeded) {
if (res.data.length > 0) {
res.data.forEach((e) => {
Object.keys(e).forEach((ObjK) => {
if (e[ObjK] == 0) {
e[ObjK] = ''
}
})
let isHBL = true
if (e.mblno == route.query.mblno) {
isHBL = false
}
orderList.value.push({ checked: true, isHBL, ...e })
})
formState.value = orderList.value[editIndex.value]
} else {
orderList.value.push({ checked: false })
orderList.value[editIndex.value].mblno = route.query.mblno
formState.value = orderList.value[editIndex.value]
}
GetCtnList()
}
GetCtnList()
})
.catch((err) => {
console.log(err)
@ -1465,23 +1470,25 @@
},
}
function GetCtnList() {
let ApiData = {
queryCondition: JSON.stringify([
{
FieldName: 'pid',
FieldValue: orderList.value[editIndex.value].id,
ConditionalType: 1,
if (orderList.value[editIndex.value].id) {
let ApiData = {
queryCondition: JSON.stringify([
{
FieldName: 'pid',
FieldValue: orderList.value[editIndex.value].id,
ConditionalType: 1,
},
]),
pageCondition: {
pageIndex: 1,
pageSize: 999,
sortConditions: [],
},
]),
pageCondition: {
pageIndex: 1,
pageSize: 999,
sortConditions: [],
},
}
GetShippingBillCtnList(ApiData).then((res) => {
list.vale = res.data
})
}
GetShippingBillCtnList(ApiData).then((res) => {
list.vale = res.data
})
}
function addCtn() {
list.value.push({})

Loading…
Cancel
Save