import { formatTime, formatDate, formatDateTime, BASE_URL ,getHeaders} from './index.js'; // 引入时间格式化函数和BASE_URL

//分页请求固定资产盘点信息
export function fetchAssetInventory(pageNum, pageSize) {
  return new Promise((resolve, reject) => {
    uni.request({
      url: `${BASE_URL}/api/asset/inventory/page?pageNum=${pageNum}&pageSize=${pageSize}`,
      method: 'POST',
      data: {
        query: {},
      },

      header: getHeaders(),

      success: (res) => {
        if (res.statusCode === 200) {
          resolve(res.data); // 根据你的接口返回结构调整
        } else {
          reject(res);
        }
      },
      fail: (err) => {
        reject(err);
      }
    });
  });
}

