From 92d22a29b6b0b13b3a2ee43c01cdcc65c35f939d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?=
<14103883+leaf-phos@user.noreply.gitee.com>
Date: Thu, 2 Jan 2025 09:44:55 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/EditHeader/index.vue | 4 +-
.../edit/components/ReportProductEdit.vue | 42 ++-
.../edit/components/UserProdPreview.vue | 345 ++++++++++++++++++
src/views/yh/report/edit/edit.vue | 23 +-
src/views/yh/reportUserProd/index.vue | 18 +-
5 files changed, 427 insertions(+), 5 deletions(-)
create mode 100644 src/views/yh/report/edit/components/UserProdPreview.vue
diff --git a/src/components/EditHeader/index.vue b/src/components/EditHeader/index.vue
index 1788a2b..e626492 100644
--- a/src/components/EditHeader/index.vue
+++ b/src/components/EditHeader/index.vue
@@ -4,7 +4,9 @@
- {{title}}
+
+ {{title}}
+
diff --git a/src/views/yh/report/edit/components/ReportProductEdit.vue b/src/views/yh/report/edit/components/ReportProductEdit.vue
index de46d38..8ec04d5 100644
--- a/src/views/yh/report/edit/components/ReportProductEdit.vue
+++ b/src/views/yh/report/edit/components/ReportProductEdit.vue
@@ -120,6 +120,11 @@
:user-query="userQuery"
/>
+
+
@@ -140,6 +145,7 @@ import HoverShow from "@/components/HoverShow/index.vue";
import ReportProductRowEdit from "@/views/yh/report/edit/components/ReportProductRowEdit.vue";
import PriceDrawer from "@/components/Business/Price/PriceDrawer.vue";
import {calcTotalAmount} from "@/views/yh/report/utils";
+import UserProdPreview from './UserProdPreview.vue'
export default {
name: "ReportProductEdit",
@@ -151,7 +157,7 @@ export default {
Dict,
ReportProductUserListEdit,
ReportProductOrderListEdit,
- UserProductBatchDialog, FormCol, PriceInput, PriceDialog, UserInput},
+ UserProductBatchDialog, FormCol, PriceInput, PriceDialog, UserInput, UserProdPreview},
props: {
value: {
type: Array,
@@ -226,6 +232,8 @@ export default {
showMore: false,
editingIndex: -1, // 当前正在编辑的工序索引
isAllSelected: false,
+ showUserProdPreview: false,
+ currentPreviewData: null,
}
},
watch: {
@@ -418,6 +426,10 @@ export default {
item.selected = !item.selected;
this.handleSelect(item, item.selected);
},
+ handlePreview(row) {
+ this.currentPreviewData = row;
+ this.showUserProdPreview = true;
+ },
}
}
@@ -496,6 +508,20 @@ export default {
margin-left: 0;
}
+ .preview-icon {
+ color: #909399;
+ cursor: pointer;
+ padding: 4px;
+ font-size: 16px;
+ border-radius: 4px;
+ transition: all 0.2s;
+
+ &:hover {
+ color: #409EFF;
+ background-color: rgba(64, 158, 255, 0.1);
+ }
+ }
+
.delete-icon {
color: #909399;
cursor: pointer;
@@ -618,5 +644,19 @@ export default {
}
}
+.preview-icon {
+ color: #909399;
+ cursor: pointer;
+ padding: 4px;
+ font-size: 16px;
+ border-radius: 4px;
+ transition: all 0.2s;
+
+ &:hover {
+ color: #409EFF;
+ background-color: rgba(64, 158, 255, 0.1);
+ }
+}
+
diff --git a/src/views/yh/report/edit/components/UserProdPreview.vue b/src/views/yh/report/edit/components/UserProdPreview.vue
new file mode 100644
index 0000000..8158e22
--- /dev/null
+++ b/src/views/yh/report/edit/components/UserProdPreview.vue
@@ -0,0 +1,345 @@
+
+
+
+
+
+
+ 日期:
+ {{ data.reportDate | dv}}
+
+
+ 总金额:
+ {{ totalAmount | dv}} 元
+
+
+
+
+
+
+
+
+ {{ scope.row.userName }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.products[process.priceId].num }}
+ {{ process.priceUnit }}
+
+
+ {{ calculateIncome(scope.row.products[process.priceId].num, process.pricePrice) }}
+ 元
+
+
+
+ -
+
+
+
+
+
+
+ {{ scope.row.totalAmount }}元
+
+
+
+
+
+
+
+
+
+ 关 闭
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/yh/report/edit/edit.vue b/src/views/yh/report/edit/edit.vue
index 081918e..74c8915 100644
--- a/src/views/yh/report/edit/edit.vue
+++ b/src/views/yh/report/edit/edit.vue
@@ -1,6 +1,10 @@
-
@@ -73,14 +82,24 @@ import {parseTime} from "@/utils/ruoyi";
import {$reportCheck} from "@/views/yh/report/mixins";
import {DatePickerOptions} from "@/utils/constants";
import ReportProductRowEdit from "@/views/yh/report/edit/components/ReportProductRowEdit.vue";
+import UserProdPreview from './components/UserProdPreview.vue'
export default {
name: "ReportEdit",
mixins: [$reportCheck],
dicts: ['income_mode'],
- components: {ReportProductEdit, EditHeader, DeptTreeSelect, PriceInput, FormCol, ReportProductRowEdit},
+ components: {
+ UserProdPreview,
+ ReportProductEdit,
+ EditHeader,
+ DeptTreeSelect,
+ PriceInput,
+ FormCol,
+ ReportProductRowEdit
+ },
data() {
return {
+ previewUserProd: false,
row: {},
index: null,
showMore: false,
diff --git a/src/views/yh/reportUserProd/index.vue b/src/views/yh/reportUserProd/index.vue
index 93314dc..b670834 100644
--- a/src/views/yh/reportUserProd/index.vue
+++ b/src/views/yh/reportUserProd/index.vue
@@ -1,6 +1,19 @@
+
+
+
+