From 2962ecc9b46fa6564ced9ef5ecf02bf637758b27 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期三, 06 五月 2026 13:48:02 +0800
Subject: [PATCH] Merge branch 'dev_NEW_pro' of http://114.132.189.42:9002/r/product-inventory-management into dev_NEW_pro
---
src/assets/styles/index.scss | 1
src/views/financialManagement/receivable/salesOut.vue | 7
src/views/financialManagement/payable/payment.vue | 7
src/views/financialManagement/salesRefund/components/ReceiptandRefundPopupWindow.vue | 5
src/views/financialManagement/generalLedger/index.vue | 7
src/views/qualityManagement/rawMaterialInspection/index.vue | 2
src/views/qualityManagement/finalInspection/index.vue | 2
src/views/personnelManagement/contractManagement/index.vue | 2
src/views/qualityManagement/processInspection/index.vue | 2
src/views/financialManagement/payable/input-invoice.vue | 7
src/views/productionManagement/workOrderManagement/index.vue | 2
src/views/basicData/customerFile/index.vue | 2
src/views/safeProduction/safeWorkApproval/index.vue | 2
src/views/equipmentManagement/calibration/index.vue | 2
vite.config.js | 2
src/views/inventoryManagement/receiptManagement/Record.vue | 4
src/views/personnelManagement/employeeRecord/index.vue | 2
src/views/financialManagement/receivable/receipt.vue | 7
src/views/safeProduction/hazardSourceLedger/index.vue | 2
src/views/productionManagement/workOrderEdit/index.vue | 2
src/views/financialManagement/assets/fixedAssets.vue | 7
src/views/financialManagement/receivable/salesReturn.vue | 7
src/views/financialManagement/payable/paymentApply.vue | 7
src/views/procurementManagement/procurementLedger/index.vue | 1
src/views/equipmentManagement/measurementEquipment/index.vue | 2
src/views/financialManagement/payable/reconciliation.vue | 253 ++++++++++
src/views/financialManagement/payable/purchaseIn.vue | 7
src/views/qualityManagement/nonconformingManagement/index.vue | 36
src/views/salesManagement/receiptPaymentLedger/index.vue | 2
src/views/safeProduction/emergencyPlanReview/index.vue | 2
src/views/financialManagement/voucher/index.vue | 576 ++++++++++++++++++++++---
src/views/lavorissue/statistics/index.vue | 2
src/views/safeProduction/accidentReportingRecord/index.vue | 2
src/views/inventoryManagement/dispatchLog/Record.vue | 4
src/views/financialManagement/assets/intangibleAssets.vue | 7
src/views/financialManagement/receivable/reconciliation.vue | 249 ++++++++++
src/views/inventoryManagement/stockManagement/Record.vue | 4
src/views/customerService/afterSalesHandling/index.vue | 2
src/views/collaborativeApproval/knowledgeBase/index.vue | 2
src/views/basicData/supplierManage/components/HomeTab.vue | 6
src/views/personnelManagement/socialSecuritySet/index.vue | 2
src/views/procurementManagement/procurementReport/index.vue | 6
src/views/basicData/customerFileOpenSea/index.vue | 2
src/views/financialManagement/receivable/invoiceApply.vue | 7
src/views/procurementManagement/paymentLedger/index.vue | 2
src/views/customerService/expiryAfterSales/index.vue | 2
src/views/financialManagement/receivable/outputInvoice.vue | 7
src/views/personnelManagement/dimission/index.vue | 2
src/views/safeProduction/hazardousMaterialsControl/index.vue | 2
49 files changed, 1,064 insertions(+), 215 deletions(-)
diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss
index 883f03f..f905a36 100644
--- a/src/assets/styles/index.scss
+++ b/src/assets/styles/index.scss
@@ -148,7 +148,6 @@
}
}
.table_list {
- margin-top: 20px;
background: rgba(255, 255, 255, 0.88);
border: 1px solid var(--surface-border);
border-radius: var(--radius-md);
diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index d0f829c..a3a3dcf 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form" style="margin-bottom: 20px;">
<div>
<span class="search_title">瀹㈡埛鍚嶇О锛�</span>
<el-input v-model="searchForm.customerName"
diff --git a/src/views/basicData/customerFileOpenSea/index.vue b/src/views/basicData/customerFileOpenSea/index.vue
index 71cc051..8bc8f6f 100644
--- a/src/views/basicData/customerFileOpenSea/index.vue
+++ b/src/views/basicData/customerFileOpenSea/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form" style="margin-bottom: 20px;">
<div>
<span class="search_title">瀹㈡埛鍚嶇О锛�</span>
<el-input v-model="searchForm.customerName"
diff --git a/src/views/basicData/supplierManage/components/HomeTab.vue b/src/views/basicData/supplierManage/components/HomeTab.vue
index 85c3265..47dce00 100644
--- a/src/views/basicData/supplierManage/components/HomeTab.vue
+++ b/src/views/basicData/supplierManage/components/HomeTab.vue
@@ -1,7 +1,7 @@
<template>
- <div class="app-container">
+ <div>
<div class="search_form">
- <div>
+ <div style="margin-bottom: 10px;">
<span class="search_title">渚涘簲鍟嗘。妗堬細</span>
<el-input
v-model="searchForm.supplierName"
@@ -15,7 +15,7 @@
>鎼滅储</el-button
>
</div>
- <div>
+ <div style="margin-bottom: 10px;">
<el-button type="primary" @click="openForm('add')"
>鏂板渚涘簲鍟�</el-button
>
diff --git a/src/views/collaborativeApproval/knowledgeBase/index.vue b/src/views/collaborativeApproval/knowledgeBase/index.vue
index bdce9bd..43fee33 100644
--- a/src/views/collaborativeApproval/knowledgeBase/index.vue
+++ b/src/views/collaborativeApproval/knowledgeBase/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form" style="margin-bottom: 20px;">
<div>
<span class="search_title">鐭ヨ瘑鏍囬锛�</span>
<el-input
diff --git a/src/views/customerService/afterSalesHandling/index.vue b/src/views/customerService/afterSalesHandling/index.vue
index d023f51..a42337d 100644
--- a/src/views/customerService/afterSalesHandling/index.vue
+++ b/src/views/customerService/afterSalesHandling/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search-wrapper">
+ <div class="search-wrapper mb20">
<el-form
:model="searchForm"
class="demo-form-inline"
diff --git a/src/views/customerService/expiryAfterSales/index.vue b/src/views/customerService/expiryAfterSales/index.vue
index c5abd0d..c94e3dd 100644
--- a/src/views/customerService/expiryAfterSales/index.vue
+++ b/src/views/customerService/expiryAfterSales/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">涓存湡鏃ユ湡锛�</span>
<el-date-picker
diff --git a/src/views/equipmentManagement/calibration/index.vue b/src/views/equipmentManagement/calibration/index.vue
index e3eaef6..b04da2e 100644
--- a/src/views/equipmentManagement/calibration/index.vue
+++ b/src/views/equipmentManagement/calibration/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">妫�瀹氭棩鏈燂細</span>
<el-date-picker
diff --git a/src/views/equipmentManagement/measurementEquipment/index.vue b/src/views/equipmentManagement/measurementEquipment/index.vue
index 46ca100..c1d5379 100644
--- a/src/views/equipmentManagement/measurementEquipment/index.vue
+++ b/src/views/equipmentManagement/measurementEquipment/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">褰曞叆鏃ユ湡锛�</span>
<el-date-picker
diff --git a/src/views/financialManagement/assets/fixedAssets.vue b/src/views/financialManagement/assets/fixedAssets.vue
index 1690a33..61eb245 100644
--- a/src/views/financialManagement/assets/fixedAssets.vue
+++ b/src/views/financialManagement/assets/fixedAssets.vue
@@ -75,7 +75,7 @@
</PIMTable>
</div>
- <el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" append-to-body>
+ <FormDialog :title="dialogTitle" v-model="dialogVisible" width="800px" @confirm="submitForm" @cancel="dialogVisible = false">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px">
<el-row :gutter="20">
<el-col :span="12">
@@ -178,16 +178,17 @@
</el-form-item>
</el-form>
<template #footer>
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
<el-button type="primary" @click="submitForm">纭畾</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
</template>
- </el-dialog>
+ </FormDialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, computed } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "鍥哄畾璧勪骇",
diff --git a/src/views/financialManagement/assets/intangibleAssets.vue b/src/views/financialManagement/assets/intangibleAssets.vue
index f0b9af9..14dae55 100644
--- a/src/views/financialManagement/assets/intangibleAssets.vue
+++ b/src/views/financialManagement/assets/intangibleAssets.vue
@@ -76,7 +76,7 @@
</PIMTable>
</div>
- <el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" append-to-body>
+ <FormDialog :title="dialogTitle" v-model="dialogVisible" width="800px" @confirm="submitForm" @cancel="dialogVisible = false">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px">
<el-row :gutter="20">
<el-col :span="12">
@@ -171,16 +171,17 @@
</el-form-item>
</el-form>
<template #footer>
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
<el-button type="primary" @click="submitForm">纭畾</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
</template>
- </el-dialog>
+ </FormDialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, computed } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "鏃犲舰璧勪骇",
diff --git a/src/views/financialManagement/generalLedger/index.vue b/src/views/financialManagement/generalLedger/index.vue
index 0b5d597..0570627 100644
--- a/src/views/financialManagement/generalLedger/index.vue
+++ b/src/views/financialManagement/generalLedger/index.vue
@@ -60,7 +60,7 @@
</PIMTable>
</div>
- <el-dialog :title="dialogTitle" v-model="dialogVisible" width="600px" append-to-body>
+ <FormDialog :title="dialogTitle" v-model="dialogVisible" width="600px" @confirm="submitForm" @cancel="dialogVisible = false">
<el-form :model="form" :rules="rules" ref="formRef" label-width="100px">
<el-form-item label="绉戠洰缂栫爜" prop="subjectCode">
<el-input v-model="form.subjectCode" placeholder="璇疯緭鍏ョ鐩紪鐮�" />
@@ -94,16 +94,17 @@
</el-form-item>
</el-form>
<template #footer>
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
<el-button type="primary" @click="submitForm">纭畾</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
</template>
- </el-dialog>
+ </FormDialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "鎬诲笎绉戠洰",
diff --git a/src/views/financialManagement/payable/input-invoice.vue b/src/views/financialManagement/payable/input-invoice.vue
index 8258e96..b809c98 100644
--- a/src/views/financialManagement/payable/input-invoice.vue
+++ b/src/views/financialManagement/payable/input-invoice.vue
@@ -67,7 +67,7 @@
</PIMTable>
</div>
- <el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" append-to-body>
+ <FormDialog :title="dialogTitle" v-model="dialogVisible" width="800px" @confirm="submitForm" @cancel="dialogVisible = false">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px">
<el-row :gutter="20">
<el-col :span="12">
@@ -142,16 +142,17 @@
</el-form-item>
</el-form>
<template #footer>
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
<el-button type="primary" @click="submitForm">纭畾</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
</template>
- </el-dialog>
+ </FormDialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "杩涢」鍙戠エ",
diff --git a/src/views/financialManagement/payable/payment.vue b/src/views/financialManagement/payable/payment.vue
index 3ea0df8..d4774fe 100644
--- a/src/views/financialManagement/payable/payment.vue
+++ b/src/views/financialManagement/payable/payment.vue
@@ -70,7 +70,7 @@
</PIMTable>
</div>
- <el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" append-to-body>
+ <FormDialog :title="dialogTitle" v-model="dialogVisible" width="800px" @confirm="submitForm" @cancel="dialogVisible = false">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px">
<el-row :gutter="20">
<el-col :span="12">
@@ -134,16 +134,17 @@
</el-form-item>
</el-form>
<template #footer>
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
<el-button type="primary" @click="submitForm">纭畾</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
</template>
- </el-dialog>
+ </FormDialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, computed } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "浠樻鍗�",
diff --git a/src/views/financialManagement/payable/paymentApply.vue b/src/views/financialManagement/payable/paymentApply.vue
index 82981d7..fb23db3 100644
--- a/src/views/financialManagement/payable/paymentApply.vue
+++ b/src/views/financialManagement/payable/paymentApply.vue
@@ -60,7 +60,7 @@
</PIMTable>
</div>
- <el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" append-to-body>
+ <FormDialog :title="dialogTitle" v-model="dialogVisible" width="800px" @confirm="submitForm" @cancel="dialogVisible = false">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px">
<el-row :gutter="20">
<el-col :span="12">
@@ -118,16 +118,17 @@
</el-form-item>
</el-form>
<template #footer>
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
<el-button type="primary" @click="submitForm">纭畾</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
</template>
- </el-dialog>
+ </FormDialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "浠樻鐢宠",
diff --git a/src/views/financialManagement/payable/purchaseIn.vue b/src/views/financialManagement/payable/purchaseIn.vue
index d976f1d..4813159 100644
--- a/src/views/financialManagement/payable/purchaseIn.vue
+++ b/src/views/financialManagement/payable/purchaseIn.vue
@@ -49,7 +49,7 @@
</PIMTable>
</div>
- <el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" append-to-body>
+ <FormDialog :title="dialogTitle" v-model="dialogVisible" width="800px" @confirm="submitForm" @cancel="dialogVisible = false">
<el-form :model="form" :rules="rules" ref="formRef" label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
@@ -117,16 +117,17 @@
</el-form-item>
</el-form>
<template #footer>
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
<el-button type="primary" @click="submitForm">纭畾</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
</template>
- </el-dialog>
+ </FormDialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "閲囪喘鍏ュ簱",
diff --git a/src/views/financialManagement/payable/reconciliation.vue b/src/views/financialManagement/payable/reconciliation.vue
index 06854b8..3aa23cd 100644
--- a/src/views/financialManagement/payable/reconciliation.vue
+++ b/src/views/financialManagement/payable/reconciliation.vue
@@ -55,7 +55,7 @@
</PIMTable>
</div>
- <el-dialog title="瀵硅处鏄庣粏" v-model="detailDialogVisible" width="900px" append-to-body>
+ <FormDialog title="瀵硅处鏄庣粏" v-model="detailDialogVisible" width="900px" @confirm="printDetail" @cancel="detailDialogVisible = false" operationType="detail">
<div class="statement-header">
<h3>{{ currentSupplier }} 搴斾粯瀵硅处鍗�</h3>
<p>瀵硅处鏈熼棿: {{ currentPeriod }}</p>
@@ -88,16 +88,72 @@
<el-table-column prop="remark" label="澶囨敞" show-overflow-tooltip />
</el-table>
<template #footer>
- <el-button @click="detailDialogVisible = false">鍏抽棴</el-button>
<el-button type="primary" @click="printDetail">鎵撳嵃</el-button>
+ <el-button @click="detailDialogVisible = false">鍏抽棴</el-button>
</template>
- </el-dialog>
+ </FormDialog>
+
+ <FormDialog title="鐢熸垚瀵硅处鍗�" v-model="generateDialogVisible" width="1000px" @confirm="confirmGenerate" @cancel="generateDialogVisible = false">
+ <el-form :model="generateForm" label-width="100px">
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <el-form-item label="閫夋嫨渚涘簲鍟�" prop="supplierId">
+ <el-select v-model="generateForm.supplierId" placeholder="璇烽�夋嫨渚涘簲鍟�" style="width: 100%;" @change="onSupplierChange">
+ <el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="瀵硅处鏈堜唤" prop="period">
+ <el-date-picker v-model="generateForm.period" type="month" placeholder="閫夋嫨鏈堜唤" value-format="YYYY-MM" style="width: 100%;" @change="onPeriodChange" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+
+ <div v-if="purchaseData.length > 0" class="purchase-section">
+ <div class="section-title">鏈湀閲囪喘鏁版嵁</div>
+ <el-table :data="purchaseData" border style="width: 100%; margin-bottom: 15px;" v-loading="purchaseLoading" @selection-change="handlePurchaseSelectionChange">
+ <el-table-column type="selection" width="55" align="center" />
+ <el-table-column prop="date" label="鏃ユ湡" width="120" />
+ <el-table-column prop="code" label="鍗曟嵁缂栧彿" width="150" />
+ <el-table-column prop="type" label="绫诲瀷" width="100">
+ <template #default="{ row }">
+ <el-tag :type="row.type === '鍏ュ簱' ? 'success' : 'danger'">{{ row.type }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="amount" label="閲戦" width="120">
+ <template #default="{ row }">
+ <span :class="row.type === '鍏ュ簱' ? 'text-danger' : 'text-success'">楼{{ formatMoney(row.amount) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="remark" label="澶囨敞" />
+ </el-table>
+
+ <div class="summary-row">
+ <span>鏈熷垵浣欓: <strong class="text-primary">楼{{ formatMoney(generateForm.beginBalance) }}</strong></span>
+ <span>鏈湡搴斾粯: <strong class="text-danger">楼{{ formatMoney(generateForm.currentPayable) }}</strong></span>
+ <span>鏈湡浠樻: <strong class="text-success">楼{{ formatMoney(generateForm.currentPayment) }}</strong></span>
+ <span>鏈熸湯浣欓: <strong class="text-primary">楼{{ formatMoney(calculateEndBalance(generateForm.beginBalance, generateForm.currentPayable, generateForm.currentPayment)) }}</strong></span>
+ </div>
+ </div>
+
+ <div v-else-if="generateForm.supplierId && !purchaseLoading" class="empty-tip">
+ <el-empty description="璇ヤ緵搴斿晢鏈湀鏆傛棤閲囪喘鏁版嵁" />
+ </div>
+
+ <template #footer>
+ <el-button type="primary" @click="confirmGenerate" :disabled="!canGenerate">纭鐢熸垚</el-button>
+ <el-button @click="generateDialogVisible = false">鍙栨秷</el-button>
+ </template>
+ </FormDialog>
</div>
</template>
<script setup>
-import { ref, reactive, onMounted } from "vue";
+import { ref, reactive, onMounted, computed } from "vue";
import { ElMessage } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "搴斾粯瀵硅处",
@@ -132,6 +188,24 @@
const currentPeriod = ref("");
const detailData = ref([]);
+const generateDialogVisible = ref(false);
+const purchaseLoading = ref(false);
+const purchaseData = ref([]);
+const selectedPurchases = ref([]);
+
+const generateForm = reactive({
+ supplierId: "",
+ supplierName: "",
+ period: "",
+ beginBalance: 0,
+ currentPayable: 0,
+ currentPayment: 0,
+});
+
+const canGenerate = computed(() => {
+ return generateForm.supplierId && generateForm.period && selectedPurchases.value.length > 0;
+});
+
const supplierList = [
{ id: 1, name: "鍖椾含鍘熸潗鏂欎緵搴斿晢" },
{ id: 2, name: "涓婃捣鐢靛瓙鍏冨櫒浠跺叕鍙�" },
@@ -144,6 +218,10 @@
{ id: 2, statementCode: "DZ202401002", supplierId: 2, supplierName: "涓婃捣鐢靛瓙鍏冨櫒浠跺叕鍙�", period: "2024-01", beginBalance: 10000, currentPayable: 20000, currentPayment: 15000, endBalance: 15000 },
{ id: 3, statementCode: "DZ202402001", supplierId: 1, supplierName: "鍖椾含鍘熸潗鏂欎緵搴斿晢", period: "2024-02", beginBalance: 25000, currentPayable: 18000, currentPayment: 20000, endBalance: 23000 },
];
+
+const calculateEndBalance = (beginBalance, currentPayable, currentPayment) => {
+ return beginBalance + currentPayable - currentPayment;
+};
const formatMoney = (value) => {
if (value === undefined || value === null) return "0.00";
@@ -177,34 +255,133 @@
};
const generateStatement = () => {
- ElMessage.success("瀵硅处鍗曠敓鎴愭垚鍔�");
+ generateForm.supplierId = "";
+ generateForm.supplierName = "";
+ generateForm.period = "";
+ generateForm.beginBalance = 0;
+ generateForm.currentPayable = 0;
+ generateForm.currentPayment = 0;
+ purchaseData.value = [];
+ selectedPurchases.value = [];
+ generateDialogVisible.value = true;
+};
+
+const onSupplierChange = (supplierId) => {
+ const supplier = supplierList.find(item => item.id === supplierId);
+ if (supplier) {
+ generateForm.supplierName = supplier.name;
+ }
+ loadPurchaseData();
+};
+
+const onPeriodChange = () => {
+ loadPurchaseData();
+};
+
+const loadPurchaseData = () => {
+ if (!generateForm.supplierId || !generateForm.period) {
+ purchaseData.value = [];
+ return;
+ }
+
+ purchaseLoading.value = true;
+
+ setTimeout(() => {
+ const mockPurchaseData = [
+ { id: 1, date: generateForm.period + "-05", code: "RK2024001", type: "鍏ュ簱", amount: 8000, remark: "鍘熸潗鏂欓噰璐�" },
+ { id: 2, date: generateForm.period + "-10", code: "FK2024001", type: "浠樻", amount: 5000, remark: "鏀粯璐ф" },
+ { id: 3, date: generateForm.period + "-15", code: "RK2024002", type: "鍏ュ簱", amount: 12000, remark: "鐢靛瓙鍏冨櫒浠�" },
+ { id: 4, date: generateForm.period + "-18", code: "TH2024001", type: "閫�璐�", amount: 2000, remark: "璐ㄩ噺闂閫�璐�" },
+ { id: 5, date: generateForm.period + "-22", code: "RK2024003", type: "鍏ュ簱", amount: 6000, remark: "鍖呰鏉愭枡" },
+ { id: 6, date: generateForm.period + "-25", code: "FK2024002", type: "浠樻", amount: 8000, remark: "鏀粯璐ф" },
+ ];
+
+ purchaseData.value = mockPurchaseData;
+
+ const lastPeriod = getLastPeriod(generateForm.period);
+ const lastStatement = mockData.find(item =>
+ item.supplierId === generateForm.supplierId && item.period === lastPeriod
+ );
+ generateForm.beginBalance = lastStatement ? lastStatement.endBalance : 0;
+
+ calculateSummary();
+
+ purchaseLoading.value = false;
+ }, 500);
+};
+
+const getLastPeriod = (period) => {
+ const [year, month] = period.split("-").map(Number);
+ if (month === 1) {
+ return `${year - 1}-12`;
+ }
+ return `${year}-${String(month - 1).padStart(2, "0")}`;
+};
+
+const calculateSummary = () => {
+ let payable = 0;
+ let payment = 0;
+
+ selectedPurchases.value.forEach(item => {
+ if (item.type === "鍏ュ簱") {
+ payable += item.amount;
+ } else if (item.type === "閫�璐�") {
+ payable -= item.amount;
+ } else if (item.type === "浠樻") {
+ payment += item.amount;
+ }
+ });
+
+ generateForm.currentPayable = payable;
+ generateForm.currentPayment = payment;
+};
+
+const handlePurchaseSelectionChange = (selection) => {
+ selectedPurchases.value = selection;
+ calculateSummary();
+};
+
+const confirmGenerate = () => {
const newId = mockData.length > 0 ? Math.max(...mockData.map(item => item.id)) + 1 : 1;
- const supplier = supplierList[Math.floor(Math.random() * supplierList.length)];
+ const endBalance = calculateEndBalance(generateForm.beginBalance, generateForm.currentPayable, generateForm.currentPayment);
+
mockData.unshift({
id: newId,
statementCode: "DZ" + Date.now(),
- supplierId: supplier.id,
- supplierName: supplier.name,
- period: "2024-03",
- beginBalance: Math.floor(Math.random() * 20000),
- currentPayable: Math.floor(Math.random() * 25000),
- currentPayment: Math.floor(Math.random() * 20000),
- endBalance: Math.floor(Math.random() * 25000),
+ supplierId: generateForm.supplierId,
+ supplierName: generateForm.supplierName,
+ period: generateForm.period,
+ beginBalance: generateForm.beginBalance,
+ currentPayable: generateForm.currentPayable,
+ currentPayment: generateForm.currentPayment,
+ endBalance,
});
+
+ generateDialogVisible.value = false;
+ ElMessage.success("瀵硅处鍗曠敓鎴愭垚鍔�");
getTableData();
};
const viewDetail = (row) => {
currentSupplier.value = row.supplierName;
currentPeriod.value = row.period;
+
+ const purchaseInAmount = Math.floor(row.currentPayable * 0.7);
+ const returnAmount = Math.floor(row.currentPayable * 0.1);
+ const firstPayment = Math.floor(row.currentPayment * 0.5);
+ const secondPayment = row.currentPayment - firstPayment;
+
+ let runningBalance = row.beginBalance;
+
detailData.value = [
- { date: row.period + "-01", type: "鏈熷垵", code: "-", debit: 0, credit: 0, balance: row.beginBalance, remark: "鏈熷垵浣欓" },
- { date: row.period + "-05", type: "鍏ュ簱", code: "RK2024001", debit: 0, credit: 8000, balance: row.beginBalance + 8000, remark: "" },
- { date: row.period + "-10", type: "浠樻", code: "FK2024001", debit: 5000, credit: 0, balance: row.beginBalance + 3000, remark: "" },
- { date: row.period + "-15", type: "鍏ュ簱", code: "RK2024002", credit: 12000, balance: row.beginBalance + 15000, remark: "" },
- { date: row.period + "-20", type: "閫�璐�", code: "TH2024001", debit: 2000, credit: 0, balance: row.beginBalance + 13000, remark: "" },
- { date: row.period + "-25", type: "浠樻", code: "FK2024002", debit: row.currentPayment - 5000, balance: row.endBalance, remark: "" },
+ { date: row.period + "-01", type: "鏈熷垵", code: "-", debit: 0, credit: 0, balance: runningBalance, remark: "鏈熷垵浣欓" },
+ { date: row.period + "-05", type: "鍏ュ簱", code: "RK2024001", debit: 0, credit: purchaseInAmount, balance: runningBalance += purchaseInAmount, remark: "閲囪喘鍏ュ簱" },
+ { date: row.period + "-10", type: "浠樻", code: "FK2024001", debit: firstPayment, credit: 0, balance: runningBalance -= firstPayment, remark: "鏀粯璐ф" },
+ { date: row.period + "-15", type: "鍏ュ簱", code: "RK2024002", debit: 0, credit: row.currentPayable - purchaseInAmount - returnAmount, balance: runningBalance += (row.currentPayable - purchaseInAmount - returnAmount), remark: "閲囪喘鍏ュ簱" },
+ { date: row.period + "-20", type: "閫�璐�", code: "TH2024001", debit: 0, credit: -returnAmount, balance: runningBalance -= returnAmount, remark: "閲囪喘閫�璐�" },
+ { date: row.period + "-25", type: "浠樻", code: "FK2024002", debit: secondPayment, credit: 0, balance: runningBalance -= secondPayment, remark: "鏀粯璐ф" },
];
+
detailDialogVisible.value = true;
};
@@ -251,4 +428,42 @@
margin: 0;
}
}
+
+.purchase-section {
+ margin-top: 20px;
+
+ .section-title {
+ font-size: 16px;
+ font-weight: bold;
+ margin-bottom: 15px;
+ padding-left: 10px;
+ border-left: 4px solid #409eff;
+ }
+}
+
+.summary-row {
+ display: flex;
+ justify-content: space-around;
+ padding: 15px;
+ background-color: #f5f7fa;
+ border-radius: 4px;
+ margin-top: 15px;
+
+ span {
+ font-size: 14px;
+
+ strong {
+ font-size: 16px;
+ margin-left: 5px;
+ }
+ }
+}
+
+.empty-tip {
+ margin-top: 30px;
+}
+
+.text-primary {
+ color: #409eff;
+}
</style>
diff --git a/src/views/financialManagement/receivable/invoiceApply.vue b/src/views/financialManagement/receivable/invoiceApply.vue
index e637a3e..be9621d 100644
--- a/src/views/financialManagement/receivable/invoiceApply.vue
+++ b/src/views/financialManagement/receivable/invoiceApply.vue
@@ -61,7 +61,7 @@
</PIMTable>
</div>
- <el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" append-to-body>
+ <FormDialog :title="dialogTitle" v-model="dialogVisible" width="800px" @confirm="submitForm" @cancel="dialogVisible = false">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px">
<el-row :gutter="20">
<el-col :span="12">
@@ -119,16 +119,17 @@
</el-form-item>
</el-form>
<template #footer>
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
<el-button type="primary" @click="submitForm">纭畾</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
</template>
- </el-dialog>
+ </FormDialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "寮�绁ㄧ敵璇�",
diff --git a/src/views/financialManagement/receivable/outputInvoice.vue b/src/views/financialManagement/receivable/outputInvoice.vue
index 289905a..1f6b0a4 100644
--- a/src/views/financialManagement/receivable/outputInvoice.vue
+++ b/src/views/financialManagement/receivable/outputInvoice.vue
@@ -57,7 +57,7 @@
</PIMTable>
</div>
- <el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" append-to-body>
+ <FormDialog :title="dialogTitle" v-model="dialogVisible" width="800px" @confirm="submitForm" @cancel="dialogVisible = false">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px">
<el-row :gutter="20">
<el-col :span="12">
@@ -132,16 +132,17 @@
</el-form-item>
</el-form>
<template #footer>
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
<el-button type="primary" @click="submitForm">纭畾</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
</template>
- </el-dialog>
+ </FormDialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, computed } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "閿�椤瑰彂绁�",
diff --git a/src/views/financialManagement/receivable/receipt.vue b/src/views/financialManagement/receivable/receipt.vue
index 51bb1f2..2bbbb96 100644
--- a/src/views/financialManagement/receivable/receipt.vue
+++ b/src/views/financialManagement/receivable/receipt.vue
@@ -63,7 +63,7 @@
</PIMTable>
</div>
- <el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" append-to-body>
+ <FormDialog :title="dialogTitle" v-model="dialogVisible" width="800px" @confirm="submitForm" @cancel="dialogVisible = false">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px">
<el-row :gutter="20">
<el-col :span="12">
@@ -120,16 +120,17 @@
</el-form-item>
</el-form>
<template #footer>
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
<el-button type="primary" @click="submitForm">纭畾</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
</template>
- </el-dialog>
+ </FormDialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, computed } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "鏀舵鍗�",
diff --git a/src/views/financialManagement/receivable/reconciliation.vue b/src/views/financialManagement/receivable/reconciliation.vue
index fc6d7c1..883e12e 100644
--- a/src/views/financialManagement/receivable/reconciliation.vue
+++ b/src/views/financialManagement/receivable/reconciliation.vue
@@ -55,7 +55,7 @@
</PIMTable>
</div>
- <el-dialog title="瀵硅处鏄庣粏" v-model="detailDialogVisible" width="900px" append-to-body>
+ <FormDialog title="瀵硅处鏄庣粏" v-model="detailDialogVisible" width="900px" @confirm="printDetail" @cancel="detailDialogVisible = false" operationType="detail">
<div class="statement-header">
<h3>{{ currentCustomer }} 搴旀敹瀵硅处鍗�</h3>
<p>瀵硅处鏈熼棿: {{ currentPeriod }}</p>
@@ -88,16 +88,72 @@
<el-table-column prop="remark" label="澶囨敞" show-overflow-tooltip />
</el-table>
<template #footer>
- <el-button @click="detailDialogVisible = false">鍏抽棴</el-button>
<el-button type="primary" @click="printDetail">鎵撳嵃</el-button>
+ <el-button @click="detailDialogVisible = false">鍏抽棴</el-button>
</template>
- </el-dialog>
+ </FormDialog>
+
+ <FormDialog title="鐢熸垚瀵硅处鍗�" v-model="generateDialogVisible" width="1000px" @confirm="confirmGenerate" @cancel="generateDialogVisible = false">
+ <el-form :model="generateForm" label-width="100px">
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <el-form-item label="閫夋嫨瀹㈡埛" prop="customerId">
+ <el-select v-model="generateForm.customerId" placeholder="璇烽�夋嫨瀹㈡埛" style="width: 100%;" @change="onCustomerChange">
+ <el-option v-for="item in customerList" :key="item.id" :label="item.name" :value="item.id" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="瀵硅处鏈堜唤" prop="period">
+ <el-date-picker v-model="generateForm.period" type="month" placeholder="閫夋嫨鏈堜唤" value-format="YYYY-MM" style="width: 100%;" @change="onPeriodChange" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+
+ <div v-if="salesData.length > 0" class="sales-section">
+ <div class="section-title">鏈湀閿�鍞暟鎹�</div>
+ <el-table :data="salesData" border style="width: 100%; margin-bottom: 15px;" v-loading="salesLoading" @selection-change="handleSalesSelectionChange">
+ <el-table-column type="selection" width="55" align="center" />
+ <el-table-column prop="date" label="鏃ユ湡" width="120" />
+ <el-table-column prop="code" label="鍗曟嵁缂栧彿" width="150" />
+ <el-table-column prop="type" label="绫诲瀷" width="100">
+ <template #default="{ row }">
+ <el-tag :type="row.type === '鍑哄簱' ? 'success' : row.type === '鏀舵' ? 'primary' : 'danger'">{{ row.type }}</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="amount" label="閲戦" width="120">
+ <template #default="{ row }">
+ <span :class="row.type === '鍑哄簱' ? 'text-primary' : row.type === '鏀舵' ? 'text-success' : 'text-danger'">楼{{ formatMoney(row.amount) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="remark" label="澶囨敞" />
+ </el-table>
+
+ <div class="summary-row">
+ <span>鏈熷垵浣欓: <strong class="text-primary">楼{{ formatMoney(generateForm.beginBalance) }}</strong></span>
+ <span>鏈湡搴旀敹: <strong class="text-primary">楼{{ formatMoney(generateForm.currentReceivable) }}</strong></span>
+ <span>鏈湡鏀舵: <strong class="text-success">楼{{ formatMoney(generateForm.currentReceipt) }}</strong></span>
+ <span>鏈熸湯浣欓: <strong :class="calculateEndBalance(generateForm.beginBalance, generateForm.currentReceivable, generateForm.currentReceipt) >= 0 ? 'text-success' : 'text-danger'">楼{{ formatMoney(calculateEndBalance(generateForm.beginBalance, generateForm.currentReceivable, generateForm.currentReceipt)) }}</strong></span>
+ </div>
+ </div>
+
+ <div v-else-if="generateForm.customerId && !salesLoading" class="empty-tip">
+ <el-empty description="璇ュ鎴锋湰鏈堟殏鏃犻攢鍞暟鎹�" />
+ </div>
+
+ <template #footer>
+ <el-button type="primary" @click="confirmGenerate" :disabled="!canGenerate">纭鐢熸垚</el-button>
+ <el-button @click="generateDialogVisible = false">鍙栨秷</el-button>
+ </template>
+ </FormDialog>
</div>
</template>
<script setup>
-import { ref, reactive, onMounted } from "vue";
+import { ref, reactive, onMounted, computed } from "vue";
import { ElMessage } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "搴旀敹瀵硅处",
@@ -132,6 +188,24 @@
const currentPeriod = ref("");
const detailData = ref([]);
+const generateDialogVisible = ref(false);
+const salesLoading = ref(false);
+const salesData = ref([]);
+const selectedSales = ref([]);
+
+const generateForm = reactive({
+ customerId: "",
+ customerName: "",
+ period: "",
+ beginBalance: 0,
+ currentReceivable: 0,
+ currentReceipt: 0,
+});
+
+const canGenerate = computed(() => {
+ return generateForm.customerId && generateForm.period && selectedSales.value.length > 0;
+});
+
const customerList = [
{ id: 1, name: "鍖椾含绉戞妧鏈夐檺鍏徃" },
{ id: 2, name: "涓婃捣璐告槗鍏徃" },
@@ -144,6 +218,10 @@
{ id: 2, statementCode: "DZ202401002", customerId: 2, customerName: "涓婃捣璐告槗鍏徃", period: "2024-01", beginBalance: 5000, currentReceivable: 12000, currentReceipt: 10000, endBalance: 7000 },
{ id: 3, statementCode: "DZ202402001", customerId: 1, customerName: "鍖椾含绉戞妧鏈夐檺鍏徃", period: "2024-02", beginBalance: 17000, currentReceivable: 20000, currentReceipt: 15000, endBalance: 22000 },
];
+
+const calculateEndBalance = (beginBalance, currentReceivable, currentReceipt) => {
+ return beginBalance + currentReceivable - currentReceipt;
+};
const formatMoney = (value) => {
if (value === undefined || value === null) return "0.00";
@@ -177,34 +255,133 @@
};
const generateStatement = () => {
- ElMessage.success("瀵硅处鍗曠敓鎴愭垚鍔�");
+ generateForm.customerId = "";
+ generateForm.customerName = "";
+ generateForm.period = "";
+ generateForm.beginBalance = 0;
+ generateForm.currentReceivable = 0;
+ generateForm.currentReceipt = 0;
+ salesData.value = [];
+ selectedSales.value = [];
+ generateDialogVisible.value = true;
+};
+
+const onCustomerChange = (customerId) => {
+ const customer = customerList.find(item => item.id === customerId);
+ if (customer) {
+ generateForm.customerName = customer.name;
+ }
+ loadSalesData();
+};
+
+const onPeriodChange = () => {
+ loadSalesData();
+};
+
+const loadSalesData = () => {
+ if (!generateForm.customerId || !generateForm.period) {
+ salesData.value = [];
+ return;
+ }
+
+ salesLoading.value = true;
+
+ setTimeout(() => {
+ const mockSalesData = [
+ { id: 1, date: generateForm.period + "-03", code: "CK2024001", type: "鍑哄簱", amount: 8000, remark: "浜у搧A閿�鍞�" },
+ { id: 2, date: generateForm.period + "-08", code: "SK2024001", type: "鏀舵", amount: 5000, remark: "瀹㈡埛鍥炴" },
+ { id: 3, date: generateForm.period + "-12", code: "CK2024002", type: "鍑哄簱", amount: 12000, remark: "浜у搧B閿�鍞�" },
+ { id: 4, date: generateForm.period + "-15", code: "TH2024001", type: "閫�璐�", amount: 2000, remark: "璐ㄩ噺闂閫�璐�" },
+ { id: 5, date: generateForm.period + "-20", code: "CK2024003", type: "鍑哄簱", amount: 5000, remark: "浜у搧C閿�鍞�" },
+ { id: 6, date: generateForm.period + "-25", code: "SK2024002", type: "鏀舵", amount: 8000, remark: "瀹㈡埛鍥炴" },
+ ];
+
+ salesData.value = mockSalesData;
+
+ const lastPeriod = getLastPeriod(generateForm.period);
+ const lastStatement = mockData.find(item =>
+ item.customerId === generateForm.customerId && item.period === lastPeriod
+ );
+ generateForm.beginBalance = lastStatement ? lastStatement.endBalance : 0;
+
+ calculateSummary();
+
+ salesLoading.value = false;
+ }, 500);
+};
+
+const getLastPeriod = (period) => {
+ const [year, month] = period.split("-").map(Number);
+ if (month === 1) {
+ return `${year - 1}-12`;
+ }
+ return `${year}-${String(month - 1).padStart(2, "0")}`;
+};
+
+const calculateSummary = () => {
+ let receivable = 0;
+ let receipt = 0;
+
+ selectedSales.value.forEach(item => {
+ if (item.type === "鍑哄簱") {
+ receivable += item.amount;
+ } else if (item.type === "閫�璐�") {
+ receivable -= item.amount;
+ } else if (item.type === "鏀舵") {
+ receipt += item.amount;
+ }
+ });
+
+ generateForm.currentReceivable = receivable;
+ generateForm.currentReceipt = receipt;
+};
+
+const handleSalesSelectionChange = (selection) => {
+ selectedSales.value = selection;
+ calculateSummary();
+};
+
+const confirmGenerate = () => {
const newId = mockData.length > 0 ? Math.max(...mockData.map(item => item.id)) + 1 : 1;
- const customer = customerList[Math.floor(Math.random() * customerList.length)];
+ const endBalance = calculateEndBalance(generateForm.beginBalance, generateForm.currentReceivable, generateForm.currentReceipt);
+
mockData.unshift({
id: newId,
statementCode: "DZ" + Date.now(),
- customerId: customer.id,
- customerName: customer.name,
- period: "2024-03",
- beginBalance: Math.floor(Math.random() * 10000),
- currentReceivable: Math.floor(Math.random() * 20000),
- currentReceipt: Math.floor(Math.random() * 15000),
- endBalance: Math.floor(Math.random() * 20000),
+ customerId: generateForm.customerId,
+ customerName: generateForm.customerName,
+ period: generateForm.period,
+ beginBalance: generateForm.beginBalance,
+ currentReceivable: generateForm.currentReceivable,
+ currentReceipt: generateForm.currentReceipt,
+ endBalance,
});
+
+ generateDialogVisible.value = false;
+ ElMessage.success("瀵硅处鍗曠敓鎴愭垚鍔�");
getTableData();
};
const viewDetail = (row) => {
currentCustomer.value = row.customerName;
currentPeriod.value = row.period;
+
+ const saleOutAmount = Math.floor(row.currentReceivable * 0.6);
+ const returnAmount = Math.floor(row.currentReceivable * 0.1);
+ const firstReceipt = Math.floor(row.currentReceipt * 0.4);
+ const secondReceipt = row.currentReceipt - firstReceipt;
+
+ let runningBalance = row.beginBalance;
+
detailData.value = [
- { date: row.period + "-01", type: "鏈熷垵", code: "-", debit: 0, credit: 0, balance: row.beginBalance, remark: "鏈熷垵浣欓" },
- { date: row.period + "-05", type: "鍑哄簱", code: "CK2024001", debit: 5000, credit: 0, balance: row.beginBalance + 5000, remark: "" },
- { date: row.period + "-10", type: "鏀舵", code: "SK2024001", debit: 0, credit: 3000, balance: row.beginBalance + 2000, remark: "" },
- { date: row.period + "-15", type: "鍑哄簱", code: "CK2024002", debit: 8000, credit: 0, balance: row.beginBalance + 10000, remark: "" },
- { date: row.period + "-20", type: "閫�璐�", code: "TH2024001", debit: 0, credit: 2000, balance: row.beginBalance + 8000, remark: "" },
- { date: row.period + "-25", type: "鏀舵", code: "SK2024002", credit: row.currentReceipt - 3000, balance: row.endBalance, remark: "" },
+ { date: row.period + "-01", type: "鏈熷垵", code: "-", debit: 0, credit: 0, balance: runningBalance, remark: "鏈熷垵浣欓" },
+ { date: row.period + "-05", type: "鍑哄簱", code: "CK2024001", debit: saleOutAmount, credit: 0, balance: runningBalance += saleOutAmount, remark: "閿�鍞嚭搴�" },
+ { date: row.period + "-10", type: "鏀舵", code: "SK2024001", debit: 0, credit: firstReceipt, balance: runningBalance -= firstReceipt, remark: "瀹㈡埛鍥炴" },
+ { date: row.period + "-15", type: "鍑哄簱", code: "CK2024002", debit: row.currentReceivable - saleOutAmount - returnAmount, credit: 0, balance: runningBalance += (row.currentReceivable - saleOutAmount - returnAmount), remark: "閿�鍞嚭搴�" },
+ { date: row.period + "-20", type: "閫�璐�", code: "TH2024001", debit: 0, credit: returnAmount, balance: runningBalance -= returnAmount, remark: "閿�鍞��璐�" },
+ { date: row.period + "-25", type: "鏀舵", code: "SK2024002", debit: 0, credit: secondReceipt, balance: runningBalance -= secondReceipt, remark: "瀹㈡埛鍥炴" },
];
+
detailDialogVisible.value = true;
};
@@ -255,4 +432,38 @@
margin: 0;
}
}
+
+.sales-section {
+ margin-top: 20px;
+
+ .section-title {
+ font-size: 16px;
+ font-weight: bold;
+ margin-bottom: 15px;
+ padding-left: 10px;
+ border-left: 4px solid #409eff;
+ }
+}
+
+.summary-row {
+ display: flex;
+ justify-content: space-around;
+ padding: 15px;
+ background-color: #f5f7fa;
+ border-radius: 4px;
+ margin-top: 15px;
+
+ span {
+ font-size: 14px;
+
+ strong {
+ font-size: 16px;
+ margin-left: 5px;
+ }
+ }
+}
+
+.empty-tip {
+ margin-top: 30px;
+}
</style>
diff --git a/src/views/financialManagement/receivable/salesOut.vue b/src/views/financialManagement/receivable/salesOut.vue
index 034f2b9..fce0c20 100644
--- a/src/views/financialManagement/receivable/salesOut.vue
+++ b/src/views/financialManagement/receivable/salesOut.vue
@@ -46,7 +46,7 @@
</PIMTable>
</div>
- <el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" append-to-body>
+ <FormDialog :title="dialogTitle" v-model="dialogVisible" width="800px" @confirm="submitForm" @cancel="dialogVisible = false">
<el-form :model="form" :rules="rules" ref="formRef" label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
@@ -79,16 +79,17 @@
</el-form-item>
</el-form>
<template #footer>
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
<el-button type="primary" @click="submitForm">纭畾</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
</template>
- </el-dialog>
+ </FormDialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "閿�鍞嚭搴�",
diff --git a/src/views/financialManagement/receivable/salesReturn.vue b/src/views/financialManagement/receivable/salesReturn.vue
index 83ee4f7..4cf54d6 100644
--- a/src/views/financialManagement/receivable/salesReturn.vue
+++ b/src/views/financialManagement/receivable/salesReturn.vue
@@ -46,7 +46,7 @@
</PIMTable>
</div>
- <el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" append-to-body>
+ <FormDialog :title="dialogTitle" v-model="dialogVisible" width="800px" @confirm="submitForm" @cancel="dialogVisible = false">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px">
<el-row :gutter="20">
<el-col :span="12">
@@ -93,16 +93,17 @@
</el-form-item>
</el-form>
<template #footer>
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
<el-button type="primary" @click="submitForm">纭畾</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
</template>
- </el-dialog>
+ </FormDialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "閿�鍞��璐�",
diff --git a/src/views/financialManagement/salesRefund/components/ReceiptandRefundPopupWindow.vue b/src/views/financialManagement/salesRefund/components/ReceiptandRefundPopupWindow.vue
index d8218c1..35215a5 100644
--- a/src/views/financialManagement/salesRefund/components/ReceiptandRefundPopupWindow.vue
+++ b/src/views/financialManagement/salesRefund/components/ReceiptandRefundPopupWindow.vue
@@ -1,5 +1,5 @@
<template>
- <el-dialog v-model="visible" title="鏀舵/閫�娆�" width="90%" append-to-body>
+ <FormDialog v-model="visible" title="鏀舵/閫�娆�" width="90%" @confirm="submit" @cancel="visible=false">
<div class="section">
<div class="section-title descriptions">鍩虹璧勬枡</div>
<el-form :model="form" label-width="100px">
@@ -140,12 +140,13 @@
<el-button type="primary" @click="submit">纭</el-button>
<el-button @click="visible=false">鍙栨秷</el-button>
</template>
- </el-dialog>
+ </FormDialog>
</template>
<script setup>
import { ref } from 'vue';
import { getToken } from '@/utils/auth';
+import FormDialog from "@/components/Dialog/FormDialog.vue";
const visible = ref(false);
const form = ref({
diff --git a/src/views/financialManagement/voucher/index.vue b/src/views/financialManagement/voucher/index.vue
index 440336f..817185c 100644
--- a/src/views/financialManagement/voucher/index.vue
+++ b/src/views/financialManagement/voucher/index.vue
@@ -69,87 +69,142 @@
</PIMTable>
</div>
- <el-dialog :title="dialogTitle" v-model="dialogVisible" width="900px" append-to-body>
- <el-form :model="form" :rules="rules" ref="formRef" label-width="100px">
- <el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="鍑瘉瀛楀彿" prop="voucherNo">
- <el-input v-model="form.voucherNo" placeholder="绯荤粺鑷姩鐢熸垚" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="鍑瘉鏃ユ湡" prop="voucherDate">
- <el-date-picker v-model="form.voucherDate" type="date" placeholder="閫夋嫨鏃ユ湡" value-format="YYYY-MM-DD" style="width: 100%;" />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="闄勪欢寮犳暟" prop="attachmentCount">
- <el-input-number v-model="form.attachmentCount" :min="0" style="width: 100%;" />
- </el-form-item>
- </el-col>
- </el-row>
- <el-form-item label="鍑瘉鍒嗗綍" prop="entries">
- <el-table :data="form.entries" border style="width: 100%">
- <el-table-column type="index" label="搴忓彿" width="60" />
- <el-table-column prop="subjectCode" label="绉戠洰缂栫爜" width="120">
- <template #default="{ $index }">
- <el-select v-model="form.entries[$index].subjectCode" placeholder="閫夋嫨绉戠洰" filterable style="width: 100%;" @change="(val) => handleSubjectChange(val, $index)">
- <el-option v-for="item in subjectList" :key="item.code" :label="item.code" :value="item.code" />
- </el-select>
- </template>
- </el-table-column>
- <el-table-column prop="subjectName" label="绉戠洰鍚嶇О" width="150">
- <template #default="{ $index }">
- <el-input v-model="form.entries[$index].subjectName" disabled />
- </template>
- </el-table-column>
- <el-table-column prop="summary" label="鎽樿">
- <template #default="{ $index }">
- <el-input v-model="form.entries[$index].summary" placeholder="璇疯緭鍏ユ憳瑕�" />
- </template>
- </el-table-column>
- <el-table-column prop="debit" label="鍊熸柟閲戦" width="130">
- <template #default="{ $index }">
- <el-input-number v-model="form.entries[$index].debit" :min="0" :precision="2" style="width: 100%;" @change="calculateTotal" />
- </template>
- </el-table-column>
- <el-table-column prop="credit" label="璐锋柟閲戦" width="130">
- <template #default="{ $index }">
- <el-input-number v-model="form.entries[$index].credit" :min="0" :precision="2" style="width: 100%;" @change="calculateTotal" />
- </template>
- </el-table-column>
- <el-table-column label="鎿嶄綔" width="80">
- <template #default="{ $index }">
- <el-button type="danger" link @click="removeEntry($index)">鍒犻櫎</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div style="display: flex; justify-content: space-between; margin-top: 10px;">
- <el-button type="primary" link @click="addEntry">+ 娣诲姞鍒嗗綍</el-button>
- <div>
- <span style="margin-right: 20px;">鍚堣: 鍊熸柟 <span :class="totalDebitEntry === totalCreditEntry ? 'text-success' : 'text-danger'">楼{{ formatMoney(totalDebitEntry) }}</span></span>
- <span>璐锋柟 <span :class="totalDebitEntry === totalCreditEntry ? 'text-success' : 'text-danger'">楼{{ formatMoney(totalCreditEntry) }}</span></span>
+ <FormDialog :title="dialogTitle" v-model="dialogVisible" width="1200px" @confirm="submitForm" @cancel="dialogVisible = false">
+ <div class="voucher-container">
+ <div class="voucher-header">
+ <h2 class="voucher-title">璁拌处鍑瘉</h2>
+ <div class="voucher-period">{{ form.voucherDate ? form.voucherDate.substring(0, 7) + '鏈�' : '' }}</div>
+ </div>
+ <el-form :model="form" :rules="rules" ref="formRef" label-width="0">
+ <div class="voucher-info">
+ <div class="voucher-no-section">
+ <span class="label">鍑瘉瀛楋細</span>
+ <el-select v-model="form.voucherPrefix" style="width: 70px;">
+ <el-option label="璁�" value="璁�" />
+ </el-select>
+ <el-input v-model="form.voucherNum" style="width: 60px;" />
+ <span class="label" style="margin-left: 5px;">鍙�</span>
+ </div>
+ <div class="voucher-date-section">
+ <span class="label">鏃ユ湡锛�</span>
+ <el-date-picker v-model="form.voucherDate" type="date" placeholder="閫夋嫨鏃ユ湡" value-format="YYYY-MM-DD" style="width: 140px;" />
+ </div>
+ <div class="voucher-attachment-section">
+ <span class="label">闄勪欢锛�</span>
+ <el-input-number v-model="form.attachmentCount" :min="0" :controls="false" style="width: 60px;" />
+ <span class="label" style="margin-left: 5px;">寮�</span>
+ <el-button type="primary" link style="margin-left: 10px;">涓婁紶鏂囦欢</el-button>
</div>
</div>
- </el-form-item>
- <el-form-item label="鍒跺崟浜�" prop="creator">
- <el-input v-model="form.creator" disabled />
- </el-form-item>
- <el-form-item label="澶囨敞" prop="remark">
- <el-input v-model="form.remark" type="textarea" :rows="2" placeholder="璇疯緭鍏ュ娉�" />
- </el-form-item>
- </el-form>
+ <div class="voucher-table">
+ <table class="accounting-voucher">
+ <thead>
+ <tr>
+ <th class="col-summary" rowspan="2">鎽樿</th>
+ <th class="col-subject" rowspan="2">浼氳绉戠洰</th>
+ <th class="col-debit-header" colspan="11">鍊熸柟</th>
+ <th class="col-credit-header" colspan="11">璐锋柟</th>
+ <th class="col-action" rowspan="2">鎿嶄綔</th>
+ </tr>
+ <tr class="amount-header">
+ <th>浜�</th>
+ <th>鍗�</th>
+ <th>鐧�</th>
+ <th>鍗�</th>
+ <th>涓�</th>
+ <th>鍗�</th>
+ <th>鐧�</th>
+ <th>鍗�</th>
+ <th>鍏�</th>
+ <th>瑙�</th>
+ <th>鍒�</th>
+ <th>浜�</th>
+ <th>鍗�</th>
+ <th>鐧�</th>
+ <th>鍗�</th>
+ <th>涓�</th>
+ <th>鍗�</th>
+ <th>鐧�</th>
+ <th>鍗�</th>
+ <th>鍏�</th>
+ <th>瑙�</th>
+ <th>鍒�</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr v-for="(entry, rowIndex) in form.entries" :key="rowIndex" @click="selectRow(rowIndex)" :class="{ 'selected-row': selectedRowIndex === rowIndex }">
+ <td class="col-summary">
+ <el-input v-model="entry.summary" placeholder="璇疯緭鍏ユ憳瑕�" @focus="selectRow(rowIndex)" />
+ </td>
+ <td class="col-subject">
+ <el-select v-model="entry.subjectCode" placeholder="閫夋嫨绉戠洰" filterable @change="(val) => handleSubjectChange(val, rowIndex)" @focus="selectRow(rowIndex)">
+ <el-option v-for="item in subjectList" :key="item.code" :label="item.code + item.name" :value="item.code" />
+ </el-select>
+ <div class="subject-name">{{ entry.subjectName }}</div>
+ </td>
+ <!-- 鍊熸柟11鍒� -->
+ <template v-if="editingCell.row === rowIndex && editingCell.type === 'debit'">
+ <td colspan="11" class="debit-input-cell">
+ <el-input-number ref="amountInputRef" v-model="entry.debit" :min="0" :precision="2" :controls="false" size="small" @blur="finishEdit" class="full-width-input" />
+ </td>
+ </template>
+ <template v-else>
+ <td v-for="(digit, dIndex) in getAmountDigits(entry.debit, 11)" :key="'debit-'+dIndex" class="amount-cell debit-cell" @click="openAmountInput(rowIndex, 'debit')">
+ <span :class="{ 'text-primary': digit !== '', 'zero': digit === '' }">{{ digit || '' }}</span>
+ </td>
+ </template>
+ <!-- 璐锋柟11鍒� -->
+ <template v-if="editingCell.row === rowIndex && editingCell.type === 'credit'">
+ <td colspan="11" class="credit-input-cell">
+ <el-input-number ref="amountInputRef" v-model="entry.credit" :min="0" :precision="2" :controls="false" size="small" @blur="finishEdit" class="full-width-input" />
+ </td>
+ </template>
+ <template v-else>
+ <td v-for="(digit, dIndex) in getAmountDigits(entry.credit, 11)" :key="'credit-'+dIndex" class="amount-cell credit-cell" @click="openAmountInput(rowIndex, 'credit')">
+ <span :class="{ 'text-danger': digit !== '', 'zero': digit === '' }">{{ digit || '' }}</span>
+ </td>
+ </template>
+ <td class="col-action">
+ <el-button type="danger" link size="small" @click="removeEntry(rowIndex)" icon="Delete" :disabled="form.entries.length <= 2">鍒犻櫎</el-button>
+ </td>
+ </tr>
+ <tr class="total-row">
+ <td class="col-summary" colspan="2" style="text-align: center; font-weight: bold;">鍚堣锛�</td>
+ <td v-for="(digit, index) in getAmountDigits(totalDebitEntry, 11)" :key="'total-debit-'+index" class="amount-cell total-debit-cell">
+ <span :class="{ 'text-primary': digit !== '' }">{{ digit }}</span>
+ </td>
+ <td v-for="(digit, index) in getAmountDigits(totalCreditEntry, 11)" :key="'total-credit-'+index" class="amount-cell total-credit-cell">
+ <span :class="{ 'text-danger': digit !== '' }">{{ digit }}</span>
+ </td>
+ <td class="col-action"></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="voucher-toolbar">
+ <el-button type="primary" link @click="addEntry" icon="Plus">鏂板琛�</el-button>
+ </div>
+ <div class="voucher-footer">
+ <div class="creator-section">
+ <span class="label">鍒跺崟浜猴細{{ form.creator }}</span>
+ </div>
+ </div>
+ </el-form>
+ </div>
<template #footer>
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
- <el-button type="primary" @click="submitForm" :disabled="totalDebitEntry !== totalCreditEntry">纭畾</el-button>
+ <div>
+ <el-button type="primary" @click="submitForm" :disabled="!isBalanced">淇濆瓨</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
+ </div>
</template>
- </el-dialog>
+ </FormDialog>
</div>
</template>
<script setup>
-import { ref, reactive, onMounted, computed } from "vue";
+import { ref, reactive, onMounted, computed, nextTick } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
+import FormDialog from "@/components/Dialog/FormDialog.vue";
defineOptions({
name: "鍑瘉绠$悊",
@@ -198,11 +253,24 @@
const form = reactive({
voucherNo: "",
+ voucherPrefix: "璁�",
+ voucherNum: "",
voucherDate: "",
attachmentCount: 0,
entries: [],
creator: "寮犱笁",
remark: "",
+});
+
+const selectedRowIndex = ref(-1);
+const editingCell = reactive({
+ row: -1,
+ type: "",
+});
+const amountInputRef = ref(null);
+
+const isBalanced = computed(() => {
+ return totalDebitEntry.value === totalCreditEntry.value && totalDebitEntry.value > 0;
});
const rules = {
@@ -283,6 +351,56 @@
form.entries.push({ subjectCode: "", subjectName: "", summary: "", debit: 0, credit: 0 });
};
+const selectRow = (index) => {
+ selectedRowIndex.value = index;
+};
+
+const openAmountInput = (index, type) => {
+ editingCell.row = index;
+ editingCell.type = type;
+ nextTick(() => {
+ if (amountInputRef.value) {
+ amountInputRef.value.focus();
+ }
+ });
+};
+
+const finishEdit = () => {
+ editingCell.row = -1;
+ editingCell.type = "";
+};
+
+const getAmountDigits = (amount, length) => {
+ if (!amount || amount === 0) {
+ return new Array(length).fill('');
+ }
+
+ const amountStr = Number(amount).toFixed(2);
+ const [intPart, decPart] = amountStr.split('.');
+ const fullAmount = intPart + decPart;
+
+ // 宸﹀~鍏�0鍒版寚瀹氶暱搴�
+ const paddedAmount = fullAmount.padStart(length, '0');
+ const digits = paddedAmount.split('');
+
+ // 鎵惧埌绗竴涓潪闆舵暟瀛楃殑浣嶇疆
+ let firstNonZeroIndex = 0;
+ for (let i = 0; i < digits.length; i++) {
+ if (digits[i] !== '0') {
+ firstNonZeroIndex = i;
+ break;
+ }
+ }
+
+ // 鍙殣钘忓墠瀵奸浂锛堢涓�涓潪闆舵暟瀛椾箣鍓嶇殑闆讹級
+ return digits.map((d, index) => {
+ if (index < firstNonZeroIndex) {
+ return ''; // 鍓嶅闆舵樉绀轰负绌�
+ }
+ return d; // 淇濈暀閲戦涓殑闆�
+ });
+};
+
const removeEntry = (index) => {
form.entries.splice(index, 1);
calculateTotal();
@@ -302,14 +420,23 @@
const add = () => {
isEdit.value = false;
dialogTitle.value = "鏂板鍑瘉";
+ const nextNum = String(mockData.length + 1).padStart(2, "0");
Object.assign(form, {
- voucherNo: "璁�-" + String(mockData.length + 1).padStart(4, "0"),
+ voucherNo: "璁�-" + nextNum,
+ voucherPrefix: "璁�",
+ voucherNum: nextNum,
voucherDate: new Date().toISOString().split('T')[0],
attachmentCount: 0,
- entries: [{ subjectCode: "", subjectName: "", summary: "", debit: 0, credit: 0 }],
+ entries: [
+ { subjectCode: "", subjectName: "", summary: "", debit: 0, credit: 0 },
+ { subjectCode: "", subjectName: "", summary: "", debit: 0, credit: 0 },
+ { subjectCode: "", subjectName: "", summary: "", debit: 0, credit: 0 },
+ { subjectCode: "", subjectName: "", summary: "", debit: 0, credit: 0 },
+ ],
creator: "寮犱笁",
remark: "",
});
+ selectedRowIndex.value = 0;
dialogVisible.value = true;
};
@@ -317,7 +444,18 @@
isEdit.value = true;
currentId.value = row.id;
dialogTitle.value = "缂栬緫鍑瘉";
- Object.assign(form, row);
+ const parts = row.voucherNo.split('-');
+ Object.assign(form, {
+ ...row,
+ voucherPrefix: parts[0] || '璁�',
+ voucherNum: parts[1] || '',
+ });
+ if (form.entries.length < 4) {
+ while (form.entries.length < 4) {
+ form.entries.push({ subjectCode: "", subjectName: "", summary: "", debit: 0, credit: 0 });
+ }
+ }
+ selectedRowIndex.value = 0;
dialogVisible.value = true;
};
@@ -366,20 +504,33 @@
const submitForm = () => {
formRef.value.validate((valid) => {
if (valid) {
- if (totalDebitEntry.value !== totalCreditEntry.value) {
+ if (!isBalanced.value) {
ElMessage.error("鍊熻捶涓嶅钩琛★紝璇锋鏌ュ垎褰�");
return;
}
- const summary = form.entries.find(e => e.debit > 0)?.summary || "";
+
+ const validEntries = form.entries.filter(e => e.subjectCode && (e.debit > 0 || e.credit > 0));
+ const summary = validEntries.find(e => e.debit > 0)?.summary || "";
+
+ const voucherNo = `${form.voucherPrefix}-${form.voucherNum}`;
+ const dataToSave = {
+ ...form,
+ voucherNo,
+ summary,
+ debit: totalDebitEntry.value,
+ credit: totalCreditEntry.value,
+ entries: validEntries,
+ };
+
if (isEdit.value) {
const index = mockData.findIndex(item => item.id === currentId.value);
if (index !== -1) {
- mockData[index] = { ...mockData[index], ...form, summary, debit: totalDebitEntry.value, credit: totalCreditEntry.value };
+ mockData[index] = { ...mockData[index], ...dataToSave };
}
ElMessage.success("缂栬緫鎴愬姛");
} else {
const newId = mockData.length > 0 ? Math.max(...mockData.map(item => item.id)) + 1 : 1;
- mockData.push({ id: newId, ...form, summary, debit: totalDebitEntry.value, credit: totalCreditEntry.value, status: "unposted" });
+ mockData.push({ id: newId, ...dataToSave, status: "unposted" });
ElMessage.success("鏂板鎴愬姛");
}
dialogVisible.value = false;
@@ -415,4 +566,271 @@
color: #f56c6c;
font-weight: bold;
}
+
+.text-primary {
+ color: #409eff;
+}
+
+.voucher-container {
+ background: #fff;
+ padding: 20px;
+}
+
+.voucher-header {
+ text-align: center;
+ margin-bottom: 15px;
+
+ .voucher-title {
+ font-size: 22px;
+ font-weight: bold;
+ margin: 0 0 5px 0;
+ color: #303133;
+ }
+
+ .voucher-period {
+ font-size: 14px;
+ color: #909399;
+ }
+}
+
+.voucher-info {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 15px;
+ padding: 0 10px;
+
+ .label {
+ font-size: 14px;
+ color: #606266;
+ }
+
+ .voucher-no-section,
+ .voucher-date-section,
+ .voucher-attachment-section {
+ display: flex;
+ align-items: center;
+ }
+}
+
+.voucher-table {
+ border: 1px solid #dcdfe6;
+ border-right: none;
+ margin-bottom: 15px;
+}
+
+.accounting-voucher {
+ width: 100%;
+ border-collapse: collapse;
+ font-size: 13px;
+
+ th,
+ td {
+ border: 1px solid #dcdfe6;
+ text-align: center;
+ padding: 0;
+ height: 36px;
+ }
+
+ & th:last-child,
+ & td:last-child {
+ border-right: none !important;
+ }
+
+ thead {
+ background-color: #f5f7fa;
+
+ th {
+ font-weight: normal;
+ color: #606266;
+ font-size: 12px;
+ }
+
+ .col-summary,
+ .col-subject {
+ font-weight: bold;
+ font-size: 13px;
+ }
+
+ .col-debit-header,
+ .col-credit-header {
+ background-color: #ecf5ff;
+ color: #409eff;
+ font-weight: bold;
+ }
+ }
+
+ .amount-header {
+ th {
+ font-size: 11px;
+ padding: 2px 0;
+ background-color: #f5f7fa;
+ }
+ }
+
+ .col-summary {
+ width: 160px;
+ min-width: 160px;
+ }
+
+ .col-subject {
+ width: 180px;
+ min-width: 180px;
+ }
+
+ .col-action {
+ width: 60px;
+ min-width: 60px;
+ text-align: center;
+ }
+
+ .amount-cell {
+ width: 24px;
+ min-width: 24px;
+ max-width: 24px;
+ padding: 0;
+ font-size: 13px;
+ font-family: 'Courier New', monospace;
+ cursor: pointer;
+ text-align: center;
+
+ &:hover {
+ background-color: #f5f7fa;
+ }
+
+ span {
+ display: block;
+ width: 100%;
+ height: 100%;
+ line-height: 36px;
+
+ &.zero {
+ color: #c0c4cc;
+ }
+ }
+ }
+
+ .debit-input-cell,
+ .credit-input-cell {
+ padding: 0;
+ background-color: #ecf5ff;
+
+ .full-width-input {
+ width: 100%;
+
+ :deep(.el-input__wrapper) {
+ padding: 0 10px;
+ box-shadow: none;
+ background-color: transparent;
+ }
+
+ input {
+ text-align: right;
+ font-size: 14px;
+ height: 34px;
+ }
+ }
+ }
+
+ tbody {
+ tr {
+ &:hover {
+ background-color: #f5f7fa;
+ }
+
+ &.selected-row {
+ background-color: #ecf5ff;
+ }
+ }
+
+ td {
+ .el-input {
+ .el-input__wrapper {
+ box-shadow: none;
+ padding: 0 5px;
+ }
+
+ input {
+ text-align: center;
+ height: 34px;
+ }
+ }
+
+ .el-select {
+ width: 100%;
+
+ .el-input__wrapper {
+ box-shadow: none;
+ }
+
+ input {
+ text-align: center;
+ height: 34px;
+ }
+ }
+ }
+
+ .col-summary {
+ .el-input input {
+ text-align: left;
+ padding-left: 10px;
+ }
+ }
+
+ .col-subject {
+ position: relative;
+
+ .el-select {
+ .el-input input {
+ font-size: 12px;
+ }
+ }
+
+ .subject-name {
+ font-size: 11px;
+ color: #909399;
+ margin-top: 2px;
+ line-height: 1.2;
+ }
+ }
+ }
+
+ .total-row {
+ background-color: #fdf6ec;
+
+ td {
+ font-weight: bold;
+ }
+
+ .total-cell {
+ background-color: #fdf6ec;
+ font-weight: bold;
+ }
+ }
+}
+
+.voucher-toolbar {
+ display: flex;
+ justify-content: flex-start;
+ padding: 10px 0;
+ margin-top: 5px;
+}
+
+.voucher-footer {
+ display: flex;
+ justify-content: flex-end;
+ padding: 0 10px;
+ margin-top: 10px;
+
+ .creator-section {
+ .label {
+ font-size: 14px;
+ color: #606266;
+ }
+ }
+}
+
+:deep(.el-dialog__body) {
+ padding: 10px 20px;
+}
</style>
diff --git a/src/views/inventoryManagement/dispatchLog/Record.vue b/src/views/inventoryManagement/dispatchLog/Record.vue
index 80d7515..6060cf5 100644
--- a/src/views/inventoryManagement/dispatchLog/Record.vue
+++ b/src/views/inventoryManagement/dispatchLog/Record.vue
@@ -1,6 +1,6 @@
<template>
- <div class="app-container">
- <div class="search_form">
+ <div>
+ <div class="search_form" style="margin-bottom: 10px;">
<div>
<span class="search_title ml10">鍑哄簱鏃ユ湡锛�</span>
<el-date-picker
diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index d8bc1ea..7ca8fea 100644
--- a/src/views/inventoryManagement/receiptManagement/Record.vue
+++ b/src/views/inventoryManagement/receiptManagement/Record.vue
@@ -1,6 +1,6 @@
<template>
- <div class="app-container">
- <div class="search_form">
+ <div>
+ <div class="search_form" style="margin-bottom: 10px;">
<div>
<span class="search_title ml10">鍏ュ簱鏃ユ湡锛�</span>
<el-date-picker v-model="searchForm.timeStr"
diff --git a/src/views/inventoryManagement/stockManagement/Record.vue b/src/views/inventoryManagement/stockManagement/Record.vue
index b1bb0ea..7c0a461 100644
--- a/src/views/inventoryManagement/stockManagement/Record.vue
+++ b/src/views/inventoryManagement/stockManagement/Record.vue
@@ -1,6 +1,6 @@
<template>
- <div class="app-container">
- <div class="search_form">
+ <div>
+ <div class="search_form mb10">
<div>
<span class="search_title ml10">浜у搧澶х被锛�</span>
<el-input v-model="searchForm.productName"
diff --git a/src/views/lavorissue/statistics/index.vue b/src/views/lavorissue/statistics/index.vue
index 2c34f67..54e1f38 100644
--- a/src/views/lavorissue/statistics/index.vue
+++ b/src/views/lavorissue/statistics/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">鍙戞斁瀛e害锛�</span>
<el-select
diff --git a/src/views/personnelManagement/contractManagement/index.vue b/src/views/personnelManagement/contractManagement/index.vue
index 1d2aab7..a55a502 100644
--- a/src/views/personnelManagement/contractManagement/index.vue
+++ b/src/views/personnelManagement/contractManagement/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">濮撳悕锛�</span>
<el-input v-model="searchForm.staffName" style="width: 240px" placeholder="璇疯緭鍏ュ鍚嶆悳绱�" @change="handleQuery"
diff --git a/src/views/personnelManagement/dimission/index.vue b/src/views/personnelManagement/dimission/index.vue
index 5993b3f..c2b8c3e 100644
--- a/src/views/personnelManagement/dimission/index.vue
+++ b/src/views/personnelManagement/dimission/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">濮撳悕锛�</span>
<el-input
diff --git a/src/views/personnelManagement/employeeRecord/index.vue b/src/views/personnelManagement/employeeRecord/index.vue
index 131d37b..cd4ecf5 100644
--- a/src/views/personnelManagement/employeeRecord/index.vue
+++ b/src/views/personnelManagement/employeeRecord/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">濮撳悕锛�</span>
<el-input
diff --git a/src/views/personnelManagement/socialSecuritySet/index.vue b/src/views/personnelManagement/socialSecuritySet/index.vue
index 2a1ff65..1f3f104 100644
--- a/src/views/personnelManagement/socialSecuritySet/index.vue
+++ b/src/views/personnelManagement/socialSecuritySet/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">涓婚锛�</span>
<el-input
diff --git a/src/views/procurementManagement/paymentLedger/index.vue b/src/views/procurementManagement/paymentLedger/index.vue
index 294561d..23a62aa 100644
--- a/src/views/procurementManagement/paymentLedger/index.vue
+++ b/src/views/procurementManagement/paymentLedger/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form" style="margin-bottom: 20px;">
<div>
<span class="search_title">渚涘簲鍟嗗悕绉�:</span>
<el-input
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 1991342..28fb968 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -635,7 +635,6 @@
</template>
<script setup>
-import {Search, Delete} from "@element-plus/icons-vue";
import FormDialog from '@/components/Dialog/FormDialog.vue';
import FileListDialog from '@/components/Dialog/FileListDialog.vue';
import { getToken } from "@/utils/auth";
diff --git a/src/views/procurementManagement/procurementReport/index.vue b/src/views/procurementManagement/procurementReport/index.vue
index 4ba1802..26e682d 100644
--- a/src/views/procurementManagement/procurementReport/index.vue
+++ b/src/views/procurementManagement/procurementReport/index.vue
@@ -334,12 +334,6 @@
</script>
<style scoped>
-.app-container {
- padding: 20px;
- background-color: #f5f7fa;
- min-height: 100vh;
-}
-
.page-header {
text-align: center;
margin-bottom: 20px;
diff --git a/src/views/productionManagement/workOrderEdit/index.vue b/src/views/productionManagement/workOrderEdit/index.vue
index 5d97b41..1cde5ea 100644
--- a/src/views/productionManagement/workOrderEdit/index.vue
+++ b/src/views/productionManagement/workOrderEdit/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div class="search-row">
<div class="search-item">
<span class="search_title">宸ュ崟缂栧彿锛�</span>
diff --git a/src/views/productionManagement/workOrderManagement/index.vue b/src/views/productionManagement/workOrderManagement/index.vue
index 5cfa144..600b274 100644
--- a/src/views/productionManagement/workOrderManagement/index.vue
+++ b/src/views/productionManagement/workOrderManagement/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div class="search-row">
<div class="search-item">
<span class="search_title">宸ュ崟缂栧彿锛�</span>
diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
index eaed2e9..a2d1acc 100644
--- a/src/views/qualityManagement/finalInspection/index.vue
+++ b/src/views/qualityManagement/finalInspection/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">浜у搧鍚嶇О锛�</span>
<el-input
diff --git a/src/views/qualityManagement/nonconformingManagement/index.vue b/src/views/qualityManagement/nonconformingManagement/index.vue
index 55d2472..6306397 100644
--- a/src/views/qualityManagement/nonconformingManagement/index.vue
+++ b/src/views/qualityManagement/nonconformingManagement/index.vue
@@ -1,24 +1,21 @@
<template>
<div class="app-container">
<div class="search_form">
- <div style="display: flex;flex-direction: row;align-items: center;">
- <div>
- <span class="search_title">绫诲瀷锛�</span>
+ <el-form :model="searchForm" inline style="margin-bottom: 0;">
+ <el-form-item label="绫诲瀷锛�">
<el-select v-model="searchForm.inspectType" clearable style="width: 200px" @change="handleQuery">
<el-option label="鍘熸潗鏂欐楠�" :value="0" />
<el-option label="杩囩▼妫�楠�" :value="1" />
<el-option label="鍑哄巶妫�楠�" :value="2" />
</el-select>
- </div>
- <div style="margin-left: 10px">
- <span class="search_title">鐘舵�侊細</span>
+ </el-form-item>
+ <el-form-item label="鐘舵�侊細">
<el-select v-model="searchForm.inspectState" clearable style="width: 200px" @change="handleQuery">
<el-option label="寰呭鐞�" :value="0" />
<el-option label="宸插鐞�" :value="1" />
</el-select>
- </div>
- <div style="margin-left: 10px">
- <span class="search_title">浜у搧鍚嶇О锛�</span>
+ </el-form-item>
+ <el-form-item label="浜у搧鍚嶇О锛�">
<el-input
v-model="searchForm.productName"
style="width: 200px"
@@ -27,19 +24,22 @@
clearable
:prefix-icon="Search"
/>
- </div>
- <span style="margin-left: 10px" class="search_title">妫�娴嬫棩鏈燂細</span>
- <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
- style="width: 300px"
- placeholder="璇烽�夋嫨" clearable @change="changeDaterange" />
- <el-button type="primary" @click="handleQuery" style="margin-left: 10px">鎼滅储</el-button>
- </div>
- <div>
+ </el-form-item>
+ <el-form-item label="妫�娴嬫棩鏈燂細">
+ <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
+ style="width: 300px"
+ placeholder="璇烽�夋嫨" clearable @change="changeDaterange" />
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="handleQuery">鎼滅储</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ <div class="mb20" style="text-align: right;">
<el-button type="primary" @click="openForm('add')">鏂板</el-button>
<el-button @click="handleOut">瀵煎嚭</el-button>
<el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
</div>
- </div>
<div class="table_list">
<PIMTable
rowKey="id"
diff --git a/src/views/qualityManagement/processInspection/index.vue b/src/views/qualityManagement/processInspection/index.vue
index cbeab71..e5504b6 100644
--- a/src/views/qualityManagement/processInspection/index.vue
+++ b/src/views/qualityManagement/processInspection/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">宸ュ簭锛�</span>
<el-input
diff --git a/src/views/qualityManagement/rawMaterialInspection/index.vue b/src/views/qualityManagement/rawMaterialInspection/index.vue
index 26504b0..cc2c151 100644
--- a/src/views/qualityManagement/rawMaterialInspection/index.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">渚涘簲鍟嗭細</span>
<el-input
diff --git a/src/views/safeProduction/accidentReportingRecord/index.vue b/src/views/safeProduction/accidentReportingRecord/index.vue
index ff5b301..5a6c345 100644
--- a/src/views/safeProduction/accidentReportingRecord/index.vue
+++ b/src/views/safeProduction/accidentReportingRecord/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">浜嬫晠鍚嶇О锛�</span>
<el-input v-model="searchForm.accidentName"
diff --git a/src/views/safeProduction/emergencyPlanReview/index.vue b/src/views/safeProduction/emergencyPlanReview/index.vue
index eb68508..1850c18 100644
--- a/src/views/safeProduction/emergencyPlanReview/index.vue
+++ b/src/views/safeProduction/emergencyPlanReview/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">搴旀�ラ妗堝悕绉帮細</span>
<el-input v-model="searchForm.planName"
diff --git a/src/views/safeProduction/hazardSourceLedger/index.vue b/src/views/safeProduction/hazardSourceLedger/index.vue
index 9aa131a..416202e 100644
--- a/src/views/safeProduction/hazardSourceLedger/index.vue
+++ b/src/views/safeProduction/hazardSourceLedger/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">鍗遍櫓婧愬悕绉帮細</span>
<el-input v-model="searchForm.name"
diff --git a/src/views/safeProduction/hazardousMaterialsControl/index.vue b/src/views/safeProduction/hazardousMaterialsControl/index.vue
index a53490c..e43b4f6 100644
--- a/src/views/safeProduction/hazardousMaterialsControl/index.vue
+++ b/src/views/safeProduction/hazardousMaterialsControl/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">鍗遍櫓婧愬悕绉帮細</span>
<el-input v-model="searchForm.name"
diff --git a/src/views/safeProduction/safeWorkApproval/index.vue b/src/views/safeProduction/safeWorkApproval/index.vue
index 2d8362e..bfd1d90 100644
--- a/src/views/safeProduction/safeWorkApproval/index.vue
+++ b/src/views/safeProduction/safeWorkApproval/index.vue
@@ -1,7 +1,7 @@
<template>
<div class="app-container">
<!-- 鏍囩椤靛垏鎹笉鍚岀殑瀹℃壒绫诲瀷 -->
- <div class="search_form">
+ <div class="search_form mb20">
<div>
<span class="search_title">娴佺▼缂栧彿锛�</span>
<el-input v-model="searchForm.approveId"
diff --git a/src/views/salesManagement/receiptPaymentLedger/index.vue b/src/views/salesManagement/receiptPaymentLedger/index.vue
index 7029cfc..e41e24f 100644
--- a/src/views/salesManagement/receiptPaymentLedger/index.vue
+++ b/src/views/salesManagement/receiptPaymentLedger/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form" style="margin-bottom: 20px;">
<div>
<span class="search_title">瀹㈡埛鍚嶇О锛�</span>
<el-input
diff --git a/vite.config.js b/vite.config.js
index ac18ec5..dc687a8 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -8,7 +8,7 @@
const { VITE_APP_ENV } = env;
const baseUrl =
env.VITE_APP_ENV === "development"
- ? "http://localhost:7005"
+ ? "http://1.15.17.182:9003"
: env.VITE_BASE_API;
const javaUrl =
env.VITE_APP_ENV === "development"
--
Gitblit v1.9.3