From 4c09ffdf002ac3d28556ad4be782e07a8de20b85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A6=82=E5=88=9D?= <3236758982@qq.com>
Date: Thu, 18 Jun 2026 15:58:24 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9D=8E=E7=BA=A2=E6=94=80=EF=BC=9AV2.6.969?=
=?UTF-8?q?=EF=BC=8C=E8=AF=B7=E8=B4=AD=E5=8D=95BUG=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../purchase-requisition/detail/index.vue | 16 +-
.../purchase-requisition/form/index.vue | 372 ++++++++++--------
src/pages-erp/purchase-requisition/index.vue | 6 +-
src/pages-erp/stock-in/detail/index.vue | 7 +-
src/pages-erp/stock-in/index.vue | 7 +-
src/pages-erp/stock-out/detail/index.vue | 7 +-
src/pages-erp/stock-out/index.vue | 7 +-
7 files changed, 239 insertions(+), 183 deletions(-)
diff --git a/src/pages-erp/purchase-requisition/detail/index.vue b/src/pages-erp/purchase-requisition/detail/index.vue
index 9fd4dfd..bfc84c3 100644
--- a/src/pages-erp/purchase-requisition/detail/index.vue
+++ b/src/pages-erp/purchase-requisition/detail/index.vue
@@ -183,6 +183,7 @@ import {
} from '@/api/erp/purchase-requisition'
import { useAccess } from '@/hooks/useAccess'
import { navigateBackPlus } from '@/utils'
+import { formatDateTime } from '@/utils/date'
const props = defineProps<{
id: number | any
@@ -276,16 +277,17 @@ function formatPrice(price?: number) {
}
/** 格式化日期 */
-function formatDate(dateStr?: string) {
- if (!dateStr) return '-'
- return dateStr.substring(0, 10)
+function formatDate(date?: string) {
+ if (!date) return '-'
+ return new Date(date).toLocaleDateString('zh-CN')
}
+
/** 格式化日期时间 */
-function formatDateTime(dateStr?: string) {
- if (!dateStr) return '-'
- return dateStr.substring(0, 16).replace('T', ' ')
-}
+// function formatDateTime(dateStr?: string) {
+// if (!dateStr) return '-'
+// return dateStr.substring(0, 16).replace('T', ' ')
+// }
/** 返回上一页 */
function handleBack() {
diff --git a/src/pages-erp/purchase-requisition/form/index.vue b/src/pages-erp/purchase-requisition/form/index.vue
index bd8778f..8bc9d5d 100644
--- a/src/pages-erp/purchase-requisition/form/index.vue
+++ b/src/pages-erp/purchase-requisition/form/index.vue
@@ -8,7 +8,7 @@
/>
-
+
@@ -16,6 +16,7 @@
title="请购类型"
title-width="180rpx"
is-link
+ center
:value="getTypeLabel(formData.type)"
@click="typePickerVisible = true"
/>
@@ -23,6 +24,7 @@
title="优先级"
title-width="180rpx"
is-link
+ center
:value="getPriorityLabel(formData.priority)"
@click="priorityPickerVisible = true"
/>
@@ -30,6 +32,7 @@
title="紧急程度"
title-width="180rpx"
is-link
+ center
:value="getEmergencyLabel(formData.emergencyDegree)"
@click="emergencyPickerVisible = true"
/>
@@ -37,6 +40,7 @@
title="请购时间"
title-width="180rpx"
is-link
+ center
:value="formData.requestTime ? formatDate(formData.requestTime) : '请选择'"
@click="requestDatePickerVisible = true"
/>
@@ -44,6 +48,7 @@
title="期望到货"
title-width="180rpx"
is-link
+ center
:value="formData.expectedTime ? formatDate(formData.expectedTime) : '请选择'"
@click="expectedDatePickerVisible = true"
/>
@@ -57,109 +62,142 @@
clearable
/>
+
+
-
-
-
- 暂无产品,请点击下方按钮添加
+
+
+
+
+ 请购产品清单({{ formData.items?.length || 0 }}项)
+
+
+ + 添加产品
+
+
+
+
+ 产品 #{{ index + 1 }} {{ item.productName || '' }}
+
+ 删除
+
+
+
+
+ 选择产品
+ onProductConfirm(e, index)"
+ />
-
-
-
-
- {{ item.productName || '请选择产品' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- 产品金额
- {{ formatPrice(item.totalProductPrice) }}
-
-
-
-
-
- 税额
- {{ formatPrice(item.taxPrice) }}
-
-
- 含税金额
- {{ formatPrice(item.totalPrice) }}
-
-
-
-
-
-
-
+
+
+
+ 规格
+ {{ item.productSpec || '-' }}
+
+
+ 单位
+ {{ item.productUnitName || '-' }}
+
+
+ 条码
+ {{ item.productBarCode || '-' }}
-
-
-
- 添加产品
-
+
+
+ 需求数量
+
+
+
+ 参考单价
+
+
-
+
+
+ 税率(%)
+
+
+
+ 含税金额
+ {{ formatPrice(item.totalPrice) }}
+
+
+
+
+ 产品金额: {{ formatPrice(item.totalProductPrice) }}
+
+
+ 税额: {{ formatPrice(item.taxPrice) }}
+
+
+
+ 用途说明
+
+
+
+ 备注
+
+
+
+
+
+ 暂无产品,请点击"添加产品"按钮
+
-
-
-
-
-
-
-
-
+
+
+
+ 合计数量
+ {{ formatCount(totalCount) }}
+
+
+ 合计产品金额
+ {{ formatPrice(totalProductPrice) }}
+
+
+ 合计税额
+ {{ formatPrice(totalTaxPrice) }}
+
+
+ 合计金额(含税)
+ {{ formatPrice(totalPrice) }}
+
+
@@ -210,19 +248,13 @@
:value="formData.expectedTime"
@confirm="onExpectedDateConfirm"
/>
-
-
-
diff --git a/src/pages-erp/purchase-requisition/index.vue b/src/pages-erp/purchase-requisition/index.vue
index 1626940..3b266f8 100644
--- a/src/pages-erp/purchase-requisition/index.vue
+++ b/src/pages-erp/purchase-requisition/index.vue
@@ -359,9 +359,9 @@ function formatPrice(price?: number) {
}
/** 格式化日期 */
-function formatDate(dateStr?: string) {
- if (!dateStr) return '-'
- return dateStr.substring(0, 10)
+function formatDate(date?: string) {
+ if (!date) return '-'
+ return new Date(date).toLocaleDateString('zh-CN')
}
/** 返回上一页 */
diff --git a/src/pages-erp/stock-in/detail/index.vue b/src/pages-erp/stock-in/detail/index.vue
index 870c81b..a2f9bd9 100644
--- a/src/pages-erp/stock-in/detail/index.vue
+++ b/src/pages-erp/stock-in/detail/index.vue
@@ -146,11 +146,12 @@ function formatPrice(price?: number) {
}
/** 格式化日期 */
-function formatDate(dateStr?: string) {
- if (!dateStr) return '-'
- return dateStr.substring(0, 10)
+function formatDate(date?: string) {
+ if (!date) return '-'
+ return new Date(date).toLocaleDateString('zh-CN')
}
+
/** 返回上一页 */
function handleBack() {
navigateBackPlus('/pages-erp/stock-in/index')
diff --git a/src/pages-erp/stock-in/index.vue b/src/pages-erp/stock-in/index.vue
index b2e86b7..3c14026 100644
--- a/src/pages-erp/stock-in/index.vue
+++ b/src/pages-erp/stock-in/index.vue
@@ -234,11 +234,12 @@ function formatPrice(price?: number) {
}
/** 格式化日期 */
-function formatDate(dateStr?: string) {
- if (!dateStr) return '-'
- return dateStr.substring(0, 10)
+function formatDate(date?: string) {
+ if (!date) return '-'
+ return new Date(date).toLocaleDateString('zh-CN')
}
+
/** 返回上一页 */
function handleBack() {
navigateBackPlus()
diff --git a/src/pages-erp/stock-out/detail/index.vue b/src/pages-erp/stock-out/detail/index.vue
index 0b1e2d4..d673f1e 100644
--- a/src/pages-erp/stock-out/detail/index.vue
+++ b/src/pages-erp/stock-out/detail/index.vue
@@ -146,11 +146,12 @@ function formatPrice(price?: number) {
}
/** 格式化日期 */
-function formatDate(dateStr?: string) {
- if (!dateStr) return '-'
- return dateStr.substring(0, 10)
+function formatDate(date?: string) {
+ if (!date) return '-'
+ return new Date(date).toLocaleDateString('zh-CN')
}
+
/** 返回上一页 */
function handleBack() {
navigateBackPlus('/pages-erp/stock-out/index')
diff --git a/src/pages-erp/stock-out/index.vue b/src/pages-erp/stock-out/index.vue
index 8248249..be000df 100644
--- a/src/pages-erp/stock-out/index.vue
+++ b/src/pages-erp/stock-out/index.vue
@@ -244,11 +244,12 @@ function formatPrice(price?: number) {
}
/** 格式化日期 */
-function formatDate(dateStr?: string) {
- if (!dateStr) return '-'
- return dateStr.substring(0, 10)
+function formatDate(date?: string) {
+ if (!date) return '-'
+ return new Date(date).toLocaleDateString('zh-CN')
}
+
/** 返回上一页 */
function handleBack() {
navigateBackPlus()