feature-JimuReport-1106-yjl
lijingjia 1 month ago
commit a491491a46

@ -50,7 +50,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'cntrno',
label: '箱号',
component: 'Input',
colProps: { span: 4 },
colProps: { span: 8 },
},
{
field: 'ctnCode',

@ -33,7 +33,18 @@
})
},
beforeFetch: (p) => {
return formatParams(p, ['ctnCode'])
let Rdata = formatParams(p, ['ctnCode'])
if (!!p.cntrno) {
let data = JSON.parse(Rdata.queryCondition)
data.forEach((item, index) => {
if (item.FieldName == 'cntrno') {
console.log(item)
item.ConditionalType = 15
}
})
Rdata.queryCondition = JSON.stringify(data)
}
return Rdata
},
columns,
formConfig: {

@ -48,12 +48,12 @@ export const columns: BasicColumn[] = [
sorter: true,
width: 200,
},
{
title: '所属分部',
dataIndex: 'orgid',
sorter: true,
width: 200,
},
// {
// title: '所属分部',
// dataIndex: 'orgid',
// sorter: true,
// width: 200,
// },
{
title: '箱来源',
dataIndex: 'ctnSource',
@ -310,12 +310,12 @@ export const searchFormSchema: FormSchema[] = [
allowClear: true,
},
},
{
field: 'ctnReleaseNo',
label: '关联合同号',
component: 'Input',
colProps: { span: 4 },
},
// {
// field: 'ctnReleaseNo',
// label: '关联合同号',
// component: 'Input',
// colProps: { span: 4 },
// },
{
field: 'remark',

@ -161,17 +161,18 @@ export const columns: BasicColumn[] = [
export const searchFormSchema: FormSchema[] = [
{
field: 'billno',
label: '业务号',
field: 'cntrnoAll',
label: '箱号',
component: 'Input',
colProps: { span: 4 },
colProps: { span: 8 },
},
{
field: 'cntrnoAll',
label: '箱号',
field: 'billno',
label: '业务号',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'oldContainerOwner',
label: '原箱主',

@ -146,17 +146,18 @@ export const columns: BasicColumn[] = [
export const searchFormSchema: FormSchema[] = [
{
field: 'billno',
label: '业务号',
field: 'cntrnoAll',
label: '箱号',
component: 'Input',
colProps: { span: 4 },
colProps: { span: 8 },
},
{
field: 'cntrnoAll',
label: '箱号',
field: 'billno',
label: '业务号',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'rentCustomerName',
label: '租箱客户',

@ -150,17 +150,18 @@ export const columns: BasicColumn[] = [
export const searchFormSchema: FormSchema[] = [
{
field: 'billno',
label: '业务号',
field: 'cntrnoAll',
label: '箱号',
component: 'Input',
colProps: { span: 4 },
colProps: { span: 8 },
},
{
field: 'cntrnoAll',
label: '箱号',
field: 'billno',
label: '业务号',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'oldContainerOwner',
label: '原箱主',
@ -401,7 +402,7 @@ export const formSchema: FormSchema[] = [
field: 'oldContainerOwner',
label: '原箱主',
component: 'ApiSelect',
required: false,
required: true,
dynamicDisabled: false,
colProps: { span: 6 },
componentProps: ({ formModel }) => {

@ -170,17 +170,18 @@ export const columns: BasicColumn[] = [
export const searchFormSchema: FormSchema[] = [
{
field: 'billno',
label: '业务号',
field: 'cntrnoAll',
label: '箱号',
component: 'Input',
colProps: { span: 4 },
colProps: { span: 8 },
},
{
field: 'cntrnoAll',
label: '箱号',
field: 'billno',
label: '业务号',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'rentCustomerName',
label: '租箱客户',

@ -110,7 +110,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'cntrno',
label: '箱号',
component: 'Input',
colProps: { span: 4 },
colProps: { span: 8 },
},
{
field: 'ctnBizState',

@ -43,7 +43,18 @@
})
},
beforeFetch: (p) => {
return formatParams(p, ['ctnBizState', 'changeSourceId'])
let Rdata = formatParams(p, ['ctnBizState', 'changeSourceId'])
if (!!p.cntrno) {
let data = JSON.parse(Rdata.queryCondition)
data.forEach((item, index) => {
if (item.FieldName == 'cntrno') {
console.log(item)
item.ConditionalType = 15
}
})
Rdata.queryCondition = JSON.stringify(data)
}
return Rdata
},
columns,
rowSelection: { type: 'checkbox' },

@ -0,0 +1,114 @@
<template>
<BasicModal
v-bind="$attrs"
:use-wrapper="true"
:title="getTitle"
width="50%"
@register="registerModal"
@ok="handleSave"
>
<BasicForm @register="registerForm" />
<!--右下角按钮-->
<template #footer>
<a-button
pre-icon="ant-design:close-outlined"
type="warning"
:loading="loading"
ghost
style="margin-right: 0.8rem"
@click="closeModal"
>取消</a-button
>
<a-button
type="success"
:loading="loading"
pre-icon="ant-design:check-outlined"
style="margin-right: 0.8rem"
@click="handleSave(false)"
>仅保存</a-button
>
<a-button
pre-icon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
@click="handleSave(true)"
>保存并关闭</a-button
>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema } from './columns'
import { ApiEdit, ApiInfo } from './api'
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
})
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
setFieldsValue({
...res.data,
})
}
} else {
setFieldsValue({ permissionIdentity: unref(2) })
}
setModalProps({ loading: false })
})
const getTitle = computed(() => (!unref(isUpdate) ? '新增发票代码' : '编辑发票代码'))
async function handleSave(exit) {
try {
const values = await validate()
setModalProps({ confirmLoading: true, loading: true })
const res: API.DataResult = await ApiEdit(values)
if (res.succeeded) {
// createMessage.success(res.message)
createMessage.success('成功')
emit('success')
if (!exit) {
if (unref(isUpdate)) {
await refresh()
} else {
rowId.value = res.data
isUpdate.value = true
await refresh()
}
}
} else {
createMessage.error(res.message)
}
exit && closeModal()
} finally {
setModalProps({ confirmLoading: false, loading: false })
}
}
async function refresh() {
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
await setFieldsValue({
...res.data,
})
}
}
</script>

@ -0,0 +1,41 @@
// @ts-ignore
import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api {
list = '/mainApi/CodeInvoice/GetList',
edit = '/mainApi/CodeInvoice/Edit',
info = '/mainApi/CodeInvoice/Edit',
del = '/mainApi/CodeInvoice/Delete',
}
// 列表 (Auth)
export function ApiList(data: PageRequest) {
return request<DataResult>({
url: Api.list,
method: 'post',
data,
})
}
// 编辑 (Auth)
export function ApiEdit(data: PageRequest) {
return request<DataResult>({
url: Api.edit,
method: 'post',
data,
})
}
// 详情 (Auth)
export function ApiInfo(query) {
return request<DataResult>({
url: Api.info,
method: 'get',
params: query,
})
}
// 批量删除 (Auth)
export function ApiDel(data: PageRequest) {
return request<DataResult>({
url: Api.del,
method: 'post',
data,
})
}

@ -0,0 +1,414 @@
import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
import { GetFeeCurrencySelectList } from '/@/api/common'
import { getDictOption } from '/@/utils/dictUtil'
const identificationList = ref([])
getDictOption('identification').then((res) => {
identificationList.value = res
})
export const columns: BasicColumn[] = [
{
title: '编码',
dataIndex: 'code',
sorter: true,
width: 150,
},
{
title: '名称',
dataIndex: 'name',
sorter: true,
width: 200,
},
{
title: '税目',
dataIndex: 'taxCategory',
sorter: true,
width: 200,
},
{
title: '税率',
dataIndex: 'taxRate',
sorter: true,
width: 200,
},
{
title: '零税率标识',
dataIndex: 'identification',
sorter: true,
width: 200,
customRender: ({ record }) => {
let name = ''
identificationList.value.some((item: any) => {
if (record.identification == item.value) {
name = item.name
return true
}
})
return name
},
},
{
title: '税收分类编码',
dataIndex: 'taxClassificationCode',
sorter: true,
width: 200,
},
{
title: '税收分类名称',
dataIndex: 'taxClassificationName',
sorter: true,
width: 200,
},
{
title: '是否含税',
dataIndex: 'isIncludingTax',
sorter: true,
width: 80,
customRender: ({ text }) => {
if (text === true) {
return <Tag color="success"></Tag>
} else if (text === false) {
return <Tag color="error"></Tag>
}
return text
},
},
{
title: '是否享受优惠政策',
dataIndex: 'hasPreferentialPolicy',
sorter: true,
width: 150,
customRender: ({ text }) => {
if (text === true) {
return <Tag color="success"></Tag>
} else if (text === false) {
return <Tag color="error"></Tag>
}
return text
},
},
{
title: '优惠政策说明',
dataIndex: 'preferentialPolicyDescription',
sorter: true,
width: 200,
},
{
title: '是否默认商品名',
dataIndex: 'isDefault',
sorter: true,
width: 150,
customRender: ({ text }) => {
if (text === true) {
return <Tag color="success"></Tag>
} else if (text === false) {
return <Tag color="error"></Tag>
}
return text
},
},
{
title: '默认币别',
dataIndex: 'defaultCurrency',
sorter: true,
width: 150,
},
{
title: '规格型号',
dataIndex: 'specification',
sorter: true,
width: 150,
},
{
title: '单位',
dataIndex: 'unit',
sorter: true,
width: 150,
},
]
export const searchFormSchema: FormSchema[] = [
{
field: 'code',
label: '编码',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'name',
label: '名称',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'taxCategory',
label: '税目',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'taxRate',
label: '税率',
component: 'InputNumber',
colProps: { span: 4 },
},
{
field: 'identification',
label: '零税率标识',
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: ({ formActionType }) => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('identification').then((res) => {
res.forEach((item) => {
item.value = parseInt(item.value)
})
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
{
field: 'taxClassificationCode',
label: '税收分类编码',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'taxClassificationName',
label: '税收分类名称',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'isIncludingTax',
label: '是否含税',
component: 'Switch',
colProps: { span: 4 },
componentProps: {
checkedChildren: '是',
checkedValue: true,
unCheckedChildren: '否',
unCheckedValue: false,
},
},
{
field: 'hasPreferentialPolicy',
label: '是否享受优惠政策',
component: 'Switch',
colProps: { span: 4 },
componentProps: {
checkedChildren: '是',
checkedValue: true,
unCheckedChildren: '否',
unCheckedValue: false,
},
},
{
field: 'preferentialPolicyDescription',
label: '优惠政策说明',
component: 'InputTextArea',
colProps: { span: 4 },
componentProps: {
rows: 2,
},
},
{
field: 'isDefault',
label: '是否默认商品名',
component: 'Switch',
colProps: { span: 4 },
componentProps: {
checkedChildren: '是',
checkedValue: true,
unCheckedChildren: '否',
unCheckedValue: false,
},
},
{
field: 'defaultCurrency',
label: '默认币别',
component: 'ApiSelect',
colProps: { span: 4 },
componentProps: () => {
return {
api: GetFeeCurrencySelectList,
labelField: 'name',
valueField: 'codeName',
resultField: 'data',
}
},
},
{
field: 'specification',
label: '规格型号',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'unit',
label: '单位',
component: 'Input',
colProps: { span: 4 },
},
]
export const formSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'code',
label: '编码',
required: true,
component: 'Input',
colProps: { span: 6 },
},
{
field: 'name',
label: '名称',
required: true,
component: 'Input',
colProps: { span: 6 },
},
{
field: 'taxCategory',
label: '税目',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'taxRate',
label: '税率',
component: 'InputNumber',
colProps: { span: 6 },
},
{
field: 'identification',
label: '零税率标识',
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: ({ formActionType }) => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('identification').then((res) => {
res.forEach((item) => {
item.value = parseInt(item.value)
})
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
{
field: 'taxClassificationCode',
label: '税收分类编码',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'taxClassificationName',
label: '税收分类名称',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'isIncludingTax',
label: '是否含税',
component: 'Switch',
colProps: { span: 6 },
componentProps: {
checkedChildren: '是',
checkedValue: true,
unCheckedChildren: '否',
unCheckedValue: false,
},
defaultValue: false,
},
{
field: 'hasPreferentialPolicy',
label: '是否享受优惠政策',
component: 'Switch',
colProps: { span: 6 },
componentProps: {
checkedChildren: '是',
checkedValue: true,
unCheckedChildren: '否',
unCheckedValue: false,
},
defaultValue: false,
},
{
field: 'preferentialPolicyDescription',
label: '优惠政策说明',
component: 'InputTextArea',
colProps: { span: 6 },
componentProps: {
rows: 2,
},
},
{
field: 'isDefault',
label: '是否默认商品名',
component: 'Switch',
colProps: { span: 6 },
componentProps: {
checkedChildren: '是',
checkedValue: true,
unCheckedChildren: '否',
unCheckedValue: false,
},
defaultValue: false,
},
{
field: 'defaultCurrency',
label: '默认币别',
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: () => {
return {
api: GetFeeCurrencySelectList,
labelField: 'name',
valueField: 'codeName',
resultField: 'data',
}
},
},
{
field: 'specification',
label: '规格型号',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'unit',
label: '单位',
component: 'Input',
colProps: { span: 6 },
},
]

@ -0,0 +1,153 @@
<template>
<div>
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit">
<template #tableTitle>
<a-button type="link" @click="handleCreate" :disabled="checkPermissions('op:ctn:add')">
<span class="iconfont icon-new_document"></span>
添加
</a-button>
<a-popconfirm
title="确定删除当前选中数据?"
ok-text="是"
cancel-text="否"
@confirm="handleDel"
>
<a-button type="link" :disabled="checkPermissions('op:ctn:del')">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button>
</a-popconfirm>
<Divider type="vertical" />
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: handleAudit.bind(null, record),
disabled: checkPermissions('op:ctn:edit'),
},
]"
/>
</template>
</template>
</BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { Divider } from 'ant-design-vue'
import { checkPermissions } from '/@/hooks/Permissions/index'
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
import { ApiList, ApiDel } from './api'
import { useModal } from '/@/components/Modal'
import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getSelectRows }] = useTable({
title: '发票代码列表',
api: async (p) => {
const res: API.DataResult = await ApiList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: (p) => {
var data = getForm().getFieldsValue()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: p.page,
pageSize: p.pageSize,
sortConditions: [],
},
}
if (p.field) {
postParam.pageCondition.sortConditions = [
{
sortField: p.field,
listSortDirection: p.order == 'ascend' ? 0 : 1,
},
]
} else {
postParam.pageCondition.sortConditions = []
}
let condition: API.ConditionItem[] = []
if (!!data.CtnName) {
condition.push({
FieldName: 'CtnName',
FieldValue: data.CtnName,
ConditionalType: 1,
})
}
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: true,
bordered: true,
showIndexColumn: true,
indexColumnProps: {
width: 60,
},
canResize: true,
resizeHeightOffset: 35,
immediate: true,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
})
function handleDel() {
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
})
}
ApiDel(ApiData).then((res) => {
console.log(res)
notification.success({ message: res.message, duration: 3 })
reload()
})
}
function handleCreate() {
openModal(true, {
isParent: false,
isUpdate: false,
})
}
function handleAudit(record: Recordable) {
if (!checkPermissions('op:ctn:edit')) {
openModal(true, {
record,
isUpdate: true,
})
}
}
function handleSuccess() {
reload()
}
</script>

@ -396,9 +396,9 @@
CustomerOrSupplier.value = 'isSupplier'
}
}
ChangeArrclientTag()
ChangeArrclientTag(false)
})
function ChangeArrclientTag() {
function ChangeArrclientTag(type) {
//
const ArrclientTagList = [
'isController',
@ -445,7 +445,9 @@
}
},
})
setFieldsValue({ ArrclientTag: ['isController'] })
if (type) {
setFieldsValue({ ArrclientTag: ['isController'] })
}
} else if (CustomerOrSupplier.value == 'isSupplier') {
updateSchema({
label: '客户属性',
@ -477,7 +479,9 @@
}
},
})
setFieldsValue({ ArrclientTag: [] })
if (type) {
setFieldsValue({ ArrclientTag: [] })
}
} else if (CustomerOrSupplier.value == 'isCustomerAndisSupplier') {
updateSchema({
label: '客户属性',
@ -503,12 +507,14 @@
}
},
})
setFieldsValue({ ArrclientTag: ['isController'] })
if (type) {
setFieldsValue({ ArrclientTag: ['isController'] })
}
}
}
function ChangeCustomerOrSupplier() {
setFieldsValue({ ArrclientTag: [] })
ChangeArrclientTag()
// setFieldsValue({ ArrclientTag: [] })
ChangeArrclientTag(true)
}
watch(activeKey, (nval, oval) => {
if (Number(nval) > 2 && !rowId.value) {
@ -763,7 +769,6 @@
} else if (res.data.isSupplier) {
CustomerOrSupplier.value = 'isSupplier'
}
await setFieldsValue({
...res.data,
})

@ -144,7 +144,7 @@ export function PaymentFreeSettlementGet(parameter) {
export function PaymentFreeSettlementGetExchangesAsync(parameter) {
return request({
url: '/feeApi/PaymentFreeSettlement/GetExchangesAsync',
url: '/feeApi/PaymentFreeSettlement/GetCurrencies',
method: 'post',
data: parameter,
})

@ -360,9 +360,18 @@ export const detailForm: FormSchema[] = [
colProps: { span: 4 },
show: false
},
{
field: 'orgBankId',
label: '',
colProps: { span: 4 },
show: false
},
{
field: 'customerBankName',
label: '银行账号',
label: '客户银行',
show: ({ values }) => {
return values.mode=='free';
},
colProps: { span: 4 },
component: 'ApiSelect',
componentProps: ({ formModel }) => {
@ -385,20 +394,82 @@ export const detailForm: FormSchema[] = [
queryCondition: JSON.stringify(queryStr),
}
GetClientBankList(data).then((res) => {
res.data.forEach(item=>{
item.showName = item.bankName + ' ' + item.bankAccountNo
})
resolve(res)
})
})
},
immediate: false,
labelField: 'bankName',
labelField: 'showName',
valueField: 'bankName',
resultField: 'data',
onChange: (e, obj) => {
if (obj) {
formModel.customerBankId = obj.id
formModel.customerAccount = obj.bankAccountNo
}
if (!obj && !e) {
formModel.customerBankId = ''
formModel.customerAccount = ''
}
},
}
},
},
{
field: 'customerAccount',
label: '客户账号',
show: ({ values }) => {
return values.mode=='free';
},
colProps: { span: 4 },
dynamicDisabled:true,
component: 'Input'
},
{
field: 'orgBankName',
label: '银行账号',
colProps: { span: 4 },
component: 'ApiSelect',
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
const queryStr = [
{
FieldName: 'ClientId',
FieldValue: formModel.customerId,
ConditionalType: '0',
},
]
const data = {
pageCondition: {
pageIndex: 1,
pageSize: 20,
sortConditions: [],
},
queryCondition: JSON.stringify(queryStr),
}
GetClientBankList(data).then((res) => {
res.data.forEach(item=>{
item.showName = item.bankName + ' ' + item.bankAccountNo
})
resolve(res)
})
})
},
immediate: false,
labelField: 'showName',
valueField: 'showName',
resultField: 'data',
onChange: (e, obj) => {
if (obj) {
formModel.orgBankId = obj.id
}
if (!obj && !e) {
formModel.orgBankId = ''
}
},
}
@ -472,6 +543,12 @@ export const detailForm: FormSchema[] = [
}
},
},
{
field: 'ledgerVoucherNO',
label: '总账凭证号',
colProps: { span: 4 },
component: 'Input'
},
]
export const markForm: FormSchema[] = [

@ -60,7 +60,7 @@
<BasicForm @register="registerFormMark">
</BasicForm>
<BasicTable v-if="route.query.type=='invoice'" class="ds-table" @row-click="handleClick" @register="registerTable">
<BasicTable class="ds-table" @row-click="handleClick" @register="registerTable">
<template #right>
<div style="width: 40%;margin-left: 10px;">
<div>
@ -101,54 +101,6 @@
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'businessType'">
<span v-if="record.businessType == 1"></span>
</template>
</template>
</BasicTable>
<BasicTable v-if="route.query.type=='free'" class="ds-table" @row-click="handleClick" @register="registerTableFree">
<template #right>
<div style="width: 40%;margin-left: 10px;">
<div>
<BasicTable class="ds-table" @register="registerTableFree1">
<template #tableTitle>
<div>
<span class="bold">费用明细</span>
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'feeType'">
<span v-if="record.feeType == 1"></span>
<span v-if="record.feeType == 2"></span>
</template>
</template>
</BasicTable>
</div>
</div>
</template>
<template #tableTitle>
<div>
<div>
<span class="bold">结算明细</span>
<a-button v-repeat type="link" @click="addDetailed()">
<span class="iconfont icon-jia"></span>
添加
</a-button>
<a-popconfirm title="确定要删除勾选的数据?" ok-text="" cancel-text="" @confirm="deleteRow">
<a-button v-repeat type="link">
<span class="iconfont icon-shanchu1"></span>删除
</a-button>
</a-popconfirm>
<a-button v-repeat type="link" @click="openFile">
<span class="iconfont icon-fujian1"></span>附件
</a-button>
</div>
</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.dataIndex == 'businessType'">
@ -158,7 +110,8 @@
</BasicTable>
</div>
</a-spin>
<invoiceTable ref="invoiceTableRef" @updateList="updateList" @updateListFree="updateListFree"></invoiceTable>
<invoiceTable ref="invoiceTableRef" @updateListFreeLeft="updateListFreeLeft" @updateList="updateList"
@updateListFree="updateListFree"></invoiceTable>
<invoiceFile ref="invoiceFileRef"></invoiceFile>
</div>
</template>
@ -175,7 +128,7 @@ import invoiceFile from '../../../operation/invoiceIssue/detail/invoiceFile.vue'
import { useRoute, useRouter } from 'vue-router'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { useGo } from '/@/hooks/web/usePage'
import { detailForm, markForm, invoiceColum, invoiceDetailColum,freeColum,freeDetailColum } from '../columns'
import { detailForm, markForm, invoiceColum, invoiceDetailColum, freeColum, freeDetailColum } from '../columns'
import { BasicForm, useForm } from '/@/components/Form/index'
import { useUserStore } from '/@/store/modules/user'
import { useMultipleTabStore } from '/@/store/modules/multipleTab'
@ -209,7 +162,7 @@ const [registerTable, { setTableData, setSelectedRowKeys, getSelectRows }] = use
},
canResize: true,
showTableSetting: true,
id: '1',
id: getTableId(),
immediate: false,
})
const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee, setTableData: setTableData1 }] = useTable({
@ -224,52 +177,35 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
width: 60,
},
showTableSetting: true,
id: '2',
canResize: true,
immediate: false,
})
const [registerTableFree, { setTableData:setTableDataFree, setSelectedRowKeys:setSelectedRowKeysFree, getSelectRows:getSelectRowsFree }] = useTable({
columns: getColums(),
useSearchForm: false,
showIndexColumn: false,
pagination: true,
rowSelection: {},
striped: true,
bordered: true,
indexColumnProps: {
width: 60,
},
canResize: true,
showTableSetting: true,
id: '5',
immediate: false,
})
const [registerTableFree1, { setTableData: setTableDataFree1 }] = useTable({
columns: getColumsDetail(),
useSearchForm: false,
showIndexColumn: false,
pagination: false,
striped: true,
rowKey: 'recordId',
bordered: true,
indexColumnProps: {
width: 60,
},
showTableSetting: true,
id: '6',
id: getTableDetailId(),
canResize: true,
immediate: false,
})
function getColums() {
if (route.query.type == 'invoice') {
return freeDetailColum
return invoiceColum
}
if (route.query.type == 'free') {
return freeColum
}
}
function getTableId() {
if (route.query.type == 'invoice') {
return 1
}
if (route.query.type == 'free') {
return 5
}
}
function getTableDetailId() {
if (route.query.type == 'invoice') {
return 2
}
if (route.query.type == 'free') {
return 6
}
}
function getColumsDetail() {
if (route.query.type == 'invoice') {
return invoiceDetailColum
@ -278,6 +214,36 @@ function getColumsDetail() {
return freeDetailColum
}
}
// --
function updateListFreeLeft(arr, currency) {
const data = {
settlement: {
...getFieldsValue(),
...getFieldsValueMark(),
},
documents: arr
}
data.settlement.billType = 1
data.settlement.mode = 3
data.settlement.currency = currency
loading.value = true
PaymentFreeSettlementSave(data).then(res => {
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
}
loading.value = false
}).catch(() => {
loading.value = false
})
}
function ClickLast(type) {
const data = {
@ -297,7 +263,6 @@ function ClickLast(type) {
indexQuery = index
}
})
console.log(indexQuery, list)
if (type == 'next') {
if (indexQuery == 0) {
createMessage.warning('已经是第一条了')
@ -342,15 +307,18 @@ const deleteRow = async () => {
})
}
function handleClick(record) {
setSelectedRowKeys([record.id])
const data = {
id: record.id,
}
GeneralInvoiceGet(data).then(res => {
if (res.succeeded) {
setTableData1(res.data.details)
if (route.query.type == 'invoice') {
setSelectedRowKeys([record.id])
const data = {
id: record.id,
}
})
GeneralInvoiceGet(data).then(res => {
if (res.succeeded) {
setTableData1(res.data.details)
}
})
}
}
const invoiceTableRef = ref(null) as any
onMounted(() => {
@ -395,7 +363,7 @@ function updateList(arr, currency) {
loading.value = false
})
}
//
// --
function updateListFree(arr, currency) {
const data = {
settlement: {
@ -436,22 +404,43 @@ function handleSave() {
data.settlement.billType = 1
data.settlement.mode = 4
loading.value = true
InvoiceSettlementSave(data).then(res => {
loading.value = false
createMessage.success('保存成功')
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
}
}).catch(() => {
loading.value = false
})
if (route.query.type == 'invoice') {
InvoiceSettlementSave(data).then(res => {
loading.value = false
createMessage.success('保存成功')
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
}
}).catch(() => {
loading.value = false
})
}
if (route.query.type == 'free') {
PaymentFreeSettlementSave(data).then(res => {
loading.value = false
createMessage.success('保存成功')
if (!route.query.id) {
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
let type = route.query.type
setTimeout(() => {
go(`/feeSettlementDetail?id=${res.data.id}&type=${type}`)
}, 50)
} else {
getDetail()
}
}).catch(() => {
loading.value = false
})
}
}
const form = ref({ settlementNO: '' }) as any
function getDetail() {
@ -459,11 +448,12 @@ function getDetail() {
if (route.query.type == 'free') {
PaymentFreeSettlementGet({ id: route.query.id }).then(res => {
if (res.succeeded) {
res.data.mode = 'free'
form.value = JSON.parse(JSON.stringify(res.data))
res.data.currencyAmount = res.data.currency + '/' + res.data.amount
setFieldsValueMark(res.data)
setFieldsValue(res.data)
setTableDataFree(res.data.details)
setTableData(res.data.settlementDetails)
}
loading.value = false
})
@ -471,6 +461,7 @@ function getDetail() {
if (route.query.type == 'invoice') {
InvoiceSettlementGet({ id: route.query.id }).then(res => {
if (res.succeeded) {
res.data.mode = 'invoice'
form.value = JSON.parse(JSON.stringify(res.data))
delete form.value.details
res.data.currencyAmount = res.data.currency + '/' + res.data.amount

@ -140,7 +140,7 @@ import ExchangeRate from './exchangeRate.vue'
import { useMessage } from '/@/hooks/web/useMessage'
import { Divider } from 'ant-design-vue'
import { formatParams } from '/@/hooks/web/common'
const emits = defineEmits(['updateList', 'refresh', 'updateListFree'])
const emits = defineEmits(['updateList', 'refresh', 'updateListFree','updateListFreeLeft'])
import { useRoute, useRouter } from 'vue-router'
import { get } from 'lodash'
const route = useRoute()
@ -153,6 +153,10 @@ const [registerTable, { getForm, getSelectRows, setSelectedRowKeys }] = useTable
let res = {} as any
if (route.query.type == 'free') {
res = await PaymentFreeSettlementGetBizList(p)
res.data.forEach((item, index) => {
item.freeIndex = String(index)
})
console.log(res.data)
}
if (route.query.type == 'invoice') {
res = await InvoiceSettlementGetInvoiceList(p)
@ -236,7 +240,7 @@ function getId() {
return 'id'
}
if (route.query.type == 'free') {
return 'businessId'
return 'freeIndex'
}
}
function getColumsDetail() {
@ -278,7 +282,8 @@ const onRowClick = (record, index) => {
})
}
if (route.query.type == 'free') {
setSelectedRowKeys([record.businessId])
setSelectedRowKeys([String(index)])
console.log(getSelectRows())
const data = [{
id: record.businessId,
businessType: record.businessType,
@ -374,12 +379,58 @@ function addInfos() {
})
}
if (route.query.type == 'free') {
const data = {
details: getSelectRows() ? getSelectRows() : [],
settlement: {}
}
const data = [] as any
arr.forEach(item => {
data.push({
id: item.businessId,
businessType: item.businessType,
customerName: item.customerName,
customerId: item.customerId
})
})
currenciesData.value = []
exchangarr.value = []
PaymentFreeSettlementGetExchangesAsync(data).then(res => {
const cuArr = [] as any
currenciesData.value = res.data
res.data.forEach(item => {
item.exchangeRates.forEach(ite => {
if (ite.currency != 'RMB') {
cuArr.push({
currency: ite.currency,
id: item.id
})
}
if (ite.currency == 'RMB') {
ite.exchangeRate = 1
}
})
})
if (cuArr.length > 0) {
const filteredItems = cuArr.filter((item, index, self) =>
index === self.findIndex((t) => t.currency === item.currency)
);
const promises = filteredItems.map(item => {
return new Promise((resolve) => {
const data = {
currencyFrom: 'RMB',
currencyTo: item.currency,
}
GetExchangeRate(data).then(res => {
exchangarr.value.push(res.data)
resolve(true);
})
});
});
return Promise.all(promises).then(() => {
addFreetype.value = 'left'
exchangeFlag.value = true
});
}
if (cuArr.length == 0) {
openFlag.value = false
emits('updateListFreeLeft', res.data, currency.value)
}
})
}
@ -435,6 +486,7 @@ function handleSureExhange() {
currenciesData.value.forEach(item => {
item.exchangeRates.forEach(itemC => {
exchangarr.value.forEach(ite => {
if (itemC.currency == ite.currencyTo) {
itemC.exchangeRate = ite.reverseRate
}
@ -449,21 +501,41 @@ function handleSureExhange() {
emits('updateList', currenciesData.value, currency.value)
}
if (route.query.type == 'free') {
const list = JSON.parse(JSON.stringify(getSelectRowsDetail()))
list.forEach(item => {
exchangarr.value.forEach(ite => {
if (item.currency == ite.currencyTo) {
item.exchangeRate = ite.reverseRate
}
if (addFreetype.value == 'right') {
const list = JSON.parse(JSON.stringify(getSelectRowsDetail()))
list.forEach(item => {
exchangarr.value.forEach(ite => {
if (item.currency == ite.currencyTo) {
item.exchangeRate = ite.reverseRate
}
})
})
})
list.forEach(item => {
item.originalCurrency = item.currency
item.currency = currency.value
item.originalAmount = item.amount
item.amount = Number((Number(item.amount) * Number(item.exchangeRate)).toFixed(2))
})
emits('updateListFree', list, currency.value)
list.forEach(item => {
item.originalCurrency = item.currency
item.currency = currency.value
item.originalAmount = item.amount
item.amount = Number((Number(item.amount) * Number(item.exchangeRate)).toFixed(2))
})
emits('updateListFree', list, currency.value)
}
if (addFreetype.value == 'left') {
currenciesData.value.forEach(item => {
item.exchangeRates.forEach(itemC => {
exchangarr.value.forEach(ite => {
if (itemC.currency == ite.currencyTo) {
itemC.exchangeRate = ite.reverseRate
}
if (itemC.currency == 'RMB') {
itemC.exchangeRate = 1
}
})
})
})
openFlag.value = false
exchangeFlag.value = false
emits('updateListFreeLeft', currenciesData.value, currency.value)
}
}
}
const srmb = ref(0)

@ -479,6 +479,21 @@ export const applyColums: BasicColumn[] = [
dataIndex: 'invoiceAmount',
width: 100,
},
{
title: 'RMB开出',
dataIndex: 'amountRMB',
width: 100,
},
{
title: 'USD开出',
dataIndex: 'amountUSD',
width: 100,
},
{
title: '其他开出',
dataIndex: 'amountOther',
width: 100,
},
{
title: '原币金额',
dataIndex: 'originalAmount',

@ -616,6 +616,9 @@ function addDetailed() {
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

@ -2,7 +2,7 @@
<div class="operation-area">
<div>
<template v-if="status === 'WAIT_BC'">
<a-button @click="fileFlag = true" type="link"
<a-button @click="openfile" type="link"
><i class="iconfont icon-52" style="margin-left: 30px"></i>上传BC并放舱</a-button
>
</template>
@ -600,6 +600,7 @@
import { BookingTruckGetTruckListByBooking } from '/@/views/operation/seaexport/api/SendCar.js'
import { ref, reactive, h, watch, nextTick } from 'vue'
import { Modal } from 'ant-design-vue'
import { GetCarrierSelectList } from '/@/api/common'
import { useModal } from '/@/components/Modal'
import { useAppStore } from '/@/store/modules/app'
const appStore = useAppStore()
@ -774,6 +775,16 @@
function cancelRefresh() {
return false
}
function openfile(){
fileFlag.value = true
setTimeout(() => {
setFieldsValueL({
carrierId:props.details.carrierId,
carrierCode:props.details.carrier,
carrier:props.details.carrier
})
}, 100)
}
function copyBooking() {
emit('copy')
}
@ -1057,7 +1068,8 @@
const [
registerForm,
{
getFieldsValue: getFieldsValueL
getFieldsValue: getFieldsValueL,
setFieldsValue:setFieldsValueL
},
] = useForm({
labelWidth: 100,

@ -144,6 +144,7 @@
<!-- 下货纸比对 -->
<template v-if="column.dataIndex == 'lstShipOrderCompareRlt'">
<div class="goods-status">
<RedoOutlined style="margin-left: 10px" @click="excuteShippingOrderCompareBatch(record)"/>
<a-popover>
<template #content>
<p>
@ -182,7 +183,6 @@
</div>
</div>
</a-popover>
<RedoOutlined style="margin-left: 10px" @click="excuteShippingOrderCompareBatch(record)"/>
</div>
</template>
<template v-if="column.key === 'action'">
@ -234,7 +234,7 @@
<div class="TaskShippingOrderCompareMain">
<div class="TaskShippingOrderCompareMainHeader">
<div>
<p>提单号本地数据</p>
<p>提单号系统数据</p>
<p>--------------------------</p>
<p>{{ TaskShippingOrderCompareData.mBlNo }}</p>
</div>
@ -258,7 +258,7 @@
<div class="TaskShippingOrderCompareMain">
<div class="TaskShippingOrderCompareMainHeader Box">
<div>
<p>箱信息本地数据</p>
<p>箱信息系统数据</p>
</div>
<div></div>
<div>
@ -509,7 +509,7 @@ const TaskShippingOrderCompareData = ref({
showDetailList: '',
total: '',
isExistsDiff: false,
})
}) as any
const TaskShippingOrderCompareVisible = ref(false)
const formatSheetVisible = ref(false)

@ -414,7 +414,6 @@ export const fileForm: FormSchema[] = [
immediate: false,
onChange: (e, obj) => {
if (e && obj) {
console.log(obj)
formModel.carrierId = obj.id
formModel.carrierCode = obj.code
}

Loading…
Cancel
Save