销售结算接口

This commit is contained in:
‘huanghaiixia’
2026-02-10 17:45:43 +08:00
parent 792e7758cc
commit 73b14aa299
6 changed files with 67 additions and 27 deletions

View File

@ -108,7 +108,7 @@ export const columns: BasicColumn[] = [
},
{
dataIndex: 'deptId',
dataIndex: 'billList',
title: '附件',
componentType: 'input',
align: 'left',

View File

@ -35,7 +35,7 @@
</a-col>
<a-col :span="8">
<a-form-item label="账期内含预收付款" name="rpSign">
<a-select v-model:value="formState.rpSign" style="width: 100%" allow-clear>
<a-select v-model:value="formState.rpSign" style="width: 100%" allow-clear :disabled="isDisable">
<a-select-option v-for="item in optionSelect.signList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
@ -89,7 +89,7 @@
<a v-if="!isDisable" @click="btnCheck(record, index, 'delete')">删除</a>
</template>
<template v-if="column.dataIndex === 'priceDesc'">
<a v-if="!isDisable" @click="btnCheck(record, index, 'price')">{{record.priceDesc}}</a>
<a @click="btnCheck(record, index, 'price')">{{record.priceDesc}}</a>
</template>
</template>
</a-table>
@ -355,7 +355,7 @@
if (type == 'delete') {
dataList.value.splice(index, 1)
} else {
openModalPrice(true,{isUpdate: false, record})
openModalPrice(true,{isUpdate: false, record,isDisable: isDisable.value})
}
}
const handleSuccessPrice = (arr, curRecord) => {

View File

@ -18,8 +18,8 @@
<template v-if="column.dataIndex === 'action'">
<TableAction :actions="getActions(record)" />
</template>
<template v-if="column.dataIndex === 'lngFileUploadList'">
<div v-for="(item, idx) in record.lngFileUploadList">
<template v-if="column.dataIndex === 'billList'">
<div v-for="(item, idx) in record.billList">
<a @click="handleDownload(item)">{{item.fileOrg}}</a>
</div>
</template>
@ -39,7 +39,7 @@
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
import { getLngPngSettleHdrPage, deleteLngPngSettleHdr} from '/@/api/dayPlan/PngSettleHdr';
import { getLngPngSettleHdrPage, deleteLngPngSettleHdr, cancelLngPngSettleHdr} from '/@/api/dayPlan/PngSettleHdr';
import { PageWrapper } from '/@/components/Page';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
@ -55,6 +55,7 @@
import { getDraftInfo } from '/@/api/workflow/process';
import { isValidJSON } from '/@/utils/event/design';
import { downloadByUrl } from '/@/utils/file/download';
import { parseDownloadUrl} from '/@/api/system/file';
import PngSettleHdrModal from './components/PngSettleHdrModal.vue';
import {formConfig, searchFormSchema, columns } from './components/config';
@ -81,7 +82,7 @@
const tableRef = ref();
//所有按钮
const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"生成对账单","code":"check","icon":"ant-design:check-outlined","isDefault":true},{"isUse":true,"name":"取消结算","code":"cancel","icon":"ant-design:close-outlined","isDefault":false},{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":true},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true},{"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true,"isUse":true}]);
const buttons = ref([{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},{"isUse":true,"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"生成对账单","code":"check","icon":"ant-design:check-outlined","isDefault":true},{"isUse":true,"name":"取消结算","code":"cancel","icon":"ant-design:close-outlined","isDefault":true},{"isUse":true,"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true},{"isUse":true,"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true},{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true},{"isUse":true,"name":"审批","code":"approve","icon":"ant-design:check-outlined","isDefault":true},{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true},{"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true,"isUse":true}]);
//展示在列表内的按钮
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord','approve']);
const buttonConfigs = computed(()=>{
@ -96,7 +97,7 @@
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
});
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,approve : handleApprove,delete : handleDelete,datalog : handleDatalog}
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,approve : handleApprove,delete : handleDelete,datalog : handleDatalog,cancel:handleCancel}
const { currentRoute } = useRouter();
const router = useRouter();
@ -120,7 +121,7 @@
const visibleFlowRecordModal = ref(false);
const [registerModal, { openModal }] = useModal();
const formName=currentRoute.value.meta?.title
const [registerTable, { reload, setTableData, getDataSource }] = useTable({
const [registerTable, { reload, setTableData, getDataSource,clearSelectedRowKeys }] = useTable({
title: '' || (formName + '列表'),
api: getLngPngSettleHdrPage,
rowKey: 'id',
@ -298,7 +299,7 @@
}
}
function handleApprove () {
function handleApprove (record: Recordable) {
const { processId, taskIds, schemaId } = record.workflowData || {};
if (taskIds && taskIds.length) {
router.push({
@ -312,6 +313,23 @@
});
}
}
function handleCancel () {
if (!selectedKeys.value.length) {
notification.warning({
message: '提示',
description: t('请选择需要取消结算的数据'),
});
return
}
cancelLngPngSettleHdr(selectedKeys.value).then((_) => {
handleSuccess();
notification.success({
message: 'Tip',
description: t('取消成功!'),
});
clearSelectedRowKeys()
});
}
function handleDelete(record: Recordable) {
deleteList([record.id]);
}