From fa403c58d2bea76a7131ea9dbb1d60247ea9ca77 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 30 四月 2026 09:43:25 +0800
Subject: [PATCH] 生产计划和生产订单模块开发(仅查看)
---
src/pages.json | 28 +
src/pages/productionManagement/mainProductionPlan/detail.vue | 252 ++++++++++
src/pages/works.vue | 17
src/pages/productionManagement/mainProductionPlan/index.vue | 300 ++++++++++++
src/api/productionManagement/productionOrder.js | 43 +
src/api/productionManagement/productionPlan.js | 29 +
src/pages/productionManagement/productionOrder/source.vue | 166 ++++++
src/pages/productionManagement/productionOrder/index.vue | 293 ++++++++--
src/pages/productionManagement/productionOrder/pickingDetail.vue | 350 ++++++++++++++
9 files changed, 1,394 insertions(+), 84 deletions(-)
diff --git a/src/api/productionManagement/productionOrder.js b/src/api/productionManagement/productionOrder.js
index ab3dc06..87dd65e 100644
--- a/src/api/productionManagement/productionOrder.js
+++ b/src/api/productionManagement/productionOrder.js
@@ -1,19 +1,44 @@
// 鐢熶骇璁㈠崟椤甸潰鎺ュ彛
import request from "@/utils/request";
-// 鍒嗛〉鏌ヨ
-export function schedulingListPage(query) {
+// 鍒嗛〉鏌ヨ鐢熶骇璁㈠崟
+export function productOrderListPage(query) {
return request({
- url: "/salesLedger/scheduling/listPage",
+ url: "/productionOrder/page",
method: "get",
params: query,
});
}
-// 鐢熶骇娲惧伐
-export function productionDispatch(query) {
+
+// 鑾峰彇鐢熶骇璁㈠崟鏉ユ簮鏁版嵁
+export function getProductOrderSource(id) {
return request({
- url: "/salesLedger/scheduling/productionDispatch",
- method: "post",
- data: query,
+ url: `/productionOrder/source/${id}`,
+ method: "get",
});
-}
\ No newline at end of file
+}
+
+// 棰嗘枡璇︽儏鍒楄〃
+export function listMaterialPickingDetail(productionOrderId) {
+ return request({
+ url: "/productionOrderPick/detail/" + productionOrderId,
+ method: "get",
+ });
+}
+
+// 琛ユ枡璁板綍鍒楄〃
+export function listMaterialSupplementRecord(query) {
+ return request({
+ url: "/productionOrderPickRecord/feeding",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鑾峰彇棰嗘枡BOM淇℃伅 (鍙�夛紝澶囩敤)
+export function listMaterialPickingBom(productionOrderId) {
+ return request({
+ url: "/productionOrder/pick/" + productionOrderId,
+ method: "get",
+ });
+}
diff --git a/src/api/productionManagement/productionPlan.js b/src/api/productionManagement/productionPlan.js
new file mode 100644
index 0000000..ec9a1ae
--- /dev/null
+++ b/src/api/productionManagement/productionPlan.js
@@ -0,0 +1,29 @@
+// 涓荤敓浜ц鍒掓帴鍙�
+import request from "@/utils/request";
+
+// 鍒嗛〉鍒楄〃
+export function productionPlanListPage(query) {
+ return request({
+ url: "/productionPlan/listPage",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鎷夊彇鏁版嵁
+export function loadProdData(query) {
+ return request({
+ url: "/productionPlan/loadProdData",
+ method: "get",
+ params: query,
+ });
+}
+
+// 姹囨�荤粺璁�
+export function summaryByProductType(query) {
+ return request({
+ url: "/productionPlan/summaryByProductType",
+ method: "get",
+ params: query,
+ });
+}
diff --git a/src/pages.json b/src/pages.json
index bf2aa38..5a2c086 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -775,6 +775,20 @@
}
},
{
+ "path": "pages/productionManagement/productionOrder/source",
+ "style": {
+ "navigationBarTitleText": "鏉ユ簮鏁版嵁",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/productionManagement/productionOrder/pickingDetail",
+ "style": {
+ "navigationBarTitleText": "棰嗘枡璇︽儏",
+ "navigationStyle": "custom"
+ }
+ },
+ {
"path": "pages/productionManagement/productionDispatching/index",
"style": {
"navigationBarTitleText": "鐢熶骇娲惧伐",
@@ -802,6 +816,20 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "pages/productionManagement/mainProductionPlan/index",
+ "style": {
+ "navigationBarTitleText": "涓荤敓浜ц鍒�",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/productionManagement/mainProductionPlan/detail",
+ "style": {
+ "navigationBarTitleText": "璁″垝璇︽儏",
+ "navigationStyle": "custom"
+ }
+ },
// {
// "path": "pages/productionManagement/productionCosting/index",
// "style": {
diff --git a/src/pages/productionManagement/mainProductionPlan/detail.vue b/src/pages/productionManagement/mainProductionPlan/detail.vue
new file mode 100644
index 0000000..867dfe6
--- /dev/null
+++ b/src/pages/productionManagement/mainProductionPlan/detail.vue
@@ -0,0 +1,252 @@
+<template>
+ <view class="production-plan-detail">
+ <PageHeader title="璁″垝璇︽儏"
+ @back="goBack" />
+ <view class="detail-container"
+ v-if="detailData">
+ <!-- 鍩烘湰淇℃伅鍗$墖 -->
+ <view class="detail-card">
+ <view class="card-title">
+ <up-icon name="info-circle"
+ size="18"
+ color="#3c9cff"></up-icon>
+ <text class="title-text">鍩烘湰淇℃伅</text>
+ </view>
+ <view class="card-content">
+ <view class="info-item">
+ <text class="label">涓荤敓浜ц鍒掑彿</text>
+ <text class="value">{{ detailData.mpsNo || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="label">鏉ユ簮</text>
+ <up-tag :text="detailData.source === '閿�鍞�' ? '閿�鍞�' : '鍐呴儴'"
+ :type="detailData.source === '閿�鍞�' ? 'primary' : 'info'"
+ size="mini" />
+ </view>
+ <view class="info-item">
+ <text class="label">涓嬪彂鐘舵��</text>
+ <up-tag :text="getStatusText(detailData.status)"
+ :type="getStatusType(detailData.status)"
+ size="mini" />
+ </view>
+ </view>
+ </view>
+ <!-- 浜у搧淇℃伅鍗$墖 -->
+ <view class="detail-card">
+ <view class="card-title">
+ <up-icon name="order"
+ size="18"
+ color="#3c9cff"></up-icon>
+ <text class="title-text">浜у搧淇℃伅</text>
+ </view>
+ <view class="card-content">
+ <view class="info-item">
+ <text class="label">浜у搧鍚嶇О</text>
+ <text class="value font-bold">{{ detailData.productName || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="label">瑙勬牸鍨嬪彿</text>
+ <text class="value">{{ detailData.model || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="label">鎵�闇�鏁伴噺</text>
+ <text class="value highlight">{{ detailData.qtyRequired || 0 }} {{ detailData.unit || '鏂�' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="label">宸蹭笅鍙戞暟閲�</text>
+ <text class="value">{{ detailData.quantityIssued || 0 }} {{ detailData.unit || '鏂�' }}</text>
+ </view>
+ </view>
+ </view>
+ <!-- 鏃ユ湡涓庡叧鑱斿崱鐗� -->
+ <view class="detail-card">
+ <view class="card-title">
+ <up-icon name="calendar"
+ size="18"
+ color="#3c9cff"></up-icon>
+ <text class="title-text">鏃ユ湡涓庡叧鑱�</text>
+ </view>
+ <view class="card-content">
+ <view class="info-item">
+ <text class="label">闇�姹傛棩鏈�</text>
+ <text class="value">{{ formatDate(detailData.requiredDate) }}</text>
+ </view>
+ <view class="info-item">
+ <text class="label">鎵胯鏃ユ湡</text>
+ <text class="value">{{ formatDate(detailData.promisedDeliveryDate) }}</text>
+ </view>
+ <view class="info-item">
+ <text class="label">閿�鍞悎鍚屽彿</text>
+ <text class="value">{{ detailData.salesContractNo || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="label">瀹㈡埛鍚嶇О</text>
+ <text class="value">{{ detailData.customerName || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="label">椤圭洰鍚嶇О</text>
+ <text class="value">{{ detailData.projectName || '-' }}</text>
+ </view>
+ </view>
+ </view>
+ <!-- 澶囨敞淇℃伅 -->
+ <view class="detail-card">
+ <view class="card-title">
+ <up-icon name="edit-pen"
+ size="18"
+ color="#3c9cff"></up-icon>
+ <text class="title-text">澶囨敞</text>
+ </view>
+ <view class="card-content">
+ <view class="remark-box">
+ <text class="remark-text">{{ detailData.remark || '鏃犲娉�' }}</text>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view v-else
+ class="no-data">
+ <up-empty mode="data"
+ text="鏆傛棤璇︽儏鏁版嵁"></up-empty>
+ </view>
+ </view>
+</template>
+
+<script setup>
+ import { ref, reactive, onMounted } from "vue";
+ import { onLoad } from "@dcloudio/uni-app";
+ import dayjs from "dayjs";
+ import PageHeader from "@/components/PageHeader.vue";
+
+ const detailData = ref(null);
+
+ // 杩斿洖涓婁竴椤�
+ const goBack = () => {
+ uni.navigateBack();
+ };
+
+ // 鏍煎紡鍖栨棩鏈�
+ const formatDate = date => {
+ return date ? dayjs(date).format("YYYY-MM-DD") : "-";
+ };
+
+ // 鑾峰彇鐘舵�佹枃鏈�
+ const getStatusText = status => {
+ const statusMap = {
+ 0: "寰呬笅鍙�",
+ 1: "閮ㄥ垎涓嬪彂",
+ 2: "宸蹭笅鍙�",
+ };
+ return statusMap[status] || "鏈煡";
+ };
+
+ // 鑾峰彇鐘舵�佺被鍨�
+ const getStatusType = status => {
+ const typeMap = {
+ 0: "warning",
+ 1: "primary",
+ 2: "info",
+ };
+ return typeMap[status] || "info";
+ };
+
+ onLoad(options => {
+ if (options.data) {
+ try {
+ detailData.value = JSON.parse(decodeURIComponent(options.data));
+ } catch (e) {
+ console.error("瑙f瀽鏁版嵁澶辫触", e);
+ uni.showToast({
+ title: "鏁版嵁鍔犺浇澶辫触",
+ icon: "error",
+ });
+ }
+ }
+ });
+</script>
+
+<style scoped lang="scss">
+ .production-plan-detail {
+ min-height: 100vh;
+ background: #f8f9fa;
+ padding-bottom: 40rpx;
+ }
+
+ .detail-container {
+ padding: 20rpx;
+ }
+
+ .detail-card {
+ background: #fff;
+ border-radius: 16rpx;
+ margin-bottom: 24rpx;
+ overflow: hidden;
+ box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.03);
+
+ .card-title {
+ display: flex;
+ align-items: center;
+ padding: 24rpx;
+ border-bottom: 1rpx solid #f0f0f0;
+ background: #fafafa;
+
+ .title-text {
+ font-size: 28rpx;
+ font-weight: bold;
+ color: #333;
+ margin-left: 12rpx;
+ }
+ }
+
+ .card-content {
+ padding: 10rpx 24rpx;
+
+ .info-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx 0;
+ border-bottom: 1rpx solid #f9f9f9;
+
+ &:last-child {
+ border-bottom: none;
+ }
+
+ .label {
+ font-size: 26rpx;
+ color: #999;
+ }
+
+ .value {
+ font-size: 26rpx;
+ color: #333;
+ text-align: right;
+ max-width: 70%;
+
+ &.font-bold {
+ font-weight: bold;
+ }
+
+ &.highlight {
+ color: #f56c6c;
+ font-weight: bold;
+ }
+ }
+ }
+
+ .remark-box {
+ padding: 20rpx 0;
+
+ .remark-text {
+ font-size: 26rpx;
+ color: #666;
+ line-height: 1.5;
+ }
+ }
+ }
+ }
+
+ .no-data {
+ padding-top: 200rpx;
+ }
+</style>
diff --git a/src/pages/productionManagement/mainProductionPlan/index.vue b/src/pages/productionManagement/mainProductionPlan/index.vue
new file mode 100644
index 0000000..5b4eec1
--- /dev/null
+++ b/src/pages/productionManagement/mainProductionPlan/index.vue
@@ -0,0 +1,300 @@
+<template>
+ <view class="main-production-plan">
+ <!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
+ <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.keyword"
+ @change="handleQuery"
+ clearable
+ />
+ </view>
+ <view class="filter-button" @click="handleQuery">
+ <up-icon name="search" size="24" color="#999"></up-icon>
+ </view>
+ </view>
+ </view>
+
+ <!-- 鍒楄〃鍖哄煙 -->
+ <scroll-view scroll-y class="list-container" v-if="tableData.length > 0" @scrolltolower="loadMore">
+ <view v-for="(item, index) in tableData" :key="item.id || index" @click="goDetail(item)">
+ <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.mpsNo }}</text>
+ </view>
+ <view class="item-right">
+ <up-tag :text="getStatusText(item.status)" :type="getStatusType(item.status)" size="mini" />
+ </view>
+ </view>
+ <up-divider></up-divider>
+
+ <view class="item-details">
+ <view class="detail-row">
+ <text class="detail-label">浜у搧鍚嶇О</text>
+ <text class="detail-value">{{ item.productName || '-' }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">瑙勬牸鍨嬪彿</text>
+ <text class="detail-value">{{ item.model || '-' }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">鎵�闇�鏁伴噺</text>
+ <text class="detail-value highlight">{{ item.qtyRequired || 0 }} {{ item.unit || '鏂�' }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">闇�姹傛棩鏈�</text>
+ <text class="detail-value">{{ formatDate(item.requiredDate) }}</text>
+ </view>
+ <view class="detail-row">
+ <text class="detail-label">鏉ユ簮</text>
+ <text class="detail-value">{{ item.source === '閿�鍞�' ? '閿�鍞�' : '鍐呴儴' }}</text>
+ </view>
+ </view>
+ <view class="item-footer">
+ <text class="more-detail">鏌ョ湅璇︽儏</text>
+ <up-icon name="arrow-right" size="14" color="#999"></up-icon>
+ </view>
+ </view>
+ </view>
+ <up-loadmore :status="loadStatus" v-if="tableData.length >= page.size" />
+ </scroll-view>
+
+ <view v-else class="no-data">
+ <up-empty mode="data" text="鏆傛棤涓荤敓浜ц鍒掓暟鎹�"></up-empty>
+ </view>
+ </view>
+</template>
+
+<script setup>
+import { ref, reactive, toRefs, getCurrentInstance } from "vue";
+import { onShow } from '@dcloudio/uni-app';
+import dayjs from "dayjs";
+import { productionPlanListPage } from "@/api/productionManagement/productionPlan.js";
+import PageHeader from "@/components/PageHeader.vue";
+
+const { proxy } = getCurrentInstance();
+
+// 鍔犺浇鐘舵��
+const loading = ref(false);
+const loadStatus = ref('loadmore');
+// 鍒楄〃鏁版嵁
+const tableData = ref([]);
+
+// 鍒嗛〉閰嶇疆
+const page = reactive({
+ current: 1,
+ size: 10,
+ total: 0,
+});
+
+// 鎼滅储琛ㄥ崟鏁版嵁
+const data = reactive({
+ searchForm: {
+ keyword: "",
+ mpsNo: "",
+ productName: ""
+ },
+});
+const { searchForm } = toRefs(data);
+
+// 杩斿洖涓婁竴椤�
+const goBack = () => {
+ uni.navigateBack();
+};
+
+// 鏍煎紡鍖栨棩鏈�
+const formatDate = (date) => {
+ return date ? dayjs(date).format('YYYY-MM-DD') : '-';
+};
+
+// 鑾峰彇鐘舵�佹枃鏈�
+const getStatusText = (status) => {
+ const statusMap = {
+ 0: "寰呬笅鍙�",
+ 1: "閮ㄥ垎涓嬪彂",
+ 2: "宸蹭笅鍙�",
+ };
+ return statusMap[status] || "鏈煡";
+};
+
+// 鑾峰彇鐘舵�佺被鍨� (uView tag type)
+const getStatusType = (status) => {
+ const typeMap = {
+ 0: "warning",
+ 1: "primary",
+ 2: "info",
+ };
+ return typeMap[status] || "info";
+};
+
+// 鏌ヨ鍒楄〃
+const handleQuery = () => {
+ page.current = 1;
+ tableData.value = [];
+ getList();
+};
+
+// 鍔犺浇鏇村
+const loadMore = () => {
+ if (loadStatus.value === 'nomore' || loading.value) return;
+ page.current++;
+ getList();
+};
+
+// 鑾峰彇鍒楄〃鏁版嵁
+const getList = () => {
+ loading.value = true;
+ loadStatus.value = 'loading';
+
+ // 鏋勯�犺姹傚弬鏁�
+ // PC绔帴鍙f敮鎸� mpsNo, productName 绛夛紝杩欓噷绠�鍗曞鐞嗭紝濡傛灉 keyword 瀛樺湪锛屽垯灏濊瘯鍖归厤
+ const params = {
+ current: page.current,
+ size: page.size,
+ mpsNo: searchForm.value.keyword, // 绠�鍗曞鐞嗭細鎼滅储鍙�
+ productName: searchForm.value.keyword // 绠�鍗曞鐞嗭細鎼滅储鍚嶇О
+ };
+
+ productionPlanListPage(params).then((res) => {
+ loading.value = false;
+ const records = res.data.records || [];
+ if (page.current === 1) {
+ tableData.value = records;
+ } else {
+ tableData.value = [...tableData.value, ...records];
+ }
+
+ if (records.length < page.size) {
+ loadStatus.value = 'nomore';
+ } else {
+ loadStatus.value = 'loadmore';
+ }
+ page.total = res.data.total || 0;
+ }).catch(() => {
+ loading.value = false;
+ loadStatus.value = 'loadmore';
+ uni.showToast({
+ title: '鍔犺浇澶辫触',
+ icon: 'error'
+ });
+ });
+};
+
+// 璺宠浆璇︽儏
+const goDetail = (item) => {
+ uni.navigateTo({
+ url: `/pages/productionManagement/mainProductionPlan/detail?data=${encodeURIComponent(JSON.stringify(item))}`
+ });
+};
+
+// 椤甸潰鏄剧ず鏃跺姞杞芥暟鎹�
+onShow(() => {
+ handleQuery();
+});
+</script>
+
+<style scoped lang="scss">
+@import '@/styles/sales-common.scss';
+
+.main-production-plan {
+ min-height: 100vh;
+ background: #f8f9fa;
+ display: flex;
+ flex-direction: column;
+}
+
+.list-container {
+ flex: 1;
+ height: 0;
+}
+
+.ledger-item {
+ background: #fff;
+ margin: 20rpx;
+ padding: 20rpx;
+ border-radius: 12rpx;
+ box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
+
+ .item-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-bottom: 10rpx;
+
+ .item-left {
+ display: flex;
+ align-items: center;
+
+ .document-icon {
+ width: 40rpx;
+ height: 40rpx;
+ background: #3c9cff;
+ border-radius: 8rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ margin-right: 16rpx;
+ }
+
+ .item-id {
+ font-size: 28rpx;
+ font-weight: bold;
+ color: #333;
+ }
+ }
+ }
+
+ .item-details {
+ padding: 10rpx 0;
+
+ .detail-row {
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 12rpx;
+
+ .detail-label {
+ font-size: 26rpx;
+ color: #999;
+ }
+
+ .detail-value {
+ font-size: 26rpx;
+ color: #333;
+
+ &.highlight {
+ color: #f56c6c;
+ font-weight: bold;
+ }
+ }
+ }
+ }
+
+ .item-footer {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ padding-top: 16rpx;
+ border-top: 1rpx solid #f0f0f0;
+
+ .more-detail {
+ font-size: 24rpx;
+ color: #999;
+ margin-right: 8rpx;
+ }
+ }
+}
+
+.no-data {
+ padding-top: 200rpx;
+}
+</style>
diff --git a/src/pages/productionManagement/productionOrder/index.vue b/src/pages/productionManagement/productionOrder/index.vue
index 7adcc4d..7f7ae4f 100644
--- a/src/pages/productionManagement/productionOrder/index.vue
+++ b/src/pages/productionManagement/productionOrder/index.vue
@@ -9,8 +9,8 @@
<view class="search-input">
<up-input
class="search-text"
- placeholder="璇疯緭鍏ュ鎴峰悕绉版悳绱�"
- v-model="searchForm.customerName"
+ placeholder="璇疯緭鍏ヨ鍗曞彿鎴栦骇鍝佸悕绉�"
+ v-model="searchForm.keyword"
@change="handleQuery"
clearable
/>
@@ -21,8 +21,8 @@
</view>
</view>
- <!-- 鐢熶骇璁㈠崟鍒楄〃 -->
- <view class="ledger-list" v-if="tableData.length > 0">
+ <!-- 鍒楄〃鍖哄煙 -->
+ <scroll-view scroll-y class="list-container" v-if="tableData.length > 0" @scrolltolower="loadMore">
<view v-for="(item, index) in tableData" :key="item.id || index">
<view class="ledger-item">
<view class="item-header">
@@ -30,54 +30,55 @@
<view class="document-icon">
<up-icon name="file-text" size="16" color="#ffffff"></up-icon>
</view>
- <text class="item-id">{{ item.salesContractNo }}</text>
+ <text class="item-id">{{ item.npsNo }}</text>
+ </view>
+ <view class="item-right">
+ <up-tag :text="getStatusText(item.status)" :type="getStatusType(item.status)" size="mini" />
</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>
+ <text class="detail-label">浜у搧鍚嶇О</text>
+ <text class="detail-value font-bold">{{ item.productName || '-' }}</text>
</view>
<view class="detail-row">
<text class="detail-label">瑙勬牸鍨嬪彿</text>
- <text class="detail-value">{{ item.specificationModel }}</text>
+ <text class="detail-value">{{ item.model || '-' }}</text>
</view>
<view class="detail-row">
- <text class="detail-label">鏁伴噺</text>
- <text class="detail-value">{{ item.quantity }} {{ item.unit }}</text>
+ <text class="detail-label">璁㈠崟鏁伴噺</text>
+ <text class="detail-value">{{ item.quantity || 0 }}</text>
</view>
<view class="detail-row">
- <text class="detail-label">鎺掍骇鏁伴噺</text>
- <text class="detail-value highlight">{{ item.schedulingNum }}</text>
+ <text class="detail-label">瀹屾垚杩涘害</text>
+ <view class="progress-box">
+ <up-line-progress :percentage="toProgressPercentage(item.completionStatus)"
+ :activeColor="progressColor(item.completionStatus)"
+ height="10"></up-line-progress>
+ <text class="progress-text">{{ item.completeQuantity || 0 }} / {{ item.quantity || 0 }}</text>
+ </view>
</view>
<view class="detail-row">
- <text class="detail-label">瀹屽伐鏁伴噺</text>
- <text class="detail-value highlight">{{ item.successNum }}</text>
+ <text class="detail-label">璁″垝瀹屾垚</text>
+ <text class="detail-value">{{ formatDate(item.planCompleteTime) }}</text>
+ </view>
+ </view>
+
+ <view class="item-footer">
+ <view class="action-btns">
+ <up-button type="primary" size="mini" plain text="鏉ユ簮" @click="goSource(item)"></up-button>
+ <up-button type="success" size="mini" plain text="棰嗘枡璇︽儏" @click="goPickingDetail(item)"></up-button>
</view>
</view>
</view>
</view>
- </view>
+ <up-loadmore :status="loadStatus" v-if="tableData.length >= page.size" />
+ </scroll-view>
+
<view v-else class="no-data">
- <text>鏆傛棤鐢熶骇璁㈠崟鏁版嵁</text>
+ <up-empty mode="data" text="鏆傛棤鐢熶骇璁㈠崟鏁版嵁"></up-empty>
</view>
</view>
</template>
@@ -86,70 +87,126 @@
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 { productOrderListPage } from "@/api/productionManagement/productionOrder.js";
import PageHeader from "@/components/PageHeader.vue";
+
const { proxy } = getCurrentInstance();
// 鍔犺浇鐘舵��
const loading = ref(false);
+const loadStatus = ref('loadmore');
// 鍒楄〃鏁版嵁
const tableData = ref([]);
// 鍒嗛〉閰嶇疆
const page = reactive({
- current: -1,
- size: -1,
+ current: 1,
+ size: 10,
total: 0,
});
// 鎼滅储琛ㄥ崟鏁版嵁
const data = reactive({
searchForm: {
- customerName: "",
+ keyword: "",
},
});
const { searchForm } = toRefs(data);
-
-// 閫氱敤鎻愮ず鍑芥暟
-const showLoadingToast = (message) => {
- uni.showLoading({
- title: message,
- mask: true
- });
-};
-
-const closeToast = () => {
- uni.hideLoading();
-};
// 杩斿洖涓婁竴椤�
const goBack = () => {
uni.navigateBack();
};
+// 鏍煎紡鍖栨棩鏈�
+const formatDate = (date) => {
+ return date ? dayjs(date).format('YYYY-MM-DD') : '-';
+};
+
+// 鑾峰彇鐘舵�佹枃鏈�
+const getStatusText = (status) => {
+ const statusMap = {
+ 1: "寰呭紑濮�",
+ 2: "杩涜涓�",
+ 3: "宸插畬鎴�",
+ 4: "宸插彇娑�",
+ };
+ return statusMap[status] || "鏈煡";
+};
+
+// 鑾峰彇鐘舵�佺被鍨�
+const getStatusType = (status) => {
+ const typeMap = {
+ 1: "primary",
+ 2: "warning",
+ 3: "success",
+ 4: "danger",
+ };
+ return typeMap[status] || "info";
+};
+
+// 瀹屾垚杩涘害鐧惧垎姣�
+const toProgressPercentage = (val) => {
+ const n = Number(val);
+ if (!Number.isFinite(n)) return 0;
+ if (n <= 0) return 0;
+ if (n >= 100) return 100;
+ return Math.round(n);
+};
+
+// 杩涘害鏉¢鑹�
+const progressColor = (percentage) => {
+ const p = toProgressPercentage(percentage);
+ if (p < 30) return "#f56c6c";
+ if (p < 50) return "#e6a23c";
+ if (p < 80) return "#409eff";
+ return "#67c23a";
+};
+
// 鏌ヨ鍒楄〃
const handleQuery = () => {
page.current = 1;
- tableData.value = []; // 閲嶇疆鍒楄〃鏁版嵁
+ tableData.value = [];
+ getList();
+};
+
+// 鍔犺浇鏇村
+const loadMore = () => {
+ if (loadStatus.value === 'nomore' || loading.value) return;
+ page.current++;
getList();
};
// 鑾峰彇鍒楄〃鏁版嵁
const getList = () => {
loading.value = true;
- showLoadingToast('鍔犺浇涓�...');
+ loadStatus.value = 'loading';
- // 鏋勯�犺姹傚弬鏁�
- const params = { ...searchForm.value, ...page };
+ const params = {
+ current: page.current,
+ size: page.size,
+ npsNo: searchForm.value.keyword,
+ productName: searchForm.value.keyword
+ };
- schedulingListPage(params).then((res) => {
+ productOrderListPage(params).then((res) => {
loading.value = false;
- closeToast();
+ const records = res.data.records || [];
+ if (page.current === 1) {
+ tableData.value = records;
+ } else {
+ tableData.value = [...tableData.value, ...records];
+ }
- tableData.value = res.data.records || [];
+ if (records.length < page.size) {
+ loadStatus.value = 'nomore';
+ } else {
+ loadStatus.value = 'loadmore';
+ }
+ page.total = res.data.total || 0;
}).catch(() => {
loading.value = false;
- closeToast();
+ loadStatus.value = 'loadmore';
uni.showToast({
title: '鍔犺浇澶辫触',
icon: 'error'
@@ -157,37 +214,131 @@
});
};
+// 璺宠浆鏉ユ簮
+const goSource = (item) => {
+ uni.navigateTo({
+ url: `/pages/productionManagement/productionOrder/source?id=${item.id}&productName=${encodeURIComponent(item.productName)}&model=${encodeURIComponent(item.model)}&quantity=${item.quantity}`
+ });
+};
+
+// 璺宠浆棰嗘枡璇︽儏
+const goPickingDetail = (item) => {
+ uni.navigateTo({
+ url: `/pages/productionManagement/productionOrder/pickingDetail?id=${item.id}&npsNo=${item.npsNo}`
+ });
+};
+
// 椤甸潰鏄剧ず鏃跺姞杞芥暟鎹�
onShow(() => {
- // 鍔犺浇鍒楄〃鏁版嵁
- getList();
+ handleQuery();
});
</script>
<style scoped lang="scss">
@import '@/styles/sales-common.scss';
-// 鐢熶骇璁㈠崟椤甸潰鏍峰紡
.production-order {
min-height: 100vh;
background: #f8f9fa;
- position: relative;
+ display: flex;
+ flex-direction: column;
}
-// 閲嶅啓閮ㄥ垎鏍峰紡浠ラ�傞厤鐢熶骇璁㈠崟
+.list-container {
+ flex: 1;
+ height: 0;
+}
+
.ledger-item {
- .detail-value.highlight {
- color: #ff6b35;
- font-weight: 600;
+ background: #fff;
+ margin: 20rpx;
+ padding: 24rpx;
+ border-radius: 16rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
+
+ .item-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-bottom: 12rpx;
+
+ .item-left {
+ display: flex;
+ align-items: center;
+
+ .document-icon {
+ width: 44rpx;
+ height: 44rpx;
+ background: #3c9cff;
+ border-radius: 10rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ margin-right: 20rpx;
+ }
+
+ .item-id {
+ font-size: 30rpx;
+ font-weight: bold;
+ color: #333;
+ }
+ }
+ }
+
+ .item-details {
+ padding: 16rpx 0;
+
+ .detail-row {
+ display: flex;
+ justify-content: space-between;
+ align-items: flex-start;
+ margin-bottom: 16rpx;
+
+ .detail-label {
+ font-size: 26rpx;
+ color: #999;
+ min-width: 140rpx;
+ }
+
+ .detail-value {
+ font-size: 26rpx;
+ color: #333;
+ text-align: right;
+
+ &.font-bold {
+ font-weight: bold;
+ }
+ }
+
+ .progress-box {
+ flex: 1;
+ margin-left: 40rpx;
+
+ .progress-text {
+ font-size: 22rpx;
+ color: #999;
+ margin-top: 4rpx;
+ display: block;
+ text-align: right;
+ }
+ }
+ }
+ }
+
+ .item-footer {
+ padding-top: 20rpx;
+ border-top: 1rpx solid #f0f0f0;
+ display: flex;
+ justify-content: flex-end;
+
+ .action-btns {
+ display: flex;
+ gap: 20rpx;
+ }
}
}
-// 閫傞厤 uView 缁勪欢鏍峰紡
-:deep(.up-input) {
- background: transparent;
-}
-
-:deep(.up-datetime-picker) {
- width: 100%;
+.no-data {
+ padding-top: 200rpx;
}
</style>
diff --git a/src/pages/productionManagement/productionOrder/pickingDetail.vue b/src/pages/productionManagement/productionOrder/pickingDetail.vue
new file mode 100644
index 0000000..9ed5f61
--- /dev/null
+++ b/src/pages/productionManagement/productionOrder/pickingDetail.vue
@@ -0,0 +1,350 @@
+<template>
+ <view class="picking-detail">
+ <PageHeader :title="棰嗘枡璇︽儏"
+ @back="goBack" />
+ <scroll-view scroll-y
+ class="detail-list"
+ v-if="detailList.length > 0">
+ <view v-for="(item, index) in detailList"
+ :key="index"
+ class="material-card">
+ <view class="card-header">
+ <text class="material-name">{{ item.materialName || item.productName || '-' }}</text>
+ <up-tag :text="item.operationName || '-'"
+ type="info"
+ size="mini"
+ plain />
+ </view>
+ <view class="card-content">
+ <view class="info-grid">
+ <view class="info-item">
+ <text class="label">瑙勬牸鍨嬪彿</text>
+ <text class="value">{{ item.model || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="label">鍗曚綅</text>
+ <text class="value">{{ item.unit || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="label">闇�棰嗘暟閲�</text>
+ <text class="value highlight">{{ item.qtyRequired || item.demandedQuantity || 0 }}</text>
+ </view>
+ <view class="info-item">
+ <text class="label">宸查鏁伴噺</text>
+ <text class="value success">{{ item.qtyPicked || item.pickQuantity || 0 }}</text>
+ </view>
+ <view class="info-item">
+ <text class="label">琛ユ枡鏁伴噺</text>
+ <view class="value link"
+ @click="showSupplementDetail(item)">
+ {{ item.qtySupplement || item.feedingQty || 0 }}
+ </view>
+ </view>
+ <view class="info-item">
+ <text class="label">閫�鏂欐暟閲�</text>
+ <text class="value">{{ item.returnQty || 0 }}</text>
+ </view>
+ </view>
+ <view class="remark-row"
+ v-if="item.remark">
+ <text class="label">澶囨敞锛�</text>
+ <text class="value">{{ item.remark }}</text>
+ </view>
+ </view>
+ </view>
+ </scroll-view>
+ <view v-else
+ class="no-data">
+ <up-empty mode="data"
+ text="鏆傛棤棰嗘枡璇︽儏"></up-empty>
+ </view>
+ <!-- 琛ユ枡璁板綍寮圭獥 -->
+ <up-popup :show="showPopup"
+ mode="bottom"
+ @close="showPopup = false"
+ round="10">
+ <view class="popup-content">
+ <view class="popup-header">
+ <text class="title">琛ユ枡璁板綍</text>
+ <up-icon name="close"
+ size="20"
+ @click="showPopup = false"></up-icon>
+ </view>
+ <scroll-view scroll-y
+ class="record-list">
+ <view v-if="supplementRecords.length > 0">
+ <view v-for="(record, rIndex) in supplementRecords"
+ :key="rIndex"
+ class="record-item">
+ <view class="record-row">
+ <text class="record-label">琛ユ枡鏁伴噺锛�</text>
+ <text class="record-value highlight">{{ record.pickQuantity || 0 }}</text>
+ </view>
+ <view class="record-row">
+ <text class="record-label">琛ユ枡浜猴細</text>
+ <text class="record-value">{{ record.supplementUserName || '-' }}</text>
+ </view>
+ <view class="record-row">
+ <text class="record-label">琛ユ枡鏃ユ湡锛�</text>
+ <text class="record-value">{{ record.supplementTime || '-' }}</text>
+ </view>
+ <view class="record-row">
+ <text class="record-label">琛ユ枡鍘熷洜锛�</text>
+ <text class="record-value">{{ record.feedingReason || '-' }}</text>
+ </view>
+ </view>
+ </view>
+ <view v-else
+ class="no-record">
+ <text>鏆傛棤琛ユ枡璁板綍</text>
+ </view>
+ </scroll-view>
+ </view>
+ </up-popup>
+ </view>
+</template>
+
+<script setup>
+ import { ref, reactive } from "vue";
+ import { onLoad } from "@dcloudio/uni-app";
+ import {
+ listMaterialPickingDetail,
+ listMaterialSupplementRecord,
+ } from "@/api/productionManagement/productionOrder.js";
+ import PageHeader from "@/components/PageHeader.vue";
+
+ const npsNo = ref("");
+ const productionOrderId = ref("");
+ const detailList = ref([]);
+ const loading = ref(false);
+
+ // 寮圭獥鐩稿叧
+ const showPopup = ref(false);
+ const supplementRecords = ref([]);
+ const recordLoading = ref(false);
+
+ const goBack = () => {
+ uni.navigateBack();
+ };
+
+ const calculatePending = item => {
+ const required = Number(item.qtyRequired || item.demandedQuantity || 0);
+ const picked = Number(item.qtyPicked || item.pickQuantity || 0);
+ return Math.max(0, required - picked);
+ };
+
+ onLoad(options => {
+ if (options.id) {
+ productionOrderId.value = options.id;
+ npsNo.value = options.npsNo || "";
+ fetchDetail(options.id);
+ }
+ });
+
+ const fetchDetail = id => {
+ loading.value = true;
+ listMaterialPickingDetail(id)
+ .then(res => {
+ detailList.value = res.data?.records || res.data || [];
+ loading.value = false;
+ })
+ .catch(() => {
+ loading.value = false;
+ uni.showToast({
+ title: "鑾峰彇璇︽儏澶辫触",
+ icon: "error",
+ });
+ });
+ };
+
+ const showSupplementDetail = item => {
+ const qty = Number(item.qtySupplement || item.feedingQty || 0);
+ if (qty <= 0) return;
+
+ showPopup.value = true;
+ recordLoading.value = true;
+ supplementRecords.value = [];
+
+ listMaterialSupplementRecord({
+ pickId: item.id,
+ productionOrderId: productionOrderId.value,
+ })
+ .then(res => {
+ supplementRecords.value = res.data || [];
+ recordLoading.value = false;
+ })
+ .catch(() => {
+ recordLoading.value = false;
+ uni.showToast({
+ title: "鑾峰彇琛ユ枡璁板綍澶辫触",
+ icon: "error",
+ });
+ });
+ };
+</script>
+
+<style scoped lang="scss">
+ .picking-detail {
+ min-height: 100vh;
+ background: #f8f9fa;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .detail-list {
+ flex: 1;
+ height: 0;
+ padding: 20rpx;
+ }
+
+ .material-card {
+ background: #fff;
+ margin-bottom: 24rpx;
+ padding: 24rpx;
+ border-radius: 16rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
+
+ .card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-bottom: 20rpx;
+ border-bottom: 1rpx solid #f5f5f5;
+ margin-bottom: 20rpx;
+
+ .material-name {
+ font-size: 30rpx;
+ font-weight: bold;
+ color: #333;
+ }
+ }
+
+ .info-grid {
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ gap: 20rpx;
+
+ .info-item {
+ display: flex;
+ flex-direction: column;
+
+ .label {
+ font-size: 24rpx;
+ color: #999;
+ margin-bottom: 4rpx;
+ }
+
+ .value {
+ font-size: 26rpx;
+ color: #333;
+
+ &.highlight {
+ color: #f56c6c;
+ font-weight: bold;
+ }
+ &.success {
+ color: #67c23a;
+ font-weight: bold;
+ }
+ &.warning {
+ color: #e6a23c;
+ font-weight: bold;
+ }
+ &.link {
+ color: #3c9cff;
+ text-decoration: underline;
+ }
+ }
+ }
+ }
+
+ .remark-row {
+ margin-top: 20rpx;
+ padding-top: 16rpx;
+ border-top: 1rpx dashed #eee;
+ display: flex;
+
+ .label {
+ font-size: 24rpx;
+ color: #999;
+ }
+ .value {
+ font-size: 24rpx;
+ color: #666;
+ flex: 1;
+ }
+ }
+ }
+
+ .no-data {
+ padding-top: 200rpx;
+ }
+
+ /* 寮圭獥鏍峰紡 */
+ .popup-content {
+ background: #fff;
+ padding: 30rpx;
+ max-height: 70vh;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .popup-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-bottom: 30rpx;
+ border-bottom: 1rpx solid #eee;
+
+ .title {
+ font-size: 32rpx;
+ font-weight: bold;
+ color: #333;
+ }
+ }
+
+ .record-list {
+ flex: 1;
+ height: 0;
+ padding-top: 20rpx;
+ }
+
+ .record-item {
+ padding: 24rpx;
+ background: #f9f9f9;
+ border-radius: 12rpx;
+ margin-bottom: 20rpx;
+
+ .record-row {
+ display: flex;
+ margin-bottom: 10rpx;
+ &:last-child {
+ margin-bottom: 0;
+ }
+
+ .record-label {
+ font-size: 26rpx;
+ color: #999;
+ width: 140rpx;
+ }
+
+ .record-value {
+ font-size: 26rpx;
+ color: #333;
+ flex: 1;
+
+ &.highlight {
+ color: #f56c6c;
+ font-weight: bold;
+ }
+ }
+ }
+ }
+
+ .no-record {
+ padding: 100rpx 0;
+ text-align: center;
+ color: #999;
+ font-size: 28rpx;
+ }
+</style>
diff --git a/src/pages/productionManagement/productionOrder/source.vue b/src/pages/productionManagement/productionOrder/source.vue
new file mode 100644
index 0000000..bd06845
--- /dev/null
+++ b/src/pages/productionManagement/productionOrder/source.vue
@@ -0,0 +1,166 @@
+<template>
+ <view class="production-order-source">
+ <PageHeader title="鏉ユ簮鏁版嵁" @back="goBack" />
+
+ <view class="summary-card" v-if="summary">
+ <view class="summary-item">
+ <text class="label">浜у搧鍚嶇О</text>
+ <up-tag :text="summary.productName || '-'" type="primary" size="mini" />
+ </view>
+ <view class="summary-item">
+ <text class="label">瑙勬牸鍨嬪彿</text>
+ <text class="value">{{ summary.model || '-' }}</text>
+ </view>
+ <view class="summary-item">
+ <text class="label">闇�姹傛暟閲�</text>
+ <text class="value highlight">{{ summary.quantity || 0 }}</text>
+ </view>
+ </view>
+
+ <scroll-view scroll-y class="source-list" v-if="sourceList.length > 0">
+ <view v-for="(item, index) in sourceList" :key="index" class="source-card">
+ <view class="card-header">
+ <text class="plan-no">璁″垝鍙�: {{ item.mpsNo || '-' }}</text>
+ <up-tag :text="item.source || '鏈煡'" :type="item.source === '閿�鍞�' ? 'primary' : 'warning'" size="mini" />
+ </view>
+ <view class="card-content">
+ <view class="info-row">
+ <text class="info-label">鍚堝悓鍙�</text>
+ <text class="info-value">{{ item.salesContractNo || '-' }}</text>
+ </view>
+ <view class="info-row">
+ <text class="info-label">瀹㈡埛鍚嶇О</text>
+ <text class="info-value">{{ item.customerName || '-' }}</text>
+ </view>
+ <view class="info-row">
+ <text class="info-label">椤圭洰鍚嶇О</text>
+ <text class="info-value">{{ item.projectName || '-' }}</text>
+ </view>
+ <view class="info-row">
+ <text class="info-label">闇�姹傛暟閲�</text>
+ <text class="info-value">{{ item.qtyRequired || 0 }} {{ item.unit || '' }}</text>
+ </view>
+ <view class="info-row">
+ <text class="info-label">闇�姹傛棩鏈�</text>
+ <text class="info-value">{{ formatDate(item.requiredDate) }}</text>
+ </view>
+ </view>
+ </view>
+ </scroll-view>
+
+ <view v-else class="no-data">
+ <up-empty mode="data" text="鏆傛棤鏉ユ簮鏁版嵁"></up-empty>
+ </view>
+ </view>
+</template>
+
+<script setup>
+import { ref, reactive, onMounted } from "vue";
+import { onLoad } from '@dcloudio/uni-app';
+import dayjs from "dayjs";
+import { getProductOrderSource } from "@/api/productionManagement/productionOrder.js";
+import PageHeader from "@/components/PageHeader.vue";
+
+const summary = ref(null);
+const sourceList = ref([]);
+const loading = ref(false);
+
+const goBack = () => {
+ uni.navigateBack();
+};
+
+const formatDate = (date) => {
+ return date ? dayjs(date).format('YYYY-MM-DD') : '-';
+};
+
+onLoad((options) => {
+ if (options.id) {
+ summary.value = {
+ productName: decodeURIComponent(options.productName || ''),
+ model: decodeURIComponent(options.model || ''),
+ quantity: options.quantity || 0
+ };
+ fetchSource(options.id);
+ }
+});
+
+const fetchSource = (id) => {
+ loading.value = true;
+ getProductOrderSource(id).then(res => {
+ sourceList.value = res.data || [];
+ loading.value = false;
+ }).catch(() => {
+ loading.value = false;
+ uni.showToast({
+ title: '鑾峰彇鏉ユ簮澶辫触',
+ icon: 'error'
+ });
+ });
+};
+</script>
+
+<style scoped lang="scss">
+.production-order-source {
+ min-height: 100vh;
+ background: #f8f9fa;
+ display: flex;
+ flex-direction: column;
+}
+
+.summary-card {
+ background: #fff;
+ margin: 20rpx;
+ padding: 24rpx;
+ border-radius: 16rpx;
+ box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.05);
+
+ .summary-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 12rpx;
+ &:last-child { margin-bottom: 0; }
+
+ .label { font-size: 26rpx; color: #999; }
+ .value { font-size: 26rpx; color: #333; }
+ .highlight { color: #f56c6c; font-weight: bold; }
+ }
+}
+
+.source-list {
+ flex: 1;
+ height: 0;
+ padding: 0 20rpx;
+}
+
+.source-card {
+ background: #fff;
+ margin-bottom: 20rpx;
+ padding: 24rpx;
+ border-radius: 16rpx;
+ box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.03);
+
+ .card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-bottom: 16rpx;
+ border-bottom: 1rpx solid #f9f9f9;
+ margin-bottom: 16rpx;
+
+ .plan-no { font-size: 28rpx; font-weight: bold; color: #333; }
+ }
+
+ .info-row {
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 12rpx;
+ &:last-child { margin-bottom: 0; }
+
+ .info-label { font-size: 24rpx; color: #999; }
+ .info-value { font-size: 24rpx; color: #666; }
+ }
+}
+
+.no-data { padding-top: 100rpx; }
+</style>
diff --git a/src/pages/works.vue b/src/pages/works.vue
index ab089c5..2759b3e 100644
--- a/src/pages/works.vue
+++ b/src/pages/works.vue
@@ -569,10 +569,10 @@
// 鐢熶骇绠℃帶鍔熻兘鏁版嵁
const productionItems = reactive([
- // {
- // icon: "/static/images/icon/shengchandingdan@2x.svg",
- // label: "鐢熶骇璁㈠崟",
- // },
+ {
+ icon: "/static/images/icon/shengchandingdan@2x.svg",
+ label: "鐢熶骇璁㈠崟",
+ },
// {
// icon: "/static/images/icon/shengchanpaigong@2x.svg",
// label: "鐢熶骇娲惧伐",
@@ -581,6 +581,10 @@
// icon: "/static/images/icon/shengchanpaichan@2x.svg",
// label: "宸ュ簭鎺掍骇",
// },
+ {
+ icon: "/static/images/icon/shengchanbaogong.svg",
+ label: "涓荤敓浜ц鍒�",
+ },
{
icon: "/static/images/icon/shengchanbaogong.svg",
label: "鐢熶骇鎶ュ伐",
@@ -843,6 +847,11 @@
url: "/pages/productionManagement/workOrder/index",
});
break;
+ case "涓荤敓浜ц鍒�":
+ uni.navigateTo({
+ url: "/pages/productionManagement/mainProductionPlan/index",
+ });
+ break;
case "鐢熶骇鎶ュ伐":
getcode();
break;
--
Gitblit v1.9.3