Merge branch 'dev' of https://git.yfgame.vip/r/hangtag into dev
This commit is contained in:
commit
afa22d2286
|
|
@ -12,6 +12,8 @@ public interface ErrorCodeConstants extends cn.hangtag.module.system.enums.Erro
|
|||
ErrorCode SALE_ORDER_NOT_EXISTS = new ErrorCode(3600, "OMS销售订单主表不存在");
|
||||
ErrorCode SALE_ORDER_ENTRY_NOT_EXISTS = new ErrorCode(3700, "OMS销售订单明细不存在");
|
||||
ErrorCode CUSTOMER_BRAND_NOT_EXISTS = new ErrorCode(3800, "客户和品牌关联不存在");
|
||||
ErrorCode PRODUCT_CARE_ITEM_NOT_EXISTS = new ErrorCode(3800, "产品保养项 不存在");
|
||||
ErrorCode PRODUCT_CARE_ITEM_NOT_EXISTS = new ErrorCode(3900, "产品保养项 不存在");
|
||||
ErrorCode PRODUCE_ORDER_NOT_EXISTS = new ErrorCode(4000, "生产制单不存在");
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,11 @@ import cn.hangtag.framework.security.core.util.SecurityFrameworkUtils;
|
|||
import cn.hangtag.module.oms.controller.admin.brand.vo.BrandListReqVO;
|
||||
import cn.hangtag.module.oms.controller.admin.brand.vo.BrandSimpleRespVO;
|
||||
import cn.hangtag.module.oms.dal.dataobject.brand.BrandDO;
|
||||
import cn.hangtag.module.oms.dal.dataobject.customer.CustomerDO;
|
||||
import cn.hangtag.module.oms.dal.dataobject.customerbrand.CustomerBrandDO;
|
||||
import cn.hangtag.module.oms.service.brand.BrandService;
|
||||
import cn.hangtag.module.oms.service.customer.CustomerService;
|
||||
import cn.hangtag.module.oms.service.customerbrand.CustomerBrandService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
|
@ -18,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.hangtag.framework.common.pojo.CommonResult.success;
|
||||
|
|
@ -31,14 +36,28 @@ public class AppBrandController {
|
|||
@Resource
|
||||
private BrandService brandService;
|
||||
|
||||
@Resource
|
||||
private CustomerService customerService;
|
||||
|
||||
@Resource
|
||||
private CustomerBrandService customerBrandService;
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping({"/list-all-simple", "simple-list"})
|
||||
@Operation(summary = "获取品牌精简信息列表", description = "只包含被开启的菜单,用于【客户分配品牌】功能的选项。" +
|
||||
"在多租户的场景下,会只返回租户所在套餐有的菜单")
|
||||
public CommonResult<List<BrandSimpleRespVO>> getSimpleBrandList() {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
CustomerDO customer = customerService.getCustomerByUserId(loginUser.getId());
|
||||
List<CustomerBrandDO> listByCustomerId = customerBrandService.getListByCustomerId(customer.getId());
|
||||
List<Long> brandIds = new ArrayList<>();
|
||||
for (CustomerBrandDO customerBrandDO : listByCustomerId) {
|
||||
brandIds.add(customerBrandDO.getBrandId());
|
||||
}
|
||||
List<BrandDO> list = brandService.getBrandList(
|
||||
new BrandListReqVO().setStatus(CommonStatusEnum.ENABLE.getStatus()));
|
||||
new BrandListReqVO().setStatus(CommonStatusEnum.ENABLE.getStatus()).setIds(brandIds));
|
||||
return success(BeanUtils.toBean(list, BrandSimpleRespVO.class));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import cn.hangtag.framework.common.pojo.CommonResult;
|
|||
import cn.hangtag.framework.common.pojo.PageResult;
|
||||
import cn.hangtag.framework.common.util.object.BeanUtils;
|
||||
import cn.hangtag.framework.ip.core.utils.AreaUtils;
|
||||
import cn.hangtag.framework.security.core.LoginUser;
|
||||
import cn.hangtag.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.hangtag.module.oms.controller.admin.customer.vo.CustomerPageReqVO;
|
||||
import cn.hangtag.module.oms.controller.admin.customer.vo.CustomerRespVO;
|
||||
import cn.hangtag.module.oms.dal.dataobject.customer.CustomerDO;
|
||||
|
|
@ -45,10 +47,9 @@ public class AppCustomerController {
|
|||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得客户")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('oms:customer:query')")
|
||||
public CommonResult<CustomerRespVO> getCustomer(@RequestParam("id") Long id) {
|
||||
CustomerDO customer = customerService.getCustomer(id);
|
||||
public CommonResult<CustomerRespVO> getCustomer() {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
CustomerDO customer = customerService.getCustomerByUserId(loginUser.getId());
|
||||
return success(buildClueDetail(customer));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,16 @@ package cn.hangtag.module.oms.controller.admin.brand.vo;
|
|||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 菜单列表 Request VO")
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 品牌列表 Request VO")
|
||||
@Data
|
||||
public class BrandListReqVO {
|
||||
|
||||
@Schema(description = "菜单名称,模糊匹配", example = "芋道")
|
||||
@Schema(description = "品牌ID,模糊匹配", example = "芋道")
|
||||
private List<Long> ids;
|
||||
|
||||
@Schema(description = "品牌名称,模糊匹配", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
|
|
|
|||
|
|
@ -38,6 +38,14 @@ public class CustomerRespVO {
|
|||
@ExcelProperty("联系人手机号")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "跟单员")
|
||||
@ExcelProperty("跟单员")
|
||||
private String gdperson;
|
||||
|
||||
@Schema(description = "销售员")
|
||||
@ExcelProperty("销售员")
|
||||
private String saleperson;
|
||||
|
||||
@Schema(description = "所属地区", example = "1024")
|
||||
@ExcelProperty("所属地区")
|
||||
private Integer areaId;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,12 @@ public class CustomerSaveReqVO {
|
|||
@Schema(description = "联系人手机号")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "跟单员")
|
||||
private String gdperson;
|
||||
|
||||
@Schema(description = "销售员")
|
||||
private String saleperson;
|
||||
|
||||
@Schema(description = "所属地区")
|
||||
private Integer areaId;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,95 @@
|
|||
package cn.hangtag.module.oms.controller.admin.produceorder;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.hangtag.framework.common.pojo.PageParam;
|
||||
import cn.hangtag.framework.common.pojo.PageResult;
|
||||
import cn.hangtag.framework.common.pojo.CommonResult;
|
||||
import cn.hangtag.framework.common.util.object.BeanUtils;
|
||||
import static cn.hangtag.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.hangtag.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.hangtag.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.hangtag.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.hangtag.module.oms.controller.admin.produceorder.vo.*;
|
||||
import cn.hangtag.module.oms.dal.dataobject.produceorder.ProduceOrderDO;
|
||||
import cn.hangtag.module.oms.service.produceorder.ProduceOrderService;
|
||||
|
||||
@Tag(name = "管理后台 - 生产制单")
|
||||
@RestController
|
||||
@RequestMapping("/oms/produce-order")
|
||||
@Validated
|
||||
public class ProduceOrderController {
|
||||
|
||||
@Resource
|
||||
private ProduceOrderService produceOrderService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建生产制单")
|
||||
@PreAuthorize("@ss.hasPermission('oms:produce-order:create')")
|
||||
public CommonResult<Long> createProduceOrder(@Valid @RequestBody ProduceOrderSaveReqVO createReqVO) {
|
||||
return success(produceOrderService.createProduceOrder(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新生产制单")
|
||||
@PreAuthorize("@ss.hasPermission('oms:produce-order:update')")
|
||||
public CommonResult<Boolean> updateProduceOrder(@Valid @RequestBody ProduceOrderSaveReqVO updateReqVO) {
|
||||
produceOrderService.updateProduceOrder(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除生产制单")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('oms:produce-order:delete')")
|
||||
public CommonResult<Boolean> deleteProduceOrder(@RequestParam("id") Long id) {
|
||||
produceOrderService.deleteProduceOrder(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得生产制单")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('oms:produce-order:query')")
|
||||
public CommonResult<ProduceOrderRespVO> getProduceOrder(@RequestParam("id") Long id) {
|
||||
ProduceOrderDO produceOrder = produceOrderService.getProduceOrder(id);
|
||||
return success(BeanUtils.toBean(produceOrder, ProduceOrderRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得生产制单分页")
|
||||
@PreAuthorize("@ss.hasPermission('oms:produce-order:query')")
|
||||
public CommonResult<PageResult<ProduceOrderRespVO>> getProduceOrderPage(@Valid ProduceOrderPageReqVO pageReqVO) {
|
||||
PageResult<ProduceOrderDO> pageResult = produceOrderService.getProduceOrderPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ProduceOrderRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出生产制单 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('oms:produce-order:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportProduceOrderExcel(@Valid ProduceOrderPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ProduceOrderDO> list = produceOrderService.getProduceOrderPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "生产制单.xls", "数据", ProduceOrderRespVO.class,
|
||||
BeanUtils.toBean(list, ProduceOrderRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package cn.hangtag.module.oms.controller.admin.produceorder.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.hangtag.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.hangtag.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 生产制单分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ProduceOrderPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "单据编号")
|
||||
private String billno;
|
||||
|
||||
@Schema(description = "订单号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "客户编号")
|
||||
private String customerCode;
|
||||
|
||||
@Schema(description = "合约号")
|
||||
private Integer saleContractNo;
|
||||
|
||||
@Schema(description = "报告日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportDate;
|
||||
|
||||
@Schema(description = "生产日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] produceDate;
|
||||
|
||||
@Schema(description = "生产线")
|
||||
private String produceLine;
|
||||
|
||||
@Schema(description = "交货方式")
|
||||
private String deliveryMethod;
|
||||
|
||||
@Schema(description = "验货日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] inspectionDate;
|
||||
|
||||
@Schema(description = "交货日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] deliverydate;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
package cn.hangtag.module.oms.controller.admin.produceorder.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 生产制单 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ProduceOrderRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3271")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "单据编号")
|
||||
@ExcelProperty("单据编号")
|
||||
private String billno;
|
||||
|
||||
@Schema(description = "订单号")
|
||||
@ExcelProperty("订单号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "客户编号")
|
||||
@ExcelProperty("客户编号")
|
||||
private String customerCode;
|
||||
|
||||
@Schema(description = "产品名称", example = "王五")
|
||||
@ExcelProperty("产品名称")
|
||||
private String productName;
|
||||
|
||||
@Schema(description = "合约号")
|
||||
@ExcelProperty("合约号")
|
||||
private Integer saleContractNo;
|
||||
|
||||
@Schema(description = "合约日期")
|
||||
@ExcelProperty("合约日期")
|
||||
private LocalDateTime contractDate;
|
||||
|
||||
@Schema(description = "合约数量")
|
||||
@ExcelProperty("合约数量")
|
||||
private Long contractQty;
|
||||
|
||||
@Schema(description = "生产数量")
|
||||
@ExcelProperty("生产数量")
|
||||
private Long produceQty;
|
||||
|
||||
@Schema(description = "交货地点")
|
||||
@ExcelProperty("交货地点")
|
||||
private String deliveryPlace;
|
||||
|
||||
@Schema(description = "职员")
|
||||
@ExcelProperty("职员")
|
||||
private String clerk;
|
||||
|
||||
@Schema(description = "报告日期")
|
||||
@ExcelProperty("报告日期")
|
||||
private LocalDateTime reportDate;
|
||||
|
||||
@Schema(description = "生产日期")
|
||||
@ExcelProperty("生产日期")
|
||||
private LocalDateTime produceDate;
|
||||
|
||||
@Schema(description = "天数")
|
||||
@ExcelProperty("天数")
|
||||
private Long days;
|
||||
|
||||
@Schema(description = "生产线")
|
||||
@ExcelProperty("生产线")
|
||||
private String produceLine;
|
||||
|
||||
@Schema(description = "交货方式")
|
||||
@ExcelProperty("交货方式")
|
||||
private String deliveryMethod;
|
||||
|
||||
@Schema(description = "验货日期")
|
||||
@ExcelProperty("验货日期")
|
||||
private LocalDateTime inspectionDate;
|
||||
|
||||
@Schema(description = "交货日期")
|
||||
@ExcelProperty("交货日期")
|
||||
private LocalDateTime deliverydate;
|
||||
|
||||
@Schema(description = "交货数量")
|
||||
@ExcelProperty("交货数量")
|
||||
private Integer deliveryQty;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package cn.hangtag.module.oms.controller.admin.produceorder.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 生产制单新增/修改 Request VO")
|
||||
@Data
|
||||
public class ProduceOrderSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3271")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "单据编号")
|
||||
private String billno;
|
||||
|
||||
@Schema(description = "订单号")
|
||||
private String orderNo;
|
||||
|
||||
@Schema(description = "客户编号")
|
||||
private String customerCode;
|
||||
|
||||
@Schema(description = "产品id", example = "29732")
|
||||
private Integer productId;
|
||||
|
||||
@Schema(description = "产品编号")
|
||||
private String productCode;
|
||||
|
||||
@Schema(description = "产品名称", example = "王五")
|
||||
private String productName;
|
||||
|
||||
@Schema(description = "合约号")
|
||||
private Integer saleContractNo;
|
||||
|
||||
@Schema(description = "合约日期")
|
||||
private LocalDateTime contractDate;
|
||||
|
||||
@Schema(description = "合约数量")
|
||||
private Long contractQty;
|
||||
|
||||
@Schema(description = "生产数量")
|
||||
private Long produceQty;
|
||||
|
||||
@Schema(description = "交货地点")
|
||||
private String deliveryPlace;
|
||||
|
||||
@Schema(description = "职员")
|
||||
private String clerk;
|
||||
|
||||
@Schema(description = "报告日期")
|
||||
private LocalDateTime reportDate;
|
||||
|
||||
@Schema(description = "生产日期")
|
||||
private LocalDateTime produceDate;
|
||||
|
||||
@Schema(description = "天数")
|
||||
private Long days;
|
||||
|
||||
@Schema(description = "生产线")
|
||||
private String produceLine;
|
||||
|
||||
@Schema(description = "交货方式")
|
||||
private String deliveryMethod;
|
||||
|
||||
@Schema(description = "验货日期")
|
||||
private LocalDateTime inspectionDate;
|
||||
|
||||
@Schema(description = "交货日期")
|
||||
private LocalDateTime deliverydate;
|
||||
|
||||
@Schema(description = "交货数量")
|
||||
private Integer deliveryQty;
|
||||
|
||||
}
|
||||
|
|
@ -51,6 +51,14 @@ public class CustomerDO extends BaseDO {
|
|||
* 联系人手机号
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 跟单员
|
||||
*/
|
||||
private String gdperson;
|
||||
/**
|
||||
* 销售员
|
||||
*/
|
||||
private String saleperson;
|
||||
/**
|
||||
* 所属地区
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,120 @@
|
|||
package cn.hangtag.module.oms.dal.dataobject.produceorder;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.hangtag.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 生产制单 DO
|
||||
*
|
||||
* @author wwb
|
||||
*/
|
||||
@TableName("oms_produce_order")
|
||||
@KeySequence("oms_produce_order_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProduceOrderDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 单据编号
|
||||
*/
|
||||
private String billno;
|
||||
/**
|
||||
* 客户ID
|
||||
*/
|
||||
private Integer customerId;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 客户编号
|
||||
*/
|
||||
private String customerCode;
|
||||
/**
|
||||
* 产品id
|
||||
*/
|
||||
private Integer productId;
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private String productCode;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String productName;
|
||||
/**
|
||||
* 合约号
|
||||
*/
|
||||
private Integer saleContractNo;
|
||||
/**
|
||||
* 合约日期
|
||||
*/
|
||||
private LocalDateTime contractDate;
|
||||
/**
|
||||
* 合约数量
|
||||
*/
|
||||
private Long contractQty;
|
||||
/**
|
||||
* 生产数量
|
||||
*/
|
||||
private Long produceQty;
|
||||
/**
|
||||
* 交货地点
|
||||
*/
|
||||
private String deliveryPlace;
|
||||
/**
|
||||
* 职员
|
||||
*/
|
||||
private String clerk;
|
||||
/**
|
||||
* 报告日期
|
||||
*/
|
||||
private LocalDateTime reportDate;
|
||||
/**
|
||||
* 生产日期
|
||||
*/
|
||||
private LocalDateTime produceDate;
|
||||
/**
|
||||
* 天数
|
||||
*/
|
||||
private Long days;
|
||||
/**
|
||||
* 生产线
|
||||
*/
|
||||
private String produceLine;
|
||||
/**
|
||||
* 交货方式
|
||||
*/
|
||||
private String deliveryMethod;
|
||||
/**
|
||||
* 验货日期
|
||||
*/
|
||||
private LocalDateTime inspectionDate;
|
||||
/**
|
||||
* 交货日期
|
||||
*/
|
||||
private LocalDateTime deliverydate;
|
||||
/**
|
||||
* 交货数量
|
||||
*/
|
||||
private Integer deliveryQty;
|
||||
|
||||
}
|
||||
|
|
@ -31,6 +31,7 @@ public interface BrandMapper extends BaseMapperX<BrandDO> {
|
|||
|
||||
default List<BrandDO> selectList(BrandListReqVO reqVO){
|
||||
return selectList(new LambdaQueryWrapperX<BrandDO>()
|
||||
.in(BrandDO::getId, reqVO.getIds())
|
||||
.likeIfPresent(BrandDO::getName, reqVO.getName()));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package cn.hangtag.module.oms.dal.mysql.produceorder;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.hangtag.framework.common.pojo.PageResult;
|
||||
import cn.hangtag.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.hangtag.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.hangtag.module.oms.dal.dataobject.produceorder.ProduceOrderDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.hangtag.module.oms.controller.admin.produceorder.vo.*;
|
||||
|
||||
/**
|
||||
* 生产制单 Mapper
|
||||
*
|
||||
* @author wwb
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProduceOrderMapper extends BaseMapperX<ProduceOrderDO> {
|
||||
|
||||
default PageResult<ProduceOrderDO> selectPage(ProduceOrderPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ProduceOrderDO>()
|
||||
.eqIfPresent(ProduceOrderDO::getBillno, reqVO.getBillno())
|
||||
.eqIfPresent(ProduceOrderDO::getOrderNo, reqVO.getOrderNo())
|
||||
.eqIfPresent(ProduceOrderDO::getCustomerCode, reqVO.getCustomerCode())
|
||||
.eqIfPresent(ProduceOrderDO::getSaleContractNo, reqVO.getSaleContractNo())
|
||||
.betweenIfPresent(ProduceOrderDO::getReportDate, reqVO.getReportDate())
|
||||
.betweenIfPresent(ProduceOrderDO::getProduceDate, reqVO.getProduceDate())
|
||||
.eqIfPresent(ProduceOrderDO::getProduceLine, reqVO.getProduceLine())
|
||||
.eqIfPresent(ProduceOrderDO::getDeliveryMethod, reqVO.getDeliveryMethod())
|
||||
.betweenIfPresent(ProduceOrderDO::getInspectionDate, reqVO.getInspectionDate())
|
||||
.betweenIfPresent(ProduceOrderDO::getDeliverydate, reqVO.getDeliverydate())
|
||||
.orderByDesc(ProduceOrderDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -63,4 +63,6 @@ public interface CustomerService {
|
|||
*/
|
||||
List<CustomerAddressDO> getCustomerAddressListByCustomerId(Long customerId);
|
||||
|
||||
CustomerDO getCustomerByUserId(Long userId);
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package cn.hangtag.module.oms.service.customer;
|
||||
|
||||
import cn.hangtag.module.system.controller.admin.user.vo.user.UserSaveReqVO;
|
||||
import cn.hangtag.module.system.service.permission.PermissionService;
|
||||
import cn.hangtag.module.system.service.user.AdminUserService;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -41,6 +42,10 @@ public class CustomerServiceImpl implements CustomerService {
|
|||
@Resource
|
||||
private AdminUserService userService;
|
||||
|
||||
@Resource
|
||||
private PermissionService permissionService;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long createCustomer(CustomerSaveReqVO createReqVO) {
|
||||
|
|
@ -55,10 +60,20 @@ public class CustomerServiceImpl implements CustomerService {
|
|||
userSaveReqVO.setPassword(userInitPassword);
|
||||
userSaveReqVO.setDeptId(999999L); // 固定为用户分类
|
||||
Long userId = userService.createUser(userSaveReqVO);
|
||||
|
||||
|
||||
//分配角色
|
||||
Set<Long> roleIds = new HashSet<>();
|
||||
roleIds.add(-999L); // 固定客户角色
|
||||
permissionService.assignUserRole(userId, roleIds);
|
||||
|
||||
customer.setUserId(userId);
|
||||
customerMapper.insert(customer);
|
||||
// 插入子表
|
||||
createCustomerAddressList(customer.getId(), createReqVO.getCustomerAddresss());
|
||||
|
||||
|
||||
|
||||
// 返回
|
||||
return customer.getId();
|
||||
}
|
||||
|
|
@ -112,6 +127,12 @@ public class CustomerServiceImpl implements CustomerService {
|
|||
return customerAddressMapper.selectListByCustomerId(customerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CustomerDO getCustomerByUserId(Long userId) {
|
||||
CustomerDO customerDO = customerMapper.selectOne(CustomerDO::getUserId, userId);
|
||||
return customerDO;
|
||||
}
|
||||
|
||||
private void createCustomerAddressList(Long customerId, List<CustomerAddressDO> list) {
|
||||
list.forEach(o -> o.setCustomerId(customerId));
|
||||
customerAddressMapper.insertBatch(list);
|
||||
|
|
|
|||
|
|
@ -53,4 +53,6 @@ public interface CustomerBrandService {
|
|||
PageResult<CustomerBrandDO> getCustomerBrandPage(CustomerBrandPageReqVO pageReqVO);
|
||||
|
||||
void assignCustomerBrand(Long customerId, Set<Long> brandIds);
|
||||
|
||||
List<CustomerBrandDO> getListByCustomerId(Long customerId);
|
||||
}
|
||||
|
|
@ -104,4 +104,9 @@ public class CustomerBrandServiceImpl implements CustomerBrandService {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CustomerBrandDO> getListByCustomerId(Long customerId) {
|
||||
return customerBrandMapper.selectListByCustomerId(customerId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package cn.hangtag.module.oms.service.produceorder;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.hangtag.module.oms.controller.admin.produceorder.vo.*;
|
||||
import cn.hangtag.module.oms.dal.dataobject.produceorder.ProduceOrderDO;
|
||||
import cn.hangtag.framework.common.pojo.PageResult;
|
||||
import cn.hangtag.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 生产制单 Service 接口
|
||||
*
|
||||
* @author wwb
|
||||
*/
|
||||
public interface ProduceOrderService {
|
||||
|
||||
/**
|
||||
* 创建生产制单
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createProduceOrder(@Valid ProduceOrderSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新生产制单
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateProduceOrder(@Valid ProduceOrderSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除生产制单
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteProduceOrder(Long id);
|
||||
|
||||
/**
|
||||
* 获得生产制单
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 生产制单
|
||||
*/
|
||||
ProduceOrderDO getProduceOrder(Long id);
|
||||
|
||||
/**
|
||||
* 获得生产制单分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 生产制单分页
|
||||
*/
|
||||
PageResult<ProduceOrderDO> getProduceOrderPage(ProduceOrderPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package cn.hangtag.module.oms.service.produceorder;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.hangtag.module.oms.controller.admin.produceorder.vo.*;
|
||||
import cn.hangtag.module.oms.dal.dataobject.produceorder.ProduceOrderDO;
|
||||
import cn.hangtag.framework.common.pojo.PageResult;
|
||||
import cn.hangtag.framework.common.pojo.PageParam;
|
||||
import cn.hangtag.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.hangtag.module.oms.dal.mysql.produceorder.ProduceOrderMapper;
|
||||
|
||||
import static cn.hangtag.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.hangtag.module.oms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 生产制单 Service 实现类
|
||||
*
|
||||
* @author wwb
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ProduceOrderServiceImpl implements ProduceOrderService {
|
||||
|
||||
@Resource
|
||||
private ProduceOrderMapper produceOrderMapper;
|
||||
|
||||
@Override
|
||||
public Long createProduceOrder(ProduceOrderSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ProduceOrderDO produceOrder = BeanUtils.toBean(createReqVO, ProduceOrderDO.class);
|
||||
produceOrderMapper.insert(produceOrder);
|
||||
// 返回
|
||||
return produceOrder.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProduceOrder(ProduceOrderSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateProduceOrderExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ProduceOrderDO updateObj = BeanUtils.toBean(updateReqVO, ProduceOrderDO.class);
|
||||
produceOrderMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteProduceOrder(Long id) {
|
||||
// 校验存在
|
||||
validateProduceOrderExists(id);
|
||||
// 删除
|
||||
produceOrderMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateProduceOrderExists(Long id) {
|
||||
if (produceOrderMapper.selectById(id) == null) {
|
||||
throw exception(PRODUCE_ORDER_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProduceOrderDO getProduceOrder(Long id) {
|
||||
return produceOrderMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ProduceOrderDO> getProduceOrderPage(ProduceOrderPageReqVO pageReqVO) {
|
||||
return produceOrderMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.hangtag.module.oms.dal.mysql.produceorder.ProduceOrderMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
package cn.hangtag.module.oms.service.produceorder;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.mock.mockito.MockBean;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import cn.hangtag.framework.test.core.ut.BaseDbUnitTest;
|
||||
|
||||
import cn.hangtag.module.oms.controller.admin.produceorder.vo.*;
|
||||
import cn.hangtag.module.oms.dal.dataobject.produceorder.ProduceOrderDO;
|
||||
import cn.hangtag.module.oms.dal.mysql.produceorder.ProduceOrderMapper;
|
||||
import cn.hangtag.framework.common.pojo.PageResult;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.hutool.core.util.RandomUtil.*;
|
||||
import static cn.hangtag.module.oms.enums.ErrorCodeConstants.*;
|
||||
import static cn.hangtag.framework.test.core.util.AssertUtils.*;
|
||||
import static cn.hangtag.framework.test.core.util.RandomUtils.*;
|
||||
import static cn.hangtag.framework.common.util.date.LocalDateTimeUtils.*;
|
||||
import static cn.hangtag.framework.common.util.object.ObjectUtils.*;
|
||||
import static cn.hangtag.framework.common.util.date.DateUtils.*;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
/**
|
||||
* {@link ProduceOrderServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author wwb
|
||||
*/
|
||||
@Import(ProduceOrderServiceImpl.class)
|
||||
public class ProduceOrderServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
@Resource
|
||||
private ProduceOrderServiceImpl produceOrderService;
|
||||
|
||||
@Resource
|
||||
private ProduceOrderMapper produceOrderMapper;
|
||||
|
||||
@Test
|
||||
public void testCreateProduceOrder_success() {
|
||||
// 准备参数
|
||||
ProduceOrderSaveReqVO createReqVO = randomPojo(ProduceOrderSaveReqVO.class).setId(null);
|
||||
|
||||
// 调用
|
||||
Long produceOrderId = produceOrderService.createProduceOrder(createReqVO);
|
||||
// 断言
|
||||
assertNotNull(produceOrderId);
|
||||
// 校验记录的属性是否正确
|
||||
ProduceOrderDO produceOrder = produceOrderMapper.selectById(produceOrderId);
|
||||
assertPojoEquals(createReqVO, produceOrder, "id");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateProduceOrder_success() {
|
||||
// mock 数据
|
||||
ProduceOrderDO dbProduceOrder = randomPojo(ProduceOrderDO.class);
|
||||
produceOrderMapper.insert(dbProduceOrder);// @Sql: 先插入出一条存在的数据
|
||||
// 准备参数
|
||||
ProduceOrderSaveReqVO updateReqVO = randomPojo(ProduceOrderSaveReqVO.class, o -> {
|
||||
o.setId(dbProduceOrder.getId()); // 设置更新的 ID
|
||||
});
|
||||
|
||||
// 调用
|
||||
produceOrderService.updateProduceOrder(updateReqVO);
|
||||
// 校验是否更新正确
|
||||
ProduceOrderDO produceOrder = produceOrderMapper.selectById(updateReqVO.getId()); // 获取最新的
|
||||
assertPojoEquals(updateReqVO, produceOrder);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateProduceOrder_notExists() {
|
||||
// 准备参数
|
||||
ProduceOrderSaveReqVO updateReqVO = randomPojo(ProduceOrderSaveReqVO.class);
|
||||
|
||||
// 调用, 并断言异常
|
||||
assertServiceException(() -> produceOrderService.updateProduceOrder(updateReqVO), PRODUCE_ORDER_NOT_EXISTS);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeleteProduceOrder_success() {
|
||||
// mock 数据
|
||||
ProduceOrderDO dbProduceOrder = randomPojo(ProduceOrderDO.class);
|
||||
produceOrderMapper.insert(dbProduceOrder);// @Sql: 先插入出一条存在的数据
|
||||
// 准备参数
|
||||
Long id = dbProduceOrder.getId();
|
||||
|
||||
// 调用
|
||||
produceOrderService.deleteProduceOrder(id);
|
||||
// 校验数据不存在了
|
||||
assertNull(produceOrderMapper.selectById(id));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeleteProduceOrder_notExists() {
|
||||
// 准备参数
|
||||
Long id = randomLongId();
|
||||
|
||||
// 调用, 并断言异常
|
||||
assertServiceException(() -> produceOrderService.deleteProduceOrder(id), PRODUCE_ORDER_NOT_EXISTS);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解
|
||||
public void testGetProduceOrderPage() {
|
||||
// mock 数据
|
||||
ProduceOrderDO dbProduceOrder = randomPojo(ProduceOrderDO.class, o -> { // 等会查询到
|
||||
o.setBillno(null);
|
||||
o.setOrderNo(null);
|
||||
o.setCustomerCode(null);
|
||||
o.setSaleContractNo(null);
|
||||
o.setReportDate(null);
|
||||
o.setProduceDate(null);
|
||||
o.setProduceLine(null);
|
||||
o.setDeliveryMethod(null);
|
||||
o.setInspectionDate(null);
|
||||
o.setDeliverydate(null);
|
||||
});
|
||||
produceOrderMapper.insert(dbProduceOrder);
|
||||
// 测试 billno 不匹配
|
||||
produceOrderMapper.insert(cloneIgnoreId(dbProduceOrder, o -> o.setBillno(null)));
|
||||
// 测试 orderNo 不匹配
|
||||
produceOrderMapper.insert(cloneIgnoreId(dbProduceOrder, o -> o.setOrderNo(null)));
|
||||
// 测试 customerCode 不匹配
|
||||
produceOrderMapper.insert(cloneIgnoreId(dbProduceOrder, o -> o.setCustomerCode(null)));
|
||||
// 测试 saleContractNo 不匹配
|
||||
produceOrderMapper.insert(cloneIgnoreId(dbProduceOrder, o -> o.setSaleContractNo(null)));
|
||||
// 测试 reportDate 不匹配
|
||||
produceOrderMapper.insert(cloneIgnoreId(dbProduceOrder, o -> o.setReportDate(null)));
|
||||
// 测试 produceDate 不匹配
|
||||
produceOrderMapper.insert(cloneIgnoreId(dbProduceOrder, o -> o.setProduceDate(null)));
|
||||
// 测试 produceLine 不匹配
|
||||
produceOrderMapper.insert(cloneIgnoreId(dbProduceOrder, o -> o.setProduceLine(null)));
|
||||
// 测试 deliveryMethod 不匹配
|
||||
produceOrderMapper.insert(cloneIgnoreId(dbProduceOrder, o -> o.setDeliveryMethod(null)));
|
||||
// 测试 inspectionDate 不匹配
|
||||
produceOrderMapper.insert(cloneIgnoreId(dbProduceOrder, o -> o.setInspectionDate(null)));
|
||||
// 测试 deliverydate 不匹配
|
||||
produceOrderMapper.insert(cloneIgnoreId(dbProduceOrder, o -> o.setDeliverydate(null)));
|
||||
// 准备参数
|
||||
ProduceOrderPageReqVO reqVO = new ProduceOrderPageReqVO();
|
||||
reqVO.setBillno(null);
|
||||
reqVO.setOrderNo(null);
|
||||
reqVO.setCustomerCode(null);
|
||||
reqVO.setSaleContractNo(null);
|
||||
reqVO.setReportDate(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
|
||||
reqVO.setProduceDate(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
|
||||
reqVO.setProduceLine(null);
|
||||
reqVO.setDeliveryMethod(null);
|
||||
reqVO.setInspectionDate(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
|
||||
reqVO.setDeliverydate(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
|
||||
|
||||
// 调用
|
||||
PageResult<ProduceOrderDO> pageResult = produceOrderService.getProduceOrderPage(reqVO);
|
||||
// 断言
|
||||
assertEquals(1, pageResult.getTotal());
|
||||
assertEquals(1, pageResult.getList().size());
|
||||
assertPojoEquals(dbProduceOrder, pageResult.getList().get(0));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -4,12 +4,12 @@ NODE_ENV=production
|
|||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
|
||||
VITE_BASE_URL='http://localhost:8080'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload'
|
||||
VITE_UPLOAD_URL='http://localhost:8080/admin-api/infra/file/upload'
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
|
|
@ -33,4 +33,4 @@ VITE_OUT_DIR=dist
|
|||
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
|
||||
|
||||
# 验证码的开关
|
||||
VITE_APP_CAPTCHA_ENABLE=true
|
||||
VITE_APP_CAPTCHA_ENABLE=false
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ NODE_ENV=production
|
|||
VITE_DEV=false
|
||||
|
||||
# 请求路径
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
VITE_BASE_URL='http://202.74.40.60:8080'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export const getActivityList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/bpm/activity/list',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// BPM 流程分类 VO
|
||||
export interface CategoryVO {
|
||||
id: number // 分类编号
|
||||
name: string // 分类名
|
||||
code: string // 分类标志
|
||||
status: number // 分类状态
|
||||
sort: number // 分类排序
|
||||
}
|
||||
|
||||
// BPM 流程分类 API
|
||||
export const CategoryApi = {
|
||||
// 查询流程分类分页
|
||||
getCategoryPage: async (params: any) => {
|
||||
return await request.get({ url: `/bpm/category/page`, params })
|
||||
},
|
||||
|
||||
// 查询流程分类列表
|
||||
getCategorySimpleList: async () => {
|
||||
return await request.get({ url: `/bpm/category/simple-list` })
|
||||
},
|
||||
|
||||
// 查询流程分类详情
|
||||
getCategory: async (id: number) => {
|
||||
return await request.get({ url: `/bpm/category/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增流程分类
|
||||
createCategory: async (data: CategoryVO) => {
|
||||
return await request.post({ url: `/bpm/category/create`, data })
|
||||
},
|
||||
|
||||
// 修改流程分类
|
||||
updateCategory: async (data: CategoryVO) => {
|
||||
return await request.put({ url: `/bpm/category/update`, data })
|
||||
},
|
||||
|
||||
// 删除流程分类
|
||||
deleteCategory: async (id: number) => {
|
||||
return await request.delete({ url: `/bpm/category/delete?id=` + id })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export const getProcessDefinition = async (id: number, key: string) => {
|
||||
return await request.get({
|
||||
url: '/bpm/process-definition/get',
|
||||
params: { id, key }
|
||||
})
|
||||
}
|
||||
|
||||
export const getProcessDefinitionPage = async (params) => {
|
||||
return await request.get({
|
||||
url: '/bpm/process-definition/page',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export const getProcessDefinitionList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/bpm/process-definition/list',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export type FormVO = {
|
||||
id: number
|
||||
name: string
|
||||
conf: string
|
||||
fields: string[]
|
||||
status: number
|
||||
remark: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
// 创建工作流的表单定义
|
||||
export const createForm = async (data: FormVO) => {
|
||||
return await request.post({
|
||||
url: '/bpm/form/create',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新工作流的表单定义
|
||||
export const updateForm = async (data: FormVO) => {
|
||||
return await request.put({
|
||||
url: '/bpm/form/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除工作流的表单定义
|
||||
export const deleteForm = async (id: number) => {
|
||||
return await request.delete({
|
||||
url: '/bpm/form/delete?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得工作流的表单定义
|
||||
export const getForm = async (id: number) => {
|
||||
return await request.get({
|
||||
url: '/bpm/form/get?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得工作流的表单定义分页
|
||||
export const getFormPage = async (params) => {
|
||||
return await request.get({
|
||||
url: '/bpm/form/page',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 获得动态表单的精简列表
|
||||
export const getFormSimpleList = async () => {
|
||||
return await request.get({
|
||||
url: '/bpm/form/simple-list'
|
||||
})
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export type LeaveVO = {
|
||||
id: number
|
||||
status: number
|
||||
type: number
|
||||
reason: string
|
||||
processInstanceId: string
|
||||
startTime: string
|
||||
endTime: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
// 创建请假申请
|
||||
export const createLeave = async (data: LeaveVO) => {
|
||||
return await request.post({ url: '/bpm/oa/leave/create', data: data })
|
||||
}
|
||||
|
||||
// 获得请假申请
|
||||
export const getLeave = async (id: number) => {
|
||||
return await request.get({ url: '/bpm/oa/leave/get?id=' + id })
|
||||
}
|
||||
|
||||
// 获得请假申请分页
|
||||
export const getLeavePage = async (params: PageParam) => {
|
||||
return await request.get({ url: '/bpm/oa/leave/page', params })
|
||||
}
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export type ProcessDefinitionVO = {
|
||||
id: string
|
||||
version: number
|
||||
deploymentTIme: string
|
||||
suspensionState: number
|
||||
}
|
||||
|
||||
export type ModelVO = {
|
||||
id: number
|
||||
formName: string
|
||||
key: string
|
||||
name: string
|
||||
description: string
|
||||
category: string
|
||||
formType: number
|
||||
formId: number
|
||||
formCustomCreatePath: string
|
||||
formCustomViewPath: string
|
||||
processDefinition: ProcessDefinitionVO
|
||||
status: number
|
||||
remark: string
|
||||
createTime: string
|
||||
bpmnXml: string
|
||||
}
|
||||
|
||||
export const getModelPage = async (params) => {
|
||||
return await request.get({ url: '/bpm/model/page', params })
|
||||
}
|
||||
|
||||
export const getModel = async (id: number) => {
|
||||
return await request.get({ url: '/bpm/model/get?id=' + id })
|
||||
}
|
||||
|
||||
export const updateModel = async (data: ModelVO) => {
|
||||
return await request.put({ url: '/bpm/model/update', data: data })
|
||||
}
|
||||
|
||||
// 任务状态修改
|
||||
export const updateModelState = async (id: number, state: number) => {
|
||||
const data = {
|
||||
id: id,
|
||||
state: state
|
||||
}
|
||||
return await request.put({ url: '/bpm/model/update-state', data: data })
|
||||
}
|
||||
|
||||
export const createModel = async (data: ModelVO) => {
|
||||
return await request.post({ url: '/bpm/model/create', data: data })
|
||||
}
|
||||
|
||||
export const deleteModel = async (id: number) => {
|
||||
return await request.delete({ url: '/bpm/model/delete?id=' + id })
|
||||
}
|
||||
|
||||
export const deployModel = async (id: number) => {
|
||||
return await request.post({ url: '/bpm/model/deploy?id=' + id })
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// BPM 流程表达式 VO
|
||||
export interface ProcessExpressionVO {
|
||||
id: number // 编号
|
||||
name: string // 表达式名字
|
||||
status: number // 表达式状态
|
||||
expression: string // 表达式
|
||||
}
|
||||
|
||||
// BPM 流程表达式 API
|
||||
export const ProcessExpressionApi = {
|
||||
// 查询BPM 流程表达式分页
|
||||
getProcessExpressionPage: async (params: any) => {
|
||||
return await request.get({ url: `/bpm/process-expression/page`, params })
|
||||
},
|
||||
|
||||
// 查询BPM 流程表达式详情
|
||||
getProcessExpression: async (id: number) => {
|
||||
return await request.get({ url: `/bpm/process-expression/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增BPM 流程表达式
|
||||
createProcessExpression: async (data: ProcessExpressionVO) => {
|
||||
return await request.post({ url: `/bpm/process-expression/create`, data })
|
||||
},
|
||||
|
||||
// 修改BPM 流程表达式
|
||||
updateProcessExpression: async (data: ProcessExpressionVO) => {
|
||||
return await request.put({ url: `/bpm/process-expression/update`, data })
|
||||
},
|
||||
|
||||
// 删除BPM 流程表达式
|
||||
deleteProcessExpression: async (id: number) => {
|
||||
return await request.delete({ url: `/bpm/process-expression/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出BPM 流程表达式 Excel
|
||||
exportProcessExpression: async (params) => {
|
||||
return await request.download({ url: `/bpm/process-expression/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export type Task = {
|
||||
id: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export type ProcessInstanceVO = {
|
||||
id: number
|
||||
name: string
|
||||
processDefinitionId: string
|
||||
category: string
|
||||
result: number
|
||||
tasks: Task[]
|
||||
fields: string[]
|
||||
status: number
|
||||
remark: string
|
||||
businessKey: string
|
||||
createTime: string
|
||||
endTime: string
|
||||
}
|
||||
|
||||
export type ProcessInstanceCopyVO = {
|
||||
type: number
|
||||
taskName: string
|
||||
taskKey: string
|
||||
processInstanceName: string
|
||||
processInstanceKey: string
|
||||
startUserId: string
|
||||
options: string[]
|
||||
reason: string
|
||||
}
|
||||
|
||||
export const getProcessInstanceMyPage = async (params: any) => {
|
||||
return await request.get({ url: '/bpm/process-instance/my-page', params })
|
||||
}
|
||||
|
||||
export const getProcessInstanceManagerPage = async (params: any) => {
|
||||
return await request.get({ url: '/bpm/process-instance/manager-page', params })
|
||||
}
|
||||
|
||||
export const createProcessInstance = async (data) => {
|
||||
return await request.post({ url: '/bpm/process-instance/create', data: data })
|
||||
}
|
||||
|
||||
export const cancelProcessInstanceByStartUser = async (id: number, reason: string) => {
|
||||
const data = {
|
||||
id: id,
|
||||
reason: reason
|
||||
}
|
||||
return await request.delete({ url: '/bpm/process-instance/cancel-by-start-user', data: data })
|
||||
}
|
||||
|
||||
export const cancelProcessInstanceByAdmin = async (id: number, reason: string) => {
|
||||
const data = {
|
||||
id: id,
|
||||
reason: reason
|
||||
}
|
||||
return await request.delete({ url: '/bpm/process-instance/cancel-by-admin', data: data })
|
||||
}
|
||||
|
||||
export const getProcessInstance = async (id: string) => {
|
||||
return await request.get({ url: '/bpm/process-instance/get?id=' + id })
|
||||
}
|
||||
|
||||
export const getProcessInstanceCopyPage = async (params: any) => {
|
||||
return await request.get({ url: '/bpm/process-instance/copy/page', params })
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// BPM 流程监听器 VO
|
||||
export interface ProcessListenerVO {
|
||||
id: number // 编号
|
||||
name: string // 监听器名字
|
||||
type: string // 监听器类型
|
||||
status: number // 监听器状态
|
||||
event: string // 监听事件
|
||||
valueType: string // 监听器值类型
|
||||
value: string // 监听器值
|
||||
}
|
||||
|
||||
// BPM 流程监听器 API
|
||||
export const ProcessListenerApi = {
|
||||
// 查询流程监听器分页
|
||||
getProcessListenerPage: async (params: any) => {
|
||||
return await request.get({ url: `/bpm/process-listener/page`, params })
|
||||
},
|
||||
|
||||
// 查询流程监听器详情
|
||||
getProcessListener: async (id: number) => {
|
||||
return await request.get({ url: `/bpm/process-listener/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增流程监听器
|
||||
createProcessListener: async (data: ProcessListenerVO) => {
|
||||
return await request.post({ url: `/bpm/process-listener/create`, data })
|
||||
},
|
||||
|
||||
// 修改流程监听器
|
||||
updateProcessListener: async (data: ProcessListenerVO) => {
|
||||
return await request.put({ url: `/bpm/process-listener/update`, data })
|
||||
},
|
||||
|
||||
// 删除流程监听器
|
||||
deleteProcessListener: async (id: number) => {
|
||||
return await request.delete({ url: `/bpm/process-listener/delete?id=` + id })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export type TaskVO = {
|
||||
id: number
|
||||
}
|
||||
|
||||
export const getTaskTodoPage = async (params: any) => {
|
||||
return await request.get({ url: '/bpm/task/todo-page', params })
|
||||
}
|
||||
|
||||
export const getTaskDonePage = async (params: any) => {
|
||||
return await request.get({ url: '/bpm/task/done-page', params })
|
||||
}
|
||||
|
||||
export const getTaskManagerPage = async (params: any) => {
|
||||
return await request.get({ url: '/bpm/task/manager-page', params })
|
||||
}
|
||||
|
||||
export const approveTask = async (data: any) => {
|
||||
return await request.put({ url: '/bpm/task/approve', data })
|
||||
}
|
||||
|
||||
export const rejectTask = async (data: any) => {
|
||||
return await request.put({ url: '/bpm/task/reject', data })
|
||||
}
|
||||
|
||||
export const getTaskListByProcessInstanceId = async (processInstanceId: string) => {
|
||||
return await request.get({
|
||||
url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId
|
||||
})
|
||||
}
|
||||
|
||||
// 获取所有可回退的节点
|
||||
export const getTaskListByReturn = async (id: string) => {
|
||||
return await request.get({ url: '/bpm/task/list-by-return', params: { id } })
|
||||
}
|
||||
|
||||
// 回退
|
||||
export const returnTask = async (data: any) => {
|
||||
return await request.put({ url: '/bpm/task/return', data })
|
||||
}
|
||||
|
||||
// 委派
|
||||
export const delegateTask = async (data: any) => {
|
||||
return await request.put({ url: '/bpm/task/delegate', data })
|
||||
}
|
||||
|
||||
// 转派
|
||||
export const transferTask = async (data: any) => {
|
||||
return await request.put({ url: '/bpm/task/transfer', data })
|
||||
}
|
||||
|
||||
// 加签
|
||||
export const signCreateTask = async (data: any) => {
|
||||
return await request.put({ url: '/bpm/task/create-sign', data })
|
||||
}
|
||||
|
||||
// 减签
|
||||
export const signDeleteTask = async (data: any) => {
|
||||
return await request.delete({ url: '/bpm/task/delete-sign', data })
|
||||
}
|
||||
|
||||
// 获取减签任务列表
|
||||
export const getChildrenTaskList = async (id: string) => {
|
||||
return await request.get({ url: '/bpm/task/list-by-parent-task-id?parentTaskId=' + id })
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export type UserGroupVO = {
|
||||
id: number
|
||||
name: string
|
||||
description: string
|
||||
userIds: number[]
|
||||
status: number
|
||||
remark: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
// 创建用户组
|
||||
export const createUserGroup = async (data: UserGroupVO) => {
|
||||
return await request.post({
|
||||
url: '/bpm/user-group/create',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新用户组
|
||||
export const updateUserGroup = async (data: UserGroupVO) => {
|
||||
return await request.put({
|
||||
url: '/bpm/user-group/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除用户组
|
||||
export const deleteUserGroup = async (id: number) => {
|
||||
return await request.delete({ url: '/bpm/user-group/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 获得用户组
|
||||
export const getUserGroup = async (id: number) => {
|
||||
return await request.get({ url: '/bpm/user-group/get?id=' + id })
|
||||
}
|
||||
|
||||
// 获得用户组分页
|
||||
export const getUserGroupPage = async (params) => {
|
||||
return await request.get({ url: '/bpm/user-group/page', params })
|
||||
}
|
||||
|
||||
// 获取用户组精简信息列表
|
||||
export const getUserGroupSimpleList = async (): Promise<UserGroupVO[]> => {
|
||||
return await request.get({ url: '/bpm/user-group/simple-list' })
|
||||
}
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
import { TransferReqVO } from '@/api/crm/permission'
|
||||
|
||||
export interface BusinessVO {
|
||||
id: number
|
||||
name: string
|
||||
customerId: number
|
||||
customerName?: string
|
||||
followUpStatus: boolean
|
||||
contactLastTime: Date
|
||||
contactNextTime: Date
|
||||
ownerUserId: number
|
||||
ownerUserName?: string // 负责人的用户名称
|
||||
ownerUserDept?: string // 负责人的部门名称
|
||||
statusTypeId: number
|
||||
statusTypeName?: string
|
||||
statusId: number
|
||||
statusName?: string
|
||||
endStatus: number
|
||||
endRemark: string
|
||||
dealTime: Date
|
||||
totalProductPrice: number
|
||||
totalPrice: number
|
||||
discountPercent: number
|
||||
remark: string
|
||||
creator: string // 创建人
|
||||
creatorName?: string // 创建人名称
|
||||
createTime: Date // 创建时间
|
||||
updateTime: Date // 更新时间
|
||||
products?: [
|
||||
{
|
||||
id: number
|
||||
productId: number
|
||||
productName: string
|
||||
productNo: string
|
||||
productUnit: number
|
||||
productPrice: number
|
||||
businessPrice: number
|
||||
count: number
|
||||
totalPrice: number
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// 查询 CRM 商机列表
|
||||
export const getBusinessPage = async (params) => {
|
||||
return await request.get({ url: `/crm/business/page`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 商机列表,基于指定客户
|
||||
export const getBusinessPageByCustomer = async (params) => {
|
||||
return await request.get({ url: `/crm/business/page-by-customer`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 商机详情
|
||||
export const getBusiness = async (id: number) => {
|
||||
return await request.get({ url: `/crm/business/get?id=` + id })
|
||||
}
|
||||
|
||||
// 获得 CRM 商机列表(精简)
|
||||
export const getSimpleBusinessList = async () => {
|
||||
return await request.get({ url: `/crm/business/simple-all-list` })
|
||||
}
|
||||
|
||||
// 新增 CRM 商机
|
||||
export const createBusiness = async (data: BusinessVO) => {
|
||||
return await request.post({ url: `/crm/business/create`, data })
|
||||
}
|
||||
|
||||
// 修改 CRM 商机
|
||||
export const updateBusiness = async (data: BusinessVO) => {
|
||||
return await request.put({ url: `/crm/business/update`, data })
|
||||
}
|
||||
|
||||
// 修改 CRM 商机状态
|
||||
export const updateBusinessStatus = async (data: BusinessVO) => {
|
||||
return await request.put({ url: `/crm/business/update-status`, data })
|
||||
}
|
||||
|
||||
// 删除 CRM 商机
|
||||
export const deleteBusiness = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/business/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出 CRM 商机 Excel
|
||||
export const exportBusiness = async (params) => {
|
||||
return await request.download({ url: `/crm/business/export-excel`, params })
|
||||
}
|
||||
|
||||
// 联系人关联商机列表
|
||||
export const getBusinessPageByContact = async (params) => {
|
||||
return await request.get({ url: `/crm/business/page-by-contact`, params })
|
||||
}
|
||||
|
||||
// 商机转移
|
||||
export const transferBusiness = async (data: TransferReqVO) => {
|
||||
return await request.put({ url: '/crm/business/transfer', data })
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface BusinessStatusTypeVO {
|
||||
id: number
|
||||
name: string
|
||||
deptIds: number[]
|
||||
statuses?: {
|
||||
id: number
|
||||
name: string
|
||||
percent: number
|
||||
}
|
||||
}
|
||||
|
||||
export const DEFAULT_STATUSES = [
|
||||
{
|
||||
endStatus: 1,
|
||||
key: '结束',
|
||||
name: '赢单',
|
||||
percent: 100
|
||||
},
|
||||
{
|
||||
endStatus: 2,
|
||||
key: '结束',
|
||||
name: '输单',
|
||||
percent: 0
|
||||
},
|
||||
{
|
||||
endStatus: 3,
|
||||
key: '结束',
|
||||
name: '无效',
|
||||
percent: 0
|
||||
}
|
||||
]
|
||||
|
||||
// 查询商机状态组列表
|
||||
export const getBusinessStatusPage = async (params: any) => {
|
||||
return await request.get({ url: `/crm/business-status/page`, params })
|
||||
}
|
||||
|
||||
// 新增商机状态组
|
||||
export const createBusinessStatus = async (data: BusinessStatusTypeVO) => {
|
||||
return await request.post({ url: `/crm/business-status/create`, data })
|
||||
}
|
||||
|
||||
// 修改商机状态组
|
||||
export const updateBusinessStatus = async (data: BusinessStatusTypeVO) => {
|
||||
return await request.put({ url: `/crm/business-status/update`, data })
|
||||
}
|
||||
|
||||
// 查询商机状态类型详情
|
||||
export const getBusinessStatus = async (id: number) => {
|
||||
return await request.get({ url: `/crm/business-status/get?id=` + id })
|
||||
}
|
||||
|
||||
// 删除商机状态
|
||||
export const deleteBusinessStatus = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/business-status/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 获得商机状态组列表
|
||||
export const getBusinessStatusTypeSimpleList = async () => {
|
||||
return await request.get({ url: `/crm/business-status/type-simple-list` })
|
||||
}
|
||||
|
||||
// 获得商机阶段列表
|
||||
export const getBusinessStatusSimpleList = async (typeId: number) => {
|
||||
return await request.get({ url: `/crm/business-status/status-simple-list`, params: { typeId } })
|
||||
}
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
import { TransferReqVO } from '@/api/crm/permission'
|
||||
|
||||
export interface ClueVO {
|
||||
id: number // 编号
|
||||
name: string // 线索名称
|
||||
followUpStatus: boolean // 跟进状态
|
||||
contactLastTime: Date // 最后跟进时间
|
||||
contactLastContent: string // 最后跟进内容
|
||||
contactNextTime: Date // 下次联系时间
|
||||
ownerUserId: number // 负责人的用户编号
|
||||
ownerUserName?: string // 负责人的用户名称
|
||||
ownerUserDept?: string // 负责人的部门名称
|
||||
transformStatus: boolean // 转化状态
|
||||
customerId: number // 客户编号
|
||||
customerName?: string // 客户名称
|
||||
mobile: string // 手机号
|
||||
telephone: string // 电话
|
||||
qq: string // QQ
|
||||
wechat: string // wechat
|
||||
email: string // email
|
||||
areaId: number // 所在地
|
||||
areaName?: string // 所在地名称
|
||||
detailAddress: string // 详细地址
|
||||
industryId: number // 所属行业
|
||||
level: number // 客户等级
|
||||
source: number // 客户来源
|
||||
remark: string // 备注
|
||||
creator: string // 创建人
|
||||
creatorName?: string // 创建人名称
|
||||
createTime: Date // 创建时间
|
||||
updateTime: Date // 更新时间
|
||||
}
|
||||
|
||||
// 查询线索列表
|
||||
export const getCluePage = async (params: any) => {
|
||||
return await request.get({ url: `/crm/clue/page`, params })
|
||||
}
|
||||
|
||||
// 查询线索详情
|
||||
export const getClue = async (id: number) => {
|
||||
return await request.get({ url: `/crm/clue/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增线索
|
||||
export const createClue = async (data: ClueVO) => {
|
||||
return await request.post({ url: `/crm/clue/create`, data })
|
||||
}
|
||||
|
||||
// 修改线索
|
||||
export const updateClue = async (data: ClueVO) => {
|
||||
return await request.put({ url: `/crm/clue/update`, data })
|
||||
}
|
||||
|
||||
// 删除线索
|
||||
export const deleteClue = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/clue/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出线索 Excel
|
||||
export const exportClue = async (params) => {
|
||||
return await request.download({ url: `/crm/clue/export-excel`, params })
|
||||
}
|
||||
|
||||
// 线索转移
|
||||
export const transferClue = async (data: TransferReqVO) => {
|
||||
return await request.put({ url: '/crm/clue/transfer', data })
|
||||
}
|
||||
|
||||
// 线索转化为客户
|
||||
export const transformClue = async (id: number) => {
|
||||
return await request.put({ url: '/crm/clue/transform', params: { id } })
|
||||
}
|
||||
|
||||
// 获得分配给我的、待跟进的线索数量
|
||||
export const getFollowClueCount = async () => {
|
||||
return await request.get({ url: '/crm/clue/follow-count' })
|
||||
}
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
import { TransferReqVO } from '@/api/crm/permission'
|
||||
|
||||
export interface ContactVO {
|
||||
id: number // 编号
|
||||
name: string // 联系人名称
|
||||
customerId: number // 客户编号
|
||||
customerName?: string // 客户名称
|
||||
contactLastTime: Date // 最后跟进时间
|
||||
contactLastContent: string // 最后跟进内容
|
||||
contactNextTime: Date // 下次联系时间
|
||||
ownerUserId: number // 负责人的用户编号
|
||||
ownerUserName?: string // 负责人的用户名称
|
||||
ownerUserDept?: string // 负责人的部门名称
|
||||
mobile: string // 手机号
|
||||
telephone: string // 电话
|
||||
qq: string // QQ
|
||||
wechat: string // wechat
|
||||
email: string // email
|
||||
areaId: number // 所在地
|
||||
areaName?: string // 所在地名称
|
||||
detailAddress: string // 详细地址
|
||||
sex: number // 性别
|
||||
master: boolean // 是否主联系人
|
||||
post: string // 职务
|
||||
parentId: number // 上级联系人编号
|
||||
parentName?: string // 上级联系人名称
|
||||
remark: string // 备注
|
||||
creator: string // 创建人
|
||||
creatorName?: string // 创建人名称
|
||||
createTime: Date // 创建时间
|
||||
updateTime: Date // 更新时间
|
||||
}
|
||||
|
||||
export interface ContactBusinessReqVO {
|
||||
contactId: number
|
||||
businessIds: number[]
|
||||
}
|
||||
|
||||
export interface ContactBusiness2ReqVO {
|
||||
businessId: number
|
||||
contactIds: number[]
|
||||
}
|
||||
|
||||
// 查询 CRM 联系人列表
|
||||
export const getContactPage = async (params) => {
|
||||
return await request.get({ url: `/crm/contact/page`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 联系人列表,基于指定客户
|
||||
export const getContactPageByCustomer = async (params: any) => {
|
||||
return await request.get({ url: `/crm/contact/page-by-customer`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 联系人列表,基于指定商机
|
||||
export const getContactPageByBusiness = async (params: any) => {
|
||||
return await request.get({ url: `/crm/contact/page-by-business`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 联系人详情
|
||||
export const getContact = async (id: number) => {
|
||||
return await request.get({ url: `/crm/contact/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增 CRM 联系人
|
||||
export const createContact = async (data: ContactVO) => {
|
||||
return await request.post({ url: `/crm/contact/create`, data })
|
||||
}
|
||||
|
||||
// 修改 CRM 联系人
|
||||
export const updateContact = async (data: ContactVO) => {
|
||||
return await request.put({ url: `/crm/contact/update`, data })
|
||||
}
|
||||
|
||||
// 删除 CRM 联系人
|
||||
export const deleteContact = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/contact/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出 CRM 联系人 Excel
|
||||
export const exportContact = async (params) => {
|
||||
return await request.download({ url: `/crm/contact/export-excel`, params })
|
||||
}
|
||||
|
||||
// 获得 CRM 联系人列表(精简)
|
||||
export const getSimpleContactList = async () => {
|
||||
return await request.get({ url: `/crm/contact/simple-all-list` })
|
||||
}
|
||||
|
||||
// 批量新增联系人商机关联
|
||||
export const createContactBusinessList = async (data: ContactBusinessReqVO) => {
|
||||
return await request.post({ url: `/crm/contact/create-business-list`, data })
|
||||
}
|
||||
|
||||
// 批量新增联系人商机关联
|
||||
export const createContactBusinessList2 = async (data: ContactBusiness2ReqVO) => {
|
||||
return await request.post({ url: `/crm/contact/create-business-list2`, data })
|
||||
}
|
||||
|
||||
// 解除联系人商机关联
|
||||
export const deleteContactBusinessList = async (data: ContactBusinessReqVO) => {
|
||||
return await request.delete({ url: `/crm/contact/delete-business-list`, data })
|
||||
}
|
||||
|
||||
// 解除联系人商机关联
|
||||
export const deleteContactBusinessList2 = async (data: ContactBusiness2ReqVO) => {
|
||||
return await request.delete({ url: `/crm/contact/delete-business-list2`, data })
|
||||
}
|
||||
|
||||
// 联系人转移
|
||||
export const transferContact = async (data: TransferReqVO) => {
|
||||
return await request.put({ url: '/crm/contact/transfer', data })
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface ContractConfigVO {
|
||||
notifyEnabled?: boolean
|
||||
notifyDays?: number
|
||||
}
|
||||
|
||||
// 获取合同配置
|
||||
export const getContractConfig = async () => {
|
||||
return await request.get({ url: `/crm/contract-config/get` })
|
||||
}
|
||||
|
||||
// 更新合同配置
|
||||
export const saveContractConfig = async (data: ContractConfigVO) => {
|
||||
return await request.put({ url: `/crm/contract-config/save`, data })
|
||||
}
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
import { TransferReqVO } from '@/api/crm/permission'
|
||||
|
||||
export interface ContractVO {
|
||||
id: number
|
||||
name: string
|
||||
no: string
|
||||
customerId: number
|
||||
customerName?: string
|
||||
businessId: number
|
||||
businessName: string
|
||||
contactLastTime: Date
|
||||
ownerUserId: number
|
||||
ownerUserName?: string
|
||||
ownerUserDeptName?: string
|
||||
processInstanceId: number
|
||||
auditStatus: number
|
||||
orderDate: Date
|
||||
startTime: Date
|
||||
endTime: Date
|
||||
totalProductPrice: number
|
||||
discountPercent: number
|
||||
totalPrice: number
|
||||
totalReceivablePrice: number
|
||||
signContactId: number
|
||||
signContactName?: string
|
||||
signUserId: number
|
||||
signUserName: string
|
||||
remark: string
|
||||
createTime?: Date
|
||||
creator: string
|
||||
creatorName: string
|
||||
updateTime?: Date
|
||||
products?: [
|
||||
{
|
||||
id: number
|
||||
productId: number
|
||||
productName: string
|
||||
productNo: string
|
||||
productUnit: number
|
||||
productPrice: number
|
||||
contractPrice: number
|
||||
count: number
|
||||
totalPrice: number
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// 查询 CRM 合同列表
|
||||
export const getContractPage = async (params) => {
|
||||
return await request.get({ url: `/crm/contract/page`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 联系人列表,基于指定客户
|
||||
export const getContractPageByCustomer = async (params: any) => {
|
||||
return await request.get({ url: `/crm/contract/page-by-customer`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 联系人列表,基于指定商机
|
||||
export const getContractPageByBusiness = async (params: any) => {
|
||||
return await request.get({ url: `/crm/contract/page-by-business`, params })
|
||||
}
|
||||
|
||||
// 查询 CRM 合同详情
|
||||
export const getContract = async (id: number) => {
|
||||
return await request.get({ url: `/crm/contract/get?id=` + id })
|
||||
}
|
||||
|
||||
// 查询 CRM 合同下拉列表
|
||||
export const getContractSimpleList = async (customerId: number) => {
|
||||
return await request.get({
|
||||
url: `/crm/contract/simple-list?customerId=${customerId}`
|
||||
})
|
||||
}
|
||||
|
||||
// 新增 CRM 合同
|
||||
export const createContract = async (data: ContractVO) => {
|
||||
return await request.post({ url: `/crm/contract/create`, data })
|
||||
}
|
||||
|
||||
// 修改 CRM 合同
|
||||
export const updateContract = async (data: ContractVO) => {
|
||||
return await request.put({ url: `/crm/contract/update`, data })
|
||||
}
|
||||
|
||||
// 删除 CRM 合同
|
||||
export const deleteContract = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/contract/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出 CRM 合同 Excel
|
||||
export const exportContract = async (params) => {
|
||||
return await request.download({ url: `/crm/contract/export-excel`, params })
|
||||
}
|
||||
|
||||
// 提交审核
|
||||
export const submitContract = async (id: number) => {
|
||||
return await request.put({ url: `/crm/contract/submit?id=${id}` })
|
||||
}
|
||||
|
||||
// 合同转移
|
||||
export const transferContract = async (data: TransferReqVO) => {
|
||||
return await request.put({ url: '/crm/contract/transfer', data })
|
||||
}
|
||||
|
||||
// 获得待审核合同数量
|
||||
export const getAuditContractCount = async () => {
|
||||
return await request.get({ url: '/crm/contract/audit-count' })
|
||||
}
|
||||
|
||||
// 获得即将到期(提醒)的合同数量
|
||||
export const getRemindContractCount = async () => {
|
||||
return await request.get({ url: '/crm/contract/remind-count' })
|
||||
}
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
import { TransferReqVO } from '@/api/crm/permission'
|
||||
|
||||
export interface CustomerVO {
|
||||
id: number // 编号
|
||||
name: string // 客户名称
|
||||
followUpStatus: boolean // 跟进状态
|
||||
contactLastTime: Date // 最后跟进时间
|
||||
contactLastContent: string // 最后跟进内容
|
||||
contactNextTime: Date // 下次联系时间
|
||||
ownerUserId: number // 负责人的用户编号
|
||||
ownerUserName?: string // 负责人的用户名称
|
||||
ownerUserDept?: string // 负责人的部门名称
|
||||
lockStatus?: boolean
|
||||
dealStatus?: boolean
|
||||
mobile: string // 手机号
|
||||
telephone: string // 电话
|
||||
qq: string // QQ
|
||||
wechat: string // wechat
|
||||
email: string // email
|
||||
areaId: number // 所在地
|
||||
areaName?: string // 所在地名称
|
||||
detailAddress: string // 详细地址
|
||||
industryId: number // 所属行业
|
||||
level: number // 客户等级
|
||||
source: number // 客户来源
|
||||
remark: string // 备注
|
||||
creator: string // 创建人
|
||||
creatorName?: string // 创建人名称
|
||||
createTime: Date // 创建时间
|
||||
updateTime: Date // 更新时间
|
||||
}
|
||||
|
||||
// 查询客户列表
|
||||
export const getCustomerPage = async (params) => {
|
||||
return await request.get({ url: `/crm/customer/page`, params })
|
||||
}
|
||||
|
||||
// 进入公海客户提醒的客户列表
|
||||
export const getPutPoolRemindCustomerPage = async (params) => {
|
||||
return await request.get({ url: `/crm/customer/put-pool-remind-page`, params })
|
||||
}
|
||||
|
||||
// 获得待进入公海客户数量
|
||||
export const getPutPoolRemindCustomerCount = async () => {
|
||||
return await request.get({ url: `/crm/customer/put-pool-remind-count` })
|
||||
}
|
||||
|
||||
// 获得今日需联系客户数量
|
||||
export const getTodayContactCustomerCount = async () => {
|
||||
return await request.get({ url: `/crm/customer/today-contact-count` })
|
||||
}
|
||||
|
||||
// 获得分配给我、待跟进的线索数量的客户数量
|
||||
export const getFollowCustomerCount = async () => {
|
||||
return await request.get({ url: `/crm/customer/follow-count` })
|
||||
}
|
||||
|
||||
// 查询客户详情
|
||||
export const getCustomer = async (id: number) => {
|
||||
return await request.get({ url: `/crm/customer/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增客户
|
||||
export const createCustomer = async (data: CustomerVO) => {
|
||||
return await request.post({ url: `/crm/customer/create`, data })
|
||||
}
|
||||
|
||||
// 修改客户
|
||||
export const updateCustomer = async (data: CustomerVO) => {
|
||||
return await request.put({ url: `/crm/customer/update`, data })
|
||||
}
|
||||
|
||||
// 更新客户的成交状态
|
||||
export const updateCustomerDealStatus = async (id: number, dealStatus: boolean) => {
|
||||
return await request.put({ url: `/crm/customer/update-deal-status`, params: { id, dealStatus } })
|
||||
}
|
||||
|
||||
// 删除客户
|
||||
export const deleteCustomer = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/customer/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出客户 Excel
|
||||
export const exportCustomer = async (params: any) => {
|
||||
return await request.download({ url: `/crm/customer/export-excel`, params })
|
||||
}
|
||||
|
||||
// 下载客户导入模板
|
||||
export const importCustomerTemplate = () => {
|
||||
return request.download({ url: '/crm/customer/get-import-template' })
|
||||
}
|
||||
|
||||
// 导入客户
|
||||
export const handleImport = async (formData) => {
|
||||
return await request.upload({ url: `/crm/customer/import`, data: formData })
|
||||
}
|
||||
|
||||
// 客户列表
|
||||
export const getCustomerSimpleList = async () => {
|
||||
return await request.get({ url: `/crm/customer/simple-list` })
|
||||
}
|
||||
|
||||
// ======================= 业务操作 =======================
|
||||
|
||||
// 客户转移
|
||||
export const transferCustomer = async (data: TransferReqVO) => {
|
||||
return await request.put({ url: '/crm/customer/transfer', data })
|
||||
}
|
||||
|
||||
// 锁定/解锁客户
|
||||
export const lockCustomer = async (id: number, lockStatus: boolean) => {
|
||||
return await request.put({ url: `/crm/customer/lock`, data: { id, lockStatus } })
|
||||
}
|
||||
|
||||
// 领取公海客户
|
||||
export const receiveCustomer = async (ids: any[]) => {
|
||||
return await request.put({ url: '/crm/customer/receive', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 分配公海给对应负责人
|
||||
export const distributeCustomer = async (ids: any[], ownerUserId: number) => {
|
||||
return await request.put({
|
||||
url: '/crm/customer/distribute',
|
||||
data: { ids: ids, ownerUserId }
|
||||
})
|
||||
}
|
||||
|
||||
// 客户放入公海
|
||||
export const putCustomerPool = async (id: number) => {
|
||||
return await request.put({ url: `/crm/customer/put-pool?id=${id}` })
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface CustomerLimitConfigVO {
|
||||
id?: number
|
||||
type?: number
|
||||
userIds?: string
|
||||
deptIds?: string
|
||||
maxCount?: number
|
||||
dealCountEnabled?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户限制配置类型
|
||||
*/
|
||||
export enum LimitConfType {
|
||||
/**
|
||||
* 拥有客户数限制
|
||||
*/
|
||||
CUSTOMER_QUANTITY_LIMIT = 1,
|
||||
/**
|
||||
* 锁定客户数限制
|
||||
*/
|
||||
CUSTOMER_LOCK_LIMIT = 2
|
||||
}
|
||||
|
||||
// 查询客户限制配置列表
|
||||
export const getCustomerLimitConfigPage = async (params) => {
|
||||
return await request.get({ url: `/crm/customer-limit-config/page`, params })
|
||||
}
|
||||
|
||||
// 查询客户限制配置详情
|
||||
export const getCustomerLimitConfig = async (id: number) => {
|
||||
return await request.get({ url: `/crm/customer-limit-config/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增客户限制配置
|
||||
export const createCustomerLimitConfig = async (data: CustomerLimitConfigVO) => {
|
||||
return await request.post({ url: `/crm/customer-limit-config/create`, data })
|
||||
}
|
||||
|
||||
// 修改客户限制配置
|
||||
export const updateCustomerLimitConfig = async (data: CustomerLimitConfigVO) => {
|
||||
return await request.put({ url: `/crm/customer-limit-config/update`, data })
|
||||
}
|
||||
|
||||
// 删除客户限制配置
|
||||
export const deleteCustomerLimitConfig = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/customer-limit-config/delete?id=` + id })
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface CustomerPoolConfigVO {
|
||||
enabled?: boolean
|
||||
contactExpireDays?: number
|
||||
dealExpireDays?: number
|
||||
notifyEnabled?: boolean
|
||||
notifyDays?: number
|
||||
}
|
||||
|
||||
// 获取客户公海规则设置
|
||||
export const getCustomerPoolConfig = async () => {
|
||||
return await request.get({ url: `/crm/customer-pool-config/get` })
|
||||
}
|
||||
|
||||
// 更新客户公海规则设置
|
||||
export const saveCustomerPoolConfig = async (data: CustomerPoolConfigVO) => {
|
||||
return await request.put({ url: `/crm/customer-pool-config/save`, data })
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// 跟进记录 VO
|
||||
export interface FollowUpRecordVO {
|
||||
id: number // 编号
|
||||
bizType: number // 数据类型
|
||||
bizId: number // 数据编号
|
||||
type: number // 跟进类型
|
||||
content: string // 跟进内容
|
||||
picUrls: string[] // 图片
|
||||
fileUrls: string[] // 附件
|
||||
nextTime: Date // 下次联系时间
|
||||
businessIds: number[] // 关联的商机编号数组
|
||||
businesses: {
|
||||
id: number
|
||||
name: string
|
||||
}[] // 关联的商机数组
|
||||
contactIds: number[] // 关联的联系人编号数组
|
||||
contacts: {
|
||||
id: number
|
||||
name: string
|
||||
}[] // 关联的联系人数组
|
||||
creator: string
|
||||
creatorName?: string
|
||||
}
|
||||
|
||||
// 跟进记录 API
|
||||
export const FollowUpRecordApi = {
|
||||
// 查询跟进记录分页
|
||||
getFollowUpRecordPage: async (params: any) => {
|
||||
return await request.get({ url: `/crm/follow-up-record/page`, params })
|
||||
},
|
||||
|
||||
// 新增跟进记录
|
||||
createFollowUpRecord: async (data: FollowUpRecordVO) => {
|
||||
return await request.post({ url: `/crm/follow-up-record/create`, data })
|
||||
},
|
||||
|
||||
// 删除跟进记录
|
||||
deleteFollowUpRecord: async (id: number) => {
|
||||
return await request.delete({ url: `/crm/follow-up-record/delete?id=` + id })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface OperateLogVO extends PageParam {
|
||||
bizType: number
|
||||
bizId: number
|
||||
}
|
||||
|
||||
// 获得操作日志
|
||||
export const getOperateLogPage = async (params: OperateLogVO) => {
|
||||
return await request.get({ url: `/crm/operate-log/page`, params })
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface PermissionVO {
|
||||
id?: number // 数据权限编号
|
||||
userId: number // 用户编号
|
||||
bizType: number // Crm 类型
|
||||
bizId: number // Crm 类型数据编号
|
||||
level: number // 权限级别
|
||||
toBizTypes?: number[] // 同时添加至
|
||||
deptName?: string // 部门名称
|
||||
nickname?: string // 用户昵称
|
||||
postNames?: string[] // 岗位名称数组
|
||||
createTime?: Date
|
||||
ids?: number[]
|
||||
}
|
||||
|
||||
export interface TransferReqVO {
|
||||
id: number // 模块编号
|
||||
newOwnerUserId: number // 新负责人的用户编号
|
||||
oldOwnerPermissionLevel?: number // 老负责人加入团队后的权限级别
|
||||
toBizTypes?: number[] // 转移客户时,需要额外有【联系人】【商机】【合同】的 checkbox 选择
|
||||
}
|
||||
|
||||
/**
|
||||
* CRM 业务类型枚举
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
export enum BizTypeEnum {
|
||||
CRM_CLUE = 1, // 线索
|
||||
CRM_CUSTOMER = 2, // 客户
|
||||
CRM_CONTACT = 3, // 联系人
|
||||
CRM_BUSINESS = 4, // 商机
|
||||
CRM_CONTRACT = 5, // 合同
|
||||
CRM_PRODUCT = 6, // 产品
|
||||
CRM_RECEIVABLE = 7, // 回款
|
||||
CRM_RECEIVABLE_PLAN = 8 // 回款计划
|
||||
}
|
||||
|
||||
/**
|
||||
* CRM 数据权限级别枚举
|
||||
*/
|
||||
export enum PermissionLevelEnum {
|
||||
OWNER = 1, // 负责人
|
||||
READ = 2, // 只读
|
||||
WRITE = 3 // 读写
|
||||
}
|
||||
|
||||
// 获得数据权限列表(查询团队成员列表)
|
||||
export const getPermissionList = async (params) => {
|
||||
return await request.get({ url: `/crm/permission/list`, params })
|
||||
}
|
||||
|
||||
// 创建数据权限(新增团队成员)
|
||||
export const createPermission = async (data: PermissionVO) => {
|
||||
return await request.post({ url: `/crm/permission/create`, data })
|
||||
}
|
||||
|
||||
// 编辑数据权限(修改团队成员权限级别)
|
||||
export const updatePermission = async (data) => {
|
||||
return await request.put({ url: `/crm/permission/update`, data })
|
||||
}
|
||||
|
||||
// 删除数据权限(删除团队成员)
|
||||
export const deletePermissionBatch = async (val: number[]) => {
|
||||
return await request.delete({ url: '/crm/permission/delete?ids=' + val.join(',') })
|
||||
}
|
||||
|
||||
// 删除自己的数据权限(退出团队)
|
||||
export const deleteSelfPermission = async (id: number) => {
|
||||
return await request.delete({ url: '/crm/permission/delete-self?id=' + id })
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// TODO @zange:挪到 product 下,建个 category 包,挪进去哈;
|
||||
export interface ProductCategoryVO {
|
||||
id: number
|
||||
name: string
|
||||
parentId: number
|
||||
}
|
||||
|
||||
// 查询产品分类详情
|
||||
export const getProductCategory = async (id: number) => {
|
||||
return await request.get({ url: `/crm/product-category/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增产品分类
|
||||
export const createProductCategory = async (data: ProductCategoryVO) => {
|
||||
return await request.post({ url: `/crm/product-category/create`, data })
|
||||
}
|
||||
|
||||
// 修改产品分类
|
||||
export const updateProductCategory = async (data: ProductCategoryVO) => {
|
||||
return await request.put({ url: `/crm/product-category/update`, data })
|
||||
}
|
||||
|
||||
// 删除产品分类
|
||||
export const deleteProductCategory = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/product-category/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 产品分类列表
|
||||
export const getProductCategoryList = async (params) => {
|
||||
return await request.get({ url: `/crm/product-category/list`, params })
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface ProductVO {
|
||||
id: number
|
||||
name: string
|
||||
no: string
|
||||
unit: number
|
||||
price: number
|
||||
status: number
|
||||
categoryId: number
|
||||
categoryName?: string
|
||||
description: string
|
||||
ownerUserId: number
|
||||
}
|
||||
|
||||
// 查询产品列表
|
||||
export const getProductPage = async (params) => {
|
||||
return await request.get({ url: `/crm/product/page`, params })
|
||||
}
|
||||
|
||||
// 获得产品精简列表
|
||||
export const getProductSimpleList = async () => {
|
||||
return await request.get({ url: `/crm/product/simple-list` })
|
||||
}
|
||||
|
||||
// 查询产品详情
|
||||
export const getProduct = async (id: number) => {
|
||||
return await request.get({ url: `/crm/product/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增产品
|
||||
export const createProduct = async (data: ProductVO) => {
|
||||
return await request.post({ url: `/crm/product/create`, data })
|
||||
}
|
||||
|
||||
// 修改产品
|
||||
export const updateProduct = async (data: ProductVO) => {
|
||||
return await request.put({ url: `/crm/product/update`, data })
|
||||
}
|
||||
|
||||
// 删除产品
|
||||
export const deleteProduct = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/product/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出产品 Excel
|
||||
export const exportProduct = async (params) => {
|
||||
return await request.download({ url: `/crm/product/export-excel`, params })
|
||||
}
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface ReceivableVO {
|
||||
id: number
|
||||
no: string
|
||||
planId?: number
|
||||
customerId?: number
|
||||
customerName?: string
|
||||
contractId?: number
|
||||
contract?: {
|
||||
id?: number
|
||||
name?: string
|
||||
no: string
|
||||
totalPrice: number
|
||||
}
|
||||
auditStatus: number
|
||||
processInstanceId: number
|
||||
returnTime: Date
|
||||
returnType: number
|
||||
price: number
|
||||
ownerUserId: number
|
||||
ownerUserName?: string
|
||||
remark: string
|
||||
creator: string // 创建人
|
||||
creatorName?: string // 创建人名称
|
||||
createTime: Date // 创建时间
|
||||
updateTime: Date // 更新时间
|
||||
}
|
||||
|
||||
// 查询回款列表
|
||||
export const getReceivablePage = async (params) => {
|
||||
return await request.get({ url: `/crm/receivable/page`, params })
|
||||
}
|
||||
|
||||
// 查询回款列表
|
||||
export const getReceivablePageByCustomer = async (params) => {
|
||||
return await request.get({ url: `/crm/receivable/page-by-customer`, params })
|
||||
}
|
||||
|
||||
// 查询回款详情
|
||||
export const getReceivable = async (id: number) => {
|
||||
return await request.get({ url: `/crm/receivable/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增回款
|
||||
export const createReceivable = async (data: ReceivableVO) => {
|
||||
return await request.post({ url: `/crm/receivable/create`, data })
|
||||
}
|
||||
|
||||
// 修改回款
|
||||
export const updateReceivable = async (data: ReceivableVO) => {
|
||||
return await request.put({ url: `/crm/receivable/update`, data })
|
||||
}
|
||||
|
||||
// 删除回款
|
||||
export const deleteReceivable = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/receivable/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出回款 Excel
|
||||
export const exportReceivable = async (params) => {
|
||||
return await request.download({ url: `/crm/receivable/export-excel`, params })
|
||||
}
|
||||
|
||||
// 提交审核
|
||||
export const submitReceivable = async (id: number) => {
|
||||
return await request.put({ url: `/crm/receivable/submit?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得待审核回款数量
|
||||
export const getAuditReceivableCount = async () => {
|
||||
return await request.get({ url: '/crm/receivable/audit-count' })
|
||||
}
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface ReceivablePlanVO {
|
||||
id: number
|
||||
period: number
|
||||
receivableId: number
|
||||
price: number
|
||||
returnTime: Date
|
||||
remindDays: number
|
||||
returnType: number
|
||||
remindTime: Date
|
||||
customerId: number
|
||||
customerName?: string
|
||||
contractId?: number
|
||||
contractNo?: string
|
||||
ownerUserId: number
|
||||
ownerUserName?: string
|
||||
remark: string
|
||||
creator: string // 创建人
|
||||
creatorName?: string // 创建人名称
|
||||
createTime: Date // 创建时间
|
||||
updateTime: Date // 更新时间
|
||||
receivable?: {
|
||||
price: number
|
||||
returnTime: Date
|
||||
}
|
||||
}
|
||||
|
||||
// 查询回款计划列表
|
||||
export const getReceivablePlanPage = async (params) => {
|
||||
return await request.get({ url: `/crm/receivable-plan/page`, params })
|
||||
}
|
||||
|
||||
// 查询回款计划列表
|
||||
export const getReceivablePlanPageByCustomer = async (params) => {
|
||||
return await request.get({ url: `/crm/receivable-plan/page-by-customer`, params })
|
||||
}
|
||||
|
||||
// 查询回款计划详情
|
||||
export const getReceivablePlan = async (id: number) => {
|
||||
return await request.get({ url: `/crm/receivable-plan/get?id=` + id })
|
||||
}
|
||||
|
||||
// 查询回款计划下拉数据
|
||||
export const getReceivablePlanSimpleList = async (customerId: number, contractId: number) => {
|
||||
return await request.get({
|
||||
url: `/crm/receivable-plan/simple-list?customerId=${customerId}&contractId=${contractId}`
|
||||
})
|
||||
}
|
||||
|
||||
// 新增回款计划
|
||||
export const createReceivablePlan = async (data: ReceivablePlanVO) => {
|
||||
return await request.post({ url: `/crm/receivable-plan/create`, data })
|
||||
}
|
||||
|
||||
// 修改回款计划
|
||||
export const updateReceivablePlan = async (data: ReceivablePlanVO) => {
|
||||
return await request.put({ url: `/crm/receivable-plan/update`, data })
|
||||
}
|
||||
|
||||
// 删除回款计划
|
||||
export const deleteReceivablePlan = async (id: number) => {
|
||||
return await request.delete({ url: `/crm/receivable-plan/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出回款计划 Excel
|
||||
export const exportReceivablePlan = async (params) => {
|
||||
return await request.download({ url: `/crm/receivable-plan/export-excel`, params })
|
||||
}
|
||||
|
||||
// 获得待回款提醒数量
|
||||
export const getReceivablePlanRemindCount = async () => {
|
||||
return await request.get({ url: '/crm/receivable-plan/remind-count' })
|
||||
}
|
||||
|
|
@ -1,168 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface CrmStatisticsCustomerSummaryByDateRespVO {
|
||||
time: string
|
||||
customerCreateCount: number
|
||||
customerDealCount: number
|
||||
}
|
||||
|
||||
export interface CrmStatisticsCustomerSummaryByUserRespVO {
|
||||
ownerUserName: string
|
||||
customerCreateCount: number
|
||||
customerDealCount: number
|
||||
contractPrice: number
|
||||
receivablePrice: number
|
||||
}
|
||||
|
||||
export interface CrmStatisticsFollowUpSummaryByDateRespVO {
|
||||
time: string
|
||||
followUpRecordCount: number
|
||||
followUpCustomerCount: number
|
||||
}
|
||||
|
||||
export interface CrmStatisticsFollowUpSummaryByUserRespVO {
|
||||
ownerUserName: string
|
||||
followupRecordCount: number
|
||||
followupCustomerCount: number
|
||||
}
|
||||
|
||||
export interface CrmStatisticsFollowUpSummaryByTypeRespVO {
|
||||
followUpType: string
|
||||
followUpRecordCount: number
|
||||
}
|
||||
|
||||
export interface CrmStatisticsCustomerContractSummaryRespVO {
|
||||
customerName: string
|
||||
contractName: string
|
||||
totalPrice: number
|
||||
receivablePrice: number
|
||||
customerType: string
|
||||
customerSource: string
|
||||
ownerUserName: string
|
||||
creatorUserName: string
|
||||
createTime: Date
|
||||
orderDate: Date
|
||||
}
|
||||
|
||||
export interface CrmStatisticsPoolSummaryByDateRespVO {
|
||||
time: string
|
||||
customerPutCount: number
|
||||
customerTakeCount: number
|
||||
}
|
||||
|
||||
export interface CrmStatisticsPoolSummaryByUserRespVO {
|
||||
ownerUserName: string
|
||||
customerPutCount: number
|
||||
customerTakeCount: number
|
||||
}
|
||||
|
||||
export interface CrmStatisticsCustomerDealCycleByDateRespVO {
|
||||
time: string
|
||||
customerDealCycle: number
|
||||
}
|
||||
|
||||
export interface CrmStatisticsCustomerDealCycleByUserRespVO {
|
||||
ownerUserName: string
|
||||
customerDealCycle: number
|
||||
customerDealCount: number
|
||||
}
|
||||
|
||||
export interface CrmStatisticsCustomerDealCycleByAreaRespVO {
|
||||
areaName: string
|
||||
customerDealCycle: number
|
||||
customerDealCount: number
|
||||
}
|
||||
|
||||
export interface CrmStatisticsCustomerDealCycleByProductRespVO {
|
||||
productName: string
|
||||
customerDealCycle: number
|
||||
customerDealCount: number
|
||||
}
|
||||
|
||||
// 客户分析 API
|
||||
export const StatisticsCustomerApi = {
|
||||
// 1.1 客户总量分析(按日期)
|
||||
getCustomerSummaryByDate: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-customer/get-customer-summary-by-date',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 1.2 客户总量分析(按用户)
|
||||
getCustomerSummaryByUser: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-customer/get-customer-summary-by-user',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 2.1 客户跟进次数分析(按日期)
|
||||
getFollowUpSummaryByDate: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-customer/get-follow-up-summary-by-date',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 2.2 客户跟进次数分析(按用户)
|
||||
getFollowUpSummaryByUser: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-customer/get-follow-up-summary-by-user',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 3.1 获取客户跟进方式统计数
|
||||
getFollowUpSummaryByType: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-customer/get-follow-up-summary-by-type',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 4.1 合同摘要信息(客户转化率页面)
|
||||
getContractSummary: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-customer/get-contract-summary',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 5.1 获取客户公海分析(按日期)
|
||||
getPoolSummaryByDate: (param: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-customer/get-pool-summary-by-date',
|
||||
params: param
|
||||
})
|
||||
},
|
||||
// 5.2 获取客户公海分析(按用户)
|
||||
getPoolSummaryByUser: (param: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-customer/get-pool-summary-by-user',
|
||||
params: param
|
||||
})
|
||||
},
|
||||
// 6.1 获取客户成交周期(按日期)
|
||||
getCustomerDealCycleByDate: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-customer/get-customer-deal-cycle-by-date',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 6.2 获取客户成交周期(按用户)
|
||||
getCustomerDealCycleByUser: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-customer/get-customer-deal-cycle-by-user',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 6.2 获取客户成交周期(按用户)
|
||||
getCustomerDealCycleByArea: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-customer/get-customer-deal-cycle-by-area',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 6.2 获取客户成交周期(按用户)
|
||||
getCustomerDealCycleByProduct: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-customer/get-customer-deal-cycle-by-product',
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface CrmStatisticFunnelRespVO {
|
||||
customerCount: number // 客户数
|
||||
businessCount: number // 商机数
|
||||
businessWinCount: number // 赢单数
|
||||
}
|
||||
|
||||
export interface CrmStatisticsBusinessSummaryByDateRespVO {
|
||||
time: string // 时间
|
||||
businessCreateCount: number // 商机数
|
||||
totalPrice: number | string // 商机金额
|
||||
}
|
||||
|
||||
export interface CrmStatisticsBusinessInversionRateSummaryByDateRespVO {
|
||||
time: string // 时间
|
||||
businessCount: number // 商机数量
|
||||
businessWinCount: number // 赢单商机数
|
||||
}
|
||||
|
||||
// 客户分析 API
|
||||
export const StatisticFunnelApi = {
|
||||
// 1. 获取销售漏斗统计数据
|
||||
getFunnelSummary: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-funnel/get-funnel-summary',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 2. 获取商机结束状态统计
|
||||
getBusinessSummaryByEndStatus: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-funnel/get-business-summary-by-end-status',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 3. 获取新增商机分析(按日期)
|
||||
getBusinessSummaryByDate: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-funnel/get-business-summary-by-date',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 4. 获取商机转化率分析(按日期)
|
||||
getBusinessInversionRateSummaryByDate: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-funnel/get-business-inversion-rate-summary-by-date',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 5. 获取商机列表(按日期)
|
||||
getBusinessPageByDate: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-funnel/get-business-page-by-date',
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface StatisticsPerformanceRespVO {
|
||||
time: string
|
||||
currentMonthCount: number
|
||||
lastMonthCount: number
|
||||
lastYearCount: number
|
||||
}
|
||||
|
||||
// 排行 API
|
||||
export const StatisticsPerformanceApi = {
|
||||
// 员工获得合同金额统计
|
||||
getContractPricePerformance: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-performance/get-contract-price-performance',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 员工获得回款统计
|
||||
getReceivablePricePerformance: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-performance/get-receivable-price-performance',
|
||||
params
|
||||
})
|
||||
},
|
||||
//员工获得签约合同数量统计
|
||||
getContractCountPerformance: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-performance/get-contract-count-performance',
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface CrmStatisticCustomerBaseRespVO {
|
||||
customerCount: number
|
||||
dealCount: number
|
||||
dealPortion: string | number
|
||||
}
|
||||
|
||||
export interface CrmStatisticCustomerIndustryRespVO extends CrmStatisticCustomerBaseRespVO {
|
||||
industryId: number
|
||||
industryPortion: string | number
|
||||
}
|
||||
|
||||
export interface CrmStatisticCustomerSourceRespVO extends CrmStatisticCustomerBaseRespVO {
|
||||
source: number
|
||||
sourcePortion: string | number
|
||||
}
|
||||
|
||||
export interface CrmStatisticCustomerLevelRespVO extends CrmStatisticCustomerBaseRespVO {
|
||||
level: number
|
||||
levelPortion: string | number
|
||||
}
|
||||
|
||||
export interface CrmStatisticCustomerAreaRespVO extends CrmStatisticCustomerBaseRespVO {
|
||||
areaId: number
|
||||
areaName: string
|
||||
areaPortion: string | number
|
||||
}
|
||||
|
||||
// 客户分析 API
|
||||
export const StatisticsPortraitApi = {
|
||||
// 1. 获取客户行业统计数据
|
||||
getCustomerIndustry: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-portrait/get-customer-industry-summary',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 2. 获取客户来源统计数据
|
||||
getCustomerSource: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-portrait/get-customer-source-summary',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 3. 获取客户级别统计数据
|
||||
getCustomerLevel: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-portrait/get-customer-level-summary',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 4. 获取客户地区统计数据
|
||||
getCustomerArea: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-portrait/get-customer-area-summary',
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface StatisticsRankRespVO {
|
||||
count: number
|
||||
nickname: string
|
||||
deptName: string
|
||||
}
|
||||
|
||||
// 排行 API
|
||||
export const StatisticsRankApi = {
|
||||
// 获得合同排行榜
|
||||
getContractPriceRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-contract-price-rank',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 获得回款排行榜
|
||||
getReceivablePriceRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-receivable-price-rank',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 签约合同排行
|
||||
getContractCountRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-contract-count-rank',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 产品销量排行
|
||||
getProductSalesRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-product-sales-rank',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 新增客户数排行
|
||||
getCustomerCountRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-customer-count-rank',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 新增联系人数排行
|
||||
getContactsCountRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-contacts-count-rank',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 跟进次数排行
|
||||
getFollowCountRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-follow-count-rank',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 跟进客户数排行
|
||||
getFollowCustomerCountRank: (params: any) => {
|
||||
return request.get({
|
||||
url: '/crm/statistics-rank/get-follow-customer-count-rank',
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 结算账户 VO
|
||||
export interface AccountVO {
|
||||
id: number // 结算账户编号
|
||||
no: string // 账户编码
|
||||
remark: string // 备注
|
||||
status: number // 开启状态
|
||||
sort: number // 排序
|
||||
defaultStatus: boolean // 是否默认
|
||||
name: string // 账户名称
|
||||
}
|
||||
|
||||
// ERP 结算账户 API
|
||||
export const AccountApi = {
|
||||
// 查询结算账户分页
|
||||
getAccountPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/account/page`, params })
|
||||
},
|
||||
|
||||
// 查询结算账户精简列表
|
||||
getAccountSimpleList: async () => {
|
||||
return await request.get({ url: `/erp/account/simple-list` })
|
||||
},
|
||||
|
||||
// 查询结算账户详情
|
||||
getAccount: async (id: number) => {
|
||||
return await request.get({ url: `/erp/account/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增结算账户
|
||||
createAccount: async (data: AccountVO) => {
|
||||
return await request.post({ url: `/erp/account/create`, data })
|
||||
},
|
||||
|
||||
// 修改结算账户
|
||||
updateAccount: async (data: AccountVO) => {
|
||||
return await request.put({ url: `/erp/account/update`, data })
|
||||
},
|
||||
|
||||
// 修改结算账户默认状态
|
||||
updateAccountDefaultStatus: async (id: number, defaultStatus: boolean) => {
|
||||
return await request.put({
|
||||
url: `/erp/account/update-default-status`,
|
||||
params: {
|
||||
id,
|
||||
defaultStatus
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除结算账户
|
||||
deleteAccount: async (id: number) => {
|
||||
return await request.delete({ url: `/erp/account/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出结算账户 Excel
|
||||
exportAccount: async (params: any) => {
|
||||
return await request.download({ url: `/erp/account/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 付款单 VO
|
||||
export interface FinancePaymentVO {
|
||||
id: number // 付款单编号
|
||||
no: string // 付款单号
|
||||
supplierId: number // 供应商编号
|
||||
paymentTime: Date // 付款时间
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 付款单 API
|
||||
export const FinancePaymentApi = {
|
||||
// 查询付款单分页
|
||||
getFinancePaymentPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/finance-payment/page`, params })
|
||||
},
|
||||
|
||||
// 查询付款单详情
|
||||
getFinancePayment: async (id: number) => {
|
||||
return await request.get({ url: `/erp/finance-payment/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增付款单
|
||||
createFinancePayment: async (data: FinancePaymentVO) => {
|
||||
return await request.post({ url: `/erp/finance-payment/create`, data })
|
||||
},
|
||||
|
||||
// 修改付款单
|
||||
updateFinancePayment: async (data: FinancePaymentVO) => {
|
||||
return await request.put({ url: `/erp/finance-payment/update`, data })
|
||||
},
|
||||
|
||||
// 更新付款单的状态
|
||||
updateFinancePaymentStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/finance-payment/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除付款单
|
||||
deleteFinancePayment: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/finance-payment/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出付款单 Excel
|
||||
exportFinancePayment: async (params: any) => {
|
||||
return await request.download({ url: `/erp/finance-payment/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 收款单 VO
|
||||
export interface FinanceReceiptVO {
|
||||
id: number // 收款单编号
|
||||
no: string // 收款单号
|
||||
customerId: number // 客户编号
|
||||
receiptTime: Date // 收款时间
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 收款单 API
|
||||
export const FinanceReceiptApi = {
|
||||
// 查询收款单分页
|
||||
getFinanceReceiptPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/finance-receipt/page`, params })
|
||||
},
|
||||
|
||||
// 查询收款单详情
|
||||
getFinanceReceipt: async (id: number) => {
|
||||
return await request.get({ url: `/erp/finance-receipt/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增收款单
|
||||
createFinanceReceipt: async (data: FinanceReceiptVO) => {
|
||||
return await request.post({ url: `/erp/finance-receipt/create`, data })
|
||||
},
|
||||
|
||||
// 修改收款单
|
||||
updateFinanceReceipt: async (data: FinanceReceiptVO) => {
|
||||
return await request.put({ url: `/erp/finance-receipt/update`, data })
|
||||
},
|
||||
|
||||
// 更新收款单的状态
|
||||
updateFinanceReceiptStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/finance-receipt/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除收款单
|
||||
deleteFinanceReceipt: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/finance-receipt/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出收款单 Excel
|
||||
exportFinanceReceipt: async (params: any) => {
|
||||
return await request.download({ url: `/erp/finance-receipt/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 产品分类 VO
|
||||
export interface ProductCategoryVO {
|
||||
id: number // 分类编号
|
||||
parentId: number // 父分类编号
|
||||
name: string // 分类名称
|
||||
code: string // 分类编码
|
||||
sort: number // 分类排序
|
||||
status: number // 开启状态
|
||||
}
|
||||
|
||||
// ERP 产品分类 API
|
||||
export const ProductCategoryApi = {
|
||||
// 查询产品分类列表
|
||||
getProductCategoryList: async () => {
|
||||
return await request.get({ url: `/erp/product-category/list` })
|
||||
},
|
||||
|
||||
// 查询产品分类精简列表
|
||||
getProductCategorySimpleList: async () => {
|
||||
return await request.get({ url: `/erp/product-category/simple-list` })
|
||||
},
|
||||
|
||||
// 查询产品分类详情
|
||||
getProductCategory: async (id: number) => {
|
||||
return await request.get({ url: `/erp/product-category/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增产品分类
|
||||
createProductCategory: async (data: ProductCategoryVO) => {
|
||||
return await request.post({ url: `/erp/product-category/create`, data })
|
||||
},
|
||||
|
||||
// 修改产品分类
|
||||
updateProductCategory: async (data: ProductCategoryVO) => {
|
||||
return await request.put({ url: `/erp/product-category/update`, data })
|
||||
},
|
||||
|
||||
// 删除产品分类
|
||||
deleteProductCategory: async (id: number) => {
|
||||
return await request.delete({ url: `/erp/product-category/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出产品分类 Excel
|
||||
exportProductCategory: async (params) => {
|
||||
return await request.download({ url: `/erp/product-category/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 产品 VO
|
||||
export interface ProductVO {
|
||||
id: number // 产品编号
|
||||
name: string // 产品名称
|
||||
barCode: string // 产品条码
|
||||
categoryId: number // 产品类型编号
|
||||
unitId: number // 单位编号
|
||||
unitName?: string // 单位名字
|
||||
status: number // 产品状态
|
||||
standard: string // 产品规格
|
||||
remark: string // 产品备注
|
||||
expiryDay: number // 保质期天数
|
||||
weight: number // 重量(kg)
|
||||
purchasePrice: number // 采购价格,单位:元
|
||||
salePrice: number // 销售价格,单位:元
|
||||
minPrice: number // 最低价格,单位:元
|
||||
}
|
||||
|
||||
// ERP 产品 API
|
||||
export const ProductApi = {
|
||||
// 查询产品分页
|
||||
getProductPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/product/page`, params })
|
||||
},
|
||||
|
||||
// 查询产品精简列表
|
||||
getProductSimpleList: async () => {
|
||||
return await request.get({ url: `/erp/product/simple-list` })
|
||||
},
|
||||
|
||||
// 查询产品详情
|
||||
getProduct: async (id: number) => {
|
||||
return await request.get({ url: `/erp/product/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增产品
|
||||
createProduct: async (data: ProductVO) => {
|
||||
return await request.post({ url: `/erp/product/create`, data })
|
||||
},
|
||||
|
||||
// 修改产品
|
||||
updateProduct: async (data: ProductVO) => {
|
||||
return await request.put({ url: `/erp/product/update`, data })
|
||||
},
|
||||
|
||||
// 删除产品
|
||||
deleteProduct: async (id: number) => {
|
||||
return await request.delete({ url: `/erp/product/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出产品 Excel
|
||||
exportProduct: async (params) => {
|
||||
return await request.download({ url: `/erp/product/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 产品单位 VO
|
||||
export interface ProductUnitVO {
|
||||
id: number // 单位编号
|
||||
name: string // 单位名字
|
||||
status: number // 单位状态
|
||||
}
|
||||
|
||||
// ERP 产品单位 API
|
||||
export const ProductUnitApi = {
|
||||
// 查询产品单位分页
|
||||
getProductUnitPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/product-unit/page`, params })
|
||||
},
|
||||
|
||||
// 查询产品单位精简列表
|
||||
getProductUnitSimpleList: async () => {
|
||||
return await request.get({ url: `/erp/product-unit/simple-list` })
|
||||
},
|
||||
|
||||
// 查询产品单位详情
|
||||
getProductUnit: async (id: number) => {
|
||||
return await request.get({ url: `/erp/product-unit/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增产品单位
|
||||
createProductUnit: async (data: ProductUnitVO) => {
|
||||
return await request.post({ url: `/erp/product-unit/create`, data })
|
||||
},
|
||||
|
||||
// 修改产品单位
|
||||
updateProductUnit: async (data: ProductUnitVO) => {
|
||||
return await request.put({ url: `/erp/product-unit/update`, data })
|
||||
},
|
||||
|
||||
// 删除产品单位
|
||||
deleteProductUnit: async (id: number) => {
|
||||
return await request.delete({ url: `/erp/product-unit/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出产品单位 Excel
|
||||
exportProductUnit: async (params) => {
|
||||
return await request.download({ url: `/erp/product-unit/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 采购入库 VO
|
||||
export interface PurchaseInVO {
|
||||
id: number // 入库工单编号
|
||||
no: string // 采购入库号
|
||||
customerId: number // 客户编号
|
||||
inTime: Date // 入库时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
outCount: number // 采购出库数量
|
||||
returnCount: number // 采购退货数量
|
||||
}
|
||||
|
||||
// ERP 采购入库 API
|
||||
export const PurchaseInApi = {
|
||||
// 查询采购入库分页
|
||||
getPurchaseInPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/purchase-in/page`, params })
|
||||
},
|
||||
|
||||
// 查询采购入库详情
|
||||
getPurchaseIn: async (id: number) => {
|
||||
return await request.get({ url: `/erp/purchase-in/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增采购入库
|
||||
createPurchaseIn: async (data: PurchaseInVO) => {
|
||||
return await request.post({ url: `/erp/purchase-in/create`, data })
|
||||
},
|
||||
|
||||
// 修改采购入库
|
||||
updatePurchaseIn: async (data: PurchaseInVO) => {
|
||||
return await request.put({ url: `/erp/purchase-in/update`, data })
|
||||
},
|
||||
|
||||
// 更新采购入库的状态
|
||||
updatePurchaseInStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/purchase-in/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除采购入库
|
||||
deletePurchaseIn: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/purchase-in/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出采购入库 Excel
|
||||
exportPurchaseIn: async (params: any) => {
|
||||
return await request.download({ url: `/erp/purchase-in/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 采购订单 VO
|
||||
export interface PurchaseOrderVO {
|
||||
id: number // 订单工单编号
|
||||
no: string // 采购订单号
|
||||
customerId: number // 客户编号
|
||||
orderTime: Date // 订单时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
outCount: number // 采购出库数量
|
||||
returnCount: number // 采购退货数量
|
||||
}
|
||||
|
||||
// ERP 采购订单 API
|
||||
export const PurchaseOrderApi = {
|
||||
// 查询采购订单分页
|
||||
getPurchaseOrderPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/purchase-order/page`, params })
|
||||
},
|
||||
|
||||
// 查询采购订单详情
|
||||
getPurchaseOrder: async (id: number) => {
|
||||
return await request.get({ url: `/erp/purchase-order/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增采购订单
|
||||
createPurchaseOrder: async (data: PurchaseOrderVO) => {
|
||||
return await request.post({ url: `/erp/purchase-order/create`, data })
|
||||
},
|
||||
|
||||
// 修改采购订单
|
||||
updatePurchaseOrder: async (data: PurchaseOrderVO) => {
|
||||
return await request.put({ url: `/erp/purchase-order/update`, data })
|
||||
},
|
||||
|
||||
// 更新采购订单的状态
|
||||
updatePurchaseOrderStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/purchase-order/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除采购订单
|
||||
deletePurchaseOrder: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/purchase-order/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出采购订单 Excel
|
||||
exportPurchaseOrder: async (params: any) => {
|
||||
return await request.download({ url: `/erp/purchase-order/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 采购退货 VO
|
||||
export interface PurchaseReturnVO {
|
||||
id: number // 采购退货编号
|
||||
no: string // 采购退货号
|
||||
customerId: number // 客户编号
|
||||
returnTime: Date // 退货时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 采购退货 API
|
||||
export const PurchaseReturnApi = {
|
||||
// 查询采购退货分页
|
||||
getPurchaseReturnPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/purchase-return/page`, params })
|
||||
},
|
||||
|
||||
// 查询采购退货详情
|
||||
getPurchaseReturn: async (id: number) => {
|
||||
return await request.get({ url: `/erp/purchase-return/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增采购退货
|
||||
createPurchaseReturn: async (data: PurchaseReturnVO) => {
|
||||
return await request.post({ url: `/erp/purchase-return/create`, data })
|
||||
},
|
||||
|
||||
// 修改采购退货
|
||||
updatePurchaseReturn: async (data: PurchaseReturnVO) => {
|
||||
return await request.put({ url: `/erp/purchase-return/update`, data })
|
||||
},
|
||||
|
||||
// 更新采购退货的状态
|
||||
updatePurchaseReturnStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/purchase-return/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除采购退货
|
||||
deletePurchaseReturn: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/purchase-return/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出采购退货 Excel
|
||||
exportPurchaseReturn: async (params: any) => {
|
||||
return await request.download({ url: `/erp/purchase-return/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 供应商 VO
|
||||
export interface SupplierVO {
|
||||
id: number // 供应商编号
|
||||
name: string // 供应商名称
|
||||
contact: string // 联系人
|
||||
mobile: string // 手机号码
|
||||
telephone: string // 联系电话
|
||||
email: string // 电子邮箱
|
||||
fax: string // 传真
|
||||
remark: string // 备注
|
||||
status: number // 开启状态
|
||||
sort: number // 排序
|
||||
taxNo: string // 纳税人识别号
|
||||
taxPercent: number // 税率
|
||||
bankName: string // 开户行
|
||||
bankAccount: string // 开户账号
|
||||
bankAddress: string // 开户地址
|
||||
}
|
||||
|
||||
// ERP 供应商 API
|
||||
export const SupplierApi = {
|
||||
// 查询供应商分页
|
||||
getSupplierPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/supplier/page`, params })
|
||||
},
|
||||
|
||||
// 获得供应商精简列表
|
||||
getSupplierSimpleList: async () => {
|
||||
return await request.get({ url: `/erp/supplier/simple-list` })
|
||||
},
|
||||
|
||||
// 查询供应商详情
|
||||
getSupplier: async (id: number) => {
|
||||
return await request.get({ url: `/erp/supplier/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增供应商
|
||||
createSupplier: async (data: SupplierVO) => {
|
||||
return await request.post({ url: `/erp/supplier/create`, data })
|
||||
},
|
||||
|
||||
// 修改供应商
|
||||
updateSupplier: async (data: SupplierVO) => {
|
||||
return await request.put({ url: `/erp/supplier/update`, data })
|
||||
},
|
||||
|
||||
// 删除供应商
|
||||
deleteSupplier: async (id: number) => {
|
||||
return await request.delete({ url: `/erp/supplier/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出供应商 Excel
|
||||
exportSupplier: async (params) => {
|
||||
return await request.download({ url: `/erp/supplier/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 客户 VO
|
||||
export interface CustomerVO {
|
||||
id: number // 客户编号
|
||||
name: string // 客户名称
|
||||
contact: string // 联系人
|
||||
mobile: string // 手机号码
|
||||
telephone: string // 联系电话
|
||||
email: string // 电子邮箱
|
||||
fax: string // 传真
|
||||
remark: string // 备注
|
||||
status: number // 开启状态
|
||||
sort: number // 排序
|
||||
taxNo: string // 纳税人识别号
|
||||
taxPercent: number // 税率
|
||||
bankName: string // 开户行
|
||||
bankAccount: string // 开户账号
|
||||
bankAddress: string // 开户地址
|
||||
}
|
||||
|
||||
// ERP 客户 API
|
||||
export const CustomerApi = {
|
||||
// 查询客户分页
|
||||
getCustomerPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/customer/page`, params })
|
||||
},
|
||||
|
||||
// 查询客户精简列表
|
||||
getCustomerSimpleList: async () => {
|
||||
return await request.get({ url: `/erp/customer/simple-list` })
|
||||
},
|
||||
|
||||
// 查询客户详情
|
||||
getCustomer: async (id: number) => {
|
||||
return await request.get({ url: `/erp/customer/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增客户
|
||||
createCustomer: async (data: CustomerVO) => {
|
||||
return await request.post({ url: `/erp/customer/create`, data })
|
||||
},
|
||||
|
||||
// 修改客户
|
||||
updateCustomer: async (data: CustomerVO) => {
|
||||
return await request.put({ url: `/erp/customer/update`, data })
|
||||
},
|
||||
|
||||
// 删除客户
|
||||
deleteCustomer: async (id: number) => {
|
||||
return await request.delete({ url: `/erp/customer/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出客户 Excel
|
||||
exportCustomer: async (params) => {
|
||||
return await request.download({ url: `/erp/customer/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 销售订单 VO
|
||||
export interface SaleOrderVO {
|
||||
id: number // 订单工单编号
|
||||
no: string // 销售订单号
|
||||
customerId: number // 客户编号
|
||||
orderTime: Date // 订单时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
outCount: number // 销售出库数量
|
||||
returnCount: number // 销售退货数量
|
||||
}
|
||||
|
||||
// ERP 销售订单 API
|
||||
export const SaleOrderApi = {
|
||||
// 查询销售订单分页
|
||||
getSaleOrderPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/sale-order/page`, params })
|
||||
},
|
||||
|
||||
// 查询销售订单详情
|
||||
getSaleOrder: async (id: number) => {
|
||||
return await request.get({ url: `/erp/sale-order/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增销售订单
|
||||
createSaleOrder: async (data: SaleOrderVO) => {
|
||||
return await request.post({ url: `/erp/sale-order/create`, data })
|
||||
},
|
||||
|
||||
// 修改销售订单
|
||||
updateSaleOrder: async (data: SaleOrderVO) => {
|
||||
return await request.put({ url: `/erp/sale-order/update`, data })
|
||||
},
|
||||
|
||||
// 更新销售订单的状态
|
||||
updateSaleOrderStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/sale-order/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除销售订单
|
||||
deleteSaleOrder: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/sale-order/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出销售订单 Excel
|
||||
exportSaleOrder: async (params: any) => {
|
||||
return await request.download({ url: `/erp/sale-order/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 销售出库 VO
|
||||
export interface SaleOutVO {
|
||||
id: number // 销售出库编号
|
||||
no: string // 销售出库号
|
||||
customerId: number // 客户编号
|
||||
outTime: Date // 出库时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 销售出库 API
|
||||
export const SaleOutApi = {
|
||||
// 查询销售出库分页
|
||||
getSaleOutPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/sale-out/page`, params })
|
||||
},
|
||||
|
||||
// 查询销售出库详情
|
||||
getSaleOut: async (id: number) => {
|
||||
return await request.get({ url: `/erp/sale-out/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增销售出库
|
||||
createSaleOut: async (data: SaleOutVO) => {
|
||||
return await request.post({ url: `/erp/sale-out/create`, data })
|
||||
},
|
||||
|
||||
// 修改销售出库
|
||||
updateSaleOut: async (data: SaleOutVO) => {
|
||||
return await request.put({ url: `/erp/sale-out/update`, data })
|
||||
},
|
||||
|
||||
// 更新销售出库的状态
|
||||
updateSaleOutStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/sale-out/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除销售出库
|
||||
deleteSaleOut: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/sale-out/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出销售出库 Excel
|
||||
exportSaleOut: async (params: any) => {
|
||||
return await request.download({ url: `/erp/sale-out/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 销售退货 VO
|
||||
export interface SaleReturnVO {
|
||||
id: number // 销售退货编号
|
||||
no: string // 销售退货号
|
||||
customerId: number // 客户编号
|
||||
returnTime: Date // 退货时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 销售退货 API
|
||||
export const SaleReturnApi = {
|
||||
// 查询销售退货分页
|
||||
getSaleReturnPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/sale-return/page`, params })
|
||||
},
|
||||
|
||||
// 查询销售退货详情
|
||||
getSaleReturn: async (id: number) => {
|
||||
return await request.get({ url: `/erp/sale-return/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增销售退货
|
||||
createSaleReturn: async (data: SaleReturnVO) => {
|
||||
return await request.post({ url: `/erp/sale-return/create`, data })
|
||||
},
|
||||
|
||||
// 修改销售退货
|
||||
updateSaleReturn: async (data: SaleReturnVO) => {
|
||||
return await request.put({ url: `/erp/sale-return/update`, data })
|
||||
},
|
||||
|
||||
// 更新销售退货的状态
|
||||
updateSaleReturnStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/sale-return/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除销售退货
|
||||
deleteSaleReturn: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/sale-return/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出销售退货 Excel
|
||||
exportSaleReturn: async (params: any) => {
|
||||
return await request.download({ url: `/erp/sale-return/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 采购全局统计 VO
|
||||
export interface ErpPurchaseSummaryRespVO {
|
||||
todayPrice: number // 今日采购金额
|
||||
yesterdayPrice: number // 昨日采购金额
|
||||
monthPrice: number // 本月采购金额
|
||||
yearPrice: number // 今年采购金额
|
||||
}
|
||||
|
||||
// ERP 采购时间段统计 VO
|
||||
export interface ErpPurchaseTimeSummaryRespVO {
|
||||
time: string // 时间
|
||||
price: number // 采购金额
|
||||
}
|
||||
|
||||
// ERP 采购统计 API
|
||||
export const PurchaseStatisticsApi = {
|
||||
// 获得采购统计
|
||||
getPurchaseSummary: async (): Promise<ErpPurchaseSummaryRespVO> => {
|
||||
return await request.get({ url: `/erp/purchase-statistics/summary` })
|
||||
},
|
||||
|
||||
// 获得采购时间段统计
|
||||
getPurchaseTimeSummary: async (): Promise<ErpPurchaseTimeSummaryRespVO[]> => {
|
||||
return await request.get({ url: `/erp/purchase-statistics/time-summary` })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 销售全局统计 VO
|
||||
export interface ErpSaleSummaryRespVO {
|
||||
todayPrice: number // 今日销售金额
|
||||
yesterdayPrice: number // 昨日销售金额
|
||||
monthPrice: number // 本月销售金额
|
||||
yearPrice: number // 今年销售金额
|
||||
}
|
||||
|
||||
// ERP 销售时间段统计 VO
|
||||
export interface ErpSaleTimeSummaryRespVO {
|
||||
time: string // 时间
|
||||
price: number // 销售金额
|
||||
}
|
||||
|
||||
// ERP 销售统计 API
|
||||
export const SaleStatisticsApi = {
|
||||
// 获得销售统计
|
||||
getSaleSummary: async (): Promise<ErpSaleSummaryRespVO> => {
|
||||
return await request.get({ url: `/erp/sale-statistics/summary` })
|
||||
},
|
||||
|
||||
// 获得销售时间段统计
|
||||
getSaleTimeSummary: async (): Promise<ErpSaleTimeSummaryRespVO[]> => {
|
||||
return await request.get({ url: `/erp/sale-statistics/time-summary` })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 库存盘点单 VO
|
||||
export interface StockCheckVO {
|
||||
id: number // 出库编号
|
||||
no: string // 出库单号
|
||||
outTime: Date // 出库时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 库存盘点单 API
|
||||
export const StockCheckApi = {
|
||||
// 查询库存盘点单分页
|
||||
getStockCheckPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/stock-check/page`, params })
|
||||
},
|
||||
|
||||
// 查询库存盘点单详情
|
||||
getStockCheck: async (id: number) => {
|
||||
return await request.get({ url: `/erp/stock-check/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增库存盘点单
|
||||
createStockCheck: async (data: StockCheckVO) => {
|
||||
return await request.post({ url: `/erp/stock-check/create`, data })
|
||||
},
|
||||
|
||||
// 修改库存盘点单
|
||||
updateStockCheck: async (data: StockCheckVO) => {
|
||||
return await request.put({ url: `/erp/stock-check/update`, data })
|
||||
},
|
||||
|
||||
// 更新库存盘点单的状态
|
||||
updateStockCheckStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/stock-check/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除库存盘点单
|
||||
deleteStockCheck: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/stock-check/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出库存盘点单 Excel
|
||||
exportStockCheck: async (params) => {
|
||||
return await request.download({ url: `/erp/stock-check/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 其它入库单 VO
|
||||
export interface StockInVO {
|
||||
id: number // 入库编号
|
||||
no: string // 入库单号
|
||||
supplierId: number // 供应商编号
|
||||
inTime: Date // 入库时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 其它入库单 API
|
||||
export const StockInApi = {
|
||||
// 查询其它入库单分页
|
||||
getStockInPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/stock-in/page`, params })
|
||||
},
|
||||
|
||||
// 查询其它入库单详情
|
||||
getStockIn: async (id: number) => {
|
||||
return await request.get({ url: `/erp/stock-in/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增其它入库单
|
||||
createStockIn: async (data: StockInVO) => {
|
||||
return await request.post({ url: `/erp/stock-in/create`, data })
|
||||
},
|
||||
|
||||
// 修改其它入库单
|
||||
updateStockIn: async (data: StockInVO) => {
|
||||
return await request.put({ url: `/erp/stock-in/update`, data })
|
||||
},
|
||||
|
||||
// 更新其它入库单的状态
|
||||
updateStockInStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/stock-in/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除其它入库单
|
||||
deleteStockIn: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/stock-in/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出其它入库单 Excel
|
||||
exportStockIn: async (params) => {
|
||||
return await request.download({ url: `/erp/stock-in/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 库存调度单 VO
|
||||
export interface StockMoveVO {
|
||||
id: number // 出库编号
|
||||
no: string // 出库单号
|
||||
outTime: Date // 出库时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 库存调度单 API
|
||||
export const StockMoveApi = {
|
||||
// 查询库存调度单分页
|
||||
getStockMovePage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/stock-move/page`, params })
|
||||
},
|
||||
|
||||
// 查询库存调度单详情
|
||||
getStockMove: async (id: number) => {
|
||||
return await request.get({ url: `/erp/stock-move/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增库存调度单
|
||||
createStockMove: async (data: StockMoveVO) => {
|
||||
return await request.post({ url: `/erp/stock-move/create`, data })
|
||||
},
|
||||
|
||||
// 修改库存调度单
|
||||
updateStockMove: async (data: StockMoveVO) => {
|
||||
return await request.put({ url: `/erp/stock-move/update`, data })
|
||||
},
|
||||
|
||||
// 更新库存调度单的状态
|
||||
updateStockMoveStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/stock-move/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除库存调度单
|
||||
deleteStockMove: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/stock-move/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出库存调度单 Excel
|
||||
exportStockMove: async (params) => {
|
||||
return await request.download({ url: `/erp/stock-move/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 其它出库单 VO
|
||||
export interface StockOutVO {
|
||||
id: number // 出库编号
|
||||
no: string // 出库单号
|
||||
customerId: number // 客户编号
|
||||
outTime: Date // 出库时间
|
||||
totalCount: number // 合计数量
|
||||
totalPrice: number // 合计金额,单位:元
|
||||
status: number // 状态
|
||||
remark: string // 备注
|
||||
}
|
||||
|
||||
// ERP 其它出库单 API
|
||||
export const StockOutApi = {
|
||||
// 查询其它出库单分页
|
||||
getStockOutPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/stock-out/page`, params })
|
||||
},
|
||||
|
||||
// 查询其它出库单详情
|
||||
getStockOut: async (id: number) => {
|
||||
return await request.get({ url: `/erp/stock-out/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增其它出库单
|
||||
createStockOut: async (data: StockOutVO) => {
|
||||
return await request.post({ url: `/erp/stock-out/create`, data })
|
||||
},
|
||||
|
||||
// 修改其它出库单
|
||||
updateStockOut: async (data: StockOutVO) => {
|
||||
return await request.put({ url: `/erp/stock-out/update`, data })
|
||||
},
|
||||
|
||||
// 更新其它出库单的状态
|
||||
updateStockOutStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/erp/stock-out/update-status`,
|
||||
params: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除其它出库单
|
||||
deleteStockOut: async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: `/erp/stock-out/delete`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 导出其它出库单 Excel
|
||||
exportStockOut: async (params) => {
|
||||
return await request.download({ url: `/erp/stock-out/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 产品库存明细 VO
|
||||
export interface StockRecordVO {
|
||||
id: number // 编号
|
||||
productId: number // 产品编号
|
||||
warehouseId: number // 仓库编号
|
||||
count: number // 出入库数量
|
||||
totalCount: number // 总库存量
|
||||
bizType: number // 业务类型
|
||||
bizId: number // 业务编号
|
||||
bizItemId: number // 业务项编号
|
||||
bizNo: string // 业务单号
|
||||
}
|
||||
|
||||
// ERP 产品库存明细 API
|
||||
export const StockRecordApi = {
|
||||
// 查询产品库存明细分页
|
||||
getStockRecordPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/stock-record/page`, params })
|
||||
},
|
||||
|
||||
// 查询产品库存明细详情
|
||||
getStockRecord: async (id: number) => {
|
||||
return await request.get({ url: `/erp/stock-record/get?id=` + id })
|
||||
},
|
||||
|
||||
// 导出产品库存明细 Excel
|
||||
exportStockRecord: async (params) => {
|
||||
return await request.download({ url: `/erp/stock-record/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 产品库存 VO
|
||||
export interface StockVO {
|
||||
// 编号
|
||||
id: number
|
||||
// 产品编号
|
||||
productId: number
|
||||
// 仓库编号
|
||||
warehouseId: number
|
||||
// 库存数量
|
||||
count: number
|
||||
}
|
||||
|
||||
// ERP 产品库存 API
|
||||
export const StockApi = {
|
||||
// 查询产品库存分页
|
||||
getStockPage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/stock/page`, params })
|
||||
},
|
||||
|
||||
// 查询产品库存详情
|
||||
getStock: async (id: number) => {
|
||||
return await request.get({ url: `/erp/stock/get?id=` + id })
|
||||
},
|
||||
|
||||
// 查询产品库存详情
|
||||
getStock2: async (productId: number, warehouseId: number) => {
|
||||
return await request.get({ url: `/erp/stock/get`, params: { productId, warehouseId } })
|
||||
},
|
||||
|
||||
// 获得产品库存数量
|
||||
getStockCount: async (productId: number) => {
|
||||
return await request.get({ url: `/erp/stock/get-count`, params: { productId } })
|
||||
},
|
||||
|
||||
// 导出产品库存 Excel
|
||||
exportStock: async (params) => {
|
||||
return await request.download({ url: `/erp/stock/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// ERP 仓库 VO
|
||||
export interface WarehouseVO {
|
||||
id: number // 仓库编号
|
||||
name: string // 仓库名称
|
||||
address: string // 仓库地址
|
||||
sort: number // 排序
|
||||
remark: string // 备注
|
||||
principal: string // 负责人
|
||||
warehousePrice: number // 仓储费,单位:元
|
||||
truckagePrice: number // 搬运费,单位:元
|
||||
status: number // 开启状态
|
||||
defaultStatus: boolean // 是否默认
|
||||
}
|
||||
|
||||
// ERP 仓库 API
|
||||
export const WarehouseApi = {
|
||||
// 查询仓库分页
|
||||
getWarehousePage: async (params: any) => {
|
||||
return await request.get({ url: `/erp/warehouse/page`, params })
|
||||
},
|
||||
|
||||
// 查询仓库精简列表
|
||||
getWarehouseSimpleList: async () => {
|
||||
return await request.get({ url: `/erp/warehouse/simple-list` })
|
||||
},
|
||||
|
||||
// 查询仓库详情
|
||||
getWarehouse: async (id: number) => {
|
||||
return await request.get({ url: `/erp/warehouse/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增仓库
|
||||
createWarehouse: async (data: WarehouseVO) => {
|
||||
return await request.post({ url: `/erp/warehouse/create`, data })
|
||||
},
|
||||
|
||||
// 修改仓库
|
||||
updateWarehouse: async (data: WarehouseVO) => {
|
||||
return await request.put({ url: `/erp/warehouse/update`, data })
|
||||
},
|
||||
|
||||
// 修改仓库默认状态
|
||||
updateWarehouseDefaultStatus: async (id: number, defaultStatus: boolean) => {
|
||||
return await request.put({
|
||||
url: `/erp/warehouse/update-default-status`,
|
||||
params: {
|
||||
id,
|
||||
defaultStatus
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除仓库
|
||||
deleteWarehouse: async (id: number) => {
|
||||
return await request.delete({ url: `/erp/warehouse/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出仓库 Excel
|
||||
exportWarehouse: async (params) => {
|
||||
return await request.download({ url: `/erp/warehouse/export-excel`, params })
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface BannerVO {
|
||||
id: number
|
||||
title: string
|
||||
picUrl: string
|
||||
status: number
|
||||
url: string
|
||||
position: number
|
||||
sort: number
|
||||
memo: string
|
||||
}
|
||||
|
||||
// 查询Banner管理列表
|
||||
export const getBannerPage = async (params) => {
|
||||
return await request.get({ url: `/promotion/banner/page`, params })
|
||||
}
|
||||
|
||||
// 查询Banner管理详情
|
||||
export const getBanner = async (id: number) => {
|
||||
return await request.get({ url: `/promotion/banner/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增Banner管理
|
||||
export const createBanner = async (data: BannerVO) => {
|
||||
return await request.post({ url: `/promotion/banner/create`, data })
|
||||
}
|
||||
|
||||
// 修改Banner管理
|
||||
export const updateBanner = async (data: BannerVO) => {
|
||||
return await request.put({ url: `/promotion/banner/update`, data })
|
||||
}
|
||||
|
||||
// 删除Banner管理
|
||||
export const deleteBanner = async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/banner/delete?id=` + id })
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
/**
|
||||
* 商品品牌
|
||||
*/
|
||||
export interface BrandVO {
|
||||
/**
|
||||
* 品牌编号
|
||||
*/
|
||||
id?: number
|
||||
/**
|
||||
* 品牌名称
|
||||
*/
|
||||
name: string
|
||||
/**
|
||||
* 品牌图片
|
||||
*/
|
||||
picUrl: string
|
||||
/**
|
||||
* 品牌排序
|
||||
*/
|
||||
sort?: number
|
||||
/**
|
||||
* 品牌描述
|
||||
*/
|
||||
description?: string
|
||||
/**
|
||||
* 开启状态
|
||||
*/
|
||||
status: number
|
||||
}
|
||||
|
||||
// 创建商品品牌
|
||||
export const createBrand = (data: BrandVO) => {
|
||||
return request.post({ url: '/product/brand/create', data })
|
||||
}
|
||||
|
||||
// 更新商品品牌
|
||||
export const updateBrand = (data: BrandVO) => {
|
||||
return request.put({ url: '/product/brand/update', data })
|
||||
}
|
||||
|
||||
// 删除商品品牌
|
||||
export const deleteBrand = (id: number) => {
|
||||
return request.delete({ url: `/product/brand/delete?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得商品品牌
|
||||
export const getBrand = (id: number) => {
|
||||
return request.get({ url: `/product/brand/get?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得商品品牌列表
|
||||
export const getBrandParam = (params: PageParam) => {
|
||||
return request.get({ url: '/product/brand/page', params })
|
||||
}
|
||||
|
||||
// 获得商品品牌精简信息列表
|
||||
export const getSimpleBrandList = () => {
|
||||
return request.get({ url: '/product/brand/list-all-simple' })
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
/**
|
||||
* 产品分类
|
||||
*/
|
||||
export interface CategoryVO {
|
||||
/**
|
||||
* 分类编号
|
||||
*/
|
||||
id?: number
|
||||
/**
|
||||
* 父分类编号
|
||||
*/
|
||||
parentId?: number
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
name: string
|
||||
/**
|
||||
* 移动端分类图
|
||||
*/
|
||||
picUrl: string
|
||||
/**
|
||||
* 分类排序
|
||||
*/
|
||||
sort: number
|
||||
/**
|
||||
* 开启状态
|
||||
*/
|
||||
status: number
|
||||
}
|
||||
|
||||
// 创建商品分类
|
||||
export const createCategory = (data: CategoryVO) => {
|
||||
return request.post({ url: '/product/category/create', data })
|
||||
}
|
||||
|
||||
// 更新商品分类
|
||||
export const updateCategory = (data: CategoryVO) => {
|
||||
return request.put({ url: '/product/category/update', data })
|
||||
}
|
||||
|
||||
// 删除商品分类
|
||||
export const deleteCategory = (id: number) => {
|
||||
return request.delete({ url: `/product/category/delete?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得商品分类
|
||||
export const getCategory = (id: number) => {
|
||||
return request.get({ url: `/product/category/get?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得商品分类列表
|
||||
export const getCategoryList = (params: any) => {
|
||||
return request.get({ url: '/product/category/list', params })
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface CommentVO {
|
||||
id: number
|
||||
userId: number
|
||||
userNickname: string
|
||||
userAvatar: string
|
||||
anonymous: boolean
|
||||
orderId: number
|
||||
orderItemId: number
|
||||
spuId: number
|
||||
spuName: string
|
||||
skuId: number
|
||||
visible: boolean
|
||||
scores: number
|
||||
descriptionScores: number
|
||||
benefitScores: number
|
||||
content: string
|
||||
picUrls: string
|
||||
replyStatus: boolean
|
||||
replyUserId: number
|
||||
replyContent: string
|
||||
replyTime: Date
|
||||
}
|
||||
|
||||
// 查询商品评论列表
|
||||
export const getCommentPage = async (params) => {
|
||||
return await request.get({ url: `/product/comment/page`, params })
|
||||
}
|
||||
|
||||
// 查询商品评论详情
|
||||
export const getComment = async (id: number) => {
|
||||
return await request.get({ url: `/product/comment/get?id=` + id })
|
||||
}
|
||||
|
||||
// 添加自评
|
||||
export const createComment = async (data: CommentVO) => {
|
||||
return await request.post({ url: `/product/comment/create`, data })
|
||||
}
|
||||
|
||||
// 显示 / 隐藏评论
|
||||
export const updateCommentVisible = async (data: any) => {
|
||||
return await request.put({ url: `/product/comment/update-visible`, data })
|
||||
}
|
||||
|
||||
// 商家回复
|
||||
export const replyComment = async (data: any) => {
|
||||
return await request.put({ url: `/product/comment/reply`, data })
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface Favorite {
|
||||
id?: number
|
||||
userId?: string // 用户编号
|
||||
spuId?: number | null // 商品 SPU 编号
|
||||
}
|
||||
|
||||
// 获得 ProductFavorite 列表
|
||||
export const getFavoritePage = (params: PageParam) => {
|
||||
return request.get({ url: '/product/favorite/page', params })
|
||||
}
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
/**
|
||||
* 商品属性
|
||||
*/
|
||||
export interface PropertyVO {
|
||||
id?: number
|
||||
/** 名称 */
|
||||
name: string
|
||||
/** 备注 */
|
||||
remark?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性值
|
||||
*/
|
||||
export interface PropertyValueVO {
|
||||
id?: number
|
||||
/** 属性项的编号 */
|
||||
propertyId?: number
|
||||
/** 名称 */
|
||||
name: string
|
||||
/** 备注 */
|
||||
remark?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品属性值的明细
|
||||
*/
|
||||
export interface PropertyValueDetailVO {
|
||||
/** 属性项的编号 */
|
||||
propertyId: number // 属性的编号
|
||||
/** 属性的名称 */
|
||||
propertyName: string
|
||||
/** 属性值的编号 */
|
||||
valueId: number
|
||||
/** 属性值的名称 */
|
||||
valueName: string
|
||||
}
|
||||
|
||||
// ------------------------ 属性项 -------------------
|
||||
|
||||
// 创建属性项
|
||||
export const createProperty = (data: PropertyVO) => {
|
||||
return request.post({ url: '/product/property/create', data })
|
||||
}
|
||||
|
||||
// 更新属性项
|
||||
export const updateProperty = (data: PropertyVO) => {
|
||||
return request.put({ url: '/product/property/update', data })
|
||||
}
|
||||
|
||||
// 删除属性项
|
||||
export const deleteProperty = (id: number) => {
|
||||
return request.delete({ url: `/product/property/delete?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得属性项
|
||||
export const getProperty = (id: number): Promise<PropertyVO> => {
|
||||
return request.get({ url: `/product/property/get?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得属性项分页
|
||||
export const getPropertyPage = (params: PageParam) => {
|
||||
return request.get({ url: '/product/property/page', params })
|
||||
}
|
||||
|
||||
// ------------------------ 属性值 -------------------
|
||||
|
||||
// 获得属性值分页
|
||||
export const getPropertyValuePage = (params: PageParam & any) => {
|
||||
return request.get({ url: '/product/property/value/page', params })
|
||||
}
|
||||
|
||||
// 获得属性值
|
||||
export const getPropertyValue = (id: number): Promise<PropertyValueVO> => {
|
||||
return request.get({ url: `/product/property/value/get?id=${id}` })
|
||||
}
|
||||
|
||||
// 创建属性值
|
||||
export const createPropertyValue = (data: PropertyValueVO) => {
|
||||
return request.post({ url: '/product/property/value/create', data })
|
||||
}
|
||||
|
||||
// 更新属性值
|
||||
export const updatePropertyValue = (data: PropertyValueVO) => {
|
||||
return request.put({ url: '/product/property/value/update', data })
|
||||
}
|
||||
|
||||
// 删除属性值
|
||||
export const deletePropertyValue = (id: number) => {
|
||||
return request.delete({ url: `/product/property/value/delete?id=${id}` })
|
||||
}
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface Property {
|
||||
propertyId?: number // 属性编号
|
||||
propertyName?: string // 属性名称
|
||||
valueId?: number // 属性值编号
|
||||
valueName?: string // 属性值名称
|
||||
}
|
||||
|
||||
export interface Sku {
|
||||
id?: number // 商品 SKU 编号
|
||||
name?: string // 商品 SKU 名称
|
||||
spuId?: number // SPU 编号
|
||||
properties?: Property[] // 属性数组
|
||||
price?: number | string // 商品价格
|
||||
marketPrice?: number | string // 市场价
|
||||
costPrice?: number | string // 成本价
|
||||
barCode?: string // 商品条码
|
||||
picUrl?: string // 图片地址
|
||||
stock?: number // 库存
|
||||
weight?: number // 商品重量,单位:kg 千克
|
||||
volume?: number // 商品体积,单位:m^3 平米
|
||||
firstBrokeragePrice?: number | string // 一级分销的佣金
|
||||
secondBrokeragePrice?: number | string // 二级分销的佣金
|
||||
salesCount?: number // 商品销量
|
||||
}
|
||||
|
||||
export interface GiveCouponTemplate {
|
||||
id?: number
|
||||
name?: string // 优惠券名称
|
||||
}
|
||||
|
||||
export interface Spu {
|
||||
id?: number
|
||||
name?: string // 商品名称
|
||||
categoryId?: number // 商品分类
|
||||
keyword?: string // 关键字
|
||||
unit?: number | undefined // 单位
|
||||
picUrl?: string // 商品封面图
|
||||
sliderPicUrls?: string[] // 商品轮播图
|
||||
introduction?: string // 商品简介
|
||||
deliveryTypes?: number[] // 配送方式
|
||||
deliveryTemplateId?: number | undefined // 运费模版
|
||||
brandId?: number // 商品品牌编号
|
||||
specType?: boolean // 商品规格
|
||||
subCommissionType?: boolean // 分销类型
|
||||
skus?: Sku[] // sku数组
|
||||
description?: string // 商品详情
|
||||
sort?: number // 商品排序
|
||||
giveIntegral?: number // 赠送积分
|
||||
virtualSalesCount?: number // 虚拟销量
|
||||
price?: number // 商品价格
|
||||
salesCount?: number // 商品销量
|
||||
marketPrice?: number // 市场价
|
||||
costPrice?: number // 成本价
|
||||
stock?: number // 商品库存
|
||||
createTime?: Date // 商品创建时间
|
||||
status?: number // 商品状态
|
||||
}
|
||||
|
||||
// 获得 Spu 列表
|
||||
export const getSpuPage = (params: PageParam) => {
|
||||
return request.get({ url: '/product/spu/page', params })
|
||||
}
|
||||
|
||||
// 获得 Spu 列表 tabsCount
|
||||
export const getTabsCount = () => {
|
||||
return request.get({ url: '/product/spu/get-count' })
|
||||
}
|
||||
|
||||
// 创建商品 Spu
|
||||
export const createSpu = (data: Spu) => {
|
||||
return request.post({ url: '/product/spu/create', data })
|
||||
}
|
||||
|
||||
// 更新商品 Spu
|
||||
export const updateSpu = (data: Spu) => {
|
||||
return request.put({ url: '/product/spu/update', data })
|
||||
}
|
||||
|
||||
// 更新商品 Spu status
|
||||
export const updateStatus = (data: { id: number; status: number }) => {
|
||||
return request.put({ url: '/product/spu/update-status', data })
|
||||
}
|
||||
|
||||
// 获得商品 Spu
|
||||
export const getSpu = (id: number) => {
|
||||
return request.get({ url: `/product/spu/get-detail?id=${id}` })
|
||||
}
|
||||
|
||||
// 获得商品 Spu 详情列表
|
||||
export const getSpuDetailList = (ids: number[]) => {
|
||||
return request.get({ url: `/product/spu/list?spuIds=${ids}` })
|
||||
}
|
||||
|
||||
// 删除商品 Spu
|
||||
export const deleteSpu = (id: number) => {
|
||||
return request.delete({ url: `/product/spu/delete?id=${id}` })
|
||||
}
|
||||
|
||||
// 导出商品 Spu Excel
|
||||
export const exportSpu = async (params) => {
|
||||
return await request.download({ url: '/product/spu/export', params })
|
||||
}
|
||||
|
||||
// 获得商品 SPU 精简列表
|
||||
export const getSpuSimpleList = async () => {
|
||||
return request.get({ url: '/product/spu/list-all-simple' })
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface ArticleVO {
|
||||
id: number
|
||||
categoryId: number
|
||||
title: string
|
||||
author: string
|
||||
picUrl: string
|
||||
introduction: string
|
||||
browseCount: string
|
||||
sort: number
|
||||
status: number
|
||||
spuId: number
|
||||
recommendHot: boolean
|
||||
recommendBanner: boolean
|
||||
content: string
|
||||
}
|
||||
|
||||
// 查询文章管理列表
|
||||
export const getArticlePage = async (params: any) => {
|
||||
return await request.get({ url: `/promotion/article/page`, params })
|
||||
}
|
||||
|
||||
// 查询文章管理详情
|
||||
export const getArticle = async (id: number) => {
|
||||
return await request.get({ url: `/promotion/article/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增文章管理
|
||||
export const createArticle = async (data: ArticleVO) => {
|
||||
return await request.post({ url: `/promotion/article/create`, data })
|
||||
}
|
||||
|
||||
// 修改文章管理
|
||||
export const updateArticle = async (data: ArticleVO) => {
|
||||
return await request.put({ url: `/promotion/article/update`, data })
|
||||
}
|
||||
|
||||
// 删除文章管理
|
||||
export const deleteArticle = async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/article/delete?id=` + id })
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface ArticleCategoryVO {
|
||||
id: number
|
||||
name: string
|
||||
picUrl: string
|
||||
status: number
|
||||
sort: number
|
||||
}
|
||||
|
||||
// 查询文章分类列表
|
||||
export const getArticleCategoryPage = async (params) => {
|
||||
return await request.get({ url: `/promotion/article-category/page`, params })
|
||||
}
|
||||
|
||||
// 查询文章分类精简信息列表
|
||||
export const getSimpleArticleCategoryList = async () => {
|
||||
return await request.get({ url: `/promotion/article-category/list-all-simple` })
|
||||
}
|
||||
|
||||
// 查询文章分类详情
|
||||
export const getArticleCategory = async (id: number) => {
|
||||
return await request.get({ url: `/promotion/article-category/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增文章分类
|
||||
export const createArticleCategory = async (data: ArticleCategoryVO) => {
|
||||
return await request.post({ url: `/promotion/article-category/create`, data })
|
||||
}
|
||||
|
||||
// 修改文章分类
|
||||
export const updateArticleCategory = async (data: ArticleCategoryVO) => {
|
||||
return await request.put({ url: `/promotion/article-category/update`, data })
|
||||
}
|
||||
|
||||
// 删除文章分类
|
||||
export const deleteArticleCategory = async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/article-category/delete?id=` + id })
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
import { Sku, Spu } from '@/api/mall/product/spu'
|
||||
|
||||
export interface BargainActivityVO {
|
||||
id?: number
|
||||
name?: string
|
||||
startTime?: Date
|
||||
endTime?: Date
|
||||
status?: number
|
||||
helpMaxCount?: number // 达到该人数,才能砍到低价
|
||||
bargainCount?: number // 最大帮砍次数
|
||||
totalLimitCount?: number // 最大购买次数
|
||||
spuId: number
|
||||
skuId: number
|
||||
bargainFirstPrice: number // 砍价起始价格,单位分
|
||||
bargainMinPrice: number // 砍价底价
|
||||
stock: number // 活动库存
|
||||
randomMinPrice?: number // 用户每次砍价的最小金额,单位:分
|
||||
randomMaxPrice?: number // 用户每次砍价的最大金额,单位:分
|
||||
}
|
||||
|
||||
// 砍价活动所需属性。选择的商品和属性的时候使用方便使用活动的通用封装
|
||||
export interface BargainProductVO {
|
||||
spuId: number
|
||||
skuId: number
|
||||
bargainFirstPrice: number // 砍价起始价格,单位分
|
||||
bargainMinPrice: number // 砍价底价
|
||||
stock: number // 活动库存
|
||||
}
|
||||
|
||||
// 扩展 Sku 配置
|
||||
export type SkuExtension = Sku & {
|
||||
productConfig: BargainProductVO
|
||||
}
|
||||
|
||||
export interface SpuExtension extends Spu {
|
||||
skus: SkuExtension[] // 重写类型
|
||||
}
|
||||
|
||||
// 查询砍价活动列表
|
||||
export const getBargainActivityPage = async (params: any) => {
|
||||
return await request.get({ url: '/promotion/bargain-activity/page', params })
|
||||
}
|
||||
|
||||
// 查询砍价活动详情
|
||||
export const getBargainActivity = async (id: number) => {
|
||||
return await request.get({ url: '/promotion/bargain-activity/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增砍价活动
|
||||
export const createBargainActivity = async (data: BargainActivityVO) => {
|
||||
return await request.post({ url: '/promotion/bargain-activity/create', data })
|
||||
}
|
||||
|
||||
// 修改砍价活动
|
||||
export const updateBargainActivity = async (data: BargainActivityVO) => {
|
||||
return await request.put({ url: '/promotion/bargain-activity/update', data })
|
||||
}
|
||||
|
||||
// 关闭砍价活动
|
||||
export const closeBargainActivity = async (id: number) => {
|
||||
return await request.put({ url: '/promotion/bargain-activity/close?id=' + id })
|
||||
}
|
||||
|
||||
// 删除砍价活动
|
||||
export const deleteBargainActivity = async (id: number) => {
|
||||
return await request.delete({ url: '/promotion/bargain-activity/delete?id=' + id })
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface BargainHelpVO {
|
||||
id: number
|
||||
record: number
|
||||
userId: number
|
||||
reducePrice: number
|
||||
endTime: Date
|
||||
}
|
||||
|
||||
// 查询砍价记录列表
|
||||
export const getBargainHelpPage = async (params) => {
|
||||
return await request.get({ url: `/promotion/bargain-help/page`, params })
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface BargainRecordVO {
|
||||
id: number
|
||||
activityId: number
|
||||
userId: number
|
||||
spuId: number
|
||||
skuId: number
|
||||
bargainFirstPrice: number
|
||||
bargainPrice: number
|
||||
status: number
|
||||
orderId: number
|
||||
endTime: Date
|
||||
}
|
||||
|
||||
// 查询砍价记录列表
|
||||
export const getBargainRecordPage = async (params) => {
|
||||
return await request.get({ url: `/promotion/bargain-record/page`, params })
|
||||
}
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
import { Sku, Spu } from '@/api/mall/product/spu'
|
||||
|
||||
export interface CombinationActivityVO {
|
||||
id?: number
|
||||
name?: string
|
||||
spuId?: number
|
||||
totalLimitCount?: number
|
||||
singleLimitCount?: number
|
||||
startTime?: Date
|
||||
endTime?: Date
|
||||
userSize?: number
|
||||
totalCount?: number
|
||||
successCount?: number
|
||||
orderUserCount?: number
|
||||
virtualGroup?: number
|
||||
status?: number
|
||||
limitDuration?: number
|
||||
products: CombinationProductVO[]
|
||||
}
|
||||
|
||||
// 拼团活动所需属性
|
||||
export interface CombinationProductVO {
|
||||
spuId: number
|
||||
skuId: number
|
||||
combinationPrice: number // 拼团价格
|
||||
}
|
||||
|
||||
// 扩展 Sku 配置
|
||||
export type SkuExtension = Sku & {
|
||||
productConfig: CombinationProductVO
|
||||
}
|
||||
|
||||
export interface SpuExtension extends Spu {
|
||||
skus: SkuExtension[] // 重写类型
|
||||
}
|
||||
|
||||
// 查询拼团活动列表
|
||||
export const getCombinationActivityPage = async (params) => {
|
||||
return await request.get({ url: '/promotion/combination-activity/page', params })
|
||||
}
|
||||
|
||||
// 查询拼团活动详情
|
||||
export const getCombinationActivity = async (id: number) => {
|
||||
return await request.get({ url: '/promotion/combination-activity/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增拼团活动
|
||||
export const createCombinationActivity = async (data: CombinationActivityVO) => {
|
||||
return await request.post({ url: '/promotion/combination-activity/create', data })
|
||||
}
|
||||
|
||||
// 修改拼团活动
|
||||
export const updateCombinationActivity = async (data: CombinationActivityVO) => {
|
||||
return await request.put({ url: '/promotion/combination-activity/update', data })
|
||||
}
|
||||
|
||||
// 关闭拼团活动
|
||||
export const closeCombinationActivity = async (id: number) => {
|
||||
return await request.put({ url: '/promotion/combination-activity/close?id=' + id })
|
||||
}
|
||||
|
||||
// 删除拼团活动
|
||||
export const deleteCombinationActivity = async (id: number) => {
|
||||
return await request.delete({ url: '/promotion/combination-activity/delete?id=' + id })
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface CombinationRecordVO {
|
||||
id: number // 拼团记录编号
|
||||
activityId: number // 拼团活动编号
|
||||
nickname: string // 用户昵称
|
||||
avatar: string // 用户头像
|
||||
headId: number // 团长编号
|
||||
expireTime: string // 过期时间
|
||||
userSize: number // 可参团人数
|
||||
userCount: number // 已参团人数
|
||||
status: number // 拼团状态
|
||||
spuName: string // 商品名字
|
||||
picUrl: string // 商品图片
|
||||
virtualGroup: boolean // 是否虚拟成团
|
||||
startTime: string // 开始时间 (订单付款后开始的时间)
|
||||
endTime: string // 结束时间(成团时间/失败时间)
|
||||
}
|
||||
|
||||
// 查询拼团记录列表
|
||||
export const getCombinationRecordPage = async (params: any) => {
|
||||
return await request.get({ url: '/promotion/combination-record/page', params })
|
||||
}
|
||||
|
||||
// 获得拼团记录的概要信息
|
||||
export const getCombinationRecordSummary = async () => {
|
||||
return await request.get({ url: '/promotion/combination-record/get-summary' })
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
// TODO @dhb52:vo 缺少
|
||||
|
||||
// 删除优惠劵
|
||||
export const deleteCoupon = async (id: number) => {
|
||||
return request.delete({
|
||||
url: `/promotion/coupon/delete?id=${id}`
|
||||
})
|
||||
}
|
||||
|
||||
// 获得优惠劵分页
|
||||
export const getCouponPage = async (params: PageParam) => {
|
||||
return request.get({
|
||||
url: '/promotion/coupon/page',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
// 发送优惠券
|
||||
export const sendCoupon = async (data: any) => {
|
||||
return request.post({
|
||||
url: '/promotion/coupon/send',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface CouponTemplateVO {
|
||||
id: number
|
||||
name: string
|
||||
status: number
|
||||
totalCount: number
|
||||
takeLimitCount: number
|
||||
takeType: number
|
||||
usePrice: number
|
||||
productScope: number
|
||||
productScopeValues: number[]
|
||||
validityType: number
|
||||
validStartTime: Date
|
||||
validEndTime: Date
|
||||
fixedStartTerm: number
|
||||
fixedEndTerm: number
|
||||
discountType: number
|
||||
discountPercent: number
|
||||
discountPrice: number
|
||||
discountLimitPrice: number
|
||||
takeCount: number
|
||||
useCount: number
|
||||
}
|
||||
|
||||
// 创建优惠劵模板
|
||||
export function createCouponTemplate(data: CouponTemplateVO) {
|
||||
return request.post({
|
||||
url: '/promotion/coupon-template/create',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新优惠劵模板
|
||||
export function updateCouponTemplate(data: CouponTemplateVO) {
|
||||
return request.put({
|
||||
url: '/promotion/coupon-template/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新优惠劵模板的状态
|
||||
export function updateCouponTemplateStatus(id: number, status: [0, 1]) {
|
||||
const data = {
|
||||
id,
|
||||
status
|
||||
}
|
||||
return request.put({
|
||||
url: '/promotion/coupon-template/update-status',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除优惠劵模板
|
||||
export function deleteCouponTemplate(id: number) {
|
||||
return request.delete({
|
||||
url: '/promotion/coupon-template/delete?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得优惠劵模板
|
||||
export function getCouponTemplate(id: number) {
|
||||
return request.get({
|
||||
url: '/promotion/coupon-template/get?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得优惠劵模板分页
|
||||
export function getCouponTemplatePage(params: PageParam) {
|
||||
return request.get({
|
||||
url: '/promotion/coupon-template/page',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
// 获得优惠劵模板分页
|
||||
export function getCouponTemplateList(ids: number[]) {
|
||||
return request.get({
|
||||
url: `/promotion/coupon-template/list?ids=${ids}`
|
||||
})
|
||||
}
|
||||
|
||||
// 导出优惠劵模板 Excel
|
||||
export function exportCouponTemplateExcel(params: PageParam) {
|
||||
return request.get({
|
||||
url: '/promotion/coupon-template/export-excel',
|
||||
params: params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
import { Sku, Spu } from '@/api/mall/product/spu'
|
||||
|
||||
export interface DiscountActivityVO {
|
||||
id?: number
|
||||
spuId?: number
|
||||
name?: string
|
||||
status?: number
|
||||
remark?: string
|
||||
startTime?: Date
|
||||
endTime?: Date
|
||||
products?: DiscountProductVO[]
|
||||
}
|
||||
// 限时折扣相关 属性
|
||||
export interface DiscountProductVO {
|
||||
spuId: number
|
||||
skuId: number
|
||||
discountType: number
|
||||
discountPercent: number
|
||||
discountPrice: number
|
||||
}
|
||||
|
||||
// 扩展 Sku 配置
|
||||
export type SkuExtension = Sku & {
|
||||
productConfig: DiscountProductVO
|
||||
}
|
||||
|
||||
export interface SpuExtension extends Spu {
|
||||
skus: SkuExtension[] // 重写类型
|
||||
}
|
||||
|
||||
// 查询限时折扣活动列表
|
||||
export const getDiscountActivityPage = async (params) => {
|
||||
return await request.get({ url: '/promotion/discount-activity/page', params })
|
||||
}
|
||||
|
||||
// 查询限时折扣活动详情
|
||||
export const getDiscountActivity = async (id: number) => {
|
||||
return await request.get({ url: '/promotion/discount-activity/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增限时折扣活动
|
||||
export const createDiscountActivity = async (data: DiscountActivityVO) => {
|
||||
return await request.post({ url: '/promotion/discount-activity/create', data })
|
||||
}
|
||||
|
||||
// 修改限时折扣活动
|
||||
export const updateDiscountActivity = async (data: DiscountActivityVO) => {
|
||||
return await request.put({ url: '/promotion/discount-activity/update', data })
|
||||
}
|
||||
|
||||
// 关闭限时折扣活动
|
||||
export const closeDiscountActivity = async (id: number) => {
|
||||
return await request.put({ url: '/promotion/discount-activity/close?id=' + id })
|
||||
}
|
||||
|
||||
// 删除限时折扣活动
|
||||
export const deleteDiscountActivity = async (id: number) => {
|
||||
return await request.delete({ url: '/promotion/discount-activity/delete?id=' + id })
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface DiyPageVO {
|
||||
id?: number
|
||||
templateId?: number
|
||||
name: string
|
||||
remark: string
|
||||
previewPicUrls: string[]
|
||||
property: string
|
||||
}
|
||||
|
||||
// 查询装修页面列表
|
||||
export const getDiyPagePage = async (params: any) => {
|
||||
return await request.get({ url: `/promotion/diy-page/page`, params })
|
||||
}
|
||||
|
||||
// 查询装修页面详情
|
||||
export const getDiyPage = async (id: number) => {
|
||||
return await request.get({ url: `/promotion/diy-page/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增装修页面
|
||||
export const createDiyPage = async (data: DiyPageVO) => {
|
||||
return await request.post({ url: `/promotion/diy-page/create`, data })
|
||||
}
|
||||
|
||||
// 修改装修页面
|
||||
export const updateDiyPage = async (data: DiyPageVO) => {
|
||||
return await request.put({ url: `/promotion/diy-page/update`, data })
|
||||
}
|
||||
|
||||
// 删除装修页面
|
||||
export const deleteDiyPage = async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/diy-page/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 获得装修页面属性
|
||||
export const getDiyPageProperty = async (id: number) => {
|
||||
return await request.get({ url: `/promotion/diy-page/get-property?id=` + id })
|
||||
}
|
||||
|
||||
// 更新装修页面属性
|
||||
export const updateDiyPageProperty = async (data: DiyPageVO) => {
|
||||
return await request.put({ url: `/promotion/diy-page/update-property`, data })
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
import { DiyPageVO } from '@/api/mall/promotion/diy/page'
|
||||
|
||||
export interface DiyTemplateVO {
|
||||
id?: number
|
||||
name: string
|
||||
used: boolean
|
||||
usedTime?: Date
|
||||
remark: string
|
||||
previewPicUrls: string[]
|
||||
property: string
|
||||
}
|
||||
|
||||
export interface DiyTemplatePropertyVO extends DiyTemplateVO {
|
||||
pages: DiyPageVO[]
|
||||
}
|
||||
|
||||
// 查询装修模板列表
|
||||
export const getDiyTemplatePage = async (params: any) => {
|
||||
return await request.get({ url: `/promotion/diy-template/page`, params })
|
||||
}
|
||||
|
||||
// 查询装修模板详情
|
||||
export const getDiyTemplate = async (id: number) => {
|
||||
return await request.get({ url: `/promotion/diy-template/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增装修模板
|
||||
export const createDiyTemplate = async (data: DiyTemplateVO) => {
|
||||
return await request.post({ url: `/promotion/diy-template/create`, data })
|
||||
}
|
||||
|
||||
// 修改装修模板
|
||||
export const updateDiyTemplate = async (data: DiyTemplateVO) => {
|
||||
return await request.put({ url: `/promotion/diy-template/update`, data })
|
||||
}
|
||||
|
||||
// 删除装修模板
|
||||
export const deleteDiyTemplate = async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/diy-template/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 使用装修模板
|
||||
export const useDiyTemplate = async (id: number) => {
|
||||
return await request.put({ url: `/promotion/diy-template/use?id=` + id })
|
||||
}
|
||||
|
||||
// 获得装修模板属性
|
||||
export const getDiyTemplateProperty = async (id: number) => {
|
||||
return await request.get<DiyTemplatePropertyVO>({
|
||||
url: `/promotion/diy-template/get-property?id=` + id
|
||||
})
|
||||
}
|
||||
|
||||
// 更新装修模板属性
|
||||
export const updateDiyTemplateProperty = async (data: DiyTemplateVO) => {
|
||||
return await request.put({ url: `/promotion/diy-template/update-property`, data })
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
|
||||
export interface DiscountActivityVO {
|
||||
id?: number
|
||||
name?: string
|
||||
startTime?: Date
|
||||
endTime?: Date
|
||||
remark?: string
|
||||
conditionType?: number
|
||||
productScope?: number
|
||||
productSpuIds?: number[]
|
||||
rules?: DiscountProductVO[]
|
||||
}
|
||||
|
||||
// 优惠规则
|
||||
export interface DiscountProductVO {
|
||||
limit: number
|
||||
discountPrice: number
|
||||
freeDelivery: boolean
|
||||
point: number
|
||||
couponIds: number[]
|
||||
couponCounts: number[]
|
||||
}
|
||||
|
||||
// 新增满减送活动
|
||||
export const createRewardActivity = async (data: DiscountActivityVO) => {
|
||||
return await request.post({ url: '/promotion/reward-activity/create', data })
|
||||
}
|
||||
|
||||
// 更新满减送活动
|
||||
export const updateRewardActivity = async (data: DiscountActivityVO) => {
|
||||
return await request.put({ url: '/promotion/reward-activity/update', data })
|
||||
}
|
||||
|
||||
// 查询满减送活动列表
|
||||
export const getRewardActivityPage = async (params) => {
|
||||
return await request.get({ url: '/promotion/reward-activity/page', params })
|
||||
}
|
||||
|
||||
// 查询满减送活动详情
|
||||
export const getReward = async (id: number) => {
|
||||
return await request.get({ url: '/promotion/reward-activity/get?id=' + id })
|
||||
}
|
||||
|
||||
// 删除限时折扣活动
|
||||
export const deleteRewardActivity = async (id: number) => {
|
||||
return await request.delete({ url: '/promotion/reward-activity/delete?id=' + id })
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
import request from '@/config/axios'
|
||||
import { Sku, Spu } from '@/api/mall/product/spu'
|
||||
|
||||
export interface SeckillActivityVO {
|
||||
id?: number
|
||||
spuId?: number
|
||||
name?: string
|
||||
status?: number
|
||||
remark?: string
|
||||
startTime?: Date
|
||||
endTime?: Date
|
||||
sort?: number
|
||||
configIds?: string
|
||||
orderCount?: number
|
||||
userCount?: number
|
||||
totalPrice?: number
|
||||
totalLimitCount?: number
|
||||
singleLimitCount?: number
|
||||
stock?: number
|
||||
totalStock?: number
|
||||
products?: SeckillProductVO[]
|
||||
}
|
||||
|
||||
// 秒杀活动所需属性
|
||||
export interface SeckillProductVO {
|
||||
skuId: number
|
||||
seckillPrice: number
|
||||
stock: number
|
||||
}
|
||||
|
||||
// 扩展 Sku 配置
|
||||
export type SkuExtension = Sku & {
|
||||
productConfig: SeckillProductVO
|
||||
}
|
||||
|
||||
export interface SpuExtension extends Spu {
|
||||
skus: SkuExtension[] // 重写类型
|
||||
}
|
||||
|
||||
// 查询秒杀活动列表
|
||||
export const getSeckillActivityPage = async (params) => {
|
||||
return await request.get({ url: '/promotion/seckill-activity/page', params })
|
||||
}
|
||||
|
||||
// 查询秒杀活动详情
|
||||
export const getSeckillActivity = async (id: number) => {
|
||||
return await request.get({ url: '/promotion/seckill-activity/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增秒杀活动
|
||||
export const createSeckillActivity = async (data: SeckillActivityVO) => {
|
||||
return await request.post({ url: '/promotion/seckill-activity/create', data })
|
||||
}
|
||||
|
||||
// 修改秒杀活动
|
||||
export const updateSeckillActivity = async (data: SeckillActivityVO) => {
|
||||
return await request.put({ url: '/promotion/seckill-activity/update', data })
|
||||
}
|
||||
|
||||
// 关闭秒杀活动
|
||||
export const closeSeckillActivity = async (id: number) => {
|
||||
return await request.put({ url: '/promotion/seckill-activity/close?id=' + id })
|
||||
}
|
||||
|
||||
// 删除秒杀活动
|
||||
export const deleteSeckillActivity = async (id: number) => {
|
||||
return await request.delete({ url: '/promotion/seckill-activity/delete?id=' + id })
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue