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.json | 7 +
src/pages/productionManagement/productionOrder/index.vue | 193 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 200 insertions(+), 0 deletions(-)
diff --git a/src/pages.json b/src/pages.json
index a2b3ca6..00c7e56 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -399,6 +399,13 @@
"navigationBarTitleText": "鏁呴殰鍒嗘瀽杩芥函",
"navigationStyle": "custom"
}
+ },
+ {
+ "path": "pages/productionManagement/productionOrder/index",
+ "style": {
+ "navigationBarTitleText": "鐢熶骇璁㈠崟",
+ "navigationStyle": "custom"
+ }
}
],
"subPackages": [
diff --git a/src/pages/productionManagement/productionOrder/index.vue b/src/pages/productionManagement/productionOrder/index.vue
new file mode 100644
index 0000000..7adcc4d
--- /dev/null
+++ b/src/pages/productionManagement/productionOrder/index.vue
@@ -0,0 +1,193 @@
+<template>
+ <view class="production-order">
+ <!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
+ <PageHeader title="鐢熶骇璁㈠崟" @back="goBack" />
+
+ <!-- 鎼滅储鍖哄煙 -->
+ <view class="search-section">
+ <view class="search-bar">
+ <view class="search-input">
+ <up-input
+ class="search-text"
+ placeholder="璇疯緭鍏ュ鎴峰悕绉版悳绱�"
+ v-model="searchForm.customerName"
+ @change="handleQuery"
+ clearable
+ />
+ </view>
+ <view class="filter-button" @click="handleQuery">
+ <up-icon name="search" size="24" color="#999"></up-icon>
+ </view>
+ </view>
+ </view>
+
+ <!-- 鐢熶骇璁㈠崟鍒楄〃 -->
+ <view class="ledger-list" v-if="tableData.length > 0">
+ <view v-for="(item, index) in tableData" :key="item.id || index">
+ <view class="ledger-item">
+ <view class="item-header">
+ <view class="item-left">
+ <view class="document-icon">
+ <up-icon name="file-text" size="16" color="#ffffff"></up-icon>
+ </view>
+ <text class="item-id">{{ item.salesContractNo }}</text>
+ </view>
+ </view>
+ <up-divider></up-divider>
+
+ <view class="item-details">
+ <view class="detail-row">
+ <text class="detail-label">褰曞叆鏃ユ湡</text>
+ <text class="detail-value">{{ item.entryDate }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">瀹㈡埛鍚堝悓鍙�</text>
+ <text class="detail-value">{{ item.customerContractNo }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">瀹㈡埛鍚嶇О</text>
+ <text class="detail-value">{{ item.customerName }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">椤圭洰鍚嶇О</text>
+ <text class="detail-value">{{ item.projectName }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">浜у搧澶х被</text>
+ <text class="detail-value">{{ item.productCategory }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">瑙勬牸鍨嬪彿</text>
+ <text class="detail-value">{{ item.specificationModel }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">鏁伴噺</text>
+ <text class="detail-value">{{ item.quantity }} {{ item.unit }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">鎺掍骇鏁伴噺</text>
+ <text class="detail-value highlight">{{ item.schedulingNum }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">瀹屽伐鏁伴噺</text>
+ <text class="detail-value highlight">{{ item.successNum }}</text>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view v-else class="no-data">
+ <text>鏆傛棤鐢熶骇璁㈠崟鏁版嵁</text>
+ </view>
+ </view>
+</template>
+
+<script setup>
+import { ref, reactive, toRefs, getCurrentInstance } from "vue";
+import { onShow } from '@dcloudio/uni-app';
+import dayjs from "dayjs";
+import {schedulingListPage} from "@/api/productionManagement/productionOrder.js";
+import PageHeader from "@/components/PageHeader.vue";
+const { proxy } = getCurrentInstance();
+
+// 鍔犺浇鐘舵��
+const loading = ref(false);
+// 鍒楄〃鏁版嵁
+const tableData = ref([]);
+
+// 鍒嗛〉閰嶇疆
+const page = reactive({
+ current: -1,
+ size: -1,
+ total: 0,
+});
+
+// 鎼滅储琛ㄥ崟鏁版嵁
+const data = reactive({
+ searchForm: {
+ customerName: "",
+ },
+});
+const { searchForm } = toRefs(data);
+
+// 閫氱敤鎻愮ず鍑芥暟
+const showLoadingToast = (message) => {
+ uni.showLoading({
+ title: message,
+ mask: true
+ });
+};
+
+const closeToast = () => {
+ uni.hideLoading();
+};
+
+// 杩斿洖涓婁竴椤�
+const goBack = () => {
+ uni.navigateBack();
+};
+
+// 鏌ヨ鍒楄〃
+const handleQuery = () => {
+ page.current = 1;
+ tableData.value = []; // 閲嶇疆鍒楄〃鏁版嵁
+ getList();
+};
+
+// 鑾峰彇鍒楄〃鏁版嵁
+const getList = () => {
+ loading.value = true;
+ showLoadingToast('鍔犺浇涓�...');
+
+ // 鏋勯�犺姹傚弬鏁�
+ const params = { ...searchForm.value, ...page };
+
+ schedulingListPage(params).then((res) => {
+ loading.value = false;
+ closeToast();
+
+ tableData.value = res.data.records || [];
+ }).catch(() => {
+ loading.value = false;
+ closeToast();
+ uni.showToast({
+ title: '鍔犺浇澶辫触',
+ icon: 'error'
+ });
+ });
+};
+
+// 椤甸潰鏄剧ず鏃跺姞杞芥暟鎹�
+onShow(() => {
+ // 鍔犺浇鍒楄〃鏁版嵁
+ getList();
+});
+</script>
+
+<style scoped lang="scss">
+@import '@/styles/sales-common.scss';
+
+// 鐢熶骇璁㈠崟椤甸潰鏍峰紡
+.production-order {
+ min-height: 100vh;
+ background: #f8f9fa;
+ position: relative;
+}
+
+// 閲嶅啓閮ㄥ垎鏍峰紡浠ラ�傞厤鐢熶骇璁㈠崟
+.ledger-item {
+ .detail-value.highlight {
+ color: #ff6b35;
+ font-weight: 600;
+ }
+}
+
+// 閫傞厤 uView 缁勪欢鏍峰紡
+:deep(.up-input) {
+ background: transparent;
+}
+
+:deep(.up-datetime-picker) {
+ width: 100%;
+}
+</style>
--
Gitblit v1.9.3