|
|
|
@ -7,7 +7,6 @@
|
|
|
|
|
<div class="sea-export-detail" :class="{ 'ds-view-box': source != 'edit' }">
|
|
|
|
|
<a-tabs
|
|
|
|
|
size="small"
|
|
|
|
|
:class="!Showtabs ? 'Showtabs' : ''"
|
|
|
|
|
class="main-tab mt10"
|
|
|
|
|
:activeKey="tabActiveKey"
|
|
|
|
|
@change="changeTab"
|
|
|
|
@ -116,11 +115,12 @@
|
|
|
|
|
>
|
|
|
|
|
<Divider type="horizontal" />
|
|
|
|
|
<!-- 联系人信息 -->
|
|
|
|
|
<ContactList :id="id"></ContactList>
|
|
|
|
|
<ContactList :id="id" :data="bookingDetails.orderContactList"></ContactList>
|
|
|
|
|
</otherInfo>
|
|
|
|
|
</transition>
|
|
|
|
|
<transition name="slide">
|
|
|
|
|
<rightContent
|
|
|
|
|
v-if="id"
|
|
|
|
|
class="right-content"
|
|
|
|
|
ref="RefrightContent"
|
|
|
|
|
:id="id"
|
|
|
|
@ -130,7 +130,6 @@
|
|
|
|
|
@fileNewUpadte="fileNewUpadte"
|
|
|
|
|
@changeAtd="changeAtd"
|
|
|
|
|
@changeDetail="changeDetailFun"
|
|
|
|
|
@handleComplete="handleComplete"
|
|
|
|
|
@rules="getRules"
|
|
|
|
|
@inGoodsSave="inGoodsSaveFun"
|
|
|
|
|
@handleRefsh="handleRefshRight"
|
|
|
|
@ -179,20 +178,20 @@
|
|
|
|
|
import ApproveBtns from '/@/components/ApproveBtns/index.vue'
|
|
|
|
|
// 剩余仓位组件
|
|
|
|
|
import StorageSpace from './components/storageSpace.vue'
|
|
|
|
|
// 引入表格权限信息(包含id和name)
|
|
|
|
|
import { permissionsInfo } from '/@/hooks/web/usePermission'
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
import {
|
|
|
|
|
BookingOrderGet,
|
|
|
|
|
BookingOrderSave,
|
|
|
|
|
GetCtnListRefsh,
|
|
|
|
|
GetClientSourceDetailSelectList,
|
|
|
|
|
GetSaleList,
|
|
|
|
|
GetDeptList,
|
|
|
|
|
SeaExportCopy,
|
|
|
|
|
SeaExportTaskAudit,
|
|
|
|
|
CreateTask,
|
|
|
|
|
SetTaskStatus
|
|
|
|
|
} from '../api/BookingLedger'
|
|
|
|
|
import { GetFormSetListByModule } from '/@/api/common'
|
|
|
|
|
const appStore = useAppStore()
|
|
|
|
|
const { notification, createMessage } = useMessage()
|
|
|
|
|
import operationArea from './modules/operationArea.vue'
|
|
|
|
@ -221,8 +220,9 @@
|
|
|
|
|
// 判断页面来源
|
|
|
|
|
const source = ref(route.query.source || 'edit')
|
|
|
|
|
// const isCopy = ref(route.query.isCopy || false)
|
|
|
|
|
const Showtabs = ref(false)
|
|
|
|
|
const bookingDetails = ref({})
|
|
|
|
|
const bookingDetails = ref({
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
// // const bookingDetails = ref()
|
|
|
|
|
const tabActiveKey = ref('1')
|
|
|
|
|
const inChildLoading = ref(false)
|
|
|
|
@ -272,16 +272,25 @@
|
|
|
|
|
return '完成任务'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
watch(
|
|
|
|
|
() => bookingDetails.value,
|
|
|
|
|
(val) => {
|
|
|
|
|
console.log(val)
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
deep: true,
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
// 获取表单设置数据
|
|
|
|
|
const getFormSet = () => {
|
|
|
|
|
GetFormSetListByModule({ permissionId: permissionsInfo().permissionId }).then(res => {
|
|
|
|
|
const { data } = res
|
|
|
|
|
if (data && data.length) {
|
|
|
|
|
const content = JSON.parse(data[0].content).columns
|
|
|
|
|
// 存在修改实则表单规则
|
|
|
|
|
RefNoteInfo.value.updateSchema(content)
|
|
|
|
|
RefbasicInfo.value.updateSchema(content)
|
|
|
|
|
RefmailingInfo.value.updateSchemaL(content)
|
|
|
|
|
RefmailingInfo.value.updateSchemaR(content)
|
|
|
|
|
RefcargoInfo.value.updateSchema(content)
|
|
|
|
|
OtherInfo.value.updateSchema(content)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
// 根据permission获取表单设置数据
|
|
|
|
|
getFormSet()
|
|
|
|
|
// 如果详情页,隐藏主页面tab标签页
|
|
|
|
|
if (source.value != 'edit') document.getElementsByClassName('main-tab')[0].getElementsByClassName('ant-tabs-nav-wrap')[0].style.display = 'none'
|
|
|
|
|
})
|
|
|
|
@ -291,13 +300,16 @@
|
|
|
|
|
if (route.query.id && !id.value) {
|
|
|
|
|
id.value = route.query.id
|
|
|
|
|
}
|
|
|
|
|
bookingDetails.value = {}
|
|
|
|
|
excuteRules.value = []
|
|
|
|
|
excuteRulesType.value = ''
|
|
|
|
|
Showtabs.value = false
|
|
|
|
|
bookingDetails.value = {
|
|
|
|
|
orderContactList: []
|
|
|
|
|
}
|
|
|
|
|
if (id.value) {
|
|
|
|
|
// 详情
|
|
|
|
|
excuteRules.value = []
|
|
|
|
|
excuteRulesType.value = ''
|
|
|
|
|
getDetail()
|
|
|
|
|
} else {
|
|
|
|
|
// 新增
|
|
|
|
|
detailsLoadOver.value = false
|
|
|
|
|
isLockBooking.value = false
|
|
|
|
|
}
|
|
|
|
@ -329,121 +341,16 @@
|
|
|
|
|
res.data.ctnPriceInfo = [{}]
|
|
|
|
|
}
|
|
|
|
|
bookingDetails.value = res.data
|
|
|
|
|
appStore.settopDown(false)
|
|
|
|
|
inPageLoading.value = false
|
|
|
|
|
// 解决 业务来源 联动问题
|
|
|
|
|
// if (res.data.sourceId) {
|
|
|
|
|
// let sourceDetailIdArr: any = []
|
|
|
|
|
// await GetClientSourceDetailSelectList({ id: res.data.sourceId }).then((res) => {
|
|
|
|
|
// res.data.forEach((item) => {
|
|
|
|
|
// sourceDetailIdArr.push({ label: item.detailName, value: item.id })
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
// RefbasicInfo.value.updateSchema({
|
|
|
|
|
// label: '来源明细',
|
|
|
|
|
// field: 'sourceDetailId',
|
|
|
|
|
// component: 'Select',
|
|
|
|
|
// required: false,
|
|
|
|
|
// dynamicDisabled: ({ values }) => {
|
|
|
|
|
// return !values.sourceId || source.value != 'edit'
|
|
|
|
|
// },
|
|
|
|
|
// colProps: { span: 4 },
|
|
|
|
|
// componentProps: {
|
|
|
|
|
// allowClear: true,
|
|
|
|
|
// options: sourceDetailIdArr,
|
|
|
|
|
// showSearch: true,
|
|
|
|
|
// filterOption: (input: string, option: any) => {
|
|
|
|
|
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// if (res.data.saleId) {
|
|
|
|
|
// const FnsaleId: any = await GetSaleList()
|
|
|
|
|
// FnsaleId.data.forEach(async (item) => {
|
|
|
|
|
// if (item.id == res.data.saleId) {
|
|
|
|
|
// let saleDeptIdArr: any = []
|
|
|
|
|
// let saleOrgIdArr: any = []
|
|
|
|
|
// item.saleOrgList.forEach((item) => {
|
|
|
|
|
// saleOrgIdArr.push({ label: item.orgName, value: item.orgId })
|
|
|
|
|
// })
|
|
|
|
|
// if (item.defaultOrgId) {
|
|
|
|
|
// await GetDeptList({ orgId: item.defaultOrgId }).then((res) => {
|
|
|
|
|
// console.log(res, '所属分部 查询 所属部门')
|
|
|
|
|
// res.data.forEach((item) => {
|
|
|
|
|
// saleDeptIdArr.push({ label: item.orgName, value: item.id })
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// RefbasicInfo.value.updateSchema([
|
|
|
|
|
// {
|
|
|
|
|
// label: '所属分部',
|
|
|
|
|
// field: 'saleOrgId',
|
|
|
|
|
// component: 'Select',
|
|
|
|
|
// required: false,
|
|
|
|
|
// dynamicDisabled: source.value == 'edit' ? false : true,
|
|
|
|
|
// // defaultValue: '',
|
|
|
|
|
// colProps: { span: 4 },
|
|
|
|
|
// componentProps: {
|
|
|
|
|
// allowClear: true,
|
|
|
|
|
// options: saleOrgIdArr,
|
|
|
|
|
// showSearch: true,
|
|
|
|
|
// filterOption: (input: string, option: any) => {
|
|
|
|
|
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
// },
|
|
|
|
|
// onChange: (e, obj) => {
|
|
|
|
|
// // formModel.saleDeptId = ''
|
|
|
|
|
// GetDeptList({ orgId: e }).then((res) => {
|
|
|
|
|
// console.log(res, '所属分部 查询 所属部门')
|
|
|
|
|
// let Arr: any = []
|
|
|
|
|
// res.data.forEach((item) => {
|
|
|
|
|
// Arr.push({ label: item.orgName, value: item.id })
|
|
|
|
|
// })
|
|
|
|
|
// updateSchema({
|
|
|
|
|
// label: '所属部门',
|
|
|
|
|
// field: 'saleDeptId',
|
|
|
|
|
// component: 'Select',
|
|
|
|
|
// required: false,
|
|
|
|
|
// dynamicDisabled: source.value == 'edit' ? false : true,
|
|
|
|
|
// // defaultValue: '',
|
|
|
|
|
// colProps: { span: 4 },
|
|
|
|
|
// componentProps: {
|
|
|
|
|
// allowClear: true,
|
|
|
|
|
// options: Arr,
|
|
|
|
|
// showSearch: true,
|
|
|
|
|
// filterOption: (input: string, option: any) => {
|
|
|
|
|
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// label: '所属部门',
|
|
|
|
|
// field: 'saleDeptId',
|
|
|
|
|
// component: 'Select',
|
|
|
|
|
// required: false,
|
|
|
|
|
// dynamicDisabled: source.value == 'edit' ? false : true,
|
|
|
|
|
// // defaultValue: '',
|
|
|
|
|
// colProps: { span: 4 },
|
|
|
|
|
// componentProps: {
|
|
|
|
|
// allowClear: true,
|
|
|
|
|
// options: saleDeptIdArr,
|
|
|
|
|
// showSearch: true,
|
|
|
|
|
// filterOption: (input: string, option: any) => {
|
|
|
|
|
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// ])
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// 如果存在表单修改规则,重新更新表单
|
|
|
|
|
if (res.data.formSetList && res.data.formSetList.length) {
|
|
|
|
|
const formSetContent = JSON.parse(res.data.formSetList[0].content)
|
|
|
|
|
console.log(formSetContent)
|
|
|
|
|
|
|
|
|
|
// RefbasicInfo.value.updateSchema()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
appStore.settopDown(false)
|
|
|
|
|
loading.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -600,23 +507,23 @@
|
|
|
|
|
// 组件的值发生变化时
|
|
|
|
|
function changeDetailFun(data) {
|
|
|
|
|
const { detail } = data
|
|
|
|
|
// if (ifCompare(bookingDetails.value, detail.value) && !inChildLoading.value) {
|
|
|
|
|
// checkSaveFun({ type: 'details', hasChange: true })
|
|
|
|
|
// }
|
|
|
|
|
// bookingDetails.value = detail.value
|
|
|
|
|
}
|
|
|
|
|
// // 校验两个对象是否一致
|
|
|
|
|
// // function ifCompare(object1, object2) {
|
|
|
|
|
// // var o1keys = Object.keys(object1)
|
|
|
|
|
// // var o2keys = Object.keys(object2)
|
|
|
|
|
// // if (o2keys.length !== o1keys.length) return false
|
|
|
|
|
// // for (let i = 0; i <= o1keys.length - 1; i++) {
|
|
|
|
|
// // const key = o1keys[i]
|
|
|
|
|
// // if (!o2keys.includes(key)) return false
|
|
|
|
|
// // if (object2[key] !== object1[key]) return false
|
|
|
|
|
// // }
|
|
|
|
|
// // return true
|
|
|
|
|
// // }
|
|
|
|
|
if (ifCompare(bookingDetails.value, detail.value) && !inChildLoading.value) {
|
|
|
|
|
checkSaveFun({ type: 'details', hasChange: true })
|
|
|
|
|
}
|
|
|
|
|
bookingDetails.value = detail.value
|
|
|
|
|
}
|
|
|
|
|
// 校验两个对象是否一致
|
|
|
|
|
function ifCompare(object1, object2) {
|
|
|
|
|
var o1keys = Object.keys(object1)
|
|
|
|
|
var o2keys = Object.keys(object2)
|
|
|
|
|
if (o2keys.length !== o1keys.length) return false
|
|
|
|
|
for (let i = 0; i <= o1keys.length - 1; i++) {
|
|
|
|
|
const key = o1keys[i]
|
|
|
|
|
if (!o2keys.includes(key)) return false
|
|
|
|
|
if (object2[key] !== object1[key]) return false
|
|
|
|
|
}
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
function checkSaveFun(data) {
|
|
|
|
|
if (inGoodsSave.value) {
|
|
|
|
|
return false
|
|
|
|
@ -751,9 +658,6 @@
|
|
|
|
|
bookingDetails.value.atd = time + ':00'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function handleComplete() {
|
|
|
|
|
checkSaveFun({ type: 'details', hasChange: false })
|
|
|
|
|
}
|
|
|
|
|
function inGoodsSaveFun(data) {
|
|
|
|
|
inGoodsSave.value = data
|
|
|
|
|
}
|
|
|
|
@ -828,7 +732,6 @@
|
|
|
|
|
const { rows, type } = data
|
|
|
|
|
excuteRules.value = rows
|
|
|
|
|
excuteRulesType.value = type
|
|
|
|
|
console.log(excuteRules.value, excuteRulesType.value)
|
|
|
|
|
}
|
|
|
|
|
// 提交订舱
|
|
|
|
|
const submitDc = (v) => {
|
|
|
|
|