|  | @@ -2,7 +2,7 @@
 | 
	
		
			
				|  |  |    <view class="inventory-detail">
 | 
	
		
			
				|  |  |      <!-- 导航栏 -->
 | 
	
		
			
				|  |  |      <u-navbar
 | 
	
		
			
				|  |  | -      :title="pageTitle"
 | 
	
		
			
				|  |  | +      :title="inventoryInfo.taskName"
 | 
	
		
			
				|  |  |        :autoBack="true"
 | 
	
		
			
				|  |  |        fixed
 | 
	
		
			
				|  |  |        safe-area-inset-top
 | 
	
	
		
			
				|  | @@ -15,36 +15,45 @@
 | 
	
		
			
				|  |  |        </template>
 | 
	
		
			
				|  |  |      </u-navbar>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <!-- 基本信息 吸顶 -->
 | 
	
		
			
				|  |  | -    <view class="info-card">
 | 
	
		
			
				|  |  | -      <view class="info-item">
 | 
	
		
			
				|  |  | -        <text class="info-label">盘点单号:</text>
 | 
	
		
			
				|  |  | -        <text class="info-value">{{ inventoryInfo.code }}</text>
 | 
	
		
			
				|  |  | -      </view>
 | 
	
		
			
				|  |  | -      <view class="info-item">
 | 
	
		
			
				|  |  | -        <text class="info-label">盘点人:</text>
 | 
	
		
			
				|  |  | -        <text class="info-value">{{ inventoryInfo.operator }}</text>
 | 
	
		
			
				|  |  | -      </view>
 | 
	
		
			
				|  |  | -      <view class="progress-box">
 | 
	
		
			
				|  |  | -        <view class="progress-label-box">
 | 
	
		
			
				|  |  | -          <text class="progress-label"> 盘点进度 </text>
 | 
	
		
			
				|  |  | -          <text class="progress-value"
 | 
	
		
			
				|  |  | -            >{{ inventoryInfo.progress }}/{{ inventoryInfo.total }}</text
 | 
	
		
			
				|  |  | -          >
 | 
	
		
			
				|  |  | +    <u-sticky bgColor="#F5F6F7" :offsetTop="offsetTop">
 | 
	
		
			
				|  |  | +      <!-- 基本信息 吸顶 -->
 | 
	
		
			
				|  |  | +      <view class="info-card">
 | 
	
		
			
				|  |  | +        <view class="info-item page-title">
 | 
	
		
			
				|  |  | +          {{ inventoryInfo.taskName }}
 | 
	
		
			
				|  |  |          </view>
 | 
	
		
			
				|  |  | -        <view class="progress-bar-wrap">
 | 
	
		
			
				|  |  | -          <u-line-progress
 | 
	
		
			
				|  |  | -            :percentage="getProgressPercentage"
 | 
	
		
			
				|  |  | -            height="4"
 | 
	
		
			
				|  |  | -            :show-text="false"
 | 
	
		
			
				|  |  | -            activeColor="#4080FF"
 | 
	
		
			
				|  |  | -          >
 | 
	
		
			
				|  |  | -          </u-line-progress>
 | 
	
		
			
				|  |  | +        <view class="info-item-box">
 | 
	
		
			
				|  |  | +          <view class="info-item">
 | 
	
		
			
				|  |  | +            <text class="info-label">盘点单号:</text>
 | 
	
		
			
				|  |  | +            <text class="info-value">{{ inventoryInfo.number }}</text>
 | 
	
		
			
				|  |  | +          </view>
 | 
	
		
			
				|  |  | +          <view class="info-item">
 | 
	
		
			
				|  |  | +            <text class="info-label">盘点人:</text>
 | 
	
		
			
				|  |  | +            <text class="info-value">{{ inventoryInfo.creatorName }}</text>
 | 
	
		
			
				|  |  | +          </view>
 | 
	
		
			
				|  |  | +        </view>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        <view class="progress-box">
 | 
	
		
			
				|  |  | +          <view class="progress-label-box">
 | 
	
		
			
				|  |  | +            <text class="progress-label"> 盘点进度 </text>
 | 
	
		
			
				|  |  | +            <text class="progress-value"
 | 
	
		
			
				|  |  | +              ><text class="finished-value">{{
 | 
	
		
			
				|  |  | +                inventoryInfo.finishCount
 | 
	
		
			
				|  |  | +              }}</text
 | 
	
		
			
				|  |  | +              >/{{ inventoryInfo.materialCount }}</text
 | 
	
		
			
				|  |  | +            >
 | 
	
		
			
				|  |  | +          </view>
 | 
	
		
			
				|  |  | +          <view class="progress-bar-wrap">
 | 
	
		
			
				|  |  | +            <u-line-progress
 | 
	
		
			
				|  |  | +              :percentage="getProgressPercentage"
 | 
	
		
			
				|  |  | +              height="6"
 | 
	
		
			
				|  |  | +              :show-text="false"
 | 
	
		
			
				|  |  | +              activeColor="#4080FF"
 | 
	
		
			
				|  |  | +            >
 | 
	
		
			
				|  |  | +            </u-line-progress>
 | 
	
		
			
				|  |  | +          </view>
 | 
	
		
			
				|  |  |          </view>
 | 
	
		
			
				|  |  |        </view>
 | 
	
		
			
				|  |  | -    </view>
 | 
	
		
			
				|  |  | -    <!-- 筛选按钮 -->
 | 
	
		
			
				|  |  | -    <u-sticky bgColor="#F5F6F7" :offsetTop="44">
 | 
	
		
			
				|  |  | +      <!-- 筛选按钮 -->
 | 
	
		
			
				|  |  |        <view class="filter-wrap">
 | 
	
		
			
				|  |  |          <view class="filter-btn" @click="filterPopupVisible = true">
 | 
	
		
			
				|  |  |            <text>筛选</text>
 | 
	
	
		
			
				|  | @@ -63,14 +72,15 @@
 | 
	
		
			
				|  |  |          <view class="location-row">
 | 
	
		
			
				|  |  |            <view class="location-left">
 | 
	
		
			
				|  |  |              <text class="location-label">库位:</text>
 | 
	
		
			
				|  |  | -            <text class="location-value">{{ item.location }}</text>
 | 
	
		
			
				|  |  | +            <text class="location-value">{{ item.position }}</text>
 | 
	
		
			
				|  |  |              <image
 | 
	
		
			
				|  |  |                src="@/static/image/bianji-icon.png"
 | 
	
		
			
				|  |  |                mode=""
 | 
	
		
			
				|  |  |                class="icon"
 | 
	
		
			
				|  |  | +              @click="handlePositionEdit(item)"
 | 
	
		
			
				|  |  |              ></image>
 | 
	
		
			
				|  |  |            </view>
 | 
	
		
			
				|  |  | -          <text class="category-text">{{ item.category }}</text>
 | 
	
		
			
				|  |  | +          <text class="category-text">{{ item.categoryName }}</text>
 | 
	
		
			
				|  |  |          </view>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          <view class="goods-content">
 | 
	
	
		
			
				|  | @@ -80,33 +90,40 @@
 | 
	
		
			
				|  |  |              mode="aspectFill"
 | 
	
		
			
				|  |  |            ></image>
 | 
	
		
			
				|  |  |            <view class="goods-info">
 | 
	
		
			
				|  |  | -            <text class="goods-name u-line-2">{{ item.name }}</text>
 | 
	
		
			
				|  |  | +            <text class="goods-name u-line-2">{{ item.materialName }}</text>
 | 
	
		
			
				|  |  |              <view class="goods-field half-w">
 | 
	
		
			
				|  |  |                <text class="field-label">规格:</text>
 | 
	
		
			
				|  |  | -              <text class="field-value">{{ item.spec }}</text>
 | 
	
		
			
				|  |  | +              <text class="field-value">{{ item.standard }}</text>
 | 
	
		
			
				|  |  |              </view>
 | 
	
		
			
				|  |  |              <view class="goods-field half-w">
 | 
	
		
			
				|  |  |                <text class="field-label">盘点人:</text>
 | 
	
		
			
				|  |  | -              <text class="field-value">{{ item.checkUser }}</text>
 | 
	
		
			
				|  |  | +              <text class="field-value">{{ item.createName }}</text>
 | 
	
		
			
				|  |  |              </view>
 | 
	
		
			
				|  |  |              <view class="goods-field">
 | 
	
		
			
				|  |  |                <text class="field-label">盘点时间:</text>
 | 
	
		
			
				|  |  | -              <text class="field-value">{{ item.checkTime }}</text>
 | 
	
		
			
				|  |  | +              <text class="field-value">{{ item.operTime }}</text>
 | 
	
		
			
				|  |  |              </view>
 | 
	
		
			
				|  |  |              <view class="stock-row">
 | 
	
		
			
				|  |  |                <view class="stock-item">
 | 
	
		
			
				|  |  |                  <text class="stock-label">系统库存</text>
 | 
	
		
			
				|  |  | -                <text class="stock-value">{{ item.systemStock }}瓶</text>
 | 
	
		
			
				|  |  | +                <text class="stock-value"
 | 
	
		
			
				|  |  | +                  >{{ item.inventory }}{{ item.commodityUnit }}</text
 | 
	
		
			
				|  |  | +                >
 | 
	
		
			
				|  |  |                </view>
 | 
	
		
			
				|  |  |                <view class="stock-item">
 | 
	
		
			
				|  |  |                  <text class="stock-label">已盘库存</text>
 | 
	
		
			
				|  |  |                  <text
 | 
	
		
			
				|  |  |                    class="stock-value"
 | 
	
		
			
				|  |  | -                  :class="{
 | 
	
		
			
				|  |  | -                    'stock-value-zero': item.actualStock === '未盘',
 | 
	
		
			
				|  |  | -                    'stock-value-warning': item.actualStock === '0瓶',
 | 
	
		
			
				|  |  | -                  }"
 | 
	
		
			
				|  |  | -                  >{{ item.actualStock }}</text
 | 
	
		
			
				|  |  | +                  :class="
 | 
	
		
			
				|  |  | +                    Number(item.newInventory || 0) > 0
 | 
	
		
			
				|  |  | +                      ? 'stock-value-warning'
 | 
	
		
			
				|  |  | +                      : ''
 | 
	
		
			
				|  |  | +                  "
 | 
	
		
			
				|  |  | +                  >{{
 | 
	
		
			
				|  |  | +                    Number(item.newInventory || 0) === 0
 | 
	
		
			
				|  |  | +                      ? "未盘"
 | 
	
		
			
				|  |  | +                      : `${Number(item.newInventory || 0)}${item.commodityUnit}`
 | 
	
		
			
				|  |  | +                  }}</text
 | 
	
		
			
				|  |  |                  >
 | 
	
		
			
				|  |  |                </view>
 | 
	
		
			
				|  |  |              </view>
 | 
	
	
		
			
				|  | @@ -115,47 +132,81 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          <view class="action-row">
 | 
	
		
			
				|  |  |            <u-button
 | 
	
		
			
				|  |  | +            v-if="item.status === 1"
 | 
	
		
			
				|  |  |              type="primary"
 | 
	
		
			
				|  |  | -            size="mini"
 | 
	
		
			
				|  |  | +            text="盘点"
 | 
	
		
			
				|  |  | +            :customStyle="customBtnStyle"
 | 
	
		
			
				|  |  |              @click="handleCheck(item)"
 | 
	
		
			
				|  |  |              class="action-btn"
 | 
	
		
			
				|  |  | -            >盘点</u-button
 | 
	
		
			
				|  |  | -          >
 | 
	
		
			
				|  |  | +          ></u-button>
 | 
	
		
			
				|  |  |            <u-button
 | 
	
		
			
				|  |  | +            v-else
 | 
	
		
			
				|  |  |              type="primary"
 | 
	
		
			
				|  |  | -            size="mini"
 | 
	
		
			
				|  |  | -            @click="handleRecheck(item)"
 | 
	
		
			
				|  |  | +            text="重新盘点"
 | 
	
		
			
				|  |  | +            :customStyle="customBtnStyle"
 | 
	
		
			
				|  |  | +            @click="handleCheck(item)"
 | 
	
		
			
				|  |  |              class="action-btn"
 | 
	
		
			
				|  |  | -            >重新盘点
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  |            </u-button>
 | 
	
		
			
				|  |  | -          <u-button
 | 
	
		
			
				|  |  | +          <u-tag
 | 
	
		
			
				|  |  | +            text="盘亏"
 | 
	
		
			
				|  |  | +            type="error"
 | 
	
		
			
				|  |  | +            plain
 | 
	
		
			
				|  |  | +            plainFill
 | 
	
		
			
				|  |  | +            v-if="item.status === 3"
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +          </u-tag>
 | 
	
		
			
				|  |  | +          <u-tag
 | 
	
		
			
				|  |  | +            text="盘盈"
 | 
	
		
			
				|  |  | +            type="error"
 | 
	
		
			
				|  |  | +            plain
 | 
	
		
			
				|  |  | +            plainFill
 | 
	
		
			
				|  |  | +            v-if="item.status === 4"
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +          </u-tag>
 | 
	
		
			
				|  |  | +          <!-- <u-button
 | 
	
		
			
				|  |  |              type="warning"
 | 
	
		
			
				|  |  | -            size="mini"
 | 
	
		
			
				|  |  | +            text="盘亏"
 | 
	
		
			
				|  |  | +            v-if="
 | 
	
		
			
				|  |  | +              getGoodsInventoryStatusInfo(item.inventory, item.newInventory)
 | 
	
		
			
				|  |  | +                .value === 3
 | 
	
		
			
				|  |  | +            "
 | 
	
		
			
				|  |  | +            :customStyle="customBtnStyle"
 | 
	
		
			
				|  |  |              plain
 | 
	
		
			
				|  |  | -            @click="handleCheck2(item)"
 | 
	
		
			
				|  |  |              class="action-btn action-btn-secondary"
 | 
	
		
			
				|  |  | -            >盘点2</u-button
 | 
	
		
			
				|  |  | -          >
 | 
	
		
			
				|  |  | +          ></u-button> -->
 | 
	
		
			
				|  |  |          </view>
 | 
	
		
			
				|  |  |        </view>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |        <!-- 加载更多 -->
 | 
	
		
			
				|  |  | -      <u-loadmore :status="loadMoreStatus" @loadmore="onLoadMore" />
 | 
	
		
			
				|  |  | +      <u-loadmore :status="loadStatus" @loadmore="onLoadMore" />
 | 
	
		
			
				|  |  |      </view>
 | 
	
		
			
				|  |  | +    <!-- 过滤条件弹框 -->
 | 
	
		
			
				|  |  |      <InventoryFilterPopup
 | 
	
		
			
				|  |  |        :show.sync="filterPopupVisible"
 | 
	
		
			
				|  |  | -      :defaultValues="defaultFilterValues"
 | 
	
		
			
				|  |  | +      :defaultValues="queryFilterValues"
 | 
	
		
			
				|  |  |        @confirm="handleFilterConfirm"
 | 
	
		
			
				|  |  | +      :taskId="taskId"
 | 
	
		
			
				|  |  | +    />
 | 
	
		
			
				|  |  | +    <!-- 盘点数量 -->
 | 
	
		
			
				|  |  | +    <actionNumPopup
 | 
	
		
			
				|  |  | +      :show.sync="actionPop.showNumPop"
 | 
	
		
			
				|  |  | +      :min-count="actionPop.minCount"
 | 
	
		
			
				|  |  | +      :max-count="actionPop.maxCount"
 | 
	
		
			
				|  |  | +      @confirm="handleConfirmNum"
 | 
	
		
			
				|  |  | +    />
 | 
	
		
			
				|  |  | +    <!-- 修改库位 -->
 | 
	
		
			
				|  |  | +    <categoryPopup
 | 
	
		
			
				|  |  | +      :show.sync="actionPop.showCategoryPop"
 | 
	
		
			
				|  |  | +      :original-location="actionPop.originalLocation"
 | 
	
		
			
				|  |  | +      @confirm="haandleComfirmLocation"
 | 
	
		
			
				|  |  |      />
 | 
	
		
			
				|  |  | -    <actionNumPopup :show.sync="actionPop.showNumPop" />
 | 
	
		
			
				|  |  | -    <categoryPopup :show.sync="actionPop.showCategoryPop" />
 | 
	
		
			
				|  |  |      <error-pop
 | 
	
		
			
				|  |  |        v-model="actionPop.errorShow"
 | 
	
		
			
				|  |  |        isCenter
 | 
	
		
			
				|  |  |        cancelBtnText="取消"
 | 
	
		
			
				|  |  |        confirmBtnText="确定"
 | 
	
		
			
				|  |  |        @close="actionPop.errorShow = false"
 | 
	
		
			
				|  |  | -      @confirm="confirm"
 | 
	
		
			
				|  |  | +      @confirm="submit"
 | 
	
		
			
				|  |  |        :content="actionPop.errorText"
 | 
	
		
			
				|  |  |      ></error-pop>
 | 
	
		
			
				|  |  |    </view>
 | 
	
	
		
			
				|  | @@ -166,6 +217,14 @@ import InventoryFilterPopup from "./components/inventoryFilterPopup.vue";
 | 
	
		
			
				|  |  |  import actionNumPopup from "./components/actionNumPopup.vue";
 | 
	
		
			
				|  |  |  import categoryPopup from "./components/categoryPopup.vue";
 | 
	
		
			
				|  |  |  import errorPop from "@/components/error-pop/error-pop.vue";
 | 
	
		
			
				|  |  | +import { getGoodsInventoryStatusInfo } from "./utils/index.js";
 | 
	
		
			
				|  |  | +import {
 | 
	
		
			
				|  |  | +  taskStocktakingDetail,
 | 
	
		
			
				|  |  | +  taskStocktakingItemList,
 | 
	
		
			
				|  |  | +  stocktaking,
 | 
	
		
			
				|  |  | +} from "@/common/request/apis/inventoryTask";
 | 
	
		
			
				|  |  | +import { mapGetters } from "vuex";
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    components: {
 | 
	
		
			
				|  |  |      InventoryFilterPopup,
 | 
	
	
		
			
				|  | @@ -175,9 +234,17 @@ export default {
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | +      offsetTop: 0,
 | 
	
		
			
				|  |  | +      pageType: "1", // 1:去盘点,可操作 2:盘点详情
 | 
	
		
			
				|  |  | +      taskId: "", //任务id
 | 
	
		
			
				|  |  | +      customBtnStyle: {
 | 
	
		
			
				|  |  | +        width: "144rpx",
 | 
	
		
			
				|  |  | +        height: "56rpx",
 | 
	
		
			
				|  |  | +        borderRadius: "28rpx",
 | 
	
		
			
				|  |  | +        fontSize: "32rpx",
 | 
	
		
			
				|  |  | +        borderRadius: "8rpx",
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  |        pageTitle: "2025年中心仓第三季度食品盘点",
 | 
	
		
			
				|  |  | -      isRefreshing: false,
 | 
	
		
			
				|  |  | -      loadMoreStatus: "loadmore",
 | 
	
		
			
				|  |  |        pageNum: 1,
 | 
	
		
			
				|  |  |        pageSize: 10,
 | 
	
		
			
				|  |  |        inventoryInfo: {
 | 
	
	
		
			
				|  | @@ -186,58 +253,47 @@ export default {
 | 
	
		
			
				|  |  |          progress: 105,
 | 
	
		
			
				|  |  |          total: 604,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -      goodsList: [
 | 
	
		
			
				|  |  | -        {
 | 
	
		
			
				|  |  | -          location: "C6-2-2",
 | 
	
		
			
				|  |  | -          category: "母婴用品-家居旅行",
 | 
	
		
			
				|  |  | -          image: "/static/demo/goods1.png",
 | 
	
		
			
				|  |  | -          name: "4层汗巾儿童全棉幼儿类吸汗巾婴儿纱布毛巾1条装",
 | 
	
		
			
				|  |  | -          spec: "4层-随机",
 | 
	
		
			
				|  |  | -          checkUser: "刘双秀",
 | 
	
		
			
				|  |  | -          checkTime: "2025-04-03",
 | 
	
		
			
				|  |  | -          systemStock: "5瓶",
 | 
	
		
			
				|  |  | -          actualStock: "未盘",
 | 
	
		
			
				|  |  | -          isChecked: false,
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        {
 | 
	
		
			
				|  |  | -          location: "C6-2-2",
 | 
	
		
			
				|  |  | -          category: "母婴用品-家居旅行",
 | 
	
		
			
				|  |  | -          image: "/static/demo/goods1.png",
 | 
	
		
			
				|  |  | -          name: "4层汗巾儿童全棉幼儿类吸汗巾婴儿纱布毛巾1条装",
 | 
	
		
			
				|  |  | -          spec: "4层-随机",
 | 
	
		
			
				|  |  | -          checkUser: "刘双秀",
 | 
	
		
			
				|  |  | -          checkTime: "2025-04-03",
 | 
	
		
			
				|  |  | -          systemStock: "5瓶",
 | 
	
		
			
				|  |  | -          actualStock: "0瓶",
 | 
	
		
			
				|  |  | -          isChecked: true,
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -      ],
 | 
	
		
			
				|  |  | +      loadStatus: "loadmore", //加载前值为loadmore,加载中为loading,没有数据为nomore
 | 
	
		
			
				|  |  | +      goodsList: [],
 | 
	
		
			
				|  |  |        filterPopupVisible: false,
 | 
	
		
			
				|  |  | -      defaultFilterValues: {
 | 
	
		
			
				|  |  | -        goods: "",
 | 
	
		
			
				|  |  | -        user: "",
 | 
	
		
			
				|  |  | -        category: "",
 | 
	
		
			
				|  |  | -        location: "",
 | 
	
		
			
				|  |  | +      queryFilterValues: {
 | 
	
		
			
				|  |  | +        statusList: [], //盘点状态
 | 
	
		
			
				|  |  | +        userIdList: [], // 盘点负责人id
 | 
	
		
			
				|  |  | +        categoryIdList: [], // 类目
 | 
	
		
			
				|  |  | +        positionList: [], // 库位
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        actionPop: {
 | 
	
		
			
				|  |  |          // 盘点数量弹框状态
 | 
	
		
			
				|  |  |          showNumPop: false,
 | 
	
		
			
				|  |  | +        minCount: 0,
 | 
	
		
			
				|  |  | +        maxCount: 9,
 | 
	
		
			
				|  |  | +        activeGoodsItem: null,
 | 
	
		
			
				|  |  |          // 警告提示弹框状态
 | 
	
		
			
				|  |  |          errorShow: false,
 | 
	
		
			
				|  |  |          errorText: "是否提交盘点?",
 | 
	
		
			
				|  |  |          // 修改库位弹框状态
 | 
	
		
			
				|  |  |          showCategoryPop: false,
 | 
	
		
			
				|  |  | +        originalLocation: "",
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    computed: {
 | 
	
		
			
				|  |  |      getProgressPercentage() {
 | 
	
		
			
				|  |  | -      return (this.inventoryInfo.progress / this.inventoryInfo.total) * 100;
 | 
	
		
			
				|  |  | +      return (
 | 
	
		
			
				|  |  | +        (this.inventoryInfo.finishCount / this.inventoryInfo.materialCount) *
 | 
	
		
			
				|  |  | +        100
 | 
	
		
			
				|  |  | +      );
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    ...mapGetters(["userInfo"]),
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  onLoad() {
 | 
	
		
			
				|  |  | -    // 初始化数据
 | 
	
		
			
				|  |  | -    this.loadData();
 | 
	
		
			
				|  |  | +  onLoad(opt) {
 | 
	
		
			
				|  |  | +    let systemInfo = uni.getSystemInfoSync();
 | 
	
		
			
				|  |  | +    let statusBarHeight = systemInfo.statusBarHeight;
 | 
	
		
			
				|  |  | +    this.offsetTop = statusBarHeight + 40;
 | 
	
		
			
				|  |  | +    console.log("222222", opt);
 | 
	
		
			
				|  |  | +    this.pageType = opt.pageType;
 | 
	
		
			
				|  |  | +    this.taskId = opt.id;
 | 
	
		
			
				|  |  | +    this.loadData(opt.id);
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    onPullDownRefresh() {
 | 
	
		
			
				|  |  |      // 下拉刷新
 | 
	
	
		
			
				|  | @@ -248,78 +304,125 @@ export default {
 | 
	
		
			
				|  |  |      this.onLoadMore();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | +    getGoodsInventoryStatusInfo,
 | 
	
		
			
				|  |  |      async onRefresh() {
 | 
	
		
			
				|  |  |        try {
 | 
	
		
			
				|  |  | -        await this.loadData(true);
 | 
	
		
			
				|  |  | +        await this.loadData(this.taskId, true);
 | 
	
		
			
				|  |  |        } finally {
 | 
	
		
			
				|  |  |          uni.stopPullDownRefresh();
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      async onLoadMore() {
 | 
	
		
			
				|  |  | -      if (this.loadMoreStatus !== "loadmore") return;
 | 
	
		
			
				|  |  | -      this.loadMoreStatus = "loading";
 | 
	
		
			
				|  |  | +      if (this.loadStatus !== "loadmore") return;
 | 
	
		
			
				|  |  | +      this.loadStatus = "loading";
 | 
	
		
			
				|  |  |        try {
 | 
	
		
			
				|  |  | -        await this.loadData();
 | 
	
		
			
				|  |  | +        await this.loadData(this.taskId);
 | 
	
		
			
				|  |  |        } catch (e) {
 | 
	
		
			
				|  |  | -        this.loadMoreStatus = "loadmore";
 | 
	
		
			
				|  |  | +        this.loadStatus = "loadmore";
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    async loadData(isRefresh = false) {
 | 
	
		
			
				|  |  | +    // 商品列表
 | 
	
		
			
				|  |  | +    async getTaskStocktakingItemList(taskId) {
 | 
	
		
			
				|  |  | +      try {
 | 
	
		
			
				|  |  | +        const pageNum = this.pageNum;
 | 
	
		
			
				|  |  | +        const pageSize = this.pageSize;
 | 
	
		
			
				|  |  | +        const params = {
 | 
	
		
			
				|  |  | +          taskId,
 | 
	
		
			
				|  |  | +          ...this.queryFilterValues,
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +        const res = await taskStocktakingItemList(params);
 | 
	
		
			
				|  |  | +        const { total, rows } = res.data;
 | 
	
		
			
				|  |  | +        this.goodsList = [...this.goodsList, ...rows];
 | 
	
		
			
				|  |  | +        if (pageNum * pageSize < Number(total)) {
 | 
	
		
			
				|  |  | +          this.pageNum++;
 | 
	
		
			
				|  |  | +          this.loadStatus = "loadmore";
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          this.loadStatus = "nomore";
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        console.log("taskStocktakingItemList======", res);
 | 
	
		
			
				|  |  | +      } catch (error) {}
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 任务详情
 | 
	
		
			
				|  |  | +    async getTaskStocktakingDetail(taskId) {
 | 
	
		
			
				|  |  | +      try {
 | 
	
		
			
				|  |  | +        const res = await taskStocktakingDetail(taskId);
 | 
	
		
			
				|  |  | +        console.log("taskStocktakingDetail======", res);
 | 
	
		
			
				|  |  | +        this.inventoryInfo = res.data;
 | 
	
		
			
				|  |  | +      } catch (error) {}
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    resetData() {
 | 
	
		
			
				|  |  | +      this.pageNum = 1;
 | 
	
		
			
				|  |  | +      this.goodsList = [];
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    async loadData(id, isRefresh = false) {
 | 
	
		
			
				|  |  |        if (isRefresh) {
 | 
	
		
			
				|  |  | -        this.pageNum = 1;
 | 
	
		
			
				|  |  | -        this.goodsList = [];
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -      // 模拟数据加载
 | 
	
		
			
				|  |  | -      await new Promise((resolve) => setTimeout(resolve, 1000));
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -      // 模拟新数据
 | 
	
		
			
				|  |  | -      const mockData = [
 | 
	
		
			
				|  |  | -        {
 | 
	
		
			
				|  |  | -          location: "C6-2-2",
 | 
	
		
			
				|  |  | -          category: "母婴用品-家居旅行",
 | 
	
		
			
				|  |  | -          image: "/static/demo/goods1.png",
 | 
	
		
			
				|  |  | -          name: "4层汗巾儿童全棉幼儿类吸汗巾婴儿纱布毛巾1条装",
 | 
	
		
			
				|  |  | -          spec: "4层-随机",
 | 
	
		
			
				|  |  | -          checkUser: "刘双秀",
 | 
	
		
			
				|  |  | -          checkTime: "2025-04-03",
 | 
	
		
			
				|  |  | -          systemStock: "5瓶",
 | 
	
		
			
				|  |  | -          actualStock: isRefresh ? "未盘" : "0瓶",
 | 
	
		
			
				|  |  | -          isChecked: !isRefresh,
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -      ];
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -      this.goodsList = [...this.goodsList, ...mockData];
 | 
	
		
			
				|  |  | -      this.pageNum++;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -      // 模拟没有更多数据
 | 
	
		
			
				|  |  | -      if (this.pageNum > 3) {
 | 
	
		
			
				|  |  | -        this.loadMoreStatus = "nomore";
 | 
	
		
			
				|  |  | -      } else {
 | 
	
		
			
				|  |  | -        this.loadMoreStatus = "loadmore";
 | 
	
		
			
				|  |  | +        this.resetData();
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | +      try {
 | 
	
		
			
				|  |  | +        this.getTaskStocktakingItemList(id);
 | 
	
		
			
				|  |  | +        this.getTaskStocktakingDetail(id);
 | 
	
		
			
				|  |  | +      } catch (error) {}
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    handleCheck(item) {
 | 
	
		
			
				|  |  | -      uni.showToast({
 | 
	
		
			
				|  |  | -        title: "开始盘点",
 | 
	
		
			
				|  |  | -        icon: "none",
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | +    // 库位编辑
 | 
	
		
			
				|  |  | +    handlePositionEdit(item) {
 | 
	
		
			
				|  |  | +      this.actionPop.showCategoryPop = true;
 | 
	
		
			
				|  |  | +      this.actionPop.activeGoodsItem = { ...item };
 | 
	
		
			
				|  |  | +      this.actionPop.originalLocation = item.position;
 | 
	
		
			
				|  |  | +      console.log("handlePositionEdit======", item);
 | 
	
		
			
				|  |  | +      console.log("userInfo======", this.userInfo);
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    handleRecheck(item) {
 | 
	
		
			
				|  |  | -      uni.showToast({
 | 
	
		
			
				|  |  | -        title: "开始重新盘点",
 | 
	
		
			
				|  |  | -        icon: "none",
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | +    async haandleComfirmLocation(val) {
 | 
	
		
			
				|  |  | +      console.log("haandleComfirmLocation======", val);
 | 
	
		
			
				|  |  | +      const activeGoodsItem = this.actionPop.activeGoodsItem;
 | 
	
		
			
				|  |  | +      try {
 | 
	
		
			
				|  |  | +        const params = {
 | 
	
		
			
				|  |  | +          id: activeGoodsItem.id,
 | 
	
		
			
				|  |  | +          materialItemId: activeGoodsItem.materialItemId,
 | 
	
		
			
				|  |  | +          newPosition: val,
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +        const res = await stocktaking(params);
 | 
	
		
			
				|  |  | +        console.log("res----------", res);
 | 
	
		
			
				|  |  | +        if (res.code === 200) {
 | 
	
		
			
				|  |  | +          uni.$u.toast(res.msg);
 | 
	
		
			
				|  |  | +          this.onRefresh();
 | 
	
		
			
				|  |  | +          this.actionPop.showCategoryPop = false;
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          uni.$u.toast(res.data);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      } catch (error) {}
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    handleCheck2(item) {
 | 
	
		
			
				|  |  | -      uni.showToast({
 | 
	
		
			
				|  |  | -        title: "开始盘点2",
 | 
	
		
			
				|  |  | -        icon: "none",
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | +    handleCheck(item) {
 | 
	
		
			
				|  |  | +      this.actionPop.showNumPop = true;
 | 
	
		
			
				|  |  | +      this.actionPop.activeGoodsItem = { ...item };
 | 
	
		
			
				|  |  | +      this.actionPop.maxCount = item.inventory;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    async handleConfirmNum(val) {
 | 
	
		
			
				|  |  | +      console.log(111223, val);
 | 
	
		
			
				|  |  | +      const activeGoodsItem = this.actionPop.activeGoodsItem;
 | 
	
		
			
				|  |  | +      console.log("activeGoodsItem========", activeGoodsItem);
 | 
	
		
			
				|  |  | +      try {
 | 
	
		
			
				|  |  | +        const params = {
 | 
	
		
			
				|  |  | +          id: activeGoodsItem.id,
 | 
	
		
			
				|  |  | +          materialItemId: activeGoodsItem.materialItemId,
 | 
	
		
			
				|  |  | +          newInventory: val,
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +        const res = await stocktaking(params);
 | 
	
		
			
				|  |  | +        console.log("res----------", res);
 | 
	
		
			
				|  |  | +        if (res.code === 200) {
 | 
	
		
			
				|  |  | +          uni.$u.toast(res.msg);
 | 
	
		
			
				|  |  | +          this.onRefresh();
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          uni.$u.toast(res.data);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      } catch (error) {}
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    // 盘点提交
 | 
	
		
			
				|  |  | +    submit() {},
 | 
	
		
			
				|  |  |      handleFilterConfirm(values) {
 | 
	
		
			
				|  |  | -      this.defaultFilterValues = values;
 | 
	
		
			
				|  |  | +      console.log("handleFilterConfirm======", values);
 | 
	
		
			
				|  |  | +      this.queryFilterValues = values;
 | 
	
		
			
				|  |  |        this.filterPopupVisible = false;
 | 
	
		
			
				|  |  | +      this.onRefresh();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |  };
 | 
	
	
		
			
				|  | @@ -339,18 +442,27 @@ export default {
 | 
	
		
			
				|  |  |      background-color: #fff;
 | 
	
		
			
				|  |  |      padding: 16rpx 32rpx;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    .info-item-box {
 | 
	
		
			
				|  |  | +      display: flex;
 | 
	
		
			
				|  |  | +      justify-content: space-between;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      .info-item {
 | 
	
		
			
				|  |  |        display: flex;
 | 
	
		
			
				|  |  |        font-size: 28rpx;
 | 
	
		
			
				|  |  |        margin-bottom: 10rpx;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +      &.page-title {
 | 
	
		
			
				|  |  | +        color: #333;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |        .info-label {
 | 
	
		
			
				|  |  | -        color: #666;
 | 
	
		
			
				|  |  | +        color: #999;
 | 
	
		
			
				|  |  |          margin-right: 8rpx;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        .info-value {
 | 
	
		
			
				|  |  | -        color: #333;
 | 
	
		
			
				|  |  | +        flex: 1;
 | 
	
		
			
				|  |  | +        color: #999;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -362,7 +474,7 @@ export default {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        .progress-label {
 | 
	
		
			
				|  |  |          font-size: 28rpx;
 | 
	
		
			
				|  |  | -        color: #666;
 | 
	
		
			
				|  |  | +        color: #999;
 | 
	
		
			
				|  |  |          display: block;
 | 
	
		
			
				|  |  |          margin-bottom: 16rpx;
 | 
	
		
			
				|  |  |        }
 | 
	
	
		
			
				|  | @@ -372,11 +484,15 @@ export default {
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        .progress-value {
 | 
	
		
			
				|  |  | +        color: #999;
 | 
	
		
			
				|  |  |          font-size: 24rpx;
 | 
	
		
			
				|  |  | -        color: #4080ff;
 | 
	
		
			
				|  |  |          display: block;
 | 
	
		
			
				|  |  |          text-align: right;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      .finished-value {
 | 
	
		
			
				|  |  | +        color: #4080ff;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -414,7 +530,6 @@ export default {
 | 
	
		
			
				|  |  |          display: flex;
 | 
	
		
			
				|  |  |          align-items: center;
 | 
	
		
			
				|  |  |          padding: 24rpx 32rpx;
 | 
	
		
			
				|  |  | -        border-bottom: 1px solid #f5f6f7;
 | 
	
		
			
				|  |  |          gap: 40rpx;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          .location-left {
 | 
	
	
		
			
				|  | @@ -467,6 +582,7 @@ export default {
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |            .goods-name {
 | 
	
		
			
				|  |  | +            width: 100%;
 | 
	
		
			
				|  |  |              font-size: 28rpx;
 | 
	
		
			
				|  |  |              line-height: 1.4;
 | 
	
		
			
				|  |  |              color: #333;
 | 
	
	
		
			
				|  | @@ -511,12 +627,8 @@ export default {
 | 
	
		
			
				|  |  |              font-size: 24rpx;
 | 
	
		
			
				|  |  |              color: #333;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            &-zero {
 | 
	
		
			
				|  |  | -              color: #999;
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |              &-warning {
 | 
	
		
			
				|  |  | -              color: #ff9900;
 | 
	
		
			
				|  |  | +              color: #ff4e02;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -529,7 +641,7 @@ export default {
 | 
	
		
			
				|  |  |          gap: 24rpx;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          .action-btn {
 | 
	
		
			
				|  |  | -          width: 140rpx;
 | 
	
		
			
				|  |  | +          width: 144rpx;
 | 
	
		
			
				|  |  |            height: 56rpx;
 | 
	
		
			
				|  |  |            padding: 0;
 | 
	
		
			
				|  |  |  
 |