舱单弹窗

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

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

@ -9,3 +9,72 @@
} }
} }
} }
// 自定义最小输入框
.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 { .ant-modal-header {
border-bottom: none; border-bottom: none!important;
padding: 16px 16px 0px 16px; padding: 16px 16px 0px 16px;
.ant-modal-title { .ant-modal-title {
font-size: 12px; font-size: 12px;
@ -11,6 +11,7 @@
} }
.ant-modal-body { .ant-modal-body {
padding: 15px 30px; padding: 15px 30px;
margin-top: 5px;
.ant-form { .ant-form {
background-color: #F5F9FC; background-color: #F5F9FC;
border-radius: 2px; border-radius: 2px;
@ -40,3 +41,34 @@
} }
} }
} }
.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 { .ant-col-5 {
max-width: 20% !important; max-width: 20% !important;
flex: 0; flex: 0;
@ -114,23 +59,12 @@
border-color: rgba(0, 0, 0, 0.16); border-color: rgba(0, 0, 0, 0.16);
} }
.ant-modal-close-x {
text-align: right !important;
padding-right: 15px;
}
.ant-tabs-card { .ant-tabs-card {
.ant-tabs-tab { .ant-tabs-tab {
padding: 5px 15px !important; padding: 5px 15px !important;
} }
} }
// 定义所有表单组件高度为26 // 定义所有表单组件高度为26
// .ant-select-selector,
// .ant-input-number-input-wrap {
// height: 26px !important;
// min-height: 26px!important;
// font-size: 12px!important;
// }
input::placeholder { input::placeholder {
font-size: 12px!important; font-size: 12px!important;
} }
@ -191,31 +125,6 @@ h5 {
.ml10 { .ml10 {
margin-left: 10px; 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 { .ds-tb-check {
position: absolute; position: absolute;

@ -7,24 +7,18 @@ import type { App, Directive, DirectiveBinding } from 'vue'
const repeatDirective: Directive = { const repeatDirective: Directive = {
beforeMount(el: Element, binding: DirectiveBinding<any>) { beforeMount(el: Element, binding: DirectiveBinding<any>) {
let interval: Nullable<IntervalHandle> = null on(el, 'click', (e: MouseEvent): void => {
let startTime = 0 if (!el.disabled) {
console.log(binding) el.disabled = true
const handler = (): void => binding?.value() el.style.cursor = 'not-allowed'
const clear = (): void => { el.style.color = 'rgba(0, 0, 0, 0.25)'
if (Date.now() - startTime < 100) { const timer = setTimeout(() => {
handler() 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> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed } from 'vue' import { ref, computed, watch } from 'vue'
import { useAppStore } from '/@/store/modules/app' import { useAppStore } from '/@/store/modules/app'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
import rules from './rules' import rules from './rules'
@ -204,6 +204,15 @@
const height = window.innerHeight const height = window.innerHeight
return 300 return 300
}) })
watch(
() => bookingDetails.value,
(val) => {
console.log(val)
},
{
deep: true
}
)
// // ========= // // =========
// watch( // watch(
// () => mainOrderActiveKey, // () => mainOrderActiveKey,

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

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

@ -1,7 +1,10 @@
<template> <template>
<div class="MainBox"> <div class="MainBox">
<div class="buttonGroup"> <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> </div>
<BasicForm class="Content" @register="registerForm" /> <BasicForm class="Content" @register="registerForm" />
</div> </div>
@ -14,7 +17,9 @@
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
import { propTypes } from '/@/utils/propTypes' import { propTypes } from '/@/utils/propTypes'
const props = defineProps({ const props = defineProps({
businessId: propTypes.object, businessId: {
type: String
},
selectId: propTypes.string, selectId: propTypes.string,
}) })
watch( watch(
@ -69,8 +74,6 @@
.MainBox { .MainBox {
height: 100%; height: 100%;
position: relative; position: relative;
.buttonGroup {
}
.Content { .Content {
height: calc(100% - 28px); height: calc(100% - 28px);
overflow-y: auto; overflow-y: auto;

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

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

Loading…
Cancel
Save