From 846bb33d3243871c3dc4226e3c054bedc8a71660 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 26 九月 2025 14:01:17 +0800
Subject: [PATCH] 生产订单页面开发联调
---
src/pages/sales/invoicingRegistration/view.vue | 89 +++++++++++++++-----------------------------
1 files changed, 31 insertions(+), 58 deletions(-)
diff --git a/src/pages/sales/invoicingRegistration/view.vue b/src/pages/sales/invoicingRegistration/view.vue
index 2050719..85f1001 100644
--- a/src/pages/sales/invoicingRegistration/view.vue
+++ b/src/pages/sales/invoicingRegistration/view.vue
@@ -1,14 +1,7 @@
<template>
<view class="account-view">
- <!-- 椤堕儴鏍囬鏍� -->
- <van-nav-bar
- title="寮�绁ㄧ櫥璁拌鎯�"
- left-text="杩斿洖"
- left-arrow
- @click-left="goBack"
- fixed
- placeholder
- />
+ <!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
+ <PageHeader title="寮�绁ㄧ櫥璁拌鎯�" @back="goBack" />
<!-- 鍩烘湰淇℃伅灞曠ず -->
<view class="info-section">
@@ -20,7 +13,7 @@
</view>
<view class="info-item">
<text class="info-label">瀹㈡埛鍚堝悓鍙�</text>
- <text class="info-value">{{ form.customerContractNo }}</text>
+ <text class="info-value highlight">{{ form.customerContractNo }}</text>
</view>
<view class="info-item">
<text class="info-label">瀹㈡埛鍚嶇О</text>
@@ -44,7 +37,7 @@
</view>
<view class="info-item">
<text class="info-label">鏈紑绁ㄩ噾棰�(鍏�)</text>
- <text class="info-value redlight">{{ form.noInvoiceAmountTotal }}</text>
+ <text class="info-value highlight">{{ form.noInvoiceAmountTotal }}</text>
</view>
</view>
</view>
@@ -55,7 +48,8 @@
<view class="product-card" v-for="(product, idx) in productData" :key="idx">
<view class="product-header">
<view class="product-title">
- <van-icon name="description" color="#2979ff" size="15" />
+ <!-- 浣跨敤u-icon鏇夸唬up-icon -->
+ <u-icon name="file-text" color="#2979ff" size="15" />
<text class="product-productCategory">浜у搧 {{ idx + 1 }}</text>
</view>
</view>
@@ -82,10 +76,10 @@
<text class="info-label">鏁伴噺</text>
<text class="info-value highlight">{{ product.quantity }}</text>
</view>
- <view class="info-item">
- <text class="info-label">鍚◣鍗曚环(鍏�)</text>
- <text class="info-value highlight">{{ product.taxInclusiveUnitPrice }}</text>
- </view>
+ <view class="info-item">
+ <text class="info-label">鍚◣鍗曚环(鍏�)</text>
+ <text class="info-value highlight">{{ product.taxInclusiveUnitPrice }}</text>
+ </view>
<view class="info-item">
<text class="info-label">鍚◣鎬讳环(鍏�)</text>
<text class="info-value highlight">{{ product.taxInclusiveTotalPrice }}</text>
@@ -108,23 +102,22 @@
</view>
<view class="info-item">
<text class="info-label">鏈紑绁ㄩ噾棰�(鍏�)</text>
- <text class="info-value redlight">{{ product.noInvoiceAmount }}</text>
+ <text class="info-value highlight">{{ product.noInvoiceAmount }}</text>
</view>
</view>
</view>
</view>
</view>
-
- <!-- 鏃犱骇鍝佷俊鎭彁绀� -->
- <view class="no-product" v-else>
+
+ <view v-else class="no-product">
<text>鏆傛棤浜у搧淇℃伅</text>
</view>
</view>
</template>
<script setup>
-import { onMounted, ref } from 'vue';
-import { getSalesLedgerWithProducts } from "@/api/salesManagement/salesLedger";
+import {onMounted, ref} from 'vue';
+import {productList} from "@/api/salesManagement/salesLedger";
// 琛ㄥ崟鏁版嵁
const form = ref({
@@ -159,22 +152,10 @@
if (!editData.value) return;
// 鑾峰彇瀹屾暣鐨勪骇鍝佷俊鎭�
- getSalesLedgerWithProducts({ id: editData.value.id, type: 1 }).then((res) => {
- productData.value = res.productData || [];
+ productList({ salesLedgerId: editData.value.id, type: 1 }).then((res) => {
+ productData.value = res.data || [];
+ form.value = {...editData.value}
});
-
- // 濉厖鍩烘湰淇℃伅
- form.value.salesContractNo = editData.value.salesContractNo || '';
- form.value.customerContractNo = editData.value.customerContractNo || '';
- form.value.customerName = editData.value.customerName || '';
- form.value.projectName = editData.value.projectName || '';
- form.value.executionDate = editData.value.executionDate || '';
- form.value.contractAmount = editData.value.contractAmount || '';
- form.value.salesman = editData.value.salesman || '';
- form.value.invoiceTotal = editData.value.invoiceTotal || 0;
- form.value.noInvoiceAmountTotal = editData.value.noInvoiceAmountTotal || 0;
- form.value.id = editData.value.id || '';
- form.value.customerId = editData.value.customerId || '';
};
onMounted(() => {
@@ -210,8 +191,6 @@
position: sticky;
top: 0;
z-index: 100;
- /* 鍏煎 iOS 鍒樻捣/鐏靛姩宀涘畨鍏ㄥ尯 */
- padding-top: env(safe-area-inset-top);
}
.title {
@@ -230,12 +209,20 @@
box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.04);
}
+.product-section {
+ background: #fff;
+ margin: 1rem;
+ padding: 1rem;
+ border-radius: 0.5rem;
+ box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.04);
+}
+
.section-title {
font-size: 1rem;
font-weight: 600;
color: #333;
margin-bottom: 1rem;
- padding-bottom: 1rem;
+ padding-bottom: 0.5rem;
border-bottom: 0.0625rem solid #e8e8e8;
}
@@ -267,36 +254,22 @@
color: #2979ff;
font-weight: 600;
}
-.info-value.redlight {
- color: red;
- font-weight: 600;
-}
-
-.product-section {
- background: #fff;
- margin: 1rem;
- padding: 1rem;
- border-radius: 0.5rem;
- box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.04);
-}
.product-card {
background: #f8f9fa;
border-radius: 0.5rem;
padding: 1rem;
margin-bottom: 1rem;
-}
-
-.product-card:last-child {
- margin-bottom: 0;
+ border: 0.0625rem solid #e8e8e8;
}
.product-header {
display: flex;
align-items: center;
- padding-bottom: 0.75rem;
- border-bottom: 0.0625rem solid #e8e8e8;
+ justify-content: space-between;
margin-bottom: 1rem;
+ padding-bottom: 0.5rem;
+ border-bottom: 0.0625rem solid #e8e8e8;
}
.product-title {
--
Gitblit v1.9.3