import request from '@/utils/request'
import qs from 'qs'
import { baseUrl } from "../../../config/baseUrl";
import {upcloud_base_common} from "@/config/serviceSettings";

export const api = {
    queryDictList: upcloud_base_common + '/dict/listbytype',
    
    queryAreaInfo: baseUrl + '/print/v1.0/queryAreaInfo',

    queryRoomInfo: baseUrl + '/print/v1.0/queryRoomInfo',

    getInstockLabelPrintDataNew: baseUrl + '/print/v1.0/getInstockLabelPrintDataNew',


  querySubList: baseUrl + '/print/v1.0/getRqcDetails',
  getRqcInstockLabelPrintData: baseUrl + '/print/v1.0/getRqcInstockLabelPrintData	',
  getRqcDetailsPrintData: baseUrl + '/print/v1.0/getRqcDetailsPrintData',

};

export function queryAreaInfo(parameter) {
    return request({
      method: 'get',
      url: api.queryAreaInfo,
      params: parameter,
    })
  }

export function queryRoomInfo(parameter) {
    return request({
      method: 'get',
      url: api.queryRoomInfo,
      params: parameter,
    })
  }


export function querySubList(parameter) {
  return request({
    method: 'get',
    url: api.querySubList,
    params: parameter,
  })
}
//汇总单打印
export function getInstockLabelPrintDataNew(parameter) {
  return request({
    method: 'get',
    url: api.getInstockLabelPrintDataNew,
    params: parameter,
  })
}
// 标签打印
export function getRqcInstockLabelPrintData(parameter) {
  return request({
    method: 'post',
    url: api.getRqcInstockLabelPrintData,
    data: parameter,
  })
}
// 明细打印
export function getRqcDetailsPrintData(parameter) {
  return request({
    method: 'post',
    url: api.getRqcDetailsPrintData,
    data: parameter,
  })
}