liuxiaoxu
1 month ago
10 changed files with 0 additions and 2942 deletions
@ -1,285 +0,0 @@ |
|||
package com.ruoyi.system.controller; |
|||
|
|||
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.alibaba.fastjson.JSONArray; |
|||
import com.alibaba.fastjson.JSONObject; |
|||
import com.ruoyi.ck.utils.Result; |
|||
import com.ruoyi.common.annotation.Log; |
|||
import com.ruoyi.common.config.RuoYiConfig; |
|||
import com.ruoyi.common.core.controller.BaseController; |
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
import com.ruoyi.common.enums.BusinessType; |
|||
import com.ruoyi.common.utils.file.FileUploadUtils; |
|||
import com.ruoyi.common.utils.file.FileUtils; |
|||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|||
import com.ruoyi.system.domain.SysCustomer; |
|||
import com.ruoyi.system.domain.SysProductQuotation; |
|||
import com.ruoyi.system.domain.exportDto.SysCustomerDto; |
|||
import com.ruoyi.system.domain.exportDto.SysProductQuotationDto; |
|||
import com.ruoyi.system.service.ISysCustomerService; |
|||
import com.ruoyi.system.service.ISysProductQuotationService; |
|||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|||
import org.springframework.beans.BeanUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.ModelMap; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.io.IOException; |
|||
import java.net.URLEncoder; |
|||
import java.util.ArrayList; |
|||
import java.util.Iterator; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
import static com.ruoyi.common.config.datasource.DynamicDataSourceContextHolder.log; |
|||
|
|||
/** |
|||
* 产品报价Controller |
|||
* |
|||
* @author ruoyi |
|||
* @date 2022-11-15 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/system/productquotation") |
|||
public class SysProductQuotationController extends BaseController |
|||
{ |
|||
private String prefix = "system/productquotation"; |
|||
|
|||
@Autowired |
|||
private ISysProductQuotationService sysProductQuotationService; |
|||
@Autowired |
|||
private ISysCustomerService sysCustomerService; |
|||
|
|||
@RequiresPermissions("system:productquotation:view") |
|||
@GetMapping() |
|||
public String productquotation() |
|||
{ |
|||
return prefix + "/productquotation"; |
|||
} |
|||
|
|||
/** |
|||
* 查询产品报价列表 |
|||
*/ |
|||
@RequiresPermissions("system:productquotation:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(SysProductQuotation sysProductQuotation) |
|||
{ |
|||
startPage(); |
|||
List<SysProductQuotation> list = sysProductQuotationService.selectSysProductQuotationList(sysProductQuotation); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出产品报价列表 |
|||
*/ |
|||
@RequiresPermissions("system:productquotation:export") |
|||
@Log(title = "产品报价", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(SysProductQuotation sysProductQuotation) |
|||
{ |
|||
List<SysProductQuotation> list = sysProductQuotationService.selectSysProductQuotationList(sysProductQuotation); |
|||
ExcelUtil<SysProductQuotation> util = new ExcelUtil<SysProductQuotation>(SysProductQuotation.class); |
|||
return util.exportExcel(list, "产品报价数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增产品报价 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存产品报价 |
|||
*/ |
|||
@RequiresPermissions("system:productquotation:add") |
|||
@Log(title = "产品报价", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(SysProductQuotation sysProductQuotation) |
|||
{ |
|||
return toAjax(sysProductQuotationService.insertSysProductQuotation(sysProductQuotation)); |
|||
} |
|||
|
|||
/** |
|||
* 修改产品报价 |
|||
*/ |
|||
@GetMapping("/edit/{productQuotationId}") |
|||
public String edit(@PathVariable("productQuotationId") Long productQuotationId, ModelMap mmap) |
|||
{ |
|||
SysProductQuotation sysProductQuotation = sysProductQuotationService.selectSysProductQuotationById(productQuotationId); |
|||
mmap.put("sysProductQuotation", sysProductQuotation); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存产品报价 |
|||
*/ |
|||
@RequiresPermissions("system:productquotation:edit") |
|||
@Log(title = "产品报价", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(SysProductQuotation sysProductQuotation) |
|||
{ |
|||
return toAjax(sysProductQuotationService.updateSysProductQuotation(sysProductQuotation)); |
|||
} |
|||
|
|||
/** |
|||
* 删除产品报价 |
|||
*/ |
|||
@RequiresPermissions("system:productquotation:remove") |
|||
@Log(title = "产品报价", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(sysProductQuotationService.deleteSysProductQuotationByIds(ids)); |
|||
} |
|||
|
|||
|
|||
@RequiresPermissions("system:productquotation:export") |
|||
@Log(title = "产品报价", businessType = BusinessType.EXPORT) |
|||
@RequestMapping("/exportProductQuotation") |
|||
@ResponseBody |
|||
public void exportProductQuotation(@RequestBody String scData, HttpServletResponse response) throws IOException { |
|||
|
|||
//数据处理
|
|||
// System.out.println(scData);
|
|||
|
|||
JSONObject jsonObject = JSONObject.parseObject(scData); |
|||
// System.out.println(jsonObject);
|
|||
|
|||
JSONObject scDataJSON = jsonObject.getJSONObject("scData"); |
|||
// System.out.println(scDataJSON);
|
|||
|
|||
// JSONArray jsonArray1 = scDataJSON.getJSONArray("selectData");
|
|||
// List<SysProductQuotationDto> selectDataList = JSONObject.parseArray(String.valueOf(jsonArray1), SysProductQuotationDto.class);
|
|||
JSONArray jsonArray2 = scDataJSON.getJSONArray("customerData"); |
|||
List<SysCustomer> customerDataList = JSONObject.parseArray(String.valueOf(jsonArray2), SysCustomer.class); |
|||
String pricingDate = scDataJSON.getString("pricingDate").replace("\"",""); |
|||
// System.out.println(selectDataList);
|
|||
// System.out.println(customerDataList);
|
|||
|
|||
//获取基础信息
|
|||
SysCustomer sysCustomer = sysCustomerService.selectSysCustomerById(customerDataList.get(0).getId()); |
|||
SysCustomerDto sysCustomerDto = new SysCustomerDto(); |
|||
BeanUtils.copyProperties(sysCustomer,sysCustomerDto); |
|||
|
|||
//产品信息
|
|||
SysProductQuotation sysProductQuotation = new SysProductQuotation(); |
|||
sysProductQuotation.setEnterpriseCode(customerDataList.get(0).getEnterpriseCode()); |
|||
sysProductQuotation.setEnterpriseName(customerDataList.get(0).getEnterpriseName()); |
|||
sysProductQuotation.setPricingDate(pricingDate); |
|||
List<SysProductQuotation> sysProductQuotationList = sysProductQuotationService.selectSysProductQuotationList(sysProductQuotation); |
|||
List<SysProductQuotationDto> sysProductQuotationDtoList = new ArrayList<>(); |
|||
try { |
|||
Iterator values= sysProductQuotationList.iterator(); |
|||
while(values.hasNext()) { |
|||
Object source = values.next(); |
|||
SysProductQuotationDto target = SysProductQuotationDto.class.newInstance(); |
|||
BeanUtils.copyProperties(source, target); |
|||
sysProductQuotationDtoList.add(target); |
|||
} |
|||
}catch (Exception e) { |
|||
log.error(">>>>>>异常<<<<<<", e); |
|||
} |
|||
int num = 0; |
|||
for (int i = 0; i < sysProductQuotationDtoList.size(); i++) { |
|||
num = num + 1; |
|||
sysProductQuotationDtoList.get(i).setNumber(num); |
|||
} |
|||
// System.out.println(sysProductQuotationDtoList);
|
|||
|
|||
|
|||
//填充表格
|
|||
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\\exportProductQuotation.xlsx"; |
|||
try (ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream(), SysProductQuotationDto.class).withTemplate(templateFileName).build()) { |
|||
WriteSheet writeSheet = EasyExcel.writerSheet().build(); |
|||
FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build(); |
|||
excelWriter.fill(sysProductQuotationDtoList, fillConfig, writeSheet); |
|||
Map<String, Object> map = MapUtils.newHashMap(); |
|||
map.put("enterpriseName", sysCustomerDto.getEnterpriseName()); |
|||
map.put("contactNumber", sysCustomerDto.getContactNumber()); |
|||
map.put("customerFax", sysCustomerDto.getCustomerFax()); |
|||
map.put("customerContact", sysCustomerDto.getCustomerContact()); |
|||
map.put("commonCurrency", sysCustomerDto.getCommonCurrency()); |
|||
map.put("taxRate", sysCustomerDto.getTaxRate()); |
|||
map.put("pricingDate", pricingDate); |
|||
excelWriter.fill(map, writeSheet); |
|||
} |
|||
} |
|||
|
|||
|
|||
@PostMapping("/upload") |
|||
@ResponseBody |
|||
public AjaxResult uploadFile(MultipartFile file) throws Exception |
|||
{ |
|||
try |
|||
{ |
|||
// 上传文件路径
|
|||
String filePath = RuoYiConfig.getUploadPath(); |
|||
String modalName = prefix.substring(prefix.lastIndexOf("/")+1); |
|||
String filePathNow = filePath + "/" + modalName; |
|||
// 上传并返回新文件名称
|
|||
String fileName = FileUploadUtils.upload(filePathNow, file); |
|||
String url = filePathNow + fileName; |
|||
AjaxResult ajax = AjaxResult.success(); |
|||
ajax.put("fileName", fileName); |
|||
ajax.put("url", url); |
|||
return ajax; |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
return AjaxResult.error(e.getMessage()); |
|||
} |
|||
} |
|||
|
|||
|
|||
@RequestMapping ("/downloadFile") |
|||
public void downloadFile(String filepath, HttpServletResponse response, |
|||
HttpServletRequest request) throws Exception |
|||
{ |
|||
String fileNameNow = filepath.substring(filepath.lastIndexOf("/")+1); |
|||
|
|||
try |
|||
{ |
|||
// System.out.println(fileName);
|
|||
String filePath = filepath; |
|||
|
|||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); |
|||
FileUtils.setAttachmentResponseHeader(response, fileNameNow); |
|||
FileUtils.writeBytes(filePath, response.getOutputStream()); |
|||
|
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
System.out.println("fail"); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 获取报价编号 |
|||
*/ |
|||
@PostMapping("/getId") |
|||
@ResponseBody |
|||
public Result getId() throws Exception { |
|||
return Result.getSuccessResult(sysProductQuotationService.getId()); |
|||
} |
|||
} |
@ -1,568 +0,0 @@ |
|||
package com.ruoyi.system.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; |
|||
|
|||
/** |
|||
* 产品报价对象 sys_product_quotation |
|||
* |
|||
* @author ruoyi |
|||
* @date 2022-11-15 |
|||
*/ |
|||
public class SysProductQuotation extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 产品报价id */ |
|||
private Long productQuotationId; |
|||
|
|||
/** 报价编码 */ |
|||
@Excel(name = "报价编码") |
|||
private String quotationCode; |
|||
|
|||
/** 成品代码 */ |
|||
@Excel(name = "成品代码") |
|||
private String finishProductCode; |
|||
|
|||
/** 成品名称 */ |
|||
@Excel(name = "成品名称") |
|||
private String finishProductName; |
|||
|
|||
/** 规格型号 */ |
|||
@Excel(name = "规格型号") |
|||
private String specificationModel; |
|||
|
|||
/** 机种 */ |
|||
@Excel(name = "机种") |
|||
private String typeMachine; |
|||
|
|||
/** 单位 */ |
|||
@Excel(name = "单位") |
|||
private String inventoryUnit; |
|||
|
|||
/** 币别 */ |
|||
@Excel(name = "币别") |
|||
private String commonCurrency; |
|||
|
|||
/** 单价 */ |
|||
@Excel(name = "单价") |
|||
private String processPrice; |
|||
|
|||
|
|||
/** 客户料号 */ |
|||
@Excel(name = "客户料号") |
|||
private String customerNumber; |
|||
|
|||
|
|||
/** 客户编号 */ |
|||
@Excel(name = "客户编号") |
|||
private String enterpriseCode; |
|||
|
|||
/** 客户名称 */ |
|||
@Excel(name = "客户名称") |
|||
private String enterpriseName; |
|||
|
|||
/** 登记人 */ |
|||
@Excel(name = "登记人") |
|||
private String registrant; |
|||
|
|||
/** 订价日期 */ |
|||
@Excel(name = "订价日期") |
|||
private String pricingDate; |
|||
|
|||
/** 税率 */ |
|||
@Excel(name = "税率") |
|||
private String taxRate; |
|||
|
|||
/** 不含税价 */ |
|||
@Excel(name = "不含税价") |
|||
private String priceExcludingTax; |
|||
|
|||
/** 含税价 */ |
|||
@Excel(name = "含税价") |
|||
private String priceIncludingTax; |
|||
|
|||
/** 上次价格 */ |
|||
@Excel(name = "上次价格") |
|||
private String lastPrice; |
|||
|
|||
/** 上次价格2 */ |
|||
@Excel(name = "上次价格2") |
|||
private String lastPriceEnd; |
|||
|
|||
/** 当前材料成本RMB */ |
|||
@Excel(name = "当前材料成本RMB") |
|||
private String costRmb; |
|||
|
|||
/** 当前汇率 */ |
|||
@Excel(name = "当前汇率") |
|||
private String currentExchangeRate; |
|||
|
|||
/** 材料占比 */ |
|||
@Excel(name = "材料占比") |
|||
private String proportionMaterials; |
|||
|
|||
/** 备注说明 */ |
|||
@Excel(name = "备注说明") |
|||
private String quotationExplain; |
|||
|
|||
/** 是否为当前报价 */ |
|||
@Excel(name = "是否为当前报价") |
|||
private String currentQuote; |
|||
|
|||
/** 是否含税 */ |
|||
@Excel(name = "是否含税") |
|||
private String confirmTax; |
|||
|
|||
/** 文件存储 */ |
|||
@Excel(name = "文件存储") |
|||
private String fileUpload; |
|||
|
|||
/** 确认否 */ |
|||
@Excel(name = "确认否") |
|||
private String confirmNo; |
|||
|
|||
/** 确认人 */ |
|||
@Excel(name = "确认人") |
|||
private String confirmName; |
|||
|
|||
/** 确认时间 */ |
|||
@Excel(name = "确认时间") |
|||
private String confirmTime; |
|||
|
|||
/** 审核否 */ |
|||
@Excel(name = "审核否") |
|||
private String auditNo; |
|||
|
|||
/** 审核人 */ |
|||
@Excel(name = "审核人") |
|||
private String auditName; |
|||
|
|||
/** 审核时间 */ |
|||
@Excel(name = "审核时间") |
|||
private String auditTime; |
|||
|
|||
/** 核准否 */ |
|||
@Excel(name = "核准否") |
|||
private String approveNo; |
|||
|
|||
/** 核准人 */ |
|||
@Excel(name = "核准人") |
|||
private String approveName; |
|||
|
|||
/** 核准时间 */ |
|||
@Excel(name = "核准时间") |
|||
private String approveTime; |
|||
|
|||
/** 备用一 */ |
|||
@Excel(name = "备用一") |
|||
private String standbyOne; |
|||
|
|||
/** 备用二 */ |
|||
@Excel(name = "备用二") |
|||
private String standbyTwo; |
|||
/** 录入时间 */ |
|||
@Excel(name = "录入时间") |
|||
private String firstAddTime; |
|||
|
|||
/** 修改时间 */ |
|||
@Excel(name = "修改时间") |
|||
private String updateInfoTime; |
|||
|
|||
|
|||
public void setProductQuotationId(Long productQuotationId) |
|||
{ |
|||
this.productQuotationId = productQuotationId; |
|||
} |
|||
|
|||
public Long getProductQuotationId() |
|||
{ |
|||
return productQuotationId; |
|||
} |
|||
public void setQuotationCode(String quotationCode) |
|||
{ |
|||
this.quotationCode = quotationCode; |
|||
} |
|||
|
|||
public String getQuotationCode() |
|||
{ |
|||
return quotationCode; |
|||
} |
|||
public void setFinishProductCode(String finishProductCode) |
|||
{ |
|||
this.finishProductCode = finishProductCode; |
|||
} |
|||
|
|||
public String getFinishProductCode() |
|||
{ |
|||
return finishProductCode; |
|||
} |
|||
public void setFinishProductName(String finishProductName) |
|||
{ |
|||
this.finishProductName = finishProductName; |
|||
} |
|||
|
|||
public String getFinishProductName() |
|||
{ |
|||
return finishProductName; |
|||
} |
|||
public void setSpecificationModel(String specificationModel) |
|||
{ |
|||
this.specificationModel = specificationModel; |
|||
} |
|||
|
|||
public String getSpecificationModel() |
|||
{ |
|||
return specificationModel; |
|||
} |
|||
public void setTypeMachine(String typeMachine) |
|||
{ |
|||
this.typeMachine = typeMachine; |
|||
} |
|||
|
|||
public String getTypeMachine() |
|||
{ |
|||
return typeMachine; |
|||
} |
|||
public void setInventoryUnit(String inventoryUnit) |
|||
{ |
|||
this.inventoryUnit = inventoryUnit; |
|||
} |
|||
|
|||
public String getInventoryUnit() |
|||
{ |
|||
return inventoryUnit; |
|||
} |
|||
public void setCommonCurrency(String commonCurrency) |
|||
{ |
|||
this.commonCurrency = commonCurrency; |
|||
} |
|||
|
|||
public String getCommonCurrency() |
|||
{ |
|||
return commonCurrency; |
|||
} |
|||
public void setProcessPrice(String processPrice) |
|||
{ |
|||
this.processPrice = processPrice; |
|||
} |
|||
|
|||
public String getProcessPrice() |
|||
{ |
|||
return processPrice; |
|||
} |
|||
public void setEnterpriseCode(String enterpriseCode) |
|||
{ |
|||
this.enterpriseCode = enterpriseCode; |
|||
} |
|||
|
|||
public String getEnterpriseCode() |
|||
{ |
|||
return enterpriseCode; |
|||
} |
|||
public void setEnterpriseName(String enterpriseName) |
|||
{ |
|||
this.enterpriseName = enterpriseName; |
|||
} |
|||
|
|||
public String getEnterpriseName() |
|||
{ |
|||
return enterpriseName; |
|||
} |
|||
public void setRegistrant(String registrant) |
|||
{ |
|||
this.registrant = registrant; |
|||
} |
|||
|
|||
public String getRegistrant() |
|||
{ |
|||
return registrant; |
|||
} |
|||
public void setPricingDate(String pricingDate) |
|||
{ |
|||
this.pricingDate = pricingDate; |
|||
} |
|||
|
|||
public String getPricingDate() |
|||
{ |
|||
return pricingDate; |
|||
} |
|||
public void setTaxRate(String taxRate) |
|||
{ |
|||
this.taxRate = taxRate; |
|||
} |
|||
|
|||
public String getTaxRate() |
|||
{ |
|||
return taxRate; |
|||
} |
|||
public void setPriceExcludingTax(String priceExcludingTax) |
|||
{ |
|||
this.priceExcludingTax = priceExcludingTax; |
|||
} |
|||
|
|||
public String getPriceExcludingTax() |
|||
{ |
|||
return priceExcludingTax; |
|||
} |
|||
public void setPriceIncludingTax(String priceIncludingTax) |
|||
{ |
|||
this.priceIncludingTax = priceIncludingTax; |
|||
} |
|||
|
|||
public String getPriceIncludingTax() |
|||
{ |
|||
return priceIncludingTax; |
|||
} |
|||
public void setLastPrice(String lastPrice) |
|||
{ |
|||
this.lastPrice = lastPrice; |
|||
} |
|||
|
|||
public String getLastPrice() |
|||
{ |
|||
return lastPrice; |
|||
} |
|||
public void setLastPriceEnd(String lastPriceEnd) |
|||
{ |
|||
this.lastPriceEnd = lastPriceEnd; |
|||
} |
|||
|
|||
public String getLastPriceEnd() |
|||
{ |
|||
return lastPriceEnd; |
|||
} |
|||
public void setCostRmb(String costRmb) |
|||
{ |
|||
this.costRmb = costRmb; |
|||
} |
|||
|
|||
public String getCostRmb() |
|||
{ |
|||
return costRmb; |
|||
} |
|||
public void setCurrentExchangeRate(String currentExchangeRate) |
|||
{ |
|||
this.currentExchangeRate = currentExchangeRate; |
|||
} |
|||
|
|||
public String getCurrentExchangeRate() |
|||
{ |
|||
return currentExchangeRate; |
|||
} |
|||
public void setProportionMaterials(String proportionMaterials) |
|||
{ |
|||
this.proportionMaterials = proportionMaterials; |
|||
} |
|||
|
|||
public String getProportionMaterials() |
|||
{ |
|||
return proportionMaterials; |
|||
} |
|||
public void setQuotationExplain(String quotationExplain) |
|||
{ |
|||
this.quotationExplain = quotationExplain; |
|||
} |
|||
|
|||
public String getQuotationExplain() |
|||
{ |
|||
return quotationExplain; |
|||
} |
|||
public void setCurrentQuote(String currentQuote) |
|||
{ |
|||
this.currentQuote = currentQuote; |
|||
} |
|||
|
|||
public String getCurrentQuote() |
|||
{ |
|||
return currentQuote; |
|||
} |
|||
public void setConfirmTax(String confirmTax) |
|||
{ |
|||
this.confirmTax = confirmTax; |
|||
} |
|||
|
|||
public String getConfirmTax() |
|||
{ |
|||
return confirmTax; |
|||
} |
|||
|
|||
public String getFileUpload() { |
|||
return fileUpload; |
|||
} |
|||
|
|||
public void setFileUpload(String fileUpload) { |
|||
this.fileUpload = fileUpload; |
|||
} |
|||
|
|||
public void setConfirmNo(String confirmNo) |
|||
{ |
|||
this.confirmNo = confirmNo; |
|||
} |
|||
|
|||
public String getConfirmNo() |
|||
{ |
|||
return confirmNo; |
|||
} |
|||
public void setConfirmName(String confirmName) |
|||
{ |
|||
this.confirmName = confirmName; |
|||
} |
|||
|
|||
public String getConfirmName() |
|||
{ |
|||
return confirmName; |
|||
} |
|||
public void setConfirmTime(String confirmTime) |
|||
{ |
|||
this.confirmTime = confirmTime; |
|||
} |
|||
|
|||
public String getConfirmTime() |
|||
{ |
|||
return confirmTime; |
|||
} |
|||
public void setAuditNo(String auditNo) |
|||
{ |
|||
this.auditNo = auditNo; |
|||
} |
|||
|
|||
public String getAuditNo() |
|||
{ |
|||
return auditNo; |
|||
} |
|||
public void setAuditName(String auditName) |
|||
{ |
|||
this.auditName = auditName; |
|||
} |
|||
|
|||
public String getAuditName() |
|||
{ |
|||
return auditName; |
|||
} |
|||
public void setAuditTime(String auditTime) |
|||
{ |
|||
this.auditTime = auditTime; |
|||
} |
|||
|
|||
public String getAuditTime() |
|||
{ |
|||
return auditTime; |
|||
} |
|||
public void setApproveNo(String approveNo) |
|||
{ |
|||
this.approveNo = approveNo; |
|||
} |
|||
|
|||
public String getApproveNo() |
|||
{ |
|||
return approveNo; |
|||
} |
|||
public void setApproveName(String approveName) |
|||
{ |
|||
this.approveName = approveName; |
|||
} |
|||
|
|||
public String getApproveName() |
|||
{ |
|||
return approveName; |
|||
} |
|||
public void setApproveTime(String approveTime) |
|||
{ |
|||
this.approveTime = approveTime; |
|||
} |
|||
|
|||
public String getApproveTime() |
|||
{ |
|||
return approveTime; |
|||
} |
|||
public void setStandbyOne(String standbyOne) |
|||
{ |
|||
this.standbyOne = standbyOne; |
|||
} |
|||
|
|||
public String getStandbyOne() |
|||
{ |
|||
return standbyOne; |
|||
} |
|||
public void setStandbyTwo(String standbyTwo) |
|||
{ |
|||
this.standbyTwo = standbyTwo; |
|||
} |
|||
|
|||
public String getStandbyTwo() |
|||
{ |
|||
return standbyTwo; |
|||
} |
|||
|
|||
public String getFirstAddTime() { |
|||
return firstAddTime; |
|||
} |
|||
|
|||
public void setFirstAddTime(String firstAddTime) { |
|||
this.firstAddTime = firstAddTime; |
|||
} |
|||
|
|||
public String getUpdateInfoTime() { |
|||
return updateInfoTime; |
|||
} |
|||
|
|||
public void setUpdateInfoTime(String updateInfoTime) { |
|||
this.updateInfoTime = updateInfoTime; |
|||
} |
|||
|
|||
public String getCustomerNumber() { |
|||
return customerNumber; |
|||
} |
|||
|
|||
public void setCustomerNumber(String customerNumber) { |
|||
this.customerNumber = customerNumber; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("productQuotationId", getProductQuotationId()) |
|||
.append("quotationCode", getQuotationCode()) |
|||
.append("finishProductCode", getFinishProductCode()) |
|||
.append("finishProductName", getFinishProductName()) |
|||
.append("specificationModel", getSpecificationModel()) |
|||
.append("typeMachine", getTypeMachine()) |
|||
.append("inventoryUnit", getInventoryUnit()) |
|||
.append("commonCurrency", getCommonCurrency()) |
|||
.append("processPrice", getProcessPrice()) |
|||
.append("customerNumber", getCustomerNumber()) |
|||
.append("enterpriseCode", getEnterpriseCode()) |
|||
.append("enterpriseName", getEnterpriseName()) |
|||
.append("registrant", getRegistrant()) |
|||
.append("pricingDate", getPricingDate()) |
|||
.append("taxRate", getTaxRate()) |
|||
.append("priceExcludingTax", getPriceExcludingTax()) |
|||
.append("priceIncludingTax", getPriceIncludingTax()) |
|||
.append("lastPrice", getLastPrice()) |
|||
.append("lastPriceEnd", getLastPriceEnd()) |
|||
.append("costRmb", getCostRmb()) |
|||
.append("currentExchangeRate", getCurrentExchangeRate()) |
|||
.append("proportionMaterials", getProportionMaterials()) |
|||
.append("quotationExplain", getQuotationExplain()) |
|||
.append("currentQuote", getCurrentQuote()) |
|||
.append("confirmTax", getConfirmTax()) |
|||
.append("fileUpload", getFileUpload()) |
|||
.append("confirmNo", getConfirmNo()) |
|||
.append("confirmName", getConfirmName()) |
|||
.append("confirmTime", getConfirmTime()) |
|||
.append("auditNo", getAuditNo()) |
|||
.append("auditName", getAuditName()) |
|||
.append("auditTime", getAuditTime()) |
|||
.append("approveNo", getApproveNo()) |
|||
.append("approveName", getApproveName()) |
|||
.append("approveTime", getApproveTime()) |
|||
.append("standbyOne", getStandbyOne()) |
|||
.append("standbyTwo", getStandbyTwo()) |
|||
.append("firstAddTime", getFirstAddTime()) |
|||
.append("updateInfoTime", getUpdateInfoTime()) |
|||
.toString(); |
|||
} |
|||
} |
@ -1,61 +0,0 @@ |
|||
package com.ruoyi.system.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.system.domain.SysProductQuotation; |
|||
|
|||
/** |
|||
* 产品报价Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2022-11-15 |
|||
*/ |
|||
public interface SysProductQuotationMapper |
|||
{ |
|||
/** |
|||
* 查询产品报价 |
|||
* |
|||
* @param productQuotationId 产品报价ID |
|||
* @return 产品报价 |
|||
*/ |
|||
public SysProductQuotation selectSysProductQuotationById(Long productQuotationId); |
|||
|
|||
/** |
|||
* 查询产品报价列表 |
|||
* |
|||
* @param sysProductQuotation 产品报价 |
|||
* @return 产品报价集合 |
|||
*/ |
|||
public List<SysProductQuotation> selectSysProductQuotationList(SysProductQuotation sysProductQuotation); |
|||
|
|||
/** |
|||
* 新增产品报价 |
|||
* |
|||
* @param sysProductQuotation 产品报价 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertSysProductQuotation(SysProductQuotation sysProductQuotation); |
|||
|
|||
/** |
|||
* 修改产品报价 |
|||
* |
|||
* @param sysProductQuotation 产品报价 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateSysProductQuotation(SysProductQuotation sysProductQuotation); |
|||
|
|||
/** |
|||
* 删除产品报价 |
|||
* |
|||
* @param productQuotationId 产品报价ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysProductQuotationById(Long productQuotationId); |
|||
|
|||
/** |
|||
* 批量删除产品报价 |
|||
* |
|||
* @param productQuotationIds 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysProductQuotationByIds(String[] productQuotationIds); |
|||
} |
@ -1,64 +0,0 @@ |
|||
package com.ruoyi.system.service; |
|||
|
|||
import com.ruoyi.system.domain.SysProductQuotation; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 产品报价Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2022-11-15 |
|||
*/ |
|||
public interface ISysProductQuotationService |
|||
{ |
|||
/** |
|||
* 查询产品报价 |
|||
* |
|||
* @param productQuotationId 产品报价ID |
|||
* @return 产品报价 |
|||
*/ |
|||
public SysProductQuotation selectSysProductQuotationById(Long productQuotationId); |
|||
|
|||
/** |
|||
* 查询产品报价列表 |
|||
* |
|||
* @param sysProductQuotation 产品报价 |
|||
* @return 产品报价集合 |
|||
*/ |
|||
public List<SysProductQuotation> selectSysProductQuotationList(SysProductQuotation sysProductQuotation); |
|||
|
|||
/** |
|||
* 新增产品报价 |
|||
* |
|||
* @param sysProductQuotation 产品报价 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertSysProductQuotation(SysProductQuotation sysProductQuotation); |
|||
|
|||
/** |
|||
* 修改产品报价 |
|||
* |
|||
* @param sysProductQuotation 产品报价 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateSysProductQuotation(SysProductQuotation sysProductQuotation); |
|||
|
|||
/** |
|||
* 批量删除产品报价 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysProductQuotationByIds(String ids); |
|||
|
|||
/** |
|||
* 删除产品报价信息 |
|||
* |
|||
* @param productQuotationId 产品报价ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysProductQuotationById(Long productQuotationId); |
|||
|
|||
public String getId(); |
|||
} |
@ -1,102 +0,0 @@ |
|||
package com.ruoyi.system.service.impl; |
|||
|
|||
import com.ruoyi.common.core.text.Convert; |
|||
import com.ruoyi.system.domain.SysProductQuotation; |
|||
import com.ruoyi.system.mapper.SysProductQuotationMapper; |
|||
import com.ruoyi.system.service.ISysProductQuotationService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.text.SimpleDateFormat; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 产品报价Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2022-11-15 |
|||
*/ |
|||
@Service |
|||
public class SysProductQuotationServiceImpl implements ISysProductQuotationService |
|||
{ |
|||
@Autowired |
|||
private SysProductQuotationMapper sysProductQuotationMapper; |
|||
|
|||
/** |
|||
* 查询产品报价 |
|||
* |
|||
* @param productQuotationId 产品报价ID |
|||
* @return 产品报价 |
|||
*/ |
|||
@Override |
|||
public SysProductQuotation selectSysProductQuotationById(Long productQuotationId) |
|||
{ |
|||
return sysProductQuotationMapper.selectSysProductQuotationById(productQuotationId); |
|||
} |
|||
|
|||
/** |
|||
* 查询产品报价列表 |
|||
* |
|||
* @param sysProductQuotation 产品报价 |
|||
* @return 产品报价 |
|||
*/ |
|||
@Override |
|||
public List<SysProductQuotation> selectSysProductQuotationList(SysProductQuotation sysProductQuotation) |
|||
{ |
|||
return sysProductQuotationMapper.selectSysProductQuotationList(sysProductQuotation); |
|||
} |
|||
|
|||
/** |
|||
* 新增产品报价 |
|||
* |
|||
* @param sysProductQuotation 产品报价 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertSysProductQuotation(SysProductQuotation sysProductQuotation) |
|||
{ |
|||
return sysProductQuotationMapper.insertSysProductQuotation(sysProductQuotation); |
|||
} |
|||
|
|||
/** |
|||
* 修改产品报价 |
|||
* |
|||
* @param sysProductQuotation 产品报价 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateSysProductQuotation(SysProductQuotation sysProductQuotation) |
|||
{ |
|||
return sysProductQuotationMapper.updateSysProductQuotation(sysProductQuotation); |
|||
} |
|||
|
|||
/** |
|||
* 删除产品报价对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteSysProductQuotationByIds(String ids) |
|||
{ |
|||
return sysProductQuotationMapper.deleteSysProductQuotationByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除产品报价信息 |
|||
* |
|||
* @param productQuotationId 产品报价ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteSysProductQuotationById(Long productQuotationId) |
|||
{ |
|||
return sysProductQuotationMapper.deleteSysProductQuotationById(productQuotationId); |
|||
} |
|||
|
|||
@Override |
|||
public String getId() { |
|||
String time = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(System.currentTimeMillis()); |
|||
return "BJ" + time.substring(2); |
|||
} |
|||
} |
@ -1,210 +0,0 @@ |
|||
<?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.system.mapper.SysProductQuotationMapper"> |
|||
|
|||
<resultMap type="SysProductQuotation" id="SysProductQuotationResult"> |
|||
<result property="productQuotationId" column="product_quotation_id" /> |
|||
<result property="quotationCode" column="quotation_code" /> |
|||
<result property="finishProductCode" column="finish_product_code" /> |
|||
<result property="finishProductName" column="finish_product_name" /> |
|||
<result property="specificationModel" column="specification_model" /> |
|||
<result property="typeMachine" column="type_machine" /> |
|||
<result property="inventoryUnit" column="inventory_unit" /> |
|||
<result property="commonCurrency" column="common_currency" /> |
|||
<result property="processPrice" column="process_price" /> |
|||
<result property="customerNumber" column="customer_number" /> |
|||
<result property="enterpriseCode" column="enterprise_code" /> |
|||
<result property="enterpriseName" column="enterprise_name" /> |
|||
<result property="registrant" column="registrant" /> |
|||
<result property="pricingDate" column="pricing_date" /> |
|||
<result property="taxRate" column="tax_rate" /> |
|||
<result property="priceExcludingTax" column="price_excluding_tax" /> |
|||
<result property="priceIncludingTax" column="price_including_tax" /> |
|||
<result property="lastPrice" column="last_price" /> |
|||
<result property="lastPriceEnd" column="last_price_end" /> |
|||
<result property="costRmb" column="cost_rmb" /> |
|||
<result property="currentExchangeRate" column="current_exchange_rate" /> |
|||
<result property="proportionMaterials" column="proportion_materials" /> |
|||
<result property="quotationExplain" column="quotation_explain" /> |
|||
<result property="currentQuote" column="current_quote" /> |
|||
<result property="confirmTax" column="confirm_tax" /> |
|||
<result property="fileUpload" column="file_upload" /> |
|||
<result property="confirmNo" column="confirm_no" /> |
|||
<result property="confirmName" column="confirm_name" /> |
|||
<result property="confirmTime" column="confirm_time" /> |
|||
<result property="auditNo" column="audit_no" /> |
|||
<result property="auditName" column="audit_name" /> |
|||
<result property="auditTime" column="audit_time" /> |
|||
<result property="approveNo" column="approve_no" /> |
|||
<result property="approveName" column="approve_name" /> |
|||
<result property="approveTime" column="approve_time" /> |
|||
<result property="standbyOne" column="standby_one" /> |
|||
<result property="standbyTwo" column="standby_two" /> |
|||
<result property="firstAddTime" column="first_add_time" /> |
|||
<result property="updateInfoTime" column="update_info_time" /> |
|||
|
|||
</resultMap> |
|||
|
|||
<sql id="selectSysProductQuotationVo"> |
|||
select product_quotation_id, quotation_code, finish_product_code, finish_product_name, specification_model, type_machine, inventory_unit, common_currency, process_price, customer_number, enterprise_code, enterprise_name, registrant, pricing_date, tax_rate, price_excluding_tax, price_including_tax, last_price, last_price_end, cost_rmb, current_exchange_rate, proportion_materials, quotation_explain, current_quote, confirm_tax, file_upload, confirm_no, confirm_name, confirm_time, audit_no, audit_name, audit_time, approve_no, approve_name, approve_time, standby_one, standby_two, first_add_time, update_info_time from sys_product_quotation |
|||
</sql> |
|||
|
|||
<select id="selectSysProductQuotationList" parameterType="SysProductQuotation" resultMap="SysProductQuotationResult"> |
|||
<include refid="selectSysProductQuotationVo"/> |
|||
<where> |
|||
<if test="quotationCode != null and quotationCode != ''"> and quotation_code like concat('%', #{quotationCode}, '%')</if> |
|||
<if test="finishProductCode != null and finishProductCode != ''"> and finish_product_code like concat('%', #{finishProductCode}, '%')</if> |
|||
<if test="finishProductName != null and finishProductName != ''"> and finish_product_name like concat('%', #{finishProductName}, '%')</if> |
|||
<if test="customerNumber != null and customerNumber != ''"> and customer_number like concat('%', #{customerNumber}, '%')</if> |
|||
<if test="enterpriseCode != null and enterpriseCode != ''"> and enterprise_code like concat('%', #{enterpriseCode}, '%')</if> |
|||
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if> |
|||
<if test="pricingDate != null and pricingDate != ''"> and pricing_date like concat('%', #{pricingDate}, '%')</if> |
|||
<if test="currentQuote != null and currentQuote != ''"> and current_quote = #{currentQuote}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectSysProductQuotationById" parameterType="Long" resultMap="SysProductQuotationResult"> |
|||
<include refid="selectSysProductQuotationVo"/> |
|||
where product_quotation_id = #{productQuotationId} |
|||
</select> |
|||
|
|||
<insert id="insertSysProductQuotation" parameterType="SysProductQuotation" useGeneratedKeys="true" keyProperty="productQuotationId"> |
|||
insert into sys_product_quotation |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="quotationCode != null">quotation_code,</if> |
|||
<if test="finishProductCode != null">finish_product_code,</if> |
|||
<if test="finishProductName != null">finish_product_name,</if> |
|||
<if test="specificationModel != null">specification_model,</if> |
|||
<if test="typeMachine != null">type_machine,</if> |
|||
<if test="inventoryUnit != null">inventory_unit,</if> |
|||
<if test="commonCurrency != null">common_currency,</if> |
|||
<if test="processPrice != null">process_price,</if> |
|||
<if test="customerNumber != null">customer_number,</if> |
|||
<if test="enterpriseCode != null">enterprise_code,</if> |
|||
<if test="enterpriseName != null">enterprise_name,</if> |
|||
<if test="registrant != null">registrant,</if> |
|||
<if test="pricingDate != null">pricing_date,</if> |
|||
<if test="taxRate != null">tax_rate,</if> |
|||
<if test="priceExcludingTax != null">price_excluding_tax,</if> |
|||
<if test="priceIncludingTax != null">price_including_tax,</if> |
|||
<if test="lastPrice != null">last_price,</if> |
|||
<if test="lastPriceEnd != null">last_price_end,</if> |
|||
<if test="costRmb != null">cost_rmb,</if> |
|||
<if test="currentExchangeRate != null">current_exchange_rate,</if> |
|||
<if test="proportionMaterials != null">proportion_materials,</if> |
|||
<if test="quotationExplain != null">quotation_explain,</if> |
|||
<if test="currentQuote != null">current_quote,</if> |
|||
<if test="confirmTax != null">confirm_tax,</if> |
|||
<if test="fileUpload != null">file_upload,</if> |
|||
<if test="confirmNo != null">confirm_no,</if> |
|||
<if test="confirmName != null">confirm_name,</if> |
|||
<if test="confirmTime != null">confirm_time,</if> |
|||
<if test="auditNo != null">audit_no,</if> |
|||
<if test="auditName != null">audit_name,</if> |
|||
<if test="auditTime != null">audit_time,</if> |
|||
<if test="approveNo != null">approve_no,</if> |
|||
<if test="approveName != null">approve_name,</if> |
|||
<if test="approveTime != null">approve_time,</if> |
|||
<if test="standbyOne != null">standby_one,</if> |
|||
<if test="standbyTwo != null">standby_two,</if> |
|||
first_add_time, |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="quotationCode != null">#{quotationCode},</if> |
|||
<if test="finishProductCode != null">#{finishProductCode},</if> |
|||
<if test="finishProductName != null">#{finishProductName},</if> |
|||
<if test="specificationModel != null">#{specificationModel},</if> |
|||
<if test="typeMachine != null">#{typeMachine},</if> |
|||
<if test="inventoryUnit != null">#{inventoryUnit},</if> |
|||
<if test="commonCurrency != null">#{commonCurrency},</if> |
|||
<if test="processPrice != null">#{processPrice},</if> |
|||
<if test="customerNumber != null">#{customerNumber},</if> |
|||
<if test="enterpriseCode != null">#{enterpriseCode},</if> |
|||
<if test="enterpriseName != null">#{enterpriseName},</if> |
|||
<if test="registrant != null">#{registrant},</if> |
|||
<if test="pricingDate != null">#{pricingDate},</if> |
|||
<if test="taxRate != null">#{taxRate},</if> |
|||
<if test="priceExcludingTax != null">#{priceExcludingTax},</if> |
|||
<if test="priceIncludingTax != null">#{priceIncludingTax},</if> |
|||
<if test="lastPrice != null">#{lastPrice},</if> |
|||
<if test="lastPriceEnd != null">#{lastPriceEnd},</if> |
|||
<if test="costRmb != null">#{costRmb},</if> |
|||
<if test="currentExchangeRate != null">#{currentExchangeRate},</if> |
|||
<if test="proportionMaterials != null">#{proportionMaterials},</if> |
|||
<if test="quotationExplain != null">#{quotationExplain},</if> |
|||
<if test="currentQuote != null">#{currentQuote},</if> |
|||
<if test="confirmTax != null">#{confirmTax},</if> |
|||
<if test="fileUpload != null">#{fileUpload},</if> |
|||
<if test="confirmNo != null">#{confirmNo},</if> |
|||
<if test="confirmName != null">#{confirmName},</if> |
|||
<if test="confirmTime != null">#{confirmTime},</if> |
|||
<if test="auditNo != null">#{auditNo},</if> |
|||
<if test="auditName != null">#{auditName},</if> |
|||
<if test="auditTime != null">#{auditTime},</if> |
|||
<if test="approveNo != null">#{approveNo},</if> |
|||
<if test="approveName != null">#{approveName},</if> |
|||
<if test="approveTime != null">#{approveTime},</if> |
|||
<if test="standbyOne != null">#{standbyOne},</if> |
|||
<if test="standbyTwo != null">#{standbyTwo},</if> |
|||
now(), |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateSysProductQuotation" parameterType="SysProductQuotation"> |
|||
update sys_product_quotation |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="quotationCode != null">quotation_code = #{quotationCode},</if> |
|||
<if test="finishProductCode != null">finish_product_code = #{finishProductCode},</if> |
|||
<if test="finishProductName != null">finish_product_name = #{finishProductName},</if> |
|||
<if test="specificationModel != null">specification_model = #{specificationModel},</if> |
|||
<if test="typeMachine != null">type_machine = #{typeMachine},</if> |
|||
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if> |
|||
<if test="commonCurrency != null">common_currency = #{commonCurrency},</if> |
|||
<if test="processPrice != null">process_price = #{processPrice},</if> |
|||
<if test="customerNumber != null">customer_number = #{customerNumber},</if> |
|||
<if test="enterpriseCode != null">enterprise_code = #{enterpriseCode},</if> |
|||
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if> |
|||
<if test="registrant != null">registrant = #{registrant},</if> |
|||
<if test="pricingDate != null">pricing_date = #{pricingDate},</if> |
|||
<if test="taxRate != null">tax_rate = #{taxRate},</if> |
|||
<if test="priceExcludingTax != null">price_excluding_tax = #{priceExcludingTax},</if> |
|||
<if test="priceIncludingTax != null">price_including_tax = #{priceIncludingTax},</if> |
|||
<if test="lastPrice != null">last_price = #{lastPrice},</if> |
|||
<if test="lastPriceEnd != null">last_price_end = #{lastPriceEnd},</if> |
|||
<if test="costRmb != null">cost_rmb = #{costRmb},</if> |
|||
<if test="currentExchangeRate != null">current_exchange_rate = #{currentExchangeRate},</if> |
|||
<if test="proportionMaterials != null">proportion_materials = #{proportionMaterials},</if> |
|||
<if test="quotationExplain != null">quotation_explain = #{quotationExplain},</if> |
|||
<if test="currentQuote != null">current_quote = #{currentQuote},</if> |
|||
<if test="confirmTax != null">confirm_tax = #{confirmTax},</if> |
|||
<if test="fileUpload != null">file_upload = #{fileUpload},</if> |
|||
<if test="confirmNo != null">confirm_no = #{confirmNo},</if> |
|||
<if test="confirmName != null">confirm_name = #{confirmName},</if> |
|||
<if test="confirmTime != null">confirm_time = #{confirmTime},</if> |
|||
<if test="auditNo != null">audit_no = #{auditNo},</if> |
|||
<if test="auditName != null">audit_name = #{auditName},</if> |
|||
<if test="auditTime != null">audit_time = #{auditTime},</if> |
|||
<if test="approveNo != null">approve_no = #{approveNo},</if> |
|||
<if test="approveName != null">approve_name = #{approveName},</if> |
|||
<if test="approveTime != null">approve_time = #{approveTime},</if> |
|||
<if test="standbyOne != null">standby_one = #{standbyOne},</if> |
|||
<if test="standbyTwo != null">standby_two = #{standbyTwo},</if> |
|||
update_info_time = CONCAT_WS(',',NOW(),update_info_time), |
|||
</trim> |
|||
where product_quotation_id = #{productQuotationId} |
|||
</update> |
|||
|
|||
<delete id="deleteSysProductQuotationById" parameterType="Long"> |
|||
delete from sys_product_quotation where product_quotation_id = #{productQuotationId} |
|||
</delete> |
|||
|
|||
<delete id="deleteSysProductQuotationByIds" parameterType="String"> |
|||
delete from sys_product_quotation where product_quotation_id in |
|||
<foreach item="productQuotationId" collection="array" open="(" separator="," close=")"> |
|||
#{productQuotationId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
</mapper> |
@ -1,451 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('新增产品报价')" /> |
|||
<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-fileinput-css"/> |
|||
</head> |
|||
<style> |
|||
.division { |
|||
width: 100%; |
|||
border-bottom: 1px solid #f1ecec; |
|||
padding: 10px 0 0; |
|||
margin-bottom: 30px; |
|||
|
|||
|
|||
} |
|||
.changeWidth{ |
|||
width: 33% !important; |
|||
} |
|||
.col-sm-3 { |
|||
width: 26%; |
|||
} |
|||
</style> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-productquotation-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">报价编码:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="quotationCode" class="form-control" type="text" required readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">成品代码:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="finishProductCode" class="form-control m-b" required> |
|||
<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="finishProductName" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">规格型号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="specificationModel" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">机种:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="typeMachine" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">单位:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="inventoryUnit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">币别:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="commonCurrency" class="form-control m-b" th:with="type=${@dict.getType('sys_common_currency')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">单价:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="processPrice" 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="customerNumber" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">客户编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="enterpriseCode" class="form-control" type="text" readonly> |
|||
|
|||
<!-- <select name="enterpriseCode" 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"> |
|||
<!-- <select name="enterpriseName" class="form-control m-b">--> |
|||
<!-- <option value="">所有</option>--> |
|||
<!-- </select>--> |
|||
<input name="enterpriseName" class="form-control" type="text" readonly> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">登记人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="registrant" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">订价日期:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="pricingDate" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">税率:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="taxRate" 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="priceExcludingTax" 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="priceIncludingTax" 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="lastPrice" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">上次价格2:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="lastPriceEnd" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">当前材料成本RMB:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="costRmb" 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="currentExchangeRate" 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="proportionMaterials" 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="quotationExplain" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">是否为当前报价:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="currentQuote" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">是否含税:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="confirmTax" 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 type="hidden" name="fileUpload"> |
|||
<div class="file-loading"> |
|||
<input class="form-control file-upload" id="fileUpload" name="file" type="file"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--<div class="division"> |
|||
<h4>确认</h4> |
|||
</div> |
|||
|
|||
<div class="form-group changeWidth" > |
|||
<label class="col-sm-3 control-label">确认否:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="confirmNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">确认人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="confirmName" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">确认时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="confirmTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="division"> |
|||
<h4>审核</h4> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">审核否:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="auditNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">审核人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="auditName" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">审核时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="auditTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="division"> |
|||
<h4>核准</h4> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">核准否:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="approveNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">核准人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="approveName" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">核准时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="approveTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div>--> |
|||
<!-- <div class="form-group"> --> |
|||
<!-- <label class="col-sm-3 control-label">备用一:</label>--> |
|||
<!-- <div class="col-sm-8">--> |
|||
<!-- <input name="standbyOne" 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="standbyTwo" class="form-control" type="text">--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: select2-js"/> |
|||
<th:block th:include="include :: bootstrap-fileinput-js"/> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/productquotation" |
|||
$("#form-productquotation-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-productquotation-add').serialize()); |
|||
} |
|||
} |
|||
$(".file-upload").fileinput({ |
|||
uploadUrl: prefix + '/upload', |
|||
maxFileCount: 1, |
|||
autoReplace: true, |
|||
overwriteInitial: false, |
|||
initialPreviewAsData: true, |
|||
}).on('fileuploaded', function (event, data, previewId, index) { |
|||
// console.log(event.currentTarget.id) |
|||
$("input[name='" + event.currentTarget.id + "']").val(data.response.url) |
|||
}).on('fileremoved', function (event, id, index) { |
|||
$("input[name='" + event.currentTarget.id + "']").val('') |
|||
}) |
|||
|
|||
$("input[name='pricingDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='confirmTime']").datetimepicker({ |
|||
format: 'yyyy-mm-dd hh:ii:ss', |
|||
autoclose: true, |
|||
minView: 0, |
|||
minuteStep:1 |
|||
}); |
|||
|
|||
$("input[name='auditTime']").datetimepicker({ |
|||
format: 'yyyy-mm-dd hh:ii:ss', |
|||
autoclose: true, |
|||
minView: 0, |
|||
minuteStep:1 |
|||
}); |
|||
|
|||
$("input[name='approveTime']").datetimepicker({ |
|||
format: 'yyyy-mm-dd hh:ii:ss', |
|||
autoclose: true, |
|||
minView: 0, |
|||
minuteStep:1 |
|||
}); |
|||
|
|||
// 自动获取当前时间 |
|||
$("input[name='pricingDate']").datetimepicker("setDate",new Date()); |
|||
|
|||
//获取单号 |
|||
$.ajax({ |
|||
url: prefix + "/getId", |
|||
type: "post", |
|||
dateType: "json", |
|||
success: function (resp) { |
|||
if (resp.code === 0) { |
|||
$("input[name='quotationCode']").val(resp.data); |
|||
} else { |
|||
$.modal.msgError("失败啦"); |
|||
} |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("后台出错啦!"); |
|||
} |
|||
}); |
|||
// 确认 |
|||
$("select[name='confirmNo']").change(function (){ |
|||
console.log($(this).val()) |
|||
if($(this).val()==1){ |
|||
$("input[name='confirmTime']").datetimepicker("setDate",new Date()); |
|||
|
|||
} |
|||
else { |
|||
$("input[name='confirmTime']").val('') |
|||
} |
|||
}) |
|||
// 审核 |
|||
$("select[name='auditNo']").change(function (){ |
|||
console.log($(this).val()) |
|||
if($(this).val()==1){ |
|||
$("input[name='auditTime']").datetimepicker("setDate",new Date()); |
|||
|
|||
} |
|||
else { |
|||
$("input[name='auditTime']").val('') |
|||
} |
|||
}) |
|||
// 核准 |
|||
$("select[name='approveNo']").change(function (){ |
|||
console.log($(this).val()) |
|||
if($(this).val()==1){ |
|||
$("input[name='approveTime']").datetimepicker("setDate",new Date()); |
|||
|
|||
} |
|||
else { |
|||
$("input[name='approveTime']").val('') |
|||
} |
|||
}) |
|||
|
|||
// 获取成品信息 |
|||
|
|||
$.ajax({ |
|||
url: ctx + "system/finishproduct/finishList", |
|||
type: "POST", |
|||
success: function (res) { |
|||
console.log(res) |
|||
if (res.length > 0) { |
|||
finishProductdata = res; |
|||
//alert(JSON.stringify(data)); |
|||
for (let i in finishProductdata) { |
|||
$("select[name='finishProductCode']").append("<option value='" + finishProductdata[i].finishProductCode + "'>" + finishProductdata[i].finishProductCode + "</option>"); |
|||
// $("select[name='enterpriseCode']").append("<option value='" + finishProductdata[i].enterpriseCode + "'>" + finishProductdata[i].enterpriseCode + "</option>"); |
|||
// $("select[name='enterpriseName']").append("<option value='" + finishProductdata[i].enterpriseName + "'>" + finishProductdata[i].enterpriseName + "</option>"); |
|||
|
|||
} |
|||
|
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("后台出错啦!"); |
|||
|
|||
} |
|||
|
|||
}) |
|||
// 成品改变 |
|||
$("select[name='finishProductCode']").change(function () { |
|||
|
|||
var finishProductCode = $(this).val(); |
|||
|
|||
for (i = 0; i < finishProductdata.length; i++) { |
|||
if (finishProductdata[i].finishProductCode === finishProductCode) { |
|||
$("input[name='finishProductName']").val(finishProductdata[i].finishProductName) |
|||
$("input[name='specificationModel']").val(finishProductdata[i].specificationModel) |
|||
$("input[name='typeMachine']").val(finishProductdata[i].typeMachine) |
|||
$("select[name='inventoryUnit']").val(finishProductdata[i].inventoryUnit).trigger("change") |
|||
$("input[name='customerNumber']").val(finishProductdata[i].customerNumber) |
|||
$("input[name='enterpriseCode']").val(finishProductdata[i].enterpriseCode) |
|||
$("input[name='enterpriseName']").val(finishProductdata[i].enterpriseName) |
|||
|
|||
} |
|||
} |
|||
}) |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,439 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改产品报价')" /> |
|||
<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-fileinput-css"/> |
|||
</head> |
|||
<style> |
|||
.division { |
|||
width: 100%; |
|||
border-bottom: 1px solid #f1ecec; |
|||
padding: 10px 0 0; |
|||
margin-bottom: 30px; |
|||
} |
|||
.changeWidth{ |
|||
width: 33% !important; |
|||
} |
|||
.col-sm-3 { |
|||
width: 26%; |
|||
} |
|||
</style> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-productquotation-edit" th:object="${sysProductQuotation}"> |
|||
<input name="productQuotationId" th:field="*{productQuotationId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">报价编码:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="quotationCode" th:field="*{quotationCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">成品代码:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="finishProductCode" 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="finishProductName" th:field="*{finishProductName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">规格型号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="specificationModel" th:field="*{specificationModel}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">机种:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="typeMachine" th:field="*{typeMachine}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">单位:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="inventoryUnit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{inventoryUnit}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">币别:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="commonCurrency" class="form-control m-b" th:with="type=${@dict.getType('sys_common_currency')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{commonCurrency}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">单价:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="processPrice" th:field="*{processPrice}" 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="customerNumber" th:field="*{customerNumber}" class="form-control" type="text" readonly> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">客户编号:</label> |
|||
<div class="col-sm-8"> |
|||
<!-- <select name="enterpriseCode" class="form-control m-b">--> |
|||
<!-- <option value="">所有</option>--> |
|||
<!-- </select>--> |
|||
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" readonly> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">客户名称:</label> |
|||
<div class="col-sm-8"> |
|||
<!-- <select name="enterpriseName" class="form-control m-b">--> |
|||
<!-- <option value="">所有</option>--> |
|||
<!-- </select>--> |
|||
|
|||
<input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" readonly> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">登记人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="registrant" th:field="*{registrant}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">订价日期:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="pricingDate" th:value="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">税率:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="taxRate" th:field="*{taxRate}" 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="priceExcludingTax" th:field="*{priceExcludingTax}" 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="priceIncludingTax" th:field="*{priceIncludingTax}" 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="lastPrice" th:field="*{lastPrice}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">上次价格2:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="lastPriceEnd" th:field="*{lastPriceEnd}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">当前材料成本RMB:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="costRmb" th:field="*{costRmb}" 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="currentExchangeRate" th:field="*{currentExchangeRate}" 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="proportionMaterials" th:field="*{proportionMaterials}" 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="quotationExplain" class="form-control">[[*{quotationExplain}]]</textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">是否为当前报价:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="currentQuote" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{currentQuote}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">是否含税:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="confirmTax" th:field="*{confirmTax}" 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 type="hidden" name="fileUpload" th:field="*{fileUpload}"> |
|||
<div class="file-loading"> |
|||
<input class="form-control file-upload" id="fileUpload" name="file" type="file"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--<div class="division"> |
|||
<h4>确认</h4> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">确认否:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="confirmNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{confirmNo}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">确认人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="confirmName" th:field="*{confirmName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">确认时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="confirmTime" th:value="*{confirmTime}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="division"> |
|||
<h4>审核</h4> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">审核否:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="auditNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{auditNo}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">审核人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="auditName" th:field="*{auditName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">审核时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="auditTime" th:value="*{auditTime}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="division"> |
|||
<h4>核准</h4> |
|||
</div> |
|||
|
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">核准否:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="approveNo" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{approveNo}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">核准人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="approveName" th:field="*{approveName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group changeWidth"> |
|||
<label class="col-sm-3 control-label">核准时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="approveTime" th:value="*{approveTime}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div>--> |
|||
<!-- <div class="form-group"> --> |
|||
<!-- <label class="col-sm-3 control-label">备用一:</label>--> |
|||
<!-- <div class="col-sm-8">--> |
|||
<!-- <input name="standbyOne" th:field="*{standbyOne}" 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="standbyTwo" th:field="*{standbyTwo}" class="form-control" type="text">--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<th:block th:include="include :: bootstrap-fileinput-js"/> |
|||
<th:block th:include="include :: select2-js"/> |
|||
|
|||
<script th:inline="javascript"> |
|||
var getData = [[${sysProductQuotation}]]; |
|||
|
|||
var prefix = ctx + "system/productquotation"; |
|||
$("#form-productquotation-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
$(".file-upload").each(function (i) { |
|||
var val = $("input[name='" + this.id + "']").val() |
|||
$(this).fileinput({ |
|||
'uploadUrl': prefix + '/upload', |
|||
initialPreviewAsData: true, |
|||
initialPreview: [val], |
|||
maxFileCount: 1, |
|||
autoReplace: true, |
|||
showPreview: true, |
|||
}).on('fileuploaded', function (event, data, previewId, index) { |
|||
$("input[name='" + event.currentTarget.id + "']").val(data.response.url) |
|||
}).on('fileremoved', function (event, id, index) { |
|||
$("input[name='" + event.currentTarget.id + "']").val('') |
|||
}) |
|||
$(this).fileinput('_initFileActions'); |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-productquotation-edit').serialize()); |
|||
} |
|||
} |
|||
$("input[name='pricingDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='confirmTime']").datetimepicker({ |
|||
format: 'yyyy-mm-dd hh:ii:ss', |
|||
autoclose: true, |
|||
minView: 0, |
|||
minuteStep:1 |
|||
}); |
|||
|
|||
$("input[name='auditTime']").datetimepicker({ |
|||
format: 'yyyy-mm-dd hh:ii:ss', |
|||
autoclose: true, |
|||
minView: 0, |
|||
minuteStep:1 |
|||
}); |
|||
|
|||
$("input[name='approveTime']").datetimepicker({ |
|||
format: 'yyyy-mm-dd hh:ii:ss', |
|||
autoclose: true, |
|||
minView: 0, |
|||
minuteStep:1 |
|||
}); |
|||
// 自动获取当前时间 |
|||
$("input[name='pricingDate']").datetimepicker("setDate",new Date()); |
|||
// 确认 |
|||
$("select[name='confirmNo']").change(function (){ |
|||
console.log($(this).val()) |
|||
if($(this).val()==1){ |
|||
$("input[name='confirmTime']").datetimepicker("setDate",new Date()); |
|||
|
|||
} |
|||
else { |
|||
$("input[name='confirmTime']").val('') |
|||
} |
|||
}) |
|||
// 审核 |
|||
$("select[name='auditNo']").change(function (){ |
|||
console.log($(this).val()) |
|||
if($(this).val()==1){ |
|||
$("input[name='auditTime']").datetimepicker("setDate",new Date()); |
|||
|
|||
} |
|||
else { |
|||
$("input[name='auditTime']").val('') |
|||
} |
|||
}) |
|||
// 核准 |
|||
$("select[name='approveNo']").change(function (){ |
|||
console.log($(this).val()) |
|||
if($(this).val()==1){ |
|||
$("input[name='approveTime']").datetimepicker("setDate",new Date()); |
|||
|
|||
} |
|||
else { |
|||
$("input[name='approveTime']").val('') |
|||
} |
|||
}) |
|||
|
|||
// 获取成品信息 |
|||
|
|||
$.ajax({ |
|||
url: ctx + "system/finishproduct/finishList", |
|||
type: "POST", |
|||
success: function (res) { |
|||
console.log(res) |
|||
if (res.length > 0) { |
|||
finishProductdata = res; |
|||
//alert(JSON.stringify(data)); |
|||
for (let i in finishProductdata) { |
|||
$("select[name='finishProductCode']").append("<option value='" + finishProductdata[i].finishProductCode + "'>" + finishProductdata[i].finishProductCode + "</option>"); |
|||
|
|||
} |
|||
$("select[name='finishProductCode']").val(getData.finishProductCode).trigger("change") |
|||
|
|||
|
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("后台出错啦!"); |
|||
|
|||
} |
|||
|
|||
}) |
|||
// 成品改变 |
|||
$("select[name='finishProductCode']").change(function () { |
|||
|
|||
var finishProductCode = $(this).val(); |
|||
|
|||
for (i = 0; i < finishProductdata.length; i++) { |
|||
if (finishProductdata[i].finishProductCode == finishProductCode) { |
|||
$("input[name='finishProductName']").val(finishProductdata[i].finishProductName) |
|||
$("input[name='specificationModel']").val(finishProductdata[i].specificationModel) |
|||
$("input[name='typeMachine']").val(finishProductdata[i].typeMachine) |
|||
$("select[name='inventoryUnit']").val(finishProductdata[i].inventoryUnit).trigger("change") |
|||
$("input[name='customerNumber']").val(finishProductdata[i].customerNumber) |
|||
$("input[name='enterpriseCode']").val(finishProductdata[i].enterpriseCode) |
|||
$("input[name='enterpriseName']").val(finishProductdata[i].enterpriseName) |
|||
|
|||
} |
|||
} |
|||
}) |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,761 +0,0 @@ |
|||
<!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('产品报价列表')"/> |
|||
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script> |
|||
</head> |
|||
<style> |
|||
/*提醒框*/ |
|||
.alert{ |
|||
position: fixed; |
|||
top: 50%; |
|||
left: 50%; |
|||
transform: translate(-50%, -50%); |
|||
/* width: 200px; */ |
|||
/* margin-left: 20%; */ |
|||
z-index: 2000; |
|||
text-align: center; |
|||
font-size: 18px; |
|||
padding: 20px 50px; |
|||
} |
|||
</style> |
|||
<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> |
|||
<input type="text" name="quotationCode"/> |
|||
</li> |
|||
<li> |
|||
<label>成品代码:</label> |
|||
<!-- <select name="finishProductCode">--> |
|||
<!-- <option value="">所有</option>--> |
|||
<!-- <option value="-1">代码生成请选择字典属性</option>--> |
|||
<!-- </select>--> |
|||
<input type="text" name="finishProductCode"/> |
|||
</li> |
|||
<li> |
|||
<label>成品名称:</label> |
|||
<input type="text" name="finishProductName"/> |
|||
</li> |
|||
<li> |
|||
<label>客户料号:</label> |
|||
<input type="text" name="customerNumber"/> |
|||
</li> |
|||
<li> |
|||
<label>客户编号:</label> |
|||
<!-- <select name="enterpriseCode">--> |
|||
<!-- <option value="">所有</option>--> |
|||
<!-- <option value="-1">代码生成请选择字典属性</option>--> |
|||
<!-- </select>--> |
|||
<input type="text" name="enterpriseCode"/> |
|||
|
|||
</li> |
|||
<li> |
|||
<label>客户名称:</label> |
|||
<!-- <select name="enterpriseName">--> |
|||
<!-- <option value="">所有</option>--> |
|||
<!-- <option value="-1">代码生成请选择字典属性</option>--> |
|||
<!-- </select>--> |
|||
<input type="text" name="enterpriseName"/> |
|||
|
|||
</li> |
|||
<li class="select-time"> |
|||
<label>订价日期:</label> |
|||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/> |
|||
<span>-</span> |
|||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/> |
|||
</li> |
|||
<li> |
|||
<label>是否为当前报价:</label> |
|||
<select name="currentQuote" th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" |
|||
th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</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="system:productquotation:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" |
|||
shiro:hasPermission="system:productquotation:edit"> |
|||
<i class="fa fa-edit"></i> 修改 |
|||
</a> |
|||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" |
|||
shiro:hasPermission="system:productquotation:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a> |
|||
<a class="btn btn-warning" onclick="exportProductQuotation()" |
|||
shiro:hasPermission="system:productquotation:export"> |
|||
<i class="fa fa-download"></i> 导出 |
|||
</a> |
|||
<a class="btn btn-info" onclick="quotationAudit()" shiro:hasPermission="system:productquotation:audit"> |
|||
|
|||
<i class="fa fa-file-text"></i> 审核 |
|||
</a> |
|||
<a class="btn btn-success" onclick="quotationConfirm()" shiro:hasPermission="system:productquotation:confirm"> |
|||
|
|||
<i class="fa fa-hand-grab-o"></i> 确认 |
|||
</a> |
|||
<a class="btn btn-primary" onclick="quotationApprove()" shiro:hasPermission="system:productquotation:approve"> |
|||
|
|||
<i class="fa fa-hand-grab-o"></i> 核准 |
|||
</a> |
|||
|
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table" style="white-space:nowrap"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!--审核确认--> |
|||
<div class="modal fade" id="AuditModel"> |
|||
<div class="modal-dialog"> |
|||
<div class="modal-content message_align"> |
|||
<div class="modal-header"> |
|||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span |
|||
aria-hidden="true">×</span></button> |
|||
<h4 class="modal-title">审核信息</h4> |
|||
</div> |
|||
<div class="modal-body" style="height: 180px"> |
|||
<form id="form-audit-edit"> |
|||
<div class="form-group" style="display: none"> |
|||
<label class="col-sm-3 control-label is-required">产品报价id:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="productQuotationId" name="productQuotationId" class="form-control" type="text" required |
|||
readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">审核否:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="auditNo" name="auditNo" class="form-control" |
|||
th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" |
|||
th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">审核时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input id="auditTime" name="auditTime" class="form-control " |
|||
placeholder="yyyy-MM-dd HH:mm:ss" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">审核人:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="auditName" name="auditName" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button> |
|||
<button type="button" onclick="AuditConfirmSubmit()" class="btn btn-success" data-dismiss="modal">确定 |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="alert alert-success hide">审核成功</div> |
|||
|
|||
<!--核准--> |
|||
|
|||
<div class="modal fade" id="approveModel"> |
|||
<div class="modal-dialog"> |
|||
<div class="modal-content message_align"> |
|||
<div class="modal-header"> |
|||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span |
|||
aria-hidden="true">×</span></button> |
|||
<h4 class="modal-title">核准信息</h4> |
|||
</div> |
|||
<div class="modal-body" style="height: 180px"> |
|||
<form id="form-approve-edit"> |
|||
<div class="form-group" style="display: none"> |
|||
<label class="col-sm-3 control-label is-required">产品报价id:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="productQuotationId3" name="productQuotationId" class="form-control" type="text" required |
|||
readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">核准否:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="approveNo" name="approveNo" class="form-control" th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">核准时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input id="approveTime" name="approveTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">核准人:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="approveName" name="approveName" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button> |
|||
<button type="button" onclick="ApproveConfirmSubmit()" class="btn btn-success" data-dismiss="modal">确定</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="alert alert-warning hide">产品报价已核准</div> |
|||
|
|||
<!--确认--> |
|||
<div class="modal fade" id="confirmModel"> |
|||
<div class="modal-dialog"> |
|||
<div class="modal-content message_align"> |
|||
<div class="modal-header"> |
|||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span |
|||
aria-hidden="true">×</span></button> |
|||
<h4 class="modal-title">确认信息</h4> |
|||
</div> |
|||
<div class="modal-body" style="height: 180px"> |
|||
<form id="form-confirm-edit"> |
|||
<div class="form-group" style="display: none"> |
|||
<label class="col-sm-3 control-label is-required">产品报价id:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="productQuotationId2" name="productQuotationId" class="form-control" type="text" required |
|||
readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">确认否:</label> |
|||
<div class="col-sm-8"> |
|||
<select id="confirmNo" name="confirmNo" class="form-control" |
|||
th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" |
|||
th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">确认日期:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input id="confirmTime" name="confirmTime" class="form-control" |
|||
placeholder="yyyy-mm-dd hh:ii:ss" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">确认人:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="confirmName" name="confirmName" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button> |
|||
<button type="button" onclick="ConfirmSubmit()" class="btn btn-success" data-dismiss="modal">确定</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="alert alert-info hide">产品报价已确认</div> |
|||
|
|||
|
|||
<th:block th:include="include :: footer"/> |
|||
<th:block th:include="include :: datetimepicker-js"/> |
|||
|
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('system:productquotation:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('system:productquotation:remove')}]]; |
|||
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]]; |
|||
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]]; |
|||
var currentQuoteDatas = [[${@dict.getType('sys_whether')}]]; |
|||
var confirmNoDatas = [[${@dict.getType('sys_whether')}]]; |
|||
var auditNoDatas = [[${@dict.getType('sys_whether')}]]; |
|||
var approveNoDatas = [[${@dict.getType('sys_whether')}]]; |
|||
var prefix = ctx + "system/productquotation"; |
|||
var prefixCustomer = ctx + "system/customer"; |
|||
|
|||
$(function () { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
exportUrl: prefix + "/export", |
|||
clickToSelect: true, |
|||
modalName: "产品报价", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'productQuotationId', |
|||
title: '产品报价id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'auditNo', |
|||
title: '审核否', |
|||
formatter: function (value, row, index) { |
|||
// return $.table.selectDictLabel(auditNoDatas, value); |
|||
var actions = []; |
|||
if ($.table.selectDictLabel(auditNoDatas, value) == "<span class=''>是</span>") { |
|||
actions.push('<a class="btn btn-primary btn-xs disabled">已审核</a> '); |
|||
} else { |
|||
actions.push('<a class="btn btn-danger btn-xs disabled">未审核</a> '); |
|||
} |
|||
return actions.join(''); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'confirmNo', |
|||
title: '确认否', |
|||
formatter: function (value, row, index) { |
|||
// return $.table.selectDictLabel(confirmNoDatas, value); |
|||
|
|||
var actions = []; |
|||
if ($.table.selectDictLabel(confirmNoDatas, value) == "<span class=''>是</span>") { |
|||
actions.push('<a class="btn btn-primary btn-xs disabled">已确认</a> '); |
|||
} else { |
|||
actions.push('<a class="btn btn-danger btn-xs disabled">未确认</a> '); |
|||
} |
|||
return actions.join(''); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'approveNo', |
|||
title: '核准否', |
|||
formatter: function (value, row, index) { |
|||
// return $.table.selectDictLabel(approveNoDatas, value); |
|||
var actions = []; |
|||
if ($.table.selectDictLabel(approveNoDatas, value) == "<span class=''>是</span>") { |
|||
actions.push('<a class="btn btn-primary btn-xs disabled">已核准</a> '); |
|||
} else { |
|||
actions.push('<a class="btn btn-danger btn-xs disabled">未核准</a> '); |
|||
} |
|||
return actions.join(''); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'currentQuote', |
|||
title: '是否为当前报价', |
|||
formatter: function (value, row, index) { |
|||
return $.table.selectDictLabel(currentQuoteDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'quotationCode', |
|||
title: '报价编码' |
|||
}, |
|||
{ |
|||
field: 'finishProductCode', |
|||
title: '成品代码' |
|||
}, |
|||
{ |
|||
field: 'finishProductName', |
|||
title: '成品名称' |
|||
}, |
|||
{ |
|||
field: 'specificationModel', |
|||
title: '规格型号' |
|||
}, |
|||
{ |
|||
field: 'typeMachine', |
|||
title: '机种' |
|||
}, |
|||
{ |
|||
field: 'inventoryUnit', |
|||
title: '单位', |
|||
formatter: function (value, row, index) { |
|||
return $.table.selectDictLabel(inventoryUnitDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'commonCurrency', |
|||
title: '币别', |
|||
formatter: function (value, row, index) { |
|||
return $.table.selectDictLabel(commonCurrencyDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'processPrice', |
|||
title: '单价' |
|||
}, |
|||
{ |
|||
field: 'customerNumber', |
|||
title: '客户料号' |
|||
}, |
|||
{ |
|||
field: 'enterpriseCode', |
|||
title: '客户编号' |
|||
}, |
|||
{ |
|||
field: 'enterpriseName', |
|||
title: '客户名称' |
|||
}, |
|||
{ |
|||
field: 'registrant', |
|||
title: '登记人' |
|||
}, |
|||
{ |
|||
field: 'pricingDate', |
|||
title: '订价日期' |
|||
}, |
|||
{ |
|||
field: 'taxRate', |
|||
title: '税率' |
|||
}, |
|||
{ |
|||
field: 'priceExcludingTax', |
|||
title: '不含税价' |
|||
}, |
|||
{ |
|||
field: 'priceIncludingTax', |
|||
title: '含税价' |
|||
}, |
|||
{ |
|||
field: 'lastPrice', |
|||
title: '上次价格' |
|||
}, |
|||
{ |
|||
field: 'lastPriceEnd', |
|||
title: '上次价格2' |
|||
}, |
|||
{ |
|||
field: 'costRmb', |
|||
title: '当前材料成本RMB' |
|||
}, |
|||
{ |
|||
field: 'currentExchangeRate', |
|||
title: '当前汇率' |
|||
}, |
|||
{ |
|||
field: 'proportionMaterials', |
|||
title: '材料占比' |
|||
}, |
|||
{ |
|||
field: 'quotationExplain', |
|||
title: '备注说明' |
|||
}, |
|||
{ |
|||
field: 'confirmTax', |
|||
title: '是否含税' |
|||
}, |
|||
{ |
|||
field: 'fileUpload', |
|||
title: '文件存储', |
|||
formatter: function(value, row, index) { |
|||
var filepath = value.substring(value.lastIndexOf("/")+1) |
|||
var actions = []; |
|||
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> '); |
|||
return actions.join(''); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'confirmName', |
|||
title: '确认人' |
|||
}, |
|||
{ |
|||
field: 'confirmTime', |
|||
title: '确认时间' |
|||
}, |
|||
|
|||
{ |
|||
field: 'auditName', |
|||
title: '审核人' |
|||
}, |
|||
{ |
|||
field: 'auditTime', |
|||
title: '审核时间' |
|||
}, |
|||
{ |
|||
field: 'approveName', |
|||
title: '核准人' |
|||
}, |
|||
{ |
|||
field: 'approveTime', |
|||
title: '核准时间' |
|||
}, |
|||
{ |
|||
field: 'standbyOne', |
|||
title: '备用一', |
|||
visible: false |
|||
|
|||
|
|||
}, |
|||
{ |
|||
field: 'standbyTwo', |
|||
title: '备用二', |
|||
visible: false |
|||
|
|||
}, |
|||
{ |
|||
field: 'firstAddTime', |
|||
title: '录入时间', |
|||
formatter: function (value, row, index) { |
|||
if (value == null) { |
|||
return " "; |
|||
} else { |
|||
return value; |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'updateInfoTime', |
|||
title: '上次修改时间', |
|||
formatter: function (value, row, index) { |
|||
if (value == null) { |
|||
return " "; |
|||
} else { |
|||
var vArr = value.split(',') |
|||
return vArr[0]; |
|||
} |
|||
} |
|||
} |
|||
// { |
|||
// 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.productQuotationId + '\')"><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.productQuotationId + '\')"><i class="fa fa-remove"></i>删除</a>'); |
|||
// return actions.join(''); |
|||
// } |
|||
// } |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
|
|||
$("input[name='auditTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd hh:ii:ss", |
|||
minView: "month", |
|||
autoclose: true, |
|||
todayBtn: true |
|||
}); |
|||
$("input[name='confirmTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd hh:ii:ss", |
|||
minView: "month", |
|||
autoclose: true, |
|||
todayBtn: true |
|||
}); |
|||
$("input[name='approveTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd hh:ii:ss", |
|||
minView: "month", |
|||
autoclose: true, |
|||
todayBtn: true |
|||
}); |
|||
|
|||
// 审核确认 |
|||
function quotationAudit() { |
|||
let data = $("#bootstrap-table").bootstrapTable("getSelections"); |
|||
let userName = [[${@permission.getPrincipalProperty('userName')}]]; |
|||
console.log(data) |
|||
if (data.length === 1) { |
|||
$("#productQuotationId").val(data[0].productQuotationId) |
|||
$("#auditNo").val(1).trigger("change") |
|||
$("#auditName").val(userName) |
|||
$("#auditTime").datetimepicker("setDate", new Date()); |
|||
$("#AuditModel").modal("show"); |
|||
} else { |
|||
$.modal.alert("请选择一条数据"); |
|||
} |
|||
|
|||
} |
|||
|
|||
// 审核确认 |
|||
function AuditConfirmSubmit() { |
|||
$.ajax({ |
|||
url: prefix + "/edit", |
|||
type: "post", |
|||
resultType: "json", |
|||
data: $('#form-audit-edit').serialize(), |
|||
success: function (resp) { |
|||
console.log(resp) |
|||
$("#bootstrap-table").bootstrapTable('refresh'); |
|||
// $(".alert-success").addClass("show"); |
|||
// window.setTimeout(function () { |
|||
// $(".alert-success").removeClass("show"); |
|||
// }, 1000);//显示的时间 |
|||
$.modal.msgSuccess("操作成功!") |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("出错了!"); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
// 确认 |
|||
function quotationConfirm() { |
|||
let data = $("#bootstrap-table").bootstrapTable("getSelections"); |
|||
let userName = [[${@permission.getPrincipalProperty('userName')}]]; |
|||
if (data.length === 1) { |
|||
$("#productQuotationId2").val(data[0].productQuotationId) |
|||
$("#confirmNo").val(1).trigger("change") |
|||
$("#confirmName").val(userName) |
|||
$("#confirmTime").datetimepicker("setDate", new Date()); |
|||
$("#confirmModel").modal("show"); |
|||
} else { |
|||
$.modal.alert("请选择一条数据"); |
|||
} |
|||
|
|||
} |
|||
|
|||
// 确认 |
|||
function ConfirmSubmit() { |
|||
$.ajax({ |
|||
url: prefix + "/edit", |
|||
type: "post", |
|||
resultType: "json", |
|||
data: $('#form-confirm-edit').serialize(), |
|||
success: function (resp) { |
|||
console.log(resp) |
|||
$("#bootstrap-table").bootstrapTable('refresh'); |
|||
// $(".alert-info").addClass("show"); |
|||
// window.setTimeout(function () { |
|||
// $(".alert-info").removeClass("show"); |
|||
// }, 1000);//显示的时间 |
|||
$.modal.msgSuccess("操作成功!") |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("出错了!"); |
|||
} |
|||
}); |
|||
} |
|||
//核准 |
|||
function quotationApprove() { |
|||
let data = $("#bootstrap-table").bootstrapTable("getSelections"); |
|||
let userName = [[${@permission.getPrincipalProperty('userName')}]]; |
|||
if (data.length === 1) { |
|||
$("#productQuotationId3").val(data[0].productQuotationId) |
|||
$("#approveNo").val(1).trigger("change") |
|||
$("#approveName").val(userName) |
|||
$("#approveTime").datetimepicker("setDate", new Date()); |
|||
$("#approveModel").modal("show"); |
|||
} else { |
|||
$.modal.alert("请选择一条数据"); |
|||
} |
|||
|
|||
} |
|||
|
|||
//核准 |
|||
function ApproveConfirmSubmit() { |
|||
|
|||
$.ajax({ |
|||
url: prefix + "/edit", |
|||
type: "post", |
|||
resultType: "json", |
|||
data: $('#form-approve-edit').serialize(), |
|||
success: function (resp) { |
|||
$("#bootstrap-table").bootstrapTable('refresh'); |
|||
// $(".alert-warning").addClass("show"); |
|||
// window.setTimeout(function () { |
|||
// $(".alert-warning").removeClass("show"); |
|||
// }, 1000);//显示的时间 |
|||
$.modal.msgSuccess("操作成功!") |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("出错了!"); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
//导出 |
|||
function exportProductQuotation() { |
|||
var enterpriseCode = $("input[name='enterpriseCode']").val() |
|||
console.log(enterpriseCode) |
|||
var enterpriseName = $("input[name='enterpriseName']").val() |
|||
console.log(enterpriseName) |
|||
var pricingDate = $("input[name='pricingDate']").val() |
|||
if ((enterpriseCode != '')||(enterpriseName != '')){ |
|||
if (pricingDate == '') { |
|||
$.modal.alertWarning("导出前请选择日期进行筛选"); |
|||
} else { |
|||
$.modal.confirm("确认导出以下数据吗?", function() { |
|||
$.ajax({ |
|||
url: prefixCustomer + '/list', |
|||
type: 'post', |
|||
data: { |
|||
enterpriseCode: enterpriseCode, |
|||
enterpriseName: enterpriseName |
|||
}, |
|||
success: function (res) { |
|||
console.log(res) |
|||
var customerData = res.rows; |
|||
var selectData = $("#bootstrap-table").bootstrapTable("getData") |
|||
console.log(selectData) |
|||
var pricingDate = $("input[name='pricingDate']").val() |
|||
axios({ |
|||
url: prefix + '/exportProductQuotation', |
|||
method: 'POST', |
|||
data: { |
|||
scData: { |
|||
// "selectData": JSON.stringify(selectData), |
|||
"customerData": JSON.stringify(customerData), |
|||
"pricingDate": JSON.stringify(pricingDate) |
|||
} |
|||
}, |
|||
responseType: 'blob' |
|||
}).then(response => { |
|||
// console.log(response) |
|||
// console.log(response.data) |
|||
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)//释放内存 |
|||
}) |
|||
} |
|||
}) |
|||
}) |
|||
} |
|||
} else { |
|||
$.modal.alertWarning("导出前请选择客户编号或者客户名称进行筛选"); |
|||
} |
|||
} |
|||
|
|||
/*下载*/ |
|||
function downloadFile(filepath) { |
|||
window.location.href =prefix + "/downloadFile?filepath="+ filepath; |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue