From ac00bb7b8eae1bf6aabb7f1ae67c2e5aa5b8ae90 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 12 六月 2026 10:21:12 +0800
Subject: [PATCH] 宝东 1.样式问题
---
src/views/financialManagement/receivable/outputInvoice.vue | 129 +++++++++++++++++++++++++++++++++++++++---
1 files changed, 119 insertions(+), 10 deletions(-)
diff --git a/src/views/financialManagement/receivable/outputInvoice.vue b/src/views/financialManagement/receivable/outputInvoice.vue
index d746aea..d679fea 100644
--- a/src/views/financialManagement/receivable/outputInvoice.vue
+++ b/src/views/financialManagement/receivable/outputInvoice.vue
@@ -37,7 +37,7 @@
<div class="actions">
<div></div>
<div>
- <!-- <el-button type="primary" @click="add" icon="Plus">褰曞叆鍙戠エ</el-button> -->
+ <el-button type="primary" @click="add" icon="Plus">褰曞叆鍙戠エ</el-button>
<el-button type="success" @click="handleExport" icon="Download">瀵煎嚭</el-button>
</div>
</div>
@@ -146,6 +146,16 @@
</el-row>
<el-row :gutter="20">
<el-col :span="12">
+ <el-form-item label="寮�绁ㄧ敵璇峰崟鍙�">
+ <div style="display:flex;gap:8px;">
+ <el-input v-model="applyCodeDisplay" disabled placeholder="璇烽�夋嫨寮�绁ㄧ敵璇�" />
+ <el-button type="primary" @click="openApplyDialog" :disabled="isView">閫夋嫨</el-button>
+ </div>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="12">
<el-form-item label="绋庣巼" prop="taxRate">
<el-select
v-model="form.taxRate"
@@ -165,24 +175,27 @@
</el-col>
</el-row>
<el-row :gutter="20">
- <el-col :span="8">
+ <el-col :span="12">
<el-form-item label="閲戦(涓嶅惈绋�)" prop="amount">
<el-input-number
v-model="form.amount"
:min="0"
- :precision="2"
- style="width: 100%;"
+ :precision="4"
:disabled="isView"
@change="calculateTax"
/>
</el-form-item>
</el-col>
- <el-col :span="8">
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="12">
<el-form-item label="绋庨">
<el-input v-model="form.taxAmount" disabled />
</el-form-item>
</el-col>
- <el-col :span="8">
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="12">
<el-form-item label="浠风◣鍚堣">
<el-input v-model="form.totalAmount" disabled />
</el-form-item>
@@ -201,6 +214,42 @@
</template>
</FormDialog>
+ <el-dialog v-model="applyDialogVisible"
+ title="閫夋嫨寮�绁ㄧ敵璇�"
+ width="900px"
+ :close-on-click-modal="false">
+ <div style="margin-bottom:12px;display:flex;gap:12px;">
+ <el-input v-model="applySearch.applyCode" placeholder="鐢宠鍗曞彿" clearable style="width:200px;" @change="fetchApplyList" />
+ <el-input v-model="applySearch.customerName" placeholder="瀹㈡埛鍚嶇О" clearable style="width:200px;" @change="fetchApplyList" />
+ <el-button type="primary" @click="fetchApplyList">鎼滅储</el-button>
+ </div>
+ <el-table :data="applyList" border v-loading="applyLoading" height="400px">
+ <el-table-column label="鐢宠鍗曞彿" prop="invoiceApplicationNo" width="150" />
+ <el-table-column label="瀹㈡埛鍚嶇О" prop="customerName" width="180" />
+ <el-table-column label="寮�绁ㄩ噾棰�" prop="invoiceAmount" width="120" />
+ <el-table-column label="绋庣巼" prop="taxRate" width="80">
+ <template #default="{ row }">{{ row.taxRate }}%</template>
+ </el-table-column>
+ <el-table-column label="鍙戠エ绫诲瀷" prop="invoiceType" width="130" />
+ <el-table-column label="鐢宠鏃ユ湡" prop="applyDate" width="120" />
+ <el-table-column label="鎿嶄綔" width="80" align="center">
+ <template #default="{ row }">
+ <el-button type="primary" link @click="selectApply(row)">閫夋嫨</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <div v-if="applyPage.total > 0">
+ <Pagination :total="applyPage.total"
+ layout="total, prev, pager, next"
+ :page="applyPage.current"
+ :limit="applyPage.size"
+ @pagination="applyPaginationChange" />
+ </div>
+ <template #footer>
+ <el-button @click="applyDialogVisible = false">鍏抽棴</el-button>
+ </template>
+ </el-dialog>
+
<FileList
v-if="fileDialogVisible"
v-model:visible="fileDialogVisible"
@@ -212,9 +261,10 @@
</template>
<script setup>
-import { ref, reactive, onMounted, getCurrentInstance, defineAsyncComponent } from "vue";
+import { ref, reactive, onMounted, nextTick, getCurrentInstance, defineAsyncComponent } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import FormDialog from "@/components/Dialog/FormDialog.vue";
+import Pagination from "@/components/PIMTable/Pagination.vue";
import { listCustomer } from "@/api/basicData/customer.js";
import {
addAccountSalesInvoice,
@@ -222,6 +272,7 @@
cancelAccountSalesInvoice,
deleteAccountSalesInvoice,
} from "@/api/financialManagement/accountSalesInvoice.js";
+import { listPageAccountInvoiceApplication } from "@/api/financialManagement/invoiceApply.js";
const FileList = defineAsyncComponent(() => import("@/components/Dialog/FileList.vue"));
@@ -268,6 +319,60 @@
const customerList = ref([]);
const fileDialogVisible = ref(false);
const currentRecordId = ref(0);
+
+// 寮�绁ㄧ敵璇烽�夋嫨
+const applyDialogVisible = ref(false);
+const applyLoading = ref(false);
+const applyList = ref([]);
+const applyCodeDisplay = ref("");
+const applySearch = reactive({ applyCode: "", customerName: "" });
+const applyPage = reactive({ current: 1, size: 10, total: 0 });
+
+const openApplyDialog = () => {
+ applySearch.applyCode = "";
+ applySearch.customerName = "";
+ applyPage.current = 1;
+ fetchApplyList();
+ applyDialogVisible.value = true;
+};
+
+const fetchApplyList = () => {
+ applyLoading.value = true;
+ const params = {
+ current: applyPage.current,
+ size: applyPage.size,
+ status: 1, // 鍙煡瀹℃牳閫氳繃
+ };
+ if (applySearch.applyCode) params.applyCode = applySearch.applyCode;
+ if (applySearch.customerName) params.customerName = applySearch.customerName;
+ listPageAccountInvoiceApplication(params)
+ .then(res => {
+ applyList.value = res.data?.records || [];
+ applyPage.total = res.data?.total || 0;
+ })
+ .finally(() => {
+ applyLoading.value = false;
+ });
+};
+
+const applyPaginationChange = ({ page: p, limit }) => {
+ applyPage.current = p;
+ applyPage.size = limit;
+ fetchApplyList();
+};
+
+const selectApply = row => {
+ form.accountInvoiceApplicationId = row.id;
+ applyCodeDisplay.value = row.invoiceApplicationNo || "";
+ form.amount = Number(row.invoiceAmount) || 0;
+ form.taxRate = Number(row.taxRate) || 13;
+ form.invoiceType = row.invoiceType || "澧炲�肩◣涓撶敤鍙戠エ";
+ if (row.customerId) form.customerId = row.customerId;
+ calculateTax();
+ nextTick(() => {
+ applyDialogVisible.value = false;
+ });
+};
const openFileDialog = (row) => {
if (!row.accountInvoiceApplicationId) {
@@ -326,12 +431,14 @@
const formatMoney = (value) => {
if (value === undefined || value === null) return "0.00";
- return Number(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
+ const parts = Number(value).toFixed(4).split(".");
+ parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
+ return parts.join(".");
};
const calculateTax = () => {
- form.taxAmount = Number((form.amount * form.taxRate / 100).toFixed(2));
- form.totalAmount = Number((form.amount + form.taxAmount).toFixed(2));
+ form.taxAmount = Number((form.amount * form.taxRate / 100).toFixed(4));
+ form.totalAmount = Number((form.amount + form.taxAmount).toFixed(4));
};
const handleInvoiceTypeChange = () => {
@@ -503,6 +610,7 @@
accountInvoiceApplicationId: undefined,
storageAttachmentId: undefined,
});
+ applyCodeDisplay.value = "";
dialogVisible.value = true;
};
@@ -510,6 +618,7 @@
isView.value = true;
dialogTitle.value = "鏌ョ湅鍙戠エ";
fillFormFromRow(row);
+ applyCodeDisplay.value = row.invoiceApplicationNo || "";
dialogVisible.value = true;
};
--
Gitblit v1.9.3