123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- import { axios } from '@/utils/request'
- // 客户列表 分页
- export const custList = (params) => {
- const url = `/cust/queryPage/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('客户列表查询')
- }
- })
- }
- // 客户列表 不分页
- export const custAllList = (params) => {
- return axios({
- url: `/cust/queryList`,
- data: {},
- method: 'post',
- headers: {
- 'module': encodeURIComponent('客户列表查询')
- }
- })
- }
- // 新增/编辑客户
- export const custSave = params => {
- return axios({
- url: '/cust/save',
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent(!params.id ? '新增' : '编辑')
- }
- })
- }
- // 根据sn修改客户信息
- export const updateByCustomerSn = params => {
- return axios({
- url: '/cust/updateByCustomerSn',
- data: params,
- method: 'post'
- })
- }
- // 客户详情
- export const custFindById = params => {
- return axios({
- url: `/cust/findById/${params.id}`,
- data: {},
- method: 'get',
- headers: {
- 'module': encodeURIComponent('客户详情')
- }
- })
- }
- // 删除客户
- export const custDel = params => {
- return axios({
- url: `/cust/delete/${params.id}`,
- data: {},
- method: 'get',
- headers: {
- 'module': encodeURIComponent('删除')
- }
- })
- }
- // 收款方式 下拉
- export const settleStyleFindAllList = (params) => {
- return axios({
- url: `/settleStyle/findAll`,
- data: {},
- method: 'post',
- headers: {
- 'module': encodeURIComponent('收款方式列表')
- }
- })
- }
- // 启用禁用
- export const updateEnableStatus = params => {
- return axios({
- url: `/cust/enable/${params.id}/${params.flag}`,
- data: {},
- method: 'get',
- headers: {
- 'module': encodeURIComponent(params.flag == 0 ? '禁用' : '启用')
- }
- })
- }
- // 客户合并
- export const custMerge = params => {
- return axios({
- url: '/cust/merge',
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('合并客户')
- }
- })
- }
- // 合并记录分页
- export const custMergeLogList = (params) => {
- const url = `/cust/queryMergeLogPage/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post',
- headers: {
- 'module': encodeURIComponent('列表查询')
- }
- })
- }
|