| | |
| | | // éè´-æ¥ç¥¨å°è´¦æ¥å£ |
| | | import request from '@/utils/request' |
| | | import request from "@/utils/request"; |
| | | |
| | | // æ¥è¯¢å表 |
| | | export function invoiceList(query) { |
| | | return request({ |
| | | url: '/purchase/registration/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | return request({ |
| | | url: "/purchase/registration/list", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // æ¥è¯¢è¯¦æ
|
| | | export function getInvoiceById(query) { |
| | | return request({ |
| | | url: '/purchase/registration/getRegistrationById', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | return request({ |
| | | url: "/purchase/registration/getRegistrationById", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // æ°å¢ãç¼è¾ |
| | | export function addOrUpdateInvoice(query) { |
| | | return request({ |
| | | url: '/purchase/invoice/addOrUpdateInvoice', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | return request({ |
| | | url: "/purchase/invoice/addOrUpdateInvoice", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // å é¤ |
| | | export function delInvoice(query) { |
| | | return request({ |
| | | url: '/purchase/invoice/delInvoice', |
| | | method: 'delete', |
| | | data: query |
| | | }) |
| | | return request({ |
| | | url: "/purchase/invoice/delInvoice", |
| | | method: "delete", |
| | | data: query, |
| | | }); |
| | | } |
| | | // å é¤éä»¶ |
| | | export function delCommonFile(query) { |
| | | return request({ |
| | | url: '/commonFile/delCommonFile', |
| | | method: 'delete', |
| | | data: query |
| | | }) |
| | | return request({ |
| | | url: "/commonFile/delCommonFile", |
| | | method: "delete", |
| | | data: query, |
| | | }); |
| | | } |
| | | // åè¡¨æ ¼æ¥è¯¢ |
| | | export function productRecordList(query){ |
| | | return request({ |
| | | url: '/purchase/registration/productRecordList', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | export function productRecordList(query) { |
| | | return request({ |
| | | url: "/purchase/registration/productRecordList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢å表 |
| | | export function invoiceListPage(query) { |
| | | return request({ |
| | | url: '/purchase/registration/listPage', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | return request({ |
| | | url: "/purchase/registration/listPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | export function productRecordPage(query) { |
| | | return request({ |
| | | url: "/purchase/registration/productRecordPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | |
| | | // éè´å°è´¦é¡µé¢æ¥å£ |
| | | import request from '@/utils/request' |
| | | import request from "@/utils/request"; |
| | | |
| | | // å页æ¥è¯¢ |
| | | export function purchaseList(query) { |
| | | return request({ |
| | | url: '/purchase/ledger/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | return request({ |
| | | url: "/purchase/ledger/list", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // æ¥è¯¢ååå· |
| | | export function getSalesNo(query) { |
| | | return request({ |
| | | url: '/purchase/ledger/getSalesNo', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | return request({ |
| | | url: "/purchase/ledger/getSalesNo", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // åè¡¨æ ¼æ¥è¯¢ |
| | | export function productList(query) { |
| | | return request({ |
| | | url: '/sales/product/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | return request({ |
| | | url: "/sales/product/list", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // æ°å¢ãç¼è¾ |
| | | export function addOrEditPurchase(query) { |
| | | return request({ |
| | | url: '/purchase/ledger/addOrEditPurchase', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | return request({ |
| | | url: "/purchase/ledger/addOrEditPurchase", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // å é¤ |
| | | export function delPurchase(query) { |
| | | return request({ |
| | | url: '/purchase/ledger/delPurchase', |
| | | method: 'delete', |
| | | data: query |
| | | }) |
| | | return request({ |
| | | url: "/purchase/ledger/delPurchase", |
| | | method: "delete", |
| | | data: query, |
| | | }); |
| | | } |
| | | // æ¥è¯¢è¯¦æ
|
| | | export function getPurchaseById(query) { |
| | | return request({ |
| | | url: '/purchase/ledger/getPurchaseById', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | return request({ |
| | | url: "/purchase/ledger/getPurchaseById", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // æ¥è¯¢è¯¦æ
|
| | | export function getOptions(query) { |
| | | return request({ |
| | | url: '/system/supplier/getOptions', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | return request({ |
| | | url: "/system/supplier/getOptions", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | export function purchaseListPage(query) { |
| | | return request({ |
| | | url: '/purchase/ledger/listPage', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | return request({ |
| | | url: "/purchase/ledger/listPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | export function createPurchaseNo() { |
| | | return request({ |
| | | url: "/purchase/ledger/createPurchaseNo", |
| | | method: "get", |
| | | }); |
| | | } |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <!-- <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å½å
¥æ¥æï¼" prop="createTime"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="form.createTime" |
| | | type="date" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-row> --> |
| | | <el-row> |
| | | <el-form-item label="产åä¿¡æ¯ï¼" prop="entryDate"> </el-form-item> |
| | | </el-row> |
| | |
| | | <el-table-column label="åä½" prop="unit" width="70" /> |
| | | <el-table-column label="æ°é" prop="quantity" width="70" /> |
| | | <el-table-column label="ç¨ç(%)" prop="taxRate" width="80" /> |
| | | <el-table-column label="å½å
¥æ¥æ" prop="createTime" width="120" /> |
| | | <el-table-column |
| | | label="å«ç¨åä»·(å
)" |
| | | width="150" |
| | |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="䏿¾ç¤ºå¾
忬¾"> |
| | | <el-form-item> |
| | | <el-checkbox |
| | | v-model="searchForm.status" |
| | | :label="0" |
| | | label="䏿¾ç¤ºå¾
仿¬¾ä¸º0" |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | |
| | | .table_list { |
| | | margin-top: unset; |
| | | } |
| | | ::v-deep(.el-checkbox__label) { |
| | | font-weight: bold; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title">ä¾åºååç§°ï¼</span> |
| | | <el-input v-model="searchForm.searchText" style="width: 240px" placeholder="è¾å
¥ä¾åºååç§°æç´¢" |
| | | @change="handleQuery" clearable :prefix-icon="Search" /> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px">æç´¢</el-button> |
| | | </div> |
| | | </div> |
| | | <el-form :model="searchForm" :inline="true"> |
| | | <el-form-item label="ä¾åºååç§°"> |
| | | <el-input |
| | | v-model="searchForm.searchText" |
| | | style="width: 240px" |
| | | placeholder="è¾å
¥ä¾åºååç§°æç´¢" |
| | | @change="handleQuery" |
| | | clearable |
| | | :prefix-icon="Search" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="仿¬¾æ¥æ"> |
| | | <el-date-picker |
| | | v-model="searchForm.paymentDate" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="daterange" |
| | | start-placeholder="å¼å§æ¶é´" |
| | | end-placeholder="ç»ææ¶é´" |
| | | clearable |
| | | @change="changeDateRange" |
| | | @clear="clearRange" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | @click="handleQuery" |
| | | style="margin-left: 10px" |
| | | > |
| | | æç´¢ |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="table_list"> |
| | | <PIMTable :column="tableColumn" :tableData="tableData" :page="page" :isSelection="true" |
| | | :isShowSummary="isShowSummarySon" |
| | | :summaryMethod="summarizeMainTable1" |
| | | :handleSelectionChange="handleSelectionChange" :tableLoading="tableLoading" @pagination="pagination" |
| | | :total="total"></PIMTable> |
| | | <PIMTable |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :isSelection="true" |
| | | :isShowSummary="isShowSummarySon" |
| | | :summaryMethod="summarizeMainTable1" |
| | | :handleSelectionChange="handleSelectionChange" |
| | | :tableLoading="tableLoading" |
| | | @pagination="pagination" |
| | | :total="total" |
| | | ></PIMTable> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref } from 'vue' |
| | | import { ref } from "vue"; |
| | | import { Search } from "@element-plus/icons-vue"; |
| | | import { |
| | | paymentHistoryListPage |
| | | } from "@/api/procurementManagement/paymentEntry.js"; |
| | | const { proxy } = getCurrentInstance() |
| | | import { paymentHistoryListPage } from "@/api/procurementManagement/paymentEntry.js"; |
| | | import useFormData from "@/hooks/useFormData"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const isShowSummarySon = ref(true); |
| | | const tableColumn = ref([ |
| | | { |
| | | label: '仿¬¾æ¥æ', |
| | | prop: 'paymentDate', |
| | | label: "仿¬¾æ¥æ", |
| | | prop: "paymentDate", |
| | | }, |
| | | { |
| | | label: 'ä¾åºååç§°', |
| | | prop: 'supplierName', |
| | | label: "ä¾åºååç§°", |
| | | prop: "supplierName", |
| | | }, |
| | | { |
| | | label: '仿¬¾éé¢', |
| | | prop: 'currentPaymentAmount', |
| | | label: "仿¬¾éé¢", |
| | | prop: "currentPaymentAmount", |
| | | formatData: (params) => { |
| | | return parseFloat(params).toFixed(2); |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: '仿¬¾æ¹å¼', |
| | | prop: 'paymentMethod' |
| | | label: "仿¬¾æ¹å¼", |
| | | prop: "paymentMethod", |
| | | }, |
| | | { |
| | | label: 'ç»è®°äºº', |
| | | prop: 'registrant' |
| | | label: "ç»è®°äºº", |
| | | prop: "registrant", |
| | | }, |
| | | { |
| | | label: 'ç»è®°æ¥æ', |
| | | prop: 'registrationtDate' |
| | | } |
| | | ]) |
| | | const tableData = ref([]) |
| | | const selectedRows = ref([]) |
| | | const tableLoading = ref(false) |
| | | label: "ç»è®°æ¥æ", |
| | | prop: "registrationtDate", |
| | | }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const selectedRows = ref([]); |
| | | const tableLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | }) |
| | | const total = ref(0) |
| | | const data = reactive({ |
| | | searchForm: { |
| | | searchText: '', |
| | | }, |
| | | }) |
| | | const { searchForm } = toRefs(data) |
| | | }); |
| | | const total = ref(0); |
| | | const { form: searchForm } = useFormData({ |
| | | searchText: undefined, |
| | | paymentDate: [ |
| | | dayjs().startOf("month").format("YYYY-MM-DD"), |
| | | dayjs().endOf("month").format("YYYY-MM-DD"), |
| | | ], |
| | | paymentDateStart: dayjs().startOf("month").format("YYYY-MM-DD"), |
| | | paymentDateEnd: dayjs().endOf("month").format("YYYY-MM-DD"), |
| | | }); |
| | | |
| | | // æ¥è¯¢å表 |
| | | /** æç´¢æé®æä½ */ |
| | | const handleQuery = () => { |
| | | page.current = 1 |
| | | getList() |
| | | } |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList() |
| | | } |
| | | getList(); |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true |
| | | paymentHistoryListPage({ ...searchForm.value, ...page }).then(res => { |
| | | tableLoading.value = false |
| | | tableData.value = res.records |
| | | total.value = res.total |
| | | }) |
| | | } |
| | | tableLoading.value = true; |
| | | const { paymentDate, ...rest } = searchForm; |
| | | paymentHistoryListPage({ ...rest, ...page }).then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.records; |
| | | total.value = res.total; |
| | | }); |
| | | }; |
| | | // å表åè®¡æ¹æ³ |
| | | const summarizeMainTable1 = (param) => { |
| | | return proxy.summarizeTable(param, ['currentPaymentAmount'], { |
| | | return proxy.summarizeTable(param, ["currentPaymentAmount"], { |
| | | ticketsNum: { noDecimal: true }, // ä¸ä¿çå°æ° |
| | | futureTickets: { noDecimal: true }, // ä¸ä¿çå°æ° |
| | | }); |
| | | }; |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection |
| | | } |
| | | getList() |
| | | selectedRows.value = selection; |
| | | }; |
| | | |
| | | const changeDateRange = (date) => { |
| | | if (date) { |
| | | searchForm.paymentDateStart = date[0]; |
| | | searchForm.paymentDateEnd = date[1]; |
| | | getList(); |
| | | } |
| | | }; |
| | | |
| | | const clearRange = () => { |
| | | searchForm.paymentDate = []; |
| | | searchForm.paymentDateStart = undefined; |
| | | searchForm.paymentDateEnd = undefined; |
| | | getList(); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"></style> |
| | | <style scoped lang="scss"> |
| | | .table_list { |
| | | margin-top: unset; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title">éè´ååå·ï¼</span> |
| | | <el-form :model="filters" :inline="true"> |
| | | <el-form-item label="éè´ååå·"> |
| | | <el-input |
| | | v-model="searchForm.purchaseContractNumber" |
| | | v-model="filters.purchaseContractNumber" |
| | | style="width: 240px" |
| | | placeholder="请è¾å
¥" |
| | | @change="handleQuery" |
| | | clearable |
| | | :prefix-icon="Search" |
| | | @change="getTableData" |
| | | /> |
| | | <span class="search_title" style="margin-left: 10px">ä¾åºåï¼</span> |
| | | </el-form-item> |
| | | <el-form-item label="ä¾åºå"> |
| | | <el-input |
| | | v-model="searchForm.supplierName" |
| | | v-model="filters.supplierName" |
| | | style="width: 240px" |
| | | placeholder="请è¾å
¥" |
| | | @change="handleQuery" |
| | | clearable |
| | | :prefix-icon="Search" |
| | | @change="getTableData" |
| | | /> |
| | | <span class="search_title" style="margin-left: 10px">æ¥ç¥¨æ¥æï¼</span> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥ç¥¨æ¥æ"> |
| | | <el-date-picker |
| | | style="width: 240px" |
| | | v-model="searchForm.issueDate" |
| | | v-model="filters.createdAt" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="daterange" |
| | | start-placeholder="å¼å§æ¶é´" |
| | | end-placeholder="ç»ææ¶é´" |
| | | clearable |
| | | @change="changeDateRange" |
| | | @clear="clearRange" |
| | | @change="getTableData" |
| | | /> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px" |
| | | >æç´¢</el-button |
| | | > |
| | | </div> |
| | | <div> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="getTableData">æç´¢</el-button> |
| | | <el-button @click="resetFilters"> éç½® </el-button> |
| | | <el-button @click="handleOut">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="table_list"> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | v-loading="tableLoading" |
| | | :expand-row-keys="expandedRowKeys" |
| | | :row-key="(row) => row.id" |
| | | show-summary |
| | | :summary-method="summarizeMainTable" |
| | | @expand-change="expandChange" |
| | | height="calc(100vh - 18.5em)" |
| | | <PIMTable |
| | | :column="columns" |
| | | :tableLoading="loading" |
| | | :tableData="dataList" |
| | | :isSelection="true" |
| | | :page="{ |
| | | current: pagination.currentPage, |
| | | size: pagination.pageSize, |
| | | total: pagination.total, |
| | | }" |
| | | :handleSelectionChange="handleSelectionChange" |
| | | @pagination="onCurrentChange" |
| | | > |
| | | <el-table-column align="center" label="åºå·" type="index" width="55" /> |
| | | <el-table-column type="expand"> |
| | | <template #default="props"> |
| | | <el-table |
| | | :data="props.row.children" |
| | | border |
| | | show-summary |
| | | :summary-method="summarizeChildrenTable" |
| | | > |
| | | <el-table-column |
| | | align="center" |
| | | label="åºå·" |
| | | type="index" |
| | | width="60" |
| | | /> |
| | | <el-table-column label="产å大类" prop="productCategory" /> |
| | | <el-table-column label="è§æ ¼åå·" prop="specificationModel" /> |
| | | <el-table-column label="åä½" prop="unit" /> |
| | | <el-table-column label="æ°é" prop="quantity" /> |
| | | <el-table-column label="ç¨ç(%)" prop="taxRate" /> |
| | | <el-table-column |
| | | label="å«ç¨åä»·(å
)" |
| | | prop="taxInclusiveUnitPrice" |
| | | :formatter="formattedNumber" |
| | | /> |
| | | <el-table-column |
| | | label="å«ç¨æ»ä»·(å
)" |
| | | prop="taxInclusiveTotalPrice" |
| | | :formatter="formattedNumber" |
| | | /> |
| | | <el-table-column |
| | | label="ä¸å«ç¨æ»ä»·(å
)" |
| | | prop="taxExclusiveTotalPrice" |
| | | :formatter="formattedNumber" |
| | | /> |
| | | <el-table-column label="æ¬æ¬¡æ¥ç¥¨æ°" prop="ticketsNum" /> |
| | | <el-table-column |
| | | label="æ¬æ¬¡æ¥ç¥¨éé¢(å
)" |
| | | prop="ticketsAmount" |
| | | :formatter="formattedNumber" |
| | | /> |
| | | <el-table-column label="æªæ¥ç¥¨æ°" prop="futureTickets" /> |
| | | <el-table-column |
| | | label="æªæ¥ç¥¨éé¢(å
)" |
| | | prop="futureTicketsAmount" |
| | | :formatter="formattedNumber" |
| | | /> |
| | | </el-table> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="éè´ååå·" |
| | | prop="purchaseContractNumber" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="éå®ååå·" |
| | | prop="salesContractNo" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="ä¾åºååç§°" |
| | | prop="supplierName" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="å票å·" |
| | | prop="invoiceNumber" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="ååéé¢(å
)" |
| | | prop="invoiceAmount" |
| | | show-overflow-tooltip |
| | | :formatter="formattedNumber" |
| | | /> |
| | | <el-table-column label="å¼ç¥¨äºº" prop="issUer" show-overflow-tooltip /> |
| | | <el-table-column |
| | | label="å¼ç¥¨æ¥æ" |
| | | prop="issueDate" |
| | | show-overflow-tooltip |
| | | /> |
| | | </el-table> |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :page="page.current" |
| | | :limit="page.size" |
| | | @pagination="paginationChange" |
| | | /> |
| | | <!-- <template #operation> |
| | | <el-button type="primary" text @click="handleEdit" size="small"> |
| | | ç¼è¾ |
| | | </el-button> |
| | | </template> --> |
| | | </PIMTable> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import pagination from "@/components/PIMTable/Pagination.vue"; |
| | | import { ref } from "vue"; |
| | | import { ref, getCurrentInstance } from "vue"; |
| | | import { usePaginationApi } from "@/hooks/usePaginationApi"; |
| | | import { Search } from "@element-plus/icons-vue"; |
| | | import { productRecordPage } from "@/api/procurementManagement/procurementInvoiceLedger.js"; |
| | | import { onMounted } from "vue"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import { productRecordList } from "@/api/procurementManagement/procurementInvoiceLedger.js"; |
| | | import { invoiceListPage } from "@/api/procurementManagement/procurementInvoiceLedger.js"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | defineOptions({ |
| | | name: "æ¥ç¥¨å°è´¦", |
| | | }); |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | }); |
| | | const total = ref(0); |
| | | // ç¨æ·ä¿¡æ¯è¡¨åå¼¹æ¡æ°æ® |
| | | const data = reactive({ |
| | | searchForm: { |
| | | purchaseContractNumber: "", |
| | | supplierName: "", |
| | | issueDate: [ |
| | | dayjs().startOf("month").format("YYYY-MM-DD"), |
| | | dayjs().endOf("month").format("YYYY-MM-DD"), |
| | | ], |
| | | issueDateStart: dayjs().startOf("month").format("YYYY-MM-DD"), |
| | | issueDateEnd: dayjs().endOf("month").format("YYYY-MM-DD"), |
| | | const multipleVal = ref([]); |
| | | const { |
| | | loading, |
| | | filters, |
| | | columns, |
| | | dataList, |
| | | pagination, |
| | | getTableData, |
| | | resetFilters, |
| | | onCurrentChange, |
| | | } = usePaginationApi( |
| | | productRecordPage, |
| | | { |
| | | purchaseContractNumber: undefined, // éè´ååå· |
| | | supplierName: undefined, // ä¾åºå |
| | | createdAt: [], // æ¥ç¥¨æ¥æ |
| | | }, |
| | | form: { |
| | | issueDate: "", // å¼ç¥¨æ¥æ |
| | | purchaseLedgerId: "", |
| | | purchaseLedgerNo: "", |
| | | issUerId: "", // å¼ç¥¨äººid |
| | | issUer: "", // å¼ç¥¨äººå§å |
| | | }, |
| | | rules: { |
| | | purchaseLedgerId: [ |
| | | { required: true, message: "è¯·éæ©", trigger: "change" }, |
| | | ], |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | |
| | | // æ¥è¯¢å表 |
| | | /** æç´¢æé®æä½ */ |
| | | const handleQuery = () => { |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | const paginationChange = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | const { issueDate, ...rest } = searchForm.value; |
| | | invoiceListPage({ ...rest, ...page }) |
| | | .then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.records; |
| | | tableData.value.map((item) => { |
| | | item.children = []; |
| | | }); |
| | | total.value = res.total; |
| | | expandedRowKeys.value = []; |
| | | }) |
| | | .catch(() => { |
| | | tableLoading.value = false; |
| | | }); |
| | | }; |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(2); |
| | | }; |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const expandedRowKeys = ref([]); |
| | | // å±å¼è¡ |
| | | const expandChange = (row, expandedRows) => { |
| | | if (expandedRows.length > 0) { |
| | | expandedRowKeys.value = []; |
| | | try { |
| | | productRecordList({ id: row.id }).then((res) => { |
| | | const index = tableData.value.findIndex((item) => item.id === row.id); |
| | | if (index > -1) { |
| | | tableData.value[index].children = res; |
| | | } |
| | | expandedRowKeys.value.push(row.id); |
| | | }); |
| | | } catch (error) { |
| | | console.log(error); |
| | | } |
| | | } else { |
| | | expandedRowKeys.value = []; |
| | | } |
| | | }; |
| | | // 主表åè®¡æ¹æ³ |
| | | const summarizeMainTable = (param) => { |
| | | return proxy.summarizeTable(param, ["invoiceAmount"], { |
| | | ticketsNum: { noDecimal: true }, // ä¸ä¿çå°æ° |
| | | futureTickets: { noDecimal: true }, // ä¸ä¿çå°æ° |
| | | }); |
| | | }; |
| | | // å表åè®¡æ¹æ³ |
| | | const summarizeChildrenTable = (param) => { |
| | | return proxy.summarizeTable( |
| | | param, |
| | | [ |
| | | "taxInclusiveUnitPrice", |
| | | "taxInclusiveTotalPrice", |
| | | "taxExclusiveTotalPrice", |
| | | "ticketsNum", |
| | | "ticketsAmount", |
| | | "futureTickets", |
| | | "futureTicketsAmount", |
| | | ], |
| | | [ |
| | | { |
| | | ticketsNum: { noDecimal: true }, // ä¸ä¿çå°æ° |
| | | futureTickets: { noDecimal: true }, // ä¸ä¿çå°æ° |
| | | } |
| | | ); |
| | | label: "éè´ååå·", |
| | | prop: "purchaseContractNumber", |
| | | align: "center", |
| | | }, |
| | | { |
| | | label: "éå®ååå·", |
| | | prop: "salesContractNo", |
| | | align: "center", |
| | | }, |
| | | { |
| | | label: "客æ·åç§°", |
| | | prop: "customerName", |
| | | align: "center", |
| | | }, |
| | | { |
| | | label: "ä¾åºååç§°", |
| | | prop: "supplierName", |
| | | align: "center", |
| | | }, |
| | | { |
| | | label: "è§æ ¼åå·", |
| | | prop: "specificationModel", |
| | | align: "center", |
| | | }, |
| | | { |
| | | label: "å票å·", |
| | | prop: "invoiceNumber", |
| | | align: "center", |
| | | }, |
| | | { |
| | | label: "ååéé¢(å
)", |
| | | prop: "taxInclusiveTotalPrice", |
| | | align: "center", |
| | | formatData: (cell) => { |
| | | return parseFloat(cell).toFixed(2); |
| | | }, |
| | | }, |
| | | { |
| | | label: "å¼ç¥¨æ¥æ", |
| | | prop: "createdAt", |
| | | align: "center", |
| | | }, |
| | | { |
| | | label: "å¼ç¥¨éé¢", |
| | | prop: "ticketsAmount", |
| | | align: "center", |
| | | formatData: (cell) => { |
| | | return parseFloat(cell).toFixed(2); |
| | | }, |
| | | }, |
| | | { |
| | | label: "ä¸å«ç¨éé¢", |
| | | prop: "unTicketsPrice", |
| | | align: "center", |
| | | formatData: (cell) => { |
| | | return parseFloat(cell).toFixed(2); |
| | | }, |
| | | }, |
| | | { |
| | | label: "å¢å¼ç¨", |
| | | prop: "invoiceAmount", |
| | | align: "center", |
| | | }, |
| | | // { |
| | | // fixed: "right", |
| | | // width: 120, |
| | | // label: "æä½", |
| | | // dataType: "slot", |
| | | // slot: "operation", |
| | | // align: "center", |
| | | // }, |
| | | ], |
| | | {}, |
| | | { |
| | | createdAt: (aim) => ({ |
| | | createdAtStart: aim[0], |
| | | createdAtEnd: aim[1], |
| | | }), |
| | | } |
| | | ); |
| | | |
| | | const handleSelectionChange = (val) => { |
| | | multipleVal.value = val; |
| | | }; |
| | | |
| | | // å¯¼åº |
| | |
| | | }); |
| | | }; |
| | | |
| | | const changeDateRange = (date) => { |
| | | if (date) { |
| | | searchForm.receiptPaymentDateStart = date[0]; |
| | | searchForm.receiptPaymentDateEnd = date[1]; |
| | | getList(); |
| | | } |
| | | }; |
| | | |
| | | const clearRange = () => { |
| | | searchForm.value.issueDate = []; |
| | | searchForm.value.issueDateStart = undefined; |
| | | searchForm.value.issueDateEnd = undefined; |
| | | getList(); |
| | | }; |
| | | // const handleEdit = () => {}; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | getTableData(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"></style> |
| | | <style lang="scss" scoped> |
| | | .table_list { |
| | | margin-top: unset; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title">éè´ååå·ï¼</span> |
| | | <el-input |
| | | v-model="searchForm.purchaseContractNumber" |
| | | style="width: 240px" |
| | | placeholder="请è¾å
¥" |
| | | @change="handleQuery" |
| | | clearable |
| | | :prefix-icon="Search" |
| | | /> |
| | | <span class="search_title" style="margin-left: 10px">ä¾åºåï¼</span> |
| | | <el-input |
| | | v-model="searchForm.supplierName" |
| | | style="width: 240px" |
| | | placeholder="请è¾å
¥" |
| | | @change="handleQuery" |
| | | clearable |
| | | :prefix-icon="Search" |
| | | /> |
| | | <span class="search_title" style="margin-left: 10px">æ¥ç¥¨æ¥æï¼</span> |
| | | <el-date-picker |
| | | style="width: 240px" |
| | | v-model="searchForm.issueDate" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="daterange" |
| | | start-placeholder="å¼å§æ¶é´" |
| | | end-placeholder="ç»ææ¶é´" |
| | | clearable |
| | | @change="changeDateRange" |
| | | @clear="clearRange" |
| | | /> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px" |
| | | >æç´¢</el-button |
| | | > |
| | | </div> |
| | | <div> |
| | | <el-button @click="handleOut">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | v-loading="tableLoading" |
| | | :expand-row-keys="expandedRowKeys" |
| | | :row-key="(row) => row.id" |
| | | show-summary |
| | | :summary-method="summarizeMainTable" |
| | | @expand-change="expandChange" |
| | | height="calc(100vh - 18.5em)" |
| | | > |
| | | <el-table-column align="center" label="åºå·" type="index" width="55" /> |
| | | <el-table-column type="expand"> |
| | | <template #default="props"> |
| | | <el-table |
| | | :data="props.row.children" |
| | | border |
| | | show-summary |
| | | :summary-method="summarizeChildrenTable" |
| | | > |
| | | <el-table-column |
| | | align="center" |
| | | label="åºå·" |
| | | type="index" |
| | | width="60" |
| | | /> |
| | | <el-table-column label="产å大类" prop="productCategory" /> |
| | | <el-table-column label="è§æ ¼åå·" prop="specificationModel" /> |
| | | <el-table-column label="åä½" prop="unit" /> |
| | | <el-table-column label="æ°é" prop="quantity" /> |
| | | <el-table-column label="ç¨ç(%)" prop="taxRate" /> |
| | | <el-table-column |
| | | label="å«ç¨åä»·(å
)" |
| | | prop="taxInclusiveUnitPrice" |
| | | :formatter="formattedNumber" |
| | | /> |
| | | <el-table-column |
| | | label="å«ç¨æ»ä»·(å
)" |
| | | prop="taxInclusiveTotalPrice" |
| | | :formatter="formattedNumber" |
| | | /> |
| | | <el-table-column |
| | | label="ä¸å«ç¨æ»ä»·(å
)" |
| | | prop="taxExclusiveTotalPrice" |
| | | :formatter="formattedNumber" |
| | | /> |
| | | <el-table-column label="æ¬æ¬¡æ¥ç¥¨æ°" prop="ticketsNum" /> |
| | | <el-table-column |
| | | label="æ¬æ¬¡æ¥ç¥¨éé¢(å
)" |
| | | prop="ticketsAmount" |
| | | :formatter="formattedNumber" |
| | | /> |
| | | <el-table-column label="æªæ¥ç¥¨æ°" prop="futureTickets" /> |
| | | <el-table-column |
| | | label="æªæ¥ç¥¨éé¢(å
)" |
| | | prop="futureTicketsAmount" |
| | | :formatter="formattedNumber" |
| | | /> |
| | | </el-table> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="éè´ååå·" |
| | | prop="purchaseContractNumber" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="éå®ååå·" |
| | | prop="salesContractNo" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="ä¾åºååç§°" |
| | | prop="supplierName" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="å票å·" |
| | | prop="invoiceNumber" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="ååéé¢(å
)" |
| | | prop="invoiceAmount" |
| | | show-overflow-tooltip |
| | | :formatter="formattedNumber" |
| | | /> |
| | | <el-table-column label="å¼ç¥¨äºº" prop="issUer" show-overflow-tooltip /> |
| | | <el-table-column |
| | | label="å¼ç¥¨æ¥æ" |
| | | prop="issueDate" |
| | | show-overflow-tooltip |
| | | /> |
| | | </el-table> |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :page="page.current" |
| | | :limit="page.size" |
| | | @pagination="paginationChange" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import pagination from "@/components/PIMTable/Pagination.vue"; |
| | | import { ref } from "vue"; |
| | | import { Search } from "@element-plus/icons-vue"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import { |
| | | invoiceListPage, |
| | | productRecordList, |
| | | } from "@/api/procurementManagement/procurementInvoiceLedger.js"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | }); |
| | | const total = ref(0); |
| | | // ç¨æ·ä¿¡æ¯è¡¨åå¼¹æ¡æ°æ® |
| | | const data = reactive({ |
| | | searchForm: { |
| | | purchaseContractNumber: "", |
| | | supplierName: "", |
| | | issueDate: [ |
| | | dayjs().startOf("month").format("YYYY-MM-DD"), |
| | | dayjs().endOf("month").format("YYYY-MM-DD"), |
| | | ], |
| | | issueDateStart: dayjs().startOf("month").format("YYYY-MM-DD"), |
| | | issueDateEnd: dayjs().endOf("month").format("YYYY-MM-DD"), |
| | | }, |
| | | form: { |
| | | issueDate: "", // å¼ç¥¨æ¥æ |
| | | purchaseLedgerId: "", |
| | | purchaseLedgerNo: "", |
| | | issUerId: "", // å¼ç¥¨äººid |
| | | issUer: "", // å¼ç¥¨äººå§å |
| | | }, |
| | | rules: { |
| | | purchaseLedgerId: [ |
| | | { required: true, message: "è¯·éæ©", trigger: "change" }, |
| | | ], |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | |
| | | // æ¥è¯¢å表 |
| | | /** æç´¢æé®æä½ */ |
| | | const handleQuery = () => { |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | const paginationChange = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | const { issueDate, ...rest } = searchForm.value; |
| | | invoiceListPage({ ...rest, ...page }) |
| | | .then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.records; |
| | | tableData.value.map((item) => { |
| | | item.children = []; |
| | | }); |
| | | total.value = res.total; |
| | | expandedRowKeys.value = []; |
| | | }) |
| | | .catch(() => { |
| | | tableLoading.value = false; |
| | | }); |
| | | }; |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(2); |
| | | }; |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const expandedRowKeys = ref([]); |
| | | // å±å¼è¡ |
| | | const expandChange = (row, expandedRows) => { |
| | | if (expandedRows.length > 0) { |
| | | expandedRowKeys.value = []; |
| | | try { |
| | | productRecordList({ id: row.id }).then((res) => { |
| | | const index = tableData.value.findIndex((item) => item.id === row.id); |
| | | if (index > -1) { |
| | | tableData.value[index].children = res; |
| | | } |
| | | expandedRowKeys.value.push(row.id); |
| | | }); |
| | | } catch (error) { |
| | | console.log(error); |
| | | } |
| | | } else { |
| | | expandedRowKeys.value = []; |
| | | } |
| | | }; |
| | | // 主表åè®¡æ¹æ³ |
| | | const summarizeMainTable = (param) => { |
| | | return proxy.summarizeTable(param, ["invoiceAmount"], { |
| | | ticketsNum: { noDecimal: true }, // ä¸ä¿çå°æ° |
| | | futureTickets: { noDecimal: true }, // ä¸ä¿çå°æ° |
| | | }); |
| | | }; |
| | | // å表åè®¡æ¹æ³ |
| | | const summarizeChildrenTable = (param) => { |
| | | return proxy.summarizeTable( |
| | | param, |
| | | [ |
| | | "taxInclusiveUnitPrice", |
| | | "taxInclusiveTotalPrice", |
| | | "taxExclusiveTotalPrice", |
| | | "ticketsNum", |
| | | "ticketsAmount", |
| | | "futureTickets", |
| | | "futureTicketsAmount", |
| | | ], |
| | | { |
| | | ticketsNum: { noDecimal: true }, // ä¸ä¿çå°æ° |
| | | futureTickets: { noDecimal: true }, // ä¸ä¿çå°æ° |
| | | } |
| | | ); |
| | | }; |
| | | |
| | | // å¯¼åº |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/purchase/registration/export", {}, "æ¥ç¥¨ç»è®°.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | |
| | | const changeDateRange = (date) => { |
| | | if (date) { |
| | | searchForm.value.receiptPaymentDateStart = date[0]; |
| | | searchForm.value.receiptPaymentDateEnd = date[1]; |
| | | getList(); |
| | | } |
| | | }; |
| | | |
| | | const clearRange = () => { |
| | | searchForm.value.issueDate = []; |
| | | searchForm.value.issueDateStart = undefined; |
| | | searchForm.value.issueDateEnd = undefined; |
| | | getList(); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"></style> |
| | |
| | | placeholder="请è¾å
¥" |
| | | @change="handleQuery" |
| | | clearable |
| | | prefix-icon="Search" |
| | | :prefix-icon="Search" |
| | | /> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px" |
| | | >æç´¢</el-button |
| | |
| | | productList, |
| | | getPurchaseById, |
| | | getOptions, |
| | | createPurchaseNo, |
| | | } from "@/api/procurementManagement/procurementLedger.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const tableData = ref([]); |
| | |
| | | form.value = {}; |
| | | productData.value = []; |
| | | fileList.value = []; |
| | | if (operationType.value == "add") { |
| | | createPurchaseNo().then((res) => { |
| | | form.value.purchaseContractNumber = res.data; |
| | | }); |
| | | } |
| | | userListNoPage().then((res) => { |
| | | userList.value = res.data; |
| | | }); |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form class="search_form" :inline="true" label-width="80px"> |
| | | <el-form :model="filters" :inline="true" label-width="80px"> |
| | | <el-form-item label="客æ·åç§°"> |
| | | <el-input v-model="filters.customerName" placeholder="请è¾å
¥å®¢æ·åç§°" /> |
| | | </el-form-item> |
| | |
| | | :page="{ |
| | | current: pagination.currentPage, |
| | | size: pagination.pageSize, |
| | | total: pagination.total, |
| | | }" |
| | | @pagination="onCurrentChange" |
| | | ></PIMTable> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="filters" :inline="true"> |
| | | <el-form-item label="æ¥æ"> |
| | | <el-date-picker |
| | | style="width: 240px" |
| | | v-model="filters.dateRange" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="daterange" |
| | | start-placeholder="å¼å§æ¶é´" |
| | | end-placeholder="ç»ææ¶é´" |
| | | clearable |
| | | @change="getTableData" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="getTableData"> æç´¢ </el-button> |
| | | <el-button @click="resetFilters"> éç½® </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="table_list"> |
| | | <PIMTable |
| | | :column="columns" |
| | | :tableData="dataList" |
| | | :page="{ |
| | | current: pagination.currentPage, |
| | | size: pagination.pageSize, |
| | | total: pagination.total, |
| | | }" |
| | | @pagination="onCurrentChange" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { usePaginationApi } from "@/hooks/usePaginationApi"; |
| | | import { onMounted } from "vue"; |
| | | |
| | | defineOptions({ |
| | | name: "å¢å¼ç¨æ¯å¯¹", |
| | | }); |
| | | |
| | | const { |
| | | loading, |
| | | filters, |
| | | columns, |
| | | dataList, |
| | | pagination, |
| | | getTableData, |
| | | resetFilters, |
| | | onCurrentChange, |
| | | } = usePaginationApi( |
| | | () => {}, |
| | | { |
| | | dateRange: [], // æ¥ç¥¨æ¥æ |
| | | }, |
| | | [ |
| | | { |
| | | label: "æä»½", |
| | | }, |
| | | { |
| | | label: "é项ç¨é¢", |
| | | }, |
| | | { |
| | | label: "è¿é¡¹ç¨é¢", |
| | | }, |
| | | { |
| | | label: "é-è¿", |
| | | }, |
| | | ], |
| | | {}, |
| | | { |
| | | dateRange: (aim) => ({ |
| | | dateRangeStart: aim[0], |
| | | dateRangeEnd: aim[1], |
| | | }), |
| | | } |
| | | ); |
| | | |
| | | onMounted(() => { |
| | | getTableData(); |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .table_list { |
| | | margin-top: unset; |
| | | } |
| | | </style> |
| | |
| | | @clear="clearRange" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="䏿¾ç¤ºæå票è¡"> |
| | | <el-checkbox v-model="searchForm.status" @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="handleQuery"> æç´¢ </el-button> |
| | | <el-button @click="resetForm"> éç½® </el-button> |
| | |
| | | /> |
| | | <el-table-column label="ç¨ç" prop="taxRate" show-overflow-tooltip /> |
| | | <el-table-column |
| | | label="å¼ç¥¨äºº" |
| | | label="å½å
¥äºº" |
| | | prop="invoicePerson" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="å½å
¥æ¥æ" |
| | | prop="createTime" |
| | | show-overflow-tooltip |
| | | :formatter="formatDate" |
| | | /> |
| | | <el-table-column |
| | | label="å¼ç¥¨æ¥æ" |
| | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | searchText: "", |
| | | status: false, |
| | | invoiceDate: [ |
| | | dayjs().startOf("month").format("YYYY-MM-DD"), |
| | | dayjs().endOf("month").format("YYYY-MM-DD"), |
| | |
| | | const formattedNumber = (row, column, cellValue) => { |
| | | return parseFloat(cellValue).toFixed(2); |
| | | }; |
| | | const formatDate = (row, column, cellValue) => { |
| | | return dayjs(cellValue).format("YYYY-MM-DD HH:mm:ss"); |
| | | }; |
| | | // æ¥è¯¢å表 |
| | | /** æç´¢æé®æä½ */ |
| | | const handleQuery = () => { |
| | |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æªå¼ç¥¨é颿¯å¦ä¸º0"> |
| | | <el-select v-model="searchForm.status" style="width: 90px" clearable> |
| | | <el-option label="å¦" :value="0" /> |
| | | <el-option label="æ¯" :value="1" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="客æ·ååå·"> |
| | | <el-input |
| | | v-model="searchForm.customerContractNo" |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-checkbox |
| | | v-model="searchForm.status" |
| | | label="䏿¾ç¤ºæªå¼ç¥¨éé¢ä¸º0" |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="handleQuery"> æç´¢ </el-button> |
| | | <el-button @click="resetForm"> éç½® </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_list"> |
| | | <el-button type="primary" @click="openForm" style="margin-bottom: 8px"> |
| | | æ°å¢ç»è®° |
| | | </el-button> |
| | | <div class="flex justify-between"> |
| | | <div></div> |
| | | <el-button type="primary" @click="openForm" style="margin-bottom: 8px"> |
| | | æ°å¢ç»è®° |
| | | </el-button> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | | :border="true" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å½å
¥äºº"> |
| | | <el-input v-model="form.createUer" placeholder="请è¾å
¥å½å
¥äºº" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¼ç¥¨æ¥æ" prop="issueDate"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="form.issueDate" |
| | | type="date" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å½å
¥æ¥æï¼" prop="createTime"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="form.createTime" |
| | | type="date" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å票å·ç ï¼" prop="invoiceNo"> |
| | | <el-input |
| | | v-model="form.invoiceNo" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-form-item label="产åä¿¡æ¯ï¼" prop="entryDate"> </el-form-item> |
| | | </el-row> |
| | |
| | | min="0" |
| | | disabled |
| | | v-model="scope.row.noInvoiceAmount" |
| | | :formatter="formattedInputNumber" |
| | | :precision="2" |
| | | :step="0.01" |
| | | ></el-input> |
| | |
| | | |
| | | <script setup> |
| | | import pagination from "@/components/PIMTable/Pagination.vue"; |
| | | import { ref } from "vue"; |
| | | import { onMounted, ref } from "vue"; |
| | | import { Search } from "@element-plus/icons-vue"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | // import {userListNoPage} from "@/api/system/user.js"; |
| | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | customerName: "", |
| | | status: 0, |
| | | status: false, |
| | | customerContractNo: undefined, // 客æ·ååå· |
| | | projectName: undefined, // 项ç®åç§° |
| | | createUer: undefined, // å½å
¥äºº |
| | | issueDate: undefined, // å¼ç¥¨æ¥æ |
| | | createTime: undefined, // å½å
¥æ¥æï¼ |
| | | }, |
| | | form: { |
| | | salesLedgerId: "", |
| | |
| | | return cellValue; |
| | | } |
| | | }; |
| | | |
| | | const formattedInputNumber = (value) => { |
| | | return parseFloat(value).toFixed(2); |
| | | }; |
| | | |
| | | // æ¥è¯¢å表 |
| | | /** æç´¢æé®æä½ */ |
| | | const handleQuery = () => { |
| | |
| | | ).toFixed(2); |
| | | }; |
| | | |
| | | getList(); |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .table_list { |
| | | margin-top: unset; |
| | | } |
| | | .flex { |
| | | display: flex; |
| | | } |
| | | .justify-between { |
| | | justify-content: space-between; |
| | | } |
| | | ::v-deep(.el-checkbox__label) { |
| | | font-weight: bold; |
| | | } |
| | | </style> |
| | |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="䏿¾ç¤ºå¾
忬¾"> |
| | | <el-form-item> |
| | | <el-checkbox |
| | | v-model="searchForm.status" |
| | | :label="0" |
| | | label="䏿¾ç¤ºå¾
忬¾ä¸º0" |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | |
| | | /> |
| | | <el-table-column |
| | | label="项ç®åç§°" |
| | | prop="customerName" |
| | | prop="projectName" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | |
| | | .table_list { |
| | | margin-top: unset; |
| | | } |
| | | ::v-deep(.el-checkbox__label) { |
| | | font-weight: bold; |
| | | } |
| | | </style> |
| | |
| | | prop: "customerName", |
| | | }, |
| | | { |
| | | label: "项ç®åç§°", |
| | | prop: "projectName", |
| | | }, |
| | | { |
| | | label: "忬¾éé¢ï¼å
ï¼", |
| | | prop: "receiptPaymentAmount", |
| | | formatData: (params) => { |
| | |
| | | const summarizeMainTable1 = (param) => { |
| | | var summarizeTable = proxy.summarizeTable( |
| | | param, |
| | | ["invoiceAmount", "receiptAmount"], |
| | | ["invoiceAmount", "receiptAmount", "unReceiptAmount"], |
| | | { |
| | | ticketsNum: { noDecimal: true }, // ä¸ä¿çå°æ° |
| | | futureTickets: { noDecimal: true }, // ä¸ä¿çå°æ° |
| | | } |
| | | ); |
| | | // åæåä¸è¡æ°æ®; |
| | | if (receiptRecord.value?.length > 0) { |
| | | const index = tableData.value.findIndex( |
| | | (item) => item.id == customerId.value |
| | | ); |
| | | summarizeTable[summarizeTable.length - 1] = |
| | | tableData.value[index].unReceiptPaymentAmount.toFixed(2); |
| | | } else { |
| | | summarizeTable[summarizeTable.length - 1] = 0.0; |
| | | } |
| | | // if (receiptRecord.value?.length > 0) { |
| | | // const index = tableData.value.findIndex( |
| | | // (item) => item.id == customerId.value |
| | | // ); |
| | | // summarizeTable[summarizeTable.length - 1] = |
| | | // tableData.value[index].unReceiptPaymentAmount.toFixed(2); |
| | | // } else { |
| | | // summarizeTable[summarizeTable.length - 1] = 0.0; |
| | | // } |
| | | // const sb = tableData.findIndex((item) => item.id == customerId.value); |
| | | // console.log(sb); |
| | | return summarizeTable; |