用户新消息

szh-new
lijingjia 4 months ago
parent 3de90a35fe
commit 845f724917

@ -4,26 +4,34 @@
* @Date: 2024-04-29 11:54:04 * @Date: 2024-04-29 11:54:04
--> -->
<template> <template>
<div> <div v-if="source != 'edit'" class="ds-approve-btns">
<a-button @click="approveHandle('2')" danger class="mr10"> <div>
{{ rejectText }} <a-button v-repeat v-if="source == 'Create'" @click="approveHandle('2')" danger class="mr10">
</a-button> {{ rejectText }}
<a-button @click="approveHandle('1')" type="primary"> </a-button>
{{ agreeText }} <a-button v-repeat v-if="source == 'Create'" @click="approveHandle('1')" type="primary">
</a-button> {{ agreeText }}
<a-modal </a-button>
v-model:visible="visible" <a-button v-repeat v-if="source != 'edit'" class="ml10" @click="openFlowChart" type="primary">
title="驳回" 流程图
width="40%" </a-button>
@ok="handleOk" <a-modal
> v-model:visible="visible"
<BasicForm @register="registerForm" /> title="驳回"
</a-modal> width="40%"
@ok="handleOk"
>
<BasicForm @register="registerForm" />
</a-modal>
</div>
<!-- 流程图 -->
<FlowChart ref="flowChart"></FlowChart>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, defineProps, onMounted } from 'vue' import { ref, computed, defineProps, onMounted } from 'vue'
import FlowChart from '../FlowChart/index.vue'
import { BasicForm, useForm } from '/@/components/Form/index' import { BasicForm, useForm } from '/@/components/Form/index'
const props = defineProps({ const props = defineProps({
// //
@ -38,6 +46,21 @@
// //
approve: { approve: {
type: Function type: Function
},
//
source: {
type: String,
default: 'edit'
},
//
businessType: {
type: String,
default: '1'
},
// id
id: {
type: String,
default: '1'
} }
}) })
const visible = ref(false) const visible = ref(false)
@ -73,6 +96,11 @@
props.approve() props.approve()
visible.value = false visible.value = false
} }
const flowChart = ref()
//
const openFlowChart = () => {
flowChart.value.init(props.id, props.businessType, 0)
}
const handleOk = async () => { const handleOk = async () => {
const res = await validate() const res = await validate()
console.log(res) console.log(res)
@ -80,3 +108,20 @@
visible.value = false visible.value = false
} }
</script> </script>
<style lang="less" scoped>
//
.ds-approve-btns {
.flex {
justify-content: space-between;
}
position: fixed;
bottom: 0;
background-color: #ffffff;
padding: 8px 20px;
right: 0;
left: 0;
text-align: right;
border-top: 1px solid #d9d9d9;
}
</style>

@ -381,7 +381,7 @@
if (!flag) return createMessage.warning('请勾选要查看流程的费用!') if (!flag) return createMessage.warning('请勾选要查看流程的费用!')
if (arr.length > 1) return createMessage.warning('仅支持勾选1条费用进行查看流程') if (arr.length > 1) return createMessage.warning('仅支持勾选1条费用进行查看流程')
if (arr[0].feeStatus == 1) return createMessage.warning('费用录入状态的数据不支持查看流程!') if (arr[0].feeStatus == 1) return createMessage.warning('费用录入状态的数据不支持查看流程!')
flowChart.value.init(arr[0].id, 0, 1) flowChart.value.init(arr[0].id, 1, 0)
} }
// //
const submitHistory = (v) => { const submitHistory = (v) => {

@ -73,11 +73,12 @@
const loading = ref(false) const loading = ref(false)
// //
const approveData = ref([]) const approveData = ref([])
const init = (id, type, btype) => { // params: {id: id type}
const init = (id, btype, type) => {
visible.value = true visible.value = true
loading.value = true loading.value = true
activeKey.value = '1' activeKey.value = '1'
GetFlowContent({ businessId: id, type, businessType: btype }).then(res => { GetFlowContent({ businessId: id, businessType: btype, type }).then(res => {
loading.value = false loading.value = false
const { data } = res const { data } = res
data.forEach(item => { data.forEach(item => {
@ -112,7 +113,8 @@
} }
.ant-modal-title { .ant-modal-title {
position: relative; position: relative;
top: -15px; top: 0;
padding-right: 20px;
} }
.ant-modal-body { .ant-modal-body {
display: none; display: none;

@ -274,18 +274,6 @@ h5 {
color: #7A8798; color: #7A8798;
} }
// 审批按钮容器
.ds-approve-btns {
position: fixed;
bottom: 0;
background-color: #ffffff;
padding: 8px 20px;
text-align: right;
right: 0;
left: 0;
border-top: 1px solid #d9d9d9;
}
.ds-view-box { .ds-view-box {
padding-bottom: 65px; padding-bottom: 65px;
} }

@ -184,7 +184,7 @@
if (props.ids.length > 1) return createMessage.warning('仅支持勾选1条费用进行查看流程') if (props.ids.length > 1) return createMessage.warning('仅支持勾选1条费用进行查看流程')
if (props.feeStatus[0] == 1) return createMessage.warning('费用录入状态的数据不支持查看流程!') if (props.feeStatus[0] == 1) return createMessage.warning('费用录入状态的数据不支持查看流程!')
console.log(props.ids) console.log(props.ids)
flowChart.value.init(props.ids[0], 0, 1) flowChart.value.init(props.ids[0], 1, 0)
} }
onMounted(() => { onMounted(() => {
}) })

@ -171,8 +171,7 @@
if (props.ids.length == 0) return createMessage.warning('请勾选要查看流程的费用!') if (props.ids.length == 0) return createMessage.warning('请勾选要查看流程的费用!')
if (props.ids.length > 1) return createMessage.warning('仅支持勾选1条费用进行查看流程') if (props.ids.length > 1) return createMessage.warning('仅支持勾选1条费用进行查看流程')
if (props.feeStatus[0] == 1) return createMessage.warning('费用录入状态的数据不支持查看流程!') if (props.feeStatus[0] == 1) return createMessage.warning('费用录入状态的数据不支持查看流程!')
console.log(props.ids) flowChart.value.init(props.ids[0], 1, 0)
flowChart.value.init(props.ids[0], 0, 1)
} }
onMounted(() => { onMounted(() => {
}) })

@ -2064,3 +2064,30 @@ export function BatchDelBusinessOrderContact(data) {
data data
}) })
} }
// 现舱剩余查询
export function GetAvailableBookingSlots(data) {
return request({
url: '/opApi/BookingSlotService/GetAvailableBookingSlots',
method: 'post',
data
})
}
// 引入现舱关联海运出口
export function BringInBookingSlotToOrder(data) {
return request({
url: '/opApi/BookingSlotService/BringInBookingSlotToOrder',
method: 'post',
data
})
}
// 获取当前任务
export function GetCurrent(params) {
return request({
url: '/opApi/SeaExportTask/GetCurrent',
method: 'get',
params
})
}

@ -987,17 +987,96 @@ export const formSchema6: FormSchema[] = [
export const storageColumns: BasicColumn[] = [ export const storageColumns: BasicColumn[] = [
{ {
title: '舱位提单号', title: '舱位提单号',
dataIndex: 'mblno', dataIndex: 'slotBookingNo',
width: 100,
},
{
title: '合约号',
dataIndex: 'contractNo',
width: 100,
},
{
title: '船公司',
dataIndex: 'carrier',
width: 130,
},
{
title: '订舱抬头',
dataIndex: 'bookingParty',
width: 210,
},
{
title: '订舱方式',
dataIndex: 'bookingSlotTypeName',
width: 80,
},
{
title: '承运模式',
dataIndex: 'carriageTypeName',
width: 72,
},
{
title: '船名',
dataIndex: 'vessel',
width: 150, width: 150,
},
{
title: '航次',
dataIndex: 'voyno',
width: 90,
},
{
title: '装货地',
dataIndex: 'portLoad',
width: 150,
},
{
title: '交货地',
dataIndex: 'placeDelivery',
width: 150
},
{
title: '订舱编号',
dataIndex: 'slotNo',
width: 150
},
{
title: '箱型箱量(余量)',
dataIndex: 'ctnStat',
width: 120
} }
] ]
// 仓位表格过滤表单 // 仓位表格过滤表单
export const storageSearchFormSchema: FormSchema[] = [ export const storageSearchFormSchema: FormSchema[] = [
{ {
field: 'mblno', field: 'portLoad',
label: '装货地', label: '装货地',
component: 'Input', component: 'Input',
colProps: { span: 6 } colProps: { span: 4 }
},
{
field: 'placeDelivery',
label: '交货地',
component: 'Input',
colProps: { span: 4 }
},
{
field: 'vessel',
label: '船名',
component: 'Input',
colProps: { span: 4 }
},
{
field: 'voyno',
label: '航次',
component: 'Input',
colProps: { span: 4 }
},
{
field: 'slotNo',
label: '订舱编号',
component: 'Input',
colProps: { span: 4 }
}, },
] ]

@ -1,5 +1,5 @@
<!-- <!--
* @Description: 引入位数据列表弹窗组件 * @Description: 引入位数据列表弹窗组件
* @Author: lijj * @Author: lijj
* @Date: 2024-04-29 11:54:04 * @Date: 2024-04-29 11:54:04
--> -->
@ -14,14 +14,15 @@
:loading="loading" :loading="loading"
> >
<BasicTable <BasicTable
class="ds-table-detail"
@register="registerTable" @register="registerTable"
/> />
</a-modal> </a-modal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { defineExpose, ref, defineProps } from 'vue' import { defineExpose, ref, defineProps, defineEmits } from 'vue'
import { BasicTable, useTable } from '/@/components/Table' import { BasicTable, useTable } from '/@/components/Table'
import { GetBillManageHistoryList, ImportBillManageHistory } from '../../api/BookingLedger.js' import { GetAvailableBookingSlots, BringInBookingSlotToOrder } from '../../api/BookingLedger.js'
import { storageColumns, storageSearchFormSchema } from './ladingInfo' import { storageColumns, storageSearchFormSchema } from './ladingInfo'
// //
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
@ -38,12 +39,13 @@
type: Function type: Function
} }
}) })
const emit = defineEmits(['createTask'])
// //
import { formatParams } from '/@/hooks/web/common' import { formatParams } from '/@/hooks/web/common'
const [registerTable, { reload, getSelectRows }] = useTable({ const [registerTable, { reload, getSelectRows }] = useTable({
title: '', title: '',
api: async (p) => { api: async (p) => {
const res: API.DataResult = await GetBillManageHistoryList(p) const res: API.DataResult = await GetAvailableBookingSlots(p)
return new Promise((resolve) => { return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count }) resolve({ data: [...res.data], total: res.count })
}) })
@ -69,7 +71,7 @@
width: 60, width: 60,
}, },
rowSelection: { rowSelection: {
type: 'checkbox' type: 'radio'
}, },
canResize: true, canResize: true,
resizeHeightOffset: 80 resizeHeightOffset: 80
@ -81,16 +83,14 @@
} }
const loading = true const loading = true
const handleOk = () => { const handleOk = () => {
const rows = getSelectRows() const slots = getSelectRows()
const ids = rows.map(item => { if (!slots.length) return createMessage.warning('请选择舱位!')
return item.id BringInBookingSlotToOrder({ seaExportId: props.id, slots }).then(res => {
}) // createMessage.success(res.data)
ImportBillManageHistory({ ids, businessType: 1, id: props.id }).then(res => { emit('createTask', 205)
visible.value = false
}).catch(() => {
visible.value = false visible.value = false
if (res.succeeded) {
createMessage.success('导入成功!')
props.reload()
}
}) })
} }
defineExpose({ defineExpose({

@ -4,7 +4,7 @@
* @Date: 2024-04-29 11:54:04 * @Date: 2024-04-29 11:54:04
--> -->
<template> <template>
<div class="ds-detail-box sea-export-detail" :class="{ 'ds-view-box': route.query.source == 'view' }"> <div class="ds-detail-box sea-export-detail" :class="{ 'ds-view-box': route.query.source != 'edit' }">
<a-tabs <a-tabs
size="small" size="small"
:class="!Showtabs ? 'Showtabs' : ''" :class="!Showtabs ? 'Showtabs' : ''"
@ -32,6 +32,8 @@
:id="id" :id="id"
:details="bookingDetails" :details="bookingDetails"
:inChildLoading="inChildLoading" :inChildLoading="inChildLoading"
:taskType="taskType"
:source="source"
@refresh="refreshPage" @refresh="refreshPage"
@SetOCR="SetOCR" @SetOCR="SetOCR"
> >
@ -46,10 +48,12 @@
@editLineName="editLineNameFun" @editLineName="editLineNameFun"
> >
</mailingInfo> </mailingInfo>
<div v-if="source == 'edit'" class="ds-card mt15"> <!-- 货物信息 -->
<div class="ds-card mt15">
<cargoInfo ref="RefcargoInfo" :details="bookingDetails"></cargoInfo> <cargoInfo ref="RefcargoInfo" :details="bookingDetails"></cargoInfo>
<div class="line"></div> <div class="line"></div>
<goodsTable <goodsTable
v-if="source == 'edit'"
ref="RefgoodsTable" ref="RefgoodsTable"
:details="bookingDetails" :details="bookingDetails"
isParent="parent" isParent="parent"
@ -95,13 +99,14 @@
></manifestTicket> ></manifestTicket>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
<div v-if="route.query.source == 'view'" class="ds-approve-btns"> <ApproveBtns
<ApproveBtns agreeText="审核通过"
agreeText="审核通过" rejectText="驳回任务"
rejectText="驳回任务" :approve="approveDc"
:approve="approveDc" :source="route.query.source"
></ApproveBtns> :id="id"
</div> businessType="1"
></ApproveBtns>
</a-spin> </a-spin>
</div> </div>
</div> </div>
@ -137,6 +142,20 @@
{{ rightFlag ? '收起' : '展开' }} {{ rightFlag ? '收起' : '展开' }}
</a-button> </a-button>
</a-tabs> </a-tabs>
<!-- 选择舱位 -->
<StorageSpace ref="sspace" :id="id" @createTask="createTask"></StorageSpace>
<a-modal
:visible="cvisible"
title="是否现舱"
width="30%"
@ok="handleOk"
@cancel="cvisible = false"
>
<a-radio-group v-model:value="cvalue">
<a-radio :value="1">现舱</a-radio>
<a-radio :value="2">非现舱</a-radio>
</a-radio-group>
</a-modal>
</div> </div>
</template> </template>
@ -152,6 +171,8 @@
import manifestTicket from './components/manifestTicket.vue' import manifestTicket from './components/manifestTicket.vue'
// //
import ApproveBtns from '/@/components/ApproveBtns/index.vue' import ApproveBtns from '/@/components/ApproveBtns/index.vue'
//
import StorageSpace from './components/storageSpace.vue'
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
import { import {
@ -163,7 +184,8 @@
GetDeptList, GetDeptList,
SeaExportCopy, SeaExportCopy,
SeaExportTaskAudit, SeaExportTaskAudit,
CreateTask CreateTask,
GetCurrent
} from '../api/BookingLedger' } from '../api/BookingLedger'
import { getDictDropDown } from '/@/api/common' import { getDictDropDown } from '/@/api/common'
const appStore = useAppStore() const appStore = useAppStore()
@ -186,6 +208,7 @@
import ContactList from './modules/contactList.vue' import ContactList from './modules/contactList.vue'
// //
import { closePage } from '/@/hooks/web/common' import { closePage } from '/@/hooks/web/common'
import { findLast } from 'xe-utils'
const go = useGo() const go = useGo()
const initDetail = {} const initDetail = {}
// loading // loading
@ -220,12 +243,14 @@
const inGoodsSave = ref(false) const inGoodsSave = ref(false)
// const defaultData = ref({}) // const defaultData = ref({})
// const ctnDefaultData = ref({}) // const ctnDefaultData = ref({})
const basicRules = ref(rules.basicRules) // const basicRules = ref(rules.basicRules)
const mailingRules = ref(rules.mailingRules) // const mailingRules = ref(rules.mailingRules)
// const remarksRules = ref(rules.remarksRules) // const remarksRules = ref(rules.remarksRules)
// const historyData = ref({}) // const historyData = ref({})
// const hasHbList = ref(false) // const hasHbList = ref(false)
const moreStr = ref('') const moreStr = ref('')
//
const taskType = ref()
// //
const feeHeight = computed(() => { const feeHeight = computed(() => {
const height = window.innerHeight const height = window.innerHeight
@ -292,153 +317,11 @@
console.log(document.getElementsByClassName('main-tab')[0]) console.log(document.getElementsByClassName('main-tab')[0])
// tab // tab
if (source.value != 'edit') document.getElementsByClassName('main-tab')[0].getElementsByClassName('ant-tabs-nav-wrap')[0].style.display = 'none' if (source.value != 'edit') document.getElementsByClassName('main-tab')[0].getElementsByClassName('ant-tabs-nav-wrap')[0].style.display = 'none'
//
if (route.query.taskId) {
getTask()
}
}) })
// onBeforeRouteUpdate((to, from, next) => {
// console.log(to, from, next, 'onBeforeRouteUpdate')
// next()
// })
// // onBeforeRouteUpdate((to, from, next) => {
// // if (inAddSave.value) {
// // next()
// // return false
// // }
// // if (isCopy.value) {
// // const hisData = {
// // bookingDetails: bookingDetails.value,
// // excuteRules: excuteRules.value,
// // excuteRulesType: excuteRulesType.value,
// // isAdd: isAdd.value,
// // tabActiveKey: tabActiveKey.value,
// // mainOrderActiveKey: mainOrderActiveKey.value,
// // // type: type.value,
// // isCopy: isCopy.value,
// // id: id.value,
// // }
// // // if (Object.keys(that.$refs).includes('RefsedOrder')) {
// // // const secActive = RefsedOrder.value.$data.editIndex
// // // hisData.RefsedOrder = secActive
// // // }
// // historyData.value[`copy-${id.value}`] = hisData
// // } else if (route.query.addNum) {
// // const hisData = {
// // bookingDetails: bookingDetails.value,
// // excuteRules: excuteRules.value,
// // excuteRulesType: excuteRulesType.value,
// // isAdd: isAdd.value,
// // tabActiveKey: tabActiveKey.value,
// // mainOrderActiveKey: mainOrderActiveKey.value,
// // // type: type.value,
// // isCopy: isCopy.value,
// // // id: id.value
// // }
// // // if (Object.keys(that.$refs).includes('RefsedOrder')) {
// // // const secActive = RefsedOrder.value.$data.editIndex
// // // hisData.RefsedOrder = secActive
// // // }
// // historyData.value[`add-${route.query.addNum}`] = hisData
// // } else {
// // const hisData = {
// // bookingDetails: bookingDetails.value,
// // excuteRules: excuteRules.value,
// // excuteRulesType: excuteRulesType.value,
// // isAdd: isAdd.value,
// // tabActiveKey: tabActiveKey.value,
// // mainOrderActiveKey: mainOrderActiveKey.value,
// // // type: type.value,
// // isCopy: isCopy.value,
// // id: id.value,
// // }
// // // if (Object.keys(that.$refs).includes('RefsedOrder')) {
// // // const secActive = RefsedOrder.value.$data.editIndex
// // // hisData.secActive = secActive
// // // }
// // historyData.value[id.value] = hisData
// // }
// // if (appStore.getfeeShow) {
// // const mapFrame = iframe.value
// // const iframeWin = mapFrame.contentWindow
// // iframeWin.postMessage(
// // {
// // type: 'save',
// // },
// // '*',
// // )
// // }
// // setTimeout(() => {
// // next()
// // }, 100)
// // setTimeout(() => {
// // getRouterHis()
// // }, 800)
// // })
// // onBeforeRouteLeave((to, from, next) => {
// // inChildLoading.value = true
// // if (isCopy.value) {
// // const hisData = {
// // bookingDetails: bookingDetails.value,
// // excuteRules: excuteRules.value,
// // excuteRulesType: excuteRulesType.value,
// // isAdd: isAdd.value,
// // tabActiveKey: tabActiveKey.value,
// // mainOrderActiveKey: mainOrderActiveKey.value,
// // // type: type.value,
// // isCopy: isCopy.value,
// // id: id.value,
// // }
// // // if (Object.keys(this.$refs).includes('RefsedOrder')) {
// // // const secActive = RefsedOrder.value.$data.editIndex
// // // hisData.secActive = secActive
// // // }
// // if (!route.query.copyId) {
// // historyData.value[`copy-${id.value}`] = hisData
// // } else {
// // historyData.value[`copy-${id.value}-${route.query.copyId}`] = hisData
// // }
// // } else if (route.query.addNum) {
// // const hisData = {
// // bookingDetails: bookingDetails.value,
// // excuteRules: excuteRules.value,
// // excuteRulesType: excuteRulesType.value,
// // isAdd: isAdd.value,
// // tabActiveKey: tabActiveKey.value,
// // mainOrderActiveKey: mainOrderActiveKey.value,
// // // type: type.value,
// // isCopy: isCopy.value,
// // // id: id.value
// // }
// // // if (Object.keys(that.$refs).includes('RefsedOrder')) {
// // // const secActive = RefsedOrder.value.$data.editIndex
// // // hisData.secActive = secActive
// // // }
// // historyData.value[`add-${route.query.addNum}`] = hisData
// // } else {
// // const hisData = {
// // bookingDetails: bookingDetails.value,
// // excuteRules: excuteRules.value,
// // excuteRulesType: excuteRulesType.value,
// // isAdd: isAdd.value,
// // tabActiveKey: tabActiveKey.value,
// // mainOrderActiveKey: mainOrderActiveKey.value,
// // // type: type.value,
// // isCopy: isCopy.value,
// // id: id.value,
// // }
// // // if (Object.keys(that.$refs).includes('RefsedOrder')) {
// // // const secActive = RefsedOrder.value.$data.editIndex
// // // hisData.secActive = secActive
// // // }
// // historyData.value[id.value] = hisData
// // }
// // if (appStore.gethasbookingDetail) {
// // bookingDetails.value = { ...initDetail }
// // }
// // next()
// // setTimeout(() => {
// // inChildLoading.value = false
// // }, 2000)
// // })
// // ============================================
init() init()
// //
function init() { function init() {
@ -1086,6 +969,22 @@
loading.value = false loading.value = false
}) })
} }
//
const createTask = async (type) => {
const postData = {
businessId: id.value,
businessType: '1',
taskType: type
}
loading.value = true
await CreateTask(postData).then(res => {
taskType.value = type
loading.value = false
createMessage.success(res.message)
}).catch(() => {
loading.value = false
})
}
// // ============================================ // // ============================================
// // function getRouterHis() { // // function getRouterHis() {
// // inChildLoading.value = true // // inChildLoading.value = true
@ -1551,6 +1450,18 @@
const submitDc = (v) => { const submitDc = (v) => {
loading.value = v loading.value = v
} }
//
const sspace = ref()
const cvisible = ref(false)
const cvalue = ref(1)
const handleOk = () => {
if (cvalue.value == 1) {
sspace.value.init()
} else {
createTask(202)
}
cvisible.value = false
}
// //
const approveDc = (remark) => { const approveDc = (remark) => {
const postData = { const postData = {
@ -1563,359 +1474,29 @@
SeaExportTaskAudit(postData).then(res => { SeaExportTaskAudit(postData).then(res => {
loading.value = false loading.value = false
createMessage.success(res.message) createMessage.success(res.message)
closePage() //
if (res.data.isCompleted && res.data.flowStatus == 3) {
cvisible.value = true
}
}).catch(() => { }).catch(() => {
loading.value = false loading.value = false
}) })
} }
// function handleSaveCtnListCover(data, slots) { //
// const arr = [] const getTask = () => {
// data.forEach((item) => { GetCurrent({ businessId: id.value, businessType: 1 }).then(res => {
// if (item.ctnnum > 0) { console.log(res)
// arr.push(item) })
// } }
// })
// bookingDetails.value.ctnInputs = arr
// bookingDetails.value.slots = slots
// bookingDetails.value.mblno = slots[0].sloT_BOOKING_NO
// bookingDetails.value.carrier = slots[0].carrier
// bookingDetails.value.carrierid = slots[0].carrierid
// bookingDetails.value.voynoinner = slots[0].voyno
// bookingDetails.value.voyno = slots[0].voyno
// bookingDetails.value.vessel = slots[0].vessel
// bookingDetails.value.etd = slots[0].etd
// bookingDetails.value.cntrtotal = slots[0].ctN_STAT
// bookingDetails.value.startETA = slots[0].eta
// that.$forceUpdate()
// RefgoodsTable.value.init()
// }
// function handleSaveCtnList(data, slots) {
// const arr = []
// data.forEach((item) => {
// if (item.ctnnum > 0) {
// arr.push(item)
// }
// })
// bookingDetails.value.ctnInputs = arr
// bookingDetails.value.slots = slots
// RefgoodsTable.value.init()
// }
// function handleSetCtnList() {
// bookingDetails.value.slots = []
// that.$forceUpdate()
// }
// function frompre(data) {
// RefbasicInfo.value._data.frompre = data.data1
// }
// function changePage(type) {
// const nowId = route.query.id
// const arr = Object.keys(appStore.getbookingList)
// const index = arr.indexOf(nowId.toString())
// if (type === 'prev') {
// if (index < 1) {
// notification.error({ message: '', duration: 3 })
// return false
// }
// const prevId = arr[index - 1]
// const prevType = appStore.getbookingList[prevId].carrierid
// const $data = appStore.getneedSavePages
// delete $data[route.fullPath]
// appStore.setneedSavePages($data)
// appStore.settopDown(true)
// router.replace({
// name: 'BookingDetail',
// query: {
// id: prevId,
// type: prevType,
// mblno: appStore.getbookingList[prevId].mblno,
// noOpenTab: true,
// },
// })
// } else {
// if (index === arr.length - 1) {
// notification.error({ message: '', duration: 3 })
// return false
// }
// const nextId = arr[index + 1]
// const nextType = appStore.getbookingList[nextId].carrierid
// const $data = appStore.getneedSavePages
// delete $data[route.fullPath]
// appStore.setneedSavePages($data)
// appStore.settopDown(true)
// router.replace({
// name: 'BookingDetail',
// query: {
// id: nextId,
// type: nextType,
// mblno: appStore.getbookingList[nextId].mblno,
// noOpenTab: true,
// },
// })
// }
// }
function setDeatilsFun(res, overSet = false) { function setDeatilsFun(res, overSet = false) {
let newData = res.data let newData = res.data
bookingDetails.value = { bookingDetails.value = {
...bookingDetails.value, ...bookingDetails.value,
...newData, ...newData,
} }
// oldBookingDetails.value = bookingDetails.value
// sendMessageFY()
// if (route.query.isCopy && route.query.copyId) {
// const hisData = {
// bookingDetails: bookingDetails.value,
// excuteRules: excuteRules.value,
// excuteRulesType: excuteRulesType.value,
// isAdd: isAdd.value,
// tabActiveKey: tabActiveKey.value,
// mainOrderActiveKey: mainOrderActiveKey.value,
// // type: type.value,
// isCopy: isCopy.value,
// id: id.value,
// }
// historyData.value[`copyMore-${id.value}`] = hisData
// }
// getFilter()
// inPageLoading.value = false
// setTimeout(() => {
// setTimeout(() => {
// checkSaveFun({ type: 'details', hasChange: false })
// }, 600)
// detailsLoadOver.value = true
// inChildLoading.value = false
// notification.success({ message: '', duration: 3 })
// if (res.data.hbList && res.data.hbList.length > 0) {
// Showtabs.value = true
// }
// }, 1200)
} }
// function sendMessageFY() {
// const mapFrame = iframe.value
// const data = {
// custno: bookingDetails.value.custno,
// mblno: bookingDetails.value.mblno,
// cntrtotal: bookingDetails.value.cntrtotal,
// cbm: bookingDetails.value.cbm,
// kgs: bookingDetails.value.kgs,
// pkgs: bookingDetails.value.pkgs,
// customername: bookingDetails.value.customername,
// customerid: bookingDetails.value.customerid,
// portdischarge: bookingDetails.value.portdischarge,
// vessel: bookingDetails.value.vessel,
// voyno: bookingDetails.value.voyno,
// sale: bookingDetails.value.sale,
// etd: bookingDetails.value.etd,
// blfrt: bookingDetails.value.blfrt,
// destination: bookingDetails.value.destination,
// portload: bookingDetails.value.portload,
// truckerid: bookingDetails.value.truckerid,
// trucker: bookingDetails.value.trucker,
// customser: bookingDetails.value.customser,
// customserid: bookingDetails.value.customserid,
// forwarder: bookingDetails.value.forwarder,
// forwarderid: bookingDetails.value.forwarderid,
// agentname: bookingDetails.value.agentname,
// agentnameid: bookingDetails.value.agentnameid,
// yard: bookingDetails.value.yard,
// yardid: bookingDetails.value.yardid,
// shipagency: bookingDetails.value.shipagency,
// shipagencyid: bookingDetails.value.shipagencyid,
// id: bookingDetails.value.id,
// }
// if (appStore.getfeeShow) {
// const iframeWin = mapFrame.contentWindow
// iframeWin.postMessage(
// {
// token: localStorage.getItem('pro__Access-Token'),
// data: data,
// customerTypeList: this.$options.filters['dictData']('djy_cust_prop'),
// },
// '*',
// )
// }
// }
// function calc(num1, num2, calcStr) {
// var str1 //
// var str2
// var ws1 = 0 // ws1ws2 num
// var ws2 = 0 //
// var bigger // biggersmaller0
// var smaller // 1.001 + 2.03 2.0301001+2031.12*1.1112*111000112*11/1000=1.232
// var zeroCount // 0
// var isExistDot1 //
// var isExistDot2
// var sum
// var beishu = 1
// //
// str1 = num1.toString()
// str2 = num2.toString()
// //
// isExistDot1 = str1.indexOf('.') != -1
// isExistDot2 = str2.indexOf('.') != -1
// //
// if (isExistDot1) {
// ws1 = str1.split('.')[1].length
// }
// if (isExistDot2) {
// ws2 = str2.split('.')[1].length
// }
// // ws1 ws2 num1 num2 ws1 ws2 undefined
// // bigger smaller
// bigger = ws1 > ws2 ? ws1 : ws2
// smaller = ws1 < ws2 ? ws1 : ws2
// switch (calcStr) {
// // 0
// // 1.001 + 2.03 2.0301001+203
// case '+':
// case '-':
// case '/':
// zeroCount = bigger - smaller
// for (var i = 0; i < zeroCount; i++) {
// if (ws1 == smaller) {
// str1 += '0'
// } else {
// str2 += '0'
// }
// }
// break
// case '*':
// //
// bigger = bigger + smaller
// break
// default:
// return ''
// break
// }
// //
// str1 = str1.replace('.', '')
// str2 = str2.replace('.', '')
// // 1.001 1000 1001
// for (var i = 0; i < bigger; i++) {
// beishu *= 10 // beishu = beishu * 10;
// }
// num1 = parseInt(str1)
// num2 = parseInt(str2)
// //
// switch (calcStr) {
// case '+':
// sum = (num1 + num2) / beishu
// break
// case '-':
// sum = (num1 - num2) / beishu
// break
// case '*':
// sum = (num1 * num2) / beishu
// break
// case '/':
// sum = num1 / num2
// /*
// 0 */
// break
// default:
// return ''
// }
// return sum
// }
// function diffObj(obj1, obj2) {
// function getTypeByObj(obj) {
// return Object.prototype.toString.call(obj).match(/^\[object ([a-zA-Z]*)\]$/)[1]
// }
// function isEmptyObject(obj) {
// for (const key in obj) {
// return false
// }
// return true
// }
// if (!obj1 || isEmptyObject(obj1) || !obj2 || isEmptyObject(obj2)) {
// return null
// }
// const diffRes = {
// old_val: {},
// new_val: {},
// }
// for (const k in obj2) {
// //
// if (getTypeByObj(obj2[k]) === getTypeByObj(obj1[k])) {
// // ArrayObject
// if (getTypeByObj(obj2[k]) === 'Array' || getTypeByObj(obj2[k]) === 'Object') {
// const diffData = diffObj(obj1[k], obj2[k])
// if (!isEmptyObject(diffData)) {
// diffRes.old_val[k] = diffData.old_val
// diffRes.new_val[k] = diffData.new_val
// }
// } else if (obj1[k] !== obj2[k]) {
// //
// diffRes.old_val[k] = obj1[k]
// diffRes.new_val[k] = obj2[k]
// }
// } else {
// if ([undefined, null, ''].includes(obj1[k]) && [undefined, null, ''].includes(obj2[k])) {
// //
// } else {
// diffRes.old_val[k] = obj1[k]
// diffRes.new_val[k] = obj2[k]
// }
// }
// }
// // null
// if (isEmptyObject(diffRes.old_val) || isEmptyObject(diffRes.new_val)) {
// return null
// }
// return diffRes
// }
function getRightAll() { function getRightAll() {
// GetAllData({
// bookingId: route.query.id,
// })
// .then((res) => {
// if (res.succeeded) {
// if (res.data.statuslog) {
// res.data.statuslog = res.data.statuslog.reverse()
// }
// bookingDetails.value = { ...bookingDetails.value, ...res.data }
// setTimeout(() => {
// checkSaveFun({ type: 'details', hasChange: false })
// }, 10)
// } else {
// console.log(res.message)
// }
// })
// .catch((err) => {
// console.log(err)
// })
} }
// function changeHBFun(data) {
// const arr = []
// data.map((item: any) => {
// arr.push(item.isNoSave)
// })
// if (arr.includes(true)) {
// bookingDetails.value.hbList = data
// checkSaveFun({ type: 'hbList', hasChange: true })
// } else {
// checkSaveFun({ type: 'hbList', hasChange: false })
// }
// }
// function sedOrderRemoveFun(sedData) {
// bookingDetails.value.hbList = sedData
// if (sedData.length === 0) {
// Showtabs.value = false
// tabActiveKey.value = '1'
// }
// }
// defineExpose({
// // getRouterHis,
// init,
// })
</script> </script>
<style lang="less"> <style lang="less">

@ -409,23 +409,30 @@
}, },
{ immediate: true }, { immediate: true },
) )
//
const source = ref(route.query.source || 'edit')
onMounted(() => { onMounted(() => {
// const marksScroll = document.getElementById('marks-scroll') if (source.value != 'edit') {
// if (marksScroll) { cargoInfoFormSchema1.forEach(item => {
// marksScroll.addEventListener('scroll', () => { item.dynamicDisabled = true
// document.getElementById('marks-scroll-right').scrollTop = marksScroll.scrollTop })
// }) cargoInfoFormSchema2.forEach(item => {
// } item.dynamicDisabled = true
// const descriptionScroll = document.getElementById('description-scroll') })
// if (descriptionScroll) { cargoInfoFormSchema3.forEach(item => {
// descriptionScroll.addEventListener('scroll', () => { item.dynamicDisabled = true
// document.getElementById('description-scroll-right').scrollTop = descriptionScroll.scrollTop })
// }) } else {
// } cargoInfoFormSchema1.forEach(item => {
// const obj = {} item.dynamicDisabled = false
// that.$options.filters['dictData']('BookingLockOrder').forEach((item) => { })
// obj[item.code] = true cargoInfoFormSchema2.forEach(item => {
// }) item.dynamicDisabled = false
})
cargoInfoFormSchema3.forEach(item => {
item.dynamicDisabled = false
})
}
// BookingLockOrder.value = obj // BookingLockOrder.value = obj
setTimeout(() => { setTimeout(() => {
changePkgs() changePkgs()

@ -32,7 +32,7 @@
import { ref, getCurrentInstance, watch, onMounted } from 'vue' import { ref, getCurrentInstance, watch, onMounted } from 'vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
const route = useRoute() const route = useRoute()
// //
const source = ref(route.query.source || 'edit') const source = ref(route.query.source || 'edit')
const props = defineProps({ const props = defineProps({
details: { details: {
@ -653,15 +653,24 @@
visibleJW.value = true visibleJW.value = true
} }
onMounted(() => { onMounted(() => {
//
if (source.value != 'edit') { if (source.value != 'edit') {
mailingInfoFormSchemaR.forEach(item => { mailingInfoFormSchemaR.forEach(item => {
item.dynamicDisabled = true item.dynamicDisabled = true
}) })
} else {
mailingInfoFormSchemaR.forEach(item => {
item.dynamicDisabled = false
})
} }
if (source.value != 'edit') { if (source.value != 'edit') {
mailingInfoFormSchemaL.forEach(item => { mailingInfoFormSchemaL.forEach(item => {
item.dynamicDisabled = true item.dynamicDisabled = true
}) })
} else {
mailingInfoFormSchemaL.forEach(item => {
item.dynamicDisabled = false
})
} }
}) })
defineExpose({ defineExpose({

@ -1,44 +1,44 @@
<template> <template>
<div class="operation-area"> <div class="operation-area">
<a-button v-repeat v-if="urlParams.source != 'view'" type="link" @click="openModel('bookingSpace')"> <a-button v-repeat v-if="urlParams.source == 'edit' || taskType == 202" type="link" @click="openModel('bookingSpace')">
<span class="iconfont icon-gongdanqueren"></span> <span class="iconfont icon-gongdanqueren"></span>
订舱 订舱
</a-button> </a-button>
<a-button v-if="urlParams.source != 'view'" type="link" @click="openModel('cutOff')"> <a-button v-if="urlParams.source == 'edit'" type="link" @click="openModel('cutOff')">
<span class="iconfont icon-lanjie"></span> <span class="iconfont icon-lanjie"></span>
截单 截单
</a-button> </a-button>
<a-button v-if="urlParams.source != 'view'" type="link" @click="openModel('trace')"> <a-button v-if="urlParams.source == 'edit'" type="link" @click="openModel('trace')">
<span class="iconfont icon-dingwei"></span> <span class="iconfont icon-dingwei"></span>
运踪 运踪
</a-button> </a-button>
<a-button v-if="urlParams.source != 'view'" type="link" @click="openPreOrderFun"> <a-button v-if="urlParams.source == 'edit'" type="link" @click="openPreOrderFun">
<span class="iconfont icon-chuanfanguanli-chuanfanshenqing"></span> <span class="iconfont icon-chuanfanguanli-chuanfanshenqing"></span>
舱单 舱单
</a-button> </a-button>
<a-button v-if="urlParams.source != 'view'" type="link" @click="openModel('paper')"> <a-button v-if="urlParams.source == 'edit'" type="link" @click="openModel('paper')">
<span class="iconfont icon-touzijilu"></span> <span class="iconfont icon-touzijilu"></span>
下货纸 下货纸
</a-button> </a-button>
<Divider v-if="urlParams.source != 'view'" type="vertical" /> <Divider v-if="urlParams.source == 'edit'" type="vertical" />
<a-button v-if="urlParams.source != 'view'" type="link" @click="FnOpBusinessYard"> <a-button v-if="urlParams.source == 'edit'" type="link" @click="FnOpBusinessYard">
<span class="iconfont icon-a-fahuodaifahuo"></span> <span class="iconfont icon-a-fahuodaifahuo"></span>
场站入货 场站入货
</a-button> </a-button>
<a-button v-if="urlParams.source != 'view'" type="link" @click="FnOpBusinessTruck"> <a-button v-if="urlParams.source == 'edit'" type="link" @click="FnOpBusinessTruck">
<span class="iconfont icon-yunshu1"></span> <span class="iconfont icon-yunshu1"></span>
派车信息 派车信息
</a-button> </a-button>
<Divider v-if="urlParams.source != 'view'" type="vertical" /> <Divider v-if="urlParams.source == 'edit'" type="vertical" />
<a-button v-if="urlParams.source != 'view'" type="link" v-repeat @click="FnTxxpLink"> <a-button v-if="urlParams.source == 'edit'" type="link" v-repeat @click="FnTxxpLink">
<span class="iconfont icon-a-xiaopiaofapiao-01"></span> <span class="iconfont icon-a-xiaopiaofapiao-01"></span>
提箱小票 提箱小票
</a-button> </a-button>
<a-button v-if="urlParams.source != 'view'" type="link" v-repeat @click="ShowOCR"> <a-button v-if="urlParams.source == 'edit'" type="link" v-repeat @click="ShowOCR">
<span class="iconfont icon-OCR"></span> <span class="iconfont icon-OCR"></span>
OCR OCR
</a-button> </a-button>
<a-button v-if="urlParams.source != 'view'" type="link" v-repeat @click="handleSubmitTelex"> <a-button v-if="urlParams.source == 'edit'" type="link" v-repeat @click="handleSubmitTelex">
<span class="iconfont icon-lunchuan"></span> <span class="iconfont icon-lunchuan"></span>
船司电放 船司电放
</a-button> </a-button>
@ -945,6 +945,10 @@
// id // id
id: { id: {
type: String type: String
},
//
taskType: {
type: [String || Number]
} }
}) })
// ============= // =============

@ -3,6 +3,7 @@ import { BasicColumn, FormSchema } from '/@/components/Table'
import { getRoleList, getOrgList, getDeptList } from '/@/api/common' import { getRoleList, getOrgList, getDeptList } from '/@/api/common'
import { Tag } from 'ant-design-vue' import { Tag } from 'ant-design-vue'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
import { checkPermissions } from '/@/hooks/Permissions/index'
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
import { t } from '/@/hooks/web/useI18n' import { t } from '/@/hooks/web/useI18n'
const selectOrgList = ref<any>([]) const selectOrgList = ref<any>([])
@ -182,7 +183,11 @@ export const formSchema: FormSchema[] = [
} }
], ],
dynamicDisabled: ({ values }) => { dynamicDisabled: ({ values }) => {
return values.id ? true : false if (!values.id || !checkPermissions('sys:user:pwd')) {
return false
} else {
return true
}
} }
}, },
{ {
@ -196,6 +201,7 @@ export const formSchema: FormSchema[] = [
field: 'phone', field: 'phone',
label: '手机号', label: '手机号',
component: 'Input', component: 'Input',
required: true,
rules: [ rules: [
{ {
pattern: /^1\d{10}$/, pattern: /^1\d{10}$/,
@ -210,6 +216,7 @@ export const formSchema: FormSchema[] = [
label: '邮箱', label: '邮箱',
component: 'Input', component: 'Input',
rules: [{ type: 'email', message: t('请填写正确的邮箱地址') }], rules: [{ type: 'email', message: t('请填写正确的邮箱地址') }],
required: true,
colProps: { span: 6 }, colProps: { span: 6 },
}, },
{ {
@ -418,5 +425,10 @@ export const formSchema: FormSchema[] = [
] ]
export const BankFormSchema: FormSchema[] = [ export const BankFormSchema: FormSchema[] = [
{
field: 'id',
component: 'Input',
label: ''
},
] ]

@ -1,7 +1,7 @@
<template> <template>
<div class="main"> <div class="main">
<div style="width: 100%;"> <div style="width: 100%;">
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handledbclick"> <BasicTable class="ds-table-detail" @register="registerTable" @row-dbClick="handledbclick">
<template #left> <template #left>
<div class="nav-box"> <div class="nav-box">
<div class="nav-bottom"> <div class="nav-bottom">
@ -256,6 +256,8 @@
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import { formatParams } from '/@/hooks/web/common' import { formatParams } from '/@/hooks/web/common'
import { searchFormSchema } from './columns' import { searchFormSchema } from './columns'
import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore()
import { BasicTable, useTable, TableAction } from '/@/components/Table' import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { useMessage } from '../../hooks/web/useMessage' import { useMessage } from '../../hooks/web/useMessage'
const { createMessage } = useMessage() const { createMessage } = useMessage()
@ -285,6 +287,21 @@ import { useGo } from '/@/hooks/web/usePage'
const go = useGo() const go = useGo()
onMounted(() => { onMounted(() => {
getCurrentTotalStat() getCurrentTotalStat()
// 使
optionsStore.getOptionsByCode('GetVesselSelectList')
optionsStore.getOptionsByCode('GetClientStlModeSelectList')
optionsStore.getOptionsByCode('GetClientSourceSelectList')
optionsStore.getOptionsByCode('GetVoynoSelectList')
optionsStore.getOptionsByCode('GetClientLanesSelectList')
optionsStore.getOptionsByCode('GetSaleList')
optionsStore.getOptionsByCode('GetDeptList')
optionsStore.getOptionsByCode('GetCustomerServiceList')
optionsStore.getOptionsByCode('GetVouchingClerkList')
optionsStore.getOptionsByCode('GetClientPortSelectList')
optionsStore.getOptionsByCode('GetIssueTypeSelectList')
optionsStore.getOptionsByCode('GetClientFrtSelectList')
optionsStore.getOptionsByCode('GetServiceSelectList')
optionsStore.getOptionsByCode('GetPackageSelectList')
}) })
@ -572,7 +589,7 @@ function handledbclick(row) {
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
const router = useRouter(); const router = useRouter();
function handleEdit(data) { function handleEdit(data) {
switch (data.tasK_BASE_TYPE) { switch (data.tasK_TYPE) {
case 'VGM_COMPARE': case 'VGM_COMPARE':
// VGM // VGM
go({ go({
@ -722,17 +739,13 @@ function handleEdit(data) {
break; break;
case 'WAIT_ORDER_AUDIT': case 'WAIT_ORDER_AUDIT':
// //
console.log(data)
go({ go({
path: '/taskmanage/booking-approval', path: '/taskmanage/booking-approval',
query: { id: data.ouT_BS_NO, source: 'view', taskId: data.id, status: data.tasK_TYPE } query: { id: data.ouT_BS_NO, source: data.status, taskId: data.id, status: data.tasK_TYPE }
}); });
break; break;
default: default:
//
go({
path: '/taskmanage/booking-approval',
query: { id: data.ouT_BS_NO, source: 'view' }
});
break; break;
} }
} }

Loading…
Cancel
Save