2025-10-09 14:53:16 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="p-2">
|
|
|
|
|
<!--查询区域-->
|
|
|
|
|
<div class="jeecg-basic-table-form-container">
|
|
|
|
|
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
|
|
|
<a-row :gutter="24">
|
2025-10-10 14:45:57 +08:00
|
|
|
<!-- <a-col :lg="6">
|
2025-10-09 14:53:16 +08:00
|
|
|
<a-form-item name="qgdId">
|
2026-04-24 14:30:16 +08:00
|
|
|
<template #label><span title="采购单号">采购单号</span></template>
|
|
|
|
|
<j-input placeholder="请输入采购单号" v-model:value="queryParam.qgdNo" allow-clear ></j-input>
|
2025-10-09 14:53:16 +08:00
|
|
|
</a-form-item>
|
2025-10-10 14:45:57 +08:00
|
|
|
</a-col> -->
|
2025-10-09 14:53:16 +08:00
|
|
|
<a-col :lg="6">
|
|
|
|
|
<a-form-item name="cgdNo">
|
2026-04-24 14:30:16 +08:00
|
|
|
<template #label><span title="采购单号">采购单号</span></template>
|
|
|
|
|
<j-input placeholder="请输入采购单号" v-model:value="queryParam.cgdNo" allow-clear ></j-input>
|
2025-10-09 14:53:16 +08:00
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :lg="6">
|
|
|
|
|
<a-form-item name="qgDate">
|
2026-04-21 13:32:33 +08:00
|
|
|
<template #label><span title="采购时间">采购时间</span></template>
|
|
|
|
|
<a-date-picker valueFormat="YYYY-MM-DD" placeholder="请选择采购时间" v-model:value="queryParam.qgDate" allow-clear />
|
2025-10-09 14:53:16 +08:00
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
|
|
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
|
|
|
|
<a-col :lg="6">
|
|
|
|
|
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
|
|
|
|
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
|
|
|
|
</a-col>
|
|
|
|
|
</span>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-form>
|
|
|
|
|
</div>
|
|
|
|
|
<!--引用表格-->
|
2025-10-14 14:33:39 +08:00
|
|
|
<BasicTable @register="registerTable">
|
2025-10-09 14:53:16 +08:00
|
|
|
<!--插槽:table标题-->
|
|
|
|
|
<template #tableTitle>
|
2026-04-21 13:32:33 +08:00
|
|
|
<a-button type="primary" @click="handleGwc" preIcon="ant-design:plus-outlined"> 购物车</a-button>
|
|
|
|
|
<!-- <a-button type="primary" v-auth="'cgd:nu_invoicing_cgd_main:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
2025-10-09 14:53:16 +08:00
|
|
|
<j-upload-button type="primary" v-auth="'cgd:nu_invoicing_cgd_main:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
|
|
|
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
|
|
|
|
<template #overlay>
|
|
|
|
|
<a-menu>
|
|
|
|
|
<a-menu-item key="1" @click="batchHandleDelete">
|
|
|
|
|
<Icon icon="ant-design:delete-outlined"></Icon>
|
|
|
|
|
删除
|
|
|
|
|
</a-menu-item>
|
|
|
|
|
</a-menu>
|
|
|
|
|
</template>
|
|
|
|
|
<a-button v-auth="'cgd:nu_invoicing_cgd_main:deleteBatch'">批量操作
|
|
|
|
|
<Icon icon="mdi:chevron-down"></Icon>
|
|
|
|
|
</a-button>
|
2025-10-14 14:33:39 +08:00
|
|
|
</a-dropdown> -->
|
2025-10-09 14:53:16 +08:00
|
|
|
</template>
|
|
|
|
|
<!--操作栏-->
|
|
|
|
|
<template #action="{ record }">
|
|
|
|
|
<TableAction :actions="getTableAction(record)"/>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:bodyCell="{ column, record, index, text }">
|
|
|
|
|
</template>
|
|
|
|
|
</BasicTable>
|
2025-10-10 10:30:16 +08:00
|
|
|
<!-- 审批 -->
|
2025-10-09 14:53:16 +08:00
|
|
|
<NuInvoicingCgdMainModal ref="registerModal" @success="handleSuccess"></NuInvoicingCgdMainModal>
|
2025-10-10 10:30:16 +08:00
|
|
|
<!-- 入库单 -->
|
|
|
|
|
<NuInvoicingCgdRkdModal ref="rkdModal" @success="handleSuccess"></NuInvoicingCgdRkdModal>
|
2025-10-13 09:19:45 +08:00
|
|
|
<!-- 详情 -->
|
2025-10-10 10:30:16 +08:00
|
|
|
<NuInvoicingCgdDetailModal ref="detailModal" @success="handleSuccess"></NuInvoicingCgdDetailModal>
|
2026-04-21 13:32:33 +08:00
|
|
|
<!-- 购物车数据 -->
|
|
|
|
|
<GwcInfoListModal ref="gwcModal" @success="handleSuccess"></GwcInfoListModal>
|
|
|
|
|
<!-- 作废、确认 -->
|
|
|
|
|
<NuInvoicingCgdQuerenModal ref="querenModal" @success="handleSuccess"></NuInvoicingCgdQuerenModal>
|
2025-10-09 14:53:16 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" name="cgd-nuInvoicingCgdMain" setup>
|
|
|
|
|
import { ref, reactive } from 'vue';
|
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
|
|
|
import { useListPage } from '/@/hooks/system/useListPage';
|
|
|
|
|
import { columns, superQuerySchema } from './NuInvoicingCgdMain.data';
|
2026-04-21 13:32:33 +08:00
|
|
|
import { queryCgdList } from './NuInvoicingCgdMain.api';
|
2025-10-09 14:53:16 +08:00
|
|
|
import { downloadFile } from '/@/utils/common/renderUtils';
|
|
|
|
|
import NuInvoicingCgdMainModal from './components/NuInvoicingCgdMainModal.vue'
|
2025-10-10 10:30:16 +08:00
|
|
|
import NuInvoicingCgdRkdModal from './components/NuInvoicingCgdRkdModal.vue'
|
|
|
|
|
import NuInvoicingCgdDetailModal from './components/NuInvoicingCgdDetailModal.vue'
|
2026-04-21 13:32:33 +08:00
|
|
|
import NuInvoicingCgdQuerenModal from './components/NuInvoicingCgdQuerenModal.vue'
|
2025-10-09 14:53:16 +08:00
|
|
|
import { useUserStore } from '/@/store/modules/user';
|
|
|
|
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
|
|
|
|
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
|
2026-04-21 13:32:33 +08:00
|
|
|
import GwcInfoListModal from '/@/views/invoicing/qgdInfo/GwcInfoListModal.vue';
|
2025-10-09 14:53:16 +08:00
|
|
|
import { JInput } from '/@/components/Form';
|
|
|
|
|
|
|
|
|
|
const formRef = ref();
|
|
|
|
|
const queryParam = reactive<any>({});
|
|
|
|
|
const toggleSearchStatus = ref<boolean>(false);
|
|
|
|
|
const registerModal = ref();
|
2025-10-10 10:30:16 +08:00
|
|
|
const rkdModal = ref();
|
|
|
|
|
const detailModal = ref();
|
2026-04-21 13:32:33 +08:00
|
|
|
const gwcModal = ref();
|
|
|
|
|
const querenModal = ref();
|
2025-10-09 14:53:16 +08:00
|
|
|
const userStore = useUserStore();
|
|
|
|
|
//注册table数据
|
|
|
|
|
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|
|
|
|
tableProps: {
|
|
|
|
|
title: 'nu_invoicing_cgd_main',
|
2026-04-21 13:32:33 +08:00
|
|
|
api: queryCgdList,
|
2025-10-09 14:53:16 +08:00
|
|
|
columns,
|
|
|
|
|
canResize:false,
|
|
|
|
|
useSearchForm: false,
|
|
|
|
|
actionColumn: {
|
|
|
|
|
width: 120,
|
|
|
|
|
fixed: 'right',
|
|
|
|
|
},
|
|
|
|
|
beforeFetch: async (params) => {
|
|
|
|
|
return Object.assign(params, queryParam);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
|
|
|
|
const labelCol = reactive({
|
|
|
|
|
xs:24,
|
|
|
|
|
sm:4,
|
|
|
|
|
xl:6,
|
|
|
|
|
xxl:6
|
|
|
|
|
});
|
|
|
|
|
const wrapperCol = reactive({
|
|
|
|
|
xs: 24,
|
|
|
|
|
sm: 18,
|
|
|
|
|
});
|
|
|
|
|
|
2026-04-21 13:32:33 +08:00
|
|
|
//购物车
|
|
|
|
|
function handleGwc(){
|
|
|
|
|
gwcModal.value.disableSubmit = false;
|
|
|
|
|
gwcModal.value.init();
|
|
|
|
|
}
|
2025-10-10 10:30:16 +08:00
|
|
|
/**
|
|
|
|
|
* 入库单
|
|
|
|
|
*/
|
|
|
|
|
function handleRkd(record: Recordable) {
|
|
|
|
|
rkdModal.value.disableSubmit = false;
|
|
|
|
|
rkdModal.value.edit(record);
|
|
|
|
|
}
|
2026-04-21 13:32:33 +08:00
|
|
|
/**
|
|
|
|
|
* 确认
|
|
|
|
|
*/
|
|
|
|
|
function handleQueren(record: Recordable) {
|
|
|
|
|
querenModal.value.disableSubmit = false;
|
|
|
|
|
querenModal.value.edit(record);
|
|
|
|
|
}
|
2025-10-09 14:53:16 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 详情
|
|
|
|
|
*/
|
|
|
|
|
function handleDetail(record: Recordable) {
|
2025-10-10 10:30:16 +08:00
|
|
|
detailModal.value.disableSubmit = true;
|
|
|
|
|
detailModal.value.edit(record);
|
2025-10-09 14:53:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 成功回调
|
|
|
|
|
*/
|
|
|
|
|
function handleSuccess() {
|
|
|
|
|
(selectedRowKeys.value = []) && reload();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 操作栏
|
|
|
|
|
*/
|
|
|
|
|
function getTableAction(record) {
|
|
|
|
|
return [
|
2025-11-26 16:10:36 +08:00
|
|
|
// {
|
|
|
|
|
// label: '审核',
|
|
|
|
|
// onClick: handleEdit.bind(null, record),
|
|
|
|
|
// auth: 'cgd:nu_invoicing_cgd_main:edit',
|
|
|
|
|
// ifShow: record.status == '0'
|
|
|
|
|
// },
|
2026-04-21 13:32:33 +08:00
|
|
|
{
|
|
|
|
|
label: '确认',
|
|
|
|
|
onClick: handleQueren.bind(null, record),
|
|
|
|
|
ifShow: record.izGysConfirmed == 'Y' && record.status == '0'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '入库',
|
|
|
|
|
onClick: handleRkd.bind(null, record),
|
|
|
|
|
ifShow: record.status == '1'
|
|
|
|
|
},
|
2025-10-09 14:53:16 +08:00
|
|
|
{
|
|
|
|
|
label: '详情',
|
|
|
|
|
onClick: handleDetail.bind(null, record),
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询
|
|
|
|
|
*/
|
|
|
|
|
function searchQuery() {
|
|
|
|
|
reload();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 重置
|
|
|
|
|
*/
|
|
|
|
|
function searchReset() {
|
|
|
|
|
formRef.value.resetFields();
|
|
|
|
|
selectedRowKeys.value = [];
|
|
|
|
|
//刷新数据
|
|
|
|
|
reload();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
.jeecg-basic-table-form-container {
|
|
|
|
|
padding: 0;
|
|
|
|
|
.table-page-search-submitButtons {
|
|
|
|
|
display: block;
|
|
|
|
|
margin-bottom: 24px;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
.query-group-cust{
|
|
|
|
|
min-width: 100px !important;
|
|
|
|
|
}
|
|
|
|
|
.query-group-split-cust{
|
|
|
|
|
width: 30px;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
text-align: center
|
|
|
|
|
}
|
|
|
|
|
.ant-form-item:not(.ant-form-item-with-help){
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
height: 32px;
|
|
|
|
|
}
|
|
|
|
|
:deep(.ant-picker),:deep(.ant-input-number){
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|