From b0dada24ccf8bebf143a921ae01d6cc95d378f6e Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 08 一月 2026 16:41:19 +0800
Subject: [PATCH] 修改bug
---
src/pages/index.vue | 200 +++++++++++++++++++++++++------------------------
src/pages/productionManagement/productionReport/index.vue | 38 +++++---
2 files changed, 126 insertions(+), 112 deletions(-)
diff --git a/src/pages/index.vue b/src/pages/index.vue
index f1e1f22..e1b0061 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -38,77 +38,77 @@
<!-- </view>-->
<!-- </view>-->
<!-- 钀ラ攢绠$悊妯″潡 -->
-<!-- <view class="common-module marketing-module">-->
-<!-- <view class="module-header">-->
-<!-- <view class="module-title-container">-->
-<!-- <text class="module-title">钀ラ攢绠$悊</text>-->
-<!-- </view>-->
-<!-- </view>-->
-<!-- <view class="module-content">-->
-<!-- <up-grid :border="false"-->
-<!-- col="4">-->
-<!-- <up-grid-item v-for="(item, index) in marketingItems"-->
-<!-- :key="index"-->
-<!-- @click="handleCommonItemClick(item)">-->
-<!-- <view class="icon-container"-->
-<!-- :style="{ background: item.bgColor }">-->
-<!-- <up-icon :name="item.icon"-->
-<!-- :size="58"-->
-<!-- color="#ffffff"></up-icon>-->
-<!-- </view>-->
-<!-- <text class="item-label">{{item.label}}</text>-->
-<!-- </up-grid-item>-->
-<!-- </up-grid>-->
-<!-- </view>-->
-<!-- </view>-->
-<!-- <!– 閲囪喘绠$悊妯″潡 –>-->
-<!-- <view class="common-module purchase-module">-->
-<!-- <view class="module-header">-->
-<!-- <view class="module-title-container">-->
-<!-- <text class="module-title">閲囪喘绠$悊</text>-->
-<!-- </view>-->
-<!-- </view>-->
-<!-- <view class="module-content">-->
-<!-- <up-grid :border="false"-->
-<!-- col="4">-->
-<!-- <up-grid-item v-for="(item, index) in purchaseItems"-->
-<!-- :key="index"-->
-<!-- @click="handleCommonItemClick(item)">-->
-<!-- <view class="icon-container"-->
-<!-- :style="{ background: item.bgColor }">-->
-<!-- <up-icon :name="item.icon"-->
-<!-- :size="58"-->
-<!-- color="#ffffff"></up-icon>-->
-<!-- </view>-->
-<!-- <text class="item-label">{{item.label}}</text>-->
-<!-- </up-grid-item>-->
-<!-- </up-grid>-->
-<!-- </view>-->
-<!-- </view>-->
-<!-- <!– 鍗忓悓鍔炲叕妯″潡 –>-->
-<!-- <view class="common-module collaboration-module">-->
-<!-- <view class="module-header">-->
-<!-- <view class="module-title-container">-->
-<!-- <text class="module-title">鍗忓悓鍔炲叕</text>-->
-<!-- </view>-->
-<!-- </view>-->
-<!-- <view class="module-content">-->
-<!-- <up-grid :border="false"-->
-<!-- col="4">-->
-<!-- <up-grid-item v-for="(item, index) in collaborationItems"-->
-<!-- :key="index"-->
-<!-- @click="handleCommonItemClick(item)">-->
-<!-- <view class="icon-container"-->
-<!-- :style="{ background: item.bgColor }">-->
-<!-- <up-icon :name="item.icon"-->
-<!-- :size="58"-->
-<!-- color="#ffffff"></up-icon>-->
-<!-- </view>-->
-<!-- <text class="item-label">{{item.label}}</text>-->
-<!-- </up-grid-item>-->
-<!-- </up-grid>-->
-<!-- </view>-->
-<!-- </view>-->
+ <!-- <view class="common-module marketing-module">-->
+ <!-- <view class="module-header">-->
+ <!-- <view class="module-title-container">-->
+ <!-- <text class="module-title">钀ラ攢绠$悊</text>-->
+ <!-- </view>-->
+ <!-- </view>-->
+ <!-- <view class="module-content">-->
+ <!-- <up-grid :border="false"-->
+ <!-- col="4">-->
+ <!-- <up-grid-item v-for="(item, index) in marketingItems"-->
+ <!-- :key="index"-->
+ <!-- @click="handleCommonItemClick(item)">-->
+ <!-- <view class="icon-container"-->
+ <!-- :style="{ background: item.bgColor }">-->
+ <!-- <up-icon :name="item.icon"-->
+ <!-- :size="58"-->
+ <!-- color="#ffffff"></up-icon>-->
+ <!-- </view>-->
+ <!-- <text class="item-label">{{item.label}}</text>-->
+ <!-- </up-grid-item>-->
+ <!-- </up-grid>-->
+ <!-- </view>-->
+ <!-- </view>-->
+ <!-- <!– 閲囪喘绠$悊妯″潡 –>-->
+ <!-- <view class="common-module purchase-module">-->
+ <!-- <view class="module-header">-->
+ <!-- <view class="module-title-container">-->
+ <!-- <text class="module-title">閲囪喘绠$悊</text>-->
+ <!-- </view>-->
+ <!-- </view>-->
+ <!-- <view class="module-content">-->
+ <!-- <up-grid :border="false"-->
+ <!-- col="4">-->
+ <!-- <up-grid-item v-for="(item, index) in purchaseItems"-->
+ <!-- :key="index"-->
+ <!-- @click="handleCommonItemClick(item)">-->
+ <!-- <view class="icon-container"-->
+ <!-- :style="{ background: item.bgColor }">-->
+ <!-- <up-icon :name="item.icon"-->
+ <!-- :size="58"-->
+ <!-- color="#ffffff"></up-icon>-->
+ <!-- </view>-->
+ <!-- <text class="item-label">{{item.label}}</text>-->
+ <!-- </up-grid-item>-->
+ <!-- </up-grid>-->
+ <!-- </view>-->
+ <!-- </view>-->
+ <!-- <!– 鍗忓悓鍔炲叕妯″潡 –>-->
+ <!-- <view class="common-module collaboration-module">-->
+ <!-- <view class="module-header">-->
+ <!-- <view class="module-title-container">-->
+ <!-- <text class="module-title">鍗忓悓鍔炲叕</text>-->
+ <!-- </view>-->
+ <!-- </view>-->
+ <!-- <view class="module-content">-->
+ <!-- <up-grid :border="false"-->
+ <!-- col="4">-->
+ <!-- <up-grid-item v-for="(item, index) in collaborationItems"-->
+ <!-- :key="index"-->
+ <!-- @click="handleCommonItemClick(item)">-->
+ <!-- <view class="icon-container"-->
+ <!-- :style="{ background: item.bgColor }">-->
+ <!-- <up-icon :name="item.icon"-->
+ <!-- :size="58"-->
+ <!-- color="#ffffff"></up-icon>-->
+ <!-- </view>-->
+ <!-- <text class="item-label">{{item.label}}</text>-->
+ <!-- </up-grid-item>-->
+ <!-- </up-grid>-->
+ <!-- </view>-->
+ <!-- </view>-->
<!-- 鐢熶骇绠℃帶妯″潡 -->
<!-- <view class="common-module production-module">-->
<!-- <view class="module-header">-->
@@ -163,29 +163,29 @@
</view>
</view>
<!-- 璁惧绠$悊妯″潡 -->
-<!-- <view class="common-module equipment-module">-->
-<!-- <view class="module-header">-->
-<!-- <view class="module-title-container">-->
-<!-- <text class="module-title">璁惧绠$悊</text>-->
-<!-- </view>-->
-<!-- </view>-->
-<!-- <view class="module-content">-->
-<!-- <up-grid :border="false"-->
-<!-- col="4">-->
-<!-- <up-grid-item v-for="(item, index) in equipmentItems"-->
-<!-- :key="index"-->
-<!-- @click="handleCommonItemClick(item)">-->
-<!-- <view class="icon-container"-->
-<!-- :style="{ background: item.bgColor }">-->
-<!-- <up-icon :name="item.icon"-->
-<!-- :size="58"-->
-<!-- color="#ffffff"></up-icon>-->
-<!-- </view>-->
-<!-- <text class="item-label">{{item.label}}</text>-->
-<!-- </up-grid-item>-->
-<!-- </up-grid>-->
-<!-- </view>-->
-<!-- </view>-->
+ <!-- <view class="common-module equipment-module">-->
+ <!-- <view class="module-header">-->
+ <!-- <view class="module-title-container">-->
+ <!-- <text class="module-title">璁惧绠$悊</text>-->
+ <!-- </view>-->
+ <!-- </view>-->
+ <!-- <view class="module-content">-->
+ <!-- <up-grid :border="false"-->
+ <!-- col="4">-->
+ <!-- <up-grid-item v-for="(item, index) in equipmentItems"-->
+ <!-- :key="index"-->
+ <!-- @click="handleCommonItemClick(item)">-->
+ <!-- <view class="icon-container"-->
+ <!-- :style="{ background: item.bgColor }">-->
+ <!-- <up-icon :name="item.icon"-->
+ <!-- :size="58"-->
+ <!-- color="#ffffff"></up-icon>-->
+ <!-- </view>-->
+ <!-- <text class="item-label">{{item.label}}</text>-->
+ <!-- </up-grid-item>-->
+ <!-- </up-grid>-->
+ <!-- </view>-->
+ <!-- </view>-->
</view>
</template>
@@ -545,6 +545,12 @@
orderRow = "";
}
console.log(orderRow, "orderRow======@@@@@@@@");
+ try {
+ JSON.parse(orderRow);
+ } catch (error) {
+ modal.msgError("璁㈠崟瑙f瀽澶辫触");
+ return;
+ }
// 鎵爜鎴愬姛鍚庤烦杞埌鐢熶骇鎶ュ伐椤甸潰锛屽苟浼犻�抩rderRow鍙傛暟
uni.navigateTo({
url: `/pages/productionManagement/productionReport/index?orderRow=${orderRow}`,
@@ -555,9 +561,9 @@
title: "鎵爜澶辫触",
icon: "none",
});
- uni.navigateTo({
- url: `/pages/productionManagement/productionReport/index`,
- });
+ // uni.navigateTo({
+ // url: `/pages/productionManagement/productionReport/index`,
+ // });
},
});
};
diff --git a/src/pages/productionManagement/productionReport/index.vue b/src/pages/productionManagement/productionReport/index.vue
index 4d7b8a4..abe5679 100644
--- a/src/pages/productionManagement/productionReport/index.vue
+++ b/src/pages/productionManagement/productionReport/index.vue
@@ -21,11 +21,14 @@
<u-form-item label="鏈鐢熶骇鏁伴噺"
prop="quantity"
required>
- <u-number-box v-model="form.quantity"
+ <u-input v-model="form.quantity"
+ placeholder="璇疯緭鍏�"
+ type="number" />
+ <!-- <u-number-box v-model="form.quantity"
step="0.1"
bgColor="#fff"
decimal-length="1"
- :min="0"></u-number-box>
+ :min="0"></u-number-box> -->
</u-form-item>
<u-form-item label="鐝粍淇℃伅"
prop="schedulingUserId"
@@ -133,19 +136,24 @@
// 椤甸潰鍔犺浇鏃跺垵濮嬪寲鏁版嵁
onLoad(options => {
console.log(options, "options");
- const orderRow = JSON.parse(options.orderRow);
- console.log(orderRow, "orderRow======########");
-
- form.value.planQuantity = orderRow.planQuantity;
- form.value.quantity = orderRow.quantity;
- form.value.productProcessRouteItemId = orderRow.productProcessRouteItemId;
- form.value.workOrderId = orderRow.id;
- form.value.reportWork = orderRow.reportWork;
- form.value.productMainId = orderRow.productMainId;
- getInfo().then(res => {
- form.value.userId = res.user.userId;
- form.value.userName = res.user.userName;
- });
+ try {
+ const orderRow = JSON.parse(options.orderRow);
+ console.log(orderRow, "orderRow======########");
+ form.value.planQuantity = orderRow.planQuantity;
+ form.value.quantity = orderRow.quantity;
+ form.value.productProcessRouteItemId = orderRow.productProcessRouteItemId;
+ form.value.workOrderId = orderRow.id;
+ form.value.reportWork = orderRow.reportWork;
+ form.value.productMainId = orderRow.productMainId;
+ getInfo().then(res => {
+ form.value.userId = res.user.userId;
+ form.value.userName = res.user.userName;
+ });
+ } catch (error) {
+ modal.msgError("璁㈠崟瑙f瀽澶辫触");
+ goBack();
+ return;
+ }
});
</script>
--
Gitblit v1.9.3