订单台账样式

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

@ -5,7 +5,32 @@
-->
<template>
<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>
新建
</a-button>
@ -14,24 +39,20 @@
<span class="iconfont icon-shanchu1"></span>
删除
</a-button>
</a-popconfirm>
</a-popconfirm> -->
<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>
{{ eLoading ? '正在导出' : '批量导出' }}
</a-button>
<a-button type="link" @click="test">
</a-button> -->
<!-- <a-button type="link" @click="test">
<span class="iconfont icon-time"></span>
定时订舱
</a-button>
<a-button type="link" @click="test">
<span class="iconfont icon-a-xiaopiaofapiao-01"></span>
小票状态
</a-button>
<a-button type="link" @click="openYz">
<span class="iconfont icon-a-xiaopiaofapiao-01"></span>
运踪订阅
</a-button>
</a-button> -->
<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' }">
@ -67,7 +88,7 @@ import { useGo } from '/@/hooks/web/usePage'
import { useMessage } from '/@/hooks/web/useMessage'
import { useRouter } from 'vue-router'
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'
const router = useRouter()
const { createMessage } = useMessage()
@ -80,10 +101,7 @@ const props = defineProps({
type: Function,
},
columns: {
type: Array,
default: () => {
return []
},
type: Function
},
queryData: {
type: Object,
@ -95,6 +113,18 @@ function addBooking() {
const addNum = Math.round(Math.random() * 1000)
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 copyMoreForm = reactive({
number: 1,
@ -116,6 +146,21 @@ function batchEditing() {
batchFlag.value = 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() {
props.reload()
}
@ -137,7 +182,7 @@ const exportExcel = () => {
const postData = {
url: 'http://118.190.144.189:3008/opApi/SeaExport/GetSeaExportList',
queryRequest: props.queryData,
columnSets: props.columns,
columnSets: props.columns(),
}
postData.queryRequest.pageCondition['isExport'] = true
eLoading.value = true

@ -5,10 +5,6 @@
-->
<template>
<div class="ds-table-action-bar">
<a-button type="link" @click="copyBookingMore">
<span class="iconfont icon-fuzhi11"></span>
复制
</a-button>
<a-dropdown>
<a-button type="link">
<span class="iconfont icon-piliangbianji"></span>
@ -25,7 +21,7 @@
</a-menu>
</template>
</a-dropdown>
<a-modal
<!-- <a-modal
class="ds-modal-small"
title="输入复制数量"
:visible="copyMoreFlag"
@ -52,21 +48,19 @@
<a-button type="primary" html-type="submit">确定</a-button>
</div>
</a-form>
</a-modal>
</a-modal> -->
<BatchModification @register="registerModal" @success="BMSuccess" />
</div>
</template>
<script lang="ts" setup>
import { ref, reactive } from 'vue'
import { useGo } from '/@/hooks/web/usePage'
// import { useGo } from '/@/hooks/web/usePage'
import { useMessage } from '/@/hooks/web/useMessage'
import { useRouter } from 'vue-router'
import { useModal } from '/@/components/Modal'
import { SeaExportBatchDel, SaveBookingTxxp, SeaExportCopy, CreateMultipleTask } from '../api/BookingLedger.js'
import BatchModification from '../modules/BatchModification.vue'
const router = useRouter()
const { createMessage } = useMessage()
const go = useGo()
// const go = useGo()
const props = defineProps({
selectRow: {
type: Function,
@ -75,41 +69,24 @@
type: Function,
},
})
//
function addBooking() {
const addNum = Math.round(Math.random() * 1000)
go(`/BookingDetail?addNum=${addNum}`)
}
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
}
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 copyMoreFlag = ref(false)
// const copyMoreForm = reactive({
// number: 1,
// })
// 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()
//
@ -130,23 +107,7 @@
function BMSuccess() {
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 txxpForm = ref({})
//

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

Loading…
Cancel
Save