qianyu
1 year ago
31 changed files with 1984 additions and 77 deletions
@ -0,0 +1,12 @@ |
|||||
|
package com.ruoyi; |
||||
|
|
||||
|
import com.ruoyi.common.core.page.TableDataInfo; |
||||
|
import com.ruoyi.manufacture.controller.MaterialRequisitionInfoController; |
||||
|
|
||||
|
import java.util.Scanner; |
||||
|
|
||||
|
public class main { |
||||
|
public static void main(String args[]){ |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,190 @@ |
|||||
|
package com.ruoyi.quality.controller; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
import java.net.URLEncoder; |
||||
|
import java.text.SimpleDateFormat; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
import com.alibaba.excel.EasyExcel; |
||||
|
import com.alibaba.excel.ExcelWriter; |
||||
|
import com.alibaba.excel.util.MapUtils; |
||||
|
import com.alibaba.excel.write.metadata.WriteSheet; |
||||
|
import com.alibaba.excel.write.metadata.fill.FillConfig; |
||||
|
import com.ruoyi.quality.domain.exportDto.QualitySupplierDeductionDto; |
||||
|
import com.ruoyi.storehouse.domain.exportDto.OutboundDetailDto; |
||||
|
import com.ruoyi.system.utils.ExcelFillCellMergePrevColUtils; |
||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions; |
||||
|
import org.springframework.beans.BeanUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Controller; |
||||
|
import org.springframework.ui.ModelMap; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
import com.ruoyi.common.annotation.Log; |
||||
|
import com.ruoyi.common.enums.BusinessType; |
||||
|
import com.ruoyi.quality.domain.QualitySupplierDeduction; |
||||
|
import com.ruoyi.quality.service.IQualitySupplierDeductionService; |
||||
|
import com.ruoyi.common.core.controller.BaseController; |
||||
|
import com.ruoyi.common.core.domain.AjaxResult; |
||||
|
import com.ruoyi.common.utils.poi.ExcelUtil; |
||||
|
import com.ruoyi.common.core.page.TableDataInfo; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
|
||||
|
/** |
||||
|
* qualitySupplierDeductionController |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
@Controller |
||||
|
@RequestMapping("/quality/qualitySupplierDeduction") |
||||
|
public class QualitySupplierDeductionController extends BaseController |
||||
|
{ |
||||
|
private String prefix = "quality/qualitySupplierDeduction"; |
||||
|
|
||||
|
@Autowired |
||||
|
private IQualitySupplierDeductionService qualitySupplierDeductionService; |
||||
|
|
||||
|
@RequiresPermissions("quality:qualitySupplierDeduction:view") |
||||
|
@GetMapping() |
||||
|
public String qualitySupplierDeduction() |
||||
|
{ |
||||
|
return prefix + "/qualitySupplierDeduction"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询qualitySupplierDeduction列表 |
||||
|
*/ |
||||
|
@RequiresPermissions("quality:qualitySupplierDeduction:list") |
||||
|
@PostMapping("/list") |
||||
|
@ResponseBody |
||||
|
public TableDataInfo list(QualitySupplierDeduction qualitySupplierDeduction) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List<QualitySupplierDeduction> list = qualitySupplierDeductionService.selectQualitySupplierDeductionList(qualitySupplierDeduction); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出qualitySupplierDeduction列表 |
||||
|
*/ |
||||
|
@RequiresPermissions("quality:qualitySupplierDeduction:export") |
||||
|
@Log(title = "qualitySupplierDeduction", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
@ResponseBody |
||||
|
public AjaxResult export(QualitySupplierDeduction qualitySupplierDeduction) |
||||
|
{ |
||||
|
List<QualitySupplierDeduction> list = qualitySupplierDeductionService.selectQualitySupplierDeductionList(qualitySupplierDeduction); |
||||
|
ExcelUtil<QualitySupplierDeduction> util = new ExcelUtil<QualitySupplierDeduction>(QualitySupplierDeduction.class); |
||||
|
return util.exportExcel(list, "qualitySupplierDeduction数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出原料出库单 |
||||
|
*/ |
||||
|
@RequiresPermissions("storehouse:outboundInfo:export") |
||||
|
@Log(title = "outboundInfo", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export/{qualitySupplierDeductionId}") |
||||
|
@ResponseBody |
||||
|
public void exportYL(@PathVariable("qualitySupplierDeductionId") Long qualitySupplierDeductionId , HttpServletResponse response) throws IOException { |
||||
|
QualitySupplierDeduction qualitySupplierDeduction= qualitySupplierDeductionService.selectQualitySupplierDeductionById(qualitySupplierDeductionId); |
||||
|
|
||||
|
ExcelFillCellMergePrevColUtils mergePrevColUtils = new ExcelFillCellMergePrevColUtils(); |
||||
|
response.setCharacterEncoding("utf-8"); |
||||
|
String fileName = URLEncoder.encode("供应商索赔扣款单", "UTF-8").replaceAll("\\+", "%20"); |
||||
|
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); |
||||
|
String templateFileName = "C:\\exportTemplates\\exportQualitySupplierDeduction.xlsx"; |
||||
|
|
||||
|
try (ExcelWriter excelWriter = EasyExcel |
||||
|
.write(response.getOutputStream(), QualitySupplierDeductionDto.class) |
||||
|
.withTemplate(templateFileName) |
||||
|
.registerWriteHandler(mergePrevColUtils) |
||||
|
.build()) { |
||||
|
WriteSheet writeSheet = EasyExcel.writerSheet().build(); |
||||
|
Map<String, Object> map = MapUtils.newHashMap(); |
||||
|
map.put("supplierCode", qualitySupplierDeduction.getSupplierCode()); |
||||
|
map.put("modeOfService", qualitySupplierDeduction.getModeOfService()); |
||||
|
map.put("acceptanceDepartment", qualitySupplierDeduction.getAcceptanceDepartment()); |
||||
|
map.put("acceptancePerson", qualitySupplierDeduction.getAcceptancePerson()); |
||||
|
map.put("contactNumber", qualitySupplierDeduction.getContactNumber()); |
||||
|
map.put("reworkLaborCost", qualitySupplierDeduction.getReworkLaborCost()); |
||||
|
map.put("customerDeduction", qualitySupplierDeduction.getCustomerDeduction()); |
||||
|
map.put("punitiveDamage", qualitySupplierDeduction.getPunitiveDamage()); |
||||
|
map.put("materialScrapCost", qualitySupplierDeduction.getMaterialScrapCost()); |
||||
|
map.put("transportationExpenses", qualitySupplierDeduction.getTransportationExpenses()); |
||||
|
map.put("otherName", "其他("+qualitySupplierDeduction.getOtherName()+")"); |
||||
|
map.put("othersCost", qualitySupplierDeduction.getOthersCost()); |
||||
|
map.put("totalAmount", qualitySupplierDeduction.getTotalAmount()); |
||||
|
map.put("proposePerson", qualitySupplierDeduction.getProposePerson()); |
||||
|
map.put("reviewedPerson", qualitySupplierDeduction.getReviewedPerson()); |
||||
|
map.put("approvalPerson", qualitySupplierDeduction.getApprovalPerson()); |
||||
|
List<String> reasons = new ArrayList<>(); |
||||
|
map.put("reason", qualitySupplierDeduction.getReason()); |
||||
|
excelWriter.fill(map,writeSheet); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 新增qualitySupplierDeduction |
||||
|
*/ |
||||
|
@GetMapping("/add") |
||||
|
public String add() |
||||
|
{ |
||||
|
return prefix + "/add"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增保存qualitySupplierDeduction |
||||
|
*/ |
||||
|
@RequiresPermissions("quality:qualitySupplierDeduction:add") |
||||
|
@Log(title = "qualitySupplierDeduction", businessType = BusinessType.INSERT) |
||||
|
@PostMapping("/add") |
||||
|
@ResponseBody |
||||
|
public AjaxResult addSave(QualitySupplierDeduction qualitySupplierDeduction) |
||||
|
{ |
||||
|
return toAjax(qualitySupplierDeductionService.insertQualitySupplierDeduction(qualitySupplierDeduction)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改qualitySupplierDeduction |
||||
|
*/ |
||||
|
@GetMapping("/edit/{supplierDeductionId}") |
||||
|
public String edit(@PathVariable("supplierDeductionId") Long supplierDeductionId, ModelMap mmap) |
||||
|
{ |
||||
|
QualitySupplierDeduction qualitySupplierDeduction = qualitySupplierDeductionService.selectQualitySupplierDeductionById(supplierDeductionId); |
||||
|
mmap.put("qualitySupplierDeduction", qualitySupplierDeduction); |
||||
|
return prefix + "/edit"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改保存qualitySupplierDeduction |
||||
|
*/ |
||||
|
@RequiresPermissions("quality:qualitySupplierDeduction:edit") |
||||
|
@Log(title = "qualitySupplierDeduction", businessType = BusinessType.UPDATE) |
||||
|
@PostMapping("/edit") |
||||
|
@ResponseBody |
||||
|
public AjaxResult editSave(QualitySupplierDeduction qualitySupplierDeduction) |
||||
|
{ |
||||
|
return toAjax(qualitySupplierDeductionService.updateQualitySupplierDeduction(qualitySupplierDeduction)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除qualitySupplierDeduction |
||||
|
*/ |
||||
|
@RequiresPermissions("quality:qualitySupplierDeduction:remove") |
||||
|
@Log(title = "qualitySupplierDeduction", businessType = BusinessType.DELETE) |
||||
|
@PostMapping( "/remove") |
||||
|
@ResponseBody |
||||
|
public AjaxResult remove(String ids) |
||||
|
{ |
||||
|
return toAjax(qualitySupplierDeductionService.deleteQualitySupplierDeductionByIds(ids)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,275 @@ |
|||||
|
package com.ruoyi.quality.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; |
||||
|
|
||||
|
/** |
||||
|
* qualitySupplierDeduction对象 quality_supplier_deduction |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
public class QualitySupplierDeduction extends BaseEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** */ |
||||
|
private Long supplierDeductionId; |
||||
|
|
||||
|
/** 供应商代码 */ |
||||
|
@Excel(name = "供应商代码") |
||||
|
private String supplierCode; |
||||
|
|
||||
|
/** 送达方式 */ |
||||
|
@Excel(name = "送达方式") |
||||
|
private String modeOfService; |
||||
|
|
||||
|
/** 受理部门 */ |
||||
|
@Excel(name = "受理部门") |
||||
|
private String acceptanceDepartment; |
||||
|
|
||||
|
/** 受理人 */ |
||||
|
@Excel(name = "受理人") |
||||
|
private String acceptancePerson; |
||||
|
|
||||
|
/** 联络方式 */ |
||||
|
@Excel(name = "联络方式") |
||||
|
private String contactNumber; |
||||
|
|
||||
|
/** 索赔扣款详细原因 */ |
||||
|
@Excel(name = "索赔扣款详细原因") |
||||
|
private String reason; |
||||
|
|
||||
|
/** 返工工时费 */ |
||||
|
@Excel(name = "返工工时费") |
||||
|
private String reworkLaborCost; |
||||
|
|
||||
|
/** 客户扣款 */ |
||||
|
@Excel(name = "客户扣款") |
||||
|
private String customerDeduction; |
||||
|
|
||||
|
/** 惩罚性罚款 */ |
||||
|
@Excel(name = "惩罚性罚款") |
||||
|
private String punitiveDamage; |
||||
|
|
||||
|
/** 物料报废费用 */ |
||||
|
@Excel(name = "物料报废费用") |
||||
|
private String materialScrapCost; |
||||
|
|
||||
|
/** 交通/运输费 */ |
||||
|
@Excel(name = "交通/运输费") |
||||
|
private String transportationExpenses; |
||||
|
|
||||
|
/** 其他名字 */ |
||||
|
@Excel(name = "其他名字") |
||||
|
private String otherName; |
||||
|
|
||||
|
/** 其他金额 */ |
||||
|
@Excel(name = "其他金额") |
||||
|
private String othersCost; |
||||
|
|
||||
|
/** 合计金额 */ |
||||
|
@Excel(name = "合计金额") |
||||
|
private String totalAmount; |
||||
|
|
||||
|
/** 提出人 */ |
||||
|
@Excel(name = "提出人") |
||||
|
private String proposePerson; |
||||
|
|
||||
|
/** 审核人 */ |
||||
|
@Excel(name = "审核人") |
||||
|
private String reviewedPerson; |
||||
|
|
||||
|
/** 复核人 */ |
||||
|
@Excel(name = "复核人") |
||||
|
private String approvalPerson; |
||||
|
|
||||
|
public void setSupplierDeductionId(Long supplierDeductionId) |
||||
|
{ |
||||
|
this.supplierDeductionId = supplierDeductionId; |
||||
|
} |
||||
|
|
||||
|
public Long getSupplierDeductionId() |
||||
|
{ |
||||
|
return supplierDeductionId; |
||||
|
} |
||||
|
public void setSupplierCode(String supplierCode) |
||||
|
{ |
||||
|
this.supplierCode = supplierCode; |
||||
|
} |
||||
|
|
||||
|
public String getSupplierCode() |
||||
|
{ |
||||
|
return supplierCode; |
||||
|
} |
||||
|
public void setModeOfService(String modeOfService) |
||||
|
{ |
||||
|
this.modeOfService = modeOfService; |
||||
|
} |
||||
|
|
||||
|
public String getModeOfService() |
||||
|
{ |
||||
|
return modeOfService; |
||||
|
} |
||||
|
public void setAcceptanceDepartment(String acceptanceDepartment) |
||||
|
{ |
||||
|
this.acceptanceDepartment = acceptanceDepartment; |
||||
|
} |
||||
|
|
||||
|
public String getAcceptanceDepartment() |
||||
|
{ |
||||
|
return acceptanceDepartment; |
||||
|
} |
||||
|
public void setAcceptancePerson(String acceptancePerson) |
||||
|
{ |
||||
|
this.acceptancePerson = acceptancePerson; |
||||
|
} |
||||
|
|
||||
|
public String getAcceptancePerson() |
||||
|
{ |
||||
|
return acceptancePerson; |
||||
|
} |
||||
|
public void setContactNumber(String contactNumber) |
||||
|
{ |
||||
|
this.contactNumber = contactNumber; |
||||
|
} |
||||
|
|
||||
|
public String getContactNumber() |
||||
|
{ |
||||
|
return contactNumber; |
||||
|
} |
||||
|
public void setReason(String reason) |
||||
|
{ |
||||
|
this.reason = reason; |
||||
|
} |
||||
|
|
||||
|
public String getReason() |
||||
|
{ |
||||
|
return reason; |
||||
|
} |
||||
|
public void setReworkLaborCost(String reworkLaborCost) |
||||
|
{ |
||||
|
this.reworkLaborCost = reworkLaborCost; |
||||
|
} |
||||
|
|
||||
|
public String getReworkLaborCost() |
||||
|
{ |
||||
|
return reworkLaborCost; |
||||
|
} |
||||
|
public void setCustomerDeduction(String customerDeduction) |
||||
|
{ |
||||
|
this.customerDeduction = customerDeduction; |
||||
|
} |
||||
|
|
||||
|
public String getCustomerDeduction() |
||||
|
{ |
||||
|
return customerDeduction; |
||||
|
} |
||||
|
public void setPunitiveDamage(String punitiveDamage) |
||||
|
{ |
||||
|
this.punitiveDamage = punitiveDamage; |
||||
|
} |
||||
|
|
||||
|
public String getPunitiveDamage() |
||||
|
{ |
||||
|
return punitiveDamage; |
||||
|
} |
||||
|
public void setMaterialScrapCost(String materialScrapCost) |
||||
|
{ |
||||
|
this.materialScrapCost = materialScrapCost; |
||||
|
} |
||||
|
|
||||
|
public String getMaterialScrapCost() |
||||
|
{ |
||||
|
return materialScrapCost; |
||||
|
} |
||||
|
public void setTransportationExpenses(String transportationExpenses) |
||||
|
{ |
||||
|
this.transportationExpenses = transportationExpenses; |
||||
|
} |
||||
|
|
||||
|
public String getTransportationExpenses() |
||||
|
{ |
||||
|
return transportationExpenses; |
||||
|
} |
||||
|
public void setOtherName(String otherName) |
||||
|
{ |
||||
|
this.otherName = otherName; |
||||
|
} |
||||
|
|
||||
|
public String getOtherName() |
||||
|
{ |
||||
|
return otherName; |
||||
|
} |
||||
|
public void setOthersCost(String othersCost) |
||||
|
{ |
||||
|
this.othersCost = othersCost; |
||||
|
} |
||||
|
|
||||
|
public String getOthersCost() |
||||
|
{ |
||||
|
return othersCost; |
||||
|
} |
||||
|
public void setTotalAmount(String totalAmount) |
||||
|
{ |
||||
|
this.totalAmount = totalAmount; |
||||
|
} |
||||
|
|
||||
|
public String getTotalAmount() |
||||
|
{ |
||||
|
return totalAmount; |
||||
|
} |
||||
|
public void setProposePerson(String proposePerson) |
||||
|
{ |
||||
|
this.proposePerson = proposePerson; |
||||
|
} |
||||
|
|
||||
|
public String getProposePerson() |
||||
|
{ |
||||
|
return proposePerson; |
||||
|
} |
||||
|
public void setReviewedPerson(String reviewedPerson) |
||||
|
{ |
||||
|
this.reviewedPerson = reviewedPerson; |
||||
|
} |
||||
|
|
||||
|
public String getReviewedPerson() |
||||
|
{ |
||||
|
return reviewedPerson; |
||||
|
} |
||||
|
public void setApprovalPerson(String approvalPerson) |
||||
|
{ |
||||
|
this.approvalPerson = approvalPerson; |
||||
|
} |
||||
|
|
||||
|
public String getApprovalPerson() |
||||
|
{ |
||||
|
return approvalPerson; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
.append("supplierDeductionId", getSupplierDeductionId()) |
||||
|
.append("supplierCode", getSupplierCode()) |
||||
|
.append("modeOfService", getModeOfService()) |
||||
|
.append("acceptanceDepartment", getAcceptanceDepartment()) |
||||
|
.append("acceptancePerson", getAcceptancePerson()) |
||||
|
.append("contactNumber", getContactNumber()) |
||||
|
.append("reason", getReason()) |
||||
|
.append("reworkLaborCost", getReworkLaborCost()) |
||||
|
.append("customerDeduction", getCustomerDeduction()) |
||||
|
.append("punitiveDamage", getPunitiveDamage()) |
||||
|
.append("materialScrapCost", getMaterialScrapCost()) |
||||
|
.append("transportationExpenses", getTransportationExpenses()) |
||||
|
.append("otherName", getOtherName()) |
||||
|
.append("othersCost", getOthersCost()) |
||||
|
.append("totalAmount", getTotalAmount()) |
||||
|
.append("proposePerson", getProposePerson()) |
||||
|
.append("reviewedPerson", getReviewedPerson()) |
||||
|
.append("approvalPerson", getApprovalPerson()) |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,297 @@ |
|||||
|
package com.ruoyi.quality.domain.exportDto; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import com.alibaba.excel.annotation.write.style.ContentFontStyle; |
||||
|
import com.alibaba.excel.annotation.write.style.ContentStyle; |
||||
|
import com.alibaba.excel.enums.BooleanEnum; |
||||
|
import com.alibaba.excel.enums.poi.BorderStyleEnum; |
||||
|
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum; |
||||
|
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum; |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* qualitySupplierDeduction对象 quality_supplier_deduction |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
public class QualitySupplierDeductionDto extends BaseEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** */ |
||||
|
private Long supplierDeductionId; |
||||
|
|
||||
|
/** 供应商代码 */ |
||||
|
@ExcelProperty("供应商代码") |
||||
|
@ContentStyle(borderTop = BorderStyleEnum.THIN , borderBottom = BorderStyleEnum.THIN , horizontalAlignment = HorizontalAlignmentEnum.CENTER , verticalAlignment = VerticalAlignmentEnum.CENTER) |
||||
|
private String supplierCode; |
||||
|
|
||||
|
/** 送达方式 */ |
||||
|
@ExcelProperty("送达方式") |
||||
|
@ContentStyle(borderTop = BorderStyleEnum.THIN , borderBottom = BorderStyleEnum.THIN , horizontalAlignment = HorizontalAlignmentEnum.CENTER , verticalAlignment = VerticalAlignmentEnum.CENTER) |
||||
|
private String modeOfService; |
||||
|
|
||||
|
/** 受理部门 */ |
||||
|
@ExcelProperty("受理部门") |
||||
|
@ContentStyle(borderTop = BorderStyleEnum.THIN , borderBottom = BorderStyleEnum.THIN , horizontalAlignment = HorizontalAlignmentEnum.CENTER , verticalAlignment = VerticalAlignmentEnum.CENTER) |
||||
|
private String acceptanceDepartment; |
||||
|
|
||||
|
/** 受理人 */ |
||||
|
@ExcelProperty("受理人") |
||||
|
@ContentStyle(borderTop = BorderStyleEnum.THIN , borderBottom = BorderStyleEnum.THIN , horizontalAlignment = HorizontalAlignmentEnum.CENTER , verticalAlignment = VerticalAlignmentEnum.CENTER) |
||||
|
private String acceptancePerson; |
||||
|
|
||||
|
/** 联络方式 */ |
||||
|
@ExcelProperty("联络方式") |
||||
|
@ContentStyle(borderTop = BorderStyleEnum.THIN , borderBottom = BorderStyleEnum.THIN , horizontalAlignment = HorizontalAlignmentEnum.CENTER , verticalAlignment = VerticalAlignmentEnum.CENTER) |
||||
|
private String contactNumber; |
||||
|
|
||||
|
/** 索赔扣款详细原因 */ |
||||
|
@ExcelProperty("索赔扣款详细原因") |
||||
|
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.LEFT , verticalAlignment = VerticalAlignmentEnum.TOP , wrapped = BooleanEnum.TRUE) |
||||
|
private String reason; |
||||
|
|
||||
|
/** 返工工时费 */ |
||||
|
@ExcelProperty("返工工时费") |
||||
|
@ContentStyle(borderTop = BorderStyleEnum.THIN , borderBottom = BorderStyleEnum.THIN , horizontalAlignment = HorizontalAlignmentEnum.CENTER , verticalAlignment = VerticalAlignmentEnum.CENTER) |
||||
|
private String reworkLaborCost; |
||||
|
|
||||
|
/** 客户扣款 */ |
||||
|
@ExcelProperty("客户扣款") |
||||
|
@ContentStyle(borderTop = BorderStyleEnum.THIN , borderBottom = BorderStyleEnum.THIN , horizontalAlignment = HorizontalAlignmentEnum.CENTER , verticalAlignment = VerticalAlignmentEnum.CENTER) |
||||
|
private String customerDeduction; |
||||
|
|
||||
|
/** 惩罚性罚款 */ |
||||
|
@ExcelProperty("惩罚性罚款") |
||||
|
@ContentStyle(borderTop = BorderStyleEnum.THIN , borderBottom = BorderStyleEnum.THIN , horizontalAlignment = HorizontalAlignmentEnum.CENTER , verticalAlignment = VerticalAlignmentEnum.CENTER) |
||||
|
private String punitiveDamage; |
||||
|
|
||||
|
/** 物料报废费用 */ |
||||
|
@ExcelProperty("物料报废费用") |
||||
|
@ContentStyle(borderTop = BorderStyleEnum.THIN , borderBottom = BorderStyleEnum.THIN , horizontalAlignment = HorizontalAlignmentEnum.CENTER , verticalAlignment = VerticalAlignmentEnum.CENTER) |
||||
|
private String materialScrapCost; |
||||
|
|
||||
|
/** 交通/运输费 */ |
||||
|
@ExcelProperty("交通/运输费") |
||||
|
@ContentStyle(borderTop = BorderStyleEnum.THIN , borderBottom = BorderStyleEnum.THIN , horizontalAlignment = HorizontalAlignmentEnum.CENTER , verticalAlignment = VerticalAlignmentEnum.CENTER) |
||||
|
private String transportationExpenses; |
||||
|
|
||||
|
/** 其他名字 */ |
||||
|
@ExcelProperty("其他名字") |
||||
|
@ContentFontStyle(fontName="等线") |
||||
|
private String otherName; |
||||
|
|
||||
|
/** 其他金额 */ |
||||
|
@ExcelProperty("其他金额") |
||||
|
@ContentStyle(borderTop = BorderStyleEnum.THIN , borderBottom = BorderStyleEnum.THIN , horizontalAlignment = HorizontalAlignmentEnum.CENTER , verticalAlignment = VerticalAlignmentEnum.CENTER) |
||||
|
private String othersCost; |
||||
|
|
||||
|
/** 合计金额 */ |
||||
|
@ExcelProperty("合计金额") |
||||
|
@ContentStyle(borderTop = BorderStyleEnum.THIN , borderBottom = BorderStyleEnum.THIN , horizontalAlignment = HorizontalAlignmentEnum.CENTER , verticalAlignment = VerticalAlignmentEnum.CENTER) |
||||
|
private String totalAmount; |
||||
|
|
||||
|
/** 提出人 */ |
||||
|
@ExcelProperty("提出人") |
||||
|
private String proposePerson; |
||||
|
|
||||
|
/** 审核人 */ |
||||
|
@ExcelProperty("审核人") |
||||
|
private String reviewedPerson; |
||||
|
|
||||
|
/** 复核人 */ |
||||
|
@ExcelProperty("复核人") |
||||
|
@ContentStyle(borderRight = BorderStyleEnum.THIN) |
||||
|
private String approvalPerson; |
||||
|
|
||||
|
public void setSupplierDeductionId(Long supplierDeductionId) |
||||
|
{ |
||||
|
this.supplierDeductionId = supplierDeductionId; |
||||
|
} |
||||
|
|
||||
|
public Long getSupplierDeductionId() |
||||
|
{ |
||||
|
return supplierDeductionId; |
||||
|
} |
||||
|
public void setSupplierCode(String supplierCode) |
||||
|
{ |
||||
|
this.supplierCode = supplierCode; |
||||
|
} |
||||
|
|
||||
|
public String getSupplierCode() |
||||
|
{ |
||||
|
return supplierCode; |
||||
|
} |
||||
|
public void setModeOfService(String modeOfService) |
||||
|
{ |
||||
|
this.modeOfService = modeOfService; |
||||
|
} |
||||
|
|
||||
|
public String getModeOfService() |
||||
|
{ |
||||
|
return modeOfService; |
||||
|
} |
||||
|
public void setAcceptanceDepartment(String acceptanceDepartment) |
||||
|
{ |
||||
|
this.acceptanceDepartment = acceptanceDepartment; |
||||
|
} |
||||
|
|
||||
|
public String getAcceptanceDepartment() |
||||
|
{ |
||||
|
return acceptanceDepartment; |
||||
|
} |
||||
|
public void setAcceptancePerson(String acceptancePerson) |
||||
|
{ |
||||
|
this.acceptancePerson = acceptancePerson; |
||||
|
} |
||||
|
|
||||
|
public String getAcceptancePerson() |
||||
|
{ |
||||
|
return acceptancePerson; |
||||
|
} |
||||
|
public void setContactNumber(String contactNumber) |
||||
|
{ |
||||
|
this.contactNumber = contactNumber; |
||||
|
} |
||||
|
|
||||
|
public String getContactNumber() |
||||
|
{ |
||||
|
return contactNumber; |
||||
|
} |
||||
|
public void setReason(String reason) |
||||
|
{ |
||||
|
this.reason = reason; |
||||
|
} |
||||
|
|
||||
|
public String getReason() |
||||
|
{ |
||||
|
return reason; |
||||
|
} |
||||
|
public void setReworkLaborCost(String reworkLaborCost) |
||||
|
{ |
||||
|
this.reworkLaborCost = reworkLaborCost; |
||||
|
} |
||||
|
|
||||
|
public String getReworkLaborCost() |
||||
|
{ |
||||
|
return reworkLaborCost; |
||||
|
} |
||||
|
public void setCustomerDeduction(String customerDeduction) |
||||
|
{ |
||||
|
this.customerDeduction = customerDeduction; |
||||
|
} |
||||
|
|
||||
|
public String getCustomerDeduction() |
||||
|
{ |
||||
|
return customerDeduction; |
||||
|
} |
||||
|
public void setPunitiveDamage(String punitiveDamage) |
||||
|
{ |
||||
|
this.punitiveDamage = punitiveDamage; |
||||
|
} |
||||
|
|
||||
|
public String getPunitiveDamage() |
||||
|
{ |
||||
|
return punitiveDamage; |
||||
|
} |
||||
|
public void setMaterialScrapCost(String materialScrapCost) |
||||
|
{ |
||||
|
this.materialScrapCost = materialScrapCost; |
||||
|
} |
||||
|
|
||||
|
public String getMaterialScrapCost() |
||||
|
{ |
||||
|
return materialScrapCost; |
||||
|
} |
||||
|
public void setTransportationExpenses(String transportationExpenses) |
||||
|
{ |
||||
|
this.transportationExpenses = transportationExpenses; |
||||
|
} |
||||
|
|
||||
|
public String getTransportationExpenses() |
||||
|
{ |
||||
|
return transportationExpenses; |
||||
|
} |
||||
|
public void setOtherName(String otherName) |
||||
|
{ |
||||
|
this.otherName = otherName; |
||||
|
} |
||||
|
|
||||
|
public String getOtherName() |
||||
|
{ |
||||
|
return otherName; |
||||
|
} |
||||
|
public void setOthersCost(String othersCost) |
||||
|
{ |
||||
|
this.othersCost = othersCost; |
||||
|
} |
||||
|
|
||||
|
public String getOthersCost() |
||||
|
{ |
||||
|
return othersCost; |
||||
|
} |
||||
|
public void setTotalAmount(String totalAmount) |
||||
|
{ |
||||
|
this.totalAmount = totalAmount; |
||||
|
} |
||||
|
|
||||
|
public String getTotalAmount() |
||||
|
{ |
||||
|
return totalAmount; |
||||
|
} |
||||
|
public void setProposePerson(String proposePerson) |
||||
|
{ |
||||
|
this.proposePerson = proposePerson; |
||||
|
} |
||||
|
|
||||
|
public String getProposePerson() |
||||
|
{ |
||||
|
return proposePerson; |
||||
|
} |
||||
|
public void setReviewedPerson(String reviewedPerson) |
||||
|
{ |
||||
|
this.reviewedPerson = reviewedPerson; |
||||
|
} |
||||
|
|
||||
|
public String getReviewedPerson() |
||||
|
{ |
||||
|
return reviewedPerson; |
||||
|
} |
||||
|
public void setApprovalPerson(String approvalPerson) |
||||
|
{ |
||||
|
this.approvalPerson = approvalPerson; |
||||
|
} |
||||
|
|
||||
|
public String getApprovalPerson() |
||||
|
{ |
||||
|
return approvalPerson; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
.append("supplierDeductionId", getSupplierDeductionId()) |
||||
|
.append("supplierCode", getSupplierCode()) |
||||
|
.append("modeOfService", getModeOfService()) |
||||
|
.append("acceptanceDepartment", getAcceptanceDepartment()) |
||||
|
.append("acceptancePerson", getAcceptancePerson()) |
||||
|
.append("contactNumber", getContactNumber()) |
||||
|
.append("reason", getReason()) |
||||
|
.append("reworkLaborCost", getReworkLaborCost()) |
||||
|
.append("customerDeduction", getCustomerDeduction()) |
||||
|
.append("punitiveDamage", getPunitiveDamage()) |
||||
|
.append("materialScrapCost", getMaterialScrapCost()) |
||||
|
.append("transportationExpenses", getTransportationExpenses()) |
||||
|
.append("otherName", getOtherName()) |
||||
|
.append("othersCost", getOthersCost()) |
||||
|
.append("totalAmount", getTotalAmount()) |
||||
|
.append("proposePerson", getProposePerson()) |
||||
|
.append("reviewedPerson", getReviewedPerson()) |
||||
|
.append("approvalPerson", getApprovalPerson()) |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,61 @@ |
|||||
|
package com.ruoyi.quality.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.ruoyi.quality.domain.QualitySupplierDeduction; |
||||
|
|
||||
|
/** |
||||
|
* qualitySupplierDeductionMapper接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
public interface QualitySupplierDeductionMapper |
||||
|
{ |
||||
|
/** |
||||
|
* 查询qualitySupplierDeduction |
||||
|
* |
||||
|
* @param supplierDeductionId qualitySupplierDeductionID |
||||
|
* @return qualitySupplierDeduction |
||||
|
*/ |
||||
|
public QualitySupplierDeduction selectQualitySupplierDeductionById(Long supplierDeductionId); |
||||
|
|
||||
|
/** |
||||
|
* 查询qualitySupplierDeduction列表 |
||||
|
* |
||||
|
* @param qualitySupplierDeduction qualitySupplierDeduction |
||||
|
* @return qualitySupplierDeduction集合 |
||||
|
*/ |
||||
|
public List<QualitySupplierDeduction> selectQualitySupplierDeductionList(QualitySupplierDeduction qualitySupplierDeduction); |
||||
|
|
||||
|
/** |
||||
|
* 新增qualitySupplierDeduction |
||||
|
* |
||||
|
* @param qualitySupplierDeduction qualitySupplierDeduction |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertQualitySupplierDeduction(QualitySupplierDeduction qualitySupplierDeduction); |
||||
|
|
||||
|
/** |
||||
|
* 修改qualitySupplierDeduction |
||||
|
* |
||||
|
* @param qualitySupplierDeduction qualitySupplierDeduction |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateQualitySupplierDeduction(QualitySupplierDeduction qualitySupplierDeduction); |
||||
|
|
||||
|
/** |
||||
|
* 删除qualitySupplierDeduction |
||||
|
* |
||||
|
* @param supplierDeductionId qualitySupplierDeductionID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteQualitySupplierDeductionById(Long supplierDeductionId); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除qualitySupplierDeduction |
||||
|
* |
||||
|
* @param supplierDeductionIds 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteQualitySupplierDeductionByIds(String[] supplierDeductionIds); |
||||
|
} |
@ -0,0 +1,61 @@ |
|||||
|
package com.ruoyi.quality.service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.ruoyi.quality.domain.QualitySupplierDeduction; |
||||
|
|
||||
|
/** |
||||
|
* qualitySupplierDeductionService接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
public interface IQualitySupplierDeductionService |
||||
|
{ |
||||
|
/** |
||||
|
* 查询qualitySupplierDeduction |
||||
|
* |
||||
|
* @param supplierDeductionId qualitySupplierDeductionID |
||||
|
* @return qualitySupplierDeduction |
||||
|
*/ |
||||
|
public QualitySupplierDeduction selectQualitySupplierDeductionById(Long supplierDeductionId); |
||||
|
|
||||
|
/** |
||||
|
* 查询qualitySupplierDeduction列表 |
||||
|
* |
||||
|
* @param qualitySupplierDeduction qualitySupplierDeduction |
||||
|
* @return qualitySupplierDeduction集合 |
||||
|
*/ |
||||
|
public List<QualitySupplierDeduction> selectQualitySupplierDeductionList(QualitySupplierDeduction qualitySupplierDeduction); |
||||
|
|
||||
|
/** |
||||
|
* 新增qualitySupplierDeduction |
||||
|
* |
||||
|
* @param qualitySupplierDeduction qualitySupplierDeduction |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertQualitySupplierDeduction(QualitySupplierDeduction qualitySupplierDeduction); |
||||
|
|
||||
|
/** |
||||
|
* 修改qualitySupplierDeduction |
||||
|
* |
||||
|
* @param qualitySupplierDeduction qualitySupplierDeduction |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateQualitySupplierDeduction(QualitySupplierDeduction qualitySupplierDeduction); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除qualitySupplierDeduction |
||||
|
* |
||||
|
* @param ids 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteQualitySupplierDeductionByIds(String ids); |
||||
|
|
||||
|
/** |
||||
|
* 删除qualitySupplierDeduction信息 |
||||
|
* |
||||
|
* @param supplierDeductionId qualitySupplierDeductionID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteQualitySupplierDeductionById(Long supplierDeductionId); |
||||
|
} |
@ -0,0 +1,94 @@ |
|||||
|
package com.ruoyi.quality.service.impl; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.ruoyi.quality.mapper.QualitySupplierDeductionMapper; |
||||
|
import com.ruoyi.quality.domain.QualitySupplierDeduction; |
||||
|
import com.ruoyi.quality.service.IQualitySupplierDeductionService; |
||||
|
import com.ruoyi.common.core.text.Convert; |
||||
|
|
||||
|
/** |
||||
|
* qualitySupplierDeductionService业务层处理 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class QualitySupplierDeductionServiceImpl implements IQualitySupplierDeductionService |
||||
|
{ |
||||
|
@Autowired |
||||
|
private QualitySupplierDeductionMapper qualitySupplierDeductionMapper; |
||||
|
|
||||
|
/** |
||||
|
* 查询qualitySupplierDeduction |
||||
|
* |
||||
|
* @param supplierDeductionId qualitySupplierDeductionID |
||||
|
* @return qualitySupplierDeduction |
||||
|
*/ |
||||
|
@Override |
||||
|
public QualitySupplierDeduction selectQualitySupplierDeductionById(Long supplierDeductionId) |
||||
|
{ |
||||
|
return qualitySupplierDeductionMapper.selectQualitySupplierDeductionById(supplierDeductionId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询qualitySupplierDeduction列表 |
||||
|
* |
||||
|
* @param qualitySupplierDeduction qualitySupplierDeduction |
||||
|
* @return qualitySupplierDeduction |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<QualitySupplierDeduction> selectQualitySupplierDeductionList(QualitySupplierDeduction qualitySupplierDeduction) |
||||
|
{ |
||||
|
return qualitySupplierDeductionMapper.selectQualitySupplierDeductionList(qualitySupplierDeduction); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增qualitySupplierDeduction |
||||
|
* |
||||
|
* @param qualitySupplierDeduction qualitySupplierDeduction |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int insertQualitySupplierDeduction(QualitySupplierDeduction qualitySupplierDeduction) |
||||
|
{ |
||||
|
return qualitySupplierDeductionMapper.insertQualitySupplierDeduction(qualitySupplierDeduction); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改qualitySupplierDeduction |
||||
|
* |
||||
|
* @param qualitySupplierDeduction qualitySupplierDeduction |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int updateQualitySupplierDeduction(QualitySupplierDeduction qualitySupplierDeduction) |
||||
|
{ |
||||
|
return qualitySupplierDeductionMapper.updateQualitySupplierDeduction(qualitySupplierDeduction); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除qualitySupplierDeduction对象 |
||||
|
* |
||||
|
* @param ids 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteQualitySupplierDeductionByIds(String ids) |
||||
|
{ |
||||
|
return qualitySupplierDeductionMapper.deleteQualitySupplierDeductionByIds(Convert.toStrArray(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除qualitySupplierDeduction信息 |
||||
|
* |
||||
|
* @param supplierDeductionId qualitySupplierDeductionID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteQualitySupplierDeductionById(Long supplierDeductionId) |
||||
|
{ |
||||
|
return qualitySupplierDeductionMapper.deleteQualitySupplierDeductionById(supplierDeductionId); |
||||
|
} |
||||
|
} |
@ -0,0 +1,138 @@ |
|||||
|
<?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.quality.mapper.QualitySupplierDeductionMapper"> |
||||
|
<resultMap type="QualitySupplierDeduction" id="QualitySupplierDeductionResult"> |
||||
|
<result property="supplierDeductionId" column="supplier_deduction_id" /> |
||||
|
<result property="supplierCode" column="supplier_code" /> |
||||
|
<result property="modeOfService" column="mode_of_service" /> |
||||
|
<result property="acceptanceDepartment" column="acceptance_department" /> |
||||
|
<result property="acceptancePerson" column="acceptance_person" /> |
||||
|
<result property="contactNumber" column="contact_number" /> |
||||
|
<result property="reason" column="reason" /> |
||||
|
<result property="reworkLaborCost" column="rework_labor_cost" /> |
||||
|
<result property="customerDeduction" column="customer_deduction" /> |
||||
|
<result property="punitiveDamage" column="punitive_damage" /> |
||||
|
<result property="materialScrapCost" column="material_scrap_cost" /> |
||||
|
<result property="transportationExpenses" column="transportation_expenses" /> |
||||
|
<result property="otherName" column="other_name" /> |
||||
|
<result property="othersCost" column="others_cost" /> |
||||
|
<result property="totalAmount" column="total_amount" /> |
||||
|
<result property="proposePerson" column="propose_person" /> |
||||
|
<result property="reviewedPerson" column="reviewed_person" /> |
||||
|
<result property="approvalPerson" column="approval_person" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectQualitySupplierDeductionVo"> |
||||
|
select supplier_deduction_id, supplier_code, mode_of_service, acceptance_department, acceptance_person, contact_number, reason, rework_labor_cost, customer_deduction, punitive_damage, material_scrap_cost, transportation_expenses, other_name, others_cost, total_amount, propose_person, reviewed_person, approval_person from quality_supplier_deduction |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectQualitySupplierDeductionList" parameterType="QualitySupplierDeduction" resultMap="QualitySupplierDeductionResult"> |
||||
|
<include refid="selectQualitySupplierDeductionVo"/> |
||||
|
<where> |
||||
|
<if test="supplierCode != null and supplierCode != ''"> and supplier_code = #{supplierCode}</if> |
||||
|
<if test="modeOfService != null and modeOfService != ''"> and mode_of_service = #{modeOfService}</if> |
||||
|
<if test="acceptanceDepartment != null and acceptanceDepartment != ''"> and acceptance_department = #{acceptanceDepartment}</if> |
||||
|
<if test="acceptancePerson != null and acceptancePerson != ''"> and acceptance_person = #{acceptancePerson}</if> |
||||
|
<if test="contactNumber != null and contactNumber != ''"> and contact_number = #{contactNumber}</if> |
||||
|
<if test="reason != null and reason != ''"> and reason = #{reason}</if> |
||||
|
<if test="reworkLaborCost != null and reworkLaborCost != ''"> and rework_labor_cost = #{reworkLaborCost}</if> |
||||
|
<if test="customerDeduction != null and customerDeduction != ''"> and customer_deduction = #{customerDeduction}</if> |
||||
|
<if test="punitiveDamage != null and punitiveDamage != ''"> and punitive_damage = #{punitiveDamage}</if> |
||||
|
<if test="materialScrapCost != null and materialScrapCost != ''"> and material_scrap_cost = #{materialScrapCost}</if> |
||||
|
<if test="transportationExpenses != null and transportationExpenses != ''"> and transportation_expenses = #{transportationExpenses}</if> |
||||
|
<if test="otherName != null and otherName != ''"> and other_name like concat('%', #{otherName}, '%')</if> |
||||
|
<if test="othersCost != null and othersCost != ''"> and others_cost = #{othersCost}</if> |
||||
|
<if test="totalAmount != null and totalAmount != ''"> and total_amount = #{totalAmount}</if> |
||||
|
<if test="proposePerson != null and proposePerson != ''"> and propose_person = #{proposePerson}</if> |
||||
|
<if test="reviewedPerson != null and reviewedPerson != ''"> and reviewed_person = #{reviewedPerson}</if> |
||||
|
<if test="approvalPerson != null and approvalPerson != ''"> and approval_person = #{approvalPerson}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectQualitySupplierDeductionById" parameterType="Long" resultMap="QualitySupplierDeductionResult"> |
||||
|
<include refid="selectQualitySupplierDeductionVo"/> |
||||
|
where supplier_deduction_id = #{supplierDeductionId} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertQualitySupplierDeduction" parameterType="QualitySupplierDeduction"> |
||||
|
insert into quality_supplier_deduction |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="supplierDeductionId != null">supplier_deduction_id,</if> |
||||
|
<if test="supplierCode != null">supplier_code,</if> |
||||
|
<if test="modeOfService != null">mode_of_service,</if> |
||||
|
<if test="acceptanceDepartment != null">acceptance_department,</if> |
||||
|
<if test="acceptancePerson != null">acceptance_person,</if> |
||||
|
<if test="contactNumber != null">contact_number,</if> |
||||
|
<if test="reason != null">reason,</if> |
||||
|
<if test="reworkLaborCost != null">rework_labor_cost,</if> |
||||
|
<if test="customerDeduction != null">customer_deduction,</if> |
||||
|
<if test="punitiveDamage != null">punitive_damage,</if> |
||||
|
<if test="materialScrapCost != null">material_scrap_cost,</if> |
||||
|
<if test="transportationExpenses != null">transportation_expenses,</if> |
||||
|
<if test="otherName != null">other_name,</if> |
||||
|
<if test="othersCost != null">others_cost,</if> |
||||
|
<if test="totalAmount != null">total_amount,</if> |
||||
|
<if test="proposePerson != null">propose_person,</if> |
||||
|
<if test="reviewedPerson != null">reviewed_person,</if> |
||||
|
<if test="approvalPerson != null">approval_person,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="supplierDeductionId != null">#{supplierDeductionId},</if> |
||||
|
<if test="supplierCode != null">#{supplierCode},</if> |
||||
|
<if test="modeOfService != null">#{modeOfService},</if> |
||||
|
<if test="acceptanceDepartment != null">#{acceptanceDepartment},</if> |
||||
|
<if test="acceptancePerson != null">#{acceptancePerson},</if> |
||||
|
<if test="contactNumber != null">#{contactNumber},</if> |
||||
|
<if test="reason != null">#{reason},</if> |
||||
|
<if test="reworkLaborCost != null">#{reworkLaborCost},</if> |
||||
|
<if test="customerDeduction != null">#{customerDeduction},</if> |
||||
|
<if test="punitiveDamage != null">#{punitiveDamage},</if> |
||||
|
<if test="materialScrapCost != null">#{materialScrapCost},</if> |
||||
|
<if test="transportationExpenses != null">#{transportationExpenses},</if> |
||||
|
<if test="otherName != null">#{otherName},</if> |
||||
|
<if test="othersCost != null">#{othersCost},</if> |
||||
|
<if test="totalAmount != null">#{totalAmount},</if> |
||||
|
<if test="proposePerson != null">#{proposePerson},</if> |
||||
|
<if test="reviewedPerson != null">#{reviewedPerson},</if> |
||||
|
<if test="approvalPerson != null">#{approvalPerson},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateQualitySupplierDeduction" parameterType="QualitySupplierDeduction"> |
||||
|
update quality_supplier_deduction |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="supplierCode != null">supplier_code = #{supplierCode},</if> |
||||
|
<if test="modeOfService != null">mode_of_service = #{modeOfService},</if> |
||||
|
<if test="acceptanceDepartment != null">acceptance_department = #{acceptanceDepartment},</if> |
||||
|
<if test="acceptancePerson != null">acceptance_person = #{acceptancePerson},</if> |
||||
|
<if test="contactNumber != null">contact_number = #{contactNumber},</if> |
||||
|
<if test="reason != null">reason = #{reason},</if> |
||||
|
<if test="reworkLaborCost != null">rework_labor_cost = #{reworkLaborCost},</if> |
||||
|
<if test="customerDeduction != null">customer_deduction = #{customerDeduction},</if> |
||||
|
<if test="punitiveDamage != null">punitive_damage = #{punitiveDamage},</if> |
||||
|
<if test="materialScrapCost != null">material_scrap_cost = #{materialScrapCost},</if> |
||||
|
<if test="transportationExpenses != null">transportation_expenses = #{transportationExpenses},</if> |
||||
|
<if test="otherName != null">other_name = #{otherName},</if> |
||||
|
<if test="othersCost != null">others_cost = #{othersCost},</if> |
||||
|
<if test="totalAmount != null">total_amount = #{totalAmount},</if> |
||||
|
<if test="proposePerson != null">propose_person = #{proposePerson},</if> |
||||
|
<if test="reviewedPerson != null">reviewed_person = #{reviewedPerson},</if> |
||||
|
<if test="approvalPerson != null">approval_person = #{approvalPerson},</if> |
||||
|
</trim> |
||||
|
where supplier_deduction_id = #{supplierDeductionId} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteQualitySupplierDeductionById" parameterType="Long"> |
||||
|
delete from quality_supplier_deduction where supplier_deduction_id = #{supplierDeductionId} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteQualitySupplierDeductionByIds" parameterType="String"> |
||||
|
delete from quality_supplier_deduction where supplier_deduction_id in |
||||
|
<foreach item="supplierDeductionId" collection="array" open="(" separator="," close=")"> |
||||
|
#{supplierDeductionId} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,184 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
||||
|
<head> |
||||
|
<th:block th:include="include :: header('新增qualitySupplierDeduction')" /> |
||||
|
<th:block th:include="include :: datetimepicker-css" /> |
||||
|
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
||||
|
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
||||
|
<th:block th:include="include :: bootstrap-editable-css"/> |
||||
|
<style> |
||||
|
.other-container { |
||||
|
width: 90%; |
||||
|
height: 200px; |
||||
|
margin: auto; |
||||
|
} |
||||
|
.other { |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
h4 { |
||||
|
display: inline-block; |
||||
|
margin-right: 20px; |
||||
|
} |
||||
|
.modal-body{ |
||||
|
height: 550px; |
||||
|
} |
||||
|
iframe{ |
||||
|
width: 100%; |
||||
|
height: 500px; |
||||
|
frameborder: 0; |
||||
|
border: 0; |
||||
|
display: inline-block; |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-qualitySupplierDeduction-add"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">供应商代码:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select name="supplierCode" class="form-control m-b"> |
||||
|
<option value="">所有</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">送达方式:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="modeOfService" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">受理部门:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="acceptanceDepartment" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">受理人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="acceptancePerson" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">联络方式:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="contactNumber" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">返工工时费:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="reworkLaborCost" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">客户扣款:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="customerDeduction" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">惩罚性罚款:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="punitiveDamage" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">物料报废费用:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="materialScrapCost" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">交通/运输费:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="transportationExpenses" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">其他名字:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="otherName" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">其他金额:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="othersCost" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">合计金额:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="totalAmount" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">提出人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="proposePerson" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">审核人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="reviewedPerson" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">复核人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="approvalPerson" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">索赔扣款详细原因:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<textarea name="reason" class="form-control"></textarea> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<th:block th:include="include :: select2-js"/> |
||||
|
<th:block th:include="include :: bootstrap-table-editable-js"/> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "quality/qualitySupplierDeduction" |
||||
|
var prefixSupplier = ctx + "system/supplier" |
||||
|
|
||||
|
$("#form-qualitySupplierDeduction-add").validate({ |
||||
|
focusCleanup: true |
||||
|
}); |
||||
|
|
||||
|
function submitHandler() { |
||||
|
if ($.validate.form()) { |
||||
|
$.operate.save(prefix + "/add", $('#form-qualitySupplierDeduction-add').serialize()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//获取供应商代码 |
||||
|
$.ajax({ |
||||
|
url: prefixSupplier + "/list", |
||||
|
type: "post", |
||||
|
dateType: "json", |
||||
|
success: function (res) { |
||||
|
console.log(res) |
||||
|
if (res.rows.length > 0) { |
||||
|
var orderData = res.rows; |
||||
|
for (let i in orderData) { |
||||
|
$("#form-qualitySupplierDeduction-add select[name='supplierCode']").append("<option value='" + orderData[i].supplierCode + "'>" + orderData[i].supplierCode + "</option>"); |
||||
|
} |
||||
|
} else { |
||||
|
$.modal.msgError(res.msg); |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
$.modal.msgError("后台出错啦!"); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,184 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
||||
|
<head> |
||||
|
<th:block th:include="include :: header('修改qualitySupplierDeduction')" /> |
||||
|
<th:block th:include="include :: datetimepicker-css" /> |
||||
|
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
||||
|
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
||||
|
<th:block th:include="include :: bootstrap-editable-css"/> |
||||
|
<style> |
||||
|
.other-container { |
||||
|
width: 90%; |
||||
|
height: 200px; |
||||
|
margin: auto; |
||||
|
} |
||||
|
.other { |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
h4 { |
||||
|
display: inline-block; |
||||
|
margin-right: 20px; |
||||
|
} |
||||
|
.modal-body{ |
||||
|
height: 550px; |
||||
|
} |
||||
|
iframe{ |
||||
|
width: 100%; |
||||
|
height: 500px; |
||||
|
frameborder: 0; |
||||
|
border: 0; |
||||
|
display: inline-block; |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-qualitySupplierDeduction-edit" th:object="${qualitySupplierDeduction}"> |
||||
|
<input name="supplierDeductionId" th:field="*{supplierDeductionId}" type="hidden"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">供应商代码:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select name="supplierCode" class="form-control m-b" th:field="*{supplierCode}"> |
||||
|
<option value=""></option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">送达方式:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="modeOfService" th:field="*{modeOfService}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">受理部门:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="acceptanceDepartment" th:field="*{acceptanceDepartment}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">受理人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="acceptancePerson" th:field="*{acceptancePerson}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">联络方式:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">返工工时费:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="reworkLaborCost" th:field="*{reworkLaborCost}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">客户扣款:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="customerDeduction" th:field="*{customerDeduction}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">惩罚性罚款:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="punitiveDamage" th:field="*{punitiveDamage}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">物料报废费用:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="materialScrapCost" th:field="*{materialScrapCost}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">交通/运输费:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="transportationExpenses" th:field="*{transportationExpenses}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">其他名字:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="otherName" th:field="*{otherName}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">其他金额:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="othersCost" th:field="*{othersCost}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">合计金额:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="totalAmount" th:field="*{totalAmount}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">提出人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="proposePerson" th:field="*{proposePerson}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">审核人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="reviewedPerson" th:field="*{reviewedPerson}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">复核人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="approvalPerson" th:field="*{approvalPerson}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">索赔扣款详细原因:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<textarea name="reason" class="form-control">[[*{reason}]]</textarea> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<th:block th:include="include :: select2-js"/> |
||||
|
<th:block th:include="include :: bootstrap-table-editable-js"/> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "quality/qualitySupplierDeduction"; |
||||
|
var prefixSupplier = ctx + "system/supplier" |
||||
|
$("#form-qualitySupplierDeduction-edit").validate({ |
||||
|
focusCleanup: true |
||||
|
}); |
||||
|
|
||||
|
function submitHandler() { |
||||
|
if ($.validate.form()) { |
||||
|
$.operate.save(prefix + "/edit", $('#form-qualitySupplierDeduction-edit').serialize()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//获取供应商代码 |
||||
|
$.ajax({ |
||||
|
url: prefixSupplier + "/list", |
||||
|
type: "post", |
||||
|
dateType: "json", |
||||
|
success: function (res) { |
||||
|
if (res.rows.length > 0) { |
||||
|
var orderData = res.rows; |
||||
|
for(let i in orderData){ |
||||
|
$("#form-qualitySupplierDeduction-edit select[name='supplierCode']").append("<option value='" + orderData[i].supplierCode + "'>" + orderData[i].supplierCode + "</option>"); |
||||
|
} |
||||
|
$("#form-qualitySupplierDeduction-edit select[name='supplierCode']").val(getData.supplierCode).trigger("supplierCode") |
||||
|
} else { |
||||
|
$.modal.msgError(res.msg); |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
$.modal.msgError("后台出错啦!"); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,217 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
||||
|
<head> |
||||
|
<th:block th:include="include :: header('qualitySupplierDeduction列表')" /> |
||||
|
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script> |
||||
|
</head> |
||||
|
<body class="gray-bg"> |
||||
|
<div class="container-div"> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 search-collapse"> |
||||
|
<form id="formId"> |
||||
|
<div class="select-list"> |
||||
|
<ul> |
||||
|
<li> |
||||
|
<label>供应商代码:</label> |
||||
|
<select name="supplierCode"> |
||||
|
<option value="">所有</option> |
||||
|
</select> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>受理部门:</label> |
||||
|
<input type="text" name="acceptanceDepartment"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>受理人:</label> |
||||
|
<input type="text" name="acceptancePerson"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
|
||||
|
<div class="btn-group-sm" id="toolbar" role="group"> |
||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="quality:qualitySupplierDeduction:add"> |
||||
|
<i class="fa fa-plus"></i> 添加 |
||||
|
</a> |
||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="quality:qualitySupplierDeduction:edit"> |
||||
|
<i class="fa fa-edit"></i> 修改 |
||||
|
</a> |
||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="quality:qualitySupplierDeduction:remove"> |
||||
|
<i class="fa fa-remove"></i> 删除 |
||||
|
</a> |
||||
|
<a class="btn btn-warning" onclick="exportSelectedRaw()" shiro:hasPermission="quality:qualitySupplierDeduction:export"> |
||||
|
<i class="fa fa-download"></i> 导出 |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="bootstrap-table" style="white-space: nowrap"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var editFlag = [[${@permission.hasPermi('quality:qualitySupplierDeduction:edit')}]]; |
||||
|
var removeFlag = [[${@permission.hasPermi('quality:qualitySupplierDeduction:remove')}]]; |
||||
|
var prefix = ctx + "quality/qualitySupplierDeduction"; |
||||
|
var prefixSupplier = ctx + "system/supplier" |
||||
|
|
||||
|
$(function() { |
||||
|
var options = { |
||||
|
url: prefix + "/list", |
||||
|
createUrl: prefix + "/add", |
||||
|
updateUrl: prefix + "/edit/{id}", |
||||
|
removeUrl: prefix + "/remove", |
||||
|
exportUrl: prefix + "/export", |
||||
|
modalName: "qualitySupplierDeduction", |
||||
|
columns: [{ |
||||
|
checkbox: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'supplierDeductionId', |
||||
|
title: '', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'supplierCode', |
||||
|
title: '供应商代码' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'modeOfService', |
||||
|
title: '送达方式' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'acceptanceDepartment', |
||||
|
title: '受理部门' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'acceptancePerson', |
||||
|
title: '受理人' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'contactNumber', |
||||
|
title: '联络方式' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'reason', |
||||
|
title: '索赔扣款详细原因' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'reworkLaborCost', |
||||
|
title: '返工工时费' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'customerDeduction', |
||||
|
title: '客户扣款' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'punitiveDamage', |
||||
|
title: '惩罚性罚款' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialScrapCost', |
||||
|
title: '物料报废费用' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'transportationExpenses', |
||||
|
title: '交通/运输费' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'otherName', |
||||
|
title: '其他名字' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'othersCost', |
||||
|
title: '其他金额' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'totalAmount', |
||||
|
title: '合计金额' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'proposePerson', |
||||
|
title: '提出人' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'reviewedPerson', |
||||
|
title: '审核人' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'approvalPerson', |
||||
|
title: '复核人' |
||||
|
}, |
||||
|
{ |
||||
|
title: '操作', |
||||
|
align: 'center', |
||||
|
formatter: function(value, row, index) { |
||||
|
var actions = []; |
||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.supplierDeductionId + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.supplierDeductionId + '\')"><i class="fa fa-remove"></i>删除</a>'); |
||||
|
return actions.join(''); |
||||
|
} |
||||
|
}] |
||||
|
}; |
||||
|
$.table.init(options); |
||||
|
}); |
||||
|
|
||||
|
//获取供应商代码 |
||||
|
$.ajax({ |
||||
|
url: prefixSupplier + "/list", |
||||
|
type: "post", |
||||
|
dateType: "json", |
||||
|
success: function (res) { |
||||
|
console.log(res) |
||||
|
if (res.rows.length > 0) { |
||||
|
var orderData = res.rows; |
||||
|
for (let i in orderData) { |
||||
|
$("#formId select[name='supplierCode']").append("<option value='" + orderData[i].supplierCode + "'>" + orderData[i].supplierCode + "</option>"); |
||||
|
} |
||||
|
} else { |
||||
|
$.modal.msgError(res.msg); |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
$.modal.msgError("后台出错啦!"); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
//导出 |
||||
|
function exportSelectedRaw() { |
||||
|
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); |
||||
|
var data = $("#bootstrap-table").bootstrapTable("getSelections") |
||||
|
if (rows.length !== 1) { |
||||
|
$.modal.alert("请选择一条记录"); |
||||
|
return; |
||||
|
} else { |
||||
|
$.modal.confirm("是否确认要导出本条出库单?", function (){ |
||||
|
axios({ |
||||
|
url: prefix + '/export/'+data[0].supplierDeductionId, |
||||
|
method: 'POST', |
||||
|
responseType: 'blob' |
||||
|
}).then(response => { |
||||
|
// console.log(response) |
||||
|
const URL = window.URL.createObjectURL(response.data) |
||||
|
// 创建隐藏<a>标签进行下载 |
||||
|
const tempLink = document.createElement('a') |
||||
|
tempLink.style.display = 'none' |
||||
|
tempLink.href = URL |
||||
|
let time = new Date().toLocaleString() |
||||
|
tempLink.setAttribute('download', time + "供应商索赔扣款单.xlsx") |
||||
|
if (typeof tempLink.download === 'undefined') { |
||||
|
tempLink.setAttribute('target', '_blank') |
||||
|
} |
||||
|
document.body.appendChild(tempLink) |
||||
|
tempLink.click() |
||||
|
document.body.removeChild(tempLink)// 移除dom元素 |
||||
|
window.URL.revokeObjectURL(URL)//释放内存 |
||||
|
}) |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue