123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- import { axios } from '@/utils/request'
- // 销售退货 审核
- export const salesReturnAudit = (params) => {
- return axios({
- url: `/salesReturn/audit/${params.sn}`,
- method: 'get',
- headers:{
- 'module': encodeURIComponent('审核')
- }
- })
- }
- // 销售退货 删除
- export const salesReturnDel = (params) => {
- return axios({
- url: `/salesReturn/delete/${params.sn}`,
- method: 'get',
- headers:{
- 'module': encodeURIComponent('删除')
- }
- })
- }
- // 销售退货明细 删除
- export const salesReturnDetailDel = (params) => {
- return axios({
- url: `/salesReturn/detail/delete/${params.id}`,
- method: 'get',
- headers:{
- 'module': encodeURIComponent('删除')
- }
- })
- }
- // 销售退货明细 清空列表
- export const salesReturnDelAll = (params) => {
- return axios({
- url: `/salesReturn/detail/deleteAll/${params.sn}`,
- method: 'get',
- headers:{
- 'module': encodeURIComponent('清空列表')
- }
- })
- }
- // 销售退货 列表 统计
- export const salesReturnCount = (params) => {
- const url = `/salesReturn/queryCount`
- return axios({
- url: url,
- data: params,
- method: 'post'
- })
- }
- // 明细列表统计,不传sn 是所有统计
- export const salesReturnQueryCount = (params) => {
- const url = `/salesReturn/detail/queryCount`
- return axios({
- url: url,
- data: params,
- method: 'post'
- })
- }
- // 销售退货 分页查询销售退货明细
- export const salesReturnDetailList = (params) => {
- const url = `/salesReturn/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 salesReturnProductList = (params) => {
- const url = `/salesReturn/detail/querySalesBillDetailPage/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('可选产品列表')
- }
- })
- }
- // 产品添加和修改
- export const salesReturnSaveProduct = (params) => {
- return axios({
- url: '/salesReturn/detail/save',
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent(params.id?'修改产品':'添加产品')
- }
- })
- }
- // 退货打折
- export const salesReturnDiscount = (params) => {
- return axios({
- url: '/salesReturn/discount',
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('打折')
- }
- })
- }
- // 销售退货 导出
- export const salesReturnExport = (params) => {
- return axios({
- url: '/salesReturn/export',
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('导出')
- }
- })
- }
- // 根据SN查询销售退货单
- export const salesReturnDetail = (params) => {
- return axios({
- url: `/salesReturn/findBySn/${params.sn}`,
- method: 'get',
- headers:{
- 'module': encodeURIComponent('详情信息')
- }
- })
- }
- // 销售退货 付款
- export const salesReturnPay = (params) => {
- return axios({
- url: '/salesReturn/pay',
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('付款')
- }
- })
- }
- // 销售退货 打印
- export const salesReturnPrint = (params) => {
- return axios({
- url: '/salesReturn/print',
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('打印')
- }
- })
- }
- // 销售退货 打印预览
- export const salesReturnprintPreview = (params) => {
- return axios({
- url: '/salesReturn/printPreview',
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('打印预览')
- }
- })
- }
- // 销售退货 列表分页
- export const salesReturnList = (params) => {
- const url = `/salesReturn/queryPage/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent('列表查询')
- }
- })
- }
- // 销售退货单保存
- export const salesReturnSave = (params) => {
- return axios({
- url: '/salesReturn/save',
- data: params,
- method: 'post',
- headers:{
- 'module': encodeURIComponent(params.id?'编辑基础信息':'新增')
- }
- })
- }
- // 销售退货 提交
- export const salesReturnSubmit = (params) => {
- return axios({
- url: `/salesReturn/submit/${params.sn}`,
- method: 'get',
- headers:{
- 'module': encodeURIComponent('提交')
- }
- })
- }
- // 销售退货 详情 打印
- export const salesReturnDetailPrint = params => {
- const data = {
- url: `salesReturn/print/${params.sn}/${params.type}`,
- method: 'get',
- headers:{
- 'module': encodeURIComponent(params.type=='INK' ? '喷墨打印':'针式打印')
- }
- }
- // 喷墨打印
- if(params.type=='INK'){
- data.responseType = 'blob'
- }
- return axios.request(data)
- }
- // 销售退货 详情 导出
- export const salesDetailExport = params => {
- return axios.request({
- url: `salesReturn/excel/${params.sn}`,
- method: 'get',
- responseType: 'blob',
- headers:{
- 'module': encodeURIComponent('导出Excel')
- }
- })
- }
|