From c6defb8a01892051fd1fb1c4ad8f347f0a0c6b22 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, 21 Nov 2024 11:09:00 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E9=83=A8=E7=BD=B2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Business/Price/PriceCheck.vue | 5 +++--
src/components/Business/Price/PriceDialog.vue | 16 ++++++--------
src/utils/index.js | 8 +++++++
.../yh/price/components/VerifyPriceDialog.vue | 6 ++++-
src/views/yh/price/index.vue | 18 +++++++++------
.../edit/components/ReportProductEdit.vue | 6 +++--
.../edit/components/ReportProductRowEdit.vue | 5 +++--
src/views/yh/report/view/view.vue | 2 +-
src/views/yh/reportOrderProd/index.vue | 22 +++----------------
.../ReportOrderProdDescriptions.vue | 10 ++++-----
src/views/yh/reportProd/index.vue | 7 +++---
11 files changed, 54 insertions(+), 51 deletions(-)
diff --git a/src/components/Business/Price/PriceCheck.vue b/src/components/Business/Price/PriceCheck.vue
index 8f7c896..067a1c9 100644
--- a/src/components/Business/Price/PriceCheck.vue
+++ b/src/components/Business/Price/PriceCheck.vue
@@ -113,7 +113,7 @@
- {{d.row.quantity | fix2 | dv}} 个
+ {{formatFraction(d.row.quantityNumerator, d.row.quantityDenominator)}} 个
{{d.row.price | dv}} 元
@@ -143,7 +143,7 @@ import Price from "@/views/yh/price/index.vue";
import DeptTreeSelect from "@/components/Business/Dept/DeptTreeSelect.vue";
import {$showColumns} from "@/utils/mixins";
import {listPrice} from "@/api/yh/price";
-import {deepClone} from "@/utils";
+import {deepClone, formatFraction} from "@/utils";
const defaultSort = {
prop: "createTime",
@@ -227,6 +227,7 @@ export default {
this.getList();
},
methods: {
+ formatFraction,
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
diff --git a/src/components/Business/Price/PriceDialog.vue b/src/components/Business/Price/PriceDialog.vue
index f5f4426..a94a066 100644
--- a/src/components/Business/Price/PriceDialog.vue
+++ b/src/components/Business/Price/PriceDialog.vue
@@ -3,15 +3,13 @@
-
-
-
+
确定
diff --git a/src/utils/index.js b/src/utils/index.js
index c5f1fee..d4dff41 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -499,3 +499,11 @@ export function getLastDateTimeStart(n) {
export function getLastDateTimeEnd(n) {
return new Date(getLastDateTimeEndStr(n));
}
+
+// 展示分数
+export function formatFraction(numerator, denominator) {
+ if (denominator === 1) {
+ return numerator;
+ }
+ return `${numerator}/${denominator}`;
+}
diff --git a/src/views/yh/price/components/VerifyPriceDialog.vue b/src/views/yh/price/components/VerifyPriceDialog.vue
index 7877cb2..97d583b 100644
--- a/src/views/yh/price/components/VerifyPriceDialog.vue
+++ b/src/views/yh/price/components/VerifyPriceDialog.vue
@@ -19,7 +19,9 @@
{{detail.price | dv}} 元
{{detail.unit | dv}}
{{detail.classify | dv}}
- {{detail.quantity | fix2 | dv}} 个
+
+ {{formatFraction(detail.quantityNumerator, detail.quantityDenominator)}} 个
+
{{detail.remark | dv}}
@@ -32,6 +34,7 @@