部分接口 按需

szh-new
张同海 6 months ago
commit ef71b2e831

@ -46,6 +46,23 @@
<span class="iconfont icon-shuaxin" :style="{ fontSize: '12px' }"></span>
刷新
</a-button>
<a-dropdown>
<template #overlay>
<a-menu>
<a-sub-menu :title="tbType == 'receive' ? '打印应付账单' : '打印应收账单'">
<a-menu-item @click="selectInsert(1)">{{ tbType == 'receive' ? '' : '' }}</a-menu-item>
<a-menu-item @click="selectInsert(1)">{{ tbType == 'receive' ? '' : '' }}</a-menu-item>
<a-menu-item @click="allPrint">{{ tbType == 'receive' ? '' : '' }}</a-menu-item>
</a-sub-menu>
<a-menu-item @click="feeTem"></a-menu-item>
<a-menu-item @click="saveToTem"></a-menu-item>
</a-menu>
</template>
<a-button type="link">
<span class="iconfont icon-printing" :style="{ fontSize: '12px' }"></span>
打印
</a-button>
</a-dropdown>
<a-dropdown>
<template #overlay>
<a-menu>
@ -132,7 +149,7 @@
import ToFeeTemDrawer from './components/ToFeeTemDrawer.vue'
import FlowChart from '../FlowChart/index.vue'
import ApplyModify from './components/applyModify.vue'
import { ApplyDeletion } from './api'
import { ApplyDeletion, GetPrintInfo } from './api'
import { useModal } from '/@/components/Modal'
const [registerModal, { openModal }] = useModal()
const { createMessage } = useMessage()
@ -171,6 +188,10 @@
const visible = ref(false)
const addRow = () => {
const deepCopyRow = JSON.parse(JSON.stringify(props.row))
//
if (props.tbType == 'receive') {
}
props.data.push(deepCopyRow)
}
//
@ -410,6 +431,12 @@
if (!flag) return createMessage.warning('请勾选要撤销提交的费用!')
emits('revoke', ids)
}
//
const allPrint = () => {
GetPrintInfo({ businessType: 1, bid: '1793060919656452096' }).then(res => {
console.log(res)
})
}
</script>
<style lang="scss">

@ -15,7 +15,8 @@ enum Api {
submit = '/feeApi/FeeRecord/ApplyAudit',
Withdraw = '/feeApi/FeeRecord/Withdraw',
ApplyModification = '/feeApi/FeeRecord/ApplyModification',
ApplyDeletion = '/feeApi/FeeRecord/ApplyDeletion'
ApplyDeletion = '/feeApi/FeeRecord/ApplyDeletion',
GetPrintInfo = '/feeApi/FeeRecord/GetPrintInfo'
}
// 列表 (Auth)
export function GetList(data: PageRequest) {
@ -60,6 +61,15 @@ export function ReadAsTemplate(query) {
})
}
// 打印
export function GetPrintInfo(query) {
return request<DataResult>({
url: Api.GetPrintInfo,
method: 'get',
params: query
})
}
// 提交
export function ApplyAudit(data: PageRequest) {
return request<DataResult>({

@ -95,6 +95,7 @@
const formData = Object.assign(copy, values)
formData.feeRecordId = values.id
formData.id = 0
formData.BusinessType = 1
const res: API.DataResult = await ApplyModification([formData])
setModalProps({ confirmLoading: false, loading: false })
if (res.succeeded) {

@ -109,6 +109,7 @@
feeName: '',
feeEnName: '',
quantity: 1,
exchangeRate: 1,
feeType: props.tbType == 'receive' ? 1 : 2
}
//
@ -143,7 +144,7 @@
},
{
title: '费用状态',
width: 120,
width: 70,
data: 'feeStatusText',
readOnly: true,
},
@ -156,8 +157,9 @@
source: async (query, process) => {
const res = feeDict.value.length ? feeDict.value : (await GetFeeCodeSelectList())?.data
if (!feeDict.value.length) feeDict.value = res
console.log(res)
const dict = res.map((res) => {
return res.name
return res.code + '-' +res.name
})
process(dict)
},
@ -183,8 +185,9 @@
type: 'dropdown',
source: async (query, process) => {
const results = await getDictOption('djy_cust_prop')
console.log(results)
const dict = results.map((item) => {
return item.name
return item.value + '-' + item.name
})
process(dict)
},
@ -196,8 +199,9 @@
type: 'dropdown',
source: async (query, process) => {
//
const rowIndex = hotTb.value.hotInstance.countRows()
const rowIndex = hotTb.value.hotInstance.getActiveEditor().row
const code = list.value[rowIndex - 1].customerType
console.log(list.value[rowIndex - 1])
if (code) {
GetClientListByCode({ code }).then(res => {
const { data } = res
@ -207,12 +211,13 @@
})
companyDict.value = data
const dict = data.map((item) => {
return item.shortName
return item.codeName + '-' + item.shortName
})
process(dict)
})
} else {
process([])
createMessage.warning("请先选择客户类别!")
process([])
}
},
},
@ -224,14 +229,14 @@
source: async (query, process) => {
if (unitDict.value && unitDict.value.length) {
const dict = unitDict.value.map((item) => {
return item.name
return item.value + '-' + item.name
})
process(dict)
} else {
const results = await feeUnitDict()
unitDict.value = results
const dict = results.map((item) => {
return item.name
return item.value + '-' + item.name
})
process(dict)
}
@ -460,9 +465,10 @@
if (res[1] === 'feeName') {
//
const item = feeDict.value.filter((item) => {
return item.name === changes[0][3]
return changes[0][3].includes(item.name)
})
if (item) dict = item[0]
list.value[res[0]]['feeName'] = changes[0][3].split('-')[1]
list.value[res[0]]['feeEnName'] = dict['enName']
list.value[res[0]]['currency'] = dict['defaultCurrency']
list.value[res[0]]['unitText'] = dict['defaultUnitName']
@ -483,19 +489,21 @@
//
if (changes[0][1] === 'customerName') {
const item = companyDict.value.filter((item) => {
return item.name === changes[0][3]
return changes[0][3].includes(item.name)
})
if (item) dict = item[0]
list.value[changes[0][0]]['customerCode'] = dict?.value
list.value[changes[0][0]]['customerName'] = changes[0][3].split('-')[1]
}
//
if (changes[0][1] === 'customerTypeText') {
getDictOption('djy_cust_prop').then((res) => {
const item = res.filter((item) => {
return item.name === changes[0][3]
return changes[0][3].includes(item.name)
})
if (item) dict = item[0]
list.value[changes[0][0]]['customerType'] = dict?.value
list.value[changes[0][0]]['customerTypeText'] = changes[0][3].split('-')[1]
})
}
//
@ -505,6 +513,7 @@
})
if (item) dict = item[0]
list.value[changes[0][0]]['unit'] = dict?.value
list.value[changes[0][0]]['unitText'] = changes[0][3].split('-')[1]
}
//
if (changes[0][1] === 'currencyName') {
@ -558,6 +567,7 @@
items: list.value.filter((res) => {
return res.feeStatus == 1
}),
businessType: 1
}
loading.value = true
SubmitFee(postData).then(res => {
@ -705,6 +715,7 @@
if (item.createTime) item.createTime = item.createTime.split(' ')[0]
if (item.auditDate) item.auditDate = item.auditDate.split(' ')[0]
if (item.updateTime) item.updateTime = item.updateTime.split(' ')[0]
if (item.updateTime == '1900-01-01') item.updateTime = ''
})
list.value = data
// 使
@ -750,6 +761,7 @@
}
onMounted(() => {
const hot = hotTb.value.hotInstance
hot.addHook('afterOnCellMouseDown', function(event, coords, TD) {})
//
hot.addHook('beforeKeyDown', function (event) {
// 'Enter'

@ -19,5 +19,3 @@ export async function feeUnitDict() {
return feeUnitDict
}

@ -0,0 +1,10 @@
// 格式表格时间
export function formatTableData(v) {
if (v) {
v = v.split(' ')[0]
if ( v.includes('1900')) v = ''
return v
} else {
return ''
}
}

@ -0,0 +1,352 @@
<!--
* @Description: 海运出口列表
* @Author: lijj
* @Date: 2024-04-29 11:54:04
-->
<template>
<div class="ds-table-action-bar">
<div class="nav" @click="addBooking">
<i class="iconfont icon-jiahao2fill"></i>新建
</div>
<div class="nav" @click="copyBooking"
><i class="iconfont icon-fuzhi"></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"
@cancel="cancelRemove"
>
<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">
<a-spin :spinning="txxpLoading">
<i class="iconfont icon-xiaopiaodayin"></i>小票状态
</a-spin>
</div>
<div class="nav" @click="openTraceModel"
><i class="iconfont icon-yunshu1"></i>运踪订阅</div
>
<div class="nav">
<a-dropdown>
<span>
<i
class="iconfont icon-a-wendangcaozuoxiazaishangchuanshanchuxinzengfujianyasuochakan-01"
></i
>船公司文件
</span>
<template #overlay>
<a-menu>
<a-menu-item>
<a @click="handleDownByBc(1)" href="javascript:;">BC下载</a>
</a-menu-item>
<a-menu-item>
<a @click="handleDownByBc(2)" href="javascript:;">DRAFT下载</a>
</a-menu-item>
<a-menu-item>
<a @click="handleDownByBc(4)" href="javascript:;">舱位分配查询</a>
</a-menu-item>
<a-menu-item>
<a @click="handleImportBc" href="javascript:;">单票BC引入</a>
</a-menu-item>
<a-menu-item>
<a @click="handleImportBcMore" href="javascript:;">多票BC引入</a>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</div>
<div class="nav" @click="GoExpress"><i class="iconfont icon-goods"></i>快递</div> -->
<!-- 多票复制 -->
<a-modal
title="输入复制数量"
:visible="copyMoreFlag"
:footer="null"
@cancel="copyMoreFlag = false"
>
<a-form
ref="RefcopyMoreForm"
:model="copyMoreForm"
:label-col="{ span: 5 }"
:wrapper-col="{ span: 12 }"
@submit="handleSubmitCopyMore"
:style="{ padding: '10px' }"
>
<a-form-item
label="数量"
name="number"
:rules="[{ required: true, message: '请输入数量' }]"
>
<a-input-number :min="1" :max="10" v-model:value="copyMoreForm.number" />
</a-form-item>
<a-form-item :wrapper-col="{ span: 12, offset: 5 }">
<a-button type="primary" html-type="submit">确定</a-button>
</a-form-item>
</a-form>
</a-modal>
<!-- 批量操作 -->
<!-- <BatchModification v-if="batchFlag" @register="registerModal" @success="BMSuccess" /> -->
</div>
</template>
<script lang="ts" setup>
import { onMounted, ref, defineProps, reactive } from 'vue'
import { useGo } from '/@/hooks/web/usePage'
import { useMessage } from '/@/hooks/web/useMessage'
import { useRouter } from 'vue-router'
import { useModal } from '/@/components/Modal'
import { SeaExportBatchDel } from '../api/BookingLedger.js'
// import BatchModification from '../modules/BatchModification.vue'
const router = useRouter()
const { createMessage } = useMessage()
const go = useGo()
const props = defineProps({
selectRow: {
type: Function
},
reload: {
type: Function
}
})
//
function addBooking() {
const addNum = Math.round(Math.random() * 1000)
go(`/BookingDetail?addNum=${addNum}`)
}
//
function copyBooking() {
const select = props.selectRow()
const pkIdArr = select.map((item, index) => {
return item.id
})
if (pkIdArr.length === 0 || pkIdArr.length > 1) {
createMessage.warning('请仅选择一条数据!')
return false
}
go(`/BookingDetail?id=${pkIdArr[0]}&isCopy=${true}`)
}
const copyMoreFlag = ref(false)
const copyMoreForm = reactive({
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 batchFlag = ref(false)
//
function batchEditing() {
const select = props.selectRow()
if (select.length === 0) {
createMessage.warning('请选择操作订单!')
return false
}
const removeArr = select.map((item) => {
return item.id
})
batchFlag.value = true
openModal(true, { removeArr })
}
function BMSuccess() {
props.reload()
}
//
function removeMoreFun() {
const select = props.selectRow()
if (select.length === 0) {
createMessage.warning('请选择操作订单!')
return false
}
const removeArr = select.map((item) => {
return item.id
})
deleteBookingOrder(removeArr)
}
//
function deleteBookingOrder(arr) {
let api = []
arr.forEach((e, i) => {
api.push(e)
})
SeaExportBatchDel({ ids: api })
.then((res) => {
if (res.succeeded) {
createMessage.success('删除成功!')
props.reload()
}
})
.catch((err) => {
console.log(err)
})
}
</script>
<style lang="scss">
.ds-table-action-bar {
padding: 0 10px;
.nav {
display: inline-block;
margin-right: 8px;
cursor: pointer;
border: 1px solid rgba(255, 255, 255, 0);
padding: 0 10px;
height: 28px;
line-height: 26px;
color: #000;
.iconfont {
margin-right: 6px;
}
&:hover {
border: 1px solid rgba(255, 255, 255, 0);
border-radius: 4px;
}
&:nth-of-type(1) {
.iconfont {
color: #1d8aff;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(2) {
.iconfont {
color: #865ef8;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(3) {
.iconfont {
color: #ff9702;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(4) {
.iconfont {
color: #1d8aff;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(5) {
.iconfont {
color: #ff1062;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(6) {
.iconfont {
color: #1ebeca;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(7) {
.iconfont {
color: #82c93d;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(8) {
.iconfont {
color: #1d8aff;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(9) {
.iconfont {
color: #f6826b;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
}
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -5,6 +5,7 @@
title="批量编辑"
width="50%"
@register="registerModal"
@opened="afterModalOpened"
@ok="handleSave"
>
<BasicForm @register="registerForm" />
@ -33,12 +34,12 @@
import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { BatchModificationFormSchema } from '../columns'
import { BatchModificationFormSchema } from '../detail/columns'
import { SeaExportBatchEdit } from '../api/BookingLedger.js'
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
const emit = defineEmits(['success', 'register'])
const flag = ref(false)
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()

Loading…
Cancel
Save