lijingjia 2 months ago
commit 2beec57366

@ -123,6 +123,11 @@
show: false,
},
},
// ID
TriggerSave: {
type: Boolean,
default: false,
},
})
//
const visible = ref(false)
@ -180,15 +185,19 @@
//
const openFileModel = () => {
if (!props.id) {
return createMessage.warning('未检索到业务id请先保存数据')
if (props.TriggerSave && !props.id) {
emits('FnTriggerSave')
} else {
if (!props.id) {
return createMessage.warning('未检索到业务id请先保存数据')
}
init()
}
init()
}
const fileForm = ref(null)
//
const dsFileList = ref(null)
const emits = defineEmits(['handleSuccess'])
const emits = defineEmits(['handleSuccess', 'FnTriggerSave'])
//
const handleOk = async () => {
const res = await fileForm.value.validateFields()
@ -237,6 +246,7 @@
defineExpose({
init,
dsFileList,
openFileModel,
})
</script>
<style></style>

@ -85,11 +85,13 @@
</div>
</div> -->
</a-tab-pane>
<a-tab-pane key="2" tab="电子文档" :disabled="!rowId">
<a-tab-pane key="2" tab="电子文档">
<DsFile
ref="dsFile"
fileType="infoclient"
:TriggerSave="true"
:id="rowId"
@FnTriggerSave="FnTriggerSave"
:SetSelect="{
show: true,
}"
@ -352,25 +354,30 @@
}
}
const dsFile = ref()
function DealExcel() {
async function FnTriggerSave() {
await handleSave(false)
if (rowId.value) {
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_BuyCtn',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
})
} else {
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
dsFile.value.openFileModel()
}
}
async function DealExcel() {
if (!rowId.value) {
await handleSave(false)
}
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_BuyCtn',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
})
} else {
notification.warning({ message: '请先保存', duration: 3 })
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
}
}
async function handleSave(exit) {

@ -86,11 +86,13 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="电子文档" :disabled="!rowId">
<a-tab-pane key="2" tab="电子文档">
<DsFile
ref="dsFile"
fileType="infoclient"
:TriggerSave="true"
:id="rowId"
@FnTriggerSave="FnTriggerSave"
:SetSelect="{
show: true,
}"
@ -364,25 +366,30 @@
}
}
const dsFile = ref()
function DealExcel() {
async function FnTriggerSave() {
await handleSave(false)
if (rowId.value) {
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_CtnScrap',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
})
} else {
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
dsFile.value.openFileModel()
}
}
async function DealExcel() {
if (!rowId.value) {
await handleSave(false)
}
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_CtnScrap',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
})
} else {
notification.warning({ message: '请先保存', duration: 3 })
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
}
}
async function handleSave(exit) {

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

@ -50,7 +50,18 @@
})
},
beforeFetch: (p) => {
return formatParams(p, ['ctnOwner', 'ctnSourceId', 'isOnlineId', 'portid'])
let Rdata = formatParams(p, ['ctnOwner', 'ctnSourceId', 'isOnlineId', 'portid'])
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: {

@ -86,11 +86,14 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="电子文档" :disabled="!rowId">
<!-- <a-tab-pane key="2" tab="电子文档" :disabled="!rowId"> -->
<a-tab-pane key="2" tab="电子文档">
<DsFile
ref="dsFile"
fileType="infoclient"
:TriggerSave="true"
:id="rowId"
@FnTriggerSave="FnTriggerSave"
:SetSelect="{
show: true,
}"
@ -286,6 +289,7 @@
})
})
}
function GetListDetail() {
ApiListDetail({
queryCondition: `[{ FieldName: 'Pid', FieldValue: '${rowId.value}', ConditionalType: 1 }]`,
@ -366,25 +370,30 @@
}
}
const dsFile = ref()
function DealExcel() {
async function FnTriggerSave() {
await handleSave(false)
if (rowId.value) {
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_RentIn',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
})
} else {
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
dsFile.value.openFileModel()
}
}
async function DealExcel() {
if (!rowId.value) {
await handleSave(false)
}
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_RentIn',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
})
} else {
notification.warning({ message: '请先保存', duration: 3 })
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
}
}
async function handleSave(exit) {

@ -86,11 +86,13 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="电子文档" :disabled="!rowId">
<a-tab-pane key="2" tab="电子文档">
<DsFile
ref="dsFile"
fileType="infoclient"
:TriggerSave="true"
:id="rowId"
@FnTriggerSave="FnTriggerSave"
:SetSelect="{
show: true,
}"
@ -353,25 +355,31 @@
}
}
const dsFile = ref()
function DealExcel() {
async function FnTriggerSave() {
await handleSave(false)
if (rowId.value) {
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_RentOneWay',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
})
} else {
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
dsFile.value.openFileModel()
}
}
async function DealExcel() {
if (!rowId.value) {
await handleSave(false)
}
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_RentOneWay',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
})
} else {
notification.warning({ message: '请先保存', duration: 3 })
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
}
}
async function handleSave(exit) {

@ -51,11 +51,13 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="电子文档" :disabled="!rowId">
<a-tab-pane key="2" tab="电子文档">
<DsFile
ref="dsFile"
fileType="infoclient"
:TriggerSave="true"
:id="rowId"
@FnTriggerSave="FnTriggerSave"
:SetSelect="{
show: true,
}"
@ -299,25 +301,30 @@
}
}
const dsFile = ref()
function DealExcel() {
async function FnTriggerSave() {
await handleSave(false)
if (rowId.value) {
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_RentOneWay',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
})
} else {
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
dsFile.value.openFileModel()
}
}
async function DealExcel() {
if (!rowId.value) {
await handleSave(false)
}
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_RentOneWay',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
})
} else {
notification.warning({ message: '请先保存', duration: 3 })
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
}
}
async function handleSave(exit) {

@ -88,11 +88,13 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="电子文档" :disabled="!rowId">
<a-tab-pane key="2" tab="电子文档">
<DsFile
ref="dsFile"
fileType="infoclient"
:TriggerSave="true"
:id="rowId"
@FnTriggerSave="FnTriggerSave"
:SetSelect="{
show: true,
}"
@ -384,25 +386,30 @@
}
}
const dsFile = ref()
function DealExcel() {
async function FnTriggerSave() {
await handleSave(false)
if (rowId.value) {
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_RentOut',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
})
} else {
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
dsFile.value.openFileModel()
}
}
async function DealExcel() {
if (!rowId.value) {
await handleSave(false)
}
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_RentOut',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
})
} else {
notification.warning({ message: '请先保存', duration: 3 })
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
}
}
async function handleSave(exit) {

@ -86,11 +86,13 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="电子文档" :disabled="!rowId">
<a-tab-pane key="2" tab="电子文档">
<DsFile
ref="dsFile"
fileType="infoclient"
:TriggerSave="true"
:id="rowId"
@FnTriggerSave="FnTriggerSave"
:SetSelect="{
show: true,
}"
@ -364,25 +366,30 @@
}
}
const dsFile = ref()
function DealExcel() {
async function FnTriggerSave() {
await handleSave(false)
if (rowId.value) {
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_SellCtn',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
})
} else {
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
dsFile.value.openFileModel()
}
}
async function DealExcel() {
if (!rowId.value) {
await handleSave(false)
}
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_SellCtn',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
})
} else {
notification.warning({ message: '请先保存', duration: 3 })
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
}
}
async function handleSave(exit) {

@ -51,11 +51,13 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="电子文档" :disabled="!rowId">
<a-tab-pane key="2" tab="电子文档">
<DsFile
ref="dsFile"
fileType="infoclient"
:TriggerSave="true"
:id="rowId"
@FnTriggerSave="FnTriggerSave"
:SetSelect="{
show: true,
}"
@ -205,27 +207,32 @@
}
const dsFile = ref()
function DealExcel() {
async function FnTriggerSave() {
await handleSave(false)
if (rowId.value) {
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_State_Change_TemplatImport',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
if (res.succeeded) {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
}
})
} else {
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
dsFile.value.openFileModel()
}
}
async function DealExcel() {
if (!rowId.value) {
await handleSave(false)
}
if (dsFile.value.dsFileList.SelectId) {
let ApiData: any = {
id: unref(rowId),
formName: 'CM_State_Change_TemplatImport',
tableName: '',
fileId: dsFile.value.dsFileList.SelectId,
}
ApiDealExcel(ApiData).then((res) => {
if (res.succeeded) {
activeKey.value = '1'
refresh()
notification.success({ message: res.message, duration: 3 })
}
})
} else {
notification.warning({ message: '请先保存', duration: 3 })
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
}
}
async function Confirm() {

@ -417,7 +417,7 @@ export const searchFormSchema: FormSchema[] = [
label: '客户属性',
field: 'clientTag',
component: 'ApiSelect',
colProps: { span: 4 },
colProps: { span: 8 },
componentProps: () => {
return {
api: () => {

@ -51,40 +51,41 @@
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema, getFieldsValue }] = useForm({
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
})
const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(async (data) => {
resetFields()
setModalProps({ confirmLoading: false, loading: true })
updateFormField(updateSchema)
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
// setModalProps({ confirmLoading: true });
rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
// getFieldList()
if (res.succeeded) {
setFieldsValue({
...res.data
})
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema, getFieldsValue }] =
useForm({
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
})
const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(
async (data) => {
resetFields()
setModalProps({ confirmLoading: false, loading: true })
updateFormField(updateSchema)
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
// setModalProps({ confirmLoading: true });
rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
// getFieldList()
if (res.succeeded) {
setFieldsValue({
...res.data,
})
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
}
// setModalProps({ confirmLoading: false });
} else {
setFieldsValue({ permissionIdentity: unref(2) })
}
// setModalProps({ confirmLoading: false });
} else {
setFieldsValue({ permissionIdentity: unref(2) })
}
setModalProps({ loading: false })
})
setModalProps({ loading: false })
},
)
const getTitle = computed(() => (!unref(isUpdate) ? '新增航线信息' : '编辑航线信息'))
async function handleSave(exit) {
console.log(getFieldsValue())
return
try {
const values = await validate()
setModalProps({ confirmLoading: true, loading: true })

@ -1,8 +1,3 @@
/*
* @Description: tsx
* @Author: lijj
* @Date: 2024-04-25 15:48:33
*/
import { BasicColumn, FormSchema } from '/@/components/Table'
// 下拉框数据接口
import { GetFeeCurrencySelectList } from '/@/api/common'

@ -0,0 +1,11 @@
import { request } from '/@/utils/request'
// 获取列表 (Auth)
export function PaymentSettlementGetList(parameter) {
return request({
url: '/feeApi/PaymentSettlement/GetList',
method: 'post',
data: parameter,
})
}

@ -0,0 +1,201 @@
import { def } from '@vue/shared'
import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
export const columns: BasicColumn[] = [
{
title: '结算单号',
dataIndex: 'applicationNO',
width: 100,
},
{
title: '状态',
dataIndex: 'isLocked',
width: 100,
},
{
title: '结算单位',
dataIndex: 'customerName',
width: 100,
},
{
title: '结算类别',
dataIndex: 'modeText',
width: 100,
},
{
title: '结算方式',
dataIndex: 'settlementTypeName',
width: 100,
},
{
title: '币别',
dataIndex: 'currency',
width: 100,
},
{
title: 'RMB',
dataIndex: 'rmbAmount',
width: 100,
},
{
title: 'USD',
dataIndex: 'usdAmount',
width: 100,
},
{
title: '其他币别',
dataIndex: 'otherAmount',
width: 100,
},
{
title: '未开票',
dataIndex: 'unInvoiceAmount',
width: 100,
},
{
title: '结算日期',
dataIndex: 'settlementDate',
width: 100,
},
{
title: '结算人',
dataIndex: 'createByName',
width: 100,
},
{
title: '结算账户',
dataIndex: 'customerAccount',
width: 100,
},
{
title: '银行账户',
dataIndex: 'customerBank',
width: 100,
},
{
title: '是否导出凭证',
dataIndex: 'isExportVoucher',
width: 100,
},
{
title: '禁止生成凭证',
dataIndex: 'isVoucherDisabled',
width: 100,
},
{
title: '备注',
dataIndex: 'note',
width: 100,
},
{
title: '发票号',
dataIndex: 'invoiceNO',
width: 100,
},
{
title: '相关号码',
dataIndex: 'relativeNO',
width: 100,
},
{
title: '原始金额',
dataIndex: 'originalAmount',
width: 100,
},
{
title: '总账凭证号',
dataIndex: 'ledgerVoucherNO',
width: 100,
},
{
title: '所属分部',
dataIndex: 'saleDeptName',
width: 100,
},
{
title: '记账资料',
dataIndex: 'accountAmount',
width: 100,
},
{
title: '预收支资料',
dataIndex: 'advanceAmount',
width: 100,
},
{
title: '实收支资料',
dataIndex: 'ahsrAmount',
width: 100,
},
{
title: '财务费用',
dataIndex: 'financialAmount',
width: 100,
},
{
title: '预收支取用资料',
dataIndex: 'advanceAmount',
width: 100,
},
{
title: '创建日期',
dataIndex: 'createTime',
width: 100,
},
{
title: '申请单号',
dataIndex: 'applicationNO',
width: 100,
},
{
title: '发票申请单号',
dataIndex: 'applicationNO',
width: 100,
},
{
title: '结算单位银行',
dataIndex: 'customerBank',
width: 100,
},
{
title: '结算单位账户',
dataIndex: 'customerAccount',
width: 100,
},
{
title: '锁定时间',
dataIndex: 'lockTime',
width: 100,
},
{
title: '锁定人',
dataIndex: 'lockUser',
width: 100,
},
{
title: '撤销锁定时间',
dataIndex: 'unlockTime',
width: 100,
},
{
title: '撤销锁定人',
dataIndex: 'unlockUser',
width: 100,
},
]
export const searchFormSchema: FormSchema[] = [
{
field: 'mode',
component: 'Input',
defaultValue: '2',
show: false,
colProps: { span: 6 },
},
{
field: 'mblno',
label: '主提单号',
component: 'Input',
colProps: { span: 6 },
},
]

@ -0,0 +1,242 @@
<template>
<BasicTable @row-dbClick="(e) => { GoDetailed(e) }" class="ds-table" @register="registerTable">
<template #tableTitle>
<div class="ds-h-aciton-btns">
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>复制</span>
</template>
<span class="ds-action-svg-btn">
<img src="../../../assets/svg/infoclient/fuzhi.svg" class="SvgImg" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>删除</span>
</template>
<a-popconfirm title="确定删除当前选中数据?" @confirm="FnDel" ok-text="" cancel-text="">
<span class="ds-action-svg-btn">
<img src="../../../assets/svg/infoclient/shanchu.svg" class="SvgImg" />
</span>
</a-popconfirm>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>提交锁定</span>
</template>
<span class="ds-action-svg-btn">
<img src="../../../assets/icons/lock.svg" class="SvgImg" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>解除锁定</span>
</template>
<span class="ds-action-svg-btn">
<img src="../../../assets/icons/openLock.svg" class="SvgImg" />
</span>
</a-tooltip>
<a-tooltip placement="top" :mouseEnterDelay="0.5">
<template #title>
<span>导出excel</span>
</template>
<span class="ds-action-svg-btn">
<SvgIcon size="18" name="export" />
</span>
</a-tooltip>
</div>
<a-button v-repeat type="link" @click="goDetail('free')">
<span class="iconfont icon-touzijilu"></span>
新建自由结算
</a-button>
<a-button v-repeat type="link" @click="goDetail('apply')">
<span class="iconfont icon-dingdan"></span>
新建申请结算
</a-button>
<a-button v-repeat type="link" @click="goDetail('apply')">
<span class="iconfont icon-dingdan"></span>
新建发票结算
</a-button>
<a-button v-repeat type="link" @click="goDetail('apply')">
<span class="iconfont icon-dingdan"></span>
生成凭证
</a-button>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction :actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: () => {
GoDetailed(true, record)
},
},
]" />
</template>
<template v-if="column.key === 'isLocked'">
<span v-if="record.isLocked"></span>
<span v-else></span>
</template>
<template v-if="column.key === 'isPrinted'">
<span v-if="record.isPrinted"></span>
<span v-else></span>
</template>
<template v-if="column.key === 'isSettled'">
<span v-if="record.isSettled"></span>
<span v-else></span>
</template>
</template>
</BasicTable>
</template>
<script setup lang="ts">
import { ref, reactive, onMounted, defineExpose, computed } from 'vue'
import { PaymentSettlementGetList } from './api.js'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { formatParams } from '/@/hooks/web/common'
import { columns, searchFormSchema, detailColumns, feeColumns, feeColumnsSum } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
import { SvgIcon } from '/@/components/Icon'
const { createMessage } = useMessage()
import { useGo } from '/@/hooks/web/usePage'
const go = useGo()
const [registerTable, { reload, setLoading, getSelectRows, getRawDataSource }] = useTable({
api: async (p) => {
const res: API.DataResult = await PaymentSettlementGetList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data.list], total: res.count })
})
},
beforeFetch: (p) => {
return formatParams(p)
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
useAdvancedSearch: true,
},
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: true,
bordered: true,
showIndexColumn: true,
indexColumnProps: {
width: 60,
},
canResize: true,
immediate: true,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
})
function FnDel() {
let ids = []
ids = getSelectRows().map((item) => {
return item.id
})
if (ids.length == 0) {
createMessage.error('请选择数据')
return false
}
const data = {
ids: [...ids]
}
setLoading(true)
GeneralInvoiceDelete(data).then(res => {
if (res.succeeded) {
createMessage.success('删除成功')
reload()
}
setLoading(false)
}).catch(() => {
setLoading(false)
})
}
function goDetail(type) {
go(`/invoiceIssueDetail?type=` + type)
}
function handleLock() {
let ids = []
ids = getSelectRows().map((item) => {
return item.id
})
if (ids.length == 0) {
createMessage.error('请选择数据')
return false
}
const data = {
ids: [...ids]
}
setLoading(true)
GeneralInvoiceSetLock(data).then(res => {
if (res.succeeded) {
createMessage.success('操作成功')
reload()
}
setLoading(false)
}).catch(() => {
setLoading(false)
})
}
function GoDetailed(row) {
if (row.modeText == '申请发票') {
go("/invoiceIssueDetail?id=" + row.id + '&type=apply')
} else {
go("/invoiceIssueDetail?id=" + row.id + '&type=free')
}
}
</script>
<style lang="less" scoped>
.tableTitleBox {
.ant-btn-link {
// border-radius: 2px;
// background: rgba(245, 249, 252, 1);
margin-left: 13px;
color: #000;
font-size: 16px;
}
}
.SvgImg {
width: 18px;
height: 18px;
margin: 6.8px;
}
.ds-h-aciton-btns {
display: flex;
align-items: center;
height: 48px;
padding: 8px 0;
.ds-action-svg-btn {
display: inline-block;
width: 32px;
height: 32px;
border-radius: 2px;
margin-right: 8px;
cursor: pointer;
.next {
transform: rotate(180deg);
}
}
.ds-action-svg-btn:hover {
box-shadow: 0px 2px 4px #cad1db;
}
.vben-svg-icon {
margin: 6.8px;
}
}
</style>

@ -26,7 +26,7 @@
附件上传
</a-button>
</div>
<div>
<div class="invoiceApply-table">
<input class="ds-tb-check" type="checkbox" v-model="allCheck" :indeterminate="someCheck" />
<hot-table ref="hotTb" :data="list" :settings="settings">
</hot-table>
@ -167,8 +167,8 @@ import { emit } from 'process'
function updateList(val, type) {
emits('updateListSave', val, type)
}
function addLeft(val,data,exchang,type) {
emits('addLeftSave', val,data,exchang,type)
function addLeft(val, data, exchang, type) {
emits('addLeftSave', val, data, exchang, type)
}
const dsFile = ref('')
const route = useRoute()
@ -191,6 +191,7 @@ const row = {
quantity: 1,
unit: '',
specification: '',
applicationId: route.query.id ? route.query.id : 0,
}
//
const list = ref([]) as any
@ -200,6 +201,7 @@ const allCheck = ref(false)
//
const someCheck = ref(false)
const unitDict = ref([]) as any
const feeDataList = ref([])
//
const columns = [
{
@ -219,6 +221,7 @@ const columns = [
source: async (query, process) => {
const res = feeDict.value.length ? feeDict.value : (await GetInvoiceCodeList())?.data
if (!feeDict.value.length) feeDict.value = res
feeDataList.value = res
const dict = res.map((res) => {
return res.displayName
})
@ -300,8 +303,7 @@ const columns = [
]
//
const settings = {
width: '100%',
heigth: 300,
height: '300',
autoWrapRow: true,
autoWrapCol: true,
//
@ -375,6 +377,25 @@ const settings = {
(list.value[index].amount || 0) - (list.value[index].noTaxAmount || 0),
).toFixed(2)
}
if (changes[0][1] === 'name') {
feeDataList.value.forEach(item => {
if (item.displayName == list.value[index].name) {
list.value[index].taxRate = item.taxRate
//
list.value[index].unitPrice = Number(
(list.value[index].taxUnitPrice || 0) / ((list.value[index].taxRate || 0) / 100 + 1),
).toFixed(2)
//
list.value[index].noTaxAmount = Number(
(list.value[index].unitPrice || 0) * (list.value[index].quantity || 0),
).toFixed(2)
//
list.value[index].taxAmount = Number(
(list.value[index].amount || 0) - (list.value[index].noTaxAmount || 0),
).toFixed(2)
}
})
}
}
},
}
@ -666,3 +687,20 @@ defineExpose({ list, dataSource, init, changeCust, open })
margin-bottom: 2px;
}
</style>
<style lang="less">
.invoiceApply-table {
.handsontable {
.wtHider {
max-height: 240px !important;
min-height: 160px;
}
.htCheckboxRendererInput {
position: relative;
z-index: 999;
}
}
}
</style>

@ -783,7 +783,8 @@ function updateListFreeLeft(val) {
const data = {
invoice: {
...form.value,
...getFieldsValue()
...getFieldsValue(),
invoiceDetails:list.value
},
bizList: val,
}
@ -810,9 +811,9 @@ function handleUpdate(val) {
const data = {
invoice: {
...form.value,
...getFieldsValue()
...getFieldsValue(),
invoiceDetails:list.value
},
invoiceDetails: list.value,
applications: val,
}
loading.value = true
@ -844,7 +845,8 @@ function updateListFree(val) {
const data = {
invoice: {
...form.value,
...getFieldsValue()
...getFieldsValue(),
invoiceDetails:list.value
},
details: val,
}
@ -1469,6 +1471,11 @@ watchEffect(() => {
width: 39%;
margin-left: 1%;
}
.line {
font-size: 12px;
border-bottom: 1px solid rgba(158, 83, 9, 1);
padding: 5px 0;
}
</style>
<style lang="less">
.invoiceIssue-table {
@ -1494,10 +1501,4 @@ watchEffect(() => {
color: rgba(158, 83, 9, 1);
}
}
.line {
font-size: 12px;
border-bottom: 1px solid rgba(158, 83, 9, 1);
padding: 5px 0;
}
</style>
Loading…
Cancel
Save