邮件发送

szh-new
lijingjia 4 months ago
parent 5a8a3c3619
commit 0171a537ec

@ -1,218 +0,0 @@
<!--
* @Author: lijj
* @Date: 2024-05-06 09:18:47
* @Description: 邮件发送弹窗组件
-->
<template>
<div>
<a-modal
class="ds-form-detail ds-modal-small"
v-model:visible="visible"
v-if="visible"
title="邮件发送"
width="640px"
:maskClosable="false"
>
<a-spin :spinning="loading">
<div>
<a-form
layout="vertical"
autocomplete="off"
class="ant-form-small"
>
<div class="flex" style="justify-content: space-between;">
<a-form-item
label="关键字"
>
<a-input v-model:value="name" @keyup.enter="search" style="width: 400px;"></a-input>
</a-form-item>
<div>
<a-button @click="reset"> </a-button>
<a-button @click="search" type="primary"> </a-button>
</div>
</div>
</a-form>
</div>
<div>
<h4>模版</h4>
</div>
<a-row :gutter="10">
<a-col :span="12" v-for="item in modelData" class="mb10" :key="item.id">
<div class="model-card">
<span class="tem-name">
{{ item.templateName }}
</span>
<span class="flex flex-btns">
<dl @click="toPrint(item.id, '1')">
<dt><img src="../../assets/images/PDF2.png" alt=""></dt>
<dd>pdf</dd>
</dl>
<dl @click="toPrint(item.id, '2', item.name)">
<dt><img src="../../assets/images/xksx2.png" alt=""></dt>
<dd>xlsx</dd>
</dl>
<dl @click="toPrint(item.id, '3')">
<dt><img src="../../assets/images/DOC2.png" alt=""></dt>
<dd>doc</dd>
</dl>
</span>
</div>
</a-col>
</a-row>
<div v-show="!modelData.length" class="no-data">
<span class="iconfont icon-wushuju" :style="{ fontSize: '50px' }"></span>
<div class="mb10">暂无数据</div>
</div>
</a-spin>
<template #footer>
</template>
</a-modal>
</div>
</template>
<script lang="ts" setup name="DsPrint">
import { ref, defineExpose, defineProps } from 'vue'
import { GetOpenPrintTemplateList, GetOpenJsonPrintInfo } from '/@/views/operation/seaexport/api/BookingLedger.js'
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
const props = defineProps({
// idid
id: {
type: String,
default: null
}
})
//
const name = ref()
//
const visible = ref(false)
const loading = ref(false)
//
const type = ref('1')
//
const modelData = ref([])
//
const jsonDataStr = ref()
//
const sourceData = ref([])
// (list)
const init = (v) => {
visible.value = true
if (v) jsonDataStr.value = JSON.stringify(v)
loading.value = true
GetOpenPrintTemplateList({ id: props.id }).then(r => {
loading.value = false
//
modelData.value = r.data
sourceData.value = JSON.parse(JSON.stringify(r.data))
}).catch(() => {
loading.value = false
})
}
//
const reset = () => {
name.value = null
modelData.value = sourceData.value
}
//
const search = () => {
if (!name.value) return reset()
const source = JSON.parse(JSON.stringify(sourceData.value))
modelData.value = source.filter(item => {
return item.templateName.includes(name.value)
})
}
const handleOk = () => {
visible.value = false
}
const handleCancel = () => {
visible.value = false
}
//
const toPrint = (id, type, name) => {
const postData = {
jsonDataStr: jsonDataStr.value,
printType: type,
templateId: id
}
loading.value = true
GetOpenJsonPrintInfo(postData).then(res => {
loading.value = false
if (!res.succeeded) {
createMessage.error(res.message)
} else {
let fileURL = `http://60.209.125.238:3009/PrintTempFile/${res.data}`
if (type == 1) {
window.open(fileURL)
} else {
window.open(`//60.209.125.238:3009/PrintTempFile/${res.data}`, '_blank')
}
}
})
}
defineExpose({
init
})
</script>
<style lang="less">
.ds-print {
.message {
font-size: 12px;
color: #f05;
}
.tem-name {
font-size: 12px;
color: #7A8798;
}
.ant-spin-container {
min-height: 270;
}
.model-card {
padding: 10px;
background: #F5F9FC;
border-radius: 2px;
border-left: 1px solid #257AFA;
display: flex;
justify-content: space-between;
align-items: center;
}
.ant-modal-footer {
display: none;
}
.ant-btn {
width: 80px;
margin-left: 10px;
margin-top: 25px;
}
h4 {
margin: 16px 0 13px;
}
dt {
img {
width: 16px;
height: 18px;
}
}
dd {
font-size: 10px;
margin: 0;
color: #257AFA;
}
dl {
margin: 0 10px 0 7px;
cursor: pointer;
}
.flex-btns {
position: relative;
top: 2px;
}
.no-data {
text-align: center;
color: #7A8798;
}
}
</style>

@ -0,0 +1,41 @@
/*
* @Author: lijingjia lijj_xl@163.com
* @Date: 2024-07-24 14:18:58
* @Description: api
*/
import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel'
import qs from "qs"
enum Api {
GetUseEmailListByIds = '/mainApi/ClientCommon/GetUseEmailListByIds',
GetUserEmailSetInfo = '/mainApi/UserEmail/GetUserEmailSetInfo',
BatchDelFiles = '/mainApi/OpFile/BatchDelFiles'
}
// 根据id查询人员邮箱
export function GetUseEmailListByIds(params) {
return request<DataResult>({
url: Api.GetUseEmailListByIds,
method: 'get',
params,
paramsSerializer: function (params) {
return qs.stringify(params, { arrayFormat: "repeat" })
}
})
}
// 获取用户邮箱配置
export function GetUserEmailSetInfo() {
return request<DataResult>({
url: Api.GetUserEmailSetInfo,
method: 'get'
})
}
// 附件删除
export function BatchDelFiles(data: PageRequest) {
return request<DataResult>({
url: Api.BatchDelFiles,
method: 'post',
data
})
}

@ -0,0 +1,106 @@
<!--
* @Author: lijj
* @Date: 2024-05-06 09:18:47
* @Description: 邮件发送弹窗组件
-->
<template>
<div>
<a-modal
class="ds-form-detail ds-email-modal ds-modal-small"
v-model:visible="visible"
v-if="visible"
title="邮件发送"
width="640px"
:maskClosable="false"
>
<a-spin :spinning="loading">
<a-form
layout="vertical"
autocomplete="off"
class="ant-form-small"
:model="formData"
>
<a-form-item
label="抄送人"
>
<a-select
v-model:value="formData.CCTo"
mode="multiple"
placeholder="请选择"
>
<a-select-option v-for="item in receiveList" :key="item.id" :value="item.email">
{{ item.email }}
</a-select-option>
</a-select>
</a-form-item>
</a-form>
</a-spin>
<template #footer>
</template>
</a-modal>
</div>
</template>
<script lang="ts" setup name="DsPrint">
import { ref, defineExpose, defineProps, reactive } from 'vue'
import { GetUseEmailListByIds, GetUserEmailSetInfo } from './api'
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
const props = defineProps({
// idid
id: {
type: String,
default: null
}
})
//
const formData = reactive({
SendTo: [],
CCTo: []
})
//
const visible = ref(false)
const loading = ref(false)
//
const receiveList = ref([])
//
const getEmail = (ids) => {
GetUseEmailListByIds({ ids }).then(res => {
if (res.succeeded) {
const list = res.data.filter(item => {
return item.email
})
receiveList.value = list
}
})
}
//
const getEmailConfig = () => {
GetUserEmailSetInfo().then(res => {
console.log(res)
})
}
//
const init = (ids) => {
visible.value = true
getEmail(ids)
getEmailConfig()
}
const handleOk = () => {
visible.value = false
}
const handleCancel = () => {
visible.value = false
}
defineExpose({
init
})
</script>
<style lang="less">
.ds-email-modal {
}
</style>

@ -38,7 +38,6 @@
display: none;
}
}
&-large {
top: 60px;
@ -105,7 +104,11 @@
}
}
}
.ant-modal-confirm {
.ant-modal-body {
padding: 20px 30px;
}
}
@media screen and (max-height: 600px) {
.ant-modal {
top: 60px;

@ -81,4 +81,4 @@
color: #7A8798;
}
}
}
}

@ -18,19 +18,19 @@
.scroll-container {
padding: 0 30px!important;
}
.ant-form {
height: 100%;
// 所有弹窗下的表单样式
.modal-card {
background-color: #F5F9FC;
border-radius: 2px;
padding: 10px 20px 15px;
}
.ant-form {
height: 100%;
.ant-form-item {
margin-bottom: 0;
}
.ant-form-item-label {
padding-bottom: 0;
>label {
font-size: 12px;
}
}
}
.vben-basic-table {
@ -38,10 +38,11 @@
padding: 0;
}
.ant-table-title {
padding: 8px 0!important;
padding: 0!important;
}
}
}
.ant-modal-footer {
border-top: none!important;
padding: 5px 30px 20px;

@ -187,7 +187,9 @@ h5 {
.ml15 {
margin-left: 15px;
}
.pl0 {
padding-left: 0!important;
}
// 表格状态使用
.ds-green-tag,
.ds-blue-tag,

@ -1,4 +1,5 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { getOptions } from '/@/hooks/dict'
import { Tag } from 'ant-design-vue'
export const columns: BasicColumn[] = [
{
@ -255,6 +256,46 @@ export const formSchema: FormSchema[] = [
colProps: { span: 12 },
defaultValue: '',
},
{
label: '船公司名称',
field: 'carrier',
component: 'Input',
show: false,
},
{
label: '船公司属性',
field: 'carrierId',
labelSlot: 'carrierId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
const arr = getOptions('carrier')
resolve(arr)
})
},
labelField: 'name',
showName: 'shortName',
valueField: 'id',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.carrier = obj.label
} else {
formModel.carrier = ''
}
},
}
},
},
{
field: 'isOperator',
label: '是否为操作',

@ -8,14 +8,20 @@
<div class="flex">
<h2>费用字段</h2>
<div>
<a-button type="primary" size="small" @click="addRow"></a-button>
<a-button type="link" @click="addRow">
<span class="iconfont icon-new_document"></span>
添加
</a-button>
<a-popconfirm
title="确定删除当前选中的费用字段?"
title="确定删除当前选中数据"
ok-text="是"
cancel-text="否"
@confirm="deleteRow"
>
<a-button class="ml10" size="small" type="error">删除</a-button>
<a-button type="link">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button>
</a-popconfirm>
</div>
</div>
@ -23,12 +29,7 @@
<div style="position: relative">
<input class="ds-tb-check" type="checkbox" v-model="allCheck" :indeterminate="someCheck" />
<hot-table ref="hotTb" :data="list" :settings="settings">
<img
v-show="!list.length"
class="hot-tb-no-data"
src="../../../../assets/images/nodata.png"
alt=""
/>
<img v-show="!list.length" src="../../../../assets/images/nodata.png" alt="">
</hot-table>
</div>
</a-spin>
@ -51,6 +52,8 @@
GetFeeCodeSelectList,
GetClientListByCode,
GetFeeCurrencySelectList,
GetClientSelectInfoByCode,
GetUnitSelectInfo
} from '/@/api/common'
import { GetFeeTemplateDetailList, BatchDelFeeTemplateDetail } from '../api'
//
@ -120,11 +123,6 @@
className: 'htCenter',
readOnly: false,
},
{
title: '序号',
width: 130,
readOnly: true,
},
{
title: '费用名称',
width: 130,
@ -134,8 +132,9 @@
source: async (query, process) => {
const res = feeDict.value.length ? feeDict.value : (await GetFeeCodeSelectList())?.data
if (!feeDict.value.length) feeDict.value = res
console.log(res)
const dict = res.map((res) => {
return res.name
return res.code + '-' + res.name
})
process(dict)
},
@ -155,43 +154,40 @@
},
},
{
title: '结算对象',
title: '客户类别',
width: 130,
data: 'customerName',
data: 'customerTypeText',
type: 'dropdown',
source: async (query, process) => {
//
const rowIndex = hotTb.value.hotInstance.countRows()
const code = list.value[rowIndex - 1].customerType
if (code) {
GetClientListByCode({ code }).then((res) => {
const { data } = res
data.forEach((item) => {
item['label'] = item.shortName
item['value'] = item.codeName
})
companyDict.value = data
const dict = data.map((item) => {
return item.shortName
})
process(dict)
})
} else {
process([])
}
const results = await getDictOption('djy_cust_prop')
console.log(results)
const dict = results.map((item) => {
return item.value + '-' + item.name
})
process(dict)
},
},
{
title: '客户类别',
title: '结算对象',
width: 130,
data: 'customerTypeText',
data: 'customerName',
type: 'dropdown',
source: async (query, process) => {
const results = await getDictOption('djy_cust_prop')
const dict = results.map((item) => {
return item.name
//
const rowIndex = hotTb.value.hotInstance.getActiveEditor().row
const code = list.value[rowIndex]?.customerType || null
GetClientListByCode({ code }).then((res) => {
const { data } = res
data.forEach((item) => {
item['label'] = item.shortName
item['value'] = item.codeName
})
companyDict.value = data
const dict = data.map((item) => {
return item.codeName + '-' + item.shortName
})
process(dict)
})
process(dict)
},
},
{
@ -202,23 +198,23 @@
source: async (query, process) => {
if (unitDict.value && unitDict.value.length) {
const dict = unitDict.value.map((item) => {
return item.name
return item.value + '-' + item.name
})
process(dict)
} else {
const results = await feeUnitDict()
unitDict.value = results
const dict = results.map((item) => {
return item.name
return item.value + '-' + item.name
})
process(dict)
}
},
},
{
title: '不含税单价',
title: '税率',
width: 120,
data: 'noTaxPrice',
data: 'taxRate',
type: 'numeric',
},
{
@ -236,10 +232,11 @@
format: '0',
},
{
title: '金额',
title: '不含税单价',
width: 120,
data: 'amount',
data: 'noTaxPrice',
type: 'numeric',
readOnly: true,
},
{
title: '不含税金额',
@ -247,24 +244,14 @@
data: 'noTaxAmount',
type: 'numeric',
format: '0.00',
readOnly: true,
},
{
title: '税率',
width: 120,
data: 'taxRate',
type: 'numeric',
},
{
title: '汇率',
title: '金额',
width: 120,
data: 'exchangeRate',
data: 'amount',
type: 'numeric',
},
{
title: '备注',
width: 120,
data: 'note',
},
{
title: '币别',
width: 80,
@ -283,12 +270,35 @@
}
},
},
{
title: '汇率',
width: 120,
data: 'exchangeRate',
type: 'numeric',
},
{
title: '备注',
width: 120,
data: 'note',
},
{
title: '销项税率',
width: 100,
data: 'accTaxRate',
type: 'numeric',
},
{
title: '销项税额',
width: 100,
data: 'accTaxAmount',
readOnly: true,
},
{
title: '销项金额',
width: 100,
data: 'accAmount',
readOnly: true,
},
{
title: '是否机密',
width: 100,
@ -314,21 +324,84 @@
type: 'dropdown',
source: ['PP', 'CC'],
},
{
title: '录入人',
width: 100,
data: 'createByName',
readOnly: true,
},
{
title: '录入日期',
width: 100,
data: 'createTime',
readOnly: true,
},
{
title: '结算金额',
width: 100,
data: 'settlementAmount',
readOnly: true,
},
{
title: '已开票金额',
width: 100,
data: 'invoiceAmount',
readOnly: true,
},
{
title: '对账编号',
width: 100,
data: 'debitNo',
readOnly: true,
},
{
title: '修改人',
width: 100,
data: 'updateByName',
readOnly: true,
},
{
title: '修改日期',
width: 100,
data: 'updateTime',
readOnly: true,
},
{
title: '发票申请金额',
width: 100,
data: 'orderInvoiceAmount',
readOnly: true,
},
{
title: '未开票金额',
width: 100,
data: 'debitNo',
readOnly: true,
},
{
title: '审核人',
width: 100,
data: 'auditOperator',
readOnly: true,
},
{
title: '审核日期',
width: 100,
data: 'auditDate',
readOnly: true,
},
]
//
const settings = {
height: '400',
height: 300,
width: '100%',
autoWrapRow: true,
autoWrapCol: true,
//
rowHeights: 32,
fixedColumnsLeft: 1,
//
hiddenColumns: {
columns: [1],
indicators: true,
},
//
enterMoves: 'row',
columnSorting: true,
//
// columnSorting: {
@ -339,12 +412,16 @@
afterValidate: function (isValid, value, row, prop, source) {
if (!isValid) {
hotTb.value.hotInstance.setDataAtRowProp(row, prop, '')
// if (/^noTaxPrice|unitPrice|noTaxAmount|taxRate|exchangeRate$/.test(prop)) {
// if (!isNaN(value)) {
// hotTb.value.hotInstance.setDataAtRowProp(row, prop, value.toFixed(2))
// }
// }
}
},
columns: columns,
// ()
licenseKey: 'non-commercial-and-evaluation',
enterMoves: 'row',
//
afterChange(changes, source) {
//
@ -355,9 +432,10 @@
if (res[1] === 'feeName') {
//
const item = feeDict.value.filter((item) => {
return item.name === changes[0][3]
return changes[0][3].includes(item.name)
})
if (item) dict = item[0]
list.value[res[0]]['feeName'] = changes[0][3].split('-')[1]
list.value[res[0]]['feeEnName'] = dict['enName']
list.value[res[0]]['currency'] = dict['defaultCurrency']
list.value[res[0]]['unitText'] = dict['defaultUnitName']
@ -375,23 +453,53 @@
//
if (changes[0][1] === 'feeEnName') {
}
//
if (changes[0][1] === 'customerName') {
const item = companyDict.value.filter((item) => {
return changes[0][3].includes(item.name)
})
if (item) dict = item[0]
list.value[changes[0][0]]['customerCode'] = dict?.value
list.value[changes[0][0]]['customerName'] = changes[0][3].split('-')[1]
console.log(changes[0][3])
}
//
if (changes[0][1] === 'customerTypeText') {
getDictOption('djy_cust_prop').then((res) => {
const item = res.filter((item) => {
return item.name === changes[0][3]
return changes[0][3].includes(item.name)
})
if (item) dict = item[0]
list.value[changes[0][0]]['customerType'] = dict?.value
list.value[changes[0][0]]['customerTypeText'] = changes[0][3].split('-')[1]
})
}
//
if (changes[0][1] === 'unitText') {
const item = unitDict.value.filter((item) => {
return item.name === changes[0][3]
return changes[0][3].includes(item.name)
})
if (item) dict = item[0]
list.value[changes[0][0]]['unit'] = dict?.value
list.value[changes[0][0]]['unitText'] = changes[0][3].split('-')[1]
//
// const text = list.value[changes[0][0]]['unitText']
// if (text == '') {
// list.value[changes[0][0]]['quantity'] = 1
// } else if (text == '') {
// list.value[changes[0][0]]['quantity'] = props.details.pkgs
// } else if (text == '') {
// list.value[changes[0][0]]['quantity'] = props.details.kgs
// } else if (text == '') {
// list.value[changes[0][0]]['quantity'] = props.details.cbm
// } else if (text == '') {
// let r = props.details.kgs
// const k = (props.details.pkgs || 0) / 1000
// if (k > r) {
// r = k
// }
// list.value[changes[0][0]]['quantity'] = r
}
//
if (changes[0][1] === 'currencyName') {
@ -406,57 +514,78 @@
//
if (changes[0][1] === 'noTaxPrice') {
//
list.value[index].unitPrice =
(changes[0][3] || 0) * ((list.value[index].taxRate || 0) / 100 + 1)
list.value[index].unitPrice = Number(
(changes[0][3] || 0) * ((list.value[index].taxRate || 0) / 100 + 1),
).toFixed(6)
//
list.value[index].amount =
(list.value[index].unitPrice || 0) * (list.value[index].quantity || 0)
list.value[index].amount = Number(
(list.value[index].unitPrice || 0) * (list.value[index].quantity || 0),
).toFixed(6)
//
list.value[index].noTaxAmount = (changes[0][3] || 0) * (list.value[index].quantity || 0)
list.value[index].noTaxAmount = Number(
(changes[0][3] || 0) * (list.value[index].quantity || 0),
).toFixed(6)
}
//
if (changes[0][1] === 'unitPrice') {
//
list.value[index].noTaxPrice =
(changes[0][3] || 0) / ((list.value[index].taxRate || 0) / 100 + 1)
list.value[index].noTaxPrice = Number(
(changes[0][3] || 0) / ((list.value[index].taxRate || 0) / 100 + 1),
).toFixed(6)
//
list.value[index].amount = (changes[0][3] || 0) * (list.value[index].quantity || 0)
list.value[index].amount = Number(
(changes[0][3] || 0) * (list.value[index].quantity || 0),
).toFixed(6)
//
list.value[index].noTaxAmount =
(list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0)
list.value[index].noTaxAmount = Number(
(list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0),
).toFixed(6)
}
//
if (changes[0][1] === 'quantity') {
//
list.value[index].amount = (changes[0][3] || 0) * (list.value[index].unitPrice || 0)
list.value[index].amount = Number(
(changes[0][3] || 0) * (list.value[index].unitPrice || 0),
).toFixed(6)
//
list.value[index].noTaxAmount = (changes[0][3] || 0) * (list.value[index].noTaxPrice || 0)
list.value[index].noTaxAmount = Number(
(changes[0][3] || 0) * (list.value[index].noTaxPrice || 0),
).toFixed(6)
}
//
if (changes[0][1] === 'taxRate') {
//
list.value[index].noTaxPrice =
(list.value[index].unitPrice || 0) / ((changes[0][3] || 0) / 100 + 1)
list.value[index].noTaxPrice = Number(
(list.value[index].unitPrice || 0) / ((changes[0][3] || 0) / 100 + 1),
).toFixed(6)
//
list.value[index].noTaxAmount =
(list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0)
list.value[index].noTaxAmount = Number(
(list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0),
).toFixed(6)
}
}
},
}
const setTableData = () => {
const data = inject('temFieldData')
if (data) {
list.value = data.value
hotTb.value.hotInstance.loadData(data.value)
}
}
defineExpose({
validate,
})
//
const row = {
selected: false,
feeStatus: '1',
feeStatusText: '录入状态',
id: '',
businessId: '',
feeCode: '',
feeName: '',
feeEnName: '',
quantity: 1,
exchangeRate: 1,
feeType: props.tbType == 'receive' ? 1 : 2,
}
onMounted(() => {
setTableData()
const hot = hotTb.value.hotInstance
hot.addHook('afterOnCellMouseDown', function (event, coords, TD) {})
//
hot.addHook('beforeKeyDown', function (event) {
// 'Enter'
@ -464,7 +593,7 @@
if (hot.getSelected()[0][0] == list.value.length - 1 && !hot.getActiveEditor()?._opened) {
list.value.push(JSON.parse(JSON.stringify(row)))
nextTick(() => {
hot.selectCell(list.value.length - 1, 3)
hot.selectCell(list.value.length - 1, 4)
})
return false
}
@ -531,9 +660,11 @@
{ FieldName: 'TemplateId', FieldValue: v, ConditionalType: 1 },
]),
}
const res = await GetFeeTemplateDetailList(postData)
list.value = res.data
hotTb.value.hotInstance.loadData(res.data)
if (v) {
const res = await GetFeeTemplateDetailList(postData)
list.value = res.data
hotTb.value.hotInstance.loadData(res.data)
}
},
)
watchEffect(() => {

@ -2014,4 +2014,13 @@ export function GetOrderContactListByClientId(params) {
method: 'get',
params
})
}
}
// 根据id获取往来单位参数信息
export function GetClientParamListById(params) {
return request({
url: '/mainApi/ClientCommon/GetClientParamListById',
method: 'get',
params
})
}

@ -209,11 +209,12 @@ export function BookingTruckGetYardData(parameter) {
/**
* 获取场站数据
*/
export function TaskManageTruckGetYardData(parameter) {
export function TaskManageTruckGetYardData(param) {
console.log(param)
const url = '/TaskManageTruck/GetYardData?ids=' + param[0] + '&ids=' + param[1]
return request({
url: '/TaskManageTruck/GetYardData',
method: 'get',
params: parameter,
url,
method: 'get'
})
}
/**

@ -709,7 +709,15 @@
loading.value = true
EditSeaExportBillManage(postData).then(res => {
loading.value = false
createMessage.success('保存成功!')
if (res.succeeded) {
createMessage.success('保存成功!')
if (res.data && res.data.length) {
state.rowKeys = [res.data]
}
setFieldsValue1({
id: res.data
})
}
reload()
})
}

@ -26,6 +26,7 @@
<div class="auto">
<a-spin :spinning="loading">
<operationArea
:id="id"
:details="bookingDetails"
:inChildLoading="inChildLoading"
@refresh="refreshPage"

@ -1,5 +1,4 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
import { useOptionsStore } from '/@/store/modules/options'
import Space from '/@/views/operation/seaexport/components/Space.vue'
import { useComponentRegister } from '/@/components/Form'
@ -10,42 +9,42 @@ export const columns: BasicColumn[] = [
{
title: '通知人',
dataIndex: 'toName',
width: 150,
width: 100,
},
{
title: '联系人',
dataIndex: 'toAttn',
width: 150,
width: 100,
},
{
title: 'ATTN电话',
dataIndex: 'toAttnTel',
width: 150,
width: 110,
},
{
title: 'ATTN传真',
dataIndex: 'toAttnFax',
width: 150,
width: 110,
},
{
title: 'ATTN邮箱',
dataIndex: 'toAttnEmail',
width: 150,
width: 110,
},
{
title: '通知人',
dataIndex: 'fromName',
width: 150,
width: 110,
},
{
title: 'FROM电话',
dataIndex: 'fromTel',
width: 150,
width: 110,
},
{
title: 'FROM手机号',
dataIndex: 'fromMobile',
width: 150,
width: 110,
},
{
title: 'FROM传真',
@ -231,7 +230,7 @@ export const formSchema: FormSchema[] = [
component: 'Input',
defaultValue: '',
colProps: {
span: 24,
span: 12
},
},
{
@ -240,7 +239,7 @@ export const formSchema: FormSchema[] = [
component: 'Input',
defaultValue: '',
colProps: {
span: 4,
span: 6
},
},
{
@ -249,7 +248,7 @@ export const formSchema: FormSchema[] = [
component: 'Input',
defaultValue: '',
colProps: {
span: 5,
span: 6
},
},
{
@ -258,7 +257,7 @@ export const formSchema: FormSchema[] = [
component: 'Input',
defaultValue: '',
colProps: {
span: 5,
span: 6
},
},
{
@ -267,16 +266,7 @@ export const formSchema: FormSchema[] = [
component: 'Input',
defaultValue: '',
colProps: {
span: 5,
},
},
{
label: '',
field: 'Space1',
component: 'Space',
defaultValue: '',
colProps: {
span: 5,
span: 6
},
},
{
@ -285,7 +275,7 @@ export const formSchema: FormSchema[] = [
component: 'Input',
defaultValue: '',
colProps: {
span: 4,
span: 6
},
},
{
@ -294,7 +284,7 @@ export const formSchema: FormSchema[] = [
component: 'Input',
defaultValue: '',
colProps: {
span: 5,
span: 6
},
},
{
@ -303,7 +293,7 @@ export const formSchema: FormSchema[] = [
component: 'Input',
defaultValue: '',
colProps: {
span: 5,
span: 6
},
},
{
@ -312,7 +302,7 @@ export const formSchema: FormSchema[] = [
component: 'Input',
defaultValue: '',
colProps: {
span: 5,
span: 6
},
},
{
@ -321,7 +311,7 @@ export const formSchema: FormSchema[] = [
component: 'Input',
defaultValue: '',
colProps: {
span: 5,
span: 6
},
},
{
@ -338,7 +328,7 @@ export const formSchema: FormSchema[] = [
component: 'Input',
defaultValue: '',
colProps: {
span: 24,
span: 12
},
},
{
@ -348,7 +338,7 @@ export const formSchema: FormSchema[] = [
defaultValue: '',
show: false,
colProps: {
span: 6,
span: 6
},
},
// 单证Id
@ -499,15 +489,6 @@ export const formSchema: FormSchema[] = [
span: 6,
},
},
{
label: '',
field: 'Space2',
component: 'Space',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '件重尺',
field: 'pkc',

@ -6,12 +6,12 @@
width="90%"
@register="registerModal"
>
<a-row>
<a-row :gutter="16">
<a-col :span="6">
<BasicTable @register="registerOpBusinessYardTable" @row-click="onRowClick">
<template #tableTitle>
<div class="buttonGroup">
<a-button type="link" @click="FnClickAdd">
<a-button type="link" @click="FnClickAdd" class="pl0">
<span class="iconfont icon-new_document"></span>
新建
</a-button>

@ -1,7 +1,12 @@
<!--
* @Author: lijingjia lijj_xl@163.com
* @Date: 2024-07-17 08:39:51
* @Description: 场站如果编辑组件
-->
<template>
<div class="MainBox">
<div class="buttonGroup">
<a-button type="link" @click="handleSave">
<a-button type="link" @click="handleSave" class="pl0">
<span class="iconfont icon-baocun"></span>
保存
</a-button>

@ -5,6 +5,7 @@
:title="getTitle"
width="50%"
class="person-modal"
:zIndex="1211"
@register="registerModal"
@ok="handleSave"
>

@ -10,7 +10,8 @@ import {
GetDeptList,
GetPackageSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger'
// 兄弟传参,订舱代理变化使用
import emitter from '/@/utils/Bus'
import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore()
const LockType = [
@ -740,14 +741,13 @@ export const basicInfoFormSchema: FormSchema[] = [
})
},
labelField: 'name',
valueField: 'codeName',
valueField: 'id',
showName: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
console.log(e, obj)
if (obj) {
formModel.forwarder = obj.label
} else {

@ -96,6 +96,7 @@
import { ref, watch } from 'vue'
import { GetBusinessOrderContactList } from '/@/views/operation/seaexport/api/BookingLedger'
import { useMessage } from '/@/hooks/web/useMessage'
import { formatParams } from '/@/hooks/web/common'
import PersonModal from './PersonModal.vue'
const { createMessage } = useMessage()
import { useModal } from '/@/components/Modal'
@ -124,23 +125,8 @@
})
},
beforeFetch: (p) => {
var currentPageInfo: any = getPaginationRef()
const postParam = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
condition.push({
FieldName: 'businessId',
FieldValue: props.details.id,
ConditionalType: 1,
})
postParam.queryCondition = JSON.stringify(condition)
return postParam
p['businessId'] = props.details.id
return formatParams(p)
},
columns: personColumns,
isTreeTable: false,

@ -1,6 +1,6 @@
<template>
<div class="operation-area">
<a-button type="link" @click="openModel('bookingSpace')">
<a-button v-repeat type="link" @click="openModel('bookingSpace')">
<span class="iconfont icon-gongdanqueren"></span>
订舱
</a-button>
@ -238,21 +238,23 @@
@cancel="handleModelCancel"
>
<template v-if="['bookingSpace', 'cutOff'].includes(modelType)">
<a-form
layout="vertical"
class="ds-form-detail"
>
<a-form-item
label="文件功能"
has-feedback
<div class="modal-card">
<a-form
layout="vertical"
class="ds-form-detail"
>
<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>
<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>
</div>
</template>
<template v-else-if="['initCabin', 'ladingBill', 'vgmlink'].includes(modelType)">
<div class="model-btn-list" v-if="modelType === 'initCabin' || modelType === 'ladingBill'">
@ -790,53 +792,6 @@
<a-button @click="handleModelCancel"></a-button>
</template>
</a-modal>
<!-- 打印弹窗 start -->
<a-modal
:zIndex="1005"
width="45vw"
:maskClosable="false"
v-model:visible="PrintModalVisible"
title="打印"
>
<template #footer> <span></span> </template>
<a-spin tip="数据加载中..." :spinning="spinning">
<BasicTable @register="registerTable" :dataSource="dataSource">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'ant-design:file-pdf-outlined',
tooltip: 'pdf',
onClick: FnCilckTemplateType.bind(null, {
templateId: record.id,
printType: 1,
}),
},
{
icon: 'ant-design:file-excel-outlined',
tooltip: 'excel',
onClick: FnCilckTemplateType.bind(null, {
templateId: record.id,
printType: 2,
}),
},
{
icon: 'ant-design:file-word-outlined',
tooltip: 'word',
onClick: FnCilckTemplateType.bind(null, {
templateId: record.id,
printType: 3,
}),
},
]"
/>
</template>
</template>
</BasicTable>
</a-spin>
</a-modal>
<!-- 打印弹窗 end -->
<!-- OCR抽屉 start -->
<a-drawer
title="OCR"
@ -885,24 +840,26 @@
v-model:visible="traceModalVisible"
title="运踪订阅"
>
<a-form
ref=traceRef
class="ds-detail-form"
layout="vertical"
:model="traceForm"
:rules="rules"
>
<a-form-item
label="请选择订阅内容"
name="traceValue"
<div class="modal-card">
<a-form
ref=traceRef
class="ds-detail-form"
layout="vertical"
:model="traceForm"
:rules="rules"
>
<a-checkbox-group
class="trace-check"
v-model:value="traceForm.traceValue"
:options="traceOptions"
/>
</a-form-item>
</a-form>
<a-form-item
label="请选择订阅内容"
name="traceValue"
>
<a-checkbox-group
class="trace-check"
v-model:value="traceForm.traceValue"
:options="traceOptions"
/>
</a-form-item>
</a-form>
</div>
<template #footer>
<a-button @click="traceModalVisible = false">关闭</a-button>
<a-button :loading="tloading" type="primary" @click="traceSend"></a-button>
@ -910,6 +867,8 @@
</a-modal>
<!-- 预配舱单 -->
<pre-order ref="RefpreOrder" :details="details" @frompre="frompre" />
<!-- 邮件发送弹窗 -->
<EmailModal ref="emailModal"></EmailModal>
</div>
</template>
<script lang="ts" setup>
@ -918,6 +877,8 @@
import OpBusinessYardDetails from './Letter/OpBusinessYardDetails.vue'
//
import OpBusinessTruckDetails from './Letter/OpBusinessTruckDetails.vue'
//
import EmailModal from '/@/components/EmailModal/index.vue'
import {
GetOpenPrintModuleList,
GetOpenPrintTemplateList,
@ -936,7 +897,8 @@
CancelAllocationSlot,
GetOcrText,
SendTrace,
SubmitTelex
SubmitTelex,
GetClientParamListById
} from '/@/views/operation/seaexport/api/BookingLedger.js'
import { Divider } from 'ant-design-vue'
import { BookingTruckGetTruckListByBooking } from '/@/views/operation/seaexport/api/SendCar.js'
@ -966,6 +928,7 @@
'SetOCR',
])
const props = defineProps({
//
details: {
type: Object,
default: {},
@ -978,9 +941,13 @@
type: Boolean,
default: false,
},
// id
id: {
type: String
}
})
// =============
const id = ref(route.query.id)
const id = ref(props.id)
const spinning = ref(false)
const PrintModalVisible = ref(false)
const forwarderFlag = ref(false)
@ -1053,7 +1020,7 @@
const voltaFlag = ref(false)
const voltaData = ref([])
const bookingModelFrom = reactive({
id: route.query.id,
id: props,
orderNo: props.details.mblno,
useForwarderCode: false,
forwarderCode: '',
@ -1180,10 +1147,12 @@
spinning.value = false
})
}
//
const emailModal = ref(null)
function openModel(type) {
forwarderFlag.value = false
if (['initCabin', 'ladingBill', 'vgmlink'].includes(type)) {
if (!route.query.id) {
if (!props.id) {
notification.error({ message: '请保存主单后,进行操作', duration: 3 })
return false
}
@ -1194,20 +1163,28 @@
cateCode.value = 'fangcang'
}
if (['bookingSpace', 'cutOff', 'initCabin', 'ladingBill', 'vgmlink'].includes(type)) {
//
if (type === 'bookingSpace') {
if (localStorage.getItem('pro__DICT_TYPE_TREE_DATA')) {
const data = JSON.parse(localStorage.getItem('pro__DICT_TYPE_TREE_DATA') || '')
data.value.forEach((item) => {
if (item.code === 'EdiPipelineRelation') {
if (item.children[0].name == props.details.forwarder) {
forwarderFlag.value = true
}
}
const id = props.details.forwarderId
// id
GetClientParamListById({ id }).then(res => {
const { data } = res
const Email = data.filter(item => {
return item.itemCode == 'EMAIL'
})
}
if (Email.length) {
const ids = []
if (props.details.saleId) ids.push(props.details.saleId)
if (props.details.operatorId) ids.push(props.details.operatorId)
//
emailModal.value.init(ids)
} else {
// EDI
modelType.value = type
bookingModelvisible.value = true
}
})
}
modelType.value = type
bookingModelvisible.value = true
} else if (['vgm', 'paper'].includes(type)) {
openDialog(type)
} else if (type === 'trace') {
@ -1291,7 +1268,7 @@
}
bookingModelFrom.send = type === 'send'
bookingModelFrom.orderNo = props.details.mblno
bookingModelFrom.id = route.query.id
bookingModelFrom.id = props.id
if (type == 'save') {
// EDI
EDISloading.value = true
@ -1383,7 +1360,7 @@
return createMessage.warning('请选择船公司!')
}
const query = {
businessId: route.query.id,
businessId: props.id,
mblno: props.details.mblno,
yard: traceForm.traceValue.includes('1') ? props.details.yard : '',
yardCode: traceForm.traceValue.includes('1') ? props.details.yardId : '',
@ -1784,7 +1761,7 @@
// this.$message.error('')
// return false
// }
if (!route.query.id) {
if (!props.id) {
notification.error({ message: '请先保存订单', duration: 3 })
return false
}
@ -1824,7 +1801,7 @@
EDISloading.value = false
EDIUloading.value = false
Object.assign(bookingModelFrom, {
id: route.query.id,
id: props.id,
orderNo: props.details.mblno,
useForwarderCode: false,
forwarderCode: '',
@ -1864,7 +1841,7 @@
const telxLoad = ref(false)
function handleSubmitTelex() {
telxLoad.value = true
SubmitTelex({ ids: [route.query.id] }).then((res) => {
SubmitTelex({ ids: [props.id] }).then((res) => {
if (res.succeeded) {
if (res.data[0].isSuccess) {
notification.success({ message: '提交成功', duration: 3 })

Loading…
Cancel
Save