gaoluyang
2026-06-01 ab8ff90598b99b1b88b925c03e82e20ff0426fcf
src/views/inventoryManagement/stockManagement/Record.vue
@@ -113,12 +113,18 @@
                         show-overflow-tooltip />
        <el-table-column fixed="right"
                         label="操作"
                         min-width="80"
                         min-width="190"
                         align="center">
          <template #default="scope">
            <el-button link
                       type="primary"
                       @click="showDetailModal(scope.row)">详情</el-button>
            <el-button link
                       type="success"
                       @click="showBindDeviceModal(scope.row)">绑定设备</el-button>
            <el-button link
                       type="info"
                       @click="showIotDataModal(scope.row)">查看数采</el-button>
          </template>
        </el-table-column>
      </el-table>
@@ -156,6 +162,15 @@
                                     :operation-type="operationType"
                                     :type="record.stockType"
                                     @completed="handleQuery" />
    <!-- 绑定物联设备 -->
    <bind-device-dialog v-if="isShowBindDeviceModal"
                        v-model:visible="isShowBindDeviceModal"
                        :record="record"
                        @completed="handleQuery" />
    <!-- 查看物联设备数采 -->
    <iot-data-dialog v-if="isShowIotDataModal"
                     v-model:visible="isShowIotDataModal"
                     :record="record" />
  </div>
</template>
@@ -187,6 +202,12 @@
  const BatchNoQtyDetail = defineAsyncComponent(() =>
    import("@/views/inventoryManagement/stockManagement/BatchNoQtyDetail.vue")
  );
  const BindDeviceDialog = defineAsyncComponent(() =>
    import("@/views/inventoryManagement/stockManagement/BindDeviceDialog.vue")
  );
  const IotDataDialog = defineAsyncComponent(() =>
    import("@/views/inventoryManagement/stockManagement/IotDataDialog.vue")
  );
  const { proxy } = getCurrentInstance();
  const tableData = ref([]);
  const selectedRows = ref([]);
@@ -209,6 +230,10 @@
  const operationType = ref("frozen");
  // 是否显示导入弹框
  const isShowImportModal = ref(false);
  // 是否显示绑定设备弹框
  const isShowBindDeviceModal = ref(false);
  // 是否显示物联数采弹框
  const isShowIotDataModal = ref(false);
  const data = reactive({
    searchForm: {
      productName: "",
@@ -308,6 +333,18 @@
    operationType.value = "thaw";
  };
  // 点击绑定设备
  const showBindDeviceModal = row => {
    record.value = row;
    isShowBindDeviceModal.value = true;
  };
  // 点击查看数采
  const showIotDataModal = row => {
    record.value = row;
    isShowIotDataModal.value = true;
  };
  // 表格选择数据
  const handleSelectionChange = selection => {
    // 过滤掉子数据