| | |
| | | import { ref, reactive, onMounted } from "vue"; |
| | | import { ElMessageBox, ElMessage } from "element-plus"; |
| | | // import { downloadStreamFile } from "@/utils/download"; |
| | | import { useProcurementComplaintApi } from "/@/api/fb_p_complaints/procurementComplaint"; |
| | | import editDialog from "/@/views/fb_p_complaints/procurementComplaint/component/editDialog.vue"; |
| | | import printDialog from "/@/views/system/print/component/hiprint/preview.vue"; |
| | | // import { useProcurementComplaintApi } from "/@/api/fb_p_complaints/procurementComplaint"; |
| | | import { shouyeOrder } from "@/api/item/index"; |
| | | // import editDialog from "/@/views/fb_p_complaints/procurementComplaint/component/editDialog.vue"; |
| | | // import printDialog from "/@/views/system/print/component/hiprint/preview.vue"; |
| | | import ModifyRecord from "/@/components/table/modifyRecord.vue"; |
| | | import ImportData from "/@/components/table/importData.vue"; |
| | | import commonFunction from "@/utils/commonFunction"; |
| | | // import ImportData from "/@/components/table/importData.vue"; |
| | | // import commonFunction from "@/utils/commonFunction"; |
| | | |
| | | const { dateFormatYMD } = commonFunction(); |
| | | const procurementComplaintApi = useProcurementComplaintApi(); |
| | | // const { dateFormatYMD } = commonFunction(); |
| | | // const procurementComplaintApi = useProcurementComplaintApi(); |
| | | const printDialogRef = ref(); |
| | | const editDialogRef = ref(); |
| | | const importDataRef = ref(); |
| | |
| | | }); |
| | | |
| | | // 页面加载时 |
| | | onMounted(async () => {}); |
| | | onMounted(async () => { |
| | | handleQuery(); |
| | | }); |
| | | |
| | | // 查询操作 |
| | | const handleQuery = async (params: any = {}) => { |
| | | state.tableLoading = true; |
| | | state.tableParams = Object.assign(state.tableParams, params); |
| | | const result = await procurementComplaintApi |
| | | .page(Object.assign(state.tableQueryParams, state.tableParams)) |
| | | .then(res => res.data.result); |
| | | const result = await shouyeOrder(); |
| | | console.log(result); |
| | | |
| | | // .page(Object.assign(state.tableQueryParams, state.tableParams)) |
| | | // .then(res => res.data.result); |
| | | state.tableParams.total = result?.total; |
| | | state.tableData = result?.items ?? []; |
| | | state.tableLoading = false; |
| | |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | // 导出数据 |
| | | const exportProcurementComplaintCommand = async (command: string) => { |
| | | try { |
| | | state.exportLoading = true; |
| | | if (command === "select") { |
| | | const params = Object.assign( |
| | | {}, |
| | | state.tableQueryParams, |
| | | state.tableParams, |
| | | { selectKeyList: state.selectData.map(u => u.id) } |
| | | ); |
| | | await procurementComplaintApi |
| | | .exportData(params) |
| | | .then(res => downloadStreamFile(res)); |
| | | } else if (command === "current") { |
| | | const params = Object.assign( |
| | | {}, |
| | | state.tableQueryParams, |
| | | state.tableParams |
| | | ); |
| | | await procurementComplaintApi |
| | | .exportData(params) |
| | | .then(res => downloadStreamFile(res)); |
| | | } else if (command === "all") { |
| | | const params = Object.assign( |
| | | {}, |
| | | state.tableQueryParams, |
| | | state.tableParams, |
| | | { page: 1, pageSize: 99999999 } |
| | | ); |
| | | await procurementComplaintApi |
| | | .exportData(params) |
| | | .then(res => downloadStreamFile(res)); |
| | | } |
| | | } finally { |
| | | state.exportLoading = false; |
| | | } |
| | | }; |
| | | |
| | | handleQuery(); |
| | | </script> |
| | | <template> |
| | |
| | | <el-button |
| | | v-reclick="1000" |
| | | type="primary" |
| | | icon="ele-Search" |
| | | icon="Search" |
| | | @click="handleQuery" |
| | | > |
| | | 查询 |
| | |
| | | > |
| | | 重置 |
| | | </el-button> |
| | | <el-button |
| | | <!-- <el-button |
| | | v-if="!state.showAdvanceQueryUI" |
| | | icon="ele-ZoomIn" |
| | | style="margin-left: 5px" |
| | | @click="() => (state.showAdvanceQueryUI = true)" |
| | | > |
| | | 高级查询 |
| | | </el-button> |
| | | </el-button> --> |
| | | <el-button |
| | | v-if="state.showAdvanceQueryUI" |
| | | icon="ele-ZoomOut" |
| | |
| | | <el-button |
| | | type="danger" |
| | | style="margin-left: 5px" |
| | | icon="ele-Delete" |
| | | icon="Delete" |
| | | :disabled="state.selectData.length == 0" |
| | | @click="batchDelProcurementComplaint" |
| | | > |
| | |
| | | sortable |
| | | > |
| | | <template #default="{ row }"> |
| | | <span>{{ dateFormatYMD(null, null, row.decisionDate) }}</span> |
| | | <span>{{ row.decisionDate }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | @size-change="(val: any) => handleQuery({ pageSize: val })" |
| | | @current-change="(val: any) => handleQuery({ page: val })" |
| | | /> |
| | | <ImportData |
| | | ref="importDataRef" |
| | | :import="procurementComplaintApi.importData" |
| | | :download="procurementComplaintApi.downloadTemplate" |
| | | @refresh="handleQuery" |
| | | /> |
| | | |
| | | <printDialog |
| | | ref="printDialogRef" |
| | | :title="'打印政府采购投诉数据处理'" |