重构海运出口

szh-new
lijingjia 6 months ago
parent d8c3883d59
commit c545b3eab6

@ -27,7 +27,7 @@
</a-dropdown>
</div>
<!-- <a-popconfirm
<a-popconfirm
title="确定删除当前选中订舱?"
ok-text="是"
cancel-text="否"
@ -36,7 +36,7 @@
>
<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"><i class="iconfont icon-shishijifei"></i>定时订舱</div>
<div class="nav" @click="handleSearchTxxp">
<a-spin :spinning="txxpLoading">
@ -104,7 +104,7 @@
</a-form>
</a-modal>
<!-- 批量操作 -->
<BatchModification @register="registerModal" @success="BMSuccess" />
<!-- <BatchModification v-if="batchFlag" @register="registerModal" @success="BMSuccess" /> -->
</div>
</template>
<script lang="ts" setup>
@ -113,7 +113,8 @@
import { useMessage } from '/@/hooks/web/useMessage'
import { useRouter } from 'vue-router'
import { useModal } from '/@/components/Modal'
import BatchModification from '../modules/BatchModification.vue'
import { SeaExportBatchDel } from '../api/BookingLedger.js'
// import BatchModification from '../modules/BatchModification.vue'
const router = useRouter()
const { createMessage } = useMessage()
const go = useGo()
@ -176,6 +177,8 @@
}
//
const [registerModal, { openModal }] = useModal()
//
const batchFlag = ref(false)
//
function batchEditing() {
const select = props.selectRow()
@ -186,11 +189,41 @@
const removeArr = select.map((item) => {
return item.id
})
openModal(true, { removeArr, flag: true })
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">

@ -1055,15 +1055,6 @@
}
//
function deleteBookingOrder(arr) {
// let api = ''
// arr.forEach((e, i) => {
// if (i == 0) {
// api = `?Ids=${e}`
// } else {
// api = `${api}&Ids=${e}`
// }
// })
// console.log(api);
let api = []
arr.forEach((e, i) => {
api.push(e)

@ -4,7 +4,6 @@
:use-wrapper="true"
title="批量编辑"
width="50%"
v-if="flag"
@register="registerModal"
@opened="afterModalOpened"
@ok="handleSave"
@ -35,7 +34,7 @@
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
@ -52,7 +51,6 @@
const ids = ref()
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
flag.value = true
setModalProps({ confirmLoading: false, loading: true })
ids.value = data.removeArr
setModalProps({ loading: false })

Loading…
Cancel
Save