maliang 4 өдөр өмнө
parent
commit
1a5524f3ce

+ 5 - 11
pages/inventory-task/detail.vue

@@ -136,6 +136,7 @@
             type="primary"
             text="盘点"
             :customStyle="customBtnStyle"
+            :disabled="!isEdit"
             @click="handleCheck(item)"
             class="action-btn"
           ></u-button>
@@ -143,6 +144,7 @@
             v-else
             type="primary"
             text="重新盘点"
+            :disabled="!isEdit"
             :customStyle="customBtnStyle"
             @click="handleCheck(item)"
             class="action-btn"
@@ -164,17 +166,6 @@
             v-if="item.status === 4"
           >
           </u-tag>
-          <!-- <u-button
-            type="warning"
-            text="盘亏"
-            v-if="
-              getGoodsInventoryStatusInfo(item.inventory, item.newInventory)
-                .value === 3
-            "
-            :customStyle="customBtnStyle"
-            plain
-            class="action-btn action-btn-secondary"
-          ></u-button> -->
         </view>
       </view>
       <!-- 加载更多 -->
@@ -284,6 +275,9 @@ export default {
         100
       );
     },
+    isEdit() {
+      return this.pageType === "1";
+    },
     ...mapGetters(["userInfo"]),
   },
   onLoad(opt) {

+ 3 - 1
pages/inventory-task/taskDetail.vue

@@ -76,6 +76,7 @@ export default {
   data() {
     return {
       taskInfo: {},
+      taskId: null,
     };
   },
   computed: {
@@ -87,13 +88,14 @@ export default {
     },
   },
   onLoad(opt) {
+    this.taskId = opt.id;
     this.loadData(opt.id);
   },
   methods: {
     viewDetail() {
       // 跳转到盘点详情页面
       uni.navigateTo({
-        url: "/pages/inventory-task/inventoryDetail",
+        url: `/pages/inventory-task/detail?id=${this.taskId}&pageType=2`,
       });
     },
     async loadData(id) {