张同海 3 months ago
commit 5eefcaca89

@ -179,4 +179,14 @@
.hot-red { .hot-red {
background-color: #f5222d; background-color: #f5222d;
} }
.handsontableInputHolder {
.autocompleteEditor {
.ht_master {
.wtHolder {
min-height: 200px!important;
overflow: visible!important;
}
}
}
}
} }

@ -113,9 +113,9 @@
:details="bookingDetails" :details="bookingDetails"
@openFlag="otherOpenFlag" @openFlag="otherOpenFlag"
> >
<Divider type="horizontal" /> <Divider v-if="id" type="horizontal" />
<!-- 联系人信息 --> <!-- 联系人信息 -->
<ContactList :id="id" :data="bookingDetails.orderContactList"></ContactList> <ContactList v-if="id" :id="id" :data="bookingDetails.orderContactList" @getBaseInfo="getBaseInfo"></ContactList>
</otherInfo> </otherInfo>
</transition> </transition>
<transition name="slide"> <transition name="slide">
@ -209,6 +209,7 @@
import otherInfo from './modules/otherInfo.vue' import otherInfo from './modules/otherInfo.vue'
// //
import ContactList from './modules/contactList.vue' import ContactList from './modules/contactList.vue'
import emitter from '/@/utils/Bus'
import { useMultipleTabStore } from '/@/store/modules/multipleTab' import { useMultipleTabStore } from '/@/store/modules/multipleTab'
import { Divider } from 'ant-design-vue' import { Divider } from 'ant-design-vue'
@ -712,8 +713,10 @@
RefmailingInfo.value.$data.userHasLine = !!bookingDetails.value.lineName RefmailingInfo.value.$data.userHasLine = !!bookingDetails.value.lineName
} }
} }
function pkgsEnCapitalFun(data) { //
bookingDetails.value.totalno = data const getBaseInfo = () => {
const data = RefbasicInfo.value.getFieldsValue()
emitter.emit('sendBaseInfo', data)
} }
function changeTab(e) { function changeTab(e) {
tabActiveKey.value = e tabActiveKey.value = e

@ -32,11 +32,12 @@
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, unref } from 'vue' import { ref, computed, unref, defineEmits, onMounted } from 'vue'
// //
import { BasicModal, useModalInner } from '/@/components/Modal' import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index' import { BasicForm, useForm } from '/@/components/Form/index'
import { getDictOption } from '/@/utils/dictUtil' import { getDictOption } from '/@/utils/dictUtil'
import emitter from '/@/utils/Bus'
// //
import { personFormSchema } from './baseInfo' import { personFormSchema } from './baseInfo'
// //
@ -44,7 +45,7 @@
// //
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
// Emits // Emits
const emit = defineEmits(['success', 'register']) const emit = defineEmits(['success', 'register', 'getBaseInfo'])
const isUpdate = ref(true) const isUpdate = ref(true)
// loading // loading
const loading = ref(false) const loading = ref(false)
@ -88,10 +89,12 @@
} }
setModalProps({ loading: false }) setModalProps({ loading: false })
}) })
let changeType = ''
// //
const linkageForm = (v) => { const linkageForm = (v) => {
console.log(v) console.log(v)
changeType = v
emit('getBaseInfo', v)
} }
const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑')) const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'))
// //
@ -118,4 +121,25 @@
setModalProps({ confirmLoading: false, loading: false }) setModalProps({ confirmLoading: false, loading: false })
} }
} }
onMounted(() => {
emitter.on('sendBaseInfo', (v) => {
console.log(v)
if (changeType == 'controller') {
setFieldsValue({
customerName: v.customerName,
customerId: v.customerId
})
} else if (changeType == 'booking') {
setFieldsValue({
customerName: v.forwarder,
customerId: v.forwarderId
})
} else if (changeType == 'shipper') {
setFieldsValue({
customerName: v.shipperCn,
customerId: v.shipperCnId
})
}
})
})
</script> </script>

@ -237,8 +237,8 @@ export const basicInfoFormSchema: FormSchema[] = [
return { return {
api: GetCarrierSelectList, api: GetCarrierSelectList,
labelField: 'pinYinCode', labelField: 'pinYinCode',
showName: 'cnName', showName: 'ediCode',
valueField: 'cnName', valueField: 'ediCode',
resultField: 'data', resultField: 'data',
immediate: false, immediate: false,
onChange: (e, obj) => { onChange: (e, obj) => {

@ -5,7 +5,7 @@
@register="registerTable" @register="registerTable"
> >
<template #tableTitle> <template #tableTitle>
<h4 style="margin: 0">联系人信息</h4> <h4 style="margin: 0; white-space: nowrap;">联系人信息</h4>
<a-button style="margin-left: 100px;" type="link" @click="create"> <a-button style="margin-left: 100px;" type="link" @click="create">
<span class="iconfont icon-new_document"></span> <span class="iconfont icon-new_document"></span>
新增 新增
@ -36,12 +36,12 @@
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
<PersonModal @register="registerModal" @success="handleSuccess" /> <PersonModal @register="registerModal" @success="handleSuccess" @getBaseInfo="getBaseInfo" />
</a-spin> </a-spin>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue' import { ref, defineEmits, watch } from 'vue'
import { personColumns } from './baseInfo.tsx' import { personColumns } from './baseInfo.tsx'
import { BasicTable, useTable, TableAction } from '/@/components/Table' import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { GetBusinessOrderContactList, BatchDelBusinessOrderContact } from '/@/views/operation/seaexport/api/BookingLedger' import { GetBusinessOrderContactList, BatchDelBusinessOrderContact } from '/@/views/operation/seaexport/api/BookingLedger'
@ -51,6 +51,7 @@
import PersonModal from './PersonModal.vue' import PersonModal from './PersonModal.vue'
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const { createMessage } = useMessage() const { createMessage } = useMessage()
const emit = defineEmits(['getBaseInfo'])
// loading // loading
const loading = ref(false) const loading = ref(false)
const props = defineProps({ const props = defineProps({
@ -63,12 +64,31 @@
} }
} }
}) })
watch(
() => props.data,
(v) => {
reload()
}
)
const flag = ref(true)
// //
const [registerTable, { reload, getForm, getSelectRows }] = useTable({ const [registerTable, { reload, getForm, getSelectRows }] = useTable({
api: async (p) => { api: async (p) => {
return new Promise((resolve) => { if (flag.value) {
resolve({ data: props.data }) flag.value = false
}) return new Promise((resolve) => {
resolve({ data: props.data })
})
} else {
const res: API.DataResult = await GetBusinessOrderContactList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data] })
})
}
},
beforeFetch: (p) => {
p['businessId'] = props.id
return formatParams(p)
}, },
columns: personColumns, columns: personColumns,
isTreeTable: false, isTreeTable: false,
@ -81,6 +101,7 @@
rowSelection: { rowSelection: {
type: 'checkbox' type: 'checkbox'
}, },
immediate: false,
canResize: false, canResize: false,
actionColumn: { actionColumn: {
width: 60, width: 60,
@ -89,8 +110,11 @@
fixed: 'right', fixed: 'right',
} }
}) })
function handleSuccess(v) { function handleSuccess() {
console.log(v) reload()
}
const getBaseInfo = () => {
emit('getBaseInfo')
} }
// //
const create = () => { const create = () => {

@ -45,7 +45,7 @@
watch( watch(
() => props.details, () => props.details,
(nval) => { (nval) => {
setFieldsValue(nval.ediInfo) if (nval.ediInfo) setFieldsValue(nval.ediInfo)
} }
) )
// function getSelectViewRes({ type, res }) { // function getSelectViewRes({ type, res }) {

@ -50,7 +50,7 @@
<span class="iconfont icon-refresh-1-copy"></span> <span class="iconfont icon-refresh-1-copy"></span>
刷新 刷新
</a-button> </a-button>
<a-button type="link" v-repeat size="mini" @click="addboxLine"> <a-button type="link" size="mini" @click="addboxLine">
<span class="iconfont icon-new_document"></span> <span class="iconfont icon-new_document"></span>
添加 添加
</a-button> </a-button>
@ -284,7 +284,9 @@
const kindPkgsDict = ref([]) const kindPkgsDict = ref([])
// //
const hotTb = ref<any>() const hotTb = ref<any>()
const list = ref<any>([]) const list = ref([{
selected: false
}])
const moreTList = ref<any>([]) const moreTList = ref<any>([])
const moreData = ref<any>([[]]) const moreData = ref<any>([[]])
// //
@ -318,6 +320,7 @@
title: '箱型', title: '箱型',
width: 60, width: 60,
data: 'ctn', data: 'ctn',
className: 'ctn-type',
type: 'dropdown', type: 'dropdown',
// (process) // (process)
source: async (query, process) => { source: async (query, process) => {
@ -845,79 +848,86 @@
sortConditions: [], sortConditions: [],
}, },
}).then((res) => { }).then((res) => {
res.data = JSON.parse( // res.data = JSON.parse(
JSON.stringify(res.data) // JSON.stringify(res.data)
.replaceAll('"0001-01-01 00:00:00"', '""') // .replaceAll('"0001-01-01 00:00:00"', '""')
.replaceAll(':"0"', ':""') // .replaceAll(':"0"', ':""')
.replaceAll(':0,', ':"",'), // .replaceAll(':0,', ':"",'),
) // )
list.value.splice(0) const { data } = res
let data = res.data if (data.length == 0) {
totalPkgs.value = 0 list.value = [{
data.forEach(async (item, index) => { selectd: false
totalPkgs.value = totalPkgs.value }]
? parseInt(totalPkgs.value) } else {
: 0 + item.pkgs list.value = []
? parseInt(item.pkgs) totalPkgs.value = 0
: 0 data.forEach(async (item, index) => {
totalKgs.value = totalKgs.value totalPkgs.value = totalPkgs.value
? parseInt(totalKgs.value) ? parseInt(totalPkgs.value)
: 0 + item.kgs : 0 + item.pkgs
? parseInt(item.kgs) ? parseInt(item.pkgs)
: 0 : 0
totalCbm.value = totalCbm.value totalKgs.value = totalKgs.value
? parseInt(totalCbm.value) ? parseInt(totalKgs.value)
: 0 + item.cbm : 0 + item.kgs
? parseInt(item.cbm) ? parseInt(item.kgs)
: 0 : 0
totalCtn.value = totalCtn.value totalCbm.value = totalCbm.value
? parseInt(totalCtn.value) ? parseInt(totalCbm.value)
: 0 + item.ctnNum : 0 + item.cbm
? parseInt(item.ctnNum) ? parseInt(item.cbm)
: 0 : 0
item.rowKey = index totalCtn.value = totalCtn.value
const weightTypeList = await getDictOption('weight_type') ? parseInt(totalCtn.value)
if (!weightTypeDict.value.length) { : 0 + item.ctnNum
? parseInt(item.ctnNum)
: 0
item.rowKey = index
const weightTypeList = await getDictOption('weight_type')
if (!weightTypeDict.value.length) {
weightTypeList.forEach((e) => {
weightTypeDict.value.push(e)
})
}
weightTypeList.forEach((e) => { weightTypeList.forEach((e) => {
weightTypeDict.value.push(e) if (e.value == item.weightType) {
item.weightTypeName = e.name
}
}) })
} const kindPkgsList = kindPkgsDict.value.length
weightTypeList.forEach((e) => { ? kindPkgsDict.value
if (e.value == item.weightType) { : (await GetPackageSelectList())?.data
item.weightTypeName = e.name if (!kindPkgsDict.value.length) {
kindPkgsDict.value.splice(0)
kindPkgsList.forEach((e) => {
kindPkgsDict.value.push(e)
})
} }
})
const kindPkgsList = kindPkgsDict.value.length
? kindPkgsDict.value
: (await GetPackageSelectList())?.data
if (!kindPkgsDict.value.length) {
kindPkgsDict.value.splice(0)
kindPkgsList.forEach((e) => { kindPkgsList.forEach((e) => {
kindPkgsDict.value.push(e) if (e.id == item.kindPkgs) {
item.kindPkgsName = e.packageName
}
})
const isTempList = [
{
name: '是',
value: true,
},
{
name: '否',
value: false,
},
]
isTempList.forEach((e) => {
if (e.value == item.isTemp) {
item.isTempName = e.name
}
}) })
}
kindPkgsList.forEach((e) => {
if (e.id == item.kindPkgs) {
item.kindPkgsName = e.packageName
}
})
const isTempList = [
{
name: '是',
value: true,
},
{
name: '否',
value: false,
},
]
isTempList.forEach((e) => {
if (e.value == item.isTemp) {
item.isTempName = e.name
}
}) })
list.value.push(item) list.value = data
}) }
hotmain.value.hotInstance.loadData(list.value)
// //
if (source != 'edit') { if (source != 'edit') {
hotTb.value.hotInstance.updateSettings({ hotTb.value.hotInstance.updateSettings({
@ -967,7 +977,10 @@
// //
function addboxLine() { function addboxLine() {
list.value.push({}) list.value.push({
selected: false
})
hotmain.value.hotInstance.loadData(list.value)
} }
const deleteFlag = ref(false) const deleteFlag = ref(false)
// //
@ -1332,7 +1345,7 @@
} }
function importYarn() { function importYarn() {
if (!props.details.id) { if (!props.details.id) {
notification.error({ message: '请先保存订舱信息', duration: 3 }) createMessage.warning('请先保存订舱信息')
return false return false
} }
loadingTable.value = true loadingTable.value = true
@ -1343,19 +1356,20 @@
.then((res) => { .then((res) => {
if (res.succeeded) { if (res.succeeded) {
const data = JSON.parse(res.data) const data = JSON.parse(res.data)
const kindpkgsOld = list.value[0] ? list.value[0].kindPkgs : ''
// //
if (data.length) { if (data.length) {
//
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (list.value.length) { if (list.value.length) {
list.value.forEach(row => { list.value.forEach(row => {
if (data[i].CNTRNO == row.cntrNo) { if (data[i].CNTRNO === row.cntrNo) {
data.splice(i, 1) data.splice(i, 1)
} }
}) })
} }
} }
if (data.length) { if (data.length) {
//
Modal.confirm({ Modal.confirm({
title: '提示', title: '提示',
content: createVNode( content: createVNode(
@ -1373,22 +1387,25 @@
} }
}) })
} }
data.map((item, index) => {
const _data = {
cbm: item.CBM,
cntrNo: item.CNTRNO,
ctn: item.CTNALL,
ctnCode: item.CtnCode,
kgs: item.KGS,
kindpkgs: kindpkgsOld || item.KINDPKGS,
pkgs: item.PKGS,
sealNo: item.SEALNO,
ctnNum: 1,
tareWeight: item.TAREWEIGHT,
}
list.value.push(_data)
})
} }
const newData = data.map((item) => {
return {
cbm: item.CBM,
cntrNo: item.CNTRNO,
ctn: item.CTNALL,
ctnCode: item.CtnCode,
kgs: item.KGS,
kindpkgs: item.KINDPKGS,
pkgs: item.PKGS,
sealNo: item.SEALNO,
ctnNum: 1,
tareWeight: item.TAREWEIGHT
}
})
list.value = [...list.value, ...newData]
// const kindpkgsOld = list.value[0] ? list.value[0].kindPkgs : ''
hotmain.value.hotInstance.loadData(list.value)
// }
} }
loadingTable.value = false loadingTable.value = false
computing() computing()
@ -1635,7 +1652,7 @@
) )
// //
const settings = { const settings = {
height: '208', height: 'auto',
autoWrapRow: true, autoWrapRow: true,
autoWrapCol: true, autoWrapCol: true,
// //
@ -1988,3 +2005,6 @@
} }
} }
</style> </style>
<style>
</style>

@ -285,7 +285,7 @@
</div> </div>
</div> </div>
</a-card> --> </a-card> -->
<div v-if="id" class="card" style="padding-bottom: 15px;"> <div class="card" style="padding-bottom: 15px;">
<Divider type="horizontal" /> <Divider type="horizontal" />
<!-- 日志组件 --> <!-- 日志组件 -->
<DsJournal :id="id" :data="details.businessLogList"/> <DsJournal :id="id" :data="details.businessLogList"/>

@ -118,7 +118,7 @@ export const formSchema: FormSchema[] = [
// required: !isButton(e), // required: !isButton(e),
// }, // },
// ]) // ])
if (isMenu(e) && !formModel.id && formModel.component == 'layouts/RouteView') { if (isMenu(e) && !formModel.id) {
formModel.component = '' formModel.component = ''
} }
}, },
@ -176,7 +176,7 @@ export const formSchema: FormSchema[] = [
componentProps: { componentProps: {
placeholder: '请输入前端组件', placeholder: '请输入前端组件',
}, },
defaultValue: 'layouts/RouteView', defaultValue: '',
required: true, required: true,
ifShow: ({ values }) => !isButton(values.menuType), ifShow: ({ values }) => !isButton(values.menuType),
itemProps: { itemProps: {

Loading…
Cancel
Save