123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- import { axios } from '@/utils/request'
- // 采购退货申请单列表 分页
- export const purchaseReturnList = (params) => {
- const url = `/purchaseReturnApply/queryPage/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('列表查询')
- }
- })
- }
- // 申请单新增
- export const purchaseReturnSave = (params) => {
- return axios({
- url: '/purchaseReturnApply/create',
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('新增')
- }
- })
- }
- // 采购退货申请单 删除
- export const purchaseReturnDel = (params) => {
- return axios({
- url: `/purchaseReturnApply/delete`,
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('删除')
- }
- })
- }
- // 生成采购退货单
- export const createPurchaseReturnBill = (params) => {
- return axios({
- url: `/purchaseReturnApply/createPurchaseReturnBill`,
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('生成采购退货单')
- }
- })
- }
- // 选择产品列表
- export const queryDealerScopeProductPage = (params) => {
- const url = `/purchaseReturnApply/queryDealerScopeProductPage/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('可选产品列表')
- }
- })
- }
- // 采购退货 详情 添加产品
- export const purchaseReturnDetailSave = (params) => {
- return axios({
- url: '/purchaseReturnApply/detail/create',
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('添加')
- }
- })
- }
- // 采购退货申请单 详情 删除
- export const purchaseReturnDetailDel = (params) => {
- return axios({
- url: `/purchaseReturnApply/detail/delete`,
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('删除')
- }
- })
- }
- // 采购退货 详情 全部删除
- export const purchaseReturnDetailDelAll = (params) => {
- return axios({
- url: `/purchaseReturnApply/detail/deleteAll`,
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('清空列表')
- }
- })
- }
- // 申请单详情修改数量
- export const purchaseReturnModifyQty = (params) => {
- return axios({
- url: `/purchaseReturnApply/detail/modifyQty`,
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('修改数量')
- }
- })
- }
- // 申请单详情修改退货原因
- // 修改备注
- export const modifyReturnInfo = (params) => {
- return axios({
- url: `/purchaseReturnApply/detail/modifyInfo`,
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent(params.returnReason ? '修改退货原因' : '修改备注')
- }
- })
- }
- // 批量修改退货原因
- export const modifyReturnReasonList = (params) => {
- return axios({
- url: `/purchaseReturnApply/detail/modifyInfoList`,
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('批量设置退货原因')
- }
- })
- }
- // 申请单详情列表 分页
- export const purchaseReturnDetailList = (params) => {
- const url = `/purchaseReturnApply/detail/queryPage/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('明细列表')
- }
- })
- }
- // 获取采购退货申请单 详情
- export const purchaseReturnDetail = (params) => {
- return axios({
- url: `/purchaseReturnApply/findBySn/${params.sn}`,
- method: 'get',
- headers:{
- 'module': encodeURIComponent('详情')
- }
- })
- }
- // 采购退货申请单提交
- export const purchaseReturnSubmit = (params) => {
- return axios({
- url: `/purchaseReturnApply/submit/${params.sn}`,
- method: 'get',
- headers:{
- 'module': encodeURIComponent('提交')
- }
- })
- }
- // 采购退货申请单再次编辑
- export const purchaseReturnAgainCreate = (params) => {
- return axios({
- url: `/purchaseReturnApply/againCreate/${params.sn}`,
- method: 'get',
- headers:{
- 'module': encodeURIComponent('再次编辑')
- }
- })
- }
- // 导出删除项
- export const exportDeleteExcel = (params) => {
- return axios({
- url: `/purchaseReturnApply/detail/downloadDeleteFailExcel/${params.sn}`,
- data: params,
- method: 'post',
- responseType: 'blob',
- headers:{
- 'module': encodeURIComponent('导出删除项')
- }
- })
- }
- // 导出错误项
- export const exportErrorExcel = (params) => {
- return axios({
- url: `/purchaseReturnApply/detail/downloadFailExcel`,
- data: params,
- method: 'post',
- responseType: 'blob',
- headers:{
- 'module': encodeURIComponent('导出错误项')
- }
- })
- }
- // 解析产品的导入模板
- export const purchaseReturnApplyReadExcel = (params) => {
- return axios({
- url: `/purchaseReturnApply/detail/readExcel`,
- data: params,
- method: 'post'
- })
- }
- // 批量导入产品
- export const purchaseReturnApplyCreateList = (params) => {
- return axios({
- url: `/purchaseReturnApply/detail/createList`,
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('导入产品')
- }
- })
- }
- // 导出明细
- export const purchaseReturnApplyExport = (params) => {
- return axios({
- url: `/purchaseReturnApply/excel/${params.sn}`,
- method: 'get',
- responseType: 'blob',
- headers:{
- 'module': encodeURIComponent('导出Excel')
- }
- })
- }
- // 详情 打印
- export const purchaseReturnApplyPrint = params => {
- const data = {
- url: `/purchaseReturnApply/print/${params.sn}/${params.type}`,
- method: 'get',
- headers:{
- 'module': encodeURIComponent(params.type == 'INK' ? '喷墨打印' : '针式打印')
- }
- }
- // 喷墨打印
- if (params.type == 'INK') {
- data.responseType = 'blob'
- }
- return axios(data)
- }
|