695593266@qq.com 1 місяць тому
батько
коміт
8da1cfd4e3

+ 1 - 1
manifest.json

@@ -2,7 +2,7 @@
     "name" : "智慧工厂",
     "appid" : "__UNI__45B3907",
     "description" : "",
-    "versionName" : "V1.0.3.79",
+    "versionName" : "V1.0.3.86",
     "versionCode" : "100",
     "transformPx" : false,
     "h5" : {

+ 36 - 5
pages/home/wt/components/entrust/taskForm.vue

@@ -77,7 +77,9 @@
             <view class="label">受托工厂:</view>
           </u-col>
           <u-col span="8">
-            <view class="value">{{ form.beEntrustedFactoriesName || "—" }}</view>
+            <view class="value">{{
+              form.beEntrustedFactoriesName || "—"
+            }}</view>
           </u-col>
         </u-row>
         <u-row>
@@ -145,7 +147,9 @@
             <view class="label">请托数量:</view>
           </u-col>
           <u-col span="8">
-            <view class="value">{{ row.totalCount || "—" }}{{ row.measuringUnit || "" }}</view>
+            <view class="value"
+              >{{ row.totalCount || "—" }}{{ row.measuringUnit || "" }}</view
+            >
           </u-col>
         </u-row>
         <u-row>
@@ -153,7 +157,9 @@
             <view class="label">计划类型:</view>
           </u-col>
           <u-col span="8">
-            <view class="value">{{ getPlanTypeLabel(row.planType) || "—" }}</view>
+            <view class="value">{{
+              getPlanTypeLabel(row.planType) || "—"
+            }}</view>
           </u-col>
         </u-row>
         <u-row>
@@ -274,7 +280,12 @@
 </template>
 
 <script>
-import { pleaseEntrustDetail, getProduceTaskList } from "@/api/entrust/index.js";
+import {
+  pleaseEntrustDetail,
+  getProduceTaskList,
+} from "@/api/entrust/index.js";
+
+import { getDictByCode } from "@/api/common";
 
 const PLAN_TYPE_MAP = {
   1: "内销计划",
@@ -310,6 +321,7 @@ export default {
         beEntrustedDeptName: "",
       },
       orderList: [],
+      typeList: [],
       tabList: ["基本信息", "产品信息"],
       curNow: 0,
       stickyPlaceholderHeight: 0,
@@ -322,7 +334,9 @@ export default {
   },
   computed: {
     typeLabel() {
-      return this.form.type ? this.form.type + "" : "";
+      if (!this.form.type && this.form.type !== 0) return "";
+      const item = this.typeList.find((i) => i.value == this.form.type);
+      return item ? item.label : "";
     },
     priorityLabel() {
       const item = this.options.find((i) => i.value == this.form.priority);
@@ -330,6 +344,7 @@ export default {
     },
   },
   async mounted() {
+    await this.getTypeList();
     this.initStickyTop();
     await this.init();
     this.updateStickyPlaceholderHeight();
@@ -344,6 +359,22 @@ export default {
         this.stickyTop = 50;
       }
     },
+
+    async getTypeList() {
+      try {
+        const res = await getDictByCode("entrust_type");
+        if (res?.length != 0) {
+          let list = res.map((item) => {
+            let key = Object.keys(item)[0];
+            return { value: Number(key), label: item[key] };
+          });
+          this.typeList = list;
+        }
+      } catch (error) {
+        console.error("获取类型列表失败", error);
+      }
+    },
+
     updateStickyPlaceholderHeight() {
       this.$nextTick(() => {
         const query = uni.createSelectorQuery().in(this);

+ 3 - 1
pages/pda/beEntrust/index/index.vue

@@ -513,12 +513,14 @@ export default {
 };
 </script>
 
-<style lang="scss" scoped>
+<style lang="scss">
 page {
   height: 100vh;
   overflow: hidden;
 }
+</style>
 
+<style lang="scss" scoped>
 .content-box {
   height: 100vh;
   overflow: hidden;

+ 1 - 19
pages/pda/entrust/create/create.vue

@@ -219,11 +219,7 @@
                 v-model="item.planDeliveryTime"
                 @change="(e) => dateChange(e, index)"
                 class="order-picker"
-                :popup-style="{ zIndex: 1000 }"
               >
-                <view class="picker-value">
-                  {{ item.planDeliveryTime || "请选择日期" }}
-                </view>
               </uni-datetime-picker>
             </view>
           </view>
@@ -366,11 +362,6 @@ export default {
     },
 
     async getTypeList() {
-      // 从字典获取类型列表
-      // this.typeList = [
-      //   { label: "加工", value: "1" },
-      //   { label: "装配", value: "2" },
-      // ];
       try {
         const res = await getDictByCode("entrust_type");
         if (res?.length != 0) {
@@ -688,7 +679,7 @@ export default {
     },
 
     dateChange(e, index) {
-      this.orderList[index].planDeliveryTime = e?.detail?.value || e;
+      this.orderList[index].planDeliveryTime = e;
     },
 
     async getOrderTaskList() {
@@ -1176,13 +1167,4 @@ export default {
     }
   }
 }
-
-/* 确保日期选择器弹窗不被遮挡 */
-::v-deep .uni-datetime-picker-popup {
-  z-index: 1000 !important;
-}
-
-::v-deep .uni-popup__wrapper {
-  z-index: 1000 !important;
-}
 </style>

+ 7 - 1
pages/pda/entrust/index/index.vue

@@ -251,6 +251,10 @@ export default {
   },
 
   methods: {
+    back() {
+      uni.navigateBack();
+    },
+
     async getTypeList() {
       // 获取字典数据
       this.typeList = [
@@ -538,12 +542,14 @@ export default {
 };
 </script>
 
-<style lang="scss" scoped>
+<style lang="scss">
 page {
   height: 100vh;
   overflow: hidden;
 }
+</style>
 
+<style lang="scss" scoped>
 .content-box {
   height: 100vh;
   overflow: hidden;