| | |
| | | @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" |
| | | @current-change="currentChange" @size-change="sizeChange" @on-load="onLoad"> |
| | | <template #menu-left> |
| | | <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['tms:tmsArBill:export']">导出 |
| | | </el-button> |
| | | <!-- <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['tms:tmsArBill:export']">导出 |
| | | </el-button> --> |
| | | </template> |
| | | <!-- <template #menu-left>--> |
| | | <!-- <el-button--> |
| | |
| | | <el-link size="small" type="primary" v-if="row.status != 2" @click="handleJs(row)" class="link-btn" |
| | | underline="never" icon="el-icon-tickets">结算 |
| | | </el-link> |
| | | <el-link size="small" type="primary" v-if="row.pushStatus == 3 || row.pushStatus == 4|| row.pushStatus == 0" |
| | | @click="handleManualPush(row)" class="link-btn" underline="never" icon="el-icon-upload">手动推送 |
| | | </el-link> |
| | | <el-link size="small" type="primary" @click="handleDerive(row)" class="link-btn" underline="never" |
| | | icon="Download">导出 |
| | | </el-link> |
| | | <el-link size="small" type="primary" @click="handleEdit(row)" class="link-btn" underline="never" |
| | | icon="el-icon-edit">修改 |
| | | </el-link> |
| | | <el-link size="small" type="primary" v-if="[0, 2].includes(row.status)" @click="handleClose(row)" |
| | | class="link-btn" v-hasPermi="['tms:tmsArBill:closeOrder']" underline="never" icon="el-icon-close"> |
| | | 作废 |
| | | </el-link> |
| | | <el-link size="small" type="primary" @click="handleLog(row)" class="link-btn" underline="never" |
| | | icon="el-icon-tickets">日志 |
| | | </el-link> |
| | | <el-link size="small" type="primary" @click="handleFlow(row)" class="link-btn" underline="never" |
| | | icon="el-icon-document"> |
| | | 审核日志 |
| | | </el-link> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | </div> |
| | | <div v-else>{{ form.deductionAmount }}</div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="实际结算金额" v-if="opt == 'edit'">{{ form.actualSettlementAmount }}</el-descriptions-item> |
| | | <el-descriptions-item label="实际结算金额" v-if="opt == 'edit'">{{ form.actualSettlementAmount |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="减免原因" v-if="opt == 'edit'"> |
| | | <div v-if="opt === 'edit'"> |
| | | <el-input v-model="form.reasonReduction" placeholder="请输入减免原因" /> |
| | |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="已结算金额" v-if="opt == 'js'">{{ form.settledAmount }}</el-descriptions-item> |
| | | <el-descriptions-item label="待结算金额" v-if="opt == 'js'">{{ Number(form.settleAmount) - |
| | | Number(form.settledAmount)}}</el-descriptions-item> |
| | | Number(form.settledAmount) }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | <h3>关联明细</h3> |
| | | <avue-crud :option="YSGenerateTableOption" ref="itemsTableRef" :data="form.items"> |
| | |
| | | |
| | | |
| | | </basicContainer> |
| | | <flowLogA ref="flowLogIshow" :isShow="false" title="审核日志" :flowParams="flowParams"></flowLogA> |
| | | </template> |
| | | |
| | | <script setup name="tmsArBill" lang="ts"> |
| | |
| | | getTmsArBill, |
| | | listTmsArBill, |
| | | updateTmsArBill, cancelArBill, |
| | | exportArBillFormat |
| | | exportArBillFormat,manualPushTmsArBill,listReceivableAuditLog,tmsArBillCancelPush |
| | | } from "@/api/tms/tmsArBill"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | import { computed, reactive, ref, toRefs } from "vue"; |
| | |
| | | import { addTmsArSettlement, listTmsArSettlement } from "@/api/tms/tmsArSettlement"; |
| | | import { ElMessage, ElMessageBox } from "element-plus"; |
| | | import { confirmFinance } from "@/api/tms/tmsFinance"; |
| | | import { download } from "@/utils/request"; |
| | | |
| | | const { proxy } = useCurrentInstance(); |
| | | const crudRef = ref(); |
| | |
| | | }, |
| | | billName: { |
| | | label: '账单名称', |
| | | addDisplay: true, minWidth: 200, |
| | | addDisplay: true, minWidth: 220, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false, |
| | | search: true, |
| | | showOverflowTooltip: true |
| | | }, |
| | | customerName: { |
| | | label: '客户名称', |
| | | addDisplay: true, minWidth: 200, |
| | | addDisplay: true, minWidth: 220, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false, |
| | | search: true, |
| | | showOverflowTooltip: true |
| | | }, |
| | | dispatchCount: { |
| | | label: '调度单数量', |
| | |
| | | viewDisplay: true, |
| | | hide: false, |
| | | }, |
| | | pushTime: { |
| | | label: '推送时间', display: false, search: true, searchRange: true, type: 'date', |
| | | format: 'YYYY-MM-DD', hide: false, searchSpan: 6, minWidth: 150, |
| | | valueFormat: 'YYYY-MM-DD', |
| | | }, |
| | | invoiceStatus: { |
| | | label: '开票状态', |
| | | addDisplay: true, |
| | | editDisplay: true, minWidth: 120, |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/invoice_status', |
| | | |
| | | hide: false, |
| | | search: true, |
| | | fixed: 'right' |
| | | }, |
| | | status: { |
| | | label: '状态', |
| | |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/ar_bill_status', |
| | | |
| | | hide: false, |
| | | search: true, |
| | | fixed: 'right' |
| | | }, |
| | | pushStatus: { |
| | | label: '推送状态', |
| | | minWidth: 120, |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_push_status', |
| | | hide: false, |
| | | search: true, |
| | | fixed: 'right' |
| | | } |
| | | } |
| | | }) |
| | |
| | | }) |
| | | }); |
| | | } |
| | | const handleDerive = (row: any) => { |
| | | // 构造下载参数,通常需要传入当前行的 ID 或相关查询条件 |
| | | const downloadParams = { |
| | | id: row.id, // 假设后台需要通过账单ID导出 |
| | | // 如果有其他搜索条件,也可以合并进去 |
| | | }; |
| | | download('tms/tmsArBill/exportArBillFormat', downloadParams); |
| | | }; |
| | | const handleManualPush = (row: any) => { |
| | | ElMessageBox.confirm(`确定要将账单【${row.billName}】手动推送到财务系统吗?`, '系统提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'info' |
| | | }).then(() => { |
| | | // 调用推送接口 |
| | | return manualPushTmsArBill(row.id); |
| | | }).then((res) => { |
| | | proxy.$message.success(res.msg); |
| | | onLoad(page.value); // 刷新列表 |
| | | }).catch(() => { |
| | | // 取消操作 |
| | | }); |
| | | } |
| | | const flowLogIshow = ref() |
| | | const flowParams = ref([]) |
| | | |
| | | const handleFlow = (row: any) => { |
| | | let data = { |
| | | headId: row.id, |
| | | } |
| | | listReceivableAuditLog(data).then((res) => { |
| | | flowParams.value = res.rows |
| | | flowLogIshow.value.openModel() |
| | | |
| | | }) |
| | | } |
| | | const handleClose = (row: any) => { |
| | | ElMessageBox.confirm("是否对应收账单" + row.systemNo + "进行作废?", '系统提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | return tmsArBillCancelPush(row.id); |
| | | }).then(() => { |
| | | onLoad(page.value); |
| | | ElMessage({ |
| | | message: "操作成功!", |
| | | type: 'success' |
| | | }) |
| | | }); |
| | | } |
| | | </script> |