Browse Source

feat:采购单修改

hmc 1 year ago
parent
commit
a936cb7c09

+ 120 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/SupplierController.java

@@ -0,0 +1,120 @@
+package com.zkqy.business.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.business.domain.Supplier;
+import com.zkqy.business.service.ISupplierService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 供应商管理
+ * Controller
+ *
+ * @author zkqy
+ * @date 2024-04-15
+ */
+@RestController
+@RequestMapping("/business/supplier")
+@Api(value = "/business/supplier", description = "供应商管理 -接口")
+public class SupplierController extends BaseController {
+    @Autowired
+    private ISupplierService supplierService;
+
+    /**
+     * 查询供应商管理
+     * 列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:supplier:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询供应商管理 列表")
+    public TableDataInfo list(Supplier supplier) {
+        startPage();
+        List<Supplier> list = supplierService.selectSupplierList(supplier);
+        return getDataTable(list);
+    }
+
+    @PreAuthorize("@ss.hasPermi('business:supplier:list')")
+    @GetMapping("/getList")
+    @ApiOperation(value = "查询供应商管理 列表")
+    public AjaxResult getList(Supplier supplier) {
+        startPage();
+        List<Supplier> list = supplierService.selectSupplierList(supplier);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 导出供应商管理
+     * 列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:supplier:export')")
+    @Log(title = "供应商管理 ", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出供应商管理 列表")
+    public void export(HttpServletResponse response, Supplier supplier) {
+        List<Supplier> list = supplierService.selectSupplierList(supplier);
+        ExcelUtil<Supplier> util = new ExcelUtil<Supplier>(Supplier.class);
+        util.exportExcel(response, list, "供应商管理 数据");
+    }
+
+    /**
+     * 获取供应商管理
+     * 详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:supplier:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取供应商管理 详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(supplierService.selectSupplierById(id));
+    }
+
+    /**
+     * 新增供应商管理
+     */
+    @PreAuthorize("@ss.hasPermi('business:supplier:add')")
+    @Log(title = "供应商管理 ", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增供应商管理 ")
+    public AjaxResult add(@RequestBody Supplier supplier) {
+        return toAjax(supplierService.insertSupplier(supplier));
+    }
+
+    /**
+     * 修改供应商管理
+     */
+    @PreAuthorize("@ss.hasPermi('business:supplier:edit')")
+    @Log(title = "供应商管理 ", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改供应商管理 ")
+    public AjaxResult edit(@RequestBody Supplier supplier) {
+        return toAjax(supplierService.updateSupplier(supplier));
+    }
+
+    /**
+     * 删除供应商管理
+     */
+    @PreAuthorize("@ss.hasPermi('business:supplier:remove')")
+    @Log(title = "供应商管理 ", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除供应商管理 ")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(supplierService.deleteSupplierByIds(ids));
+    }
+}

+ 224 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/Supplier.java

@@ -0,0 +1,224 @@
+package com.zkqy.business.domain;
+
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zkqy.common.annotation.Excel;
+
+/**
+ * 供应商管理
+对象 supplier
+ * 
+ * @author zkqy
+ * @date 2024-04-15
+ */
+public class Supplier extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 自增主键 */
+    private Long id;
+
+    /** 供应商编号 */
+    @Excel(name = "供应商编号")
+    private String supplierNo;
+
+    /** 供应商名称 */
+    @Excel(name = "供应商名称")
+    private String supplierName;
+
+    /** 对接人编号 */
+    @Excel(name = "对接人编号")
+    private String abutmentBy;
+
+    /** 对接人 */
+    @Excel(name = "对接人")
+    private String abutment;
+
+    /** 联系电话 */
+    @Excel(name = "联系电话")
+    private String contactNumber;
+
+    /** 我司负责人 */
+    @Excel(name = "我司负责人")
+    private String representative;
+
+    /** 地址 */
+    @Excel(name = "地址")
+    private String address;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    private String state;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setSupplierNo(String supplierNo) 
+    {
+        this.supplierNo = supplierNo;
+    }
+
+    public String getSupplierNo() 
+    {
+        return supplierNo;
+    }
+    public void setSupplierName(String supplierName) 
+    {
+        this.supplierName = supplierName;
+    }
+
+    public String getSupplierName() 
+    {
+        return supplierName;
+    }
+    public void setAbutmentBy(String abutmentBy) 
+    {
+        this.abutmentBy = abutmentBy;
+    }
+
+    public String getAbutmentBy() 
+    {
+        return abutmentBy;
+    }
+    public void setAbutment(String abutment) 
+    {
+        this.abutment = abutment;
+    }
+
+    public String getAbutment() 
+    {
+        return abutment;
+    }
+    public void setContactNumber(String contactNumber) 
+    {
+        this.contactNumber = contactNumber;
+    }
+
+    public String getContactNumber() 
+    {
+        return contactNumber;
+    }
+    public void setRepresentative(String representative) 
+    {
+        this.representative = representative;
+    }
+
+    public String getRepresentative() 
+    {
+        return representative;
+    }
+    public void setAddress(String address) 
+    {
+        this.address = address;
+    }
+
+    public String getAddress() 
+    {
+        return address;
+    }
+    public void setState(String state) 
+    {
+        this.state = state;
+    }
+
+    public String getState() 
+    {
+        return state;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("supplierNo", getSupplierNo())
+            .append("supplierName", getSupplierName())
+            .append("abutmentBy", getAbutmentBy())
+            .append("abutment", getAbutment())
+            .append("contactNumber", getContactNumber())
+            .append("representative", getRepresentative())
+            .append("address", getAddress())
+            .append("state", getState())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .toString();
+    }
+}

+ 19 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/PurchaseVo.java

@@ -0,0 +1,19 @@
+package com.zkqy.business.domain.vo;
+
+import com.zkqy.business.domain.Purchase;
+import com.zkqy.business.domain.PurchaseInfo;
+
+import java.util.List;
+
+public class PurchaseVo extends Purchase {
+
+    private List<PurchaseInfo> purchaseInfos;
+
+    public List<PurchaseInfo> getPurchaseInfos() {
+        return purchaseInfos;
+    }
+
+    public void setPurchaseInfos(List<PurchaseInfo> purchaseInfos) {
+        this.purchaseInfos = purchaseInfos;
+    }
+}

+ 75 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/SupplierMapper.java

@@ -0,0 +1,75 @@
+package com.zkqy.business.mapper;
+
+import java.util.List;
+import com.zkqy.business.domain.Supplier;
+
+/**
+ * 供应商管理
+Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-04-15
+ */
+public interface SupplierMapper 
+{
+    /**
+     * 查询供应商管理
+
+     * 
+     * @param id 供应商管理
+主键
+     * @return 供应商管理
+
+     */
+    public Supplier selectSupplierById(Long id);
+
+    /**
+     * 查询供应商管理
+列表
+     * 
+     * @param supplier 供应商管理
+
+     * @return 供应商管理
+集合
+     */
+    public List<Supplier> selectSupplierList(Supplier supplier);
+
+    /**
+     * 新增供应商管理
+
+     * 
+     * @param supplier 供应商管理
+
+     * @return 结果
+     */
+    public int insertSupplier(Supplier supplier);
+
+    /**
+     * 修改供应商管理
+
+     * 
+     * @param supplier 供应商管理
+
+     * @return 结果
+     */
+    public int updateSupplier(Supplier supplier);
+
+    /**
+     * 删除供应商管理
+
+     * 
+     * @param id 供应商管理
+主键
+     * @return 结果
+     */
+    public int deleteSupplierById(Long id);
+
+    /**
+     * 批量删除供应商管理
+
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSupplierByIds(Long[] ids);
+}

+ 76 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/ISupplierService.java

@@ -0,0 +1,76 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.Supplier;
+
+/**
+ * 供应商管理
+Service接口
+ * 
+ * @author zkqy
+ * @date 2024-04-15
+ */
+public interface ISupplierService 
+{
+    /**
+     * 查询供应商管理
+
+     * 
+     * @param id 供应商管理
+主键
+     * @return 供应商管理
+
+     */
+    public Supplier selectSupplierById(Long id);
+
+    /**
+     * 查询供应商管理
+列表
+     * 
+     * @param supplier 供应商管理
+
+     * @return 供应商管理
+集合
+     */
+    public List<Supplier> selectSupplierList(Supplier supplier);
+
+    /**
+     * 新增供应商管理
+
+     * 
+     * @param supplier 供应商管理
+
+     * @return 结果
+     */
+    public int insertSupplier(Supplier supplier);
+
+    /**
+     * 修改供应商管理
+
+     * 
+     * @param supplier 供应商管理
+
+     * @return 结果
+     */
+    public int updateSupplier(Supplier supplier);
+
+    /**
+     * 批量删除供应商管理
+
+     * 
+     * @param ids 需要删除的供应商管理
+主键集合
+     * @return 结果
+     */
+    public int deleteSupplierByIds(Long[] ids);
+
+    /**
+     * 删除供应商管理
+信息
+     * 
+     * @param id 供应商管理
+主键
+     * @return 结果
+     */
+    public int deleteSupplierById(Long id);
+}

+ 111 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SupplierServiceImpl.java

@@ -0,0 +1,111 @@
+package com.zkqy.business.service.impl;
+
+import java.util.List;
+import com.zkqy.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.business.mapper.SupplierMapper;
+import com.zkqy.business.domain.Supplier;
+import com.zkqy.business.service.ISupplierService;
+
+/**
+ * 供应商管理
+Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-04-15
+ */
+@Service
+public class SupplierServiceImpl implements ISupplierService 
+{
+    @Autowired
+    private SupplierMapper supplierMapper;
+
+    /**
+     * 查询供应商管理
+
+     * 
+     * @param id 供应商管理
+主键
+     * @return 供应商管理
+
+     */
+    @Override
+    public Supplier selectSupplierById(Long id)
+    {
+        return supplierMapper.selectSupplierById(id);
+    }
+
+    /**
+     * 查询供应商管理
+列表
+     * 
+     * @param supplier 供应商管理
+
+     * @return 供应商管理
+
+     */
+    @Override
+    public List<Supplier> selectSupplierList(Supplier supplier)
+    {
+        return supplierMapper.selectSupplierList(supplier);
+    }
+
+    /**
+     * 新增供应商管理
+
+     * 
+     * @param supplier 供应商管理
+
+     * @return 结果
+     */
+    @Override
+    public int insertSupplier(Supplier supplier)
+    {
+        supplier.setCreateTime(DateUtils.getNowDate());
+        return supplierMapper.insertSupplier(supplier);
+    }
+
+    /**
+     * 修改供应商管理
+
+     * 
+     * @param supplier 供应商管理
+
+     * @return 结果
+     */
+    @Override
+    public int updateSupplier(Supplier supplier)
+    {
+        supplier.setUpdateTime(DateUtils.getNowDate());
+        return supplierMapper.updateSupplier(supplier);
+    }
+
+    /**
+     * 批量删除供应商管理
+
+     * 
+     * @param ids 需要删除的供应商管理
+主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSupplierByIds(Long[] ids)
+    {
+        return supplierMapper.deleteSupplierByIds(ids);
+    }
+
+    /**
+     * 删除供应商管理
+信息
+     * 
+     * @param id 供应商管理
+主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSupplierById(Long id)
+    {
+        return supplierMapper.deleteSupplierById(id);
+    }
+}

+ 135 - 0
zkqy-custom-business/src/main/resources/mapper/business/SupplierMapper.xml

@@ -0,0 +1,135 @@
+<?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="com.zkqy.business.mapper.SupplierMapper">
+    
+    <resultMap type="Supplier" id="SupplierResult">
+        <result property="id"    column="id"    />
+        <result property="supplierNo"    column="supplier_no"    />
+        <result property="supplierName"    column="supplier_name"    />
+        <result property="abutmentBy"    column="abutment_by"    />
+        <result property="abutment"    column="abutment"    />
+        <result property="contactNumber"    column="contact_number"    />
+        <result property="representative"    column="representative"    />
+        <result property="address"    column="address"    />
+        <result property="state"    column="state"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+    </resultMap>
+
+    <sql id="selectSupplierVo">
+        select id, supplier_no, supplier_name, abutment_by, abutment, contact_number, representative, address, state, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, task_process_key, task_node_key from supplier
+    </sql>
+
+    <select id="selectSupplierList" parameterType="Supplier" resultMap="SupplierResult">
+        <include refid="selectSupplierVo"/>
+        <where>  
+            <if test="supplierNo != null  and supplierNo != ''"> and supplier_no = #{supplierNo}</if>
+            <if test="supplierName != null  and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
+            <if test="abutmentBy != null  and abutmentBy != ''"> and abutment_by = #{abutmentBy}</if>
+            <if test="abutment != null  and abutment != ''"> and abutment = #{abutment}</if>
+            <if test="contactNumber != null  and contactNumber != ''"> and contact_number = #{contactNumber}</if>
+            <if test="representative != null  and representative != ''"> and representative = #{representative}</if>
+            <if test="address != null  and address != ''"> and address = #{address}</if>
+            <if test="state != null  and state != ''"> and state = #{state}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="taskProcessKey != null  and taskProcessKey != ''"> and task_process_key = #{taskProcessKey}</if>
+            <if test="taskNodeKey != null  and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
+        </where>
+    </select>
+    
+    <select id="selectSupplierById" parameterType="Long" resultMap="SupplierResult">
+        <include refid="selectSupplierVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertSupplier" parameterType="Supplier" useGeneratedKeys="true" keyProperty="id">
+        insert into supplier
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="supplierNo != null">supplier_no,</if>
+            <if test="supplierName != null">supplier_name,</if>
+            <if test="abutmentBy != null">abutment_by,</if>
+            <if test="abutment != null">abutment,</if>
+            <if test="contactNumber != null">contact_number,</if>
+            <if test="representative != null">representative,</if>
+            <if test="address != null">address,</if>
+            <if test="state != null">state,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="supplierNo != null">#{supplierNo},</if>
+            <if test="supplierName != null">#{supplierName},</if>
+            <if test="abutmentBy != null">#{abutmentBy},</if>
+            <if test="abutment != null">#{abutment},</if>
+            <if test="contactNumber != null">#{contactNumber},</if>
+            <if test="representative != null">#{representative},</if>
+            <if test="address != null">#{address},</if>
+            <if test="state != null">#{state},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSupplier" parameterType="Supplier">
+        update supplier
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="supplierNo != null">supplier_no = #{supplierNo},</if>
+            <if test="supplierName != null">supplier_name = #{supplierName},</if>
+            <if test="abutmentBy != null">abutment_by = #{abutmentBy},</if>
+            <if test="abutment != null">abutment = #{abutment},</if>
+            <if test="contactNumber != null">contact_number = #{contactNumber},</if>
+            <if test="representative != null">representative = #{representative},</if>
+            <if test="address != null">address = #{address},</if>
+            <if test="state != null">state = #{state},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSupplierById" parameterType="Long">
+        delete from supplier where id = #{id}
+    </delete>
+
+    <delete id="deleteSupplierByIds" parameterType="String">
+        delete from supplier where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 49 - 0
zkqy-ui/src/api/supplier/supplier.js

@@ -0,0 +1,49 @@
+import request from "@/utils/request";
+
+/**
+ * 查询供应商信息
+ * @returns {*}
+ */
+export function getListSupplier() {
+  return request({
+    url: '/business/supplier/getList',
+    method: 'get',
+  })
+}
+
+/**
+ * 查询物料信息
+ * @returns {*}
+ */
+export function getListMateriel() {
+  return request({
+    url: '/system/materiel/getList',
+    method: 'get',
+  })
+}
+
+export function addPurchase(data) {
+  return request({
+    url: '/business/purchase',
+    method: 'POST',
+    data:data
+  })
+}
+
+export function getPurchaseInfos(id) {
+  return request({
+    //url: '/business/purchase/list/getInfoEdit',
+    url: '/business/purchase/list/getInfoEditPurchaseId',
+    method: 'get',
+    params: {"PurchaseId":id}
+  })
+}
+
+export function updatePurchase(data) {
+  return request({
+    url: '/business/purchase/list/updatePurchase',
+    method: 'POST',
+    data:data
+  })
+}
+