lijingjia 2 months ago
commit 2beec57366

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

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

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

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

@ -50,7 +50,18 @@
}) })
}, },
beforeFetch: (p) => { 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, columns,
formConfig: { formConfig: {

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

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

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

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

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

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

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

@ -51,40 +51,41 @@
const loading = ref(false) const loading = ref(false)
const rowId = ref('') const rowId = ref('')
const { createMessage } = useMessage() const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema, getFieldsValue }] = useForm({ const [registerForm, { resetFields, setFieldsValue, validate, updateSchema, getFieldsValue }] =
labelWidth: 100, useForm({
schemas: formSchema, labelWidth: 100,
showActionButtonGroup: false, schemas: formSchema,
}) showActionButtonGroup: false,
const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(async (data) => { })
resetFields() const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(
setModalProps({ confirmLoading: false, loading: true }) async (data) => {
updateFormField(updateSchema) resetFields()
isUpdate.value = !!data?.isUpdate setModalProps({ confirmLoading: false, loading: true })
if (unref(isUpdate)) { updateFormField(updateSchema)
// setModalProps({ confirmLoading: true }); isUpdate.value = !!data?.isUpdate
rowId.value = data.record.id if (unref(isUpdate)) {
const res: API.DataResult = await ApiInfo({ id: unref(rowId) }) // setModalProps({ confirmLoading: true });
// getFieldList() rowId.value = data.record.id
if (res.succeeded) { const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
setFieldsValue({ // getFieldList()
...res.data if (res.succeeded) {
}) setFieldsValue({
// console.log('Form', getFieldsValue()); ...res.data,
// setFieldsValue({ trainId: unref(res.data.trainId) }); })
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
}
// setModalProps({ confirmLoading: false });
} else {
setFieldsValue({ permissionIdentity: unref(2) })
} }
// setModalProps({ confirmLoading: false }); setModalProps({ loading: false })
} else { },
setFieldsValue({ permissionIdentity: unref(2) }) )
}
setModalProps({ loading: false })
})
const getTitle = computed(() => (!unref(isUpdate) ? '新增航线信息' : '编辑航线信息')) const getTitle = computed(() => (!unref(isUpdate) ? '新增航线信息' : '编辑航线信息'))
async function handleSave(exit) { async function handleSave(exit) {
console.log(getFieldsValue())
return
try { try {
const values = await validate() const values = await validate()
setModalProps({ confirmLoading: true, loading: true }) 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 { BasicColumn, FormSchema } from '/@/components/Table'
// 下拉框数据接口 // 下拉框数据接口
import { GetFeeCurrencySelectList } from '/@/api/common' 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> </a-button>
</div> </div>
<div> <div class="invoiceApply-table">
<input class="ds-tb-check" type="checkbox" v-model="allCheck" :indeterminate="someCheck" /> <input class="ds-tb-check" type="checkbox" v-model="allCheck" :indeterminate="someCheck" />
<hot-table ref="hotTb" :data="list" :settings="settings"> <hot-table ref="hotTb" :data="list" :settings="settings">
</hot-table> </hot-table>
@ -167,8 +167,8 @@ import { emit } from 'process'
function updateList(val, type) { function updateList(val, type) {
emits('updateListSave', val, type) emits('updateListSave', val, type)
} }
function addLeft(val,data,exchang,type) { function addLeft(val, data, exchang, type) {
emits('addLeftSave', val,data,exchang,type) emits('addLeftSave', val, data, exchang, type)
} }
const dsFile = ref('') const dsFile = ref('')
const route = useRoute() const route = useRoute()
@ -191,6 +191,7 @@ const row = {
quantity: 1, quantity: 1,
unit: '', unit: '',
specification: '', specification: '',
applicationId: route.query.id ? route.query.id : 0,
} }
// //
const list = ref([]) as any const list = ref([]) as any
@ -200,6 +201,7 @@ const allCheck = ref(false)
// //
const someCheck = ref(false) const someCheck = ref(false)
const unitDict = ref([]) as any const unitDict = ref([]) as any
const feeDataList = ref([])
// //
const columns = [ const columns = [
{ {
@ -219,6 +221,7 @@ const columns = [
source: async (query, process) => { source: async (query, process) => {
const res = feeDict.value.length ? feeDict.value : (await GetInvoiceCodeList())?.data const res = feeDict.value.length ? feeDict.value : (await GetInvoiceCodeList())?.data
if (!feeDict.value.length) feeDict.value = res if (!feeDict.value.length) feeDict.value = res
feeDataList.value = res
const dict = res.map((res) => { const dict = res.map((res) => {
return res.displayName return res.displayName
}) })
@ -300,8 +303,7 @@ const columns = [
] ]
// //
const settings = { const settings = {
width: '100%', height: '300',
heigth: 300,
autoWrapRow: true, autoWrapRow: true,
autoWrapCol: true, autoWrapCol: true,
// //
@ -375,6 +377,25 @@ const settings = {
(list.value[index].amount || 0) - (list.value[index].noTaxAmount || 0), (list.value[index].amount || 0) - (list.value[index].noTaxAmount || 0),
).toFixed(2) ).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; margin-bottom: 2px;
} }
</style> </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 = { const data = {
invoice: { invoice: {
...form.value, ...form.value,
...getFieldsValue() ...getFieldsValue(),
invoiceDetails:list.value
}, },
bizList: val, bizList: val,
} }
@ -810,9 +811,9 @@ function handleUpdate(val) {
const data = { const data = {
invoice: { invoice: {
...form.value, ...form.value,
...getFieldsValue() ...getFieldsValue(),
invoiceDetails:list.value
}, },
invoiceDetails: list.value,
applications: val, applications: val,
} }
loading.value = true loading.value = true
@ -844,7 +845,8 @@ function updateListFree(val) {
const data = { const data = {
invoice: { invoice: {
...form.value, ...form.value,
...getFieldsValue() ...getFieldsValue(),
invoiceDetails:list.value
}, },
details: val, details: val,
} }
@ -1469,6 +1471,11 @@ watchEffect(() => {
width: 39%; width: 39%;
margin-left: 1%; margin-left: 1%;
} }
.line {
font-size: 12px;
border-bottom: 1px solid rgba(158, 83, 9, 1);
padding: 5px 0;
}
</style> </style>
<style lang="less"> <style lang="less">
.invoiceIssue-table { .invoiceIssue-table {
@ -1494,10 +1501,4 @@ watchEffect(() => {
color: rgba(158, 83, 9, 1); color: rgba(158, 83, 9, 1);
} }
} }
.line {
font-size: 12px;
border-bottom: 1px solid rgba(158, 83, 9, 1);
padding: 5px 0;
}
</style> </style>
Loading…
Cancel
Save