liuxiaoxu
1 month ago
9 changed files with 0 additions and 2207 deletions
@ -1,181 +0,0 @@ |
|||||
package com.ruoyi.system.controller; |
|
||||
|
|
||||
import com.ruoyi.common.annotation.Log; |
|
||||
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.poi.ExcelUtil; |
|
||||
import com.ruoyi.system.domain.SysFinishProduct; |
|
||||
import com.ruoyi.system.service.ISysFinishProductService; |
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Controller; |
|
||||
import org.springframework.ui.ModelMap; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
|
|
||||
import java.util.ArrayList; |
|
||||
import java.util.List; |
|
||||
|
|
||||
import static com.ruoyi.common.core.domain.AjaxResult.Type.ERROR; |
|
||||
|
|
||||
/** |
|
||||
* 成品资料Controller |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2022-11-03 |
|
||||
*/ |
|
||||
@Controller |
|
||||
@RequestMapping("/system/finishproduct") |
|
||||
public class SysFinishProductController extends BaseController |
|
||||
{ |
|
||||
private String prefix = "system/finishproduct"; |
|
||||
|
|
||||
@Autowired |
|
||||
private ISysFinishProductService sysFinishProductService; |
|
||||
|
|
||||
@RequiresPermissions("system:finishproduct:view") |
|
||||
@GetMapping() |
|
||||
public String finishproduct() |
|
||||
{ |
|
||||
return prefix + "/finishproduct"; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 查询成品资料列表 |
|
||||
*/ |
|
||||
@RequiresPermissions("system:finishproduct:list") |
|
||||
@PostMapping("/list") |
|
||||
@ResponseBody |
|
||||
public TableDataInfo list(SysFinishProduct sysFinishProduct) |
|
||||
{ |
|
||||
startPage(); |
|
||||
List<SysFinishProduct> list = sysFinishProductService.selectSysFinishProductList(sysFinishProduct); |
|
||||
return getDataTable(list); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 导出成品资料列表 |
|
||||
*/ |
|
||||
@RequiresPermissions("system:finishproduct:export") |
|
||||
@Log(title = "成品资料", businessType = BusinessType.EXPORT) |
|
||||
@PostMapping("/export") |
|
||||
@ResponseBody |
|
||||
public AjaxResult export(SysFinishProduct sysFinishProduct) |
|
||||
{ |
|
||||
List<SysFinishProduct> list = sysFinishProductService.selectSysFinishProductList(sysFinishProduct); |
|
||||
ExcelUtil<SysFinishProduct> util = new ExcelUtil<SysFinishProduct>(SysFinishProduct.class); |
|
||||
return util.exportExcel(list, "成品资料数据"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 新增成品资料 |
|
||||
*/ |
|
||||
@GetMapping("/add") |
|
||||
public String add() |
|
||||
{ |
|
||||
return prefix + "/add"; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 新增保存成品资料 |
|
||||
*/ |
|
||||
@RequiresPermissions("system:finishproduct:add") |
|
||||
@Log(title = "成品资料", businessType = BusinessType.INSERT) |
|
||||
@PostMapping("/add") |
|
||||
@ResponseBody |
|
||||
public AjaxResult addSave(SysFinishProduct sysFinishProduct) |
|
||||
{ |
|
||||
String FinishLength= String.valueOf(sysFinishProductService.selectFinishProductByCode(sysFinishProduct.getFinishProductCode())); |
|
||||
if(FinishLength.length()>4){ |
|
||||
return new AjaxResult(ERROR, "此成品代码已存在,不可重复添加"); |
|
||||
}else { |
|
||||
return toAjax(sysFinishProductService.insertSysFinishProduct(sysFinishProduct)); |
|
||||
} |
|
||||
// return toAjax(sysFinishProductService.insertSysFinishProduct(sysFinishProduct));
|
|
||||
} |
|
||||
|
|
||||
// @RequiresPermissions("system:finishproduct:add")
|
|
||||
// @Log(title = "成品资料", businessType = BusinessType.INSERT)
|
|
||||
// @PostMapping("/add")
|
|
||||
// @ResponseBody
|
|
||||
// public AjaxResult addSave(SysFinishProduct sysFinishProduct)
|
|
||||
// {
|
|
||||
// String FinishLength= String.valueOf(sysFinishProductService.selectFinishProductByCode(sysFinishProduct.getFinishProductCode()));
|
|
||||
// if(FinishLength.length()>4){
|
|
||||
// return new AjaxResult(ERROR, "此成品代码已存在,不可重复添加");
|
|
||||
// }else {
|
|
||||
// return toAjax(sysFinishProductService.insertSysFinishProduct(sysFinishProduct));
|
|
||||
// }
|
|
||||
//
|
|
||||
// }
|
|
||||
/** |
|
||||
* 修改成品资料 |
|
||||
*/ |
|
||||
@GetMapping("/edit/{finishProductId}") |
|
||||
public String edit(@PathVariable("finishProductId") Long finishProductId, ModelMap mmap) |
|
||||
{ |
|
||||
SysFinishProduct sysFinishProduct = sysFinishProductService.selectSysFinishProductById(finishProductId); |
|
||||
mmap.put("sysFinishProduct", sysFinishProduct); |
|
||||
return prefix + "/edit"; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 修改保存成品资料 |
|
||||
*/ |
|
||||
@RequiresPermissions("system:finishproduct:edit") |
|
||||
@Log(title = "成品资料", businessType = BusinessType.UPDATE) |
|
||||
@PostMapping("/edit") |
|
||||
@ResponseBody |
|
||||
public AjaxResult editSave(SysFinishProduct sysFinishProduct) |
|
||||
{ |
|
||||
return toAjax(sysFinishProductService.updateSysFinishProduct(sysFinishProduct)); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 删除成品资料 |
|
||||
*/ |
|
||||
@RequiresPermissions("system:finishproduct:remove") |
|
||||
@Log(title = "成品资料", businessType = BusinessType.DELETE) |
|
||||
@PostMapping( "/remove") |
|
||||
@ResponseBody |
|
||||
public AjaxResult remove(String ids) |
|
||||
{ |
|
||||
return toAjax(sysFinishProductService.deleteSysFinishProductByIds(ids)); |
|
||||
} |
|
||||
|
|
||||
// 查询所有数据
|
|
||||
|
|
||||
@PostMapping( "/finishList") |
|
||||
@ResponseBody |
|
||||
public List<SysFinishProduct> finishList(){ |
|
||||
|
|
||||
List<SysFinishProduct> List= sysFinishProductService.selectAllSysFinishProductList(); |
|
||||
|
|
||||
return List; |
|
||||
} |
|
||||
|
|
||||
//通过id查询
|
|
||||
@RequestMapping( "/selectFinishList/{id}") |
|
||||
@ResponseBody |
|
||||
public List<SysFinishProduct> selectFinishList(@PathVariable Long id){ |
|
||||
|
|
||||
List<SysFinishProduct> list = new ArrayList<>(); |
|
||||
SysFinishProduct sysFinishProduct = sysFinishProductService.selectSysFinishProductById(id); |
|
||||
list.add(sysFinishProduct); |
|
||||
System.out.println(list); |
|
||||
return list; |
|
||||
} |
|
||||
|
|
||||
@RequestMapping( "getFinishCode") |
|
||||
|
|
||||
@ResponseBody |
|
||||
public SysFinishProduct getSubsidiaryCode(@RequestParam(value = "finishProductCode") String finishProductCode){ |
|
||||
|
|
||||
return sysFinishProductService.selectFinishProductByCode(finishProductCode); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,518 +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_finish_product |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2022-11-03 |
|
||||
*/ |
|
||||
public class SysFinishProduct extends BaseEntity |
|
||||
{ |
|
||||
private static final long serialVersionUID = 1L; |
|
||||
|
|
||||
/** 成品id */ |
|
||||
private Long finishProductId; |
|
||||
|
|
||||
/** 客户料号 */ |
|
||||
@Excel(name = "客户料号") |
|
||||
private String customerNumber; |
|
||||
|
|
||||
/** 机种 */ |
|
||||
@Excel(name = "机种") |
|
||||
private String typeMachine; |
|
||||
|
|
||||
/** 成品名称 */ |
|
||||
@Excel(name = "成品名称") |
|
||||
private String finishProductName; |
|
||||
|
|
||||
/** 客户代码 */ |
|
||||
@Excel(name = "客户代码") |
|
||||
private String enterpriseCode; |
|
||||
|
|
||||
/** 客户名称 */ |
|
||||
@Excel(name = "客户名称") |
|
||||
private String enterpriseName; |
|
||||
|
|
||||
/** 库存单位 */ |
|
||||
@Excel(name = "库存单位") |
|
||||
private String inventoryUnit; |
|
||||
|
|
||||
/** 版本号 */ |
|
||||
@Excel(name = "版本号") |
|
||||
private String versionNumber; |
|
||||
|
|
||||
/** 成品代码 */ |
|
||||
@Excel(name = "成品代码") |
|
||||
private String finishProductCode; |
|
||||
|
|
||||
/** 安全库存 */ |
|
||||
@Excel(name = "安全库存") |
|
||||
private String safetyStock; |
|
||||
|
|
||||
/** 单位重量 */ |
|
||||
@Excel(name = "单位重量") |
|
||||
private String stockUnitWeight; |
|
||||
|
|
||||
/** GP项选择 */ |
|
||||
@Excel(name = "GP项选择") |
|
||||
private String gpItemSelection; |
|
||||
|
|
||||
/** 厂内编码 */ |
|
||||
@Excel(name = "厂内编码") |
|
||||
private String inPlantCode; |
|
||||
|
|
||||
/** 料号是否停用 */ |
|
||||
@Excel(name = "料号是否停用") |
|
||||
private String whetherStop; |
|
||||
|
|
||||
/** 创建人 */ |
|
||||
@Excel(name = "创建人") |
|
||||
private String createrName; |
|
||||
|
|
||||
/** 半成品对应完工工序名 */ |
|
||||
@Excel(name = "半成品对应完工工序名") |
|
||||
private String ordinalName; |
|
||||
|
|
||||
/** 原成品料号 */ |
|
||||
@Excel(name = "原成品料号") |
|
||||
private String originalNumber; |
|
||||
|
|
||||
/** 海关名称 */ |
|
||||
@Excel(name = "海关名称") |
|
||||
private String customsName; |
|
||||
|
|
||||
/** 默认仓库 */ |
|
||||
@Excel(name = "默认仓库") |
|
||||
private String defaultWarehouse; |
|
||||
|
|
||||
/** 类别 */ |
|
||||
@Excel(name = "类别") |
|
||||
private String materialCategory; |
|
||||
|
|
||||
/** 生产类别 */ |
|
||||
@Excel(name = "生产类别") |
|
||||
private String productionCategory; |
|
||||
|
|
||||
/** 所属类别 */ |
|
||||
@Excel(name = "所属类别") |
|
||||
private String finishProductCategory; |
|
||||
|
|
||||
/** 规格型号 */ |
|
||||
@Excel(name = "规格型号") |
|
||||
private String specificationModel; |
|
||||
|
|
||||
/** 客户工程师 */ |
|
||||
@Excel(name = "客户工程师") |
|
||||
private String customerEngineer; |
|
||||
|
|
||||
/** 产品描述 */ |
|
||||
@Excel(name = "产品描述") |
|
||||
private String productDescription; |
|
||||
|
|
||||
/** 最高库存 */ |
|
||||
@Excel(name = "最高库存") |
|
||||
private String maximumInventory; |
|
||||
|
|
||||
/** 产品售价 */ |
|
||||
@Excel(name = "产品售价") |
|
||||
private String productPrice; |
|
||||
|
|
||||
/** 组件名称 */ |
|
||||
@Excel(name = "组件名称") |
|
||||
private String componentName; |
|
||||
|
|
||||
/** 创建日期 */ |
|
||||
@Excel(name = "创建日期") |
|
||||
private String createrTime; |
|
||||
|
|
||||
/** 半成品对应完工工序号 */ |
|
||||
@Excel(name = "半成品对应完工工序号") |
|
||||
private String ordinalNumber; |
|
||||
|
|
||||
/** 默认位置 */ |
|
||||
@Excel(name = "默认位置") |
|
||||
private String defaultLocation; |
|
||||
|
|
||||
/** HS号 */ |
|
||||
@Excel(name = "HS号") |
|
||||
private String hsNumber; |
|
||||
|
|
||||
/** 科恩仕料号 */ |
|
||||
@Excel(name = "科恩仕料号") |
|
||||
private String kesNumber; |
|
||||
|
|
||||
/** 录入时间 */ |
|
||||
@Excel(name = "录入时间") |
|
||||
private String firstAddTime; |
|
||||
|
|
||||
/** 修改时间 */ |
|
||||
@Excel(name = "修改时间") |
|
||||
private String updateInfoTime; |
|
||||
|
|
||||
public SysFinishProduct() { |
|
||||
} |
|
||||
|
|
||||
public SysFinishProduct(String finishProductCode) { |
|
||||
this.finishProductCode = finishProductCode; |
|
||||
} |
|
||||
|
|
||||
public void setFinishProductId(Long finishProductId) |
|
||||
{ |
|
||||
this.finishProductId = finishProductId; |
|
||||
} |
|
||||
|
|
||||
public Long getFinishProductId() |
|
||||
{ |
|
||||
return finishProductId; |
|
||||
} |
|
||||
public void setCustomerNumber(String customerNumber) |
|
||||
{ |
|
||||
this.customerNumber = customerNumber; |
|
||||
} |
|
||||
|
|
||||
public String getCustomerNumber() |
|
||||
{ |
|
||||
return customerNumber; |
|
||||
} |
|
||||
public void setTypeMachine(String typeMachine) |
|
||||
{ |
|
||||
this.typeMachine = typeMachine; |
|
||||
} |
|
||||
|
|
||||
public String getTypeMachine() |
|
||||
{ |
|
||||
return typeMachine; |
|
||||
} |
|
||||
public void setFinishProductName(String finishProductName) |
|
||||
{ |
|
||||
this.finishProductName = finishProductName; |
|
||||
} |
|
||||
|
|
||||
public String getFinishProductName() |
|
||||
{ |
|
||||
return finishProductName; |
|
||||
} |
|
||||
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 setInventoryUnit(String inventoryUnit) |
|
||||
{ |
|
||||
this.inventoryUnit = inventoryUnit; |
|
||||
} |
|
||||
|
|
||||
public String getInventoryUnit() |
|
||||
{ |
|
||||
return inventoryUnit; |
|
||||
} |
|
||||
public void setVersionNumber(String versionNumber) |
|
||||
{ |
|
||||
this.versionNumber = versionNumber; |
|
||||
} |
|
||||
|
|
||||
public String getVersionNumber() |
|
||||
{ |
|
||||
return versionNumber; |
|
||||
} |
|
||||
public void setFinishProductCode(String finishProductCode) |
|
||||
{ |
|
||||
this.finishProductCode = finishProductCode; |
|
||||
} |
|
||||
|
|
||||
public String getFinishProductCode() |
|
||||
{ |
|
||||
return finishProductCode; |
|
||||
} |
|
||||
public void setSafetyStock(String safetyStock) |
|
||||
{ |
|
||||
this.safetyStock = safetyStock; |
|
||||
} |
|
||||
|
|
||||
public String getSafetyStock() |
|
||||
{ |
|
||||
return safetyStock; |
|
||||
} |
|
||||
public void setStockUnitWeight(String stockUnitWeight) |
|
||||
{ |
|
||||
this.stockUnitWeight = stockUnitWeight; |
|
||||
} |
|
||||
|
|
||||
public String getStockUnitWeight() |
|
||||
{ |
|
||||
return stockUnitWeight; |
|
||||
} |
|
||||
public void setGpItemSelection(String gpItemSelection) |
|
||||
{ |
|
||||
this.gpItemSelection = gpItemSelection; |
|
||||
} |
|
||||
|
|
||||
public String getGpItemSelection() |
|
||||
{ |
|
||||
return gpItemSelection; |
|
||||
} |
|
||||
public void setInPlantCode(String inPlantCode) |
|
||||
{ |
|
||||
this.inPlantCode = inPlantCode; |
|
||||
} |
|
||||
|
|
||||
public String getInPlantCode() |
|
||||
{ |
|
||||
return inPlantCode; |
|
||||
} |
|
||||
public void setWhetherStop(String whetherStop) |
|
||||
{ |
|
||||
this.whetherStop = whetherStop; |
|
||||
} |
|
||||
|
|
||||
public String getWhetherStop() |
|
||||
{ |
|
||||
return whetherStop; |
|
||||
} |
|
||||
public void setCreaterName(String createrName) |
|
||||
{ |
|
||||
this.createrName = createrName; |
|
||||
} |
|
||||
|
|
||||
public String getCreaterName() |
|
||||
{ |
|
||||
return createrName; |
|
||||
} |
|
||||
public void setOrdinalName(String ordinalName) |
|
||||
{ |
|
||||
this.ordinalName = ordinalName; |
|
||||
} |
|
||||
|
|
||||
public String getOrdinalName() |
|
||||
{ |
|
||||
return ordinalName; |
|
||||
} |
|
||||
public void setOriginalNumber(String originalNumber) |
|
||||
{ |
|
||||
this.originalNumber = originalNumber; |
|
||||
} |
|
||||
|
|
||||
public String getOriginalNumber() |
|
||||
{ |
|
||||
return originalNumber; |
|
||||
} |
|
||||
public void setCustomsName(String customsName) |
|
||||
{ |
|
||||
this.customsName = customsName; |
|
||||
} |
|
||||
|
|
||||
public String getCustomsName() |
|
||||
{ |
|
||||
return customsName; |
|
||||
} |
|
||||
public void setDefaultWarehouse(String defaultWarehouse) |
|
||||
{ |
|
||||
this.defaultWarehouse = defaultWarehouse; |
|
||||
} |
|
||||
|
|
||||
public String getDefaultWarehouse() |
|
||||
{ |
|
||||
return defaultWarehouse; |
|
||||
} |
|
||||
public void setMaterialCategory(String materialCategory) |
|
||||
{ |
|
||||
this.materialCategory = materialCategory; |
|
||||
} |
|
||||
|
|
||||
public String getMaterialCategory() |
|
||||
{ |
|
||||
return materialCategory; |
|
||||
} |
|
||||
public void setProductionCategory(String productionCategory) |
|
||||
{ |
|
||||
this.productionCategory = productionCategory; |
|
||||
} |
|
||||
|
|
||||
public String getProductionCategory() |
|
||||
{ |
|
||||
return productionCategory; |
|
||||
} |
|
||||
public void setFinishProductCategory(String finishProductCategory) |
|
||||
{ |
|
||||
this.finishProductCategory = finishProductCategory; |
|
||||
} |
|
||||
|
|
||||
public String getFinishProductCategory() |
|
||||
{ |
|
||||
return finishProductCategory; |
|
||||
} |
|
||||
public void setSpecificationModel(String specificationModel) |
|
||||
{ |
|
||||
this.specificationModel = specificationModel; |
|
||||
} |
|
||||
|
|
||||
public String getSpecificationModel() |
|
||||
{ |
|
||||
return specificationModel; |
|
||||
} |
|
||||
public void setCustomerEngineer(String customerEngineer) |
|
||||
{ |
|
||||
this.customerEngineer = customerEngineer; |
|
||||
} |
|
||||
|
|
||||
public String getCustomerEngineer() |
|
||||
{ |
|
||||
return customerEngineer; |
|
||||
} |
|
||||
public void setProductDescription(String productDescription) |
|
||||
{ |
|
||||
this.productDescription = productDescription; |
|
||||
} |
|
||||
|
|
||||
public String getProductDescription() |
|
||||
{ |
|
||||
return productDescription; |
|
||||
} |
|
||||
public void setMaximumInventory(String maximumInventory) |
|
||||
{ |
|
||||
this.maximumInventory = maximumInventory; |
|
||||
} |
|
||||
|
|
||||
public String getMaximumInventory() |
|
||||
{ |
|
||||
return maximumInventory; |
|
||||
} |
|
||||
public void setProductPrice(String productPrice) |
|
||||
{ |
|
||||
this.productPrice = productPrice; |
|
||||
} |
|
||||
|
|
||||
public String getProductPrice() |
|
||||
{ |
|
||||
return productPrice; |
|
||||
} |
|
||||
public void setComponentName(String componentName) |
|
||||
{ |
|
||||
this.componentName = componentName; |
|
||||
} |
|
||||
|
|
||||
public String getComponentName() |
|
||||
{ |
|
||||
return componentName; |
|
||||
} |
|
||||
public void setCreaterTime(String createrTime) |
|
||||
{ |
|
||||
this.createrTime = createrTime; |
|
||||
} |
|
||||
|
|
||||
public String getCreaterTime() |
|
||||
{ |
|
||||
return createrTime; |
|
||||
} |
|
||||
public void setOrdinalNumber(String ordinalNumber) |
|
||||
{ |
|
||||
this.ordinalNumber = ordinalNumber; |
|
||||
} |
|
||||
|
|
||||
public String getOrdinalNumber() |
|
||||
{ |
|
||||
return ordinalNumber; |
|
||||
} |
|
||||
public void setDefaultLocation(String defaultLocation) |
|
||||
{ |
|
||||
this.defaultLocation = defaultLocation; |
|
||||
} |
|
||||
|
|
||||
public String getDefaultLocation() |
|
||||
{ |
|
||||
return defaultLocation; |
|
||||
} |
|
||||
public void setHsNumber(String hsNumber) |
|
||||
{ |
|
||||
this.hsNumber = hsNumber; |
|
||||
} |
|
||||
|
|
||||
public String getHsNumber() |
|
||||
{ |
|
||||
return hsNumber; |
|
||||
} |
|
||||
public void setKesNumber(String kesNumber) |
|
||||
{ |
|
||||
this.kesNumber = kesNumber; |
|
||||
} |
|
||||
|
|
||||
public String getKesNumber() |
|
||||
{ |
|
||||
return kesNumber; |
|
||||
} |
|
||||
|
|
||||
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; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public String toString() { |
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|
||||
.append("finishProductId", getFinishProductId()) |
|
||||
.append("customerNumber", getCustomerNumber()) |
|
||||
.append("typeMachine", getTypeMachine()) |
|
||||
.append("finishProductName", getFinishProductName()) |
|
||||
.append("enterpriseCode", getEnterpriseCode()) |
|
||||
.append("enterpriseName", getEnterpriseName()) |
|
||||
.append("inventoryUnit", getInventoryUnit()) |
|
||||
.append("versionNumber", getVersionNumber()) |
|
||||
.append("finishProductCode", getFinishProductCode()) |
|
||||
.append("safetyStock", getSafetyStock()) |
|
||||
.append("stockUnitWeight", getStockUnitWeight()) |
|
||||
.append("gpItemSelection", getGpItemSelection()) |
|
||||
.append("inPlantCode", getInPlantCode()) |
|
||||
.append("whetherStop", getWhetherStop()) |
|
||||
.append("createrName", getCreaterName()) |
|
||||
.append("ordinalName", getOrdinalName()) |
|
||||
.append("originalNumber", getOriginalNumber()) |
|
||||
.append("customsName", getCustomsName()) |
|
||||
.append("defaultWarehouse", getDefaultWarehouse()) |
|
||||
.append("materialCategory", getMaterialCategory()) |
|
||||
.append("productionCategory", getProductionCategory()) |
|
||||
.append("finishProductCategory", getFinishProductCategory()) |
|
||||
.append("specificationModel", getSpecificationModel()) |
|
||||
.append("customerEngineer", getCustomerEngineer()) |
|
||||
.append("productDescription", getProductDescription()) |
|
||||
.append("maximumInventory", getMaximumInventory()) |
|
||||
.append("productPrice", getProductPrice()) |
|
||||
.append("componentName", getComponentName()) |
|
||||
.append("createrTime", getCreaterTime()) |
|
||||
.append("ordinalNumber", getOrdinalNumber()) |
|
||||
.append("defaultLocation", getDefaultLocation()) |
|
||||
.append("hsNumber", getHsNumber()) |
|
||||
.append("kesNumber", getKesNumber()) |
|
||||
.append("firstAddTime", getFirstAddTime()) |
|
||||
.append("updateInfoTime", getUpdateInfoTime()) |
|
||||
.toString(); |
|
||||
} |
|
||||
} |
|
@ -1,68 +0,0 @@ |
|||||
package com.ruoyi.system.mapper; |
|
||||
|
|
||||
import com.ruoyi.system.domain.SysFinishProduct; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* 成品资料Mapper接口 |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2022-11-03 |
|
||||
*/ |
|
||||
public interface SysFinishProductMapper |
|
||||
{ |
|
||||
/** |
|
||||
* 查询成品资料 |
|
||||
* |
|
||||
* @param finishProductId 成品资料ID |
|
||||
* @return 成品资料 |
|
||||
*/ |
|
||||
public SysFinishProduct selectSysFinishProductById(Long finishProductId); |
|
||||
|
|
||||
/** |
|
||||
* 查询成品资料列表 |
|
||||
* |
|
||||
* @param sysFinishProduct 成品资料 |
|
||||
* @return 成品资料集合 |
|
||||
*/ |
|
||||
public List<SysFinishProduct> selectSysFinishProductList(SysFinishProduct sysFinishProduct); |
|
||||
|
|
||||
/** |
|
||||
* 新增成品资料 |
|
||||
* |
|
||||
* @param sysFinishProduct 成品资料 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int insertSysFinishProduct(SysFinishProduct sysFinishProduct); |
|
||||
|
|
||||
/** |
|
||||
* 修改成品资料 |
|
||||
* |
|
||||
* @param sysFinishProduct 成品资料 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int updateSysFinishProduct(SysFinishProduct sysFinishProduct); |
|
||||
|
|
||||
/** |
|
||||
* 删除成品资料 |
|
||||
* |
|
||||
* @param finishProductId 成品资料ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteSysFinishProductById(Long finishProductId); |
|
||||
|
|
||||
/** |
|
||||
* 批量删除成品资料 |
|
||||
* |
|
||||
* @param finishProductIds 需要删除的数据ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteSysFinishProductByIds(String[] finishProductIds); |
|
||||
|
|
||||
public List<SysFinishProduct> selectAllSysFinishProductList(); |
|
||||
|
|
||||
public SysFinishProduct selectFinishProductByCode(String finishProductCode); |
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,67 +0,0 @@ |
|||||
package com.ruoyi.system.service; |
|
||||
|
|
||||
import com.ruoyi.system.domain.SysFinishProduct; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* 成品资料Service接口 |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2022-11-03 |
|
||||
*/ |
|
||||
public interface ISysFinishProductService |
|
||||
{ |
|
||||
/** |
|
||||
* 查询成品资料 |
|
||||
* |
|
||||
* @param finishProductId 成品资料ID |
|
||||
* @return 成品资料 |
|
||||
*/ |
|
||||
public SysFinishProduct selectSysFinishProductById(Long finishProductId); |
|
||||
|
|
||||
/** |
|
||||
* 查询成品资料列表 |
|
||||
* |
|
||||
* @param sysFinishProduct 成品资料 |
|
||||
* @return 成品资料集合 |
|
||||
*/ |
|
||||
public List<SysFinishProduct> selectSysFinishProductList(SysFinishProduct sysFinishProduct); |
|
||||
|
|
||||
/** |
|
||||
* 新增成品资料 |
|
||||
* |
|
||||
* @param sysFinishProduct 成品资料 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int insertSysFinishProduct(SysFinishProduct sysFinishProduct); |
|
||||
|
|
||||
/** |
|
||||
* 修改成品资料 |
|
||||
* |
|
||||
* @param sysFinishProduct 成品资料 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int updateSysFinishProduct(SysFinishProduct sysFinishProduct); |
|
||||
|
|
||||
/** |
|
||||
* 批量删除成品资料 |
|
||||
* |
|
||||
* @param ids 需要删除的数据ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteSysFinishProductByIds(String ids); |
|
||||
|
|
||||
/** |
|
||||
* 删除成品资料信息 |
|
||||
* |
|
||||
* @param finishProductId 成品资料ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
public int deleteSysFinishProductById(Long finishProductId); |
|
||||
|
|
||||
public List<SysFinishProduct> selectAllSysFinishProductList(); |
|
||||
|
|
||||
public SysFinishProduct selectFinishProductByCode(String finishProductCode); |
|
||||
|
|
||||
} |
|
@ -1,105 +0,0 @@ |
|||||
package com.ruoyi.system.service.impl; |
|
||||
|
|
||||
import com.ruoyi.common.core.text.Convert; |
|
||||
import com.ruoyi.system.domain.SysFinishProduct; |
|
||||
import com.ruoyi.system.mapper.SysFinishProductMapper; |
|
||||
import com.ruoyi.system.service.ISysFinishProductService; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* 成品资料Service业务层处理 |
|
||||
* |
|
||||
* @author ruoyi |
|
||||
* @date 2022-11-03 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class SysFinishProductServiceImpl implements ISysFinishProductService |
|
||||
{ |
|
||||
@Autowired |
|
||||
private SysFinishProductMapper sysFinishProductMapper; |
|
||||
|
|
||||
/** |
|
||||
* 查询成品资料 |
|
||||
* |
|
||||
* @param finishProductId 成品资料ID |
|
||||
* @return 成品资料 |
|
||||
*/ |
|
||||
@Override |
|
||||
public SysFinishProduct selectSysFinishProductById(Long finishProductId) |
|
||||
{ |
|
||||
return sysFinishProductMapper.selectSysFinishProductById(finishProductId); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 查询成品资料列表 |
|
||||
* |
|
||||
* @param sysFinishProduct 成品资料 |
|
||||
* @return 成品资料 |
|
||||
*/ |
|
||||
@Override |
|
||||
public List<SysFinishProduct> selectSysFinishProductList(SysFinishProduct sysFinishProduct) |
|
||||
{ |
|
||||
return sysFinishProductMapper.selectSysFinishProductList(sysFinishProduct); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 新增成品资料 |
|
||||
* |
|
||||
* @param sysFinishProduct 成品资料 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
@Override |
|
||||
public int insertSysFinishProduct(SysFinishProduct sysFinishProduct) |
|
||||
{ |
|
||||
return sysFinishProductMapper.insertSysFinishProduct(sysFinishProduct); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 修改成品资料 |
|
||||
* |
|
||||
* @param sysFinishProduct 成品资料 |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
@Override |
|
||||
public int updateSysFinishProduct(SysFinishProduct sysFinishProduct) |
|
||||
{ |
|
||||
return sysFinishProductMapper.updateSysFinishProduct(sysFinishProduct); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 删除成品资料对象 |
|
||||
* |
|
||||
* @param ids 需要删除的数据ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
@Override |
|
||||
public int deleteSysFinishProductByIds(String ids) |
|
||||
{ |
|
||||
return sysFinishProductMapper.deleteSysFinishProductByIds(Convert.toStrArray(ids)); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 删除成品资料信息 |
|
||||
* |
|
||||
* @param finishProductId 成品资料ID |
|
||||
* @return 结果 |
|
||||
*/ |
|
||||
@Override |
|
||||
public int deleteSysFinishProductById(Long finishProductId) |
|
||||
{ |
|
||||
return sysFinishProductMapper.deleteSysFinishProductById(finishProductId); |
|
||||
} |
|
||||
//获取成品信息
|
|
||||
@Override |
|
||||
public List<SysFinishProduct> selectAllSysFinishProductList() { |
|
||||
return sysFinishProductMapper.selectAllSysFinishProductList(); |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public SysFinishProduct selectFinishProductByCode(String finishProductCode) { |
|
||||
return sysFinishProductMapper.selectFinishProductByCode(finishProductCode); |
|
||||
} |
|
||||
} |
|
@ -1,206 +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.SysFinishProductMapper"> |
|
||||
|
|
||||
<resultMap type="SysFinishProduct" id="SysFinishProductResult"> |
|
||||
<result property="finishProductId" column="finish_product_id" /> |
|
||||
<result property="customerNumber" column="customer_number" /> |
|
||||
<result property="typeMachine" column="type_machine" /> |
|
||||
<result property="finishProductName" column="finish_product_name" /> |
|
||||
<result property="enterpriseCode" column="enterprise_code" /> |
|
||||
<result property="enterpriseName" column="enterprise_name" /> |
|
||||
<result property="inventoryUnit" column="inventory_unit" /> |
|
||||
<result property="versionNumber" column="version_number" /> |
|
||||
<result property="finishProductCode" column="finish_product_code" /> |
|
||||
<result property="safetyStock" column="safety_stock" /> |
|
||||
<result property="stockUnitWeight" column="stock_unit_weight" /> |
|
||||
<result property="gpItemSelection" column="gp_Item_selection" /> |
|
||||
<result property="inPlantCode" column="In_plant_code" /> |
|
||||
<result property="whetherStop" column="whether_stop" /> |
|
||||
<result property="createrName" column="creater_name" /> |
|
||||
<result property="ordinalName" column="ordinal_name" /> |
|
||||
<result property="originalNumber" column="original_number" /> |
|
||||
<result property="customsName" column="customs_name" /> |
|
||||
<result property="defaultWarehouse" column="default_warehouse" /> |
|
||||
<result property="materialCategory" column="material_category" /> |
|
||||
<result property="productionCategory" column="production_category" /> |
|
||||
<result property="finishProductCategory" column="finish_product_category" /> |
|
||||
<result property="specificationModel" column="specification_model" /> |
|
||||
<result property="customerEngineer" column="customer_engineer" /> |
|
||||
<result property="productDescription" column="product_description" /> |
|
||||
<result property="maximumInventory" column="maximum_inventory" /> |
|
||||
<result property="productPrice" column="product_price" /> |
|
||||
<result property="componentName" column="component_name" /> |
|
||||
<result property="createrTime" column="creater_time" /> |
|
||||
<result property="ordinalNumber" column="ordinal_number" /> |
|
||||
<result property="defaultLocation" column="default_location" /> |
|
||||
<result property="hsNumber" column="hs_number" /> |
|
||||
<result property="kesNumber" column="kes_number" /> |
|
||||
<result property="firstAddTime" column="first_add_time" /> |
|
||||
<result property="updateInfoTime" column="update_info_time" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="selectSysFinishProductVo"> |
|
||||
select finish_product_id, customer_number, type_machine, finish_product_name, enterprise_code, enterprise_name, inventory_unit, version_number, finish_product_code, safety_stock, stock_unit_weight, gp_Item_selection, In_plant_code, whether_stop, creater_name, ordinal_name, original_number, customs_name, default_warehouse, material_category, production_category, finish_product_category, specification_model, customer_engineer, product_description, maximum_inventory, product_price, component_name, creater_time, ordinal_number, default_location, hs_number, kes_number, first_add_time, update_info_time from sys_finish_product |
|
||||
</sql> |
|
||||
|
|
||||
<select id="selectSysFinishProductList" parameterType="SysFinishProduct" resultMap="SysFinishProductResult"> |
|
||||
<include refid="selectSysFinishProductVo"/> |
|
||||
<where> |
|
||||
<if test="customerNumber != null and customerNumber != ''"> and customer_number = #{customerNumber}</if> |
|
||||
<if test="finishProductName != null and finishProductName != ''"> and finish_product_name like concat('%', #{finishProductName}, '%')</if> |
|
||||
<if test="enterpriseCode != null and enterpriseCode != ''"> and enterprise_code = #{enterpriseCode}</if> |
|
||||
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if> |
|
||||
<if test="inventoryUnit != null and inventoryUnit != ''"> and inventory_unit = #{inventoryUnit}</if> |
|
||||
<if test="versionNumber != null and versionNumber != ''"> and version_number = #{versionNumber}</if> |
|
||||
<if test="finishProductCode != null and finishProductCode != ''"> and finish_product_code = #{finishProductCode}</if> |
|
||||
<if test="inPlantCode != null and inPlantCode != ''"> and In_plant_code = #{inPlantCode}</if> |
|
||||
<if test="productionCategory != null and productionCategory != ''"> and production_category = #{productionCategory}</if> |
|
||||
<if test="specificationModel != null and specificationModel != ''"> and specification_model = #{specificationModel}</if> |
|
||||
<if test="customerEngineer != null and customerEngineer != ''"> and customer_engineer = #{customerEngineer}</if> |
|
||||
<if test="createrTime != null and createrTime != ''"> and creater_time = #{createrTime}</if> |
|
||||
</where> |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectFinishProductByCode" parameterType="String" resultMap="SysFinishProductResult"> |
|
||||
<include refid="selectSysFinishProductVo"/> |
|
||||
where finish_product_code = #{finishProductCode} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectAllSysFinishProductList" resultMap="SysFinishProductResult"> |
|
||||
select finish_product_id, customer_number, type_machine, finish_product_name, enterprise_code, enterprise_name, inventory_unit, version_number, finish_product_code, safety_stock, stock_unit_weight, gp_Item_selection, In_plant_code, whether_stop, creater_name, ordinal_name, original_number, customs_name, default_warehouse, material_category, production_category, finish_product_category, specification_model, customer_engineer, product_description, maximum_inventory, product_price, component_name, creater_time, ordinal_number, default_location, hs_number, kes_number, first_add_time, update_info_time from sys_finish_product |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectSysFinishProductById" parameterType="Long" resultMap="SysFinishProductResult"> |
|
||||
<include refid="selectSysFinishProductVo"/> |
|
||||
where finish_product_id = #{finishProductId} |
|
||||
</select> |
|
||||
|
|
||||
<insert id="insertSysFinishProduct" parameterType="SysFinishProduct" useGeneratedKeys="true" keyProperty="finishProductId"> |
|
||||
insert into sys_finish_product |
|
||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
||||
<if test="customerNumber != null">customer_number,</if> |
|
||||
<if test="typeMachine != null">type_machine,</if> |
|
||||
<if test="finishProductName != null">finish_product_name,</if> |
|
||||
<if test="enterpriseCode != null">enterprise_code,</if> |
|
||||
<if test="enterpriseName != null">enterprise_name,</if> |
|
||||
<if test="inventoryUnit != null">inventory_unit,</if> |
|
||||
<if test="versionNumber != null">version_number,</if> |
|
||||
<if test="finishProductCode != null">finish_product_code,</if> |
|
||||
<if test="safetyStock != null">safety_stock,</if> |
|
||||
<if test="stockUnitWeight != null">stock_unit_weight,</if> |
|
||||
<if test="gpItemSelection != null">gp_Item_selection,</if> |
|
||||
<if test="inPlantCode != null">In_plant_code,</if> |
|
||||
<if test="whetherStop != null">whether_stop,</if> |
|
||||
<if test="createrName != null">creater_name,</if> |
|
||||
<if test="ordinalName != null">ordinal_name,</if> |
|
||||
<if test="originalNumber != null">original_number,</if> |
|
||||
<if test="customsName != null">customs_name,</if> |
|
||||
<if test="defaultWarehouse != null">default_warehouse,</if> |
|
||||
<if test="materialCategory != null">material_category,</if> |
|
||||
<if test="productionCategory != null">production_category,</if> |
|
||||
<if test="finishProductCategory != null">finish_product_category,</if> |
|
||||
<if test="specificationModel != null">specification_model,</if> |
|
||||
<if test="customerEngineer != null">customer_engineer,</if> |
|
||||
<if test="productDescription != null">product_description,</if> |
|
||||
<if test="maximumInventory != null">maximum_inventory,</if> |
|
||||
<if test="productPrice != null">product_price,</if> |
|
||||
<if test="componentName != null">component_name,</if> |
|
||||
<if test="createrTime != null">creater_time,</if> |
|
||||
<if test="ordinalNumber != null">ordinal_number,</if> |
|
||||
<if test="defaultLocation != null">default_location,</if> |
|
||||
<if test="hsNumber != null">hs_number,</if> |
|
||||
<if test="kesNumber != null">kes_number,</if> |
|
||||
first_add_time, |
|
||||
</trim> |
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
||||
<if test="customerNumber != null">#{customerNumber},</if> |
|
||||
<if test="typeMachine != null">#{typeMachine},</if> |
|
||||
<if test="finishProductName != null">#{finishProductName},</if> |
|
||||
<if test="enterpriseCode != null">#{enterpriseCode},</if> |
|
||||
<if test="enterpriseName != null">#{enterpriseName},</if> |
|
||||
<if test="inventoryUnit != null">#{inventoryUnit},</if> |
|
||||
<if test="versionNumber != null">#{versionNumber},</if> |
|
||||
<if test="finishProductCode != null">#{finishProductCode},</if> |
|
||||
<if test="safetyStock != null">#{safetyStock},</if> |
|
||||
<if test="stockUnitWeight != null">#{stockUnitWeight},</if> |
|
||||
<if test="gpItemSelection != null">#{gpItemSelection},</if> |
|
||||
<if test="inPlantCode != null">#{inPlantCode},</if> |
|
||||
<if test="whetherStop != null">#{whetherStop},</if> |
|
||||
<if test="createrName != null">#{createrName},</if> |
|
||||
<if test="ordinalName != null">#{ordinalName},</if> |
|
||||
<if test="originalNumber != null">#{originalNumber},</if> |
|
||||
<if test="customsName != null">#{customsName},</if> |
|
||||
<if test="defaultWarehouse != null">#{defaultWarehouse},</if> |
|
||||
<if test="materialCategory != null">#{materialCategory},</if> |
|
||||
<if test="productionCategory != null">#{productionCategory},</if> |
|
||||
<if test="finishProductCategory != null">#{finishProductCategory},</if> |
|
||||
<if test="specificationModel != null">#{specificationModel},</if> |
|
||||
<if test="customerEngineer != null">#{customerEngineer},</if> |
|
||||
<if test="productDescription != null">#{productDescription},</if> |
|
||||
<if test="maximumInventory != null">#{maximumInventory},</if> |
|
||||
<if test="productPrice != null">#{productPrice},</if> |
|
||||
<if test="componentName != null">#{componentName},</if> |
|
||||
<if test="createrTime != null">#{createrTime},</if> |
|
||||
<if test="ordinalNumber != null">#{ordinalNumber},</if> |
|
||||
<if test="defaultLocation != null">#{defaultLocation},</if> |
|
||||
<if test="hsNumber != null">#{hsNumber},</if> |
|
||||
<if test="kesNumber != null">#{kesNumber},</if> |
|
||||
now(), |
|
||||
</trim> |
|
||||
</insert> |
|
||||
|
|
||||
<update id="updateSysFinishProduct" parameterType="SysFinishProduct"> |
|
||||
update sys_finish_product |
|
||||
<trim prefix="SET" suffixOverrides=","> |
|
||||
<if test="customerNumber != null">customer_number = #{customerNumber},</if> |
|
||||
<if test="typeMachine != null">type_machine = #{typeMachine},</if> |
|
||||
<if test="finishProductName != null">finish_product_name = #{finishProductName},</if> |
|
||||
<if test="enterpriseCode != null">enterprise_code = #{enterpriseCode},</if> |
|
||||
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if> |
|
||||
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if> |
|
||||
<if test="versionNumber != null">version_number = #{versionNumber},</if> |
|
||||
<if test="finishProductCode != null">finish_product_code = #{finishProductCode},</if> |
|
||||
<if test="safetyStock != null">safety_stock = #{safetyStock},</if> |
|
||||
<if test="stockUnitWeight != null">stock_unit_weight = #{stockUnitWeight},</if> |
|
||||
<if test="gpItemSelection != null">gp_Item_selection = #{gpItemSelection},</if> |
|
||||
<if test="inPlantCode != null">In_plant_code = #{inPlantCode},</if> |
|
||||
<if test="whetherStop != null">whether_stop = #{whetherStop},</if> |
|
||||
<if test="createrName != null">creater_name = #{createrName},</if> |
|
||||
<if test="ordinalName != null">ordinal_name = #{ordinalName},</if> |
|
||||
<if test="originalNumber != null">original_number = #{originalNumber},</if> |
|
||||
<if test="customsName != null">customs_name = #{customsName},</if> |
|
||||
<if test="defaultWarehouse != null">default_warehouse = #{defaultWarehouse},</if> |
|
||||
<if test="materialCategory != null">material_category = #{materialCategory},</if> |
|
||||
<if test="productionCategory != null">production_category = #{productionCategory},</if> |
|
||||
<if test="finishProductCategory != null">finish_product_category = #{finishProductCategory},</if> |
|
||||
<if test="specificationModel != null">specification_model = #{specificationModel},</if> |
|
||||
<if test="customerEngineer != null">customer_engineer = #{customerEngineer},</if> |
|
||||
<if test="productDescription != null">product_description = #{productDescription},</if> |
|
||||
<if test="maximumInventory != null">maximum_inventory = #{maximumInventory},</if> |
|
||||
<if test="productPrice != null">product_price = #{productPrice},</if> |
|
||||
<if test="componentName != null">component_name = #{componentName},</if> |
|
||||
<if test="createrTime != null">creater_time = #{createrTime},</if> |
|
||||
<if test="ordinalNumber != null">ordinal_number = #{ordinalNumber},</if> |
|
||||
<if test="defaultLocation != null">default_location = #{defaultLocation},</if> |
|
||||
<if test="hsNumber != null">hs_number = #{hsNumber},</if> |
|
||||
<if test="kesNumber != null">kes_number = #{kesNumber},</if> |
|
||||
update_info_time = CONCAT_WS(',',NOW(),update_info_time), |
|
||||
</trim> |
|
||||
where finish_product_id = #{finishProductId} |
|
||||
</update> |
|
||||
|
|
||||
<delete id="deleteSysFinishProductById" parameterType="Long"> |
|
||||
delete from sys_finish_product where finish_product_id = #{finishProductId} |
|
||||
</delete> |
|
||||
|
|
||||
<delete id="deleteSysFinishProductByIds" parameterType="String"> |
|
||||
delete from sys_finish_product where finish_product_id in |
|
||||
<foreach item="finishProductId" collection="array" open="(" separator="," close=")"> |
|
||||
#{finishProductId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
</mapper> |
|
@ -1,341 +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"> |
|
||||
</head> |
|
||||
<body class="white-bg"> |
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
||||
<form class="form-horizontal m" id="form-finishproduct-add"> |
|
||||
<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"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">生产类别:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<select name="productionCategory" class="form-control m-b" th:with="type=${@dict.getType('sys_production_category')}"> |
|
||||
<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="finishProductCategory" class="form-control m-b" th:with="type=${@dict.getType('sys_finish_product_category')}"> |
|
||||
<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 is-required">客户代码:</label> |
|
||||
<div class="col-sm-8" > |
|
||||
<select id="enterpriseCode" name="enterpriseCode" class="form-control m-b" required> |
|
||||
<option value="">请选择客户代码</option> |
|
||||
</select> |
|
||||
<!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>--> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label is-required">客户名称:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<!-- <select id="enterpriseName" name="enterpriseName" class="form-control m-b" required>--> |
|
||||
<!-- <option value="">所有</option>--> |
|
||||
<!-- </select>--> |
|
||||
<input name="enterpriseName" class="form-control" type="text" readonly required> |
|
||||
|
|
||||
</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"> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label is-required">成品代码:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="finishProductCode" class="form-control" type="text" required> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label is-required">成品名称:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="finishProductName" class="form-control" type="text" required> |
|
||||
</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"> |
|
||||
</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"> |
|
||||
<input name="versionNumber" 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="customerEngineer" 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="productDescription" class="form-control"></textarea> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">最高库存:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="maximumInventory" 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="productPrice" 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="componentName" 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="safetyStock" 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="stockUnitWeight" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">GP项选择:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<select name="gpItemSelection" class="form-control m-b" th:with="type=${@dict.getType('sys_gp_Item_selection')}"> |
|
||||
<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="inPlantCode" 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="radio-box" th:each="dict : ${@dict.getType('sys_whether')}"> |
|
||||
<input type="radio" th:id="${'whetherStop_' + dict.dictCode}" name="whetherStop" th:value="${dict.dictValue}" th:checked="${dict.default}"> |
|
||||
<label th:for="${'whetherStop_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">创建人:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="createrName" 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="customsName" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">默认仓库:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<select name="defaultWarehouse" 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="materialCategory" class="form-control m-b" th:with="type=${@dict.getType('sys_material_category')}"> |
|
||||
<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 name="createrTime" 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="ordinalNumber" 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="ordinalName" 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="defaultLocation" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">HS号:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="hsNumber" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">原成品料号:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<select name="originalNumber" class="form-control m-b"> |
|
||||
<option value="">所有</option> |
|
||||
</select> |
|
||||
<!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>--> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">科恩仕料号:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="kesNumber" 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="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 :: datetimepicker-js" /> |
|
||||
<th:block th:include="include :: select2-js"/> |
|
||||
<script th:inline="javascript"> |
|
||||
var prefix = ctx + "system/finishproduct" |
|
||||
$("#form-finishproduct-add").validate({ |
|
||||
focusCleanup: true |
|
||||
}); |
|
||||
|
|
||||
function submitHandler() { |
|
||||
if ($.validate.form()) { |
|
||||
$.operate.save(prefix + "/add", $('#form-finishproduct-add').serialize()); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
$("input[name='createrTime']").datetimepicker({ |
|
||||
format: "yyyy-mm-dd", |
|
||||
minView: "month", |
|
||||
autoclose: true |
|
||||
}); |
|
||||
|
|
||||
//客户信息 |
|
||||
var customerodata = [] |
|
||||
$.ajax({ |
|
||||
url: ctx + "system/customer/list", |
|
||||
type: "POST", |
|
||||
success: function (res) { |
|
||||
// console.log(res) |
|
||||
if (res.rows.length > 0) { |
|
||||
customerodata = res.rows; |
|
||||
//alert(JSON.stringify(data)); |
|
||||
console.log(res.rows) |
|
||||
for (let i in customerodata) { |
|
||||
$("select[name='enterpriseCode']").append("<option value='" + customerodata[i].enterpriseCode + "'>" + customerodata[i].enterpriseCode + "</option>"); |
|
||||
// $("select[name='enterpriseName']").append("<option value='" + customerodata[i].enterpriseName + "'>" + customerodata[i].enterpriseName + "</option>"); |
|
||||
} |
|
||||
} else { |
|
||||
$.modal.msgError(res.msg); |
|
||||
} |
|
||||
}, |
|
||||
error: function () { |
|
||||
$.modal.msgError("后台出错啦!"); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
}) |
|
||||
|
|
||||
$("select[name='enterpriseCode']").change(function () { |
|
||||
var enterpriseCode = $(this).val(); |
|
||||
for (i = 0; i < customerodata.length; i++) { |
|
||||
if (customerodata[i].enterpriseCode === enterpriseCode) { |
|
||||
$("input[name='enterpriseName']").val(customerodata[i].enterpriseName) |
|
||||
} |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
|
|
||||
//仓库信息 |
|
||||
$.ajax({ |
|
||||
url: ctx + "stock/stockInfo/list", |
|
||||
type: "POST", |
|
||||
success: function (res) { |
|
||||
// console.log(res) |
|
||||
if (res.rows.length > 0) { |
|
||||
stockInfodata = res.rows; |
|
||||
//alert(JSON.stringify(data)); |
|
||||
console.log(res.rows) |
|
||||
for (let i in stockInfodata) { |
|
||||
$("select[name='defaultWarehouse']").append("<option value='" + stockInfodata[i].stockname + "'>" + stockInfodata[i].stockname + "</option>"); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
|
|
||||
} else { |
|
||||
$.modal.msgError(res.msg); |
|
||||
} |
|
||||
}, |
|
||||
error: function () { |
|
||||
$.modal.msgError("后台出错啦!"); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
}) |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,355 +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"> |
|
||||
</head> |
|
||||
<body class="white-bg"> |
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
||||
<form class="form-horizontal m" id="form-finishproduct-edit" th:object="${sysFinishProduct}"> |
|
||||
<input name="finishProductId" th:field="*{finishProductId}" type="hidden"> |
|
||||
<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"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label is-required">客户代码:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<select name="enterpriseCode" class="form-control m-b" required> |
|
||||
<option value="">所有</option> |
|
||||
</select> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label is-required">客户名称:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<select name="enterpriseName" class="form-control m-b" required> |
|
||||
<option value="">所有</option> |
|
||||
</select> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label is-required">成品代码:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="finishProductCode" th:field="*{finishProductCode}" class="form-control" type="text" required> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label is-required">成品名称:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="finishProductName" th:field="*{finishProductName}" class="form-control" type="text" required> |
|
||||
</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"> |
|
||||
</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"> |
|
||||
<input name="versionNumber" th:field="*{versionNumber}" 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="safetyStock" th:field="*{safetyStock}" 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="stockUnitWeight" th:field="*{stockUnitWeight}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">GP项选择:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<select name="gpItemSelection" class="form-control m-b" |
|
||||
th:with="type=${@dict.getType('sys_gp_Item_selection')}"> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" |
|
||||
th:field="*{gpItemSelection}"></option> |
|
||||
</select> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">厂内编码:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="inPlantCode" th:field="*{inPlantCode}" 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="radio-box" th:each="dict : ${@dict.getType('sys_whether')}"> |
|
||||
<input type="radio" th:id="${'whetherStop_' + dict.dictCode}" name="whetherStop" |
|
||||
th:value="${dict.dictValue}" th:field="*{whetherStop}"> |
|
||||
<label th:for="${'whetherStop_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">创建人:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="createrName" th:field="*{createrName}" 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="ordinalName" th:field="*{ordinalName}" 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="customsName" th:field="*{customsName}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">默认仓库:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<select name="defaultWarehouse" 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="materialCategory" class="form-control m-b" |
|
||||
th:with="type=${@dict.getType('sys_material_category')}"> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" |
|
||||
th:field="*{materialCategory}"></option> |
|
||||
</select> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">生产类别:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<select name="productionCategory" class="form-control m-b" |
|
||||
th:with="type=${@dict.getType('sys_production_category')}"> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" |
|
||||
th:field="*{productionCategory}"></option> |
|
||||
</select> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">所属类别:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<select name="finishProductCategory" class="form-control m-b" |
|
||||
th:with="type=${@dict.getType('sys_finish_product_category')}"> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" |
|
||||
th:field="*{finishProductCategory}"></option> |
|
||||
</select> |
|
||||
</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"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">客户工程师:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="customerEngineer" th:field="*{customerEngineer}" 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="productDescription" class="form-control">[[*{productDescription}]]</textarea> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">最高库存:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="maximumInventory" th:field="*{maximumInventory}" 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="productPrice" th:field="*{productPrice}" 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="componentName" th:field="*{componentName}" 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="createrTime" th:value="*{createrTime}" 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="ordinalNumber" th:field="*{ordinalNumber}" 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="defaultLocation" th:field="*{defaultLocation}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">HS号:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<input name="hsNumber" th:field="*{hsNumber}" class="form-control" type="text"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<div class="form-group"> |
|
||||
<label class="col-sm-3 control-label">原成品料号:</label> |
|
||||
<div class="col-sm-8"> |
|
||||
<select name="originalNumber" 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="kesNumber" th:field="*{kesNumber}" 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="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 :: select2-js"/> |
|
||||
|
|
||||
<th:block th:include="include :: datetimepicker-js"/> |
|
||||
<script th:inline="javascript"> |
|
||||
var getData = [[${sysFinishProduct}]]; |
|
||||
var customerdata = [] |
|
||||
var prefix = ctx + "system/finishproduct"; |
|
||||
$("#form-finishproduct-edit").validate({ |
|
||||
focusCleanup: true |
|
||||
}); |
|
||||
|
|
||||
function submitHandler() { |
|
||||
if ($.validate.form()) { |
|
||||
$.operate.save(prefix + "/edit", $('#form-finishproduct-edit').serialize()); |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
$("input[name='createrTime']").datetimepicker({ |
|
||||
format: "yyyy-mm-dd", |
|
||||
minView: "month", |
|
||||
autoclose: true |
|
||||
}); |
|
||||
// 客户信息 |
|
||||
$.ajax({ |
|
||||
url: ctx + "system/customer/list", |
|
||||
type: "POST", |
|
||||
success: function (res) { |
|
||||
// console.log(res) |
|
||||
if (res.rows.length > 0) { |
|
||||
customerdata = res.rows; |
|
||||
//alert(JSON.stringify(data)); |
|
||||
console.log(res.rows) |
|
||||
for (let i in customerdata) { |
|
||||
$("select[name='enterpriseCode']").append("<option value='" + customerdata[i].enterpriseCode + "'>" + customerdata[i].enterpriseCode + "</option>"); |
|
||||
$("select[name='enterpriseName']").append("<option value='" + customerdata[i].enterpriseName + "'>" + customerdata[i].enterpriseName + "</option>"); |
|
||||
|
|
||||
} |
|
||||
$("select[name='enterpriseCode']").val(getData.enterpriseCode).trigger("change") |
|
||||
$("select[name='enterpriseName']").val(getData.enterpriseName).trigger("change") |
|
||||
} else { |
|
||||
$.modal.msgError(res.msg); |
|
||||
} |
|
||||
}, |
|
||||
error: function () { |
|
||||
$.modal.msgError("后台出错啦!"); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
}) |
|
||||
|
|
||||
// 下拉框改变 |
|
||||
$("select[name='enterpriseCode']").change(function () { |
|
||||
|
|
||||
var enterpriseCode = $(this).val(); |
|
||||
|
|
||||
for (i = 0; i < customerdata.length; i++) { |
|
||||
if (customerdata[i].enterpriseCode == enterpriseCode) { |
|
||||
|
|
||||
$("select[name='enterpriseName']").val(customerdata[i].enterpriseName).trigger("change") |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
}) |
|
||||
|
|
||||
|
|
||||
//仓库信息 |
|
||||
|
|
||||
$.ajax({ |
|
||||
url: ctx + "stock/stockInfo/list", |
|
||||
type: "POST", |
|
||||
success: function (res) { |
|
||||
// console.log(res) |
|
||||
if (res.rows.length > 0) { |
|
||||
stockInfodata = res.rows; |
|
||||
//alert(JSON.stringify(data)); |
|
||||
console.log(res.rows) |
|
||||
for (let i in stockInfodata) { |
|
||||
$("select[name='defaultWarehouse']").append("<option value='" + stockInfodata[i].stockname + "'>" + stockInfodata[i].stockname + "</option>"); |
|
||||
|
|
||||
} |
|
||||
$("select[name='defaultWarehouse']").val(getData.defaultWarehouse).trigger("change") |
|
||||
|
|
||||
|
|
||||
} else { |
|
||||
$.modal.msgError(res.msg); |
|
||||
} |
|
||||
}, |
|
||||
error: function () { |
|
||||
$.modal.msgError("后台出错啦!"); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
}) |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
@ -1,366 +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('成品资料列表')" /> |
|
||||
</head> |
|
||||
<body class="gray-bg"> |
|
||||
<div class="container-div"> |
|
||||
<div class="row"> |
|
||||
<div class="col-sm-12 search-collapse"> |
|
||||
<form id="formId"> |
|
||||
<div class="select-list"> |
|
||||
<ul> |
|
||||
<li> |
|
||||
<label>客户料号:</label> |
|
||||
<input type="text" name="customerNumber"/> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>成品名称:</label> |
|
||||
<input type="text" name="finishProductName"/> |
|
||||
</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> |
|
||||
<label>库存单位:</label> |
|
||||
<select name="inventoryUnit" th:with="type=${@dict.getType('sys_unit_class')}"> |
|
||||
<option value="">所有</option> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|
||||
</select> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>版本号:</label> |
|
||||
<input type="text" name="versionNumber"/> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>成品代码:</label> |
|
||||
<input type="text" name="finishProductCode"/> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>厂内编码:</label> |
|
||||
<input type="text" name="inPlantCode"/> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>生产类别:</label> |
|
||||
<select name="productionCategory" th:with="type=${@dict.getType('sys_production_category')}"> |
|
||||
<option value="">所有</option> |
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|
||||
</select> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>规格型号:</label> |
|
||||
<input type="text" name="specificationModel"/> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>客户工程师:</label> |
|
||||
<input type="text" name="customerEngineer"/> |
|
||||
</li> |
|
||||
<li> |
|
||||
<label>创建日期:</label> |
|
||||
<input type="text" class="time-input" placeholder="请选择创建日期" name="createrTime"/> |
|
||||
</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:finishproduct:add"> |
|
||||
<i class="fa fa-plus"></i> 添加 |
|
||||
</a> |
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:finishproduct:edit"> |
|
||||
<i class="fa fa-edit"></i> 修改 |
|
||||
</a> |
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:finishproduct:remove"> |
|
||||
<i class="fa fa-remove"></i> 删除 |
|
||||
</a> |
|
||||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:finishproduct:export">--> |
|
||||
<!-- <i class="fa fa-download"></i> 导出--> |
|
||||
<!-- </a>--> |
|
||||
</div> |
|
||||
<div class="col-sm-12 select-table table-striped"> |
|
||||
<table id="bootstrap-table" style="white-space:nowrap"></table> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
<th:block th:include="include :: footer" /> |
|
||||
<script th:inline="javascript"> |
|
||||
var editFlag = [[${@permission.hasPermi('system:finishproduct:edit')}]]; |
|
||||
var removeFlag = [[${@permission.hasPermi('system:finishproduct:remove')}]]; |
|
||||
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]]; |
|
||||
var gpItemSelectionDatas = [[${@dict.getType('sys_gp_Item_selection')}]]; |
|
||||
var whetherStopDatas = [[${@dict.getType('sys_whether')}]]; |
|
||||
var materialCategoryDatas = [[${@dict.getType('sys_material_category')}]]; |
|
||||
var productionCategoryDatas = [[${@dict.getType('sys_production_category')}]]; |
|
||||
var finishProductCategoryDatas = [[${@dict.getType('sys_finish_product_category')}]]; |
|
||||
var prefix = ctx + "system/finishproduct"; |
|
||||
|
|
||||
$(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: 'finishProductId', |
|
||||
title: '成品id', |
|
||||
visible: false |
|
||||
}, |
|
||||
{ |
|
||||
field: 'customerNumber', |
|
||||
title: '客户料号' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'typeMachine', |
|
||||
title: '机种' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'finishProductName', |
|
||||
title: '成品名称' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'enterpriseCode', |
|
||||
title: '客户代码' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'enterpriseName', |
|
||||
title: '客户名称' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'inventoryUnit', |
|
||||
title: '库存单位', |
|
||||
formatter: function(value, row, index) { |
|
||||
return $.table.selectDictLabel(inventoryUnitDatas, value); |
|
||||
}, |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'versionNumber', |
|
||||
title: '版本号' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'finishProductCode', |
|
||||
title: '成品代码' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'safetyStock', |
|
||||
title: '安全库存', |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'stockUnitWeight', |
|
||||
title: '单位重量', |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'gpItemSelection', |
|
||||
title: 'GP项选择', |
|
||||
formatter: function(value, row, index) { |
|
||||
return $.table.selectDictLabel(gpItemSelectionDatas, value); |
|
||||
}, |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'inPlantCode', |
|
||||
title: '厂内编码' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'whetherStop', |
|
||||
title: '料号是否停用', |
|
||||
formatter: function(value, row, index) { |
|
||||
return $.table.selectDictLabel(whetherStopDatas, value); |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
field: 'createrName', |
|
||||
title: '创建人', |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'ordinalName', |
|
||||
title: '半成品对应完工工序名', |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'originalNumber', |
|
||||
title: '原成品料号', |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'customsName', |
|
||||
title: '海关名称', |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'defaultWarehouse', |
|
||||
title: '默认仓库' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'materialCategory', |
|
||||
title: '类别', |
|
||||
formatter: function(value, row, index) { |
|
||||
return $.table.selectDictLabel(materialCategoryDatas, value); |
|
||||
}, |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'productionCategory', |
|
||||
title: '生产类别', |
|
||||
formatter: function(value, row, index) { |
|
||||
return $.table.selectDictLabel(productionCategoryDatas, value); |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
field: 'finishProductCategory', |
|
||||
title: '所属类别', |
|
||||
formatter: function(value, row, index) { |
|
||||
return $.table.selectDictLabel(finishProductCategoryDatas, value); |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
field: 'specificationModel', |
|
||||
title: '规格型号' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'customerEngineer', |
|
||||
title: '客户工程师' |
|
||||
}, |
|
||||
{ |
|
||||
field: 'productDescription', |
|
||||
title: '产品描述', |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'maximumInventory', |
|
||||
title: '最高库存', |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'productPrice', |
|
||||
title: '产品售价', |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'componentName', |
|
||||
title: '组件名称', |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'createrTime', |
|
||||
title: '创建日期', |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'ordinalNumber', |
|
||||
title: '半成品对应完工工序号', |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'defaultLocation', |
|
||||
title: '默认位置', |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'hsNumber', |
|
||||
title: 'HS号', |
|
||||
visible: false |
|
||||
|
|
||||
}, |
|
||||
{ |
|
||||
field: 'kesNumber', |
|
||||
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.finishProductId + '\')"><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.finishProductId + '\')"><i class="fa fa-remove"></i>删除</a>'); |
|
||||
// return actions.join(''); |
|
||||
// } |
|
||||
// } |
|
||||
] |
|
||||
}; |
|
||||
$.table.init(options); |
|
||||
}); |
|
||||
</script> |
|
||||
</body> |
|
||||
</html> |
|
Loading…
Reference in new issue