sunzehua 5 months ago
commit cd3d00ae99

@ -67,7 +67,7 @@ enum Api {
GetFeeCodeSelectList = '/mainApi/ClientCommon/GetFeeCodeSelectList',
// 获取箱型下拉数据
GetCtnSelectList = '/mainApi/ClientCommon/GetCtnSelectList',
// 保证类型下拉数据
// 包装类型下拉数据
GetPackageSelectList = '/mainApi/ClientCommon/GetPackageSelectList',
// 签约方式下拉数据
GetIssueTypeSelectList = '/mainApi/ClientCommon/GetIssueTypeSelectList',

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -165,9 +165,8 @@
.ds-action-bar {
position: fixed;
right: 30px;
height: auto;
z-index: 99;
z-index: 999;
cursor: pointer;
width: 52px;
opacity: 1;

@ -6,45 +6,63 @@
<template>
<div>
<a-modal
class="ds-form-detail ds-print"
class="ds-form-detail ds-print ds-modal-small"
v-model:visible="visible"
v-if="visible"
title="打印"
width="600px"
width="850px"
:maskClosable="false"
>
<a-spin :spinning="loading">
<a-form
ref="fileForm"
name="basic"
layout="vertical"
autocomplete="off"
>
<a-form-item
label="打印格式"
<div>
<a-form
layout="vertical"
autocomplete="off"
class="ant-form-small"
>
<a-radio-group v-model:value="type">
<a-radio value="1">.pdf</a-radio>
<a-radio value="2">.xlsx</a-radio>
<a-radio value="3">.docx</a-radio>
</a-radio-group>
<p class="message">默认打印格式为pdf,如需其他格式请选择</p>
</a-form-item>
<a-spin :spinning="loading">
<a-form-item
label="点击选择模版将跳转打印预览页"
>
<a-row :gutter="15">
<a-col :span="12" v-for="item in modelData" :key="item.id" @click="toPrint(item.id)">
<div class="model-card">
<span class="iconfont icon-printing" :style="{ fontSize: '13px' }"></span>
{{ item.templateName }}
</div>
</a-col>
</a-row>
</a-form-item>
</a-spin>
</a-form>
<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>
@ -64,6 +82,8 @@
default: null
}
})
//
const name = ref()
//
const visible = ref(false)
const loading = ref(false)
@ -73,6 +93,8 @@
const modelData = ref([])
//
const jsonDataStr = ref()
//
const sourceData = ref([])
// (list)
const init = (v) => {
visible.value = true
@ -80,12 +102,26 @@
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
}
@ -95,18 +131,24 @@
}
//
const toPrint = (id) => {
const toPrint = (id, type, name) => {
const postData = {
jsonDataStr: jsonDataStr.value,
printType: Number(type.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}`
window.open(fileURL)
if (type == 1) {
window.open(fileURL)
} else {
window.open(`//60.209.125.238:3009/PrintTempFile/${res.data}`, '_blank')
}
}
})
}
@ -121,17 +163,55 @@
font-size: 12px;
color: #f05;
}
.tem-name {
font-size: 12px;
color: #7A8798;
}
.ant-spin-container {
min-height: 270;
}
.model-card {
padding: 10px;
background: #eff6f5;
cursor: pointer;
border-radius: 5px;
background: #F5F9FC;
border-radius: 2px;
border-left: 1px solid #257AFA;
display: flex;
justify-content: space-between;
align-items: center;
}
.ant-modal-footer {
display: none;
}
.model-card:hover {
color: #4A54FF;
.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>

@ -97,6 +97,9 @@
width: 100%;
font-size: 12px!important;
}
.ant-btn {
height: 26px;
}
}
.ant-col-5 {

@ -24,7 +24,7 @@ import {
GetCodeCountryList
} from '/@/views/operation/seaexport/api/BookingLedger'
import { getList } from '/@/views/flowcenter/flowInstances/api'
import { GetFeeCurrencySelectList, GetClientListByCode } from '/@/api/common/index'
import { GetFeeCurrencySelectList, GetClientListByCode, GetCtnSelectList } from '/@/api/common/index'
import { getClientBankList } from '/@/views/baseinfo/infoclient/api'
export default {
// 业务来源
@ -141,19 +141,25 @@ export default {
return res.data
})
},
//派车调度人员
// 派车调度人员
GetDispatcherList: () => {
return GetDispatcherList().then((res) => {
return res.data
})
},
//工厂信息
// 工厂信息
GetFactorySelectList: () => {
return GetFactorySelectList().then((res) => {
return res.data
})
},
//国家
// 箱型
GetCtnSelectList: () => {
return GetCtnSelectList().then((res) => {
return res.data
})
},
// 国家
GetCodeCountryList: () => {
return GetCodeCountryList().then((res) => {
return res.data

@ -51,9 +51,11 @@ export const useOptionsStore = defineStore({
// 银行信息
getClientBankList: null,
// 派车调度人员
GetDispatcherList:null,
GetDispatcherList: null,
// 工厂
GetFactorySelectList:null
GetFactorySelectList: null,
// 箱型
GetCtnSelectList: null
}),
getters: {
// 通过code获取下拉字典code)就是接口尾部单词

@ -168,6 +168,12 @@ h5 {
.mt15 {
margin-top: 15px;
}
.mb15 {
margin-bottom: 15px;
}
.ml15 {
margin-left: 15px;
}
// 使
.ds-green-tag,

@ -6,26 +6,153 @@
<template>
<div class="ds-sea-container-info">
<div class="flex">
<h4>集装箱信息</h4>
<a-button type="link" @click="addRow">
<span class="iconfont icon-icon_tianjia"></span>
添加
</a-button>
<a-popconfirm
:visible="deleteFlag"
title="确定要删除勾选的数据?"
ok-text="确定"
cancel-text="取消"
@confirm="deleteRow"
@cancel="cancelDelete"
@click="checkDelete"
>
<a-button danger type="link" >
<span class="iconfont icon-shanchu1"></span>
删除
</a-button>
</a-popconfirm>
<a-button type="link">
<span class="iconfont icon-refresh-1-copy"></span>
更新合计
</a-button>
<a-button type="link">
<span class="iconfont icon-a-17Btuichu"></span>
调入主单信息
</a-button>
</div>
<hot-table ref="hotTb" :data="list" :settings="settings"></hot-table>
</div>
</template>
<script lang="ts" setup>
import { ref, reactive, defineProps } from 'vue'
import { GetSeaExportBillManageList } from '../../api/BookingLedger'
import { ref, nextTick, defineProps, defineComponent, onMounted } from 'vue'
import { HotTable } from '@handsontable/vue3'
import { registerAllModules } from 'handsontable/registry'
import 'handsontable/dist/handsontable.full.min.css'
import { GetCtnSelectList, GetPackageSelectList } from '/@/api/common'
//
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
defineComponent({
HotTable,
})
const props = defineProps({
id: {
type: String
}
})
// ref
const hotTb = ref(null)
//
let ctnList = []
//
let packageList = []
//
const columns = [
{
data: 'selected',
type: 'checkbox',
title: ' ',
width: 32,
className: 'htCenter',
readOnly: false,
},
{
title: '箱型',
width: 80,
data: 'ctn',
type: 'dropdown',
source: async (query, process) => {
const results = await GetCtnSelectList()
ctnList = results.data
const dict = results.data.map((item) => {
return item.ctnName
})
process(dict)
},
},
{
title: '箱量',
width: 80,
data: 'ctnNum',
type: 'numeric',
},
{
title: '箱号',
width: 80,
data: 'cntrNo',
type: 'numeric',
},
{
title: '封号',
width: 80,
data: 'sealNo',
type: 'numeric',
},
{
title: '件数',
width: 80,
data: 'pkgs',
type: 'numeric',
},
{
title: '件数包装',
width: 80,
data: 'kindPkgsName',
type: 'dropdown',
source: async (query, process) => {
const results = await GetPackageSelectList()
packageList = results.data
const dict = results.data.map((item) => {
return item.packageName
})
process(dict)
},
},
{
title: '重量',
width: 80,
data: 'kgs',
type: 'numeric'
},
{
title: '尺码',
width: 80,
data: 'cbm',
type: 'numeric'
},
{
title: '箱皮重',
width: 80,
data: 'tareWeight',
type: 'numeric'
},
{
title: '备注',
width: 80,
data: 'note',
type: 'numeric'
},
]
//
const list = ref([])
//
const settings = {
//
const settings = {
height: '600',
width: '100%',
autoWrapRow: true,
autoWrapCol: true,
@ -50,156 +177,98 @@
if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') {
let dict = {}
changes.forEach((res) => {
//
if (res[1] === 'feeName') {
//
const item = feeDict.value.filter((item) => {
return changes[0][3].includes(item.name)
//
if (changes[0][1] === 'ctn') {
const item = ctnList.filter((item) => {
return item.ctn === changes[0][3]
})
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']
list.value[res[0]]['unit'] = dict['defaultUnit']
list.value[res[0]]['customerTypeText'] = dict['defaultDebitName']
list.value[res[0]]['customerType'] = dict['defaultDebit']
list.value[res[0]]['isOpen'] = dict['isOpen']
list.value[res[0]]['isAdvancedPay'] = dict['isAdvancedPay']
list.value[res[0]]['isInvoice'] = dict['isInvoice']
list.value[res[0]]['feeFrt'] = dict['feeFrt']
list.value[res[0]]['feeCode'] = dict['code']
list.value[res[0]]['taxRate'] = dict['taxRate']
list.value[changes[0][0]]['ctnId'] = dict?.id
}
})
//
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]
}
//
if (changes[0][1] === 'customerTypeText') {
getDictOption('djy_cust_prop').then((res) => {
const item = res.filter((item) => {
return changes[0][3].includes(item.name)
//
if (changes[0][1] === 'kindPkgsName') {
const item = ctnList.filter((item) => {
return item.packageName === changes[0][3]
})
if (item) dict = item[0]
list.value[changes[0][0]]['customerType'] = dict?.value
list.value[changes[0][0]]['customerTypeText'] = changes[0][3].split('-')[1]
//
console.log(props.details)
GetClientSelectInfoByCode({ code: dict?.value, businessId: props.id, businessType: props.type }).then(res => {
list.value[changes[0][0]]['customerCode'] = res.data.clientId
list.value[changes[0][0]]['customerName'] = res.data.clientName
})
})
}
//
if (changes[0][1] === 'unitText') {
const item = unitDict.value.filter((item) => {
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]
GetUnitSelectInfo({ code: dict?.value, businessId: props.id, businessType: props.type }).then(res => {
list.value[changes[0][0]]['quantity'] = res.data.quantity
})
//
// 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') {
const item = currencyDict.value.filter((item) => {
return item.name === changes[0][3]
list.value[changes[0][0]]['kindPkgs'] = dict?.ediCode
}
})
}
}
}
const row = {
selected: false,
ctn: '',
ctnId: '',
id: '',
ctnNum: '',
cntrNo: '',
sealNo: '',
pkgs: '',
kindPkgs: '',
kindPkgsName: '',
kgs: '',
cbm: '',
tareWeight: '',
note: ''
}
//
const addRow = () => {
const deepCopyRow = JSON.parse(JSON.stringify(row))
list.value.push(deepCopyRow)
}
//
const deleteFlag = ref(false)
//
const checkDelete = () => {
let flag = false
list.value.forEach(item => {
if (item.selected) flag = true
})
if (!flag) {
return createMessage.warning('请勾选要删除的数据!')
}
deleteFlag.value = true
}
//
const deleteRow = () => {
const res = list.value.filter(item => {
return !item.selected
})
deleteFlag.value = false
hotTb.value.hotInstance.loadData(res)
}
//
const cancelDelete = () => {
deleteFlag.value = false
}
onMounted(() => {
const hot = hotTb.value.hotInstance
hot.addHook('afterOnCellMouseDown', function (event, coords, TD) {})
//
hot.addHook('beforeKeyDown', function (event) {
// 'Enter'
if (event.key === 'ArrowDown') {
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)
})
if (item) dict = item[0]
list.value[changes[0][0]]['currency'] = dict?.codeName
}
//
const index = changes[0][0]
//
if (changes[0][1] === 'noTaxPrice') {
//
list.value[index].unitPrice = Number(
(changes[0][3] || 0) * ((list.value[index].taxRate || 0) / 100 + 1),
).toFixed(6)
//
list.value[index].amount = Number(
(list.value[index].unitPrice || 0) * (list.value[index].quantity || 0),
).toFixed(6)
//
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 = Number(
(changes[0][3] || 0) / ((list.value[index].taxRate || 0) / 100 + 1),
).toFixed(6)
//
list.value[index].amount = Number(
(changes[0][3] || 0) * (list.value[index].quantity || 0),
).toFixed(6)
//
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 = Number(
(changes[0][3] || 0) * (list.value[index].unitPrice || 0),
).toFixed(6)
//
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 = Number(
(list.value[index].unitPrice || 0) / ((changes[0][3] || 0) / 100 + 1),
).toFixed(6)
//
list.value[index].noTaxAmount = Number(
(list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0),
).toFixed(6)
return false
}
}
},
}
})
})
</script>
<style lang="less" scoped>
.ds-sea-container-info {
.flex {
align-items: center;
h4 {
margin: 0 15px 0 0;
}
}
}
</style>

@ -22,9 +22,12 @@
<a-tab-pane key="1" tab="提单信息" size="small">
<div class="flex">
<!-- 收发通表单 -->
<BasicForm @register="registerForm" />
<BasicForm style="flex: 1;" @register="registerForm" />
<!-- 集装箱组件 -->
<container
class="ml15"
style="width: 700px;"
></container>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="其他信息" size="small">
@ -39,6 +42,7 @@
import { BasicForm, useForm } from '/@/components/Form/index'
import { GetSeaExportBillManageList } from '../../api/BookingLedger'
import { formSchema1 } from './ladingInfo'
import container from './container.vue'
const props = defineProps({
id: {
type: String

Loading…
Cancel
Save