lijingjia 4 weeks ago
commit d16461897c

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

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

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

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

@ -17,6 +17,10 @@
删除 删除
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>
<a-button type="link" @click="derivedExcel">
<span class="iconfont icon-Excel"></span>
导出待上线
</a-button>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
@ -38,7 +42,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue' import { ref } from 'vue'
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table' 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 { useModal } from '/@/components/Modal'
import TenantAuditStepModal from './TenantAuditStepModal.vue' import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema } from './columns' import { columns, searchFormSchema } from './columns'
@ -109,6 +114,147 @@
reload() 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) { function handleAudit(record) {
openModal(true, { openModal(true, {
record, record,

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

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

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

@ -29,10 +29,25 @@
<div> <div>
<div> <div>
<span class="bold">发票申请</span> <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> <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>
</div> </div>
@ -43,16 +58,16 @@
<span v-if="record.businessType == 1"></span> <span v-if="record.businessType == 1"></span>
</template> </template>
<template v-if="column.dataIndex == 'amountRMB'"> <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" /> :controls="false" :max="record.amountRMBTotal" v-model:value="record.amountRMB" />
</template> </template>
<template v-if="column.dataIndex == 'amountOther'"> <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" :controls="false" :max="record.amountOtherTotal"
v-model:value="record.amountOther" /> v-model:value="record.amountOther" />
</template> </template>
<template v-if="column.dataIndex == 'amountUSD'"> <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" /> :controls="false" :max="record.amountUSDTotal" v-model:value="record.amountUSD" />
</template> </template>
</template> </template>
@ -551,7 +566,7 @@ function handleSureExhange() {
}) })
freeFlag.value = false freeFlag.value = false
exchangeFlag.value = false exchangeFlag.value = false
emits('updateListFreeLeft', currenciesData.value,arrQuery) emits('updateListFreeLeft', currenciesData.value, arrQuery)
} }
if (freeType.value == 'right') { if (freeType.value == 'right') {
let arr = [] as any let arr = [] as any
@ -697,7 +712,7 @@ function mergeByCurrency(arr) {
const applications = ref([]) as any const applications = ref([]) as any
const exchangarr = ref([]) as any const exchangarr = ref([]) as any
// //
function addDetailed() { function addDetailed(type) {
const arrRight = getSelectRows() ? getSelectRows() : [] const arrRight = getSelectRows() ? getSelectRows() : []
const arr0 = [] const arr0 = []
arrRight.forEach(item => { arrRight.forEach(item => {
@ -729,16 +744,39 @@ function addDetailed() {
} }
if (item.currency) { if (item.currency) {
const arr = item.currency.split(' ') const arr = item.currency.split(' ')
arr.forEach(ite => { if (type == 'all') {
applications.value.push({ arr.forEach(ite => {
amountOther: item.amountOther, applications.value.push({
amountRMB: item.amountRMB, amountOther: item.amountOther,
amountUSD: item.amountUSD, amountRMB: item.amountRMB,
applicationId: item.id, amountUSD: item.amountUSD,
currency: ite, applicationId: item.id,
exchangeRate: 0 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(); const currencySet = new Set();

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

Loading…
Cancel
Save