parent
2b6717ac9b
commit
d53427a85d
@ -0,0 +1,104 @@ |
||||
package com.jianshui.web.controller.platform; |
||||
|
||||
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.jianshui.common.annotation.Log; |
||||
import com.jianshui.common.core.controller.BaseController; |
||||
import com.jianshui.common.core.domain.AjaxResult; |
||||
import com.jianshui.common.enums.BusinessType; |
||||
import com.jianshui.platform.domain.InvoiceParamConfig; |
||||
import com.jianshui.platform.service.IInvoiceParamConfigService; |
||||
import com.jianshui.common.utils.poi.ExcelUtil; |
||||
import com.jianshui.common.core.page.TableDataInfo; |
||||
|
||||
/** |
||||
* 导入设置Controller |
||||
* |
||||
* @author kane |
||||
* @date 2023-06-28 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/platform/config") |
||||
public class InvoiceParamConfigController extends BaseController |
||||
{ |
||||
@Autowired |
||||
private IInvoiceParamConfigService invoiceParamConfigService; |
||||
|
||||
/** |
||||
* 查询导入设置列表 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('platform:config:list')") |
||||
@GetMapping("/list") |
||||
public TableDataInfo list(InvoiceParamConfig invoiceParamConfig) |
||||
{ |
||||
startPage(); |
||||
List<InvoiceParamConfig> list = invoiceParamConfigService.selectInvoiceParamConfigList(invoiceParamConfig); |
||||
return getDataTable(list); |
||||
} |
||||
|
||||
/** |
||||
* 导出导入设置列表 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('platform:config:export')") |
||||
@Log(title = "导入设置", businessType = BusinessType.EXPORT) |
||||
@PostMapping("/export") |
||||
public void export(HttpServletResponse response, InvoiceParamConfig invoiceParamConfig) |
||||
{ |
||||
List<InvoiceParamConfig> list = invoiceParamConfigService.selectInvoiceParamConfigList(invoiceParamConfig); |
||||
ExcelUtil<InvoiceParamConfig> util = new ExcelUtil<InvoiceParamConfig>(InvoiceParamConfig.class); |
||||
util.exportExcel(response, list, "导入设置数据"); |
||||
} |
||||
|
||||
/** |
||||
* 获取导入设置详细信息 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('platform:config:query')") |
||||
@GetMapping(value = "/{id}") |
||||
public AjaxResult getInfo(@PathVariable("id") Long id) |
||||
{ |
||||
return AjaxResult.success(invoiceParamConfigService.selectInvoiceParamConfigById(id)); |
||||
} |
||||
|
||||
/** |
||||
* 新增导入设置 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('platform:config:add')") |
||||
@Log(title = "导入设置", businessType = BusinessType.INSERT) |
||||
@PostMapping |
||||
public AjaxResult add(@RequestBody InvoiceParamConfig invoiceParamConfig) |
||||
{ |
||||
return toAjax(invoiceParamConfigService.insertInvoiceParamConfig(invoiceParamConfig)); |
||||
} |
||||
|
||||
/** |
||||
* 修改导入设置 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('platform:config:edit')") |
||||
@Log(title = "导入设置", businessType = BusinessType.UPDATE) |
||||
@PutMapping |
||||
public AjaxResult edit(@RequestBody InvoiceParamConfig invoiceParamConfig) |
||||
{ |
||||
return toAjax(invoiceParamConfigService.updateInvoiceParamConfig(invoiceParamConfig)); |
||||
} |
||||
|
||||
/** |
||||
* 删除导入设置 |
||||
*/ |
||||
@PreAuthorize("@ss.hasPermi('platform:config:remove')") |
||||
@Log(title = "导入设置", businessType = BusinessType.DELETE) |
||||
@DeleteMapping("/{ids}") |
||||
public AjaxResult remove(@PathVariable Long[] ids) |
||||
{ |
||||
return toAjax(invoiceParamConfigService.deleteInvoiceParamConfigByIds(ids)); |
||||
} |
||||
} |
@ -0,0 +1,434 @@ |
||||
package com.jianshui.platform.domain; |
||||
|
||||
import java.math.BigDecimal; |
||||
import com.jianshui.common.annotation.Excel; |
||||
import com.jianshui.common.core.domain.BaseEntity; |
||||
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
||||
/** |
||||
* 导入设置对象 invoice_param_config |
||||
* |
||||
* @author kane |
||||
* @date 2023-06-28 |
||||
*/ |
||||
public class InvoiceParamConfig extends BaseEntity |
||||
{ |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** 主键ID */ |
||||
private Long id; |
||||
|
||||
/** 企业名称 */ |
||||
@Excel(name = "企业名称") |
||||
private String companyName; |
||||
|
||||
/** 单据编号 */ |
||||
@Excel(name = "单据编号") |
||||
private String receiptNumber; |
||||
|
||||
/** 客户名称/编码 */ |
||||
@Excel(name = "客户名称/编码") |
||||
private String customerName; |
||||
|
||||
/** 客户税号 */ |
||||
@Excel(name = "客户税号") |
||||
private String customerTaxNumber; |
||||
|
||||
/** 客户地址 */ |
||||
@Excel(name = "客户地址") |
||||
private String customerAddress; |
||||
|
||||
/** 客户电话 */ |
||||
@Excel(name = "客户电话") |
||||
private String customerPhone; |
||||
|
||||
/** 开户银行 */ |
||||
@Excel(name = "开户银行") |
||||
private String bankName; |
||||
|
||||
/** 银行账号 */ |
||||
@Excel(name = "银行账号") |
||||
private String bankNumber; |
||||
|
||||
/** 手机号 */ |
||||
@Excel(name = "手机号") |
||||
private String phone; |
||||
|
||||
/** 邮箱 */ |
||||
@Excel(name = "邮箱") |
||||
private String email; |
||||
|
||||
/** 商品名称/编码 */ |
||||
@Excel(name = "商品名称/编码") |
||||
private String productName; |
||||
|
||||
/** 规格型号 */ |
||||
@Excel(name = "规格型号") |
||||
private String specification; |
||||
|
||||
/** 单位 */ |
||||
@Excel(name = "单位") |
||||
private String unit; |
||||
|
||||
/** 单价 */ |
||||
@Excel(name = "单价") |
||||
private String price; |
||||
|
||||
/** 数量 */ |
||||
@Excel(name = "数量") |
||||
private String num; |
||||
|
||||
/** 金额 */ |
||||
@Excel(name = "金额") |
||||
private String taxamt; |
||||
|
||||
/** 税率 */ |
||||
@Excel(name = "税率") |
||||
private String taxrate; |
||||
|
||||
/** 税额 */ |
||||
@Excel(name = "税额") |
||||
private String tax; |
||||
|
||||
/** 折扣 */ |
||||
@Excel(name = "折扣") |
||||
private String discount; |
||||
|
||||
/** 扣除额 */ |
||||
@Excel(name = "扣除额") |
||||
private String deduction; |
||||
|
||||
/** 单价含税不含税标识 */ |
||||
@Excel(name = "单价含税不含税标识") |
||||
private String signboard; |
||||
|
||||
/** 零税率标识 */ |
||||
@Excel(name = "零税率标识") |
||||
private String zeroTaxRate; |
||||
|
||||
/** 编码简称 */ |
||||
@Excel(name = "编码简称") |
||||
private String encodingName; |
||||
|
||||
/** 编码版本号 */ |
||||
@Excel(name = "编码版本号") |
||||
private String encodingVersion; |
||||
|
||||
/** 优惠政策类型 */ |
||||
@Excel(name = "优惠政策类型") |
||||
private String discountsType; |
||||
|
||||
/** 税收分类编码 */ |
||||
@Excel(name = "税收分类编码") |
||||
private String taxClassificationCode; |
||||
|
||||
/** 是否享受优惠政策 */ |
||||
@Excel(name = "是否享受优惠政策") |
||||
private String isornotDiscounts; |
||||
|
||||
/** 订单来源(1-模板导入,2-API调用,3-手工录入,4-扫码开票) */ |
||||
private String source; |
||||
|
||||
public void setId(Long id) |
||||
{ |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getId() |
||||
{ |
||||
return id; |
||||
} |
||||
public void setCompanyName(String companyName) |
||||
{ |
||||
this.companyName = companyName; |
||||
} |
||||
|
||||
public String getCompanyName() |
||||
{ |
||||
return companyName; |
||||
} |
||||
public void setReceiptNumber(String receiptNumber) |
||||
{ |
||||
this.receiptNumber = receiptNumber; |
||||
} |
||||
|
||||
public String getReceiptNumber() |
||||
{ |
||||
return receiptNumber; |
||||
} |
||||
public void setCustomerName(String customerName) |
||||
{ |
||||
this.customerName = customerName; |
||||
} |
||||
|
||||
public String getCustomerName() |
||||
{ |
||||
return customerName; |
||||
} |
||||
public void setCustomerTaxNumber(String customerTaxNumber) |
||||
{ |
||||
this.customerTaxNumber = customerTaxNumber; |
||||
} |
||||
|
||||
public String getCustomerTaxNumber() |
||||
{ |
||||
return customerTaxNumber; |
||||
} |
||||
public void setCustomerAddress(String customerAddress) |
||||
{ |
||||
this.customerAddress = customerAddress; |
||||
} |
||||
|
||||
public String getCustomerAddress() |
||||
{ |
||||
return customerAddress; |
||||
} |
||||
public void setCustomerPhone(String customerPhone) |
||||
{ |
||||
this.customerPhone = customerPhone; |
||||
} |
||||
|
||||
public String getCustomerPhone() |
||||
{ |
||||
return customerPhone; |
||||
} |
||||
public void setBankName(String bankName) |
||||
{ |
||||
this.bankName = bankName; |
||||
} |
||||
|
||||
public String getBankName() |
||||
{ |
||||
return bankName; |
||||
} |
||||
public void setBankNumber(String bankNumber) |
||||
{ |
||||
this.bankNumber = bankNumber; |
||||
} |
||||
|
||||
public String getBankNumber() |
||||
{ |
||||
return bankNumber; |
||||
} |
||||
public void setPhone(String phone) |
||||
{ |
||||
this.phone = phone; |
||||
} |
||||
|
||||
public String getPhone() |
||||
{ |
||||
return phone; |
||||
} |
||||
public void setEmail(String email) |
||||
{ |
||||
this.email = email; |
||||
} |
||||
|
||||
public String getEmail() |
||||
{ |
||||
return email; |
||||
} |
||||
public void setProductName(String productName) |
||||
{ |
||||
this.productName = productName; |
||||
} |
||||
|
||||
public String getProductName() |
||||
{ |
||||
return productName; |
||||
} |
||||
public void setSpecification(String specification) |
||||
{ |
||||
this.specification = specification; |
||||
} |
||||
|
||||
public String getSpecification() |
||||
{ |
||||
return specification; |
||||
} |
||||
public void setUnit(String unit) |
||||
{ |
||||
this.unit = unit; |
||||
} |
||||
|
||||
public String getUnit() |
||||
{ |
||||
return unit; |
||||
} |
||||
public void setPrice(String price) |
||||
{ |
||||
this.price = price; |
||||
} |
||||
|
||||
public String getPrice() |
||||
{ |
||||
return price; |
||||
} |
||||
public void setNum(String num) |
||||
{ |
||||
this.num = num; |
||||
} |
||||
|
||||
public String getNum() |
||||
{ |
||||
return num; |
||||
} |
||||
public void setTaxamt(String taxamt) |
||||
{ |
||||
this.taxamt = taxamt; |
||||
} |
||||
|
||||
public String getTaxamt() |
||||
{ |
||||
return taxamt; |
||||
} |
||||
public void setTaxrate(String taxrate) |
||||
{ |
||||
this.taxrate = taxrate; |
||||
} |
||||
|
||||
public String getTaxrate() |
||||
{ |
||||
return taxrate; |
||||
} |
||||
public void setTax(String tax) |
||||
{ |
||||
this.tax = tax; |
||||
} |
||||
|
||||
public String getTax() |
||||
{ |
||||
return tax; |
||||
} |
||||
public void setDiscount(String discount) |
||||
{ |
||||
this.discount = discount; |
||||
} |
||||
|
||||
public String getDiscount() |
||||
{ |
||||
return discount; |
||||
} |
||||
public void setDeduction(String deduction) |
||||
{ |
||||
this.deduction = deduction; |
||||
} |
||||
|
||||
public String getDeduction() |
||||
{ |
||||
return deduction; |
||||
} |
||||
public void setSignboard(String signboard) |
||||
{ |
||||
this.signboard = signboard; |
||||
} |
||||
|
||||
public String getSignboard() |
||||
{ |
||||
return signboard; |
||||
} |
||||
public void setZeroTaxRate(String zeroTaxRate) |
||||
{ |
||||
this.zeroTaxRate = zeroTaxRate; |
||||
} |
||||
|
||||
public String getZeroTaxRate() |
||||
{ |
||||
return zeroTaxRate; |
||||
} |
||||
public void setEncodingName(String encodingName) |
||||
{ |
||||
this.encodingName = encodingName; |
||||
} |
||||
|
||||
public String getEncodingName() |
||||
{ |
||||
return encodingName; |
||||
} |
||||
public void setEncodingVersion(String encodingVersion) |
||||
{ |
||||
this.encodingVersion = encodingVersion; |
||||
} |
||||
|
||||
public String getEncodingVersion() |
||||
{ |
||||
return encodingVersion; |
||||
} |
||||
public void setDiscountsType(String discountsType) |
||||
{ |
||||
this.discountsType = discountsType; |
||||
} |
||||
|
||||
public String getDiscountsType() |
||||
{ |
||||
return discountsType; |
||||
} |
||||
public void setTaxClassificationCode(String taxClassificationCode) |
||||
{ |
||||
this.taxClassificationCode = taxClassificationCode; |
||||
} |
||||
|
||||
public String getTaxClassificationCode() |
||||
{ |
||||
return taxClassificationCode; |
||||
} |
||||
public void setIsornotDiscounts(String isornotDiscounts) |
||||
{ |
||||
this.isornotDiscounts = isornotDiscounts; |
||||
} |
||||
|
||||
public String getIsornotDiscounts() |
||||
{ |
||||
return isornotDiscounts; |
||||
} |
||||
public void setSource(String source) |
||||
{ |
||||
this.source = source; |
||||
} |
||||
|
||||
public String getSource() |
||||
{ |
||||
return source; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
||||
.append("id", getId()) |
||||
.append("companyName", getCompanyName()) |
||||
.append("receiptNumber", getReceiptNumber()) |
||||
.append("customerName", getCustomerName()) |
||||
.append("customerTaxNumber", getCustomerTaxNumber()) |
||||
.append("customerAddress", getCustomerAddress()) |
||||
.append("customerPhone", getCustomerPhone()) |
||||
.append("bankName", getBankName()) |
||||
.append("bankNumber", getBankNumber()) |
||||
.append("phone", getPhone()) |
||||
.append("email", getEmail()) |
||||
.append("remark", getRemark()) |
||||
.append("productName", getProductName()) |
||||
.append("specification", getSpecification()) |
||||
.append("unit", getUnit()) |
||||
.append("price", getPrice()) |
||||
.append("num", getNum()) |
||||
.append("taxamt", getTaxamt()) |
||||
.append("taxrate", getTaxrate()) |
||||
.append("tax", getTax()) |
||||
.append("discount", getDiscount()) |
||||
.append("deduction", getDeduction()) |
||||
.append("signboard", getSignboard()) |
||||
.append("zeroTaxRate", getZeroTaxRate()) |
||||
.append("encodingName", getEncodingName()) |
||||
.append("encodingVersion", getEncodingVersion()) |
||||
.append("discountsType", getDiscountsType()) |
||||
.append("taxClassificationCode", getTaxClassificationCode()) |
||||
.append("isornotDiscounts", getIsornotDiscounts()) |
||||
.append("source", getSource()) |
||||
.append("createBy", getCreateBy()) |
||||
.append("createTime", getCreateTime()) |
||||
.append("updateBy", getUpdateBy()) |
||||
.append("updateTime", getUpdateTime()) |
||||
.toString(); |
||||
} |
||||
} |
@ -0,0 +1,61 @@ |
||||
package com.jianshui.platform.mapper; |
||||
|
||||
import java.util.List; |
||||
import com.jianshui.platform.domain.InvoiceParamConfig; |
||||
|
||||
/** |
||||
* 导入设置Mapper接口 |
||||
* |
||||
* @author kane |
||||
* @date 2023-06-28 |
||||
*/ |
||||
public interface InvoiceParamConfigMapper |
||||
{ |
||||
/** |
||||
* 查询导入设置 |
||||
* |
||||
* @param id 导入设置主键 |
||||
* @return 导入设置 |
||||
*/ |
||||
public InvoiceParamConfig selectInvoiceParamConfigById(Long id); |
||||
|
||||
/** |
||||
* 查询导入设置列表 |
||||
* |
||||
* @param invoiceParamConfig 导入设置 |
||||
* @return 导入设置集合 |
||||
*/ |
||||
public List<InvoiceParamConfig> selectInvoiceParamConfigList(InvoiceParamConfig invoiceParamConfig); |
||||
|
||||
/** |
||||
* 新增导入设置 |
||||
* |
||||
* @param invoiceParamConfig 导入设置 |
||||
* @return 结果 |
||||
*/ |
||||
public int insertInvoiceParamConfig(InvoiceParamConfig invoiceParamConfig); |
||||
|
||||
/** |
||||
* 修改导入设置 |
||||
* |
||||
* @param invoiceParamConfig 导入设置 |
||||
* @return 结果 |
||||
*/ |
||||
public int updateInvoiceParamConfig(InvoiceParamConfig invoiceParamConfig); |
||||
|
||||
/** |
||||
* 删除导入设置 |
||||
* |
||||
* @param id 导入设置主键 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteInvoiceParamConfigById(Long id); |
||||
|
||||
/** |
||||
* 批量删除导入设置 |
||||
* |
||||
* @param ids 需要删除的数据主键集合 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteInvoiceParamConfigByIds(Long[] ids); |
||||
} |
@ -0,0 +1,61 @@ |
||||
package com.jianshui.platform.service; |
||||
|
||||
import java.util.List; |
||||
import com.jianshui.platform.domain.InvoiceParamConfig; |
||||
|
||||
/** |
||||
* 导入设置Service接口 |
||||
* |
||||
* @author kane |
||||
* @date 2023-06-28 |
||||
*/ |
||||
public interface IInvoiceParamConfigService |
||||
{ |
||||
/** |
||||
* 查询导入设置 |
||||
* |
||||
* @param id 导入设置主键 |
||||
* @return 导入设置 |
||||
*/ |
||||
public InvoiceParamConfig selectInvoiceParamConfigById(Long id); |
||||
|
||||
/** |
||||
* 查询导入设置列表 |
||||
* |
||||
* @param invoiceParamConfig 导入设置 |
||||
* @return 导入设置集合 |
||||
*/ |
||||
public List<InvoiceParamConfig> selectInvoiceParamConfigList(InvoiceParamConfig invoiceParamConfig); |
||||
|
||||
/** |
||||
* 新增导入设置 |
||||
* |
||||
* @param invoiceParamConfig 导入设置 |
||||
* @return 结果 |
||||
*/ |
||||
public int insertInvoiceParamConfig(InvoiceParamConfig invoiceParamConfig); |
||||
|
||||
/** |
||||
* 修改导入设置 |
||||
* |
||||
* @param invoiceParamConfig 导入设置 |
||||
* @return 结果 |
||||
*/ |
||||
public int updateInvoiceParamConfig(InvoiceParamConfig invoiceParamConfig); |
||||
|
||||
/** |
||||
* 批量删除导入设置 |
||||
* |
||||
* @param ids 需要删除的导入设置主键集合 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteInvoiceParamConfigByIds(Long[] ids); |
||||
|
||||
/** |
||||
* 删除导入设置信息 |
||||
* |
||||
* @param id 导入设置主键 |
||||
* @return 结果 |
||||
*/ |
||||
public int deleteInvoiceParamConfigById(Long id); |
||||
} |
@ -0,0 +1,116 @@ |
||||
package com.jianshui.platform.service.impl; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.List; |
||||
|
||||
import com.jianshui.common.core.domain.entity.Companyservice; |
||||
import com.jianshui.common.core.domain.entity.SysUser; |
||||
import com.jianshui.common.utils.DateUtils; |
||||
import com.jianshui.common.utils.SecurityUtils; |
||||
import com.jianshui.system.mapper.CompanyserviceMapper; |
||||
import com.jianshui.system.mapper.SysUserMapper; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
import com.jianshui.platform.mapper.InvoiceParamConfigMapper; |
||||
import com.jianshui.platform.domain.InvoiceParamConfig; |
||||
import com.jianshui.platform.service.IInvoiceParamConfigService; |
||||
|
||||
/** |
||||
* 导入设置Service业务层处理 |
||||
* |
||||
* @author kane |
||||
* @date 2023-06-28 |
||||
*/ |
||||
@Service |
||||
public class InvoiceParamConfigServiceImpl implements IInvoiceParamConfigService |
||||
{ |
||||
@Autowired |
||||
private InvoiceParamConfigMapper invoiceParamConfigMapper; |
||||
|
||||
@Autowired |
||||
private SysUserMapper sysUserMapper; |
||||
|
||||
@Autowired |
||||
private CompanyserviceMapper companyserviceMapper; |
||||
|
||||
/** |
||||
* 查询导入设置 |
||||
* |
||||
* @param id 导入设置主键 |
||||
* @return 导入设置 |
||||
*/ |
||||
@Override |
||||
public InvoiceParamConfig selectInvoiceParamConfigById(Long id) |
||||
{ |
||||
return invoiceParamConfigMapper.selectInvoiceParamConfigById(id); |
||||
} |
||||
|
||||
/** |
||||
* 查询导入设置列表 |
||||
* |
||||
* @param invoiceParamConfig 导入设置 |
||||
* @return 导入设置 |
||||
*/ |
||||
@Override |
||||
public List<InvoiceParamConfig> selectInvoiceParamConfigList(InvoiceParamConfig invoiceParamConfig) |
||||
{ |
||||
return invoiceParamConfigMapper.selectInvoiceParamConfigList(invoiceParamConfig); |
||||
} |
||||
|
||||
/** |
||||
* 新增导入设置 |
||||
* |
||||
* @param invoiceParamConfig 导入设置 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int insertInvoiceParamConfig(InvoiceParamConfig invoiceParamConfig) |
||||
{ |
||||
//获取企业id
|
||||
Long userId = SecurityUtils.getUserId(); |
||||
SysUser sysUser = sysUserMapper.selectUserById(userId); |
||||
Companyservice companyservice = companyserviceMapper.selectCompanyserviceByCompanyid(sysUser.getCompanyId()); |
||||
//封装参数
|
||||
invoiceParamConfig.setCreateTime(DateUtils.getNowDate()); |
||||
invoiceParamConfig.setCompanyName(companyservice.getSellername()); |
||||
invoiceParamConfig.setCreateBy(sysUser.getCreateBy()); |
||||
return invoiceParamConfigMapper.insertInvoiceParamConfig(invoiceParamConfig); |
||||
} |
||||
|
||||
/** |
||||
* 修改导入设置 |
||||
* |
||||
* @param invoiceParamConfig 导入设置 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int updateInvoiceParamConfig(InvoiceParamConfig invoiceParamConfig) |
||||
{ |
||||
invoiceParamConfig.setUpdateTime(DateUtils.getNowDate()); |
||||
return invoiceParamConfigMapper.updateInvoiceParamConfig(invoiceParamConfig); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除导入设置 |
||||
* |
||||
* @param ids 需要删除的导入设置主键 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int deleteInvoiceParamConfigByIds(Long[] ids) |
||||
{ |
||||
return invoiceParamConfigMapper.deleteInvoiceParamConfigByIds(ids); |
||||
} |
||||
|
||||
/** |
||||
* 删除导入设置信息 |
||||
* |
||||
* @param id 导入设置主键 |
||||
* @return 结果 |
||||
*/ |
||||
@Override |
||||
public int deleteInvoiceParamConfigById(Long id) |
||||
{ |
||||
return invoiceParamConfigMapper.deleteInvoiceParamConfigById(id); |
||||
} |
||||
} |
@ -0,0 +1,185 @@ |
||||
<?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.jianshui.platform.mapper.InvoiceParamConfigMapper"> |
||||
|
||||
<resultMap type="InvoiceParamConfig" id="InvoiceParamConfigResult"> |
||||
<result property="id" column="id" /> |
||||
<result property="companyName" column="company_name" /> |
||||
<result property="receiptNumber" column="receipt_number" /> |
||||
<result property="customerName" column="customer_name" /> |
||||
<result property="customerTaxNumber" column="customer_tax_number" /> |
||||
<result property="customerAddress" column="customer_address" /> |
||||
<result property="customerPhone" column="customer_phone" /> |
||||
<result property="bankName" column="bank_name" /> |
||||
<result property="bankNumber" column="bank_number" /> |
||||
<result property="phone" column="phone" /> |
||||
<result property="email" column="email" /> |
||||
<result property="remark" column="remark" /> |
||||
<result property="productName" column="product_name" /> |
||||
<result property="specification" column="specification" /> |
||||
<result property="unit" column="unit" /> |
||||
<result property="price" column="price" /> |
||||
<result property="num" column="num" /> |
||||
<result property="taxamt" column="taxamt" /> |
||||
<result property="taxrate" column="taxrate" /> |
||||
<result property="tax" column="tax" /> |
||||
<result property="discount" column="discount" /> |
||||
<result property="deduction" column="deduction" /> |
||||
<result property="signboard" column="signboard" /> |
||||
<result property="zeroTaxRate" column="zero_tax_rate" /> |
||||
<result property="encodingName" column="encoding_name" /> |
||||
<result property="encodingVersion" column="encoding_version" /> |
||||
<result property="discountsType" column="discounts_type" /> |
||||
<result property="taxClassificationCode" column="tax_classification_code" /> |
||||
<result property="isornotDiscounts" column="isornot_discounts" /> |
||||
<result property="source" column="source" /> |
||||
<result property="createBy" column="create_by" /> |
||||
<result property="createTime" column="create_time" /> |
||||
<result property="updateBy" column="update_by" /> |
||||
<result property="updateTime" column="update_time" /> |
||||
</resultMap> |
||||
|
||||
<sql id="selectInvoiceParamConfigVo"> |
||||
select id, company_name, receipt_number, customer_name, customer_tax_number, customer_address, customer_phone, bank_name, bank_number, phone, email, remark, product_name, specification, unit, price, num, taxamt, taxrate, tax, discount, deduction, signboard, zero_tax_rate, encoding_name, encoding_version, discounts_type, tax_classification_code, isornot_discounts, source, create_by, create_time, update_by, update_time from invoice_param_config |
||||
</sql> |
||||
|
||||
<select id="selectInvoiceParamConfigList" parameterType="InvoiceParamConfig" resultMap="InvoiceParamConfigResult"> |
||||
<include refid="selectInvoiceParamConfigVo"/> |
||||
<where> |
||||
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if> |
||||
<if test="signboard != null and signboard != ''"> and signboard = #{signboard}</if> |
||||
</where> |
||||
</select> |
||||
|
||||
<select id="selectInvoiceParamConfigById" parameterType="Long" resultMap="InvoiceParamConfigResult"> |
||||
<include refid="selectInvoiceParamConfigVo"/> |
||||
where id = #{id} |
||||
</select> |
||||
|
||||
<insert id="insertInvoiceParamConfig" parameterType="InvoiceParamConfig" useGeneratedKeys="true" keyProperty="id"> |
||||
insert into invoice_param_config |
||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
<if test="companyName != null and companyName != ''">company_name,</if> |
||||
<if test="receiptNumber != null and receiptNumber != ''">receipt_number,</if> |
||||
<if test="customerName != null and customerName != ''">customer_name,</if> |
||||
<if test="customerTaxNumber != null">customer_tax_number,</if> |
||||
<if test="customerAddress != null">customer_address,</if> |
||||
<if test="customerPhone != null">customer_phone,</if> |
||||
<if test="bankName != null">bank_name,</if> |
||||
<if test="bankNumber != null">bank_number,</if> |
||||
<if test="phone != null">phone,</if> |
||||
<if test="email != null">email,</if> |
||||
<if test="remark != null">remark,</if> |
||||
<if test="productName != null and productName != ''">product_name,</if> |
||||
<if test="specification != null">specification,</if> |
||||
<if test="unit != null">unit,</if> |
||||
<if test="price != null">price,</if> |
||||
<if test="num != null">num,</if> |
||||
<if test="taxamt != null">taxamt,</if> |
||||
<if test="taxrate != null">taxrate,</if> |
||||
<if test="tax != null">tax,</if> |
||||
<if test="discount != null">discount,</if> |
||||
<if test="deduction != null">deduction,</if> |
||||
<if test="signboard != null">signboard,</if> |
||||
<if test="zeroTaxRate != null">zero_tax_rate,</if> |
||||
<if test="encodingName != null">encoding_name,</if> |
||||
<if test="encodingVersion != null">encoding_version,</if> |
||||
<if test="discountsType != null">discounts_type,</if> |
||||
<if test="taxClassificationCode != null">tax_classification_code,</if> |
||||
<if test="isornotDiscounts != null">isornot_discounts,</if> |
||||
<if test="source != null">source,</if> |
||||
<if test="createBy != null">create_by,</if> |
||||
<if test="createTime != null">create_time,</if> |
||||
<if test="updateBy != null">update_by,</if> |
||||
<if test="updateTime != null">update_time,</if> |
||||
</trim> |
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
<if test="companyName != null and companyName != ''">#{companyName},</if> |
||||
<if test="receiptNumber != null and receiptNumber != ''">#{receiptNumber},</if> |
||||
<if test="customerName != null and customerName != ''">#{customerName},</if> |
||||
<if test="customerTaxNumber != null">#{customerTaxNumber},</if> |
||||
<if test="customerAddress != null">#{customerAddress},</if> |
||||
<if test="customerPhone != null">#{customerPhone},</if> |
||||
<if test="bankName != null">#{bankName},</if> |
||||
<if test="bankNumber != null">#{bankNumber},</if> |
||||
<if test="phone != null">#{phone},</if> |
||||
<if test="email != null">#{email},</if> |
||||
<if test="remark != null">#{remark},</if> |
||||
<if test="productName != null and productName != ''">#{productName},</if> |
||||
<if test="specification != null">#{specification},</if> |
||||
<if test="unit != null">#{unit},</if> |
||||
<if test="price != null">#{price},</if> |
||||
<if test="num != null">#{num},</if> |
||||
<if test="taxamt != null">#{taxamt},</if> |
||||
<if test="taxrate != null">#{taxrate},</if> |
||||
<if test="tax != null">#{tax},</if> |
||||
<if test="discount != null">#{discount},</if> |
||||
<if test="deduction != null">#{deduction},</if> |
||||
<if test="signboard != null">#{signboard},</if> |
||||
<if test="zeroTaxRate != null">#{zeroTaxRate},</if> |
||||
<if test="encodingName != null">#{encodingName},</if> |
||||
<if test="encodingVersion != null">#{encodingVersion},</if> |
||||
<if test="discountsType != null">#{discountsType},</if> |
||||
<if test="taxClassificationCode != null">#{taxClassificationCode},</if> |
||||
<if test="isornotDiscounts != null">#{isornotDiscounts},</if> |
||||
<if test="source != null">#{source},</if> |
||||
<if test="createBy != null">#{createBy},</if> |
||||
<if test="createTime != null">#{createTime},</if> |
||||
<if test="updateBy != null">#{updateBy},</if> |
||||
<if test="updateTime != null">#{updateTime},</if> |
||||
</trim> |
||||
</insert> |
||||
|
||||
<update id="updateInvoiceParamConfig" parameterType="InvoiceParamConfig"> |
||||
update invoice_param_config |
||||
<trim prefix="SET" suffixOverrides=","> |
||||
<if test="companyName != null and companyName != ''">company_name = #{companyName},</if> |
||||
<if test="receiptNumber != null and receiptNumber != ''">receipt_number = #{receiptNumber},</if> |
||||
<if test="customerName != null and customerName != ''">customer_name = #{customerName},</if> |
||||
<if test="customerTaxNumber != null">customer_tax_number = #{customerTaxNumber},</if> |
||||
<if test="customerAddress != null">customer_address = #{customerAddress},</if> |
||||
<if test="customerPhone != null">customer_phone = #{customerPhone},</if> |
||||
<if test="bankName != null">bank_name = #{bankName},</if> |
||||
<if test="bankNumber != null">bank_number = #{bankNumber},</if> |
||||
<if test="phone != null">phone = #{phone},</if> |
||||
<if test="email != null">email = #{email},</if> |
||||
<if test="remark != null">remark = #{remark},</if> |
||||
<if test="productName != null and productName != ''">product_name = #{productName},</if> |
||||
<if test="specification != null">specification = #{specification},</if> |
||||
<if test="unit != null">unit = #{unit},</if> |
||||
<if test="price != null">price = #{price},</if> |
||||
<if test="num != null">num = #{num},</if> |
||||
<if test="taxamt != null">taxamt = #{taxamt},</if> |
||||
<if test="taxrate != null">taxrate = #{taxrate},</if> |
||||
<if test="tax != null">tax = #{tax},</if> |
||||
<if test="discount != null">discount = #{discount},</if> |
||||
<if test="deduction != null">deduction = #{deduction},</if> |
||||
<if test="signboard != null">signboard = #{signboard},</if> |
||||
<if test="zeroTaxRate != null">zero_tax_rate = #{zeroTaxRate},</if> |
||||
<if test="encodingName != null">encoding_name = #{encodingName},</if> |
||||
<if test="encodingVersion != null">encoding_version = #{encodingVersion},</if> |
||||
<if test="discountsType != null">discounts_type = #{discountsType},</if> |
||||
<if test="taxClassificationCode != null">tax_classification_code = #{taxClassificationCode},</if> |
||||
<if test="isornotDiscounts != null">isornot_discounts = #{isornotDiscounts},</if> |
||||
<if test="source != null">source = #{source},</if> |
||||
<if test="createBy != null">create_by = #{createBy},</if> |
||||
<if test="createTime != null">create_time = #{createTime},</if> |
||||
<if test="updateBy != null">update_by = #{updateBy},</if> |
||||
<if test="updateTime != null">update_time = #{updateTime},</if> |
||||
</trim> |
||||
where id = #{id} |
||||
</update> |
||||
|
||||
<delete id="deleteInvoiceParamConfigById" parameterType="Long"> |
||||
delete from invoice_param_config where id = #{id} |
||||
</delete> |
||||
|
||||
<delete id="deleteInvoiceParamConfigByIds" parameterType="String"> |
||||
delete from invoice_param_config where id in |
||||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
#{id} |
||||
</foreach> |
||||
</delete> |
||||
</mapper> |
@ -0,0 +1,44 @@ |
||||
import request from '@/utils/request' |
||||
|
||||
// 查询导入设置列表
|
||||
export function listConfig(query) { |
||||
return request({ |
||||
url: '/platform/config/list', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 查询导入设置详细
|
||||
export function getConfig(id) { |
||||
return request({ |
||||
url: '/platform/config/' + id, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 新增导入设置
|
||||
export function addConfig(data) { |
||||
return request({ |
||||
url: '/platform/config', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改导入设置
|
||||
export function updateConfig(data) { |
||||
return request({ |
||||
url: '/platform/config', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 删除导入设置
|
||||
export function delConfig(id) { |
||||
return request({ |
||||
url: '/platform/config/' + id, |
||||
method: 'delete' |
||||
}) |
||||
} |
@ -0,0 +1,433 @@ |
||||
<template> |
||||
<div class="app-container"> |
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
||||
<el-form-item label="企业名称" prop="companyName"> |
||||
<el-input |
||||
v-model="queryParams.companyName" |
||||
placeholder="请输入企业名称" |
||||
clearable |
||||
size="small" |
||||
@keyup.enter.native="handleQuery" |
||||
/> |
||||
</el-form-item> |
||||
<el-form-item label="含税标识" prop="signboard"> |
||||
<el-select v-model="queryParams.signboard" placeholder="请选择单价含税不含税标识" clearable size="small"> |
||||
<el-option |
||||
v-for="dict in dict.type.signboard" |
||||
:key="dict.value" |
||||
:label="dict.label" |
||||
:value="dict.value" |
||||
/> |
||||
</el-select> |
||||
</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="['platform:config: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="['platform:config: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="['platform:config: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="['platform:config:export']" |
||||
>导出</el-button> |
||||
</el-col> |
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
</el-row> |
||||
|
||||
<el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange"> |
||||
<el-table-column type="selection" width="55" align="center" /> |
||||
<el-table-column label="主键ID" align="center" prop="id" /> |
||||
<!-- <el-table-column label="企业名称" align="center" prop="companyName" />--> |
||||
<el-table-column label="单据编号" align="center" prop="receiptNumber" /> |
||||
<el-table-column label="客户名称/编码" align="center" prop="customerName" /> |
||||
<el-table-column label="客户税号" align="center" prop="customerTaxNumber" /> |
||||
<el-table-column label="客户地址" align="center" prop="customerAddress" /> |
||||
<el-table-column label="客户电话" align="center" prop="customerPhone" /> |
||||
<el-table-column label="开户银行" align="center" prop="bankName" /> |
||||
<el-table-column label="银行账号" align="center" prop="bankNumber" /> |
||||
<el-table-column label="手机号" align="center" prop="phone" /> |
||||
<el-table-column label="邮箱" align="center" prop="email" /> |
||||
<el-table-column label="备注" align="center" prop="remark" /> |
||||
<el-table-column label="商品名称/编码" align="center" prop="productName" /> |
||||
<el-table-column label="规格型号" align="center" prop="specification" /> |
||||
<el-table-column label="单位" align="center" prop="unit" /> |
||||
<el-table-column label="单价" align="center" prop="price" /> |
||||
<el-table-column label="数量" align="center" prop="num" /> |
||||
<el-table-column label="金额" align="center" prop="taxamt" /> |
||||
<el-table-column label="税率" align="center" prop="taxrate" /> |
||||
<el-table-column label="税额" align="center" prop="tax" /> |
||||
<el-table-column label="折扣" align="center" prop="discount" /> |
||||
<el-table-column label="扣除额" align="center" prop="deduction" /> |
||||
<el-table-column label="含税标识" align="center" prop="signboard"> |
||||
<template slot-scope="scope"> |
||||
<dict-tag :options="dict.type.signboard" :value="scope.row.signboard"/> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="零税率标识" align="center" prop="zeroTaxRate" /> |
||||
<el-table-column label="编码简称" align="center" prop="encodingName" /> |
||||
<el-table-column label="编码版本号" align="center" prop="encodingVersion" /> |
||||
<el-table-column label="优惠政策类型" align="center" prop="discountsType" /> |
||||
<el-table-column label="税收分类编码" align="center" prop="taxClassificationCode" /> |
||||
<el-table-column label="是否享受优惠政策" align="center" prop="isornotDiscounts" /> |
||||
<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="['platform:config:edit']" |
||||
>修改</el-button> |
||||
<el-button |
||||
size="mini" |
||||
type="text" |
||||
icon="el-icon-delete" |
||||
@click="handleDelete(scope.row)" |
||||
v-hasPermi="['platform:config: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="companyName">--> |
||||
<!-- <el-input v-model="form.companyName" placeholder="请输入企业名称" />--> |
||||
<!-- </el-form-item>--> |
||||
<el-form-item label="单据编号" prop="receiptNumber"> |
||||
<el-input v-model="form.receiptNumber" 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="customerTaxNumber"> |
||||
<el-input v-model="form.customerTaxNumber" placeholder="请输入客户税号" /> |
||||
</el-form-item> |
||||
<el-form-item label="客户地址" prop="customerAddress"> |
||||
<el-input v-model="form.customerAddress" placeholder="请输入客户地址" /> |
||||
</el-form-item> |
||||
<el-form-item label="客户电话" prop="customerPhone"> |
||||
<el-input v-model="form.customerPhone" placeholder="请输入客户电话" /> |
||||
</el-form-item> |
||||
<el-form-item label="开户银行" prop="bankName"> |
||||
<el-input v-model="form.bankName" placeholder="请输入开户银行" /> |
||||
</el-form-item> |
||||
<el-form-item label="银行账号" prop="bankNumber"> |
||||
<el-input v-model="form.bankNumber" placeholder="请输入银行账号" /> |
||||
</el-form-item> |
||||
<el-form-item label="手机号" prop="phone"> |
||||
<el-input v-model="form.phone" placeholder="请输入手机号" /> |
||||
</el-form-item> |
||||
<el-form-item label="邮箱" prop="email"> |
||||
<el-input v-model="form.email" 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="productName"> |
||||
<el-input v-model="form.productName" placeholder="请输入商品名称/编码" /> |
||||
</el-form-item> |
||||
<el-form-item label="规格型号" prop="specification"> |
||||
<el-input v-model="form.specification" 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="price"> |
||||
<el-input v-model="form.price" placeholder="请输入单价" /> |
||||
</el-form-item> |
||||
<el-form-item label="数量" prop="num"> |
||||
<el-input v-model="form.num" placeholder="请输入数量" /> |
||||
</el-form-item> |
||||
<el-form-item label="金额" prop="taxamt"> |
||||
<el-input v-model="form.taxamt" placeholder="请输入金额" /> |
||||
</el-form-item> |
||||
<el-form-item label="税率" prop="taxrate"> |
||||
<el-input v-model="form.taxrate" placeholder="请输入税率" /> |
||||
</el-form-item> |
||||
<el-form-item label="税额" prop="tax"> |
||||
<el-input v-model="form.tax" placeholder="请输入税额" /> |
||||
</el-form-item> |
||||
<el-form-item label="折扣" prop="discount"> |
||||
<el-input v-model="form.discount" placeholder="请输入折扣" /> |
||||
</el-form-item> |
||||
<el-form-item label="扣除额" prop="deduction"> |
||||
<el-input v-model="form.deduction" placeholder="请输入扣除额" /> |
||||
</el-form-item> |
||||
<el-form-item label="含税标识" prop="signboard"> |
||||
<el-select v-model="form.signboard" placeholder="请选择单价含税不含税标识"> |
||||
<el-option |
||||
v-for="dict in dict.type.signboard" |
||||
:key="dict.value" |
||||
:label="dict.label" |
||||
:value="dict.value" |
||||
></el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
<el-form-item label="零税率标识" prop="zeroTaxRate"> |
||||
<el-input v-model="form.zeroTaxRate" placeholder="请输入零税率标识" /> |
||||
</el-form-item> |
||||
<el-form-item label="编码简称" prop="encodingName"> |
||||
<el-input v-model="form.encodingName" placeholder="请输入编码简称" /> |
||||
</el-form-item> |
||||
<el-form-item label="编码版本号" prop="encodingVersion"> |
||||
<el-input v-model="form.encodingVersion" placeholder="请输入编码版本号" /> |
||||
</el-form-item> |
||||
<el-form-item label="优惠政策类型" prop="discountsType"> |
||||
<el-input v-model="form.discountsType" placeholder="请输入优惠政策类型" /> |
||||
</el-form-item> |
||||
<el-form-item label="税收分类编码" prop="taxClassificationCode"> |
||||
<el-input v-model="form.taxClassificationCode" placeholder="请输入税收分类编码" /> |
||||
</el-form-item> |
||||
<el-form-item label="是否享受优惠政策" prop="isornotDiscounts"> |
||||
<el-input v-model="form.isornotDiscounts" 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 { listConfig, getConfig, delConfig, addConfig, updateConfig } from "@/api/platform/config"; |
||||
|
||||
export default { |
||||
name: "Config", |
||||
dicts: ['signboard'], |
||||
data() { |
||||
return { |
||||
// 遮罩层 |
||||
loading: true, |
||||
// 选中数组 |
||||
ids: [], |
||||
// 非单个禁用 |
||||
single: true, |
||||
// 非多个禁用 |
||||
multiple: true, |
||||
// 显示搜索条件 |
||||
showSearch: true, |
||||
// 总条数 |
||||
total: 0, |
||||
// 导入设置表格数据 |
||||
configList: [], |
||||
// 弹出层标题 |
||||
title: "", |
||||
// 是否显示弹出层 |
||||
open: false, |
||||
// 查询参数 |
||||
queryParams: { |
||||
pageNum: 1, |
||||
pageSize: 10, |
||||
companyName: null, |
||||
signboard: null, |
||||
}, |
||||
// 表单参数 |
||||
form: {}, |
||||
// 表单校验 |
||||
rules: { |
||||
companyName: [ |
||||
{ required: true, message: "企业名称不能为空", trigger: "blur" } |
||||
], |
||||
receiptNumber: [ |
||||
{ required: true, message: "单据编号不能为空", trigger: "blur" } |
||||
], |
||||
customerName: [ |
||||
{ required: true, message: "客户名称/编码不能为空", trigger: "blur" } |
||||
], |
||||
productName: [ |
||||
{ required: true, message: "商品名称/编码不能为空", trigger: "blur" } |
||||
], |
||||
price: [ |
||||
{ required: true, message: "单价不能为空", trigger: "blur" } |
||||
], |
||||
num: [ |
||||
{ required: true, message: "数量不能为空", trigger: "blur" } |
||||
], |
||||
taxamt: [ |
||||
{ required: true, message: "金额不能为空", trigger: "blur" } |
||||
], |
||||
taxrate: [ |
||||
{ required: true, message: "税率不能为空", trigger: "blur" } |
||||
], |
||||
} |
||||
}; |
||||
}, |
||||
created() { |
||||
this.getList(); |
||||
}, |
||||
methods: { |
||||
/** 查询导入设置列表 */ |
||||
getList() { |
||||
this.loading = true; |
||||
listConfig(this.queryParams).then(response => { |
||||
this.configList = response.rows; |
||||
this.total = response.total; |
||||
this.loading = false; |
||||
}); |
||||
}, |
||||
// 取消按钮 |
||||
cancel() { |
||||
this.open = false; |
||||
this.reset(); |
||||
}, |
||||
// 表单重置 |
||||
reset() { |
||||
this.form = { |
||||
id: null, |
||||
companyName: null, |
||||
receiptNumber: null, |
||||
customerName: null, |
||||
customerTaxNumber: null, |
||||
customerAddress: null, |
||||
customerPhone: null, |
||||
bankName: null, |
||||
bankNumber: null, |
||||
phone: null, |
||||
email: null, |
||||
remark: null, |
||||
productName: null, |
||||
specification: null, |
||||
unit: null, |
||||
price: null, |
||||
num: null, |
||||
taxamt: null, |
||||
taxrate: null, |
||||
tax: null, |
||||
discount: null, |
||||
deduction: null, |
||||
signboard: null, |
||||
zeroTaxRate: null, |
||||
encodingName: null, |
||||
encodingVersion: null, |
||||
discountsType: null, |
||||
taxClassificationCode: null, |
||||
isornotDiscounts: null, |
||||
source: null, |
||||
createBy: null, |
||||
createTime: null, |
||||
updateBy: null, |
||||
updateTime: 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 |
||||
getConfig(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) { |
||||
updateConfig(this.form).then(response => { |
||||
this.$modal.msgSuccess("修改成功"); |
||||
this.open = false; |
||||
this.getList(); |
||||
}); |
||||
} else { |
||||
addConfig(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 delConfig(ids); |
||||
}).then(() => { |
||||
this.getList(); |
||||
this.$modal.msgSuccess("删除成功"); |
||||
}).catch(() => {}); |
||||
}, |
||||
/** 导出按钮操作 */ |
||||
handleExport() { |
||||
this.download('platform/config/export', { |
||||
...this.queryParams |
||||
}, `config_${new Date().getTime()}.xlsx`) |
||||
} |
||||
} |
||||
}; |
||||
</script> |
Loading…
Reference in new issue