From b3af089315a98903163a394a3b1ca0e4c634b9ab Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 14 一月 2026 17:51:37 +0800
Subject: [PATCH] Merge branch 'dev_New' of http://114.132.189.42:9002/r/product-inventory-management into dev_New
---
src/views/procurementManagement/paymentEntry/index.vue | 644 +++++++++++++++++++++++++++++++++-------------------------
1 files changed, 366 insertions(+), 278 deletions(-)
diff --git a/src/views/procurementManagement/paymentEntry/index.vue b/src/views/procurementManagement/paymentEntry/index.vue
index 4c4cdaf..89152bf 100644
--- a/src/views/procurementManagement/paymentEntry/index.vue
+++ b/src/views/procurementManagement/paymentEntry/index.vue
@@ -30,35 +30,14 @@
<el-button type="primary" @click="openForm('add')">
鏂板浠樻
</el-button>
- <el-button type="danger" plain @click="handleDelete">
- 鍒犻櫎
- </el-button>
+ <el-button @click="handleExport" style="margin-right: 10px">瀵煎嚭</el-button>
+<!-- <el-button type="danger" plain @click="handleDelete">-->
+<!-- 鍒犻櫎-->
+<!-- </el-button>-->
</el-form-item>
</el-col>
</el-row>
</el-form>
- <!-- <div>
- <span class="search_title">渚涘簲鍟嗗悕绉�/鍚堝悓鍙凤細</span>
- <el-input
- v-model="searchForm.supplierNameOrContractNo"
- 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-button type="primary" @click="openForm('add')">鏂板浠樻</el-button>
- <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
- </div> -->
</div>
<div class="table_list">
<PIMTable
@@ -66,155 +45,183 @@
:column="tableColumn"
:tableData="tableData"
:page="page"
+ :expandRowKeys="expandedRowKeys"
:isSelection="true"
:isShowSummary="isShowSummarySon"
:summaryMethod="summarizeMainTable1"
@selection-change="handleSelectionChange"
+ @expand-change="expandChange"
:tableLoading="tableLoading"
@pagination="pagination"
:total="page.total"
- ></PIMTable>
- </div>
- <el-dialog
- v-model="dialogFormVisible"
- :title="operationType === 'add' ? '鏂板浠樻鐧昏' : '缂栬緫浠樻鐧昏'"
- width="60%"
- @close="closeDia"
- >
- <el-form
- :model="form"
- label-width="140px"
- label-position="top"
- :rules="rules"
- ref="formRef"
>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="閲囪喘鍚堝悓鍙凤細" prop="purchaseContractNumber">
- <el-input
- v-model="form.purchaseContractNumber"
- placeholder="鑷姩濉厖"
- clearable
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="閿�鍞悎鍚屽彿锛�" prop="salesContractNo">
- <el-input
- v-model="form.salesContractNo"
- placeholder="鑷姩濉厖"
- clearable
- disabled
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="渚涘簲鍟嗗悕绉帮細" prop="supplierName">
- <el-input
- v-model="form.supplierName"
- placeholder="鑷姩濉厖"
- clearable
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鍙戠エ鍙凤細" prop="invoiceNumber">
- <el-input
- v-model="form.invoiceNumber"
- placeholder="鑷姩濉厖"
- clearable
- disabled
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="鍙戠エ閲戦(鍏�)锛�" prop="invoiceAmount">
- <el-input
- v-model="form.invoiceAmount"
- placeholder="鑷姩濉厖"
- clearable
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鏈浠樻閲戦锛�" prop="currentPaymentAmount">
- <el-input-number :step="0.01" :min="0" style="width: 100%"
- v-model="form.currentPaymentAmount"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="浠樻鏂瑰紡锛�" prop="paymentMethod">
- <el-select
- v-model="form.paymentMethod"
- placeholder="璇烽�夋嫨"
- clearable
- >
- <el-option label="鐢垫眹" value="鐢垫眹" />
- <el-option label="鎵垮厬" value="鎵垮厬" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鐧昏浜猴細" prop="registrant">
- <el-input
- v-model="form.registrant"
- placeholder="璇疯緭鍏�"
- clearable
- disabled
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="浠樻鏃ユ湡锛�" prop="paymentDate">
- <el-date-picker
- style="width: 100%"
- v-model="form.paymentDate"
- value-format="YYYY-MM-DD"
- format="YYYY-MM-DD"
- type="date"
- placeholder="璇烽�夋嫨"
- clearable
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鐧昏鏃ユ湡锛�" prop="registrationtDate">
- <el-input
- v-model="form.registrationtDate"
- placeholder="璇疯緭鍏�"
- clearable
- disabled
- />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <template #footer>
- <div class="dialog-footer">
- <el-button type="primary" @click="submitForm">纭</el-button>
- <el-button @click="closeDia">鍙栨秷</el-button>
- </div>
- </template>
- </el-dialog>
+ <template #expand="{ row }">
+ <el-table
+ :data="expandData"
+ border
+ show-summary
+ v-loading="childrenLoading"
+ :summary-method="summarizeMainTable2"
+ >
+ <el-table-column
+ align="center"
+ label="搴忓彿"
+ type="index"
+ width="60"
+ />
+ <el-table-column label="浠樻鏃ユ湡" prop="paymentDate" />
+ <el-table-column label="浠樻閲戦" prop="currentPaymentAmount">
+ <template #default="scope">
+ <el-input-number :step="0.01" :min="0" style="width: 100%"
+ v-model="scope.row.currentPaymentAmount"
+ :disabled="!scope.row.editType"
+ :precision="2"
+ placeholder="璇疯緭鍏�"
+ clearable
+ />
+ </template>
+ </el-table-column>
+ <el-table-column label="浠樻鏂瑰紡" prop="paymentMethod">
+ <template #default="scope">
+ <el-select
+ :disabled="!scope.row.editType"
+ v-model="scope.row.paymentMethod"
+ placeholder="璇烽�夋嫨"
+ clearable
+ >
+ <el-option label="鐢垫眹" value="鐢垫眹" />
+ <el-option label="鎵垮厬" value="鎵垮厬" />
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column label="鐧昏浜�" prop="registrant" />
+ <el-table-column label="鐧昏鏃ユ湡" prop="registrationtDate" />
+ <el-table-column label="鎿嶄綔" width="150">
+ <template #default="scope">
+ <el-button
+ link
+ type="primary"
+ size="small"
+ @click="changeEditType(scope.row)"
+ v-if="!scope.row.editType"
+ >缂栬緫</el-button
+ >
+ <el-button
+ link
+ type="primary"
+ size="small"
+ @click="saveReceiptPayment(scope.row)"
+ v-if="scope.row.editType"
+ >淇濆瓨</el-button
+ >
+ <el-button
+ link
+ type="primary"
+ size="small"
+ @click="handleDelete(scope.row)"
+ >鍒犻櫎</el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
+ </template>
+ </PIMTable>
+ </div>
+ <FormDialog
+ v-model="dialogFormVisible"
+ title="鏂板浠樻椤甸潰"
+ :width="'90%'"
+ @close="closeDia"
+ @confirm="submitForm"
+ @cancel="closeDia"
+ >
+ <el-table
+ v-if="forms.length"
+ :data="forms"
+ border
+ style="width: 100%"
+ size="small"
+ >
+ <el-table-column type="index" label="搴忓彿" width="50" align="center"/>
+ <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="productCategory"
+ show-overflow-tooltip
+ width="100"
+ />
+ <el-table-column
+ label="瑙勬牸鍨嬪彿"
+ prop="specificationModel"
+ show-overflow-tooltip
+ width="150"
+ />
+ <el-table-column
+ label="寰呬粯娆鹃噾棰�(鍏�)"
+ prop="pendingTicketsTotal"
+ show-overflow-tooltip
+ width="170"
+ >
+ <template #default="{ row, column }">
+ <el-text type="danger">
+ {{ formattedNumber(row, column, row.pendingTicketsTotal) }}
+ </el-text>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏈浠樻閲戦(鍏�)" width="180">
+ <template #default="{ row }">
+ <el-input-number
+ v-model="row.currentPaymentAmount"
+ :step="0.01"
+ :min="0"
+ :max="Number(row.pendingTicketsTotal || 0)"
+ :precision="2"
+ style="width: 100%"
+ placeholder="璇疯緭鍏�"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column label="浠樻鏂瑰紡" width="160">
+ <template #default="{ row }">
+ <el-select v-model="row.paymentMethod" placeholder="璇烽�夋嫨" clearable>
+ <el-option label="鐢垫眹" value="鐢垫眹" />
+ <el-option label="鎵垮厬" value="鎵垮厬" />
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column label="浠樻鏃ユ湡" width="170">
+ <template #default="{ row }">
+ <el-date-picker
+ v-model="row.paymentDate"
+ value-format="YYYY-MM-DD"
+ format="YYYY-MM-DD"
+ type="date"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column label="鐧昏浜�" width="140">
+ <template #default="{ row }">
+ <el-input v-model="row.registrant" disabled />
+ </template>
+ </el-table-column>
+ <el-table-column label="鐧昏鏃ユ湡" width="170">
+ <template #default="{ row }">
+ <el-input v-model="row.registrationtDate" />
+ </template>
+ </el-table-column>
+ </el-table>
+ <div v-else class="empty-tip">璇烽�夋嫨闇�瑕佷粯娆剧殑璁板綍</div>
+ </FormDialog>
</div>
</template>
<script setup>
-import { ref } from "vue";
+import FormDialog from '@/components/Dialog/FormDialog.vue';
+import { ref, reactive, toRefs, getCurrentInstance, nextTick, onMounted } from "vue";
import { Search } from "@element-plus/icons-vue";
import { ElMessageBox } from "element-plus";
import useUserStore from "@/store/modules/user.js";
@@ -225,59 +232,87 @@
paymentRegistrationEdit,
getTicketNo,
} from "@/api/procurementManagement/paymentEntry.js";
-import { invoiceListPage } from "@/api/procurementManagement/procurementInvoiceLedger.js";
+import {
+ delPaymentRegistration,
+ invoiceListPage,
+ registrationListPageGetById,
+ updatePaymentRegistration
+} from "@/api/procurementManagement/procurementInvoiceLedger.js";
import useFormData from "@/hooks/useFormData";
+import { getCurrentDate } from "@/utils/index.js";
const { proxy } = getCurrentInstance();
const tableColumn = ref([
+ {
+ type: "expand",
+ dataType: "slot",
+ slot: "expand",
+ },
{
label: "閲囪喘鍚堝悓鍙�",
prop: "purchaseContractNumber",
+ width:160
},
{
label: "閿�鍞悎鍚屽彿",
prop: "salesContractNo",
+ width:160
},
{
label: "渚涘簲鍟嗗悕绉�",
prop: "supplierName",
width:240
},
- {
- label: "鍙戠エ鍙�",
- prop: "invoiceNumber",
- width:200
- },
- {
- label: "鍙戠エ閲戦(鍏�)",
- prop: "invoiceAmount",
- formatData: (params) => {
- return params ? parseFloat(params).toFixed(2) : 0;
- },
- },
+ {
+ label: "浠樻鐘舵��",
+ prop: "statusName",
+ width:110,
+ dataType: "tag",
+ formatType: (params) => {
+ if (params == '鏈畬鎴愪粯娆�') {
+ return "danger";
+ } else if (params == '宸插畬鎴愪粯娆�') {
+ return "success";
+ } else {
+ return null;
+ }
+ },
+ },
+ {
+ label: "浜у搧澶х被",
+ prop: "productCategory",
+ showOverflowTooltip: true,
+ width: 100
+ },
+ {
+ label: "瑙勬牸鍨嬪彿",
+ prop: "specificationModel",
+ showOverflowTooltip: true,
+ width: 150
+ },
{
label: "宸蹭粯娆鹃噾棰�(鍏�)",
- prop: "paymentAmountTotal",
+ prop: "ticketsTotal",
+ width: 120,
formatData: (params) => {
return params ? parseFloat(params).toFixed(2) : 0;
},
},
{
label: "寰呬粯娆鹃噾棰�(鍏�)",
- prop: "unPaymentAmountTotal",
+ prop: "pendingTicketsTotal",
+ width: 120,
formatData: (params) => {
return params ? parseFloat(params).toFixed(2) : 0;
},
},
- {
- label: "褰曞叆浜�",
- prop: "issUer",
- },
]);
const tableData = ref([]);
+const expandData = ref([]);
const selectedRows = ref([]);
const tableLoading = ref(false);
-const invoiceNumberList = ref([]);
+const childrenLoading = ref(false);
+const forms = ref([]);
const userStore = useUserStore();
const page = reactive({
current: 1,
@@ -298,8 +333,6 @@
purchaseLedgerId: "",
salesContractNo: "",
supplierName: "",
- invoiceNumber: "",
- invoiceAmount: "",
taxRate: "",
currentPaymentAmount: "",
paymentMethod: "",
@@ -316,25 +349,40 @@
{ required: true, message: "璇疯緭鍏�", trigger: "blur" },
],
paymentMethod: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
- invoiceNumber: [
- { required: true, message: "璇烽�夋嫨閲囪喘鍚堝悓鍙�", trigger: "change" },
- ],
},
});
const { form, rules } = toRefs(data);
const { form: searchForm, resetForm } = useFormData(data.searchForm);
const isShowSummarySon = ref(true);
+const expandedRowKeys = ref([]);
+const getStatusTagType = (statusName = '') => {
+ const normalized = statusName.trim();
+ if (!normalized) return 'info';
+ return normalized === '鏈畬鎴愪粯娆�' ? 'danger' : 'success';
+};
+
+const formattedNumber = (row, column, cellValue) => {
+ const val = Number(cellValue ?? 0);
+ return Number.isFinite(val) ? val.toFixed(2) : "0.00";
+};
// 瀛愯〃鍚堣鏂规硶
const summarizeMainTable1 = (param) => {
return proxy.summarizeTable(
param,
- ["invoiceAmount", "paymentAmountTotal", "unPaymentAmountTotal"],
+ ["ticketsTotal", "pendingTicketsTotal"],
{
ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
}
);
+};
+// 瀛愯〃鍚堣鏂规硶
+const summarizeMainTable2 = (param) => {
+ return proxy.summarizeTable(param, ["currentPaymentAmount"], {
+ ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+ futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+ });
};
// 鏌ヨ鍒楄〃
/** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -351,9 +399,58 @@
tableLoading.value = true;
invoiceListPage({ ...searchForm, ...page }).then((res) => {
tableLoading.value = false;
- tableData.value = res.records;
- page.total = res.total;
+ tableData.value = res.data.records;
+ page.total = res.data.total;
+ if (expandedRowKeys.value.length > 0) {
+ const arr = []
+ const index = tableData.value.findIndex(item => item.id === expandedRowKeys.value[0]);
+ if (index > -1) {
+ arr.push(tableData.value[index]);
+ expandChange(tableData.value[index], arr)
+ }
+ }
});
+};
+// 灞曞紑琛�
+const expandChange = (row, expandedRows) => {
+ if (expandedRows.length > 0) {
+ nextTick(() => {
+ expandedRowKeys.value = [];
+ try {
+ childrenLoading.value = true;
+ registrationListPageGetById({ id: row.id }).then((res) => {
+ childrenLoading.value = false;
+ const index = tableData.value.findIndex((item) => item.id === row.id);
+ if (index > -1) {
+ expandData.value = res;
+ }
+ expandedRowKeys.value.push(row.id);
+ });
+ } catch (error) {
+ childrenLoading.value = false;
+ console.log(error);
+ }
+ })
+ } else {
+ expandedRowKeys.value = [];
+ }
+};
+// 缂栬緫淇敼鐘舵��
+const changeEditType = (row) => {
+ row.editType = !row.editType;
+};
+// 淇濆瓨鍥炴璁板綍
+const saveReceiptPayment = (row) => {
+ let updateData = {
+ id: row.id,
+ currentPaymentAmount: row.currentPaymentAmount,
+ paymentMethod: row.paymentMethod,
+ };
+ updatePaymentRegistration(updateData).then((res) => {
+ row.editType = !row.editType;
+ getList();
+ proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+ });
};
// 琛ㄦ牸閫夋嫨鏁版嵁
const handleSelectionChange = (selection) => {
@@ -361,76 +458,66 @@
};
// 鎵撳紑寮规
const openForm = (type, row) => {
- if (selectedRows.value.length !== 1) {
- proxy.$message.error("璇烽�夋嫨涓�鏉″彂绁ㄦ暟鎹�");
+ if (selectedRows.value.length === 0) {
+ proxy.$modal.msgError("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�");
return;
}
- operationType.value = type;
- form.value = {};
- form.value = { ...selectedRows.value[0] };
- form.value.ticketRegistrationId = selectedRows.value[0].id;
- form.value.id = null;
- // 鏌ヨ閲囪喘鍚堝悓鍙�
- form.value.registrationtDate = getCurrentDate();
- form.value.paymentDate = getCurrentDate();
- form.value.registrant = userStore.name;
+ const validRows = selectedRows.value.filter((item) => Number(item.pendingTicketsTotal || 0) !== 0);
+ if (validRows.length === 0) {
+ proxy.$modal.msgWarning("鎵�閫夎褰曞潎鏃犻渶浠樻");
+ return;
+ }
+ forms.value = validRows.map((row) => ({
+ purchaseContractNumber: row.purchaseContractNumber || "",
+ salesContractNo: row.salesContractNo || "",
+ supplierName: row.supplierName || "",
+ supplierId: row.supplierId,
+ productCategory: row.productCategory || "",
+ specificationModel: row.specificationModel || "",
+ pendingTicketsTotal: Number(row.pendingTicketsTotal || 0),
+ currentPaymentAmount: "",
+ paymentMethod: "",
+ paymentDate: "",
+ registrant: userStore.nickName,
+ registrationtDate: getCurrentDate(),
+ ticketRegistrationId: row.id,
+ purchaseLedgerId: row.salesLedgerId,
+ salesLedgerProductId: row.id,
+ }));
dialogFormVisible.value = true;
-};
-// 閫夋嫨鍙戠エ鍙蜂互鍚庣粰鍙戠エ閲戦璧嬪��
-const setInvoiceAmount = (value) => {
- if (value) {
- invoiceNumberList.value.forEach((item) => {
- if (item.invoiceNumber === value) {
- form.value.invoiceAmount = item.invoiceAmount;
- form.value.ticketRegistrationId = item.id;
- }
- });
- } else {
- form.value.invoiceAmount = "";
- }
-};
-// 閫夋嫨閲囪喘鍚堝悓鍙疯祴鍊�
-const setInfo = (value) => {
- getTicketNo({ id: value }).then((res) => {
- invoiceNumberList.value = res.data;
- });
- if (value) {
- byPurchaseId(value).then((res) => {
- form.value.salesContractNo = res.data.salesContractNo;
- form.value.supplierName = res.data.supplierName;
- form.value.taxRate = res.data.taxRate;
- form.value.supplierId = res.data.supplierId;
- });
- } else {
- form.value.salesContractNo = "";
- form.value.supplierName = "";
- form.value.taxRate = "";
- form.value.supplierId = "";
- }
};
// 鎻愪氦琛ㄥ崟
const submitForm = () => {
- proxy.$refs["formRef"].validate((valid) => {
- if (valid) {
- if (operationType.value === "edit") {
- submitEdit();
- } else {
- submitAdd();
- }
+ if (forms.value.length === 0) {
+ proxy.$modal.msgError("璇烽�夋嫨浠樻璁板綍");
+ return;
+ }
+ for (let i = 0; i < forms.value.length; i++) {
+ const item = forms.value[i];
+ const pendingAmount = Number(item.pendingTicketsTotal || 0);
+ const currentAmount = Number(item.currentPaymentAmount);
+ if (!item.currentPaymentAmount && item.currentPaymentAmount !== 0) {
+ proxy.$modal.msgError(`绗� ${i + 1} 鏉★細璇峰~鍐欎粯娆鹃噾棰漙);
+ return;
}
- });
-};
-// 鎻愪氦鏂板
-const submitAdd = () => {
- paymentRegistrationAdd(form.value).then((res) => {
- proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
- closeDia();
- getList();
- });
-};
-// 鎻愪氦淇敼
-const submitEdit = () => {
- paymentRegistrationEdit(form.value).then((res) => {
+ if (currentAmount > pendingAmount) {
+ proxy.$modal.msgError(
+ `绗� ${i + 1} 鏉★細浠樻閲戦涓嶈兘瓒呰繃寰呬粯娆鹃噾棰濓紙寰呬粯娆撅細${pendingAmount.toFixed(
+ 2
+ )}锛塦
+ );
+ return;
+ }
+ if (!item.paymentMethod) {
+ proxy.$modal.msgError(`绗� ${i + 1} 鏉★細璇烽�夋嫨浠樻鏂瑰紡`);
+ return;
+ }
+ if (!item.paymentDate) {
+ proxy.$modal.msgError(`绗� ${i + 1} 鏉★細璇烽�夋嫨浠樻鏃ユ湡`);
+ return;
+ }
+ }
+ paymentRegistrationAdd(forms.value).then(() => {
proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
closeDia();
getList();
@@ -438,24 +525,11 @@
};
// 鍏抽棴寮规
const closeDia = () => {
- proxy.resetForm("formRef");
+ forms.value = [];
dialogFormVisible.value = false;
};
// 鍒犻櫎
-const handleDelete = () => {
- let ids = [];
- if (selectedRows.value.length > 0) {
- // 妫�鏌ユ槸鍚︽湁浠栦汉缁存姢鐨勬暟鎹�
- const unauthorizedData = selectedRows.value.filter(item => item.issUer !== userStore.nickName);
- if (unauthorizedData.length > 0) {
- proxy.$modal.msgWarning("涓嶅彲鍒犻櫎浠栦汉缁存姢鐨勬暟鎹�");
- return;
- }
- ids = selectedRows.value.map((item) => item.id);
- } else {
- proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
- return;
- }
+const handleDelete = (row) => {
ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "鍒犻櫎鎻愮ず", {
confirmButtonText: "纭",
cancelButtonText: "鍙栨秷",
@@ -463,7 +537,7 @@
})
.then(() => {
tableLoading.value = true;
- paymentRegistrationDel(ids)
+ delPaymentRegistration(row.id)
.then((res) => {
proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
getList();
@@ -476,15 +550,24 @@
proxy.$modal.msg("宸插彇娑�");
});
};
-// 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� YYYY-MM-DD
-function getCurrentDate() {
- const today = new Date();
- const year = today.getFullYear();
- const month = String(today.getMonth() + 1).padStart(2, "0"); // 鏈堜唤浠�0寮�濮�
- const day = String(today.getDate()).padStart(2, "0");
- return `${year}-${month}-${day}`;
-}
-getList();
+// 瀵煎嚭
+const handleExport = () => {
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ proxy.download("/purchase/registration/exportOne", { ...searchForm, ...page }, "浠樻鐧昏.xlsx");
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+};
+
+onMounted(() => {
+ getList();
+});
</script>
<style scoped lang="scss">
@@ -494,4 +577,9 @@
::v-deep(.el-checkbox__label) {
font-weight: bold;
}
+.empty-tip {
+ text-align: center;
+ padding: 20px 0;
+ color: #909399;
+}
</style>
--
Gitblit v1.9.3