费用打印

szh-new
lijingjia 4 months ago
parent b9d764c09c
commit 1592554987

@ -24,7 +24,7 @@
import { editCodeGoodsType } from '/@/views/baseinfo/formset/api' import { editCodeGoodsType } from '/@/views/baseinfo/formset/api'
// idname // idname
import { permissionsInfo } from '/@/hooks/web/usePermission' import { permissionsInfo } from '/@/hooks/web/usePermission'
// //
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
// //
import { DiffOutlined } from '@ant-design/icons-vue' import { DiffOutlined } from '@ant-design/icons-vue'

@ -74,13 +74,13 @@
<a-dropdown> <a-dropdown>
<template #overlay> <template #overlay>
<a-menu> <a-menu>
<a-sub-menu :title="tbType == 'receive' ? '打印应付账单' : '打印应收账单'"> <a-sub-menu :title="tbType == 'receive' ? '打印应收账单' : '打印应付账单'">
<a-menu-item @click="printFee(1)">{{ tbType == 'receive' ? '' : '' }}</a-menu-item> <a-menu-item @click="printFee(1)">{{ tbType == 'receive' ? '' : '' }}</a-menu-item>
<a-menu-item @click="printFee(2)">{{ tbType == 'receive' ? '' : '' }}</a-menu-item> <a-menu-item @click="printFee(2)">{{ tbType == 'receive' ? '' : '' }}</a-menu-item>
<a-menu-item @click="printFee(3)">{{ tbType == 'receive' ? '' : '' }}</a-menu-item> <a-menu-item @click="printFee(3)">{{ tbType == 'receive' ? '' : '' }}</a-menu-item>
</a-sub-menu> </a-sub-menu>
<a-menu-item @click="feeTem"></a-menu-item> <a-menu-item @click="printAccount"></a-menu-item>
<a-menu-item @click="saveToTem"></a-menu-item> <!-- <a-menu-item @click="saveToTem"></a-menu-item> -->
</a-menu> </a-menu>
</template> </template>
<a-button type="link"> <a-button type="link">
@ -454,6 +454,48 @@
const dsPrint = ref(null) const dsPrint = ref(null)
// //
const printFee = async (type) => { const printFee = async (type) => {
const selectRow = props.data.filter(item => {
return item.selected
})
if (type == 1) {
if (!selectRow.length) {
return createMessage.warning('请勾选要打印的费用!')
}
dsPrint.value.init(selectRow)
} else if (type == 2) {
if (!selectRow.length) {
return createMessage.warning('请勾选要打印的费用!')
}
let customerNames = selectRow.map(item => {
return item.customerName
})
if (customerNames.length) {
customerNames = Array.from(new Set(customerNames))
const arr = []
props.data.forEach(res => {
customerNames.forEach(item => {
if (res.customerName == item) {
arr.push(res)
}
})
})
dsPrint.value.init(arr)
}
} else {
//
dsPrint.value.init(props.data)
}
// const ids = props.data.map(item => {
// return item.id
// })
// GetPrintInfo({ businessType: 1, ids }).then(res => {
// console.log(res.data.details)
// const data = res?.data?.details
// dsPrint.value.init(data)
// })
}
//
const printAccount = async () => {
const ids = props.data.map(item => { const ids = props.data.map(item => {
return item.id return item.id
}) })
@ -462,11 +504,6 @@
const data = res?.data?.details const data = res?.data?.details
dsPrint.value.init(data) dsPrint.value.init(data)
}) })
return
dsPrint.value.init()
const p = await GetOpenPrintModuleList()
console.log(p)
return
} }
</script> </script>

@ -1953,3 +1953,20 @@ export function BatchDelBillManageCtn(data) {
}) })
} }
// 历史提单信息历史列表
export function GetBillManageHistoryList(data) {
return request({
url: '/opApi/SeaExportBillManage/GetBillManageHistoryList',
method: 'post',
data
})
}
// 历史引入提单信息
export function ImportBillManageHistory(data) {
return request({
url: '/opApi/SeaExportBillManage/ImportBillManageHistory',
method: 'post',
data
})
}

@ -414,6 +414,7 @@
font-size: 12px; font-size: 12px;
position: relative; position: relative;
top: 3px; top: 3px;
white-space: nowrap;
} }
.ant-select-arrow { .ant-select-arrow {
top: 14px; top: 14px;
@ -446,6 +447,9 @@
margin-bottom: 4px; margin-bottom: 4px;
cursor: pointer; cursor: pointer;
} }
.right {
white-space: nowrap;
}
.line-count { .line-count {
position: absolute; position: absolute;
right: -15px; right: -15px;

@ -13,34 +13,6 @@
<span class="iconfont icon-a-xiaopiaofapiao-01"></span> <span class="iconfont icon-a-xiaopiaofapiao-01"></span>
小票状态 小票状态
</a-button> </a-button>
<!-- <div class="nav" @click="addBooking"> <i class="iconfont icon-jiahao2fill"></i>新建 </div>
<div class="nav" @click="copyBookingMore"><i class="iconfont icon-fuzhi1"></i>复制多票</div>
<div class="nav">
<a-dropdown>
<span> <i class="iconfont icon-bianjiwenjian"></i>批量操作 </span>
<template #overlay>
<a-menu>
<a-menu-item>
<a @click="batchEditing()" href="javascript:;">批量编辑</a>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</div> -->
<!-- <a-popconfirm
title="确定删除当前选中订舱?"
ok-text="是"
cancel-text="否"
@confirm="removeMoreFun"
>
<div class="nav"><i class="iconfont icon-shanchu2"></i>删除</div>
</a-popconfirm>
<div class="nav"><i class="iconfont icon-shishijifei"></i>定时订舱</div>
<div class="nav" @click="handleSearchTxxp">
<i class="iconfont icon-xiaopiaodayin"></i>小票状态
</div> -->
<a-modal <a-modal
title="输入复制数量" title="输入复制数量"
:visible="copyMoreFlag" :visible="copyMoreFlag"
@ -98,34 +70,6 @@
const copyMoreForm = reactive({ const copyMoreForm = reactive({
number: 1, number: 1,
}) })
//
function copyBookingMore() {
const select = props.selectRow()
const pkIdArr = select.map((item, index) => {
return item.id
})
if (pkIdArr.length === 0 || pkIdArr.length > 1) {
createMessage.warning('请仅选择一条数据!')
return false
}
copyMoreFlag.value = true
}
function handleSubmitCopyMore(e) {
const select = props.selectRow()
const pkIdArr = select.map((item) => {
return item.id
})
for (let index = 0; index < copyMoreForm.number; index++) {
setTimeout(() => {
console.log(`/?id=${pkIdArr[0]}&isCopy=${true}&copyId=${index}`)
router.push({
path: '/BookingDetail',
query: { id: pkIdArr[0], isCopy: true, copyId: index },
})
}, 100)
}
copyMoreFlag.value = false
}
// //
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
// //

@ -38,6 +38,7 @@
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>
<a-modal <a-modal
class="ds-modal-small"
title="输入复制数量" title="输入复制数量"
:visible="copyMoreFlag" :visible="copyMoreFlag"
:footer="null" :footer="null"
@ -48,6 +49,7 @@
:model="copyMoreForm" :model="copyMoreForm"
:label-col="{ span: 5 }" :label-col="{ span: 5 }"
:wrapper-col="{ span: 12 }" :wrapper-col="{ span: 12 }"
layout="vertical"
@submit="handleSubmitCopyMore" @submit="handleSubmitCopyMore"
:style="{ padding: '10px' }" :style="{ padding: '10px' }"
> >
@ -58,9 +60,9 @@
> >
<a-input-number :min="1" :max="10" v-model:value="copyMoreForm.number" /> <a-input-number :min="1" :max="10" v-model:value="copyMoreForm.number" />
</a-form-item> </a-form-item>
<a-form-item :wrapper-col="{ span: 12, offset: 5 }"> <div class="mt15" style="text-align: right;">
<a-button type="primary" html-type="submit">确定</a-button> <a-button type="primary" html-type="submit">确定</a-button>
</a-form-item> </div>
</a-form> </a-form>
</a-modal> </a-modal>
<BatchModification @register="registerModal" @success="BMSuccess" /> <BatchModification @register="registerModal" @success="BMSuccess" />
@ -72,7 +74,7 @@
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useModal } from '/@/components/Modal' import { useModal } from '/@/components/Modal'
import { SeaExportBatchDel, SaveBookingTxxp } from '../api/BookingLedger.js' import { SeaExportBatchDel, SaveBookingTxxp, SeaExportCopy } from '../api/BookingLedger.js'
import BatchModification from '../modules/BatchModification.vue' import BatchModification from '../modules/BatchModification.vue'
const router = useRouter() const router = useRouter()
const { createMessage } = useMessage() const { createMessage } = useMessage()
@ -106,19 +108,12 @@
} }
copyMoreFlag.value = true copyMoreFlag.value = true
} }
function handleSubmitCopyMore(e) { function handleSubmitCopyMore() {
const select = props.selectRow() const select = props.selectRow()
const pkIdArr = select.map((item) => { for (var i = 0; i < copyMoreForm.number; i++) {
return item.id SeaExportCopy({ id: select[0].id }).then(res => {
}) props.reload()
for (let index = 0; index < copyMoreForm.number; index++) { })
setTimeout(() => {
console.log(`/?id=${pkIdArr[0]}&isCopy=${true}&copyId=${index}`)
router.push({
path: '/BookingDetail',
query: { id: pkIdArr[0], isCopy: true, copyId: index },
})
}, 100)
} }
copyMoreFlag.value = false copyMoreFlag.value = false
} }

@ -0,0 +1,103 @@
<!--
* @Description: 提单信息历史数据列表弹窗组件
* @Author: lijj
* @Date: 2024-04-29 11:54:04
-->
<template>
<a-modal
title="提单信息"
@cancel="visible = false"
@ok="handleOk"
v-if="visible"
:visible="visible"
width="80%"
:loading="loading"
>
<BasicTable
@register="registerTable"
/>
</a-modal>
</template>
<script lang="ts" setup>
import { defineExpose, ref, defineProps } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { GetBillManageHistoryList, ImportBillManageHistory } from '../../api/BookingLedger.js'
import { columns, searchFormSchema } from './ladingInfo'
//
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
import { useI18n } from '/@/hooks/web/useI18n'
const { t } = useI18n()
const props = defineProps({
// id
id: {
type: String
},
//
reload: {
type: Function
}
})
//
import { formatParams } from '/@/hooks/web/common'
const [registerTable, { reload, getSelectRows }] = useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await GetBillManageHistoryList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
//
beforeFetch: (p) => {
return formatParams(p)
},
columns,
formConfig: {
labelWidth: 120,
//
schemas: searchFormSchema,
},
maxHeight: 600,
isTreeTable: false,
pagination: true,
useSearchForm: true,
showTableSetting: false,
bordered: true,
showIndexColumn: true,
indexColumnProps: {
width: 60,
},
rowSelection: {
type: 'checkbox'
},
canResize: true,
resizeHeightOffset: 80
})
const visible = ref(false)
//
const init = () => {
visible.value = true
}
const loading = true
const handleOk = () => {
const rows = getSelectRows()
const ids = rows.map(item => {
return item.id
})
ImportBillManageHistory({ ids, businessType: 1, id: props.id }).then(res => {
visible.value = false
if (res.succeeded) {
createMessage.success('导入成功!')
props.reload()
}
})
}
defineExpose({
init
})
</script>
<style lang="less">
</style>

@ -1,4 +1,4 @@
import { FormSchema } from '/@/components/Table' import { FormSchema, BasicColumn } from '/@/components/Table'
import SelectTextArea from '/@/views/operation/seaexport/components/SelectTextArea.vue' import SelectTextArea from '/@/views/operation/seaexport/components/SelectTextArea.vue'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
import { GetPackageSelectList } from '/@/views/operation/seaexport/api/BookingLedger' import { GetPackageSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
@ -915,3 +915,71 @@ export const formSchema5: FormSchema[] = [
colProps: { span: 12 } colProps: { span: 12 }
} }
] ]
// 历史提单表格
export const columns: BasicColumn[] = [
{
title: '主提单号',
dataIndex: 'mblno',
width: 150,
},
{
title: '船名',
dataIndex: 'vessel',
width: 150,
},
{
title: '航次',
dataIndex: 'voyno',
width: 110,
},
{
title: '开船日期',
dataIndex: 'etd',
width: 120,
},
{
title: '装货港',
dataIndex: 'loadPort',
width: 140,
},
{
title: '卸货港',
dataIndex: 'dischargePort',
width: 140,
},
{
title: '发货人内容',
dataIndex: 'shipperContent',
width: 140,
},
{
title: '收货人内容',
dataIndex: 'consigneeContent',
width: 140,
},
{
title: '代理内容',
dataIndex: 'agentContent',
width: 140,
},
]
export const searchFormSchema: FormSchema[] = [
{
field: 'mblno',
label: '主提单号',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'etd',
label: '开船日期',
component: 'RangePicker',
required: false,
dynamicDisabled: false,
colProps: { span: 6 },
componentProps: {
allowClear: true
}
}
]

@ -13,7 +13,7 @@
<span class="iconfont icon-a-17Btuichu"></span> <span class="iconfont icon-a-17Btuichu"></span>
调入主单信息 调入主单信息
</a-button> </a-button>
<a-button type="link" @click="msg"> <a-button type="link" @click="historyHandle">
<span class="iconfont icon-time"></span> <span class="iconfont icon-time"></span>
历史引入 历史引入
</a-button> </a-button>
@ -159,6 +159,11 @@
</a-tabs> </a-tabs>
</div> </div>
</a-spin> </a-spin>
<ladingHistory
:id="id"
:reload="reload"
ref="ladHistory"
/>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -168,7 +173,10 @@
import { GetSeaExportBillManageList } from '../../api/BookingLedger' import { GetSeaExportBillManageList } from '../../api/BookingLedger'
import { formSchema1, formSchema2, formSchema3, formSchema4, formSchema5 } from './ladingInfo' import { formSchema1, formSchema2, formSchema3, formSchema4, formSchema5 } from './ladingInfo'
import { getOptions } from '/@/hooks/dict' import { getOptions } from '/@/hooks/dict'
//
import container from './container.vue' import container from './container.vue'
//
import ladingHistory from './ladingHistory.vue'
import { EditSeaExportBillManage, BatchDelBillManageCtn } from '../../api/BookingLedger' import { EditSeaExportBillManage, BatchDelBillManageCtn } from '../../api/BookingLedger'
// //
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
@ -622,6 +630,12 @@
} }
return str_num return str_num
} }
//
const ladHistory = ref(null)
//
const historyHandle = () => {
ladHistory.value.init()
}
// //
const contBox = ref(null) const contBox = ref(null)
// //

@ -1949,7 +1949,7 @@
} }
} }
.right-content { .right-content {
width: 380px; width: 300px;
margin-left: 20px; margin-left: 20px;
} }
.ant-tabs-nav { .ant-tabs-nav {

@ -80,7 +80,7 @@
/> --> /> -->
</div> </div>
</div> </div>
<div v-if="tableLoaded"> <div>
<input <input
class="ds-tb-check ds-goods-tb-check" class="ds-tb-check ds-goods-tb-check"
type="checkbox" type="checkbox"
@ -88,9 +88,8 @@
:indeterminate="someCheck" :indeterminate="someCheck"
v-if="list.length !== 0" v-if="list.length !== 0"
/> />
<hot-table ref="hotTb" :data="list" :settings="settings"></hot-table> <hot-table ref="hotmain" :data="list" :settings="settings"></hot-table>
</div> </div>
<div class="loading" v-else> ...</div>
<div class="table-calc"> <div class="table-calc">
合计 合计
<span class="table-calc-box" <span class="table-calc-box"
@ -206,7 +205,7 @@
h, h,
watch, watch,
onMounted, onMounted,
computed, nextTick,
} from 'vue' } from 'vue'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage() const { notification } = useMessage()
@ -2048,6 +2047,24 @@
console.log(changes, source) console.log(changes, source)
}, },
} }
const hotmain = ref(null)
onMounted(() => {
const hot = hotmain.value.hotInstance
hot.addHook('afterOnCellMouseDown', function (event, coords, TD) {})
//
hot.addHook('beforeKeyDown', function (event) {
// 'Enter'
if (event.key === 'ArrowDown') {
if (hot.getSelected()[0][0] == list.value.length - 1 && !hot.getActiveEditor()?._opened) {
list.value.push({})
nextTick(() => {
hot.selectCell(list.value.length - 1, 3)
})
return false
}
}
})
})
defineExpose({ defineExpose({
list, list,
}) })

@ -64,7 +64,7 @@
:class="{ isBr: changeGoods && serive.isBr }" :class="{ isBr: changeGoods && serive.isBr }"
:key="`${serive.configId}_${sindex}`" :key="`${serive.configId}_${sindex}`"
> >
<span style="position: absolute; right: 8px; color: #257AFA;">···</span> <span v-if="(sindex - 3) % 4 != 0" style="position: absolute; right: 8px; color: #257AFA;">···</span>
<div class="edit-box" @click.stop="FnOpenEdit(serive)"> <div class="edit-box" @click.stop="FnOpenEdit(serive)">
<Icon icon="ant-design:edit-outlined" /> <Icon icon="ant-design:edit-outlined" />
</div> </div>
@ -1254,7 +1254,7 @@
} }
.items { .items {
font-size: 12px; font-size: 12px;
padding: 2px 13px; padding: 2px 10px;
background: #F5F9FC; background: #F5F9FC;
border-radius: 1.67px; border-radius: 1.67px;
color: #257AFA; color: #257AFA;
@ -1271,10 +1271,10 @@
} }
.goods-status { .goods-status {
display: inline-block; display: inline-block;
width: 20%; width: 25%;
height: 70px; height: 70px;
position: relative; position: relative;
float: right; float: left;
} }
.no-data { .no-data {
img { img {

Loading…
Cancel
Save