lijingjia 3 weeks ago
commit d16461897c

@ -22,14 +22,14 @@
<Checkbox v-model:checked="checkIndex" @change="handleIndexCheckChange">
{{ t('component.table.settingIndexColumnShow') }}
</Checkbox>
<Checkbox
<!-- 暂时隐藏 默认所有的表格都带着勾选列 -->
<!-- <Checkbox
v-model:checked="checkSelect"
:disabled="!defaultRowSelection"
@change="handleSelectCheckChange"
>
{{ t('component.table.settingSelectColumnShow') }}
</Checkbox>
</Checkbox> -->
<a-button size="small" type="link" @click="reset">
{{ t('common.resetText') }}
@ -299,7 +299,10 @@
columns = [...columns, ...columns2]
}
table.setProps({
rowSelection: JSON.parse(res.data.content).rowSelection ? defaultRowSelection : undefined,
rowSelection: {
type:'checkbox',
fixed: true,
},
})
table.setProps({
showIndexColumn: JSON.parse(res.data.content).showIndexColumn,

@ -51,6 +51,7 @@
const table = useTableContext()
const getSetting = computed((): TableSetting => {
console.log(props.setting,123313)
return {
redo: true,
size: true,

@ -31,6 +31,14 @@
<span class="iconfont icon-Excel"></span>
导出待上线
</a-button>
<a-button type="link" class="pl0" @click="BatchUp">
<span class="iconfont icon-tidanqianru"></span>
批量上线
</a-button>
<a-button type="link" class="pl0" @click="BatchUnder">
<span class="iconfont icon-tidanqianchu"></span>
批量下线
</a-button>
<!-- <a-button type="link" @click="handleSave(false)" class="pl0">
<span class="iconfont icon-baocun" v-repeat></span>
保存
@ -122,7 +130,7 @@
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema, InfoColumns } from './columns'
import { ApiEdit, ApiInfo, ApiDelDetail, ApiImport, ApiGetDSX } from './api'
import { ApiEdit, ApiInfo, ApiDelDetail, ApiImport } from './api'
import { ApiDealExcel } from '/@/views/ContainerManagement/RentIn/api'
import { ExportExcelByColumn } from '/@/api/common'
//
@ -608,23 +616,25 @@
})
}
}
async function derivedExcel() {
// let ids: any = []
// list.value.forEach((e: any, i) => {
// if (e.selected) {
// if (e.id) {
// console.log(BigInt(e.id))
function BatchUp() {
list.value.forEach((e: any, i) => {
if (e.selected) {
console.log(isOnlineDict.value)
// ids.push(e.id)
// }
// }
// })
// if (ids.length) {
// const res = await ApiGetDSX({ ids: ids })
// if (res.succeeded) {
// console.log(res)
// }
// } else {
e.isOnlineId = 1
e.isOnline = '上线'
}
})
}
function BatchUnder() {
list.value.forEach((e: any, i) => {
if (e.selected) {
e.isOnlineId = -1
e.isOnline = '下线'
}
})
}
async function derivedExcel() {
let ApiData: any = {
columnSets: [],
jsonDataStr: [],
@ -659,6 +669,5 @@
document.body.appendChild(link)
link.click()
})
// }
}
</script>

@ -8,6 +8,12 @@ export const columns: BasicColumn[] = [
sorter: true,
width: 150,
},
{
title: '待上线明细',
dataIndex: 'dsx',
sorter: true,
width: 100,
},
{
title: '导入人',
dataIndex: 'createUserName',

@ -17,6 +17,10 @@
删除
</a-button>
</a-popconfirm>
<a-button type="link" @click="derivedExcel">
<span class="iconfont icon-Excel"></span>
导出待上线
</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
@ -38,7 +42,8 @@
<script lang="ts" setup>
import { ref } from 'vue'
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
import { ApiList, ApiDel } from './api'
import { ApiList, ApiDel, ApiGetDSX } from './api'
import { ExportExcelByColumn } from '/@/api/common'
import { useModal } from '/@/components/Modal'
import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema } from './columns'
@ -109,6 +114,147 @@
reload()
})
}
const DSXcolumns = [
{
title: '箱号',
width: 120,
data: 'cntrno',
readOnly: false,
},
{
title: '箱型',
width: 120,
data: 'ctnall',
},
{
title: '箱来源',
width: 120,
data: 'ctnSource',
},
{
title: '是否上线',
width: 120,
data: 'isOnline',
type: 'dropdown',
readOnly: false,
},
{
title: '识别备注',
width: 200,
data: 'dealRemark',
},
{
title: '箱流转状态',
width: 120,
data: 'ctnFlowState',
},
{
title: '状态日期',
width: 120,
data: 'changeTime',
},
{
title: '当前箱业务状态',
width: 120,
data: 'ctnBizState',
},
{
title: '关联合同号',
width: 120,
data: 'ctnReleaseNo',
},
{
title: '当前港口',
width: 120,
data: 'port',
},
{
title: '始发港',
width: 120,
data: 'portLoad',
},
{
title: '目的港',
width: 120,
data: 'portDelivery',
},
{
title: '预抵港',
width: 120,
data: 'portDischarge',
},
{
title: '场站/码头',
width: 120,
data: 'depot',
},
{
title: '船名',
width: 120,
data: 'vessel',
},
{
title: '航次',
width: 120,
data: 'voyno',
},
{
title: '业务编号',
width: 120,
data: 'mblno',
},
{
title: '备注',
width: 120,
data: 'remark',
},
]
function derivedExcel() {
const select = getSelectRows()
let ApiData: any = {
ids: [],
}
if (select.length === 0) {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
return false
} else {
ApiData.ids = select.map((item) => {
return item.id
})
}
ApiGetDSX(ApiData).then((res) => {
console.log(res.data)
let ApiData: any = {
columnSets: [],
jsonDataStr: [],
}
DSXcolumns.forEach((item, index) => {
ApiData.columnSets.push({
title: item.title,
enTitle: item.data,
dataIndex: item.data,
visible: true,
})
})
ApiData.jsonDataStr = JSON.stringify(res.data)
ExportExcelByColumn(ApiData).then((res) => {
const xlsUrl = window.URL.createObjectURL(
new Blob([res], {
type: 'application/vnd.ms-excel;charset=utf-8',
}),
)
const fname = '待上线数据'
const link = document.createElement('a')
link.href = xlsUrl
link.setAttribute('download', fname)
document.body.appendChild(link)
link.click()
})
})
}
function handleAudit(record) {
openModal(true, {
record,

@ -3,8 +3,8 @@
<a-modal width="1600px" @cancel="open = false" :visible="open" title="添加发票申请明细" :footer="null">
<div style="padding-bottom:5px ;">
<div>
<BasicTable class="ds-table" :row-selection="{ onChange: onSelectChange }"
:rowClassName="rowClassName" @row-click="handleClick" @register="registerTable" @row-dbClick="(e) => {
<BasicTable class="ds-table" @selection-change="onSelectChange" :rowClassName="rowClassName"
@row-click="handleClick" @register="registerTable" @row-dbClick="(e) => {
GoDetailed(true, e)
}
">
@ -41,13 +41,6 @@
<div>
<div class="bold">申请开票明细</div>
<div style="display: flex;">
<div class="apply" :class="{ active: form.isRMB }">
<a-checkbox @change="handleChangeApply1"
:disabled="route.query.id ? true : false"
v-model:checked="form.isRMB">折算人民币申请</a-checkbox>
<span class="rmb" v-if="totalRmb != 0">{{ totalRmb }} RMB</span>
<span></span>
</div>
<div class="apply" :class="{ active: form.isYB }">
<a-checkbox :disabled="route.query.id ? true : false"
v-model:checked="form.isYB" @change="handleChangeApply">
@ -58,6 +51,13 @@
item.currency }}</span>
</a-checkbox>
</div>
<div class="apply" :class="{ active: form.isRMB }">
<a-checkbox @change="handleChangeApply1"
:disabled="route.query.id ? true : false"
v-model:checked="form.isRMB">折算人民币申请</a-checkbox>
<span class="rmb" v-if="totalRmb != 0">{{ totalRmb }} RMB</span>
<span></span>
</div>
</div>
<div>
<span class="bold">发票申请明细</span>
@ -103,18 +103,16 @@
<span class="bold" style="margin-right: 10px;width:66px;display: inline-block">1{{ item.currencyTo
}}
=</span>
<a-input-number addon-after="RMB" :precision="4" size="small" :controls="false"
<a-input-number @change="changeRmb(1,index)" addon-after="RMB" :precision="4" size="small" :controls="false"
v-model:value="item.reverseRate" />
</div>
<div>
<span class="bold" style="margin-right: 10px;width:66px;display: inline-block">1RMB =</span>
<a-input-number :addon-after="item.currencyTo" :precision="4" size="small" :controls="false"
<a-input-number @change="changeRmb(2,index)" :addon-after="item.currencyTo" :precision="4" size="small" :controls="false"
v-model:value="item.rate" />
</div>
</div>
</a-modal>
</div>
</template>
@ -231,6 +229,9 @@ const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, ge
labelWidth: 120,
schemas: detailSearchFormSchema,
},
rowSelection: {//
type: 'checkbox',
},
useSearchForm: true,
showIndexColumn: false,
maxHeight: 450,
@ -267,14 +268,22 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
const exchangeFlag = ref(false)
const loading = ref(false)
const form = ref({
isYB: false,
isRMB: true
isYB: true,
isRMB: false
}) as any
function handleChangeApply(e) {
form.value.isRMB = !e.target.checked
totalRmb.value = 0
onSelectAmount()
}
function changeRmb(type,index){
if(type==1){
exchangeData.value[index].rate = (1/exchangeData.value[index].reverseRate).toFixed(4)
}
if(type==2){
exchangeData.value[index].reverseRate = (1/exchangeData.value[index].rate).toFixed(4)
}
}
const exchangeData = ref({}) as any
//
function handleChangeApply1(e) {
@ -393,9 +402,11 @@ function handleSureExhange() {
}
const activeRow = ref(null)
//
function handleClick(record, index) {
setSelectedRowKeys([index])
activeRow.value = index
function handleClick(record, index,type) {
if(type!='select'){
setSelectedRowKeys([index])
activeRow.value = index
}
const queryDataStr = JSON.parse(queryData.value.queryCondition)
const arr = [] as any
queryDataStr.forEach(item => {
@ -443,7 +454,11 @@ function rowClassName(record, index) {
function init(data) {
open.value = true
setTimeout(() => {
setProps({
rowSelection: {
onChange: onSelectAmount
},
})
setPropsFee({
rowSelection: {
onChange: onSelectAmount
@ -462,33 +477,21 @@ function init(data) {
form.value.isYB = true
form.value.isRMB = false
}
watch(
() => getSelectRows(),
(data) => {
console.log(data)
onSelectChange(data)
},
{ immediate: false, deep: true }
)
}, 500)
}
const rmbTotal = ref(0)
const usdTotal = ref(0)
const otherTotal = ref(0)
function onSelectChange(selectedRowKeys) {
const list = getRawDataSource()
function onSelectChange({ keys, rows }) {
rmbTotal.value = 0
usdTotal.value = 0
otherTotal.value = 0
list.forEach(item => {
selectedRowKeys.forEach(ite => {
if (item.id == ite.id) {
rmbTotal.value += Number(item.unBilledRMB)
usdTotal.value += Number(item.unBilledUSD)
otherTotal.value += Number(item.unBilledOther)
}
})
rows.forEach(item => {
rmbTotal.value += Number(item.unBilledRMB)
usdTotal.value += Number(item.unBilledUSD)
otherTotal.value += Number(item.unBilledOther)
})
handleClick(rows[rows.length-1],rows.length,'select')
}
const emits = defineEmits(['updateList', 'addLeft'])
//

@ -269,13 +269,13 @@ const columns = [
type: 'numeric',
format: '0.00',
},
{
title: '不含税单价',
width: 150,
data: 'unitPrice',
type: 'numeric',
readOnly: true,
},
// {
// title: '',
// width: 150,
// data: 'unitPrice',
// type: 'numeric',
// readOnly: true,
// },
{
title: '金额',
width: 150,

@ -431,7 +431,7 @@ const EditBankForm = [
]
const markFormS = [
{
field: 'invoiceRemark',
field: 'note',
label: '开票要求',
component: 'InputTextArea',
colProps: { span: 12 },
@ -442,7 +442,7 @@ const markFormS = [
},
},
{
field: 'note',
field: 'invoiceRemark',
label: '',
component: 'InputTextArea',
colProps: { span: 12 },
@ -831,6 +831,9 @@ function openTemp() {
tempList.value.forEach((item) => {
item.value = item.name
})
tempName.value = res.data[0].name
tempId.value = res.data[0].id
tempContent.value = res.data[0].content
})
}
function handleApply() {
@ -1140,24 +1143,30 @@ function addLeftSave(arr, query, exchang, type) {
}
const tempNameId = ref('')
function handleRender() {
let temp = ''
let temp = null
tempList.value.forEach((item) => {
if (item.id == tempNameId.value) {
temp = item.content
}
})
const data = {
id: id.value,
template: temp,
}
RenderTemplate(data).then((res) => {
if (res.succeeded) {
marksetFieldsValue({
note: res.data
})
nameFlag.value = false
if (temp != null && temp != '') {
const data = {
id: id.value,
template: temp ? temp : null,
}
})
RenderTemplate(data).then((res) => {
if (res.succeeded) {
marksetFieldsValue({
invoiceRemark: res.data
})
nameFlag.value = false
}
})
} else {
createMessage.warning('模板暂未内容')
return false
}
}
function mergeByCurrency(arr) {
const result = {};

@ -29,10 +29,25 @@
<div>
<div>
<span class="bold">发票申请</span>
<a-button v-repeat type="link" @click="addDetailed()">
<!-- <a-button v-repeat type="link" @click="addDetailed()">
<span class="iconfont icon-jia"></span>
添加申请明细
</a-button>
</a-button> -->
<a-dropdown>
<template #overlay>
<a-menu>
<a-menu-item @click="addDetailed('all')"></a-menu-item>
<a-menu-item @click="addDetailed('rmb')">RMB</a-menu-item>
<a-menu-item @click="addDetailed('usd')">USD</a-menu-item>
</a-menu>
</template>
<a-button class="ml15" type="link">
<span class="iconfont icon-zengjiatianjiajiajian"
:style="{ fontSize: '12px' }"></span>
添加申请明细
<span class="iconfont icon-30jiantouxiangxiafill"></span>
</a-button>
</a-dropdown>
</div>
</div>
@ -43,16 +58,16 @@
<span v-if="record.businessType == 1"></span>
</template>
<template v-if="column.dataIndex == 'amountRMB'">
<a-input-number :disabled="record.amountRMB == null" :precision="2" size="small"
<a-input-number :disabled="record.amountRMBTotal == null" :precision="2" size="small"
:controls="false" :max="record.amountRMBTotal" v-model:value="record.amountRMB" />
</template>
<template v-if="column.dataIndex == 'amountOther'">
<a-input-number :disabled="record.amountOther == null" :precision="2" size="small"
<a-input-number :disabled="record.amountOtherTotal == null" :precision="2" size="small"
:controls="false" :max="record.amountOtherTotal"
v-model:value="record.amountOther" />
</template>
<template v-if="column.dataIndex == 'amountUSD'">
<a-input-number :disabled="record.amountUSD == null" :precision="2" size="small"
<a-input-number :disabled="record.amountUSDTotal == null" :precision="2" size="small"
:controls="false" :max="record.amountUSDTotal" v-model:value="record.amountUSD" />
</template>
</template>
@ -551,7 +566,7 @@ function handleSureExhange() {
})
freeFlag.value = false
exchangeFlag.value = false
emits('updateListFreeLeft', currenciesData.value,arrQuery)
emits('updateListFreeLeft', currenciesData.value, arrQuery)
}
if (freeType.value == 'right') {
let arr = [] as any
@ -697,7 +712,7 @@ function mergeByCurrency(arr) {
const applications = ref([]) as any
const exchangarr = ref([]) as any
//
function addDetailed() {
function addDetailed(type) {
const arrRight = getSelectRows() ? getSelectRows() : []
const arr0 = []
arrRight.forEach(item => {
@ -729,16 +744,39 @@ function addDetailed() {
}
if (item.currency) {
const arr = item.currency.split(' ')
arr.forEach(ite => {
applications.value.push({
amountOther: item.amountOther,
amountRMB: item.amountRMB,
amountUSD: item.amountUSD,
applicationId: item.id,
currency: ite,
exchangeRate: 0
if (type == 'all') {
arr.forEach(ite => {
applications.value.push({
amountOther: item.amountOther,
amountRMB: item.amountRMB,
amountUSD: item.amountUSD,
applicationId: item.id,
currency: ite,
exchangeRate: 0
})
})
})
}
if (type == 'rmb') {
arr.forEach(ite => {
applications.value.push({
amountRMB: item.amountRMB,
applicationId: item.id,
currency: ite,
exchangeRate: 0
})
})
}
if (type == 'usd') {
arr.forEach(ite => {
applications.value.push({
amountUSD: item.amountUSD,
applicationId: item.id,
currency: ite,
exchangeRate: 0
})
})
}
}
})
const currencySet = new Set();

@ -1223,13 +1223,13 @@ const columns = [
type: 'numeric',
format: '0.00',
},
{
title: '不含税单价',
width: 100,
data: 'unitPrice',
type: 'numeric',
readOnly: true,
},
// {
// title: '',
// width: 100,
// data: 'unitPrice',
// type: 'numeric',
// readOnly: true,
// },
{
title: '金额',
width: 80,

Loading…
Cancel
Save