舱单弹窗

szh-new
lijingjia 4 months ago
parent 98e811704e
commit e7e65ce75a

@ -50,7 +50,8 @@
.@{prefix-cls} {
position: relative;
display: flex;
font-size: 16px;
font-size: 12px;
padding-left: 10px;
font-family: 'PingFang SC';
font-weight: 600;
line-height: 24px;

@ -8,4 +8,73 @@
width: 100%;
}
}
}
// 自定义最小输入框
.ant-form-small {
.ant-input-affix-wrapper-sm,
.ant-select-selector,
.ant-input-disabled,
.ant-input-number {
height: 26px !important;
.ant-select-selection-item {
line-height: 26px !important;
}
}
.ant-select-selection-search-input, .ant-input-affix-wrapper, .ant-input-number-input {
height: 26px!important;
}
.ant-picker-small {
height: 26px;
width: 100%;
}
.ant-form-item {
margin-bottom: 2px!important;
}
.ant-input-number-input-wrap {
height: 26px;
line-height: 24px;
}
.ant-form-item-label {
height: 22px;
}
.ant-select-selection-item,
.ant-select-selection-placeholder,
.ant-input-affix-wrapper-placeholder {
line-height: 26px !important;
font-size: 12px;
}
.ant-picker, .ant-input {
height: 26px!important;
width: 100%;
font-size: 12px!important;
}
.ant-btn {
height: 26px;
}
}
// 表单详情样式
.ds-form-detail {
.ant-form-item {
margin-bottom: 10px;
}
.ant-form-item-control-input-content {
white-space: nowrap;
width: 100%;
text-overflow: ellipsis;
overflow: hidden;
font-size: 12px;
}
.ant-form-item-control-input {
min-height: 28px;
}
.ant-form-item-label {
padding: 0 !important;
label {
font-family: PingFang SC-Semibold, PingFang SC;
font-size: 12px;
color: #7A8798;
}
}
}

@ -1,6 +1,6 @@
// 小弹窗
.ant-modal-header {
border-bottom: none;
border-bottom: none!important;
padding: 16px 16px 0px 16px;
.ant-modal-title {
font-size: 12px;
@ -11,6 +11,7 @@
}
.ant-modal-body {
padding: 15px 30px;
margin-top: 5px;
.ant-form {
background-color: #F5F9FC;
border-radius: 2px;
@ -39,4 +40,35 @@
top: -1px;
}
}
}
.ant-modal-confirm-btns {
.ant-btn {
height: 26px;
width: 100px;
padding: 0;
line-height: 27px;
span {
position: relative;
top: -1px;
}
}
}
.anticon-exclamation-circle {
svg {
display: none;
}
}
.ant-modal-confirm-title, .ant-modal-confirm-content {
font-size: 14px!important;
}
.ant-modal-confirm-title {
font-weight: 600!important;
}
.ant-modal-confirm-content {
margin-left: 0!important;
}
.ant-modal-close-x {
text-align: right !important;
padding-right: 15px;
}

@ -50,61 +50,6 @@
}
}
.ant-modal {
// top: 30px!important;
}
// 自定义最小输入框
.ant-form-small {
.ant-input-affix-wrapper-sm,
.ant-select-selector,
.ant-input-disabled,
.ant-input-number {
height: 26px !important;
.ant-select-selection-item {
line-height: 26px !important;
}
}
.ant-input-disabled {
// height: 16px !important;
}
// .ant-select-selection-search-input {
// height: 26px !important;
// font-size: 12px!important;
// }
.ant-select-selection-search-input, .ant-input-affix-wrapper, .ant-input-number-input {
height: 26px!important;
}
.ant-picker-small {
height: 26px;
width: 100%;
}
.ant-form-item {
margin-bottom: 2px!important;
}
.ant-input-number-input-wrap {
height: 26px;
line-height: 24px;
}
.ant-form-item-label {
height: 22px;
}
.ant-select-selection-item,
.ant-select-selection-placeholder,
.ant-input-affix-wrapper-placeholder {
line-height: 26px !important;
font-size: 12px;
}
.ant-picker {
height: 26px!important;
width: 100%;
font-size: 12px!important;
}
.ant-btn {
height: 26px;
}
}
.ant-col-5 {
max-width: 20% !important;
flex: 0;
@ -114,23 +59,12 @@
border-color: rgba(0, 0, 0, 0.16);
}
.ant-modal-close-x {
text-align: right !important;
padding-right: 15px;
}
.ant-tabs-card {
.ant-tabs-tab {
padding: 5px 15px !important;
}
}
// 定义所有表单组件高度为26
// .ant-select-selector,
// .ant-input-number-input-wrap {
// height: 26px !important;
// min-height: 26px!important;
// font-size: 12px!important;
// }
input::placeholder {
font-size: 12px!important;
}
@ -191,31 +125,6 @@ h5 {
.ml10 {
margin-left: 10px;
}
// 表单详情样式
.ds-form-detail {
.ant-form-item {
margin-bottom: 10px;
}
.ant-form-item-control-input-content {
white-space: nowrap;
width: 100%;
text-overflow: ellipsis;
overflow: hidden;
font-size: 12px;
}
.ant-form-item-control-input {
min-height: 28px;
}
.ant-form-item-label {
padding: 0 !important;
label {
font-family: PingFang SC-Semibold, PingFang SC;
font-size: 12px;
color: #7A8798;
}
}
}
.ds-tb-check {
position: absolute;

@ -7,24 +7,18 @@ import type { App, Directive, DirectiveBinding } from 'vue'
const repeatDirective: Directive = {
beforeMount(el: Element, binding: DirectiveBinding<any>) {
let interval: Nullable<IntervalHandle> = null
let startTime = 0
console.log(binding)
const handler = (): void => binding?.value()
const clear = (): void => {
if (Date.now() - startTime < 100) {
handler()
on(el, 'click', (e: MouseEvent): void => {
if (!el.disabled) {
el.disabled = true
el.style.cursor = 'not-allowed'
el.style.color = 'rgba(0, 0, 0, 0.25)'
const timer = setTimeout(() => {
el.disabled = false
el.style.color = '#257AFA'
el.style.cursor = 'pointer'
clearInterval(timer)
}, binding.value || 1500)
}
interval && clearInterval(interval)
interval = null
}
on(el, 'mousedown', (e: MouseEvent): void => {
if ((e as any).button !== 0) return
startTime = Date.now()
once(document as any, 'mouseup', clear)
interval && clearInterval(interval)
interval = setInterval(handler, 1000)
})
},
}

@ -127,7 +127,7 @@
</template>
<script lang="ts" setup>
import { ref, computed } from 'vue'
import { ref, computed, watch } from 'vue'
import { useAppStore } from '/@/store/modules/app'
import { useMessage } from '/@/hooks/web/useMessage'
import rules from './rules'
@ -204,6 +204,15 @@
const height = window.innerHeight
return 300
})
watch(
() => bookingDetails.value,
(val) => {
console.log(val)
},
{
deep: true
}
)
// // =========
// watch(
// () => mainOrderActiveKey,

@ -142,6 +142,6 @@
@import url('/@/styles/buttonGroup.scss');
.OPCol {
height: 60vh;
overflow-y: auto;
overflow-y: hidden;
}
</style>

@ -11,16 +11,20 @@
<BasicTable @register="registerOpBusinessYardTable">
<template #tableTitle>
<div class="buttonGroup">
<div class="nav" @click="FnClickAdd">
<i class="iconfont icon-jiahao2fill"></i>新建
</div>
<a-button type="link" @click="FnClickAdd">
<span class="iconfont icon-new_document"></span>
新建
</a-button>
<a-popconfirm
title="确定要删除所选数据?"
ok-text="确定"
cancel-text="取消"
@confirm="FnClickDel"
>
<div class="nav"> <i class="iconfont icon-shanchu"></i>删除 </div>
<a-button type="link">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button>
</a-popconfirm>
</div>
</template>
@ -137,9 +141,8 @@
}
</script>
<style lang="less">
@import url('/@/styles/buttonGroup.scss');
.OPCol {
height: 60vh;
overflow-y: auto;
overflow-y: hidden;
}
</style>

@ -1,7 +1,10 @@
<template>
<div class="MainBox">
<div class="buttonGroup">
<div class="nav" @click="handleSave"> <i class="iconfont icon-jiahao2fill"></i>保存 </div>
<a-button type="link" @click="handleSave">
<span class="iconfont icon-baocun"></span>
保存
</a-button>
</div>
<BasicForm class="Content" @register="registerForm" />
</div>
@ -14,7 +17,9 @@
import { useMessage } from '/@/hooks/web/useMessage'
import { propTypes } from '/@/utils/propTypes'
const props = defineProps({
businessId: propTypes.object,
businessId: {
type: String
},
selectId: propTypes.string,
})
watch(
@ -69,8 +74,6 @@
.MainBox {
height: 100%;
position: relative;
.buttonGroup {
}
.Content {
height: calc(100% - 28px);
overflow-y: auto;

@ -30,18 +30,22 @@
派车信息
</a-button>
<Divider type="vertical" />
<a-button type="link" @click="FnTxxpLink">
<a-button type="link" v-repeat @click="FnTxxpLink">
<span class="iconfont icon-a-xiaopiaofapiao-01"></span>
提箱小票
</a-button>
<a-button type="link" @click="ShowOCR">
<a-button type="link" v-repeat @click="ShowOCR">
<span class="iconfont icon-OCR"></span>
OCR
</a-button>
<a-button type="link" @click="handleSubmitTelex">
<a-button type="link" v-repeat @click="handleSubmitTelex">
<span class="iconfont icon-lunchuan"></span>
船司电放
</a-button>
<!-- 场站入货 -->
<OpBusinessYardDetails :businessId="details.id" @register="OYregisterModal" />
<!-- 派车信息 -->
<OpBusinessTruckDetails :businessId="details.id" @register="OTregisterModal" />
<!-- <a-card
:bordered="false"
:bodyStyle="{
@ -234,25 +238,20 @@
@cancel="handleModelCancel"
>
<template v-if="['bookingSpace', 'cutOff'].includes(modelType)">
<a-form>
<a-row :gutter="16">
<a-col :span="24">
<a-form-item
label="文件功能"
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
layout="vertical"
class="ant-form-file"
>
<a-radio-group v-model:value="bookingModelFrom.fileRole">
<a-radio :style="radioStyle" :value="9"> 原始 </a-radio>
<a-radio :disabled="forwarderFlag" :style="radioStyle" :value="1"> 更新 </a-radio>
<a-radio :disabled="forwarderFlag" :style="radioStyle" :value="5"> 退舱 </a-radio>
</a-radio-group>
</a-form-item>
</a-col>
</a-row>
<a-form
layout="vertical"
class="ds-form-detail"
>
<a-form-item
label="文件功能"
has-feedback
>
<a-radio-group v-model:value="bookingModelFrom.fileRole">
<a-radio :value="9"> 原始 </a-radio>
<a-radio :disabled="forwarderFlag" :value="1"> 更新 </a-radio>
<a-radio :disabled="forwarderFlag" :value="5"> 退舱 </a-radio>
</a-radio-group>
</a-form-item>
</a-form>
</template>
<template v-else-if="['initCabin', 'ladingBill', 'vgmlink'].includes(modelType)">
@ -878,48 +877,47 @@
}}</li>
</ul>
</a-drawer>
<!-- OCR抽屉 end -->
<!-- 运踪弹窗 start -->
<!-- 运踪弹窗 -->
<a-modal
width="50vw"
width="500px"
class="ds-modal-small"
:maskClosable="false"
v-model:visible="traceModalVisible"
title="运踪订阅"
>
<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-checkbox-group
class="trace-check"
v-model:value="traceValue"
name="checkboxgroup"
:options="traceOptions"
@change="onTraceChange"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
<a-form
ref=traceRef
class="ds-detail-form"
layout="vertical"
:model="traceForm"
:rules="rules"
>
<a-form-item
label="请选择订阅内容"
name="traceValue"
>
<a-checkbox-group
class="trace-check"
v-model:value="traceForm.traceValue"
:options="traceOptions"
/>
</a-form-item>
</a-form>
<template #footer>
<a-button type="primary" @click="traceSend"></a-button>
<a-button @click="traceModalVisible = false">关闭</a-button>
<a-button :loading="tloading" type="primary" @click="traceSend"></a-button>
</template>
</a-modal>
<!-- 运踪弹窗 end -->
<!-- 预配舱单 -->
<pre-order ref="RefpreOrder" :details="details" @frompre="frompre" />
</div>
</template>
<script lang="ts" setup>
import preOrder from './preOrder.vue'
//
import OpBusinessYardDetails from './Letter/OpBusinessYardDetails.vue'
//
import OpBusinessTruckDetails from './Letter/OpBusinessTruckDetails.vue'
import {
GetOpenPrintModuleList,
GetOpenPrintTemplateList,
@ -951,7 +949,7 @@
const router = useRouter()
const route = useRoute()
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
const { notification, createMessage } = useMessage()
import { columns, searchFormSchema } from './operationAreaColumns'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
const emit = defineEmits([
@ -984,13 +982,22 @@
// =============
const id = ref(route.query.id)
const spinning = ref(false)
const templateType = ref<any>([])
const PrintModalVisible = ref(false)
const forwarderFlag = ref(false)
const modelType = ref('')
const bookingModelvisible = ref(false)
const bookingModelconfirm = ref(false)
//
const rules = {
traceValue: [
{
type: 'array',
required: true,
message: '请选择订阅内容',
trigger: 'change'
}
]
}
const initCabinFrom = ref({
toName: '',
attn: '',
@ -1286,9 +1293,11 @@
bookingModelFrom.orderNo = props.details.mblno
bookingModelFrom.id = route.query.id
if (type == 'save') {
// EDI
EDISloading.value = true
downloadBookingOrEDI(type)
} else {
// EDI
EDIUloading.value = true
sendBookingOrEDI(type)
}
@ -1300,23 +1309,11 @@
.then((res) => {
EDISloading.value = false
EDIUloading.value = false
console.log(res)
//
if (res.succeeded) {
notification.success({ message: '发送成功', duration: 3 })
createMessage.success('发送成功!')
handleModelCancel()
} else {
notification.error({
content: () =>
h(
'p',
{
style: {
whiteSpace: 'pre-wrap',
},
},
res.message,
),
})
}
})
.catch(() => {
@ -1365,54 +1362,54 @@
}
const traceModalVisible = ref(false)
const traceValue = ref([])
const traceOptions = reactive([
//
const traceForm = reactive({
traceValue: []
})
const traceOptions = [
{ label: '起运港', value: '1' },
{ label: '目的港', value: '2' },
])
// Change
function onTraceChange() {
console.log(traceValue.value)
}
{ label: '目的港', value: '2' }
]
const traceRef = ref(null)
const tloading = ref(false)
//
function traceSend() {
if (!traceValue.value) {
notification.error({ message: '请选择订阅内容', duration: 3 })
return false
}
if (traceValue.value.includes('1') && (!props.details.yard || !props.details.yardId)) {
notification.error({ message: '请选择场站', duration: 3 })
return false
}
if (traceValue.value.includes('2') && (!props.details.carrierId || !props.details.carrier)) {
notification.error({ message: '请选择船公司', duration: 3 })
return false
}
const query = {
businessId: route.query.id,
mblno: props.details.mblno,
yard: traceValue.value.includes('1') ? props.details.yard : '',
yardCode: traceValue.value.includes('1') ? props.details.yardid : '',
carrierid: traceValue.value.includes('2') ? props.details.carrierid : '',
carrier: traceValue.value.includes('2') ? props.details.carrier : '',
isBook: !!traceValue.value.includes('2'),
}
SendTrace([query])
.then((res) => {
traceRef.value.validate().then(() => {
console.log(props.details.yardId)
if (traceForm.traceValue.includes('1') && !props.details.yardId) {
return createMessage.warning('请选择场站!')
}
if (traceForm.traceValue.includes('2') && !props.details.carrierId) {
return createMessage.warning('请选择船公司!')
}
const query = {
businessId: route.query.id,
mblno: props.details.mblno,
yard: traceForm.traceValue.includes('1') ? props.details.yard : '',
yardCode: traceForm.traceValue.includes('1') ? props.details.yardId : '',
carrierId: traceForm.traceValue.includes('2') ? props.details.carrierId : '',
carrier: traceForm.traceValue.includes('2') ? props.details.carrier : '',
isBook: !!traceForm.traceValue.includes('2')
}
tloading.value = true
SendTrace([query]).then((res) => {
tloading.value = false
if (res.succeeded) {
const tip = `订阅成功`
notification.success({ message: tip, duration: 3 })
createMessage.success('订阅成功!')
traceModalVisible.value = false
traceValue.value = []
traceForm.traceValue = []
} else {
notification.warning({ message: res.message, duration: 3 })
traceModalVisible.value = false
traceValue.value = []
traceForm.traceValue = []
}
})
.catch((err) => {
tloading.value = false
console.log(err)
})
}).catch(error => {
console.log('error', error)
})
}
// VGM
function openDialog(type) {
@ -1425,6 +1422,7 @@
Modal.confirm({
title: '温馨提示',
content: content,
class: 'ds-modal-small',
onOk() {
if (type === 'vgm') {
vgmSend()
@ -1432,19 +1430,15 @@
FnsendXHZ()
}
},
onCancel() {},
class: 'test',
onCancel() {}
})
}
// VGM
function vgmSend() {
VgmSend(id.value)
.then((res) => {
// notification.open({ message: '..' })
if (res.succeeded) {
notification.success({ message: 'VGM发送成功', duration: 3 })
} else {
notification.error({ message: res.message, duration: 3 })
createMessage.success('VGM发送成功')
}
})
.catch((err) => {
@ -1454,11 +1448,8 @@
function FnsendXHZ() {
SendXHZ({ id: id.value })
.then((res) => {
// notification.loading({ message: '..' })
if (res.succeeded) {
notification.success({ message: '下货纸发送成功', duration: 3 })
} else {
notification.error({ message: res.message, duration: 3 })
createMessage.success('下货纸发送成功!')
}
})
.catch((err) => {
@ -1547,8 +1538,6 @@
.then((res) => {
if (res.succeeded) {
copyFun(res.data)
} else {
notification.error({ message: res.message, duration: 3 })
}
})
.catch((err) => {
@ -1695,7 +1684,7 @@
copyInput.setAttribute('value', data)
copyInput.select()
document.execCommand('Copy', false, null)
notification.success({ message: '复制成功', duration: 3 })
createMessage.success('复制成功!')
copyInput.remove()
}
function beforeUpload(file) {
@ -1868,8 +1857,7 @@
const RefpreOrder = ref()
function openPreOrderFun() {
if (!id.value) {
notification.error({ message: '请先保存主单', duration: 3 })
return false
return createMessage.warning('请先保存主单!')
}
RefpreOrder.value.init()
}

@ -0,0 +1,25 @@
import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table'
import { getDictOption } from '/@/utils/dictUtil'
import { getOptions } from '/@/hooks/dict'
// 基础信息表单
export const formSchema1: FormSchema[] = [
{
field: 'id',
show: false,
component: 'Input'
},
{
field: 'isHBL',
show: false,
component: 'Input'
},
{
label: '主题单号',
field: 'mblno',
component: 'Input',
required: true,
colProps: { span: 4 },
},
]

File diff suppressed because it is too large Load Diff

@ -17,10 +17,11 @@ enum Api {
GetTenantParamDataSelectList = '/mainApi/ClientParam/GetTenantParamDataSelectList'
}
// 列表 (Auth)
export function GetSysPrintTemplateList() {
export function GetSysPrintTemplateList(data) {
return request<DataResult>({
url: Api.list,
method: 'get'
method: 'post',
data
})
}
// 模块列表

@ -11,8 +11,8 @@
</a-button>
<a-spin :spinning="mloading">
<div class="list-box">
<div v-for="item in modelList" :key="item.id" class="item" @click="toggleTable(item)">
<span class="count">{{ item.templateCount }}</span><span>{{ item.moduleName }}</span>
<div v-for="item in modelList" :key="item.id" class="item">
<span @click="toggleTable(item)"><span class="count">{{ item.templateCount }}</span><span>{{ item.moduleName }}</span></span>
<span style="float: right" class="iconfont icon-bianji1" @click="handleEdit(item)"></span>
</div>
<img v-if="modelList.length == 0" src="../../../assets/images/nodata1.png" alt="">
@ -78,10 +78,22 @@
const [registerModal, { openModal: openModal1 }] = useModal()
//
const [registerTemModal, { openModal: openModal2 }] = useModal()
const mloading = ref(false)
//
const initModel = () => {
mloading.value = true
GetPrintModuleList().then(res => {
modelList.value = res.data
mloading.value = false
}).catch(() => {
mloading.value = false
})
}
initModel()
//
const modelList = ref([])
const mloading = ref(false)
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
title: "打印模版列表",
api: async (p) => {
const res: API.DataResult = await GetSysPrintTemplateList(p)
return new Promise((resolve) => {
@ -90,9 +102,13 @@
},
beforeFetch: (p) => {
if (modalId) {
p['id'] = modalId
const condition = {
FieldName: 'modalId',
FieldValue: modalId,
ConditionalType: 1
}
p['queryCondition'] = JSON.stringify(condition)
}
initModel()
return formatParams(p)
},
columns,
@ -115,16 +131,6 @@
fixed: 'right',
},
})
//
const initModel = () => {
mloading.value = true
GetPrintModuleList().then(res => {
modelList.value = res.data
mloading.value = false
}).catch(() => {
mloading.value = false
})
}
//
function handleCreate() {
openModal1(true, {
@ -180,6 +186,9 @@
.opt {
padding: 10px;
}
.vben-basic-table-title {
justify-content: space-between;
}
.list-box {
border: 1px solid #E8EBED;
border-radius: 2px;

Loading…
Cancel
Save