订单台账样式

frame-financialTax-yjl-1127
lijingjia 1 week ago
parent 5e2b076108
commit 29308687b5

@ -5,7 +5,32 @@
--> -->
<template> <template>
<div class="ds-table-action-bar"> <div class="ds-table-action-bar">
<a-button type="link" @click="addBooking"> <TableButton
:show="{ add: null, del: null, copy: null}"
@add="addBooking"
@del="removeMoreFun"
@copy="copyBookingMore"
>
<a-dropdown>
<span class="iconfont icon-piliangbianji">{{ eLoading ? '正在导出' : '批量操作' }}</span>
<template #overlay>
<a-menu>
<a-menu-item>
<a @click="batchEditing()" href="javascript:;">批量编辑</a>
</a-menu-item>
<a-menu-item>
<a @click="batchSubmit" href="javascript:;">批量提交</a>
</a-menu-item>
<a-menu-item>
<a @click="exportExcel" href="javascript:;">批量导出</a>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
<span class="iconfont icon-a-xiaopiaofapiao-01" @click="openYz"></span>
<!-- <span class="iconfont icon-piliangdaochu-danse" @click="importFlow"></span> -->
</TableButton>
<!-- <a-button type="link" @click="addBooking">
<span class="iconfont icon-new_document"></span> <span class="iconfont icon-new_document"></span>
新建 新建
</a-button> </a-button>
@ -14,24 +39,20 @@
<span class="iconfont icon-shanchu1"></span> <span class="iconfont icon-shanchu1"></span>
删除 删除
</a-button> </a-button>
</a-popconfirm> </a-popconfirm> -->
<slot></slot> <slot></slot>
<a-button :loading="eLoading" type="link" @click="exportExcel"> <!-- <a-button :loading="eLoading" type="link" @click="exportExcel">
<span class="iconfont" :class="{ 'icon-tidanqianchu': !eLoading }"></span> <span class="iconfont" :class="{ 'icon-tidanqianchu': !eLoading }"></span>
{{ eLoading ? '正在导出' : '批量导出' }} {{ eLoading ? '正在导出' : '批量导出' }}
</a-button> </a-button> -->
<a-button type="link" @click="test"> <!-- <a-button type="link" @click="test">
<span class="iconfont icon-time"></span> <span class="iconfont icon-time"></span>
定时订舱 定时订舱
</a-button> </a-button>
<a-button type="link" @click="test"> <a-button type="link" @click="test">
<span class="iconfont icon-a-xiaopiaofapiao-01"></span> <span class="iconfont icon-a-xiaopiaofapiao-01"></span>
小票状态 小票状态
</a-button> </a-button> -->
<a-button type="link" @click="openYz">
<span class="iconfont icon-a-xiaopiaofapiao-01"></span>
运踪订阅
</a-button>
<a-modal title="输入复制数量" :visible="copyMoreFlag" :footer="null" @cancel="copyMoreFlag = false"> <a-modal title="输入复制数量" :visible="copyMoreFlag" :footer="null" @cancel="copyMoreFlag = false">
<a-form ref="RefcopyMoreForm" :model="copyMoreForm" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }" <a-form ref="RefcopyMoreForm" :model="copyMoreForm" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }"
@submit="handleSubmitCopyMore" :style="{ padding: '10px' }"> @submit="handleSubmitCopyMore" :style="{ padding: '10px' }">
@ -67,7 +88,7 @@ import { useGo } from '/@/hooks/web/usePage'
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, CommonExcelExport,SendTrace } from '../api/BookingLedger.js' import { SeaExportBatchDel, SaveBookingTxxp, CommonExcelExport,SendTrace, CreateMultipleTask } 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()
@ -80,10 +101,7 @@ const props = defineProps({
type: Function, type: Function,
}, },
columns: { columns: {
type: Array, type: Function
default: () => {
return []
},
}, },
queryData: { queryData: {
type: Object, type: Object,
@ -95,6 +113,18 @@ function addBooking() {
const addNum = Math.round(Math.random() * 1000) const addNum = Math.round(Math.random() * 1000)
go(`/BookingDetail?addNum=${addNum}`) go(`/BookingDetail?addNum=${addNum}`)
} }
//
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
}
go(`/BookingDetail?id=${pkIdArr[0]}&source=copy`)
}
const copyMoreFlag = ref(false) const copyMoreFlag = ref(false)
const copyMoreForm = reactive({ const copyMoreForm = reactive({
number: 1, number: 1,
@ -116,6 +146,21 @@ function batchEditing() {
batchFlag.value = true batchFlag.value = true
openModal(true, { removeArr, flag: true }) openModal(true, { removeArr, flag: true })
} }
//
const batchSubmit = () => {
const select = props.selectRow()
if (select.length === 0) {
createMessage.warning('请选择操作订单!')
return false
}
const ids = select.map(item => {
return item.id
})
CreateMultipleTask({ ids, businessType: '1', taskTypeName: 'WAIT_ORDER_AUDIT' }).then(res => {
createMessage.success(res.message)
props.reload()
})
}
function BMSuccess() { function BMSuccess() {
props.reload() props.reload()
} }
@ -137,7 +182,7 @@ const exportExcel = () => {
const postData = { const postData = {
url: 'http://118.190.144.189:3008/opApi/SeaExport/GetSeaExportList', url: 'http://118.190.144.189:3008/opApi/SeaExport/GetSeaExportList',
queryRequest: props.queryData, queryRequest: props.queryData,
columnSets: props.columns, columnSets: props.columns(),
} }
postData.queryRequest.pageCondition['isExport'] = true postData.queryRequest.pageCondition['isExport'] = true
eLoading.value = true eLoading.value = true

@ -5,10 +5,6 @@
--> -->
<template> <template>
<div class="ds-table-action-bar"> <div class="ds-table-action-bar">
<a-button type="link" @click="copyBookingMore">
<span class="iconfont icon-fuzhi11"></span>
复制
</a-button>
<a-dropdown> <a-dropdown>
<a-button type="link"> <a-button type="link">
<span class="iconfont icon-piliangbianji"></span> <span class="iconfont icon-piliangbianji"></span>
@ -25,7 +21,7 @@
</a-menu> </a-menu>
</template> </template>
</a-dropdown> </a-dropdown>
<a-modal <!-- <a-modal
class="ds-modal-small" class="ds-modal-small"
title="输入复制数量" title="输入复制数量"
:visible="copyMoreFlag" :visible="copyMoreFlag"
@ -52,21 +48,19 @@
<a-button type="primary" html-type="submit">确定</a-button> <a-button type="primary" html-type="submit">确定</a-button>
</div> </div>
</a-form> </a-form>
</a-modal> </a-modal> -->
<BatchModification @register="registerModal" @success="BMSuccess" /> <BatchModification @register="registerModal" @success="BMSuccess" />
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
import { useGo } from '/@/hooks/web/usePage' // import { useGo } from '/@/hooks/web/usePage'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
import { useRouter } from 'vue-router'
import { useModal } from '/@/components/Modal' import { useModal } from '/@/components/Modal'
import { SeaExportBatchDel, SaveBookingTxxp, SeaExportCopy, CreateMultipleTask } from '../api/BookingLedger.js' import { SeaExportBatchDel, SaveBookingTxxp, SeaExportCopy, CreateMultipleTask } from '../api/BookingLedger.js'
import BatchModification from '../modules/BatchModification.vue' import BatchModification from '../modules/BatchModification.vue'
const router = useRouter()
const { createMessage } = useMessage() const { createMessage } = useMessage()
const go = useGo() // const go = useGo()
const props = defineProps({ const props = defineProps({
selectRow: { selectRow: {
type: Function, type: Function,
@ -75,41 +69,24 @@
type: Function, type: Function,
}, },
}) })
// // const copyMoreFlag = ref(false)
function addBooking() { // const copyMoreForm = reactive({
const addNum = Math.round(Math.random() * 1000) // number: 1,
go(`/BookingDetail?addNum=${addNum}`) // })
} // function handleSubmitCopyMore() {
const copyMoreFlag = ref(false) // const select = props.selectRow()
const copyMoreForm = reactive({ // if (copyMoreForm.number === 1) {
number: 1, // go(`/BookingDetail?id=${select[0].id}&source=copy`)
}) // copyMoreFlag.value = false
// // return
function copyBookingMore() { // }
const select = props.selectRow() // for (var i = 0; i < copyMoreForm.number; i++) {
const pkIdArr = select.map((item, index) => { // SeaExportCopy({ id: select[0].id }).then(res => {
return item.id // props.reload()
}) // })
if (pkIdArr.length === 0 || pkIdArr.length > 1) { // }
createMessage.warning('请选择一条数据进行复制!') // copyMoreFlag.value = false
return false // }
}
go(`/BookingDetail?id=${pkIdArr[0]}&source=copy`)
}
function handleSubmitCopyMore() {
const select = props.selectRow()
if (copyMoreForm.number === 1) {
go(`/BookingDetail?id=${select[0].id}&source=copy`)
copyMoreFlag.value = false
return
}
for (var i = 0; i < copyMoreForm.number; i++) {
SeaExportCopy({ id: select[0].id }).then(res => {
props.reload()
})
}
copyMoreFlag.value = false
}
// //
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
// //
@ -130,23 +107,7 @@
function BMSuccess() { function BMSuccess() {
props.reload() props.reload()
} }
//
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)
})
}
const xGrid = ref() const xGrid = ref()
const txxpForm = ref({}) const txxpForm = ref({})
// //

@ -3,12 +3,9 @@
<div class="ds-table"> <div class="ds-table">
<BasicTable @register="registerTable" @rowDbClick="handledbclick"> <BasicTable @register="registerTable" @rowDbClick="handledbclick">
<template #tableTitle> <template #tableTitle>
<div> <TableActionBar :selectRow="getVxeSelectRows" :reload="reload" :columns="getColumns" :queryData="queryData">
<TableActionBar :selectRow="getVxeSelectRows" :reload="reload"> <!-- <tableActionBarRight :selectRow="getVxeSelectRows" :reload="reload"></tableActionBarRight> -->
<tableActionBarRight :selectRow="getVxeSelectRows" :reload="reload"></tableActionBarRight>
<Divider type="vertical" style="margin-top: 11px; background-color: #CED5D9;" />
</TableActionBar> </TableActionBar>
</div>
</template> </template>
<template v-slot:bodyCell="{ column, record }"> <template v-slot:bodyCell="{ column, record }">
<!-- 订单状态 --> <!-- 订单状态 -->
@ -316,7 +313,7 @@
import { ref, defineAsyncComponent, onActivated } from 'vue' import { ref, defineAsyncComponent, onActivated } from 'vue'
const TableActionBar = defineAsyncComponent(() => import("./components/tableActionBar.vue")) const TableActionBar = defineAsyncComponent(() => import("./components/tableActionBar.vue"))
import { CheckCircleFilled, CloseCircleFilled, RedoOutlined } from '@ant-design/icons-vue' import { CheckCircleFilled, CloseCircleFilled, RedoOutlined } from '@ant-design/icons-vue'
const tableActionBarRight = defineAsyncComponent(() => import("./components/tableActionBarRight.vue")) // const tableActionBarRight = defineAsyncComponent(() => import("./components/tableActionBarRight.vue"))
import { BasicTable, useTable } from '/@/components/Table' import { BasicTable, useTable } from '/@/components/Table'
import { PageDataByBooking, GetWebData } from './api/BookingLedger.js' import { PageDataByBooking, GetWebData } from './api/BookingLedger.js'
import { Divider } from 'ant-design-vue' import { Divider } from 'ant-design-vue'
@ -424,11 +421,14 @@ const calcColumns = [
] ]
// //
const fieldFlag = ref(true) const fieldFlag = ref(true)
//
const queryData = ref(null)
// //
const calcData = ref([{}]) const calcData = ref([{}])
const [registerTable, { reload, getVxeSelectRows, setLoading }] = useTable({ const [registerTable, { reload, getVxeSelectRows, setLoading, getColumns }] = useTable({
title: '', title: '',
api: async (p) => { api: async (p) => {
queryData.value = p
const res: API.DataResult = await PageDataByBooking(p) const res: API.DataResult = await PageDataByBooking(p)
calcData.value = [res.data?.dataTotal] calcData.value = [res.data?.dataTotal]
return new Promise((resolve) => { return new Promise((resolve) => {

Loading…
Cancel
Save