Merge branch 'phpsasrs' of http://47.97.1.152:5880/r/zy-asrs into phpsasrs
New file |
| | |
| | | -- save bomMat record |
| | | -- mysql |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'bomMat/bomMat.html', 'bomMat管理', null , '2', null , '1'); |
| | | |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'bomMat#view', '查询', '', '3', '0', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'bomMat#btn-add', '新增', '', '3', '1', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'bomMat#btn-edit', '编辑', '', '3', '2', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'bomMat#btn-delete', '删除', '', '3', '3', '1'); |
| | | insert into `sys_resource` ( `code`, `name`, `resource_id`, `level`, `sort`, `status`) values ( 'bomMat#btn-export', '导出', '', '3', '4', '1'); |
| | | |
| | | -- sqlserver |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'bomMat/bomMat.html', N'bomMat管理', null, '2', null, '1'); |
| | | |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'bomMat#view', N'查询', '', '3', '0', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'bomMat#btn-add', N'新增', '', '3', '1', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'bomMat#btn-edit', N'编辑', '', '3', '2', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'bomMat#btn-delete', N'删除', '', '3', '3', '1'); |
| | | insert [dbo].[sys_resource] ( [code], [name], [resource_id], [level], [sort], [status]) values ( N'bomMat#btn-export', N'导出', '', '3', '4', '1'); |
New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BomMat; |
| | | import com.zy.asrs.service.BomMatService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.common.entity.MatExcel; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.apache.poi.ss.usermodel.DataFormatter; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | public class BomMatController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BomMatService bomMatService; |
| | | |
| | | @RequestMapping(value = "/bomMat/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(bomMatService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/bomMat/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<BomMat> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(bomMatService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/bomMat/add/auth") |
| | | @ManagerAuth |
| | | public R add(BomMat bomMat) { |
| | | Date now = new Date(); |
| | | bomMat.setZpalletAnfme(bomMat.getBomAnfme() * bomMat.getBomCount()); |
| | | bomMat.setModiUser(getUserId()); |
| | | bomMat.setModiTime(now); |
| | | bomMat.setAppeUser(getUserId()); |
| | | bomMat.setAppeTime(now); |
| | | bomMatService.insert(bomMat); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/bomMat/update/auth") |
| | | @ManagerAuth |
| | | public R update(BomMat bomMat){ |
| | | if (Cools.isEmpty(bomMat) || null==bomMat.getId()){ |
| | | return R.error(); |
| | | } |
| | | bomMat.setModiUser(getUserId()); |
| | | bomMat.setModiTime(new Date()); |
| | | bomMatService.updateById(bomMat); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/bomMat/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | bomMatService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/bomMat/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<BomMat> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("bomMat")); |
| | | convert(map, wrapper); |
| | | List<BomMat> list = bomMatService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/bomMatQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<BomMat> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<BomMat> page = bomMatService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BomMat bomMat : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", bomMat.getId()); |
| | | map.put("value", bomMat.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/bomMat/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<BomMat> wrapper = new EntityWrapper<BomMat>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != bomMatService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(BomMat.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * excel导入 |
| | | */ |
| | | @PostMapping(value = "/bomMat/excel/import/auth") |
| | | @ManagerAuth(memo = "组件档案excel导入") |
| | | @Transactional |
| | | public R cstmrExcelImport(MultipartFile file) throws IOException { |
| | | InputStream inStream = file.getInputStream(); |
| | | String fileMime = file.getContentType(); |
| | | int excelVersion = 2007; |
| | | if ("application/vnd.ms-excel".equals(fileMime)) { |
| | | excelVersion = 2003; |
| | | } |
| | | Workbook book = null; |
| | | try { |
| | | if (excelVersion == 2003) { |
| | | book = new HSSFWorkbook(inStream); |
| | | } |
| | | else { // 当 excel 是 2007 时 |
| | | book = new XSSFWorkbook(inStream); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | return R.error("导入文件格式错误,请使用xls后缀的文件!"); |
| | | } |
| | | |
| | | Sheet sheet = book.getSheetAt(0); |
| | | int totalRows = sheet.getLastRowNum() + 1; // 总 |
| | | Long userId = getUserId(); |
| | | Date now = new Date(); |
| | | DataFormatter dataFormatter = new DataFormatter(); |
| | | |
| | | for (int i = 1; i < totalRows; i++) { |
| | | Row row = sheet.getRow(i); |
| | | // 部件品号 |
| | | String unitNum = dataFormatter.formatCellValue(row.getCell(0)); |
| | | // 部件品名 |
| | | String unitName = dataFormatter.formatCellValue(row.getCell(1)); |
| | | // 部件规格 |
| | | String unitSpace = dataFormatter.formatCellValue(row.getCell(2)); |
| | | // 组件品号 |
| | | String bomNum = dataFormatter.formatCellValue(row.getCell(3)); |
| | | // 组件品名 |
| | | String bomName = dataFormatter.formatCellValue(row.getCell(4)); |
| | | // 组件规格 |
| | | String bomSpace = dataFormatter.formatCellValue(row.getCell(5)); |
| | | // 元件品号 |
| | | String elementNum = dataFormatter.formatCellValue(row.getCell(6)); |
| | | // 元件品名 |
| | | String elementName = dataFormatter.formatCellValue(row.getCell(7)); |
| | | // 元件规格 |
| | | String elementSpace = dataFormatter.formatCellValue(row.getCell(8)); |
| | | // 备注 |
| | | String memo = dataFormatter.formatCellValue(row.getCell(9)); |
| | | // 套数 |
| | | Double bomCount = Double.parseDouble(dataFormatter.formatCellValue(row.getCell(10))); |
| | | // 组成用量 |
| | | Double bomAnfme = Double.parseDouble(dataFormatter.formatCellValue(row.getCell(11))); |
| | | BomMat bomMat = bomMatService.selectByThreeCode(unitNum, bomNum, elementNum); |
| | | // 没有就新建,有就更新 |
| | | if (Cools.isEmpty(bomMat)) { |
| | | createBomMat(unitNum, unitName, unitSpace, bomNum, bomName, bomSpace, elementNum, elementName, elementSpace, memo, bomCount, bomAnfme,getUserId()); |
| | | } else { |
| | | updateBomMat(bomMat,unitName,unitSpace,bomName,bomSpace,elementName,elementSpace,memo,bomCount,bomAnfme,userId); |
| | | } |
| | | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * excel导入模板下载 |
| | | */ |
| | | @RequestMapping(value = "/bomMat/excel/import/mould") |
| | | public void matExcelImportMould(HttpServletResponse response) throws IOException { |
| | | List<BomMat> excels = new ArrayList<>(); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | String fileName = URLEncoder.encode("组件档案Excel导入模板", "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | EasyExcel.write(response.getOutputStream(), BomMat.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .sheet("sheet1") |
| | | .doWrite(excels); |
| | | } |
| | | |
| | | private void createBomMat(String unitNum,String unitName,String unitSpace, |
| | | String bomNum,String bomName,String bomSpace, |
| | | String elementNum, String elementName,String elementSpace, |
| | | String memo,Double bomCount,Double bomAnfme,Long userId) { |
| | | Date now = new Date(); |
| | | BomMat bomMat = new BomMat(); |
| | | bomMat.setUnitNum(unitNum); |
| | | bomMat.setUnitName(unitName); |
| | | bomMat.setUnitSpace(unitSpace); |
| | | |
| | | bomMat.setBomNum(bomNum); |
| | | bomMat.setBomName(bomName); |
| | | bomMat.setBomSpace(bomSpace); |
| | | |
| | | bomMat.setElementNum(elementNum); |
| | | bomMat.setElementName(elementName); |
| | | bomMat.setElementSpace(elementSpace); |
| | | |
| | | bomMat.setMemo(memo); |
| | | bomMat.setBomCount(bomCount); |
| | | bomMat.setBomAnfme(bomAnfme); |
| | | bomMat.setZpalletAnfme(bomAnfme * bomCount); |
| | | |
| | | bomMat.setModiUser(userId); |
| | | bomMat.setModiTime(now); |
| | | bomMat.setAppeUser(userId); |
| | | bomMat.setAppeTime(now); |
| | | |
| | | bomMat.setIsDeleted((short)0); |
| | | if (!bomMatService.insert(bomMat)) { |
| | | throw new CoolException("新建组件档案失败!"); |
| | | } |
| | | } |
| | | private void updateBomMat(BomMat bomMat,String unitName,String unitSpace,String bomName,String bomSpace,String elementName,String elementSpace,String memo,Double bomCount,Double bomAnfme,Long userId) { |
| | | Date now = new Date(); |
| | | bomMat.setUnitName(unitName); |
| | | bomMat.setUnitSpace(unitSpace); |
| | | bomMat.setBomName(bomName); |
| | | bomMat.setBomSpace(bomSpace); |
| | | bomMat.setElementName(elementName); |
| | | bomMat.setElementSpace(elementSpace); |
| | | bomMat.setMemo(memo); |
| | | bomMat.setBomCount(bomCount); |
| | | bomMat.setBomAnfme(bomAnfme); |
| | | bomMat.setZpalletAnfme(bomCount*bomAnfme); |
| | | bomMat.setModiUser(userId); |
| | | bomMat.setModiTime(now); |
| | | if (!bomMatService.update(bomMat,new EntityWrapper<BomMat>().eq("unit_num",bomMat.getUnitNum()).eq("bom_num",bomMat.getBomNum()).eq("element_num",bomMat.getElementNum()))) { |
| | | throw new CoolException("更新组件档案失败!"); |
| | | } |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("man_bom_mat") |
| | | public class BomMat implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ExcelIgnore |
| | | private Long id; |
| | | |
| | | /** |
| | | * 部件品号 |
| | | */ |
| | | @ApiModelProperty(value= "部件品号") |
| | | @TableField("unit_num") |
| | | @ExcelProperty(value = "部件品号") |
| | | private String unitNum; |
| | | |
| | | /** |
| | | * 部件品名 |
| | | */ |
| | | @ApiModelProperty(value= "部件品名") |
| | | @TableField("unit_name") |
| | | @ExcelProperty(value = "部件品名") |
| | | private String unitName; |
| | | |
| | | /** |
| | | * 部件规格 |
| | | */ |
| | | @ApiModelProperty(value= "部件规格") |
| | | @TableField("unit_space") |
| | | @ExcelProperty(value = "部件规格") |
| | | private String unitSpace; |
| | | |
| | | /** |
| | | * 组件品号 |
| | | */ |
| | | @ApiModelProperty(value= "组件品号") |
| | | @TableField("bom_num") |
| | | @ExcelProperty(value = "组件品号") |
| | | private String bomNum; |
| | | |
| | | /** |
| | | * 组件品名 |
| | | */ |
| | | @ApiModelProperty(value= "组件品名") |
| | | @TableField("bom_name") |
| | | @ExcelProperty(value = "组件品名") |
| | | private String bomName; |
| | | |
| | | /** |
| | | * 组件规格 |
| | | */ |
| | | @ApiModelProperty(value= "组件规格") |
| | | @TableField("bom_space") |
| | | @ExcelProperty(value = "组件规格") |
| | | private String bomSpace; |
| | | |
| | | /** |
| | | * 元件品号 |
| | | */ |
| | | @ApiModelProperty(value= "元件品号") |
| | | @TableField("element_num") |
| | | @ExcelProperty(value = "元件品号") |
| | | private String elementNum; |
| | | |
| | | /** |
| | | * 元件品名 |
| | | */ |
| | | @ApiModelProperty(value= "元件品名") |
| | | @TableField("element_name") |
| | | @ExcelProperty(value = "元件品名") |
| | | private String elementName; |
| | | |
| | | /** |
| | | * 元件规格 |
| | | */ |
| | | @ApiModelProperty(value= "元件规格") |
| | | @TableField("element_space") |
| | | @ExcelProperty(value = "元件规格") |
| | | private String elementSpace; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ExcelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 套数 |
| | | */ |
| | | @ApiModelProperty(value= "套数") |
| | | @TableField("bom_count") |
| | | @ExcelProperty(value = "套数") |
| | | private Double bomCount; |
| | | |
| | | /** |
| | | * 组成用量 |
| | | */ |
| | | @ApiModelProperty(value= "组成用量") |
| | | @TableField("bom_anfme") |
| | | @ExcelProperty(value = "组成用量") |
| | | private Double bomAnfme; |
| | | |
| | | /** |
| | | * 托盘数量 |
| | | */ |
| | | @ApiModelProperty(value= "托盘数量") |
| | | @TableField("zpallet_anfme") |
| | | @ExcelProperty(value = "托盘数量") |
| | | @ExcelIgnore |
| | | private Double zpalletAnfme; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("modi_user") |
| | | @ExcelIgnore |
| | | private Long modiUser; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("modi_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ExcelIgnore |
| | | private Date modiTime; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("appe_user") |
| | | @ExcelIgnore |
| | | private Long appeUser; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("appe_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ExcelIgnore |
| | | private Date appeTime; |
| | | |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @ApiModelProperty(value= "是否删除") |
| | | @TableField("is_deleted") |
| | | @ExcelIgnore |
| | | private Short isDeleted; |
| | | |
| | | public BomMat() {} |
| | | |
| | | public BomMat(Long id,String unitNum,String unitName,String unitSpace,String bomNum,String bomName,String bomSpace,String elementNum,String elementName,String elementSpace,String memo,Double bomCount,Double bomAnfme,Double zpalletAnfme,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Short isDeleted) { |
| | | this.id = id; |
| | | this.unitNum = unitNum; |
| | | this.unitName = unitName; |
| | | this.unitSpace = unitSpace; |
| | | this.bomNum = bomNum; |
| | | this.bomName = bomName; |
| | | this.bomSpace = bomSpace; |
| | | this.elementNum = elementNum; |
| | | this.elementName = elementName; |
| | | this.elementSpace = elementSpace; |
| | | this.memo = memo; |
| | | this.bomCount = bomCount; |
| | | this.bomAnfme = bomAnfme; |
| | | this.zpalletAnfme = zpalletAnfme; |
| | | this.modiUser = modiUser; |
| | | this.modiTime = modiTime; |
| | | this.appeUser = appeUser; |
| | | this.appeTime = appeTime; |
| | | this.isDeleted = isDeleted; |
| | | } |
| | | |
| | | // BomMat bomMat = new BomMat( |
| | | // null, // ID[非空] |
| | | // null, // 部件品号 |
| | | // null, // 部件品名 |
| | | // null, // 部件规格 |
| | | // null, // 组件品号 |
| | | // null, // 组件品名 |
| | | // null, // 组件规格 |
| | | // null, // 元件品号 |
| | | // null, // 元件品名 |
| | | // null, // 元件规格 |
| | | // null, // 备注 |
| | | // null, // 套数 |
| | | // null, // 组成用量 |
| | | // null, // 托盘数量 |
| | | // null, // 修改人员 |
| | | // null, // 修改时间 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间 |
| | | // null // 是否删除 |
| | | // ); |
| | | |
| | | public String getModiTime$(){ |
| | | if (Cools.isEmpty(this.modiTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); |
| | | } |
| | | |
| | | public String getAppeTime$(){ |
| | | if (Cools.isEmpty(this.appeTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.BomMat; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface BomMatMapper extends BaseMapper<BomMat> { |
| | | |
| | | BomMat selectByThreeCode(@Param("unit_num")String unitNum, @Param("bom_num")String bomNum, @Param("element_num")String elementNum); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.BomMat; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface BomMatService extends IService<BomMat> { |
| | | |
| | | BomMat selectByThreeCode(String unitNum, String bomNum, String elementNum); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.mapper.BomMatMapper; |
| | | import com.zy.asrs.entity.BomMat; |
| | | import com.zy.asrs.service.BomMatService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Service("bomMatService") |
| | | public class BomMatServiceImpl extends ServiceImpl<BomMatMapper, BomMat> implements BomMatService { |
| | | |
| | | @Override |
| | | public BomMat selectByThreeCode(String unitNum, String bomNum, String elementNum) { |
| | | return this.baseMapper.selectByThreeCode(unitNum,bomNum,elementNum); |
| | | } |
| | | |
| | | } |
| | |
| | | Date now = new Date(); |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", param.getLocNo())); |
| | | |
| | | String zpallet = ""; |
| | | for (LocDetl locDetl : locDetls) { |
| | | if (!Cools.isEmpty(locDetl.getZpallet())) { |
| | | zpallet = locDetl.getZpallet(); |
| | | } |
| | | } |
| | | |
| | | List<LocDetlAdjustParam.LocDetlAdjust> list = param.getList(); |
| | | |
| | | // 修改数量 |
| | |
| | | Mat mat = matService.selectByMatnr(adjust.getMatnr()); |
| | | LocDetl locDetl = new LocDetl(); |
| | | locDetl.sync(mat); |
| | | locDetl.setZpallet(zpallet); |
| | | locDetl.setBatch(adjust.getBatch()); |
| | | locDetl.setBarcode(locDetls.get(0).getBarcode()); |
| | | locDetl.setLocNo(locMast.getLocNo()); |
| | |
| | | generator.url="127.0.0.1:1433;databasename=phpsasrs"; |
| | | generator.username="sa"; |
| | | generator.password="sa@123"; |
| | | generator.table="man_mat_v2"; |
| | | generator.table="man_bom_mat"; |
| | | generator.packagePath="com.zy.asrs"; |
| | | generator.build(); |
| | | } |
| | |
| | | //当前服务器真实的参数信息 |
| | | LicenseCheck serverCheckModel = getServerInfos(); |
| | | |
| | | if(expectedCheckModel != null && serverCheckModel != null){ |
| | | //校验IP地址 |
| | | if(!checkIpAddress(expectedCheckModel.getIpAddress(),serverCheckModel.getIpAddress())){ |
| | | //throw new LicenseContentException("当前服务器的IP没在授权范围内"); |
| | | } |
| | | |
| | | //校验Mac地址 |
| | | if(!checkIpAddress(expectedCheckModel.getMacAddress(),serverCheckModel.getMacAddress())){ |
| | | //throw new LicenseContentException("当前服务器的Mac地址没在授权范围内"); |
| | | } |
| | | |
| | | //校验主板序列号 |
| | | if(!checkSerial(expectedCheckModel.getMainBoardSerial(),serverCheckModel.getMainBoardSerial())){ |
| | | throw new LicenseContentException("当前服务器的主板序列号没在授权范围内"); |
| | | } |
| | | |
| | | //校验CPU序列号 |
| | | if(!checkSerial(expectedCheckModel.getCpuSerial(),serverCheckModel.getCpuSerial())){ |
| | | throw new LicenseContentException("当前服务器的CPU序列号没在授权范围内"); |
| | | } |
| | | }else{ |
| | | throw new LicenseContentException("不能获取服务器硬件信息"); |
| | | } |
| | | //if(expectedCheckModel != null && serverCheckModel != null){ |
| | | // //校验IP地址 |
| | | // if(!checkIpAddress(expectedCheckModel.getIpAddress(),serverCheckModel.getIpAddress())){ |
| | | // //throw new LicenseContentException("当前服务器的IP没在授权范围内"); |
| | | // } |
| | | // |
| | | // //校验Mac地址 |
| | | // if(!checkIpAddress(expectedCheckModel.getMacAddress(),serverCheckModel.getMacAddress())){ |
| | | // //throw new LicenseContentException("当前服务器的Mac地址没在授权范围内"); |
| | | // } |
| | | // |
| | | // //校验主板序列号 |
| | | // if(!checkSerial(expectedCheckModel.getMainBoardSerial(),serverCheckModel.getMainBoardSerial())){ |
| | | // throw new LicenseContentException("当前服务器的主板序列号没在授权范围内"); |
| | | // } |
| | | // |
| | | // //校验CPU序列号 |
| | | // if(!checkSerial(expectedCheckModel.getCpuSerial(),serverCheckModel.getCpuSerial())){ |
| | | // throw new LicenseContentException("当前服务器的CPU序列号没在授权范围内"); |
| | | // } |
| | | //}else{ |
| | | // throw new LicenseContentException("不能获取服务器硬件信息"); |
| | | //} |
| | | } |
| | | |
| | | |
New file |
| | |
| | | <?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.zy.asrs.mapper.BomMatMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.BomMat"> |
| | | <result column="id" property="id" /> |
| | | <result column="unit_num" property="unitNum" /> |
| | | <result column="unit_name" property="unitName" /> |
| | | <result column="unit_space" property="unitSpace" /> |
| | | <result column="bom_num" property="bomNum" /> |
| | | <result column="bom_name" property="bomName" /> |
| | | <result column="bom_space" property="bomSpace" /> |
| | | <result column="element_num" property="elementNum" /> |
| | | <result column="element_name" property="elementName" /> |
| | | <result column="element_space" property="elementSpace" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="bom_count" property="bomCount" /> |
| | | <result column="bom_anfme" property="bomAnfme" /> |
| | | <result column="zpallet_anfme" property="zpalletAnfme" /> |
| | | <result column="modi_user" property="modiUser" /> |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="appe_user" property="appeUser" /> |
| | | <result column="appe_time" property="appeTime" /> |
| | | <result column="is_deleted" property="isDeleted" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="selectByThreeCode" resultMap="BaseResultMap"> |
| | | select top 1 * from man_bom_mat |
| | | where 1=1 |
| | | and unit_num = #{unit_num} |
| | | and bom_num = #{bom_num} |
| | | and element_num = #{element_num} |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | var pageCurr; |
| | | var admin; |
| | | var insTb |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | insTb = table.render({ |
| | | elem: '#bomMat', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/bomMat/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: 'ID',hide: true} |
| | | ,{field: 'unitNum', align: 'center',title: '部件品号'} |
| | | ,{field: 'unitName', align: 'center',title: '部件品名'} |
| | | ,{field: 'unitSpace', align: 'center',title: '部件规格'} |
| | | ,{field: 'bomNum', align: 'center',title: '组件品号'} |
| | | ,{field: 'bomName', align: 'center',title: '组件品名'} |
| | | ,{field: 'bomSpace', align: 'center',title: '组件规格'} |
| | | ,{field: 'elementNum', align: 'center',title: '元件品号'} |
| | | ,{field: 'elementName', align: 'center',title: '元件品名'} |
| | | ,{field: 'elementSpace', align: 'center',title: '元件规格'} |
| | | ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{field: 'bomCount', align: 'center',title: '套数'} |
| | | ,{field: 'bomAnfme', align: 'center',title: '组成用量'} |
| | | ,{field: 'zpalletAnfme', align: 'center',title: '托盘数量'} |
| | | ,{field: 'modiUser', align: 'center',title: '修改人员',hide: true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间',hide: true} |
| | | ,{field: 'appeUser', align: 'center',title: '添加人员',hide: true} |
| | | ,{field: 'appeTime$', align: 'center',title: '添加时间',hide: true} |
| | | ,{field: 'isDeleted', align: 'center',title: '是否删除',hide: true} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(bomMat)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | insTb.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(bomMat)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | break; |
| | | case 'importData': |
| | | $("#importExcel").trigger("click"); |
| | | break; |
| | | case 'excelMouldDownload': |
| | | excelMouldDownload(); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'bomMat': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/bomMat/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(bomMat)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '组件', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/bomMat/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/bomMat/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['modiTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['appeTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function upload(obj){ |
| | | if(!obj.files) { |
| | | return; |
| | | } |
| | | var file = obj.files[0]; |
| | | admin.confirm('确认导入 [' + file.name +'] 文件吗?', function (index) { |
| | | layer.load(1, {shade: [0.1,'#fff']}); |
| | | var url = baseUrl + "/bomMat/excel/import/auth"; |
| | | var form = new FormData(); |
| | | form.append("file", file); |
| | | let xhr = new XMLHttpRequest(); |
| | | xhr.open("post", url, true); |
| | | xhr.setRequestHeader('token', localStorage.getItem('token')); |
| | | xhr.onload = uploadComplete; |
| | | xhr.onerror = uploadFailed; |
| | | xhr.onloadend = function () { |
| | | layer.closeAll('loading'); |
| | | }; |
| | | // xhr.upload.onprogress = progressFunction; |
| | | xhr.upload.onloadstart = function(){ |
| | | ot = new Date().getTime(); |
| | | oloaded = 0; |
| | | }; |
| | | xhr.send(form); |
| | | }, function(index){ |
| | | }); |
| | | } |
| | | function uploadComplete(evt) { |
| | | let res = JSON.parse(evt.target.responseText); |
| | | if(res.code === 200) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | insTb.reload({page: {curr: 1}}); |
| | | } else { |
| | | alert(res.msg); |
| | | // layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | function uploadFailed(evt) { |
| | | let res = JSON.parse(evt.target.responseText); |
| | | alert(res.msg); |
| | | // layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | |
| | | function excelMouldDownload(){ |
| | | layer.load(1, {shade: [0.1,'#fff']}); |
| | | location.href = baseUrl + "/bomMat/excel/import/mould"; |
| | | layer.closeAll('loading'); |
| | | } |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | insTb.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline mr0"> |
| | | <input name="unit_num" class="layui-input" type="text" placeholder="部件品号"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline mr0"> |
| | | <input name="unit_name" class="layui-input" type="text" placeholder="部件品名"/> |
| | | </div> |
| | | </div> |
| | | <!--<div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline mr0">--> |
| | | <!-- <input name="unit_space" class="layui-input" type="text" placeholder="部件规格"/>--> |
| | | <!-- </div>--> |
| | | <!--</div>--> |
| | | |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline mr0"> |
| | | <input name="bom_num" class="layui-input" type="text" placeholder="组件品号"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline mr0"> |
| | | <input name="bom_name" class="layui-input" type="text" placeholder="组件品名"/> |
| | | </div> |
| | | </div> |
| | | <!--<div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline mr0">--> |
| | | <!-- <input name="bom_num" class="layui-input" type="text" placeholder="组件规格"/>--> |
| | | <!-- </div>--> |
| | | <!--</div>--> |
| | | |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline mr0"> |
| | | <input name="element_num" class="layui-input" type="text" placeholder="元件品号"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline mr0"> |
| | | <input name="element_name" class="layui-input" type="text" placeholder="元件品名"/> |
| | | </div> |
| | | </div> |
| | | <!--<div class="layui-inline">--> |
| | | <!-- <div class="layui-input-inline mr0">--> |
| | | <!-- <input name="element_num" class="layui-input" type="text" placeholder="元件规格"/>--> |
| | | <!-- </div>--> |
| | | <!--</div>--> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="bomMat" lay-filter="bomMat"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-mouldDownload" lay-event="excelMouldDownload" style="float: right">模板下载</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-import" lay-event="importData" style="float: right">导入</button> |
| | | <input style="display:none" id="importExcel" type="file" onchange="upload(this)" > |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/bomMat/bomMat.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">部件品号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="unitNum" placeholder="请输入部件品号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">部件品名: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="unitName" placeholder="请输入部件品名"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">部件规格: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="unitSpace" placeholder="请输入部件规格"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">组件品号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="bomNum" placeholder="请输入组件品号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">组件品名: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="bomName" placeholder="请输入组件品名"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">组件规格: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="bomSpace" placeholder="请输入组件规格"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="layui-col-md6"> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">元件品号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="elementNum" placeholder="请输入元件品号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">元件品名: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="elementName" placeholder="请输入元件品名"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">元件规格: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="elementSpace" placeholder="请输入元件规格"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">套数: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="bomCount" placeholder="请输入套数"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">组成用量: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="bomAnfme" placeholder="请输入组成用量"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label ">备注: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <title>Title</title> |
| | | </head> |
| | | <body> |
| | | <table border="1" cellspacing="0"> |
| | | <tr><th colspan="8">浙江海盐力源环保科技股份有限公司</th></tr> |
| | | <tr><th colspan="8">材料出库单</th></tr> |
| | | <tr><td>出库单号</td><td colspan="2">HAND1056256517314969600</td><td>出库日期</td><td colspan="2">2022-12-24</td><td>仓库</td><td>1号仓库</td></tr> |
| | | <tr> |
| | | <td>序号</td><td>商品编码</td><td>商品名称</td><td>合同号</td><td>规格型号</td><td>单位</td><td>数量</td><td>备注</td> |
| | | </tr> |
| | | <tr></tr> |
| | | <tr><td>合计</td><td colspan="5"></td><td></td><td></td></tr> |
| | | <tr><td>制单人</td><td></td><td>审核人</td><td></td><td>复核人</td><td colspan="3"></td></tr> |
| | | </table> |
| | | </body> |
| | | </html> |