|
|
|
@ -1,11 +1,5 @@
|
|
|
|
|
<template>
|
|
|
|
|
<a-modal
|
|
|
|
|
class="ds-pre-order"
|
|
|
|
|
width="90vw"
|
|
|
|
|
:maskClosable="false"
|
|
|
|
|
v-model:visible="openPreOrderShow"
|
|
|
|
|
@cancel="close"
|
|
|
|
|
>
|
|
|
|
|
<a-modal class="ds-pre-order" width="90vw" :maskClosable="false" v-model:visible="openPreOrderShow" @cancel="close">
|
|
|
|
|
<template #footer> </template>
|
|
|
|
|
<div class="pre-order" style="padding-top: 30px">
|
|
|
|
|
<div class="flex">
|
|
|
|
@ -25,23 +19,13 @@
|
|
|
|
|
<span class="iconfont icon-baocun"></span>
|
|
|
|
|
保存
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-popconfirm
|
|
|
|
|
title="是否删除当前选中预配舱单?"
|
|
|
|
|
ok-text="是"
|
|
|
|
|
cancel-text="否"
|
|
|
|
|
@confirm="removeOrder()"
|
|
|
|
|
>
|
|
|
|
|
<a-popconfirm title="是否删除当前选中预配舱单?" ok-text="是" cancel-text="否" @confirm="removeOrder()">
|
|
|
|
|
<a-button type="link" class="pt0">
|
|
|
|
|
<span class="iconfont icon-shanchu21"></span>
|
|
|
|
|
删除
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
<a-popconfirm
|
|
|
|
|
title="会覆盖当前数据,确认刷新吗?"
|
|
|
|
|
ok-text="是"
|
|
|
|
|
cancel-text="否"
|
|
|
|
|
@confirm="handleRef"
|
|
|
|
|
>
|
|
|
|
|
<a-popconfirm title="会覆盖当前数据,确认刷新吗?" ok-text="是" cancel-text="否" @confirm="handleRef">
|
|
|
|
|
<a-button type="link" class="pt0">
|
|
|
|
|
<span class="iconfont icon-shuaxin"></span>
|
|
|
|
|
刷新
|
|
|
|
@ -54,11 +38,8 @@
|
|
|
|
|
<template v-for="(sedDetail, sindex) in orderList" :key="sindex + 'f'">
|
|
|
|
|
<div class="order-box" v-if="!sedDetail.isPart">
|
|
|
|
|
<a-checkbox class="check-btn mb10" v-model:checked="sedDetail.checked" />
|
|
|
|
|
<span
|
|
|
|
|
class="order-label"
|
|
|
|
|
:class="{ active: sindex == editIndex }"
|
|
|
|
|
@click.stop="changeOrder(sindex)"
|
|
|
|
|
>
|
|
|
|
|
<span class="order-label" :class="{ active: sindex == editIndex }"
|
|
|
|
|
@click.stop="changeOrder(sindex)">
|
|
|
|
|
<template v-if="!sedDetail.isPart">
|
|
|
|
|
{{ sedDetail.mblno || '请填写主提单号' }}
|
|
|
|
|
</template>
|
|
|
|
@ -71,11 +52,8 @@
|
|
|
|
|
<template v-for="(sedDetail, sindex) in orderList" :key="sindex">
|
|
|
|
|
<div class="order-box" v-if="sedDetail.isPart">
|
|
|
|
|
<a-checkbox class="check-btn mb10" v-model:checked="sedDetail.checked" />
|
|
|
|
|
<span
|
|
|
|
|
class="order-label"
|
|
|
|
|
:class="{ active: sindex == editIndex }"
|
|
|
|
|
@click.stop="changeOrder(sindex)"
|
|
|
|
|
>
|
|
|
|
|
<span class="order-label" :class="{ active: sindex == editIndex }"
|
|
|
|
|
@click.stop="changeOrder(sindex)">
|
|
|
|
|
<template v-if="sedDetail.isPart">
|
|
|
|
|
{{ sedDetail.hblno || '请填写分单号' }}
|
|
|
|
|
</template>
|
|
|
|
@ -97,33 +75,19 @@
|
|
|
|
|
<BasicForm @register="mailingForm">
|
|
|
|
|
<!-- 发货人 -->
|
|
|
|
|
<template #shipper="{ model }">
|
|
|
|
|
<span
|
|
|
|
|
title="保存到收发通模版(save)"
|
|
|
|
|
class="iconfont icon-baocun save-btn"
|
|
|
|
|
@click="save(model, 'shipper')"
|
|
|
|
|
></span>
|
|
|
|
|
<span title="保存到收发通模版(save)" class="iconfont icon-baocun save-btn" @click="save(model, '2')"></span>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- 收货人 -->
|
|
|
|
|
<template #consignee="{ model }">
|
|
|
|
|
<span
|
|
|
|
|
title="复制通知人"
|
|
|
|
|
class="iconfont icon-fuzhi3 copy-btn"
|
|
|
|
|
style="font-size: 13px"
|
|
|
|
|
@click="copyNotify"
|
|
|
|
|
></span>
|
|
|
|
|
<!-- <span title="保存到收发通模版(save)" class="iconfont icon-baocun save-btn"
|
|
|
|
|
@click="save(model, 'consignee')"></span> -->
|
|
|
|
|
<span title="复制通知人" class="iconfont icon-fuzhi3 copy-btn" style="font-size: 13px"
|
|
|
|
|
@click="copyNotify"></span>
|
|
|
|
|
<span title="保存到收发通模版(save)" class="iconfont icon-baocun save-btn" @click="save(model, '1')"></span>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- 通知人 -->
|
|
|
|
|
<template #notifyParty="{ model }">
|
|
|
|
|
<span
|
|
|
|
|
title="复制收货人"
|
|
|
|
|
class="iconfont icon-fuzhi3 copy-btn"
|
|
|
|
|
style="font-size: 13px"
|
|
|
|
|
@click="copyConsignee"
|
|
|
|
|
></span>
|
|
|
|
|
<!-- <span title="保存到收发通模版(save)" class="iconfont icon-baocun save-btn"
|
|
|
|
|
@click="save(model, 'notifyParty')"></span> -->
|
|
|
|
|
<span title="复制收货人" class="iconfont icon-fuzhi3 copy-btn" style="font-size: 13px"
|
|
|
|
|
@click="copyConsignee"></span>
|
|
|
|
|
<span title="保存到收发通模版(save)" class="iconfont icon-baocun save-btn" @click="save(model, '3')"></span>
|
|
|
|
|
</template>
|
|
|
|
|
</BasicForm>
|
|
|
|
|
</div>
|
|
|
|
@ -151,61 +115,31 @@
|
|
|
|
|
<BasicForm @register="yardForm"> </BasicForm>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<hot-table
|
|
|
|
|
style="margin-left: 14px"
|
|
|
|
|
ref="hotpreOrder"
|
|
|
|
|
:data="ctnList"
|
|
|
|
|
:settings="settings"
|
|
|
|
|
>
|
|
|
|
|
<hot-table style="margin-left: 14px" ref="hotpreOrder" :data="ctnList" :settings="settings">
|
|
|
|
|
</hot-table>
|
|
|
|
|
<div class="table-calc">
|
|
|
|
|
合计:
|
|
|
|
|
<span class="table-calc-box"
|
|
|
|
|
>件数: <span>{{ totalPkgs }}</span></span
|
|
|
|
|
>
|
|
|
|
|
<span class="table-calc-box"
|
|
|
|
|
>重量: <span>{{ totalKgs }}</span
|
|
|
|
|
>KGS</span
|
|
|
|
|
>
|
|
|
|
|
<span class="table-calc-box"
|
|
|
|
|
>尺码: <span>{{ totalCbm }}</span
|
|
|
|
|
>CBM</span
|
|
|
|
|
>
|
|
|
|
|
<span class="table-calc-box">件数: <span>{{ totalPkgs }}</span></span>
|
|
|
|
|
<span class="table-calc-box">重量: <span>{{ totalKgs }}</span>KGS</span>
|
|
|
|
|
<span class="table-calc-box">尺码: <span>{{ totalCbm }}</span>CBM</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<a-modal
|
|
|
|
|
width="50vw"
|
|
|
|
|
:maskClosable="false"
|
|
|
|
|
v-model:visible="showSendModel"
|
|
|
|
|
title="发送预配舱单"
|
|
|
|
|
@cancel="sendClose"
|
|
|
|
|
>
|
|
|
|
|
<a-modal width="50vw" :maskClosable="false" v-model:visible="showSendModel" title="发送预配舱单" @cancel="sendClose">
|
|
|
|
|
<div class="trace-box">
|
|
|
|
|
<a-form>
|
|
|
|
|
<a-row :gutter="16">
|
|
|
|
|
<a-col :span="24" class="book-model-box">
|
|
|
|
|
<a-form-item
|
|
|
|
|
label="操作类型"
|
|
|
|
|
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
|
|
|
|
|
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
|
|
|
|
|
has-feedback
|
|
|
|
|
>
|
|
|
|
|
<a-form-item label="操作类型" :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
|
|
|
|
|
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
|
|
|
|
|
<a-radio-group :options="sendOption" v-model:value="sendType" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
<a-form-item
|
|
|
|
|
label="备注"
|
|
|
|
|
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
|
|
|
|
|
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
|
|
|
|
|
has-feedback
|
|
|
|
|
>
|
|
|
|
|
<a-textarea
|
|
|
|
|
v-model:value="sendRemarkVal"
|
|
|
|
|
placeholder="请输入备注"
|
|
|
|
|
:auto-size="{ minRows: 3, maxRows: 5 }"
|
|
|
|
|
/>
|
|
|
|
|
<a-form-item label="备注" :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
|
|
|
|
|
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
|
|
|
|
|
<a-textarea v-model:value="sendRemarkVal" placeholder="请输入备注"
|
|
|
|
|
:auto-size="{ minRows: 3, maxRows: 5 }" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
@ -216,12 +150,20 @@
|
|
|
|
|
<a-button type="primary" @click="sendClose">关闭</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<a-modal class="ds-modal-small" title="保存模版" width="560" v-model:visible="temFlag" @ok="saveTem"
|
|
|
|
|
@cancel="temFlag = false">
|
|
|
|
|
<a-form ref="form" :rules="rules" :model="temForm" layout="vertical">
|
|
|
|
|
<a-form-item label="模版名称" name="templateName">
|
|
|
|
|
<a-input v-model:value="temForm.templateName"></a-input>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-form>
|
|
|
|
|
</a-modal>
|
|
|
|
|
</div>
|
|
|
|
|
</a-modal>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { ref, reactive, onMounted, nextTick, watch } from 'vue'
|
|
|
|
|
import {
|
|
|
|
|
import { ref, reactive, onMounted, nextTick, watch } from 'vue'
|
|
|
|
|
import {
|
|
|
|
|
GetPackageSelectList,
|
|
|
|
|
GetShippingBillList,
|
|
|
|
|
SaveShippingBillAsync,
|
|
|
|
@ -231,29 +173,29 @@
|
|
|
|
|
GetShippingBillCtnList,
|
|
|
|
|
GetClientPortInfoByCode,
|
|
|
|
|
GetShippingBillShortList,
|
|
|
|
|
} from '/@/views/operation/seaexport/api/BookingLedger'
|
|
|
|
|
import { preOrderD } from '/@/views/operation/seaexport/detail/modules/preOrderColumns'
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
import cargoInfo from './cargoInfo.vue'
|
|
|
|
|
const { notification, createMessage } = useMessage()
|
|
|
|
|
import { useRoute } from 'vue-router'
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
import { HotTable } from '@handsontable/vue3'
|
|
|
|
|
import { registerAllModules } from 'handsontable/registry'
|
|
|
|
|
import { BasicForm, useForm } from '/@/components/Form/index'
|
|
|
|
|
import { mailingSchema, baseSchema, yardSchema } from './preOrder'
|
|
|
|
|
import { resolve } from 'path'
|
|
|
|
|
registerAllModules()
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
} from '/@/views/operation/seaexport/api/BookingLedger'
|
|
|
|
|
import { preOrderD } from '/@/views/operation/seaexport/detail/modules/preOrderColumns'
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
import cargoInfo from './cargoInfo.vue'
|
|
|
|
|
const { notification, createMessage } = useMessage()
|
|
|
|
|
import { useRoute } from 'vue-router'
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
import { HotTable } from '@handsontable/vue3'
|
|
|
|
|
import { registerAllModules } from 'handsontable/registry'
|
|
|
|
|
import { BasicForm, useForm } from '/@/components/Form/index'
|
|
|
|
|
import { mailingSchema, baseSchema, yardSchema } from './preOrder'
|
|
|
|
|
import { resolve } from 'path'
|
|
|
|
|
registerAllModules()
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
details: { type: Object, default: {} },
|
|
|
|
|
})
|
|
|
|
|
const book = {
|
|
|
|
|
})
|
|
|
|
|
const book = {
|
|
|
|
|
marks: '11',
|
|
|
|
|
}
|
|
|
|
|
const openPreOrderShow = ref(false)
|
|
|
|
|
const id = ref(route.query.id)
|
|
|
|
|
// -----------------------弹窗相关------------------------
|
|
|
|
|
function init() {
|
|
|
|
|
}
|
|
|
|
|
const openPreOrderShow = ref(false)
|
|
|
|
|
const id = ref(route.query.id)
|
|
|
|
|
// -----------------------弹窗相关------------------------
|
|
|
|
|
function init() {
|
|
|
|
|
// 打开窗口调接口 如果接口有数据就回显 没有数据用主单的信息
|
|
|
|
|
openPreOrderShow.value = true
|
|
|
|
|
orderList.valeue = []
|
|
|
|
@ -261,15 +203,14 @@
|
|
|
|
|
// resetFieldsMail()
|
|
|
|
|
if (id.value) {
|
|
|
|
|
FngetPageESeaeEdi()
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
initTable()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 基础信息
|
|
|
|
|
const [
|
|
|
|
|
// 基础信息
|
|
|
|
|
const [
|
|
|
|
|
baseForm,
|
|
|
|
|
{
|
|
|
|
|
getFieldsValue: getFieldsValueBase,
|
|
|
|
@ -279,48 +220,48 @@
|
|
|
|
|
setFieldsValue: setFieldsValueBase,
|
|
|
|
|
validateBase,
|
|
|
|
|
},
|
|
|
|
|
] = useForm({
|
|
|
|
|
] = useForm({
|
|
|
|
|
labelWidth: 80,
|
|
|
|
|
schemas: baseSchema,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
size: 'small',
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 收发通
|
|
|
|
|
const [
|
|
|
|
|
// 收发通
|
|
|
|
|
const [
|
|
|
|
|
mailingForm,
|
|
|
|
|
{
|
|
|
|
|
getFieldsValue: getFieldsValueMail,
|
|
|
|
|
updateSchemaMail,
|
|
|
|
|
updateSchema: updateSchemaL,
|
|
|
|
|
validateFieldsMail,
|
|
|
|
|
resetFields: resetFieldsMail,
|
|
|
|
|
setFieldsValue: setFieldsValueMail,
|
|
|
|
|
validateMail,
|
|
|
|
|
},
|
|
|
|
|
] = useForm({
|
|
|
|
|
] = useForm({
|
|
|
|
|
labelWidth: 80,
|
|
|
|
|
schemas: mailingSchema,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
size: 'small',
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 场站
|
|
|
|
|
const [
|
|
|
|
|
// 场站
|
|
|
|
|
const [
|
|
|
|
|
yardForm,
|
|
|
|
|
{
|
|
|
|
|
getFieldsValue: getFieldsValueYard,
|
|
|
|
|
resetFields: resetFieldsYard,
|
|
|
|
|
setFieldsValue: setFieldsValueYard,
|
|
|
|
|
},
|
|
|
|
|
] = useForm({
|
|
|
|
|
] = useForm({
|
|
|
|
|
labelWidth: 80,
|
|
|
|
|
wrapperCol: { span: 24 },
|
|
|
|
|
schemas: yardSchema,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
size: 'small',
|
|
|
|
|
})
|
|
|
|
|
const ctnList = ref([]) as any
|
|
|
|
|
watch(
|
|
|
|
|
})
|
|
|
|
|
const ctnList = ref([]) as any
|
|
|
|
|
watch(
|
|
|
|
|
() => ctnList.value,
|
|
|
|
|
(val) => {
|
|
|
|
|
let totalPkgsStr = 0
|
|
|
|
@ -342,10 +283,10 @@
|
|
|
|
|
totalCbm.value = totalCbmStr
|
|
|
|
|
},
|
|
|
|
|
{ deep: true },
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
onMounted(() => {})
|
|
|
|
|
function initTable() {
|
|
|
|
|
onMounted(() => { })
|
|
|
|
|
function initTable() {
|
|
|
|
|
const hot = hotpreOrder.value.hotInstance
|
|
|
|
|
hot.addHook('beforeKeyDown', function (event) {
|
|
|
|
|
if (event.key === 'ArrowDown') {
|
|
|
|
@ -361,15 +302,134 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
import { ApiEdit } from '/@/views/baseinfo/sendReciveTem/api'
|
|
|
|
|
const form = ref(null)
|
|
|
|
|
const temFlag = ref(false)
|
|
|
|
|
var saveKey = '' as any
|
|
|
|
|
var saveModel = {} as any
|
|
|
|
|
const temForm = reactive({
|
|
|
|
|
templateName: ''
|
|
|
|
|
})
|
|
|
|
|
const saveTem = () => {
|
|
|
|
|
form.value.validate().then(() => {
|
|
|
|
|
let content = ''
|
|
|
|
|
if (saveKey == 1) content = 'consignee'
|
|
|
|
|
if (saveKey == 2) content = 'shipper'
|
|
|
|
|
if (saveKey == 3) content = 'notifyParty'
|
|
|
|
|
const data = {
|
|
|
|
|
id: '',
|
|
|
|
|
type: saveKey,
|
|
|
|
|
templateName: temForm.templateName,
|
|
|
|
|
content: saveModel[content + 'Content'],
|
|
|
|
|
tel:'',
|
|
|
|
|
countryName:'',
|
|
|
|
|
country:'',
|
|
|
|
|
name:'',
|
|
|
|
|
address:'',
|
|
|
|
|
}
|
|
|
|
|
if (saveKey == '2') {
|
|
|
|
|
data.tel = saveModel.shipperCountryTel
|
|
|
|
|
data.countryName = saveModel.shipperCountryName
|
|
|
|
|
data.country = saveModel.shipperCountry
|
|
|
|
|
data.name = saveModel.shipperName
|
|
|
|
|
data.address = saveModel.shipperAddress
|
|
|
|
|
} else if (saveKey == '1') {
|
|
|
|
|
data.tel = saveModel.consigneeCountryTel
|
|
|
|
|
data.countryName = saveModel.consigneeCountryName
|
|
|
|
|
data.country = saveModel.consigneeCountry
|
|
|
|
|
data.name = saveModel.consigneeName
|
|
|
|
|
data.address = saveModel.consigneeAddress
|
|
|
|
|
} else {
|
|
|
|
|
data.tel = saveModel.notifyPartyCountryTel
|
|
|
|
|
data.countryName = saveModel.notifyPartyCountryName
|
|
|
|
|
data.country = saveModel.notifyPartyCountry
|
|
|
|
|
data.name = saveModel.notifyPartyName
|
|
|
|
|
data.address = saveModel.notifyPartyAddress
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 添加行
|
|
|
|
|
function addboxLine() {
|
|
|
|
|
ApiEdit(data).then(res => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
createMessage.success('新增模版成功!')
|
|
|
|
|
updateSchemaL()
|
|
|
|
|
temFlag.value = false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 添加行
|
|
|
|
|
function addboxLine() {
|
|
|
|
|
ctnList.value.push({})
|
|
|
|
|
}
|
|
|
|
|
// 保存收发通模版
|
|
|
|
|
// 保存收发通模版
|
|
|
|
|
const save = (model, key) => {
|
|
|
|
|
saveKey = key
|
|
|
|
|
saveModel = model
|
|
|
|
|
const postData = {
|
|
|
|
|
id: '',
|
|
|
|
|
templateName: '',
|
|
|
|
|
content: '',
|
|
|
|
|
tel: '',
|
|
|
|
|
countryName: '',
|
|
|
|
|
country: '',
|
|
|
|
|
name: '',
|
|
|
|
|
address: '',
|
|
|
|
|
}
|
|
|
|
|
if (key == '2') {
|
|
|
|
|
postData.id = model.shipperId
|
|
|
|
|
postData.templateName = model.shipper
|
|
|
|
|
postData.content = model.shipperContent
|
|
|
|
|
postData.tel = model.shipperCountryTel
|
|
|
|
|
postData.countryName = model.shipperCountryName
|
|
|
|
|
postData.country = model.shipperCountry
|
|
|
|
|
postData.name = model.shipperName
|
|
|
|
|
postData.address = model.shipperAddress
|
|
|
|
|
} else if (key == '1') {
|
|
|
|
|
postData.id = model.consigneeId
|
|
|
|
|
postData.templateName = model.consignee
|
|
|
|
|
postData.content = model.consigneeContent
|
|
|
|
|
postData.tel = model.consigneeCountryTel
|
|
|
|
|
postData.countryName = model.consigneeCountryName
|
|
|
|
|
postData.country = model.consigneeCountry
|
|
|
|
|
postData.name = model.consigneeName
|
|
|
|
|
postData.address = model.consigneeAddress
|
|
|
|
|
} else {
|
|
|
|
|
postData.id = model.notifyPartyId
|
|
|
|
|
postData.templateName = model.notifyParty
|
|
|
|
|
postData.content = model.notifyPartyContent
|
|
|
|
|
postData.tel = model.notifyPartyCountryTel
|
|
|
|
|
postData.countryName = model.notifyPartyCountryName
|
|
|
|
|
postData.country = model.notifyPartyCountry
|
|
|
|
|
postData.name = model.notifyPartyName
|
|
|
|
|
postData.address = model.notifyPartyAddress
|
|
|
|
|
}
|
|
|
|
|
if (postData.id) {
|
|
|
|
|
ApiEdit(postData).then(res => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
createMessage.success('保存成功!')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
// 新建模版
|
|
|
|
|
temFlag.value = true
|
|
|
|
|
let content = ''
|
|
|
|
|
if (key == '2') {
|
|
|
|
|
content = model.shipperContent
|
|
|
|
|
} else if (key == '1') {
|
|
|
|
|
content = model.consigneeContent
|
|
|
|
|
} else {
|
|
|
|
|
content = model.notifyPartyContent
|
|
|
|
|
}
|
|
|
|
|
// 保存收发通模版
|
|
|
|
|
const save = (model, key) => {}
|
|
|
|
|
function copyNotify() {
|
|
|
|
|
if (content) {
|
|
|
|
|
const index = content.indexOf("\n");
|
|
|
|
|
const firstline = content.substring(0, index);
|
|
|
|
|
temForm.templateName = firstline
|
|
|
|
|
} else {
|
|
|
|
|
temForm.templateName = null
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function copyNotify() {
|
|
|
|
|
const data = getFieldsValueMail()
|
|
|
|
|
setFieldsValueMail({
|
|
|
|
|
consigneeName: data.notifyPartyName,
|
|
|
|
@ -378,8 +438,8 @@
|
|
|
|
|
consigneeCountryName: data.notifyPartyCountryName,
|
|
|
|
|
consigneeCountryTel: data.notifyPartyCountryTel,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function copyConsignee() {
|
|
|
|
|
}
|
|
|
|
|
function copyConsignee() {
|
|
|
|
|
const data = getFieldsValueMail()
|
|
|
|
|
setFieldsValueMail({
|
|
|
|
|
notifyPartyName: data.consigneeName,
|
|
|
|
@ -388,27 +448,27 @@
|
|
|
|
|
notifyPartyCountryName: data.consigneeCountryName,
|
|
|
|
|
notifyPartyCountryTel: data.consigneeCountryTel,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const linkageForm = async (val) => {
|
|
|
|
|
}
|
|
|
|
|
const linkageForm = async (val) => {
|
|
|
|
|
orderList.value[editIndex.value].hblno = val
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function close() {
|
|
|
|
|
function close() {
|
|
|
|
|
openPreOrderShow.value = false
|
|
|
|
|
}
|
|
|
|
|
// -----------------------左侧------------------------
|
|
|
|
|
const orderList = ref<any>([])
|
|
|
|
|
const formState = ref<any>({})
|
|
|
|
|
const editIndex = ref(0)
|
|
|
|
|
const floading = ref(false)
|
|
|
|
|
const RefcargoInfo = ref(null) as any
|
|
|
|
|
const sendOption = ref([
|
|
|
|
|
}
|
|
|
|
|
// -----------------------左侧------------------------
|
|
|
|
|
const orderList = ref<any>([])
|
|
|
|
|
const formState = ref<any>({})
|
|
|
|
|
const editIndex = ref(0)
|
|
|
|
|
const floading = ref(false)
|
|
|
|
|
const RefcargoInfo = ref(null) as any
|
|
|
|
|
const sendOption = ref([
|
|
|
|
|
{ label: '新增', value: '0' },
|
|
|
|
|
{ label: '修改', value: '1' },
|
|
|
|
|
{ label: '删除', value: '2' },
|
|
|
|
|
])
|
|
|
|
|
// 获取列表数据
|
|
|
|
|
function FngetPageESeaeEdi() {
|
|
|
|
|
])
|
|
|
|
|
// 获取列表数据
|
|
|
|
|
function FngetPageESeaeEdi() {
|
|
|
|
|
floading.value = true
|
|
|
|
|
let ApiData = {
|
|
|
|
|
id: id.value,
|
|
|
|
@ -444,6 +504,15 @@
|
|
|
|
|
orderList.value = res.data
|
|
|
|
|
} else {
|
|
|
|
|
//处理接口没数据的情况
|
|
|
|
|
handelNoData()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
floading.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function handelNoData() {
|
|
|
|
|
const propsDetail = JSON.parse(JSON.stringify(props.details))
|
|
|
|
|
propsDetail.id = '0'
|
|
|
|
|
propsDetail.isPart = false
|
|
|
|
@ -505,15 +574,9 @@
|
|
|
|
|
data.isPart = false
|
|
|
|
|
data.checked = false
|
|
|
|
|
orderList.value[0] = data
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
floading.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 保存当前信息
|
|
|
|
|
function saveOrderInfo() {
|
|
|
|
|
}
|
|
|
|
|
// 保存当前信息
|
|
|
|
|
function saveOrderInfo() {
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
ctnList.value.forEach((item) => {
|
|
|
|
|
item.pid = getFieldsValueBase().id ? getFieldsValueBase().id : '0'
|
|
|
|
@ -529,9 +592,9 @@
|
|
|
|
|
orderList.value[editIndex.value] = data
|
|
|
|
|
resolve(true)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 添加分单 保存当前单
|
|
|
|
|
function addOrder() {
|
|
|
|
|
}
|
|
|
|
|
// 添加分单 保存当前单
|
|
|
|
|
function addOrder() {
|
|
|
|
|
saveOrderInfo().then((res) => {
|
|
|
|
|
// 分单内容要复制主单的
|
|
|
|
|
let mblData = {} as any
|
|
|
|
@ -553,9 +616,9 @@
|
|
|
|
|
console.log(mblData, hblList)
|
|
|
|
|
calcCtnInfo(mblData, hblList)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 添加分单计算箱信息 需要用主单减掉分单的信息
|
|
|
|
|
function calcCtnInfo(mblData, hblList) {
|
|
|
|
|
}
|
|
|
|
|
// 添加分单计算箱信息 需要用主单减掉分单的信息
|
|
|
|
|
function calcCtnInfo(mblData, hblList) {
|
|
|
|
|
mblData.ctnInfo.forEach((item) => {
|
|
|
|
|
if (item.kgs) {
|
|
|
|
|
let totalKgs = 0
|
|
|
|
@ -613,9 +676,9 @@
|
|
|
|
|
mblData.isPart = true
|
|
|
|
|
orderList.value.push({ checked: true, isPart: true, ...mblData })
|
|
|
|
|
editIndex.value = orderList.value.length - 1
|
|
|
|
|
}
|
|
|
|
|
// 保存
|
|
|
|
|
function saveOrder() {
|
|
|
|
|
}
|
|
|
|
|
// 保存
|
|
|
|
|
function saveOrder() {
|
|
|
|
|
saveOrderInfo().then((res) => {
|
|
|
|
|
floading.value = true
|
|
|
|
|
SaveShippingBillAsync(orderList.value)
|
|
|
|
@ -631,9 +694,9 @@
|
|
|
|
|
floading.value = false
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 删除
|
|
|
|
|
function removeOrder() {
|
|
|
|
|
}
|
|
|
|
|
// 删除
|
|
|
|
|
function removeOrder() {
|
|
|
|
|
const arr = [] as any
|
|
|
|
|
for (let i = orderList.value.length - 1; i >= 0; i--) {
|
|
|
|
|
if (orderList.value[i].checked && !orderList.value[i].isPart) {
|
|
|
|
@ -667,14 +730,14 @@
|
|
|
|
|
} else {
|
|
|
|
|
editOrder(0)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const showSendModel = ref(false)
|
|
|
|
|
const sendType = ref('')
|
|
|
|
|
const sendRemarkVal = ref('')
|
|
|
|
|
const sendLoading = ref(false)
|
|
|
|
|
}
|
|
|
|
|
const showSendModel = ref(false)
|
|
|
|
|
const sendType = ref('')
|
|
|
|
|
const sendRemarkVal = ref('')
|
|
|
|
|
const sendLoading = ref(false)
|
|
|
|
|
|
|
|
|
|
// 发送
|
|
|
|
|
function sendOrderFun() {
|
|
|
|
|
// 发送
|
|
|
|
|
function sendOrderFun() {
|
|
|
|
|
const SelectArr = [] as any
|
|
|
|
|
for (let i = 0; i < orderList.value.length; i++) {
|
|
|
|
|
if (orderList.value[i].checked && orderList.value[i].id == 0) {
|
|
|
|
@ -693,16 +756,16 @@
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: '请选择发送单号', duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function delboxLine() {
|
|
|
|
|
}
|
|
|
|
|
function delboxLine() {
|
|
|
|
|
for (let i = ctnList.value.length - 1; i >= 0; i--) {
|
|
|
|
|
if (ctnList.value[i].selected) {
|
|
|
|
|
ctnList.value.splice(i, 1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
hotpreOrder.value.hotInstance.loadData(ctnList.value)
|
|
|
|
|
}
|
|
|
|
|
function copyboxLine() {
|
|
|
|
|
}
|
|
|
|
|
function copyboxLine() {
|
|
|
|
|
const arr = [] as any
|
|
|
|
|
ctnList.value.forEach((item) => {
|
|
|
|
|
if (item.selected) {
|
|
|
|
@ -718,9 +781,9 @@
|
|
|
|
|
hotpreOrder.value.hotInstance.loadData(ctnList.value)
|
|
|
|
|
}
|
|
|
|
|
console.log(arr)
|
|
|
|
|
}
|
|
|
|
|
// 确认发送
|
|
|
|
|
function sendSubmit() {
|
|
|
|
|
}
|
|
|
|
|
// 确认发送
|
|
|
|
|
function sendSubmit() {
|
|
|
|
|
sendLoading.value = true
|
|
|
|
|
let SendIds: any = []
|
|
|
|
|
orderList.value.forEach((e) => {
|
|
|
|
@ -756,25 +819,25 @@
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
sendLoading.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 关闭
|
|
|
|
|
function sendClose() {
|
|
|
|
|
}
|
|
|
|
|
// 关闭
|
|
|
|
|
function sendClose() {
|
|
|
|
|
showSendModel.value = false
|
|
|
|
|
sendType.value = ''
|
|
|
|
|
sendRemarkVal.value = ''
|
|
|
|
|
}
|
|
|
|
|
// 刷新
|
|
|
|
|
function handleRef() {
|
|
|
|
|
init()
|
|
|
|
|
}
|
|
|
|
|
// 点击列表 保存原先信息 然后切换
|
|
|
|
|
}
|
|
|
|
|
// 刷新
|
|
|
|
|
function handleRef() {
|
|
|
|
|
handelNoData()
|
|
|
|
|
}
|
|
|
|
|
// 点击列表 保存原先信息 然后切换
|
|
|
|
|
|
|
|
|
|
function changeOrder(index) {
|
|
|
|
|
function changeOrder(index) {
|
|
|
|
|
saveOrderInfo().then((res) => {
|
|
|
|
|
editOrder(index)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function editOrder(index) {
|
|
|
|
|
}
|
|
|
|
|
function editOrder(index) {
|
|
|
|
|
editIndex.value = index
|
|
|
|
|
const data = orderList.value[index]
|
|
|
|
|
orderList.value.forEach((item) => {
|
|
|
|
@ -795,18 +858,18 @@
|
|
|
|
|
})
|
|
|
|
|
ctnList.value = data.ctnInfo ? data.ctnInfo : []
|
|
|
|
|
hotpreOrder.value.hotInstance.loadData(ctnList.value)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// -----------------------下侧表格------------------------
|
|
|
|
|
const list = ref<any>([])
|
|
|
|
|
const ctnDict = ref([])
|
|
|
|
|
const kindPkgsDict = ref([])
|
|
|
|
|
const hotpreOrder = ref(null) as any
|
|
|
|
|
const mainPkgs = ref([]) as any
|
|
|
|
|
const totalPkgs = ref(0)
|
|
|
|
|
const totalKgs = ref(0)
|
|
|
|
|
const totalCbm = ref(0)
|
|
|
|
|
const columns = [
|
|
|
|
|
// -----------------------下侧表格------------------------
|
|
|
|
|
const list = ref<any>([])
|
|
|
|
|
const ctnDict = ref([])
|
|
|
|
|
const kindPkgsDict = ref([])
|
|
|
|
|
const hotpreOrder = ref(null) as any
|
|
|
|
|
const mainPkgs = ref([]) as any
|
|
|
|
|
const totalPkgs = ref(0)
|
|
|
|
|
const totalKgs = ref(0)
|
|
|
|
|
const totalCbm = ref(0)
|
|
|
|
|
const columns = [
|
|
|
|
|
{
|
|
|
|
|
data: 'selected',
|
|
|
|
|
type: 'checkbox',
|
|
|
|
@ -879,9 +942,9 @@
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'hsCode',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
// 表格配置项
|
|
|
|
|
const settings = {
|
|
|
|
|
]
|
|
|
|
|
// 表格配置项
|
|
|
|
|
const settings = {
|
|
|
|
|
height: '208',
|
|
|
|
|
autoWrapRow: true,
|
|
|
|
|
autoWrapCol: true,
|
|
|
|
@ -968,8 +1031,8 @@
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
function GetCtnList() {
|
|
|
|
|
}
|
|
|
|
|
function GetCtnList() {
|
|
|
|
|
if (orderList.value[editIndex.value].id) {
|
|
|
|
|
let ApiData = {
|
|
|
|
|
queryCondition: JSON.stringify([
|
|
|
|
@ -989,14 +1052,14 @@
|
|
|
|
|
list.vale = res.data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
defineExpose({
|
|
|
|
|
defineExpose({
|
|
|
|
|
init,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
.ds-pre-order {
|
|
|
|
|
.ds-pre-order {
|
|
|
|
|
.pl0 {
|
|
|
|
|
padding-left: 0 !important;
|
|
|
|
|
}
|
|
|
|
@ -1036,9 +1099,9 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.baseinfo {
|
|
|
|
|
.baseinfo {
|
|
|
|
|
.ds-textarea {
|
|
|
|
|
position: relative;
|
|
|
|
|
top: -6px;
|
|
|
|
@ -1076,9 +1139,9 @@
|
|
|
|
|
.save-btn {
|
|
|
|
|
float: right;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
.title {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
color: black;
|
|
|
|
@ -1086,20 +1149,20 @@
|
|
|
|
|
padding-left: 14px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.box {
|
|
|
|
|
.box {
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.right {
|
|
|
|
|
.right {
|
|
|
|
|
width: calc(100% - 320px);
|
|
|
|
|
height: 80vh;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.left-title {
|
|
|
|
|
.left-title {
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
/deep/ .ant-btn-link {
|
|
|
|
@ -1109,26 +1172,26 @@
|
|
|
|
|
|
|
|
|
|
border-bottom: 1px solid #e8ebed;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.order-label {
|
|
|
|
|
.order-label {
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
&.active {
|
|
|
|
|
color: #257afa;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.sec-order {
|
|
|
|
|
.sec-order {
|
|
|
|
|
border-bottom: 1px solid #e8ebed;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.yard {
|
|
|
|
|
.yard {
|
|
|
|
|
width: 400px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.table-calc {
|
|
|
|
|
.table-calc {
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
|
|
|
@ -1142,5 +1205,5 @@
|
|
|
|
|
color: #257afa;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|