123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559 |
- import { axios } from '@/utils/request'
- // 销售 统计查询
- export const salesCount = (params) => {
- return axios({
- url: `/sales/queryCount`,
- data: params,
- method: 'post'
- })
- }
- // 销售 列表 有分页
- export const salesList = (params) => {
- const url = `/sales/queryPage/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('列表查询')
- }
- })
- }
- // 第三方库存
- export const getThirdStockQty = (params) => {
- return axios({
- url: `/sunFulcess/getStockQty`,
- data: params,
- method: 'post'
- })
- }
- // 是否已转采购单
- export const getCreatePurchaseFlag = (params) => {
- return axios({
- url: `/sales/getCreatePurchaseFlag`,
- data: params,
- method: 'post'
- })
- }
- // 转采购单
- export const allCreatePurchase = (params) => {
- return axios({
- url: `/sales/allCreatePurchase`,
- data: params,
- method: 'post'
- })
- }
- // 销售 待转费用单列表 有分页
- export const salesConvertExpenseList = (params) => {
- const url = `/salesPromo/queryBatchConvertExpenseAccountPage/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('待转费用报销单列表')
- }
- })
- }
- // 销售 新增
- export const salesSave = (params) => {
- return axios({
- url: '/sales/insert',
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('新增销售单')
- }
- })
- }
- // 销售 编辑
- export const salesModify = (params) => {
- return axios({
- url: '/sales/modifyWarehouse',
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('修改仓库')
- }
- })
- }
- // 销售 详情bysn
- export const salesDetailBySn = (params) => {
- return axios({
- url: `/sales/findBySn/${params.salesBillSn}`,
- method: 'get'
- })
- }
- // 查询客户名称
- export const salesDetailByNo = (params) => {
- return axios({
- url: `/sales/findBySaleBillNo/${params.salesBillNo}`,
- method: 'get',
- headers: {
- 'module': encodeURIComponent('查询客户信息')
- }
- })
- }
- // 销售 删除
- export const salesDel = (params) => {
- return axios({
- url: `/sales/delete/${params.salesBillSn}`,
- method: 'get',
- headers: {
- 'module': encodeURIComponent('删除')
- }
- })
- }
- // 销售 取消
- export const salesCancle = (params) => {
- return axios({
- url: `/sales/cancle/${params.salesBillSn}`,
- method: 'get',
- headers: {
- 'module': encodeURIComponent('取消')
- }
- })
- }
- // 根据销售单sn查询参加的活动
- export const salesPromoQueryList = (params) => {
- return axios({
- url: `/salesPromo/queryExtList`,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('查询销售单参加的活动统计信息')
- }
- })
- }
- // 销售单活动统计列表-新
- export const salesPromoQueryStatisticsList = (params) => {
- return axios({
- url: `/salesPromo/querySortListBySalesBillSn`,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('查询销售单参加的活动统计信息')
- }
- })
- }
- // 特价规则优先级-新
- export const salesPromoDiscountSort = (params) => {
- return axios({
- url: `/salesPromo/queryStackDiscountPromo/${params.salesBillSn}`,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('特价规则优先级排序')
- }
- })
- }
- // 保存特价排序-新
- export const salesPromoSaveSort = (params) => {
- return axios({
- url: `/salesPromo/updateBatchById`,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('保存特价活动排序')
- }
- })
- }
- // 更换促销,可更换活动列表
- export const salesPromoMatchProduct = (params) => {
- return axios({
- url: `/salesPromo/queryMatchProduct`,
- data: params,
- method: 'post'
- })
- }
- // 判断是否有新的活动
- export const salesQueryUnPartPromo = (params) => {
- return axios({
- url: `/salesPromo/queryUnPartPromo/${params.salesBillSn}`,
- data: params,
- method: 'post'
- })
- }
- // 活动优惠明细接口
- export const salesPromoQueryCount = (params) => {
- return axios({
- url: `/salesPromo/queryCount`,
- data: params,
- method: 'post'
- })
- }
- // 提交时活动规则校验
- export const salesPromoValidaSubmit = (params) => {
- return axios({
- url: `/salesPromo/validationSubmit/${params.salesBillSn}`,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('提交前活动规则校验')
- }
- })
- }
- // 审核时活动规则校验
- export const salesPromoValidaAudit = (params) => {
- return axios({
- url: `/salesPromo/validationAudit/${params.salesBillSn}`,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('审核前活动规则校验')
- }
- })
- }
- // 销售 审核通过
- export const salesWriteAuditPass = (params) => {
- return axios({
- url: '/sales/auditPass',
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('审核通过')
- }
- })
- }
- // 销售 审核驳回
- export const salesWriteAuditReject = (params) => {
- return axios({
- url: '/sales/auditReject',
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('审核驳回')
- }
- })
- }
- // 销售 审核通过 待上级审核
- export const salesWriteUpAuditPass = (params) => {
- return axios({
- url: '/sales/upAuditPass',
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('审核通过,待上级审核')
- }
- })
- }
- // 销售 一键审核下推
- export const salesWriteAuditPush = (params) => {
- return axios({
- url: '/sales/auditPush',
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('一键审核')
- }
- })
- }
- // 销售 提交
- export const salesWriteSubmit = (params) => {
- return axios({
- url: '/sales/submit',
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('提交')
- }
- })
- }
- // 是否更新价格判断
- export const submitCheck = (params) => {
- return axios({
- url: '/sales/submitCheck',
- method: 'post',
- data: params
- })
- }
- // 改单弹窗价格列表
- export const changeBillCheck = (params) => {
- return axios({
- url: '/sales/changeBillCheck',
- method: 'post',
- data: params
- })
- }
- // 更新改单数据
- export const changeBillCheckUpdatePrice = (params) => {
- return axios({
- url: '/sales/changeBillCheckUpdatePrice',
- method: 'post',
- data: params
- })
- }
- // 当前价格 提交
- export const updateBatch = (params) => {
- return axios({
- url: '/sales/detail/updateBatch',
- method: 'post',
- data: params,
- headers: {
- 'module': encodeURIComponent('价格批量更新')
- }
- })
- }
- // 销售详情列表所有包括活动产品不分页
- export const salesDetailAllList = (params) => {
- const url = `/sales/detail/queryAll`
- return axios({
- url: url,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('销售单明细列表查询')
- }
- })
- }
- // 查询可生成的费用报销单
- export const queryCreateBySalesBillSn = (params) => {
- return axios({
- url: `/expenseAccount/queryCreateBySalesBillSn/${params.salesBillSn}`,
- data: params,
- method: 'post'
- })
- }
- // 批量查询可生成的费用报销单
- export const queryBatchCreateBySalesBillSn = (params) => {
- return axios({
- url: `/expenseAccount/queryBatchCreateBySalesPromoSnList`,
- data: params,
- method: 'post'
- })
- }
- // 批量查询合并后的报销单
- export const queryBatchCreateBySalesPromoSnListGroupType = (params) => {
- return axios({
- url: `/expenseAccount/queryBatchCreateBySalesPromoSnListGroupType`,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('销售单合并后转费用报销单')
- }
- })
- }
- // 保存合并选项
- export const expenseAccountSaveGroupType = (params) => {
- return axios({
- url: `/expenseAccount/saveCreateGroupType`,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('销售单转费用报销单,确定合并')
- }
- })
- }
- // 保存费用报销单
- export const expenseAccountSave = (params) => {
- return axios({
- url: `/expenseAccount/saveCreate`,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('转费用报销单')
- }
- })
- }
- // 销售 打印
- export const salesPrint = (params) => {
- return axios({
- url: '/sales/print',
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('销售打印')
- }
- })
- }
- // 销售 打印预览
- export const salesPrintPreview = (params) => {
- return axios({
- url: '/sales/printPreview',
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('销售打印预览')
- }
- })
- }
- // 销售 详情 该销售单的产品二级分类
- export const salesDetailProductType = (params) => {
- return axios({
- url: `/sales/detail/queryProductType/${params.sn}`,
- method: 'get'
- })
- }
- // 销售 详情 打印
- export const salesDetailPrint = params => {
- const url = `/sales/print/${params.priceType}`
- const id = params.priceType.indexOf('_TYPE') >= 0 ? '销售分类打印' : '销售打印'
- delete params.priceType
- return axios.request({
- url: url,
- data: params,
- method: 'post',
- responseType: 'blob',
- headers: {
- 'module': encodeURIComponent(id)
- }
- })
- }
- // 销售 详情 导出
- export const salesDetailExcel = params => {
- const url = `/sales/excel/${params.priceType}`
- delete params.priceType
- return axios.request({
- url: url,
- data: params,
- method: 'post',
- responseType: 'blob',
- headers: {
- 'module': encodeURIComponent('导出Excel')
- }
- })
- }
- // 销售 详情 分类导出
- export const salesDetailTypeExcel = params => {
- const url = `/sales/detail/typeExcel`
- return axios.request({
- url: url,
- data: params,
- method: 'post',
- responseType: 'blob',
- headers: {
- 'module': encodeURIComponent('销售分类导出')
- }
- })
- }
- // 仓库销售单
- // 按仓库查询销售单 列表 有分页
- export const queryPageForWarehouse = (params) => {
- const url = `/sales/queryPageForWarehouse/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('列表查询')
- }
- })
- }
- // 获取按仓库查询销售单数量
- export const queryCountForWarehouse = (params) => {
- return axios({
- url: '/sales/queryCountForWarehouse',
- method: 'post',
- data: params
- })
- }
- // 按仓库查询销售明细 列表
- export const queryPageForWarehouseDetail = (params) => {
- const url = `/sales/detail/queryPageForWarehouse/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('明细列表查询')
- }
- })
- }
- // 获取按仓库查询销售单明细数量
- export const queryCountForWarehouseDetail = (params) => {
- return axios({
- url: '/sales/detail/queryCountForWarehouse',
- method: 'post',
- data: params
- })
- }
- // 按仓库导出销售单
- export const exportForWarehouse = params => {
- const url = `/sales/exportForWarehouse`
- return axios.request({
- url: url,
- data: params,
- method: 'post',
- responseType: 'blob',
- headers: {
- 'module': encodeURIComponent('导出')
- }
- })
- }
- // 销售一览表 列表
- export const salesOverviewQueryPage = (params) => {
- const url = `/salesOverview/queryPage/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('列表查询')
- }
- })
- }
- // 累计产品选择列表
- export const salesDetailQueryBorrowPageList = (params) => {
- const url = `/sales/detail/queryWaitBorrowPage/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('选择累计产品列表')
- }
- })
- }
- // 导入累计产品
- export const salesDetailImportBorrow = (params) => {
- return axios.request({
- url: '/sales/detail/importBorrow',
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('导入累计产品')
- }
- })
- }
- //查看累计、同款产品 买赠产品列表
- export const queryRegularProductShortfallList = (params) => {
- return axios.request({
- url: '/salesPromo/queryRegularProductShortfallList',
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('买赠产品列表')
- }
- })
- }
|