lijingjia 7 months ago
commit d7df7113a4

@ -10,6 +10,7 @@
/>
<title><%= title %></title>
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_3756681_qbc103sjo2g.css" />
</head>
<body>
<script>

@ -24,6 +24,23 @@ export function BookingOrderGet(parameter) {
params: parameter,
})
}
// 业务单据批量删除 (Auth)
export function SeaExportBatchDel(parameter) {
return request({
url: `/opApi/SeaExport/SeaExportBatchDel${parameter}`,
method: 'get',
// params: parameter,
})
}
// 批量编辑 (Auth)
export function SeaExportBatchEdit(parameter) {
return request({
url: '/opApi/SeaExport/SeaExportBatchEdit',
method: 'post',
data: parameter,
})
}
// 集装箱信息服务 列表 (Auth)
export function GetOpCtnList(parameter) {
return request({

@ -1,46 +0,0 @@
[
{ "FieldName": "MBLNO", "FieldValue": "1", "ConditionalType": 1 },
{
"ConditionalList": [
{ "Key": 0, "Value": { "FieldName": "Cntr10", "FieldValue": "equal", "ConditionalType": 2 } },
{
"Key": 0,
"Value": { "FieldName": "MasterNo", "FieldValue": "contains", "ConditionalType": 12412 }
},
{
"Key": 0,
"Value": {
"ConditionalList": [
{
"Key": 0,
"Value": { "FieldName": "BSNO", "FieldValue": "GreaterThan", "ConditionalType": 1 }
},
{
"Key": 0,
"Value": { "FieldName": "BusinessDate", "FieldValue": "equal", "ConditionalType": 2 }
}
]
}
},
{
"Key": 0,
"Value": {
"ConditionalList": [
{
"Key": 1,
"Value": {
"FieldName": "BusinessStatus",
"FieldValue": "GreaterThanOrEqual",
"ConditionalType": 3
}
},
{
"Key": 1,
"Value": { "FieldName": "Yard", "FieldValue": "equal", "ConditionalType": 4 }
}
]
}
}
]
}
]

File diff suppressed because it is too large Load Diff

@ -81,7 +81,23 @@
</XCard>
<XCard class="content-table" :style="{ marginTop: '-6px' }">
<vxe-toolbar>
<template #buttons>
<template #buttons> </template>
<template #tools>
<div class="right BookTopButton">
<span class="tab-btn" @click="tableRefreshFirst">
<a-icon
type="redo"
:style="{ fontSize: '14px', transform: 'rotate(278deg)' }"
/>
</span>
<span class="tab-btn" @click="tableHeaderEdit">
<a-icon type="setting" :style="{ fontSize: '14px' }" />
</span>
</div>
</template>
</vxe-toolbar>
<BasicTable @register="register" @row-dbClick="handledbclick">
<template #toolbar>
<div class="nav-box">
<div class="nav" @click="addBooking">
<i class="iconfont icon-jiahao2fill"></i>新建
@ -159,21 +175,15 @@
<div class="nav" @click="GoExpress"><i class="iconfont icon-goods"></i>快递</div>
</div>
</template>
<template #tools>
<div class="right BookTopButton">
<span class="tab-btn" @click="tableRefreshFirst">
<a-icon
type="redo"
:style="{ fontSize: '14px', transform: 'rotate(278deg)' }"
/>
</span>
<span class="tab-btn" @click="tableHeaderEdit">
<a-icon type="setting" :style="{ fontSize: '14px' }" />
</span>
<template #mblno="e">
<div class="mblno">
<span @click="editColumns(e.record)">{{ e.text }}</span>
<!-- <a-icon class="CSMblnoCopy" type="copy" @click="FnCopy(e.text)" /> -->
<Icon icon="ant-design:copy-outlined" @click="FnCopy(e.text)" />
</div>
</template>
</vxe-toolbar>
<vxe-grid
</BasicTable>
<!-- <vxe-grid
ref="xGrid"
v-bind="gridOptions"
row-class-name="line-box"
@ -191,12 +201,6 @@
@scroll="pageClick"
@checkbox-change="checkboxChangeEvent"
>
<template #mblno="{ row }">
<div class="mblno">
<span @click="editColumns(row)">{{ row.mblno }}</span>
<a-icon class="CSMblnoCopy" type="copy" @click="FnCopy(row.mblno)" />
</div>
</template>
<template #IsVGM="{ row }">
<div v-if="row.isVGM" style="text-align: center">
<a-popover placement="topLeft">
@ -672,7 +676,7 @@
<p>没有更多数据了</p>
</span>
</template>
</vxe-grid>
</vxe-grid> -->
</XCard>
</a-col>
</a-row>
@ -689,6 +693,202 @@
<ConditionFilter v-model="AdvancedQueryData" :filter-fields="fields" :disabled="false" />
</div>
</a-modal>
<!-- 批量编辑 -->
<BatchModification @register="registerModal" @success="BMSuccess" />
<!-- <a-modal
width="820px"
:maskClosable="false"
:visible="editingModalVisible"
title="批量编辑"
@ok="editingHandleOk"
@cancel="editingHandleCancel"
>
<div class="trace-box">
<a-form ref="RefeditingForm" :model="editingForm">
<a-row :gutter="26">
<a-col :span="12" class="book-model-box">
<a-form-item
label="船名"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-select
placeholder="请选择船名"
v-model:value="editingForm.vessel"
show-search
@focus="vesselSearch"
@search="vesselSearch"
@blur="vesselBlur"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option
v-for="item in vesselData"
:key="item.vessel"
:value="item.vessel"
>
{{ item.vessel }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="开船日期"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
:rules="[{ required: true, message: '请选择开船日期!' }]"
>
<a-date-picker
v-model:value="editingForm.etd"
:style="{ width: '100%' }"
placeholder="请选择开船日期"
valueFormat="YYYY-MM-DD"
/>
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="内部航次"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-input v-model:value="editingForm.voynoinner" />
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="海关航次"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-input v-model:value="editingForm.voyno" />
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="卸货港"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-select
placeholder="请选择卸货港"
v-model:value="editingForm.portDischarge"
show-search
@focus="portDischargeSearch"
@search="portDischargeSearch"
@change="portDischargeChange"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option
v-for="item in portDischargeData"
:key="item.code"
:value="item.enName"
>
{{ item.enName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="卸货代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-input v-model:value="editingForm.portDischargeId" />
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="目的港"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-select
placeholder="请选择目的港"
v-model:value="editingForm.destination"
show-search
@focus="destinationSearch"
@search="destinationSearch"
@change="destinationChange"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option
v-for="item in destinationData"
:key="item.code"
:value="item.enName"
>
{{ item.enName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="目的代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-input v-model:value="editingForm.destinationid" />
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="截港时间"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-date-picker
show-time
v-model:value="editingForm.closingdate"
:style="{ width: '100%' }"
placeholder="请选择截港时间"
valueFormat="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH"
/>
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="截单时间"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-date-picker
show-time
v-model:value="editingForm.closedocdate"
:style="{ width: '100%' }"
placeholder="请选择截单时间"
valueFormat="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
</a-modal> -->
<!-- ------------------------------------------->
<a-modal
:title="
@ -1147,199 +1347,7 @@
</a-form-item>
</a-form>
</a-modal>
<a-modal
width="820px"
:maskClosable="false"
v-model="editingModalVisible"
title="批量编辑"
@ok="editingHandleOk"
@cancel="editingHandleCancel"
>
<div class="trace-box">
<a-form ref="RefeditingForm" :model="editingForm">
<a-row :gutter="26">
<a-col :span="12" class="book-model-box">
<a-form-item
label="船名"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-select
placeholder="请选择船名"
v-model:value="editingForm.vessel"
show-search
@focus="vesselSearch"
@search="vesselSearch"
@blur="vesselBlur"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option
v-for="item in vesselData"
:key="item.vessel"
:value="item.vessel"
>
{{ item.vessel }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="开船日期"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
:rules="[{ required: true, message: '请选择开船日期!' }]"
>
<a-date-picker
v-model:value="editingForm.etd"
:style="{ width: '100%' }"
placeholder="请选择开船日期"
valueFormat="YYYY-MM-DD"
/>
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="内部航次"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-input v-model:value="editingForm.voynoinner" />
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="海关航次"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-input v-model:value="editingForm.voyno" />
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="卸货港"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-select
placeholder="请选择卸货港"
v-model:value="editingForm.portDischarge"
show-search
@focus="portDischargeSearch"
@search="portDischargeSearch"
@change="portDischargeChange"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option
v-for="item in portDischargeData"
:key="item.code"
:value="item.enName"
>
{{ item.enName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="卸货代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-input v-model:value="editingForm.portDischargeId" />
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="目的港"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-select
placeholder="请选择目的港"
v-model:value="editingForm.destination"
show-search
@focus="destinationSearch"
@search="destinationSearch"
@change="destinationChange"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option
v-for="item in destinationData"
:key="item.code"
:value="item.enName"
>
{{ item.enName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="目的代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-input v-model:value="editingForm.destinationid" />
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="截港时间"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-date-picker
show-time
v-model:value="editingForm.closingdate"
:style="{ width: '100%' }"
placeholder="请选择截港时间"
valueFormat="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH"
/>
</a-form-item>
</a-col>
<a-col :span="12" class="book-model-box">
<a-form-item
label="截单时间"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 18 } }"
has-feedback
>
<a-date-picker
show-time
v-model:value="editingForm.closedocdate"
:style="{ width: '100%' }"
placeholder="请选择截单时间"
valueFormat="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
</a-modal>
<a-modal
title="批量修改船代"
:width="600"
@ -1487,6 +1495,7 @@
})
</script> -->
<script lang="ts" setup>
import BatchModification from './modules/BatchModification.vue'
import ConditionFilter from '/@/components/Condition/index.vue'
import { onMounted, ref, reactive, getCurrentInstance, watch } from 'vue'
import { onBeforeRouteLeave } from 'vue-router'
@ -1522,7 +1531,7 @@
GetService,
GetForwarderlist,
DjyUserConfigMulti,
DeleteBookingOrder,
SeaExportBatchDel,
ExcuteShippingOrderCompareBatch,
GetTenantLineList,
downloadBookingConfirm,
@ -1542,6 +1551,7 @@
BachUpdateShipagency,
TxxpLink,
} from './api/BookingLedger.js'
import { useModal } from '/@/components/Modal'
import { DjyUserConfigGet, DjyUserConfigAdd } from './api/DjyUserConfig.js'
import { useAppStore } from '/@/store/modules/app'
import { useMessage } from '/@/hooks/web/useMessage'
@ -1553,6 +1563,239 @@
const { notification } = useMessage()
let { ctx: that, proxy }: any = getCurrentInstance()
import { usePermissionStore } from '/@/store/modules/permission'
// -----------------------------------
import { BasicColumn, BasicTable, useTable } from '/@/components/Table'
import { columns } from '/@/views/operation/seaexport/columns'
const [register, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({
api: async (p) => {
const res: API.DataResult = await PageDataByBooking(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: () => {
var currentPageInfo: any = getPaginationRef()
var data = getForm().getFieldsValue()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
if (!!data.GoodsTypeName) {
condition.push({
FieldName: 'GoodsTypeName',
FieldValue: data.GoodsTypeName,
ConditionalType: 1,
})
}
if (isAdvancedQuery.value) {
condition.push(ConditionalList.value)
}
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
afterFetch: () => {
isAdvancedQuery.value = false
},
columns,
// formConfig: {
// labelWidth: 120,
// schemas: searchFormSchema,
// },
// sortFn: (sorter) => {
// // console.log(':' + sorter);
// sortInfo = sorter
// },
// filterFn: (filters) => {
// // console.log(':' + filters);
// filterInfo = filters
// },
pagination: true,
bordered: true,
useSearchForm: true,
showTableSetting: true,
tableSetting: { size: false, fullScreen: false },
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: undefined,
},
})
//
function tableHeaderEdit() {
let setting: any = document.getElementsByClassName('anticon-setting')
console.log(setting)
setting[0].click()
// setTableForm.value.open()
}
//
function tableRefreshFirst() {
let redo: any = document.getElementsByClassName('anticon-redo')
redo[0].click()
// const data = { ...formRes.value }
// nowFirst.value = true
// data.multisort = searchData.value.multisort
// searchData.value = JSON.parse(JSON.stringify(data))
// init(searchData.value)
// formRes.value = data
}
//
function removeMoreFun() {
const select = getSelectRows()
if (select.length === 0) {
notification.error({ message: '请选择操作订单', duration: 3 })
return false
}
const removeArr = select.map((item) => {
return item.id
})
deleteBookingOrder(removeArr)
}
function deleteBookingOrder(arr) {
let api = ''
arr.forEach((e, i) => {
if (i == 0) {
api = `?Ids=${e}`
} else {
api = `${api}&Ids=${e}`
}
})
SeaExportBatchDel(api)
.then((res) => {
if (res.succeeded) {
notification.success({ message: '删除成功', duration: 3 })
reload()
} else {
notification.error({ message: res.message, duration: 3 })
}
})
.catch((err) => {
console.log(err)
})
}
//
function batchEditing() {
const select = getSelectRows()
if (select.length === 0) {
notification.error({ message: '请选择操作订单', duration: 3 })
return false
}
const removeArr = select.map((item) => {
return item.id
})
openModal(true, { removeArr })
}
//
const [registerModal, { openModal }] = useModal()
function BMSuccess() {
reload()
}
const isAdvancedQuery = ref(false)
//
function FnOpenAdvancedQuery() {
AdvancedQueryVisible.value = true
}
//
function FnCancelAdvancedQuery() {
AdvancedQueryVisible.value = false
}
//
async function FnAdvancedQuery() {
let Api = (data) => {
let Obj: any = {}
let key: number = 0
console.log(data)
data.logicalOperator == 'and' ? (key = 0) : (key = 1)
if (data.conditions.length) {
if (!Obj.ConditionalList) {
Obj.ConditionalList = []
}
let Arr: any[] = []
data.conditions.forEach((item) => {
Arr.push({
Key: key,
Value: {
FieldName: item.field,
FieldValue: item.operator,
ConditionalType: item.value,
},
})
})
Obj.ConditionalList.push(...Arr)
}
if (data.groups.length) {
if (!Obj.ConditionalList) {
Obj.ConditionalList = []
}
let Arr: any[] = []
data.groups.forEach((item) => {
Arr.push({
Key: key,
Value: Api(item),
})
})
Obj.ConditionalList.push(...Arr)
}
return Obj
}
ConditionalList.value = {
ConditionalList: Api(AdvancedQueryData.value).ConditionalList,
}
let ApiData = {
permissionId: permissionId.value,
content: JSON.stringify(AdvancedQueryData.value),
}
const res: API.DataResult = await UpdateUserQuerySet(ApiData)
if (res.succeeded) {
console.log(res)
isAdvancedQuery.value = true
reload()
// getList(searchData.value, false, 'normal', true)
// FnCancelAdvancedQuery()
}
}
function tableRefresh() {
isAdvancedQuery.value = false
reload()
// const data = { ...formRes.value }
// nowFirst.value = false
// data.multisort = searchData.value.multisort
// searchData.value = JSON.parse(JSON.stringify(data))
// init(searchData.value)
// formRes.value = data
}
function tableReset() {
ResetType.value = false
Object.keys(formRes.value).map((item) => {
formRes.value[item] = ''
})
const data = searchData.value.multisort
searchData.value = JSON.parse(JSON.stringify(formRes.value))
searchData.value.multisort = data
Object.keys(that.$refs).map((label) => {
if (label.includes('fromlabel-') && that.$refs[label].length > 0) {
that.$refs[label][0].$data.value = ''
}
})
setTimeout(() => {
ResetType.value = true
}, 100)
}
// -----------------------------------
const formInitData = [
{ title: '主提单号', align: 'center', width: '90', label: 'MBLNO', type: 'input' },
{ title: '分提单号', align: 'center', width: '90', label: 'HBLNO', type: 'input' },
@ -1636,7 +1879,6 @@
})
const RefcopyMoreForm = ref()
const RefeditingForm = ref()
const editingModalVisible = ref(false)
const editingForm = reactive({
vessel: '',
etd: '',
@ -1775,70 +2017,7 @@
onresize()
})
// ====================================================
//
function FnOpenAdvancedQuery() {
AdvancedQueryVisible.value = true
}
//
function FnCancelAdvancedQuery() {
AdvancedQueryVisible.value = false
}
//
async function FnAdvancedQuery() {
let Api = (data) => {
let Obj: any = {}
let key: number = 0
console.log(data)
data.logicalOperator == 'and' ? (key = 0) : (key = 1)
if (data.conditions.length) {
if (!Obj.ConditionalList) {
Obj.ConditionalList = []
}
let Arr: any[] = []
data.conditions.forEach((item) => {
Arr.push({
Key: key,
Value: {
FieldName: item.field,
FieldValue: item.operator,
ConditionalType: item.value,
},
})
})
Obj.ConditionalList.push(...Arr)
}
if (data.groups.length) {
if (!Obj.ConditionalList) {
Obj.ConditionalList = []
}
let Arr: any[] = []
data.groups.forEach((item) => {
Arr.push({
Key: key,
Value: Api(item),
})
})
Obj.ConditionalList.push(...Arr)
}
return Obj
}
ConditionalList.value = {
ConditionalList: Api(AdvancedQueryData.value).ConditionalList,
}
let ApiData = {
permissionId: permissionId.value,
content: JSON.stringify(AdvancedQueryData.value),
}
const res: API.DataResult = await UpdateUserQuerySet(ApiData)
if (res.succeeded) {
console.log(res)
getList(searchData.value, false, 'normal', true)
FnCancelAdvancedQuery()
}
}
//
function getList(queryParam = {}, isInit = false, isAdd = 'normal', isAdv = false) {
gridOptions.loading = true
@ -2298,17 +2477,7 @@
editColumnsSave(gridOptions.columns)
localStorage.setItem('bookingSetting', JSON.stringify(gridOptions.columns))
}
function tableHeaderEdit() {
setTableForm.value.open()
}
function tableRefreshFirst() {
const data = { ...formRes.value }
nowFirst.value = true
data.multisort = searchData.value.multisort
searchData.value = JSON.parse(JSON.stringify(data))
init(searchData.value)
formRes.value = data
}
function handleCopy() {
notification.success({ message: '复制成功', duration: 3 })
const text = RefbcBox.innerText
@ -2377,23 +2546,7 @@
moreNumVal.value = val
moreNumVisible.value = !moreNumVisible.value
}
function tableReset() {
ResetType.value = false
Object.keys(formRes.value).map((item) => {
formRes.value[item] = ''
})
const data = searchData.value.multisort
searchData.value = JSON.parse(JSON.stringify(formRes.value))
searchData.value.multisort = data
Object.keys(that.$refs).map((label) => {
if (label.includes('fromlabel-') && that.$refs[label].length > 0) {
that.$refs[label][0].$data.value = ''
}
})
setTimeout(() => {
ResetType.value = true
}, 100)
}
function pageClick() {
goodStatusShow.value = false
goodStatusData.value = null
@ -2426,14 +2579,7 @@
function pressEnterFun() {
tableRefresh()
}
function tableRefresh() {
const data = { ...formRes.value }
nowFirst.value = false
data.multisort = searchData.value.multisort
searchData.value = JSON.parse(JSON.stringify(data))
init(searchData.value)
formRes.value = data
}
function init(queryParam = {}) {
gridOptions.pagerConfig = {
total: 0,
@ -2654,15 +2800,7 @@
}
})
}
// ----------------------------------------------
function batchEditing() {
const select = xGrid.value.getCheckboxRecords()
if (select.length === 0) {
notification.error({ message: '请选择操作订单', duration: 3 })
return false
}
editingModalVisible.value = !editingModalVisible.value
}
function editingHandleOk() {
RefeditingForm.value.validateFields((errors, values) => {
if (!errors) {
@ -2680,7 +2818,6 @@
}
})
} else {
// this.editingModalVisible = false
}
})
}
@ -2788,36 +2925,7 @@
shipagencyLoad.value = false
})
}
// ------------------------------------------------
function removeMoreFun() {
const select = xGrid.value.getCheckboxRecords()
if (select.length === 0) {
notification.error({ message: '请选择操作订单', duration: 3 })
return false
}
const removeArr = select.map((item, index) => {
return item.id
})
deleteBookingOrder(removeArr)
}
function deleteBookingOrder(arr) {
DeleteBookingOrder(arr.toString())
.then((res) => {
if (res.succeeded) {
notification.success({ message: '删除成功', duration: 3 })
const _data = gridOptions.data.filter((item) => !arr.includes(item.id))
xGrid.value.reloadData(_data).then(() => {
gridOptions.pagerConfig.total = gridOptions.pagerConfig.total - arr.length
})
that.$forceUpdate()
} else {
notification.error({ message: res.message, duration: 3 })
}
})
.catch((err) => {
console.log(err)
})
}
function cancelRemove() {
console.log('== 取消 ==')
}
@ -3052,8 +3160,10 @@
console.log('页码设置成功')
})
}
function handledbclick({ row }) {
editColumns(row)
function handledbclick(record, index, event) {
console.log('handledbclick', record, index, event)
editColumns(record)
}
function editColumns(row) {
go(`/BookingDetail?id=${row.id}&type=${row.carrierid}&mblno=${row.mblno}`)
@ -4600,3 +4710,19 @@
z-index: 999;
}
</style>
<style lang="less" scoped>
:deep(.vben-basic-form) {
display: none;
}
:deep(.vxe-toolbar) {
display: none;
}
// vben-basic-form--compact
:deep(.vben-basic-table-header__toolbar) {
display: flex;
.nav-box {
flex: 1;
}
}
</style>

@ -0,0 +1,81 @@
<template>
<BasicModal
v-bind="$attrs"
:use-wrapper="true"
title="批量编辑"
width="50%"
@register="registerModal"
@ok="handleSave"
>
<BasicForm @register="registerForm" />
<!--右下角按钮-->
<template #footer>
<a-button
pre-icon="ant-design:close-outlined"
type="warning"
:loading="loading"
ghost
style="margin-right: 0.8rem"
@click="closeModal"
>取消</a-button
>
<a-button
pre-icon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
@click="handleSave(true)"
>编辑</a-button
>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { BatchModificationFormSchema } from '../columns'
import { SeaExportBatchEdit } from '../api/BookingLedger.js'
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
const emit = defineEmits(['success', 'register'])
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: BatchModificationFormSchema,
showActionButtonGroup: false,
})
const ids = ref()
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
setModalProps({ confirmLoading: false, loading: true })
ids.value = data.removeArr
setModalProps({ loading: false })
})
async function handleSave(exit) {
try {
const values = await validate()
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
// loading.value = true;
const res: API.DataResult = await SeaExportBatchEdit({ ...values, ids: ids.value })
console.log(res)
if (res.succeeded) {
createMessage.success(res.message)
emit('success')
rowId.value = res.data
} else {
createMessage.error(res.message)
}
exit && closeModal()
} finally {
// loading.value = false;
setModalProps({ confirmLoading: false, loading: false })
}
}
</script>
Loading…
Cancel
Save