|
|
|
@ -82,20 +82,6 @@
|
|
|
|
|
<a-textarea v-model:value="moreNumVal" style="height: 200px" />
|
|
|
|
|
</div>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<!-- 高级查询 -->
|
|
|
|
|
<a-modal
|
|
|
|
|
class="high-search"
|
|
|
|
|
title="高级查询"
|
|
|
|
|
:maskClosable="false"
|
|
|
|
|
width="40%"
|
|
|
|
|
:visible="AdvancedQueryVisible"
|
|
|
|
|
@ok="FnAdvancedQuery"
|
|
|
|
|
@cancel="FnCancelAdvancedQuery"
|
|
|
|
|
>
|
|
|
|
|
<div class="CsConditionFilter">
|
|
|
|
|
<ConditionFilter v-model="AdvancedQueryData" :filter-fields="fields" :disabled="false" />
|
|
|
|
|
</div>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<a-modal
|
|
|
|
|
:title="
|
|
|
|
|
TaskShippingOrderCompareData.isExistsDiff ? '下货纸比对(有差异)' : '下货纸比对(正常)'
|
|
|
|
@ -179,17 +165,15 @@
|
|
|
|
|
<script lang="ts" setup name="海运出口">
|
|
|
|
|
import TableActionBar from './components/tableActionBar.vue'
|
|
|
|
|
import tableActionBarRight from './components/tableActionBarRight.vue'
|
|
|
|
|
import ConditionFilter from '/@/components/Condition/index.vue'
|
|
|
|
|
import { onMounted, ref } from 'vue'
|
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
|
|
|
|
import { PageDataByBooking, UpdateUserQuerySet, GetUserQuerySet } from './api/BookingLedger.js'
|
|
|
|
|
import { PageDataByBooking, } from './api/BookingLedger.js'
|
|
|
|
|
import { getColumnsByClient } from '/@/views/baseinfo/formcopy/api'
|
|
|
|
|
import { useModal } from '/@/components/Modal'
|
|
|
|
|
import { columns, searchFormSchema, FeeStatus } from './columns'
|
|
|
|
|
import { useGo } from '/@/hooks/web/usePage'
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
import { formatTableData } from '/@/hooks/web/common'
|
|
|
|
|
import { FilterRules } from '/@/components/Condition/index'
|
|
|
|
|
import { Field } from '/@/components/Render/interface'
|
|
|
|
|
import { useOptionsStore } from '/@/store/modules/options'
|
|
|
|
|
const optionsStore = useOptionsStore()
|
|
|
|
@ -197,8 +181,10 @@
|
|
|
|
|
import { useI18n } from '/@/hooks/web/useI18n'
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
import initData from './modules/initData.js'
|
|
|
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
import { useAppStore } from '/@/store/modules/app'
|
|
|
|
|
// 引入处理入参方法
|
|
|
|
|
import { formatParams } from '/@/hooks/web/common'
|
|
|
|
|
const appStore = useAppStore()
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
const { notification } = useMessage()
|
|
|
|
@ -326,142 +312,21 @@
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
beforeFetch: (p) => {
|
|
|
|
|
console.log(p)
|
|
|
|
|
var data = getForm().getFieldsValue()
|
|
|
|
|
const postParam: API.PageRequest = {
|
|
|
|
|
queryCondition: '',
|
|
|
|
|
pageCondition: {
|
|
|
|
|
pageIndex: p.current,
|
|
|
|
|
pageSize: p.pageSize,
|
|
|
|
|
sortConditions: []
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (p.field) {
|
|
|
|
|
postParam.sortConditions = [
|
|
|
|
|
{
|
|
|
|
|
sortField: p.field,
|
|
|
|
|
listSortDirection: p.order == "ascend" ? 0 : 1
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
} else {
|
|
|
|
|
postParam.sortConditions = []
|
|
|
|
|
}
|
|
|
|
|
let condition: API.ConditionItem[] = []
|
|
|
|
|
if (!!data.mblno) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'mblno',
|
|
|
|
|
FieldValue: data.mblno,
|
|
|
|
|
ConditionalType: 1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.hblno) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'hblno',
|
|
|
|
|
FieldValue: data.hblno,
|
|
|
|
|
ConditionalType: 1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.customerId) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'customerId',
|
|
|
|
|
FieldValue: data.customerId,
|
|
|
|
|
ConditionalType: 1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.etd) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'etd',
|
|
|
|
|
FieldValue: data.etd[0],
|
|
|
|
|
ConditionalType: 3
|
|
|
|
|
})
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'etd',
|
|
|
|
|
FieldValue: data.etd[1],
|
|
|
|
|
ConditionalType: 5
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.operatorId) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'operatorId',
|
|
|
|
|
FieldValue: data.operatorId,
|
|
|
|
|
ConditionalType: 1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.saleId) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'saleId',
|
|
|
|
|
FieldValue: data.saleId,
|
|
|
|
|
ConditionalType: 1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.vesselId) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'vesselId',
|
|
|
|
|
FieldValue: data.vesselId,
|
|
|
|
|
ConditionalType: 1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.voyno) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'voyno',
|
|
|
|
|
FieldValue: data.voyno,
|
|
|
|
|
ConditionalType: 1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.dischargePortId) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'dischargePortId',
|
|
|
|
|
FieldValue: data.dischargePortId,
|
|
|
|
|
ConditionalType: 1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.destinationId) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'destinationId',
|
|
|
|
|
FieldValue: data.destinationId,
|
|
|
|
|
ConditionalType: 1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.carrierId) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'carrierId',
|
|
|
|
|
FieldValue: data.carrierId,
|
|
|
|
|
ConditionalType: 1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.laneId) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'laneId',
|
|
|
|
|
FieldValue: data.laneId,
|
|
|
|
|
ConditionalType: 1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!!data.laneId) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'laneId',
|
|
|
|
|
FieldValue: data.laneId,
|
|
|
|
|
ConditionalType: 1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (isAdvancedQuery.value) {
|
|
|
|
|
condition.push(ConditionalList.value)
|
|
|
|
|
}
|
|
|
|
|
if (moreNumVal.value) {
|
|
|
|
|
let ManyQueryData: any = { ConditionalList: [] }
|
|
|
|
|
moreNumVal.value
|
|
|
|
|
.replace(/\n|\r/g, ',')
|
|
|
|
|
.split(',')
|
|
|
|
|
.forEach((item) => {
|
|
|
|
|
ManyQueryData.ConditionalList.push({
|
|
|
|
|
Key: 0,
|
|
|
|
|
Value: { FieldName: 'mblno', FieldValue: item, ConditionalType: 1 },
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
return formatParams(p)
|
|
|
|
|
// if (moreNumVal.value) {
|
|
|
|
|
// let ManyQueryData: any = { ConditionalList: [] }
|
|
|
|
|
// moreNumVal.value
|
|
|
|
|
// .replace(/\n|\r/g, ',')
|
|
|
|
|
// .split(',')
|
|
|
|
|
// .forEach((item) => {
|
|
|
|
|
// ManyQueryData.ConditionalList.push({
|
|
|
|
|
// Key: 0,
|
|
|
|
|
// Value: { FieldName: 'mblno', FieldValue: item, ConditionalType: 1 },
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
condition.push(ManyQueryData)
|
|
|
|
|
}
|
|
|
|
|
postParam.queryCondition = JSON.stringify(condition)
|
|
|
|
|
return postParam
|
|
|
|
|
// condition.push(ManyQueryData)
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
afterFetch: () => {
|
|
|
|
|
isAdvancedQuery.value = false
|
|
|
|
@ -471,7 +336,9 @@
|
|
|
|
|
columns,
|
|
|
|
|
formConfig: {
|
|
|
|
|
labelWidth: 120,
|
|
|
|
|
// 表格表单需要的过滤字段集合
|
|
|
|
|
schemas: searchFormSchema,
|
|
|
|
|
// 是否显示高级查询(默认否)
|
|
|
|
|
useAdvancedSearch: true
|
|
|
|
|
},
|
|
|
|
|
isTreeTable: false,
|
|
|
|
@ -527,8 +394,6 @@
|
|
|
|
|
moreNumVisible.value = false
|
|
|
|
|
}
|
|
|
|
|
const isAdvancedQuery = ref(false)
|
|
|
|
|
const AdvancedQueryVisible = ref(false)
|
|
|
|
|
const AdvancedQueryData = ref<FilterRules>({ logicalOperator: 'and', conditions: [], groups: [] })
|
|
|
|
|
const showColumns = ref({})
|
|
|
|
|
const formAllData = ref([])
|
|
|
|
|
const fromTableAllData = ref({})
|
|
|
|
@ -542,14 +407,6 @@
|
|
|
|
|
const TaskShippingOrderCompareVisible = ref(false)
|
|
|
|
|
const formatSheetVisible = ref(false)
|
|
|
|
|
|
|
|
|
|
//打开高级查询弹窗
|
|
|
|
|
function FnOpenAdvancedQuery() {
|
|
|
|
|
AdvancedQueryVisible.value = true
|
|
|
|
|
}
|
|
|
|
|
//关闭高级查询弹窗
|
|
|
|
|
function FnCancelAdvancedQuery() {
|
|
|
|
|
AdvancedQueryVisible.value = false
|
|
|
|
|
}
|
|
|
|
|
// 批量编辑
|
|
|
|
|
function batchEditing() {
|
|
|
|
|
const select = getSelectRows()
|
|
|
|
@ -567,60 +424,6 @@
|
|
|
|
|
}
|
|
|
|
|
const permissionId = ref<String>('')
|
|
|
|
|
const ConditionalList: Ref<any> = ref()
|
|
|
|
|
//执行高级查询
|
|
|
|
|
async function FnAdvancedQuery() {
|
|
|
|
|
let Api = (data) => {
|
|
|
|
|
let Obj: any = {}
|
|
|
|
|
let key: number = 0
|
|
|
|
|
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) {
|
|
|
|
|
isAdvancedQuery.value = true
|
|
|
|
|
reload()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
async function createdInit() {
|
|
|
|
|
showColumns.value = JSON.parse(JSON.stringify(initData.columns))
|
|
|
|
|
formAllData.value = JSON.parse(JSON.stringify(initData.condAllData))
|
|
|
|
@ -661,17 +464,6 @@
|
|
|
|
|
|
|
|
|
|
fields.value = data
|
|
|
|
|
}
|
|
|
|
|
FnGetUserQuerySet()
|
|
|
|
|
// getConfigUser(true)
|
|
|
|
|
}
|
|
|
|
|
async function FnGetUserQuerySet() {
|
|
|
|
|
const res: API.DataResult = await GetUserQuerySet({
|
|
|
|
|
permissionId: permissionId.value,
|
|
|
|
|
})
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
console.log(res)
|
|
|
|
|
AdvancedQueryData.value = JSON.parse(res.data.content)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function handledbclick(record) {
|
|
|
|
|
editColumns(record)
|
|
|
|
|