zhangwencui
6 天以前 b0dada24ccf8bebf143a921ae01d6cc95d378f6e
修改bug
已修改2个文件
238 ■■■■ 文件已修改
src/pages/index.vue 200 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/productionManagement/productionReport/index.vue 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>-->
<!--    &lt;!&ndash; 采购管理模块 &ndash;&gt;-->
<!--    <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>-->
<!--    &lt;!&ndash; 协同办公模块 &ndash;&gt;-->
<!--    <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>-->
    <!--    &lt;!&ndash; 采购管理模块 &ndash;&gt;-->
    <!--    <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>-->
    <!--    &lt;!&ndash; 协同办公模块 &ndash;&gt;-->
    <!--    <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("订单解析失败");
          return;
        }
        // 扫码成功后跳转到生产报工页面,并传递orderRow参数
        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`,
        // });
      },
    });
  };
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("订单解析失败");
      goBack();
      return;
    }
  });
</script>