基础信息

This commit is contained in:
猫猫guowen
2025-05-20 16:26:42 +08:00
parent 575b7f46d5
commit f818062d23
24 changed files with 3782 additions and 0 deletions

View File

@@ -0,0 +1,109 @@
package com.ruoyi.bas.BasCustomer.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.IdGenerator;
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.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
import com.ruoyi.bas.BasCustomer.service.IBasCustomerService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
/**
* 客户管理Controller
*
* @author gw
* @date 2025-05-20
*/
@RestController
@RequestMapping("/bas/BasCustomer")
public class BasCustomerController extends BaseController
{
@Autowired
private IBasCustomerService basCustomerService;
/**
* 查询客户管理列表
*/
@PreAuthorize("@ss.hasPermi('bas:BasCustomer:list')")
@GetMapping("/list")
public TableDataInfo list(BasCustomer basCustomer)
{
startPage();
List<BasCustomer> list = basCustomerService.selectBasCustomerList(basCustomer);
return getDataTable(list);
}
/**
* 导出客户管理列表
*/
@PreAuthorize("@ss.hasPermi('bas:BasCustomer:export')")
@Log(title = "客户管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BasCustomer basCustomer)
{
List<BasCustomer> list = basCustomerService.selectBasCustomerList(basCustomer);
ExcelUtil<BasCustomer> util = new ExcelUtil<BasCustomer>(BasCustomer.class);
util.exportExcel(response, list, "客户管理数据");
}
/**
* 获取客户管理详细信息
*/
@PreAuthorize("@ss.hasPermi('bas:BasCustomer:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(basCustomerService.selectBasCustomerById(id));
}
/**
* 新增客户管理
*/
@PreAuthorize("@ss.hasPermi('bas:BasCustomer:add')")
@Log(title = "客户管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BasCustomer basCustomer)
{
// 使用雪花算法生成ID并转为字符串
basCustomer.setId(String.valueOf(IdUtil.getSnowflake().nextId()));
return toAjax(basCustomerService.insertBasCustomer(basCustomer));
}
/**
* 修改客户管理
*/
@PreAuthorize("@ss.hasPermi('bas:BasCustomer:edit')")
@Log(title = "客户管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BasCustomer basCustomer)
{
return toAjax(basCustomerService.updateBasCustomer(basCustomer));
}
/**
* 删除客户管理
*/
@PreAuthorize("@ss.hasPermi('bas:BasCustomer:remove')")
@Log(title = "客户管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(basCustomerService.deleteBasCustomerByIds(ids));
}
}

View File

@@ -0,0 +1,323 @@
package com.ruoyi.bas.BasCustomer.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 客户管理对象 bas_customer
*
* @author gw
* @date 2025-05-20
*/
public class BasCustomer extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private String id;
/** 客户编号 */
@Excel(name = "客户编号")
private String customerNo;
/** 客户基本分类 */
@Excel(name = "客户基本分类")
private String customerGroupNo;
/** 客户名称 */
@Excel(name = "客户名称")
private String customerName;
/** 客户简称 */
@Excel(name = "客户简称")
private String simpleName;
/** 是否可用 */
@Excel(name = "是否可用")
private String useable;
/** 业务部门 */
@Excel(name = "业务部门")
private String businessDepartment;
/** 业务员 */
@Excel(name = "业务员")
private String salesman;
/** 助忆码 */
@Excel(name = "助忆码")
private String mnemonicCode;
/** 客户类型 */
@Excel(name = "客户类型")
private String type;
/** 纳税人登记号 */
@Excel(name = "纳税人登记号")
private String taxpayerRegistrationNumber;
/** 对应财务组织 */
@Excel(name = "对应财务组织")
private String organization;
/** 上级客户 */
@Excel(name = "上级客户")
private String supCustomer;
/** 散户 */
@Excel(name = "散户")
private String retailInvestor;
/** 国家/地区 */
@Excel(name = "国家/地区")
private String country;
/** 时区 */
@Excel(name = "时区")
private String timeZone;
/** 数据格式 */
@Excel(name = "数据格式")
private String dataFormat;
/** 联系人姓名 */
@Excel(name = "联系人姓名")
private String contactName;
/** 发货国家 */
@Excel(name = "发货国家")
private String shipment;
/** 税类 */
@Excel(name = "税类")
private String taxCategory;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setCustomerNo(String customerNo)
{
this.customerNo = customerNo;
}
public String getCustomerNo()
{
return customerNo;
}
public void setCustomerGroupNo(String customerGroupNo)
{
this.customerGroupNo = customerGroupNo;
}
public String getCustomerGroupNo()
{
return customerGroupNo;
}
public void setCustomerName(String customerName)
{
this.customerName = customerName;
}
public String getCustomerName()
{
return customerName;
}
public void setSimpleName(String simpleName)
{
this.simpleName = simpleName;
}
public String getSimpleName()
{
return simpleName;
}
public void setUseable(String useable)
{
this.useable = useable;
}
public String getUseable()
{
return useable;
}
public void setBusinessDepartment(String businessDepartment)
{
this.businessDepartment = businessDepartment;
}
public String getBusinessDepartment()
{
return businessDepartment;
}
public void setSalesman(String salesman)
{
this.salesman = salesman;
}
public String getSalesman()
{
return salesman;
}
public void setMnemonicCode(String mnemonicCode)
{
this.mnemonicCode = mnemonicCode;
}
public String getMnemonicCode()
{
return mnemonicCode;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
public void setTaxpayerRegistrationNumber(String taxpayerRegistrationNumber)
{
this.taxpayerRegistrationNumber = taxpayerRegistrationNumber;
}
public String getTaxpayerRegistrationNumber()
{
return taxpayerRegistrationNumber;
}
public void setOrganization(String organization)
{
this.organization = organization;
}
public String getOrganization()
{
return organization;
}
public void setSupCustomer(String supCustomer)
{
this.supCustomer = supCustomer;
}
public String getSupCustomer()
{
return supCustomer;
}
public void setRetailInvestor(String retailInvestor)
{
this.retailInvestor = retailInvestor;
}
public String getRetailInvestor()
{
return retailInvestor;
}
public void setCountry(String country)
{
this.country = country;
}
public String getCountry()
{
return country;
}
public void setTimeZone(String timeZone)
{
this.timeZone = timeZone;
}
public String getTimeZone()
{
return timeZone;
}
public void setDataFormat(String dataFormat)
{
this.dataFormat = dataFormat;
}
public String getDataFormat()
{
return dataFormat;
}
public void setContactName(String contactName)
{
this.contactName = contactName;
}
public String getContactName()
{
return contactName;
}
public void setShipment(String shipment)
{
this.shipment = shipment;
}
public String getShipment()
{
return shipment;
}
public void setTaxCategory(String taxCategory)
{
this.taxCategory = taxCategory;
}
public String getTaxCategory()
{
return taxCategory;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("customerNo", getCustomerNo())
.append("customerGroupNo", getCustomerGroupNo())
.append("customerName", getCustomerName())
.append("simpleName", getSimpleName())
.append("useable", getUseable())
.append("remark", getRemark())
.append("businessDepartment", getBusinessDepartment())
.append("salesman", getSalesman())
.append("mnemonicCode", getMnemonicCode())
.append("type", getType())
.append("taxpayerRegistrationNumber", getTaxpayerRegistrationNumber())
.append("organization", getOrganization())
.append("supCustomer", getSupCustomer())
.append("retailInvestor", getRetailInvestor())
.append("country", getCountry())
.append("timeZone", getTimeZone())
.append("dataFormat", getDataFormat())
.append("contactName", getContactName())
.append("shipment", getShipment())
.append("taxCategory", getTaxCategory())
.toString();
}
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.bas.BasCustomer.mapper;
import java.util.List;
import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
/**
* 客户管理Mapper接口
*
* @author gw
* @date 2025-05-20
*/
public interface BasCustomerMapper
{
/**
* 查询客户管理
*
* @param id 客户管理主键
* @return 客户管理
*/
public BasCustomer selectBasCustomerById(String id);
/**
* 查询客户管理列表
*
* @param basCustomer 客户管理
* @return 客户管理集合
*/
public List<BasCustomer> selectBasCustomerList(BasCustomer basCustomer);
/**
* 新增客户管理
*
* @param basCustomer 客户管理
* @return 结果
*/
public int insertBasCustomer(BasCustomer basCustomer);
/**
* 修改客户管理
*
* @param basCustomer 客户管理
* @return 结果
*/
public int updateBasCustomer(BasCustomer basCustomer);
/**
* 删除客户管理
*
* @param id 客户管理主键
* @return 结果
*/
public int deleteBasCustomerById(String id);
/**
* 批量删除客户管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteBasCustomerByIds(String[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.bas.BasCustomer.service;
import java.util.List;
import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
/**
* 客户管理Service接口
*
* @author gw
* @date 2025-05-20
*/
public interface IBasCustomerService
{
/**
* 查询客户管理
*
* @param id 客户管理主键
* @return 客户管理
*/
public BasCustomer selectBasCustomerById(String id);
/**
* 查询客户管理列表
*
* @param basCustomer 客户管理
* @return 客户管理集合
*/
public List<BasCustomer> selectBasCustomerList(BasCustomer basCustomer);
/**
* 新增客户管理
*
* @param basCustomer 客户管理
* @return 结果
*/
public int insertBasCustomer(BasCustomer basCustomer);
/**
* 修改客户管理
*
* @param basCustomer 客户管理
* @return 结果
*/
public int updateBasCustomer(BasCustomer basCustomer);
/**
* 批量删除客户管理
*
* @param ids 需要删除的客户管理主键集合
* @return 结果
*/
public int deleteBasCustomerByIds(String[] ids);
/**
* 删除客户管理信息
*
* @param id 客户管理主键
* @return 结果
*/
public int deleteBasCustomerById(String id);
}

View File

@@ -0,0 +1,93 @@
package com.ruoyi.bas.BasCustomer.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bas.BasCustomer.mapper.BasCustomerMapper;
import com.ruoyi.bas.BasCustomer.domain.BasCustomer;
import com.ruoyi.bas.BasCustomer.service.IBasCustomerService;
/**
* 客户管理Service业务层处理
*
* @author gw
* @date 2025-05-20
*/
@Service
public class BasCustomerServiceImpl implements IBasCustomerService
{
@Autowired
private BasCustomerMapper basCustomerMapper;
/**
* 查询客户管理
*
* @param id 客户管理主键
* @return 客户管理
*/
@Override
public BasCustomer selectBasCustomerById(String id)
{
return basCustomerMapper.selectBasCustomerById(id);
}
/**
* 查询客户管理列表
*
* @param basCustomer 客户管理
* @return 客户管理
*/
@Override
public List<BasCustomer> selectBasCustomerList(BasCustomer basCustomer)
{
return basCustomerMapper.selectBasCustomerList(basCustomer);
}
/**
* 新增客户管理
*
* @param basCustomer 客户管理
* @return 结果
*/
@Override
public int insertBasCustomer(BasCustomer basCustomer)
{
return basCustomerMapper.insertBasCustomer(basCustomer);
}
/**
* 修改客户管理
*
* @param basCustomer 客户管理
* @return 结果
*/
@Override
public int updateBasCustomer(BasCustomer basCustomer)
{
return basCustomerMapper.updateBasCustomer(basCustomer);
}
/**
* 批量删除客户管理
*
* @param ids 需要删除的客户管理主键
* @return 结果
*/
@Override
public int deleteBasCustomerByIds(String[] ids)
{
return basCustomerMapper.deleteBasCustomerByIds(ids);
}
/**
* 删除客户管理信息
*
* @param id 客户管理主键
* @return 结果
*/
@Override
public int deleteBasCustomerById(String id)
{
return basCustomerMapper.deleteBasCustomerById(id);
}
}

View File

@@ -0,0 +1,107 @@
package com.ruoyi.bas.BasProduct.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.bas.BasProduct.domain.BasProduct;
import com.ruoyi.bas.BasProduct.service.IBasProductService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
/**
* 物料管理Controller
*
* @author ruoyi
* @date 2025-05-20
*/
@RestController
@RequestMapping("/bas/BasProduct")
public class BasProductController extends BaseController
{
@Autowired
private IBasProductService basProductService;
/**
* 查询物料管理列表
*/
@PreAuthorize("@ss.hasPermi('bas:BasProduct:list')")
@GetMapping("/list")
public TableDataInfo list(BasProduct basProduct)
{
startPage();
List<BasProduct> list = basProductService.selectBasProductList(basProduct);
return getDataTable(list);
}
/**
* 导出物料管理列表
*/
@PreAuthorize("@ss.hasPermi('bas:BasProduct:export')")
@Log(title = "物料管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BasProduct basProduct)
{
List<BasProduct> list = basProductService.selectBasProductList(basProduct);
ExcelUtil<BasProduct> util = new ExcelUtil<BasProduct>(BasProduct.class);
util.exportExcel(response, list, "物料管理数据");
}
/**
* 获取物料管理详细信息
*/
@PreAuthorize("@ss.hasPermi('bas:BasProduct:query')")
@GetMapping(value = "/{productGuid}")
public AjaxResult getInfo(@PathVariable("productGuid") String productGuid)
{
return success(basProductService.selectBasProductByProductGuid(productGuid));
}
/**
* 新增物料管理
*/
@PreAuthorize("@ss.hasPermi('bas:BasProduct:add')")
@Log(title = "物料管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BasProduct basProduct)
{
// 使用雪花算法生成ID并转为字符串
basProduct.setProductGuid(String.valueOf(IdUtil.getSnowflake().nextId()));
return toAjax(basProductService.insertBasProduct(basProduct));
}
/**
* 修改物料管理
*/
@PreAuthorize("@ss.hasPermi('bas:BasProduct:edit')")
@Log(title = "物料管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BasProduct basProduct)
{
return toAjax(basProductService.updateBasProduct(basProduct));
}
/**
* 删除物料管理
*/
@PreAuthorize("@ss.hasPermi('bas:BasProduct:remove')")
@Log(title = "物料管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{productGuids}")
public AjaxResult remove(@PathVariable String[] productGuids)
{
return toAjax(basProductService.deleteBasProductByProductGuids(productGuids));
}
}

View File

@@ -0,0 +1,233 @@
package com.ruoyi.bas.BasProduct.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 物料管理对象 bas_product
*
* @author ruoyi
* @date 2025-05-20
*/
public class BasProduct extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private String productGuid;
/** 物料编码 */
@Excel(name = "物料编码")
private String productId;
/** 父节点id */
@Excel(name = "父节点id")
private String parentId;
/** 价格 */
@Excel(name = "价格")
private String price;
/** 品牌 */
@Excel(name = "品牌")
private String cargoNo;
/** 单位 */
@Excel(name = "单位")
private String unit;
/** 规格 */
@Excel(name = "规格")
private String spec;
/** 备用字段1 */
@Excel(name = "备用字段1")
private String spare1;
/** 备用字段2 */
@Excel(name = "备用字段2")
private String spare2;
/** 备用字段3 */
@Excel(name = "备用字段3")
private String spare3;
/** 备用字段4 */
@Excel(name = "备用字段4")
private String spare4;
/** 备用字段5 */
@Excel(name = "备用字段5")
private String spare5;
/** 备用字段6 */
@Excel(name = "备用字段6")
private String spare6;
/** 物料名称 */
@Excel(name = "物料名称")
private String productName;
public void setProductGuid(String productGuid)
{
this.productGuid = productGuid;
}
public String getProductGuid()
{
return productGuid;
}
public void setProductId(String productId)
{
this.productId = productId;
}
public String getProductId()
{
return productId;
}
public void setParentId(String parentId)
{
this.parentId = parentId;
}
public String getParentId()
{
return parentId;
}
public void setPrice(String price)
{
this.price = price;
}
public String getPrice()
{
return price;
}
public void setCargoNo(String cargoNo)
{
this.cargoNo = cargoNo;
}
public String getCargoNo()
{
return cargoNo;
}
public void setUnit(String unit)
{
this.unit = unit;
}
public String getUnit()
{
return unit;
}
public void setSpec(String spec)
{
this.spec = spec;
}
public String getSpec()
{
return spec;
}
public void setSpare1(String spare1)
{
this.spare1 = spare1;
}
public String getSpare1()
{
return spare1;
}
public void setSpare2(String spare2)
{
this.spare2 = spare2;
}
public String getSpare2()
{
return spare2;
}
public void setSpare3(String spare3)
{
this.spare3 = spare3;
}
public String getSpare3()
{
return spare3;
}
public void setSpare4(String spare4)
{
this.spare4 = spare4;
}
public String getSpare4()
{
return spare4;
}
public void setSpare5(String spare5)
{
this.spare5 = spare5;
}
public String getSpare5()
{
return spare5;
}
public void setSpare6(String spare6)
{
this.spare6 = spare6;
}
public String getSpare6()
{
return spare6;
}
public void setProductName(String productName)
{
this.productName = productName;
}
public String getProductName()
{
return productName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("productGuid", getProductGuid())
.append("productId", getProductId())
.append("parentId", getParentId())
.append("price", getPrice())
.append("cargoNo", getCargoNo())
.append("unit", getUnit())
.append("spec", getSpec())
.append("remark", getRemark())
.append("spare1", getSpare1())
.append("spare2", getSpare2())
.append("spare3", getSpare3())
.append("spare4", getSpare4())
.append("spare5", getSpare5())
.append("spare6", getSpare6())
.append("productName", getProductName())
.toString();
}
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.bas.BasProduct.mapper;
import java.util.List;
import com.ruoyi.bas.BasProduct.domain.BasProduct;
/**
* 物料管理Mapper接口
*
* @author ruoyi
* @date 2025-05-20
*/
public interface BasProductMapper
{
/**
* 查询物料管理
*
* @param productGuid 物料管理主键
* @return 物料管理
*/
public BasProduct selectBasProductByProductGuid(String productGuid);
/**
* 查询物料管理列表
*
* @param basProduct 物料管理
* @return 物料管理集合
*/
public List<BasProduct> selectBasProductList(BasProduct basProduct);
/**
* 新增物料管理
*
* @param basProduct 物料管理
* @return 结果
*/
public int insertBasProduct(BasProduct basProduct);
/**
* 修改物料管理
*
* @param basProduct 物料管理
* @return 结果
*/
public int updateBasProduct(BasProduct basProduct);
/**
* 删除物料管理
*
* @param productGuid 物料管理主键
* @return 结果
*/
public int deleteBasProductByProductGuid(String productGuid);
/**
* 批量删除物料管理
*
* @param productGuids 需要删除的数据主键集合
* @return 结果
*/
public int deleteBasProductByProductGuids(String[] productGuids);
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.bas.BasProduct.service;
import java.util.List;
import com.ruoyi.bas.BasProduct.domain.BasProduct;
/**
* 物料管理Service接口
*
* @author ruoyi
* @date 2025-05-20
*/
public interface IBasProductService
{
/**
* 查询物料管理
*
* @param productGuid 物料管理主键
* @return 物料管理
*/
public BasProduct selectBasProductByProductGuid(String productGuid);
/**
* 查询物料管理列表
*
* @param basProduct 物料管理
* @return 物料管理集合
*/
public List<BasProduct> selectBasProductList(BasProduct basProduct);
/**
* 新增物料管理
*
* @param basProduct 物料管理
* @return 结果
*/
public int insertBasProduct(BasProduct basProduct);
/**
* 修改物料管理
*
* @param basProduct 物料管理
* @return 结果
*/
public int updateBasProduct(BasProduct basProduct);
/**
* 批量删除物料管理
*
* @param productGuids 需要删除的物料管理主键集合
* @return 结果
*/
public int deleteBasProductByProductGuids(String[] productGuids);
/**
* 删除物料管理信息
*
* @param productGuid 物料管理主键
* @return 结果
*/
public int deleteBasProductByProductGuid(String productGuid);
}

View File

@@ -0,0 +1,93 @@
package com.ruoyi.bas.BasProduct.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bas.BasProduct.mapper.BasProductMapper;
import com.ruoyi.bas.BasProduct.domain.BasProduct;
import com.ruoyi.bas.BasProduct.service.IBasProductService;
/**
* 物料管理Service业务层处理
*
* @author ruoyi
* @date 2025-05-20
*/
@Service
public class BasProductServiceImpl implements IBasProductService
{
@Autowired
private BasProductMapper basProductMapper;
/**
* 查询物料管理
*
* @param productGuid 物料管理主键
* @return 物料管理
*/
@Override
public BasProduct selectBasProductByProductGuid(String productGuid)
{
return basProductMapper.selectBasProductByProductGuid(productGuid);
}
/**
* 查询物料管理列表
*
* @param basProduct 物料管理
* @return 物料管理
*/
@Override
public List<BasProduct> selectBasProductList(BasProduct basProduct)
{
return basProductMapper.selectBasProductList(basProduct);
}
/**
* 新增物料管理
*
* @param basProduct 物料管理
* @return 结果
*/
@Override
public int insertBasProduct(BasProduct basProduct)
{
return basProductMapper.insertBasProduct(basProduct);
}
/**
* 修改物料管理
*
* @param basProduct 物料管理
* @return 结果
*/
@Override
public int updateBasProduct(BasProduct basProduct)
{
return basProductMapper.updateBasProduct(basProduct);
}
/**
* 批量删除物料管理
*
* @param productGuids 需要删除的物料管理主键
* @return 结果
*/
@Override
public int deleteBasProductByProductGuids(String[] productGuids)
{
return basProductMapper.deleteBasProductByProductGuids(productGuids);
}
/**
* 删除物料管理信息
*
* @param productGuid 物料管理主键
* @return 结果
*/
@Override
public int deleteBasProductByProductGuid(String productGuid)
{
return basProductMapper.deleteBasProductByProductGuid(productGuid);
}
}

View File

@@ -0,0 +1,106 @@
package com.ruoyi.bas.BasSupplier.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.bas.BasSupplier.domain.BasSupplier;
import com.ruoyi.bas.BasSupplier.service.IBasSupplierService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import cn.hutool.core.util.IdUtil;
/**
* 供应商管理Controller
*
* @author gw
* @date 2025-05-20
*/
@RestController
@RequestMapping("/bas/BasSupplier")
public class BasSupplierController extends BaseController
{
@Autowired
private IBasSupplierService basSupplierService;
/**
* 查询供应商管理列表
*/
@PreAuthorize("@ss.hasPermi('bas:BasSupplier:list')")
@GetMapping("/list")
public TableDataInfo list(BasSupplier basSupplier)
{
startPage();
List<BasSupplier> list = basSupplierService.selectBasSupplierList(basSupplier);
return getDataTable(list);
}
/**
* 导出供应商管理列表
*/
@PreAuthorize("@ss.hasPermi('bas:BasSupplier:export')")
@Log(title = "供应商管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BasSupplier basSupplier)
{
List<BasSupplier> list = basSupplierService.selectBasSupplierList(basSupplier);
ExcelUtil<BasSupplier> util = new ExcelUtil<BasSupplier>(BasSupplier.class);
util.exportExcel(response, list, "供应商管理数据");
}
/**
* 获取供应商管理详细信息
*/
@PreAuthorize("@ss.hasPermi('bas:BasSupplier:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(basSupplierService.selectBasSupplierById(id));
}
/**
* 新增供应商管理
*/
@PreAuthorize("@ss.hasPermi('bas:BasSupplier:add')")
@Log(title = "供应商管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BasSupplier basSupplier)
{
// 使用雪花算法生成ID并转为字符串
basSupplier.setId(String.valueOf(IdUtil.getSnowflake().nextId()));
return toAjax(basSupplierService.insertBasSupplier(basSupplier));
}
/**
* 修改供应商管理
*/
@PreAuthorize("@ss.hasPermi('bas:BasSupplier:edit')")
@Log(title = "供应商管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BasSupplier basSupplier)
{
return toAjax(basSupplierService.updateBasSupplier(basSupplier));
}
/**
* 删除供应商管理
*/
@PreAuthorize("@ss.hasPermi('bas:BasSupplier:remove')")
@Log(title = "供应商管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(basSupplierService.deleteBasSupplierByIds(ids));
}
}

View File

@@ -0,0 +1,293 @@
package com.ruoyi.bas.BasSupplier.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 供应商管理对象 bas_supplier
*
* @author gw
* @date 2025-05-20
*/
public class BasSupplier extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** fid()主键 */
private String id;
/** 供应商编号 */
@Excel(name = " 供应商编号")
private String supplierNo;
/** 供应商名称 */
@Excel(name = "供应商名称")
private String supplierGroupNo;
/** 供应商名称 */
@Excel(name = "供应商名称")
private String supplierName;
/** 简称 */
@Excel(name = "简称")
private String simpleName;
/** 是否可用 */
@Excel(name = "是否可用")
private String useable;
/** 地区分类 */
@Excel(name = "地区分类")
private String supplierArae;
/** 纳税人登记号 */
@Excel(name = "纳税人登记号")
private String taxpayerRegistrationNumber;
/** 国家 */
@Excel(name = "国家")
private String country;
/** 时区 */
@Excel(name = "时区")
private String timeZone;
/** 数据格式 */
@Excel(name = "数据格式")
private String dataFormat;
/** 收货国家 */
@Excel(name = "收货国家")
private String receivingCountry;
/** 税类 */
@Excel(name = "税类")
private String taxCategory;
/** 法人 */
@Excel(name = "法人")
private String legalPerson;
/** 注册资金 */
@Excel(name = "注册资金")
private String registeredCapital;
/** 企业地址 */
@Excel(name = "企业地址")
private String address;
/** 联系人姓名 */
@Excel(name = "联系人姓名")
private String contactName;
/** 联系电话 */
@Excel(name = "联系电话")
private String contactNumber;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setSupplierNo(String supplierNo)
{
this.supplierNo = supplierNo;
}
public String getSupplierNo()
{
return supplierNo;
}
public void setSupplierGroupNo(String supplierGroupNo)
{
this.supplierGroupNo = supplierGroupNo;
}
public String getSupplierGroupNo()
{
return supplierGroupNo;
}
public void setSupplierName(String supplierName)
{
this.supplierName = supplierName;
}
public String getSupplierName()
{
return supplierName;
}
public void setSimpleName(String simpleName)
{
this.simpleName = simpleName;
}
public String getSimpleName()
{
return simpleName;
}
public void setUseable(String useable)
{
this.useable = useable;
}
public String getUseable()
{
return useable;
}
public void setSupplierArae(String supplierArae)
{
this.supplierArae = supplierArae;
}
public String getSupplierArae()
{
return supplierArae;
}
public void setTaxpayerRegistrationNumber(String taxpayerRegistrationNumber)
{
this.taxpayerRegistrationNumber = taxpayerRegistrationNumber;
}
public String getTaxpayerRegistrationNumber()
{
return taxpayerRegistrationNumber;
}
public void setCountry(String country)
{
this.country = country;
}
public String getCountry()
{
return country;
}
public void setTimeZone(String timeZone)
{
this.timeZone = timeZone;
}
public String getTimeZone()
{
return timeZone;
}
public void setDataFormat(String dataFormat)
{
this.dataFormat = dataFormat;
}
public String getDataFormat()
{
return dataFormat;
}
public void setReceivingCountry(String receivingCountry)
{
this.receivingCountry = receivingCountry;
}
public String getReceivingCountry()
{
return receivingCountry;
}
public void setTaxCategory(String taxCategory)
{
this.taxCategory = taxCategory;
}
public String getTaxCategory()
{
return taxCategory;
}
public void setLegalPerson(String legalPerson)
{
this.legalPerson = legalPerson;
}
public String getLegalPerson()
{
return legalPerson;
}
public void setRegisteredCapital(String registeredCapital)
{
this.registeredCapital = registeredCapital;
}
public String getRegisteredCapital()
{
return registeredCapital;
}
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
public void setContactName(String contactName)
{
this.contactName = contactName;
}
public String getContactName()
{
return contactName;
}
public void setContactNumber(String contactNumber)
{
this.contactNumber = contactNumber;
}
public String getContactNumber()
{
return contactNumber;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("supplierNo", getSupplierNo())
.append("supplierGroupNo", getSupplierGroupNo())
.append("supplierName", getSupplierName())
.append("simpleName", getSimpleName())
.append("useable", getUseable())
.append("remark", getRemark())
.append("supplierArae", getSupplierArae())
.append("taxpayerRegistrationNumber", getTaxpayerRegistrationNumber())
.append("country", getCountry())
.append("timeZone", getTimeZone())
.append("dataFormat", getDataFormat())
.append("receivingCountry", getReceivingCountry())
.append("taxCategory", getTaxCategory())
.append("legalPerson", getLegalPerson())
.append("registeredCapital", getRegisteredCapital())
.append("address", getAddress())
.append("contactName", getContactName())
.append("contactNumber", getContactNumber())
.toString();
}
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.bas.BasSupplier.mapper;
import java.util.List;
import com.ruoyi.bas.BasSupplier.domain.BasSupplier;
/**
* 供应商管理Mapper接口
*
* @author gw
* @date 2025-05-20
*/
public interface BasSupplierMapper
{
/**
* 查询供应商管理
*
* @param id 供应商管理主键
* @return 供应商管理
*/
public BasSupplier selectBasSupplierById(String id);
/**
* 查询供应商管理列表
*
* @param basSupplier 供应商管理
* @return 供应商管理集合
*/
public List<BasSupplier> selectBasSupplierList(BasSupplier basSupplier);
/**
* 新增供应商管理
*
* @param basSupplier 供应商管理
* @return 结果
*/
public int insertBasSupplier(BasSupplier basSupplier);
/**
* 修改供应商管理
*
* @param basSupplier 供应商管理
* @return 结果
*/
public int updateBasSupplier(BasSupplier basSupplier);
/**
* 删除供应商管理
*
* @param id 供应商管理主键
* @return 结果
*/
public int deleteBasSupplierById(String id);
/**
* 批量删除供应商管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteBasSupplierByIds(String[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.bas.BasSupplier.service;
import java.util.List;
import com.ruoyi.bas.BasSupplier.domain.BasSupplier;
/**
* 供应商管理Service接口
*
* @author gw
* @date 2025-05-20
*/
public interface IBasSupplierService
{
/**
* 查询供应商管理
*
* @param id 供应商管理主键
* @return 供应商管理
*/
public BasSupplier selectBasSupplierById(String id);
/**
* 查询供应商管理列表
*
* @param basSupplier 供应商管理
* @return 供应商管理集合
*/
public List<BasSupplier> selectBasSupplierList(BasSupplier basSupplier);
/**
* 新增供应商管理
*
* @param basSupplier 供应商管理
* @return 结果
*/
public int insertBasSupplier(BasSupplier basSupplier);
/**
* 修改供应商管理
*
* @param basSupplier 供应商管理
* @return 结果
*/
public int updateBasSupplier(BasSupplier basSupplier);
/**
* 批量删除供应商管理
*
* @param ids 需要删除的供应商管理主键集合
* @return 结果
*/
public int deleteBasSupplierByIds(String[] ids);
/**
* 删除供应商管理信息
*
* @param id 供应商管理主键
* @return 结果
*/
public int deleteBasSupplierById(String id);
}

View File

@@ -0,0 +1,93 @@
package com.ruoyi.bas.BasSupplier.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bas.BasSupplier.mapper.BasSupplierMapper;
import com.ruoyi.bas.BasSupplier.domain.BasSupplier;
import com.ruoyi.bas.BasSupplier.service.IBasSupplierService;
/**
* 供应商管理Service业务层处理
*
* @author gw
* @date 2025-05-20
*/
@Service
public class BasSupplierServiceImpl implements IBasSupplierService
{
@Autowired
private BasSupplierMapper basSupplierMapper;
/**
* 查询供应商管理
*
* @param id 供应商管理主键
* @return 供应商管理
*/
@Override
public BasSupplier selectBasSupplierById(String id)
{
return basSupplierMapper.selectBasSupplierById(id);
}
/**
* 查询供应商管理列表
*
* @param basSupplier 供应商管理
* @return 供应商管理
*/
@Override
public List<BasSupplier> selectBasSupplierList(BasSupplier basSupplier)
{
return basSupplierMapper.selectBasSupplierList(basSupplier);
}
/**
* 新增供应商管理
*
* @param basSupplier 供应商管理
* @return 结果
*/
@Override
public int insertBasSupplier(BasSupplier basSupplier)
{
return basSupplierMapper.insertBasSupplier(basSupplier);
}
/**
* 修改供应商管理
*
* @param basSupplier 供应商管理
* @return 结果
*/
@Override
public int updateBasSupplier(BasSupplier basSupplier)
{
return basSupplierMapper.updateBasSupplier(basSupplier);
}
/**
* 批量删除供应商管理
*
* @param ids 需要删除的供应商管理主键
* @return 结果
*/
@Override
public int deleteBasSupplierByIds(String[] ids)
{
return basSupplierMapper.deleteBasSupplierByIds(ids);
}
/**
* 删除供应商管理信息
*
* @param id 供应商管理主键
* @return 结果
*/
@Override
public int deleteBasSupplierById(String id)
{
return basSupplierMapper.deleteBasSupplierById(id);
}
}

View File

@@ -0,0 +1,152 @@
<?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.ruoyi.bas.BasCustomer.mapper.BasCustomerMapper">
<resultMap type="BasCustomer" id="BasCustomerResult">
<result property="id" column="id" />
<result property="customerNo" column="customer_no" />
<result property="customerGroupNo" column="customer_group_no" />
<result property="customerName" column="customer_name" />
<result property="simpleName" column="simple_name" />
<result property="useable" column="useable" />
<result property="remark" column="remark" />
<result property="businessDepartment" column="business_department" />
<result property="salesman" column="salesman" />
<result property="mnemonicCode" column="mnemonic_code" />
<result property="type" column="type" />
<result property="taxpayerRegistrationNumber" column="taxpayer_registration_number" />
<result property="organization" column="organization" />
<result property="supCustomer" column="sup_customer" />
<result property="retailInvestor" column="retail_investor" />
<result property="country" column="country" />
<result property="timeZone" column="time_zone" />
<result property="dataFormat" column="data_format" />
<result property="contactName" column="contact_name" />
<result property="shipment" column="shipment" />
<result property="taxCategory" column="tax_category" />
</resultMap>
<sql id="selectBasCustomerVo">
select id, customer_no, customer_group_no, customer_name, simple_name, useable, remark, business_department, salesman, mnemonic_code, type, taxpayer_registration_number, organization, sup_customer, retail_investor, country, time_zone, data_format, contact_name, shipment, tax_category from bas_customer
</sql>
<select id="selectBasCustomerList" parameterType="BasCustomer" resultMap="BasCustomerResult">
<include refid="selectBasCustomerVo"/>
<where>
<if test="customerNo != null and customerNo != ''"> and customer_no like concat('%', #{customerNo}, '%')</if>
<if test="customerGroupNo != null and customerGroupNo != ''"> and customer_group_no like concat('%', #{customerGroupNo}, '%')</if>
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
<if test="simpleName != null and simpleName != ''"> and simple_name like concat('%', #{simpleName}, '%')</if>
<if test="useable != null and useable != ''"> and useable = #{useable}</if>
<if test="businessDepartment != null and businessDepartment != ''"> and business_department like concat('%', #{businessDepartment}, '%')</if>
<if test="salesman != null and salesman != ''"> and salesman like concat('%', #{salesman}, '%')</if>
<if test="mnemonicCode != null and mnemonicCode != ''"> and mnemonic_code like concat('%', #{mnemonicCode}, '%')</if>
<if test="type != null and type != ''"> and type like concat('%', #{type}, '%')</if>
<if test="taxpayerRegistrationNumber != null and taxpayerRegistrationNumber != ''"> and taxpayer_registration_number like concat('%', #{taxpayerRegistrationNumber}, '%')</if>
<if test="organization != null and organization != ''"> and organization like concat('%', #{organization}, '%')</if>
<if test="supCustomer != null and supCustomer != ''"> and sup_customer like concat('%', #{supCustomer}, '%')</if>
<if test="retailInvestor != null and retailInvestor != ''"> and retail_investor like concat('%', #{retailInvestor}, '%')</if>
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
<if test="timeZone != null and timeZone != ''"> and time_zone like concat('%', #{timeZone}, '%')</if>
<if test="dataFormat != null and dataFormat != ''"> and data_format like concat('%', #{dataFormat}, '%')</if>
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
<if test="shipment != null and shipment != ''"> and shipment like concat('%', #{shipment}, '%')</if>
<if test="taxCategory != null and taxCategory != ''"> and tax_category like concat('%', #{taxCategory}, '%')</if>
</where>
</select>
<select id="selectBasCustomerById" parameterType="String" resultMap="BasCustomerResult">
<include refid="selectBasCustomerVo"/>
where id = #{id}
</select>
<insert id="insertBasCustomer" parameterType="BasCustomer">
insert into bas_customer
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">id,</if>
<if test="customerNo != null and customerNo != ''">customer_no,</if>
<if test="customerGroupNo != null">customer_group_no,</if>
<if test="customerName != null">customer_name,</if>
<if test="simpleName != null">simple_name,</if>
<if test="useable != null">useable,</if>
<if test="remark != null">remark,</if>
<if test="businessDepartment != null">business_department,</if>
<if test="salesman != null">salesman,</if>
<if test="mnemonicCode != null">mnemonic_code,</if>
<if test="type != null">type,</if>
<if test="taxpayerRegistrationNumber != null">taxpayer_registration_number,</if>
<if test="organization != null">organization,</if>
<if test="supCustomer != null">sup_customer,</if>
<if test="retailInvestor != null">retail_investor,</if>
<if test="country != null">country,</if>
<if test="timeZone != null">time_zone,</if>
<if test="dataFormat != null">data_format,</if>
<if test="contactName != null">contact_name,</if>
<if test="shipment != null">shipment,</if>
<if test="taxCategory != null">tax_category,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
<if test="customerNo != null and customerNo != ''">#{customerNo},</if>
<if test="customerGroupNo != null">#{customerGroupNo},</if>
<if test="customerName != null">#{customerName},</if>
<if test="simpleName != null">#{simpleName},</if>
<if test="useable != null">#{useable},</if>
<if test="remark != null">#{remark},</if>
<if test="businessDepartment != null">#{businessDepartment},</if>
<if test="salesman != null">#{salesman},</if>
<if test="mnemonicCode != null">#{mnemonicCode},</if>
<if test="type != null">#{type},</if>
<if test="taxpayerRegistrationNumber != null">#{taxpayerRegistrationNumber},</if>
<if test="organization != null">#{organization},</if>
<if test="supCustomer != null">#{supCustomer},</if>
<if test="retailInvestor != null">#{retailInvestor},</if>
<if test="country != null">#{country},</if>
<if test="timeZone != null">#{timeZone},</if>
<if test="dataFormat != null">#{dataFormat},</if>
<if test="contactName != null">#{contactName},</if>
<if test="shipment != null">#{shipment},</if>
<if test="taxCategory != null">#{taxCategory},</if>
</trim>
</insert>
<update id="updateBasCustomer" parameterType="BasCustomer">
update bas_customer
<trim prefix="SET" suffixOverrides=",">
<if test="customerNo != null and customerNo != ''">customer_no = #{customerNo},</if>
<if test="customerGroupNo != null">customer_group_no = #{customerGroupNo},</if>
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="simpleName != null">simple_name = #{simpleName},</if>
<if test="useable != null">useable = #{useable},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="businessDepartment != null">business_department = #{businessDepartment},</if>
<if test="salesman != null">salesman = #{salesman},</if>
<if test="mnemonicCode != null">mnemonic_code = #{mnemonicCode},</if>
<if test="type != null">type = #{type},</if>
<if test="taxpayerRegistrationNumber != null">taxpayer_registration_number = #{taxpayerRegistrationNumber},</if>
<if test="organization != null">organization = #{organization},</if>
<if test="supCustomer != null">sup_customer = #{supCustomer},</if>
<if test="retailInvestor != null">retail_investor = #{retailInvestor},</if>
<if test="country != null">country = #{country},</if>
<if test="timeZone != null">time_zone = #{timeZone},</if>
<if test="dataFormat != null">data_format = #{dataFormat},</if>
<if test="contactName != null">contact_name = #{contactName},</if>
<if test="shipment != null">shipment = #{shipment},</if>
<if test="taxCategory != null">tax_category = #{taxCategory},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBasCustomerById" parameterType="String">
delete from bas_customer where id = #{id}
</delete>
<delete id="deleteBasCustomerByIds" parameterType="String">
delete from bas_customer where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,123 @@
<?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.ruoyi.bas.BasProduct.mapper.BasProductMapper">
<resultMap type="BasProduct" id="BasProductResult">
<result property="productGuid" column="product_guid" />
<result property="productId" column="product_id" />
<result property="parentId" column="parent_id" />
<result property="price" column="price" />
<result property="cargoNo" column="cargo_no" />
<result property="unit" column="unit" />
<result property="spec" column="spec" />
<result property="remark" column="remark" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
<result property="spare4" column="spare4" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
<result property="productName" column="product_name" />
</resultMap>
<sql id="selectBasProductVo">
select product_guid, product_id, parent_id, price, cargo_no, unit, spec, remark, spare1, spare2, spare3, spare4, spare5, spare6, product_name from bas_product
</sql>
<select id="selectBasProductList" parameterType="BasProduct" resultMap="BasProductResult">
<include refid="selectBasProductVo"/>
<where>
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
<if test="parentId != null and parentId != ''"> and parent_id like concat('%', #{parentId}, '%')</if>
<if test="price != null and price != ''"> and price like concat('%', #{price}, '%')</if>
<if test="cargoNo != null and cargoNo != ''"> and cargo_no like concat('%', #{cargoNo}, '%')</if>
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
<if test="spec != null and spec != ''"> and spec like concat('%', #{spec}, '%')</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
<if test="spare4 != null and spare4 != ''"> and spare4 like concat('%', #{spare4}, '%')</if>
<if test="spare5 != null and spare5 != ''"> and spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
</where>
</select>
<select id="selectBasProductByProductGuid" parameterType="String" resultMap="BasProductResult">
<include refid="selectBasProductVo"/>
where product_guid = #{productGuid}
</select>
<insert id="insertBasProduct" parameterType="BasProduct">
insert into bas_product
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="productGuid != null">product_guid,</if>
<if test="productId != null and productId != ''">product_id,</if>
<if test="parentId != null and parentId != ''">parent_id,</if>
<if test="price != null">price,</if>
<if test="cargoNo != null">cargo_no,</if>
<if test="unit != null">unit,</if>
<if test="spec != null">spec,</if>
<if test="remark != null">remark,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
<if test="spare4 != null">spare4,</if>
<if test="spare5 != null">spare5,</if>
<if test="spare6 != null">spare6,</if>
<if test="productName != null and productName != ''">product_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="productGuid != null">#{productGuid},</if>
<if test="productId != null and productId != ''">#{productId},</if>
<if test="parentId != null and parentId != ''">#{parentId},</if>
<if test="price != null">#{price},</if>
<if test="cargoNo != null">#{cargoNo},</if>
<if test="unit != null">#{unit},</if>
<if test="spec != null">#{spec},</if>
<if test="remark != null">#{remark},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="spare4 != null">#{spare4},</if>
<if test="spare5 != null">#{spare5},</if>
<if test="spare6 != null">#{spare6},</if>
<if test="productName != null and productName != ''">#{productName},</if>
</trim>
</insert>
<update id="updateBasProduct" parameterType="BasProduct">
update bas_product
<trim prefix="SET" suffixOverrides=",">
<if test="productId != null and productId != ''">product_id = #{productId},</if>
<if test="parentId != null and parentId != ''">parent_id = #{parentId},</if>
<if test="price != null">price = #{price},</if>
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="spec != null">spec = #{spec},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
<if test="spare4 != null">spare4 = #{spare4},</if>
<if test="spare5 != null">spare5 = #{spare5},</if>
<if test="spare6 != null">spare6 = #{spare6},</if>
<if test="productName != null and productName != ''">product_name = #{productName},</if>
</trim>
where product_guid = #{productGuid}
</update>
<delete id="deleteBasProductByProductGuid" parameterType="String">
delete from bas_product where product_guid = #{productGuid}
</delete>
<delete id="deleteBasProductByProductGuids" parameterType="String">
delete from bas_product where product_guid in
<foreach item="productGuid" collection="array" open="(" separator="," close=")">
#{productGuid}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,142 @@
<?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.ruoyi.bas.BasSupplier.mapper.BasSupplierMapper">
<resultMap type="BasSupplier" id="BasSupplierResult">
<result property="id" column="id" />
<result property="supplierNo" column="supplier_no" />
<result property="supplierGroupNo" column="supplier_group_no" />
<result property="supplierName" column="supplier_name" />
<result property="simpleName" column="simple_name" />
<result property="useable" column="useable" />
<result property="remark" column="remark" />
<result property="supplierArae" column="supplier_arae" />
<result property="taxpayerRegistrationNumber" column="taxpayer_registration_number" />
<result property="country" column="country" />
<result property="timeZone" column="time_zone" />
<result property="dataFormat" column="data_format" />
<result property="receivingCountry" column="receiving_country" />
<result property="taxCategory" column="tax_category" />
<result property="legalPerson" column="legal_person" />
<result property="registeredCapital" column="registered_capital" />
<result property="address" column="address" />
<result property="contactName" column="contact_name" />
<result property="contactNumber" column="contact_number" />
</resultMap>
<sql id="selectBasSupplierVo">
select id, supplier_no, supplier_group_no, supplier_name, simple_name, useable, remark, supplier_arae, taxpayer_registration_number, country, time_zone, data_format, receiving_country, tax_category, legal_person, registered_capital, address, contact_name, contact_number from bas_supplier
</sql>
<select id="selectBasSupplierList" parameterType="BasSupplier" resultMap="BasSupplierResult">
<include refid="selectBasSupplierVo"/>
<where>
<if test="supplierNo != null and supplierNo != ''"> and supplier_no like concat('%', #{supplierNo}, '%')</if>
<if test="supplierGroupNo != null and supplierGroupNo != ''"> and supplier_group_no like concat('%', #{supplierGroupNo}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="simpleName != null and simpleName != ''"> and simple_name like concat('%', #{simpleName}, '%')</if>
<if test="useable != null and useable != ''"> and useable = #{useable}</if>
<if test="supplierArae != null and supplierArae != ''"> and supplier_arae like concat('%', #{supplierArae}, '%')</if>
<if test="taxpayerRegistrationNumber != null and taxpayerRegistrationNumber != ''"> and taxpayer_registration_number like concat('%', #{taxpayerRegistrationNumber}, '%')</if>
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
<if test="timeZone != null and timeZone != ''"> and time_zone like concat('%', #{timeZone}, '%')</if>
<if test="dataFormat != null and dataFormat != ''"> and data_format like concat('%', #{dataFormat}, '%')</if>
<if test="receivingCountry != null and receivingCountry != ''"> and receiving_country like concat('%', #{receivingCountry}, '%')</if>
<if test="taxCategory != null and taxCategory != ''"> and tax_category like concat('%', #{taxCategory}, '%')</if>
<if test="legalPerson != null and legalPerson != ''"> and legal_person like concat('%', #{legalPerson}, '%')</if>
<if test="registeredCapital != null and registeredCapital != ''"> and registered_capital like concat('%', #{registeredCapital}, '%')</if>
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
<if test="contactNumber != null and contactNumber != ''"> and contact_number = like concat('%',#{contactNumber}, '%')</if>
</where>
</select>
<select id="selectBasSupplierById" parameterType="String" resultMap="BasSupplierResult">
<include refid="selectBasSupplierVo"/>
where id = #{id}
</select>
<insert id="insertBasSupplier" parameterType="BasSupplier">
insert into bas_supplier
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">id,</if>
<if test="supplierNo != null">supplier_no,</if>
<if test="supplierGroupNo != null">supplier_group_no,</if>
<if test="supplierName != null">supplier_name,</if>
<if test="simpleName != null">simple_name,</if>
<if test="useable != null and useable != ''">useable,</if>
<if test="remark != null">remark,</if>
<if test="supplierArae != null">supplier_arae,</if>
<if test="taxpayerRegistrationNumber != null">taxpayer_registration_number,</if>
<if test="country != null">country,</if>
<if test="timeZone != null">time_zone,</if>
<if test="dataFormat != null">data_format,</if>
<if test="receivingCountry != null">receiving_country,</if>
<if test="taxCategory != null">tax_category,</if>
<if test="legalPerson != null">legal_person,</if>
<if test="registeredCapital != null">registered_capital,</if>
<if test="address != null">address,</if>
<if test="contactName != null">contact_name,</if>
<if test="contactNumber != null">contact_number,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
<if test="supplierNo != null">#{supplierNo},</if>
<if test="supplierGroupNo != null">#{supplierGroupNo},</if>
<if test="supplierName != null">#{supplierName},</if>
<if test="simpleName != null">#{simpleName},</if>
<if test="useable != null and useable != ''">#{useable},</if>
<if test="remark != null">#{remark},</if>
<if test="supplierArae != null">#{supplierArae},</if>
<if test="taxpayerRegistrationNumber != null">#{taxpayerRegistrationNumber},</if>
<if test="country != null">#{country},</if>
<if test="timeZone != null">#{timeZone},</if>
<if test="dataFormat != null">#{dataFormat},</if>
<if test="receivingCountry != null">#{receivingCountry},</if>
<if test="taxCategory != null">#{taxCategory},</if>
<if test="legalPerson != null">#{legalPerson},</if>
<if test="registeredCapital != null">#{registeredCapital},</if>
<if test="address != null">#{address},</if>
<if test="contactName != null">#{contactName},</if>
<if test="contactNumber != null">#{contactNumber},</if>
</trim>
</insert>
<update id="updateBasSupplier" parameterType="BasSupplier">
update bas_supplier
<trim prefix="SET" suffixOverrides=",">
<if test="supplierNo != null">supplier_no = #{supplierNo},</if>
<if test="supplierGroupNo != null">supplier_group_no = #{supplierGroupNo},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</if>
<if test="simpleName != null">simple_name = #{simpleName},</if>
<if test="useable != null and useable != ''">useable = #{useable},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="supplierArae != null">supplier_arae = #{supplierArae},</if>
<if test="taxpayerRegistrationNumber != null">taxpayer_registration_number = #{taxpayerRegistrationNumber},</if>
<if test="country != null">country = #{country},</if>
<if test="timeZone != null">time_zone = #{timeZone},</if>
<if test="dataFormat != null">data_format = #{dataFormat},</if>
<if test="receivingCountry != null">receiving_country = #{receivingCountry},</if>
<if test="taxCategory != null">tax_category = #{taxCategory},</if>
<if test="legalPerson != null">legal_person = #{legalPerson},</if>
<if test="registeredCapital != null">registered_capital = #{registeredCapital},</if>
<if test="address != null">address = #{address},</if>
<if test="contactName != null">contact_name = #{contactName},</if>
<if test="contactNumber != null">contact_number = #{contactNumber},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBasSupplierById" parameterType="String">
delete from bas_supplier where id = #{id}
</delete>
<delete id="deleteBasSupplierByIds" parameterType="String">
delete from bas_supplier where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询客户管理列表
export function listBasCustomer(query) {
return request({
url: '/bas/BasCustomer/list',
method: 'get',
params: query
})
}
// 查询客户管理详细
export function getBasCustomer(id) {
return request({
url: '/bas/BasCustomer/' + id,
method: 'get'
})
}
// 新增客户管理
export function addBasCustomer(data) {
return request({
url: '/bas/BasCustomer',
method: 'post',
data: data
})
}
// 修改客户管理
export function updateBasCustomer(data) {
return request({
url: '/bas/BasCustomer',
method: 'put',
data: data
})
}
// 删除客户管理
export function delBasCustomer(id) {
return request({
url: '/bas/BasCustomer/' + id,
method: 'delete'
})
}

View File

@@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询物料管理列表
export function listBasProduct(query) {
return request({
url: '/bas/BasProduct/list',
method: 'get',
params: query
})
}
// 查询物料管理详细
export function getBasProduct(productGuid) {
return request({
url: '/bas/BasProduct/' + productGuid,
method: 'get'
})
}
// 新增物料管理
export function addBasProduct(data) {
return request({
url: '/bas/BasProduct',
method: 'post',
data: data
})
}
// 修改物料管理
export function updateBasProduct(data) {
return request({
url: '/bas/BasProduct',
method: 'put',
data: data
})
}
// 删除物料管理
export function delBasProduct(productGuid) {
return request({
url: '/bas/BasProduct/' + productGuid,
method: 'delete'
})
}

View File

@@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询供应商管理列表
export function listBasSupplier(query) {
return request({
url: '/bas/BasSupplier/list',
method: 'get',
params: query
})
}
// 查询供应商管理详细
export function getBasSupplier(id) {
return request({
url: '/bas/BasSupplier/' + id,
method: 'get'
})
}
// 新增供应商管理
export function addBasSupplier(data) {
return request({
url: '/bas/BasSupplier',
method: 'post',
data: data
})
}
// 修改供应商管理
export function updateBasSupplier(data) {
return request({
url: '/bas/BasSupplier',
method: 'put',
data: data
})
}
// 删除供应商管理
export function delBasSupplier(id) {
return request({
url: '/bas/BasSupplier/' + id,
method: 'delete'
})
}

View File

@@ -0,0 +1,499 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="客户编号" prop="customerNo">
<el-input
v-model="queryParams.customerNo"
placeholder="请输入客户编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="客户基本分类" prop="customerGroupNo">
<el-input
v-model="queryParams.customerGroupNo"
placeholder="请输入客户基本分类"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input
v-model="queryParams.customerName"
placeholder="请输入客户名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="客户简称" prop="simpleName">
<el-input
v-model="queryParams.simpleName"
placeholder="请输入客户简称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否可用" prop="useable">
<el-input
v-model="queryParams.useable"
placeholder="请输入是否可用"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="业务部门" prop="businessDepartment">
<el-input
v-model="queryParams.businessDepartment"
placeholder="请输入业务部门"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="业务员" prop="salesman">
<el-input
v-model="queryParams.salesman"
placeholder="请输入业务员"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="助忆码" prop="mnemonicCode">
<el-input
v-model="queryParams.mnemonicCode"
placeholder="请输入助忆码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="纳税人登记号" prop="taxpayerRegistrationNumber">
<el-input
v-model="queryParams.taxpayerRegistrationNumber"
placeholder="请输入纳税人登记号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="对应财务组织" prop="organization">
<el-input
v-model="queryParams.organization"
placeholder="请输入对应财务组织"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="上级客户" prop="supCustomer">
<el-input
v-model="queryParams.supCustomer"
placeholder="请输入上级客户"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="散户" prop="retailInvestor">
<el-input
v-model="queryParams.retailInvestor"
placeholder="请输入散户"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="国家/地区" prop="country">
<el-input
v-model="queryParams.country"
placeholder="请输入国家/地区"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="时区" prop="timeZone">
<el-input
v-model="queryParams.timeZone"
placeholder="请输入时区"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="数据格式" prop="dataFormat">
<el-input
v-model="queryParams.dataFormat"
placeholder="请输入数据格式"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="联系人姓名" prop="contactName">
<el-input
v-model="queryParams.contactName"
placeholder="请输入联系人姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="发货国家" prop="shipment">
<el-input
v-model="queryParams.shipment"
placeholder="请输入发货国家"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="税类" prop="taxCategory">
<el-input
v-model="queryParams.taxCategory"
placeholder="请输入税类"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['bas:BasCustomer:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['bas:BasCustomer:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['bas:BasCustomer:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['bas:BasCustomer:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="BasCustomerList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="客户编号" align="center" prop="customerNo" />
<el-table-column label="客户基本分类" align="center" prop="customerGroupNo" />
<el-table-column label="客户名称" align="center" prop="customerName" />
<el-table-column label="客户简称" align="center" prop="simpleName" />
<el-table-column label="是否可用" align="center" prop="useable" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="业务部门" align="center" prop="businessDepartment" />
<el-table-column label="业务员" align="center" prop="salesman" />
<el-table-column label="助忆码" align="center" prop="mnemonicCode" />
<el-table-column label="客户类型" align="center" prop="type" />
<el-table-column label="纳税人登记号" align="center" prop="taxpayerRegistrationNumber" />
<el-table-column label="对应财务组织" align="center" prop="organization" />
<el-table-column label="上级客户" align="center" prop="supCustomer" />
<el-table-column label="散户" align="center" prop="retailInvestor" />
<el-table-column label="国家/地区" align="center" prop="country" />
<el-table-column label="时区" align="center" prop="timeZone" />
<el-table-column label="数据格式" align="center" prop="dataFormat" />
<el-table-column label="联系人姓名" align="center" prop="contactName" />
<el-table-column label="发货国家" align="center" prop="shipment" />
<el-table-column label="税类" align="center" prop="taxCategory" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['bas:BasCustomer:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['bas:BasCustomer:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改客户管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<!-- <el-form-item label="ID" prop="id">
<el-input v-model="form.id" placeholder="请输入ID" />
</el-form-item> -->
<el-form-item label="客户编号" prop="customerNo">
<el-input v-model="form.customerNo" placeholder="请输入客户编号" />
</el-form-item>
<el-form-item label="客户基本分类" prop="customerGroupNo">
<el-input v-model="form.customerGroupNo" placeholder="请输入客户基本分类" />
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="form.customerName" placeholder="请输入客户名称" />
</el-form-item>
<el-form-item label="客户简称" prop="simpleName">
<el-input v-model="form.simpleName" placeholder="请输入客户简称" />
</el-form-item>
<el-form-item label="是否可用" prop="useable">
<el-input v-model="form.useable" placeholder="请输入是否可用" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="业务部门" prop="businessDepartment">
<el-input v-model="form.businessDepartment" placeholder="请输入业务部门" />
</el-form-item>
<el-form-item label="业务员" prop="salesman">
<el-input v-model="form.salesman" placeholder="请输入业务员" />
</el-form-item>
<el-form-item label="助忆码" prop="mnemonicCode">
<el-input v-model="form.mnemonicCode" placeholder="请输入助忆码" />
</el-form-item>
<el-form-item label="纳税人登记号" prop="taxpayerRegistrationNumber">
<el-input v-model="form.taxpayerRegistrationNumber" placeholder="请输入纳税人登记号" />
</el-form-item>
<el-form-item label="对应财务组织" prop="organization">
<el-input v-model="form.organization" placeholder="请输入对应财务组织" />
</el-form-item>
<el-form-item label="上级客户" prop="supCustomer">
<el-input v-model="form.supCustomer" placeholder="请输入上级客户" />
</el-form-item>
<el-form-item label="散户" prop="retailInvestor">
<el-input v-model="form.retailInvestor" placeholder="请输入散户" />
</el-form-item>
<el-form-item label="国家/地区" prop="country">
<el-input v-model="form.country" placeholder="请输入国家/地区" />
</el-form-item>
<el-form-item label="时区" prop="timeZone">
<el-input v-model="form.timeZone" placeholder="请输入时区" />
</el-form-item>
<el-form-item label="数据格式" prop="dataFormat">
<el-input v-model="form.dataFormat" placeholder="请输入数据格式" />
</el-form-item>
<el-form-item label="联系人姓名" prop="contactName">
<el-input v-model="form.contactName" placeholder="请输入联系人姓名" />
</el-form-item>
<el-form-item label="发货国家" prop="shipment">
<el-input v-model="form.shipment" placeholder="请输入发货国家" />
</el-form-item>
<el-form-item label="税类" prop="taxCategory">
<el-input v-model="form.taxCategory" placeholder="请输入税类" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listBasCustomer, getBasCustomer, delBasCustomer, addBasCustomer, updateBasCustomer } from "@/api/bas/BasCustomer"
export default {
name: "BasCustomer",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 客户管理表格数据
BasCustomerList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
customerNo: null,
customerGroupNo: null,
customerName: null,
simpleName: null,
useable: null,
businessDepartment: null,
salesman: null,
mnemonicCode: null,
type: null,
taxpayerRegistrationNumber: null,
organization: null,
supCustomer: null,
retailInvestor: null,
country: null,
timeZone: null,
dataFormat: null,
contactName: null,
shipment: null,
taxCategory: null
},
// 表单参数
form: {},
// 表单校验
rules: {
id: [
{ required: true, message: "ID不能为空", trigger: "blur" }
],
customerNo: [
{ required: true, message: "客户编号不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getList()
},
methods: {
/** 查询客户管理列表 */
getList() {
this.loading = true
listBasCustomer(this.queryParams).then(response => {
this.BasCustomerList = response.rows
this.total = response.total
this.loading = false
})
},
// 取消按钮
cancel() {
this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
id: null,
customerNo: null,
customerGroupNo: null,
customerName: null,
simpleName: null,
useable: null,
remark: null,
businessDepartment: null,
salesman: null,
mnemonicCode: null,
type: null,
taxpayerRegistrationNumber: null,
organization: null,
supCustomer: null,
retailInvestor: null,
country: null,
timeZone: null,
dataFormat: null,
contactName: null,
shipment: null,
taxCategory: null
}
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = "添加客户管理"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getBasCustomer(id).then(response => {
this.form = response.data
this.open = true
this.title = "修改客户管理"
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateBasCustomer(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addBasCustomer(this.form).then(response => {
this.$modal.msgSuccess("新增成功")
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除客户编号为"' + ids + '"的数据项?').then(function() {
return delBasCustomer(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('bas/BasCustomer/export', {
...this.queryParams
}, `BasCustomer_${new Date().getTime()}.xlsx`)
}
}
}
</script>

View File

@@ -0,0 +1,436 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="物料编码" prop="productId">
<el-input
v-model="queryParams.productId"
placeholder="请输入物料编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="父节点id" prop="parentId">
<el-input
v-model="queryParams.parentId"
placeholder="请输入父节点id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="价格" prop="price">
<el-input
v-model="queryParams.price"
placeholder="请输入价格"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="品牌" prop="cargoNo">
<el-input
v-model="queryParams.cargoNo"
placeholder="请输入品牌"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="单位" prop="unit">
<el-input
v-model="queryParams.unit"
placeholder="请输入单位"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="规格" prop="spec">
<el-input
v-model="queryParams.spec"
placeholder="请输入规格"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="描述" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="请输入描述"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="备用字段1" prop="spare1">-->
<!-- <el-input-->
<!-- v-model="queryParams.spare1"-->
<!-- placeholder="请输入备用字段1"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备用字段2" prop="spare2">-->
<!-- <el-input-->
<!-- v-model="queryParams.spare2"-->
<!-- placeholder="请输入备用字段2"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备用字段3" prop="spare3">-->
<!-- <el-input-->
<!-- v-model="queryParams.spare3"-->
<!-- placeholder="请输入备用字段3"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备用字段4" prop="spare4">-->
<!-- <el-input-->
<!-- v-model="queryParams.spare4"-->
<!-- placeholder="请输入备用字段4"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备用字段5" prop="spare5">-->
<!-- <el-input-->
<!-- v-model="queryParams.spare5"-->
<!-- placeholder="请输入备用字段5"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备用字段6" prop="spare6">-->
<!-- <el-input-->
<!-- v-model="queryParams.spare6"-->
<!-- placeholder="请输入备用字段6"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="物料名称" prop="productName">
<el-input
v-model="queryParams.productName"
placeholder="请输入物料名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['bas:BasProduct:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['bas:BasProduct:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['bas:BasProduct:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['bas:BasProduct:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="BasProductList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键" align="center" prop="productGuid" />-->
<el-table-column label="物料编码" align="center" prop="productId" />
<el-table-column label="父节点id" align="center" prop="parentId" />
<el-table-column label="价格" align="center" prop="price" />
<el-table-column label="品牌" align="center" prop="cargoNo" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="规格" align="center" prop="spec" />
<el-table-column label="描述" align="center" prop="remark" />
<!-- <el-table-column label="备用字段1" align="center" prop="spare1" v-if="false"/> -->
<!-- <el-table-column label="备用字段2" align="center" prop="spare2" />-->
<!-- <el-table-column label="备用字段3" align="center" prop="spare3" />-->
<!-- <el-table-column label="备用字段4" align="center" prop="spare4" />-->
<!-- <el-table-column label="备用字段5" align="center" prop="spare5" />-->
<!-- <el-table-column label="备用字段6" align="center" prop="spare6" />-->
<el-table-column label="物料名称" align="center" prop="productName" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['bas:BasProduct:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['bas:BasProduct:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改物料管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="物料编码" prop="productId">
<el-input v-model="form.productId" placeholder="请输入物料编码" />
</el-form-item>
<el-form-item label="父节点id" prop="parentId">
<el-input v-model="form.parentId" placeholder="请输入父节点id" />
</el-form-item>
<el-form-item label="价格" prop="price">
<el-input v-model="form.price" placeholder="请输入价格" />
</el-form-item>
<el-form-item label="品牌" prop="cargoNo">
<el-input v-model="form.cargoNo" placeholder="请输入品牌" />
</el-form-item>
<el-form-item label="单位" prop="unit">
<el-input v-model="form.unit" placeholder="请输入单位" />
</el-form-item>
<el-form-item label="规格" prop="spec">
<el-input v-model="form.spec" placeholder="请输入规格" />
</el-form-item>
<el-form-item label="描述" prop="remark">
<el-input v-model="form.remark" placeholder="请输入描述" />
</el-form-item>
<!-- <el-form-item label="备用字段1" prop="spare1">-->
<!-- <el-input v-model="form.spare1" placeholder="请输入备用字段1" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备用字段2" prop="spare2">-->
<!-- <el-input v-model="form.spare2" placeholder="请输入备用字段2" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备用字段3" prop="spare3">-->
<!-- <el-input v-model="form.spare3" placeholder="请输入备用字段3" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备用字段4" prop="spare4">-->
<!-- <el-input v-model="form.spare4" placeholder="请输入备用字段4" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备用字段5" prop="spare5">-->
<!-- <el-input v-model="form.spare5" placeholder="请输入备用字段5" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="备用字段6" prop="spare6">-->
<!-- <el-input v-model="form.spare6" placeholder="请输入备用字段6" />-->
<!-- </el-form-item>-->
<el-form-item label="物料名称" prop="productName">
<el-input v-model="form.productName" placeholder="请输入物料名称" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listBasProduct, getBasProduct, delBasProduct, addBasProduct, updateBasProduct } from "@/api/bas/BasProduct"
export default {
name: "BasProduct",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 物料管理表格数据
BasProductList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
productId: null,
parentId: null,
price: null,
cargoNo: null,
unit: null,
spec: null,
remark: null,
spare1: null,
spare2: null,
spare3: null,
spare4: null,
spare5: null,
spare6: null,
productName: null
},
// 表单参数
form: {},
// 表单校验
rules: {
productId: [
{ required: true, message: "物料编码不能为空", trigger: "blur" }
],
parentId: [
{ required: true, message: "父节点id不能为空", trigger: "blur" }
],
productName: [
{ required: true, message: "物料名称不能为空", trigger: "blur" }
]
}
}
},
created() {
this.getList()
},
methods: {
/** 查询物料管理列表 */
getList() {
this.loading = true
listBasProduct(this.queryParams).then(response => {
this.BasProductList = response.rows
this.total = response.total
this.loading = false
})
},
// 取消按钮
cancel() {
this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
productGuid: null,
productId: null,
parentId: null,
price: null,
cargoNo: null,
unit: null,
spec: null,
remark: null,
spare1: null,
spare2: null,
spare3: null,
spare4: null,
spare5: null,
spare6: null,
productName: null
}
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.productGuid)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = "添加物料管理"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const productGuid = row.productGuid || this.ids
getBasProduct(productGuid).then(response => {
this.form = response.data
this.open = true
this.title = "修改物料管理"
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.productGuid != null) {
updateBasProduct(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addBasProduct(this.form).then(response => {
this.$modal.msgSuccess("新增成功")
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const productGuids = row.productGuid || this.ids
this.$modal.confirm('是否确认删除物料管理编号为"' + productGuids + '"的数据项?').then(function() {
return delBasProduct(productGuids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('bas/BasProduct/export', {
...this.queryParams
}, `BasProduct_${new Date().getTime()}.xlsx`)
}
}
}
</script>

View File

@@ -0,0 +1,482 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label=" 供应商编号" prop="supplierNo">
<el-input
v-model="queryParams.supplierNo"
placeholder="请输入 供应商编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="供应商名称" prop="supplierGroupNo">
<el-input
v-model="queryParams.supplierGroupNo"
placeholder="请输入供应商名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="供应商名称" prop="supplierName">
<el-input
v-model="queryParams.supplierName"
placeholder="请输入供应商名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="简称" prop="simpleName">
<el-input
v-model="queryParams.simpleName"
placeholder="请输入简称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否可用" prop="useable">
<el-input
v-model="queryParams.useable"
placeholder="请输入是否可用"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="地区分类" prop="supplierArae">
<el-input
v-model="queryParams.supplierArae"
placeholder="请输入地区分类"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="纳税人登记号" prop="taxpayerRegistrationNumber">
<el-input
v-model="queryParams.taxpayerRegistrationNumber"
placeholder="请输入纳税人登记号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="国家" prop="country">
<el-input
v-model="queryParams.country"
placeholder="请输入国家"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="时区" prop="timeZone">
<el-input
v-model="queryParams.timeZone"
placeholder="请输入时区"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="数据格式" prop="dataFormat">
<el-input
v-model="queryParams.dataFormat"
placeholder="请输入数据格式"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="收货国家" prop="receivingCountry">
<el-input
v-model="queryParams.receivingCountry"
placeholder="请输入收货国家"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="税类" prop="taxCategory">
<el-input
v-model="queryParams.taxCategory"
placeholder="请输入税类"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="法人" prop="legalPerson">
<el-input
v-model="queryParams.legalPerson"
placeholder="请输入法人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="注册资金" prop="registeredCapital">
<el-input
v-model="queryParams.registeredCapital"
placeholder="请输入注册资金"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="企业地址" prop="address">
<el-input
v-model="queryParams.address"
placeholder="请输入企业地址"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="联系人姓名" prop="contactName">
<el-input
v-model="queryParams.contactName"
placeholder="请输入联系人姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="联系电话" prop="contactNumber">
<el-input
v-model="queryParams.contactNumber"
placeholder="请输入联系电话"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['bas:BasSupplier:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['bas:BasSupplier:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['bas:BasSupplier:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['bas:BasSupplier:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="BasSupplierList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label=" 供应商编号" align="center" prop="supplierNo" />
<el-table-column label="供应商名称" align="center" prop="supplierGroupNo" />
<el-table-column label="供应商名称" align="center" prop="supplierName" />
<el-table-column label="简称" align="center" prop="simpleName" />
<el-table-column label="是否可用" align="center" prop="useable" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="地区分类" align="center" prop="supplierArae" />
<el-table-column label="纳税人登记号" align="center" prop="taxpayerRegistrationNumber" />
<el-table-column label="国家" align="center" prop="country" />
<el-table-column label="时区" align="center" prop="timeZone" />
<el-table-column label="数据格式" align="center" prop="dataFormat" />
<el-table-column label="收货国家" align="center" prop="receivingCountry" />
<el-table-column label="税类" align="center" prop="taxCategory" />
<el-table-column label="法人" align="center" prop="legalPerson" />
<el-table-column label="注册资金" align="center" prop="registeredCapital" />
<el-table-column label="企业地址" align="center" prop="address" />
<el-table-column label="联系人姓名" align="center" prop="contactName" />
<el-table-column label="联系电话" align="center" prop="contactNumber" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['bas:BasSupplier:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['bas:BasSupplier:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改供应商管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<!-- <el-form-item label="fid" prop="id">-->
<!-- <el-input v-model="form.id" placeholder="请输入fid" />-->
<!-- </el-form-item>-->
<el-form-item label=" 供应商编号" prop="supplierNo">
<el-input v-model="form.supplierNo" placeholder="请输入 供应商编号" />
</el-form-item>
<el-form-item label="供应商名称" prop="supplierGroupNo">
<el-input v-model="form.supplierGroupNo" placeholder="请输入供应商名称" />
</el-form-item>
<el-form-item label="供应商名称" prop="supplierName">
<el-input v-model="form.supplierName" placeholder="请输入供应商名称" />
</el-form-item>
<el-form-item label="简称" prop="simpleName">
<el-input v-model="form.simpleName" placeholder="请输入简称" />
</el-form-item>
<el-form-item label="是否可用" prop="useable">
<el-input v-model="form.useable" placeholder="请输入是否可用" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="地区分类" prop="supplierArae">
<el-input v-model="form.supplierArae" placeholder="请输入地区分类" />
</el-form-item>
<el-form-item label="纳税人登记号" prop="taxpayerRegistrationNumber">
<el-input v-model="form.taxpayerRegistrationNumber" placeholder="请输入纳税人登记号" />
</el-form-item>
<el-form-item label="国家" prop="country">
<el-input v-model="form.country" placeholder="请输入国家" />
</el-form-item>
<el-form-item label="时区" prop="timeZone">
<el-input v-model="form.timeZone" placeholder="请输入时区" />
</el-form-item>
<el-form-item label="数据格式" prop="dataFormat">
<el-input v-model="form.dataFormat" placeholder="请输入数据格式" />
</el-form-item>
<el-form-item label="收货国家" prop="receivingCountry">
<el-input v-model="form.receivingCountry" placeholder="请输入收货国家" />
</el-form-item>
<el-form-item label="税类" prop="taxCategory">
<el-input v-model="form.taxCategory" placeholder="请输入税类" />
</el-form-item>
<el-form-item label="法人" prop="legalPerson">
<el-input v-model="form.legalPerson" placeholder="请输入法人" />
</el-form-item>
<el-form-item label="注册资金" prop="registeredCapital">
<el-input v-model="form.registeredCapital" placeholder="请输入注册资金" />
</el-form-item>
<el-form-item label="企业地址" prop="address">
<el-input v-model="form.address" placeholder="请输入企业地址" />
</el-form-item>
<el-form-item label="联系人姓名" prop="contactName">
<el-input v-model="form.contactName" placeholder="请输入联系人姓名" />
</el-form-item>
<el-form-item label="联系电话" prop="contactNumber">
<el-input v-model="form.contactNumber" placeholder="请输入联系电话" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listBasSupplier, getBasSupplier, delBasSupplier, addBasSupplier, updateBasSupplier } from "@/api/bas/BasSupplier"
export default {
name: "BasSupplier",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 供应商管理表格数据
BasSupplierList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
supplierNo: null,
supplierGroupNo: null,
supplierName: null,
simpleName: null,
useable: null,
supplierArae: null,
taxpayerRegistrationNumber: null,
country: null,
timeZone: null,
dataFormat: null,
receivingCountry: null,
taxCategory: null,
legalPerson: null,
registeredCapital: null,
address: null,
contactName: null,
contactNumber: null
},
// 表单参数
form: {},
// 表单校验
rules: {
id: [
{ required: true, message: "fid不能为空", trigger: "blur" }
],
useable: [
{ required: true, message: "是否可用不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getList()
},
methods: {
/** 查询供应商管理列表 */
getList() {
this.loading = true
listBasSupplier(this.queryParams).then(response => {
this.BasSupplierList = response.rows
this.total = response.total
this.loading = false
})
},
// 取消按钮
cancel() {
this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
id: null,
supplierNo: null,
supplierGroupNo: null,
supplierName: null,
simpleName: null,
useable: null,
remark: null,
supplierArae: null,
taxpayerRegistrationNumber: null,
country: null,
timeZone: null,
dataFormat: null,
receivingCountry: null,
taxCategory: null,
legalPerson: null,
registeredCapital: null,
address: null,
contactName: null,
contactNumber: null
}
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = "添加供应商管理"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getBasSupplier(id).then(response => {
this.form = response.data
this.open = true
this.title = "修改供应商管理"
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateBasSupplier(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addBasSupplier(this.form).then(response => {
this.$modal.msgSuccess("新增成功")
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除供应商管理编号为"' + ids + '"的数据项?').then(function() {
return delBasSupplier(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('bas/BasSupplier/export', {
...this.queryParams
}, `BasSupplier_${new Date().getTime()}.xlsx`)
}
}
}
</script>