ling li
1 year ago
43 changed files with 4884 additions and 132 deletions
@ -0,0 +1,135 @@ |
|||||
|
package com.ruoyi.rfMsg.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.rfMsg.domain.VnaRawData; |
||||
|
import com.ruoyi.rfMsg.service.IVnaRawDataService; |
||||
|
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.List; |
||||
|
|
||||
|
/** |
||||
|
* rf测试历史结果Controller |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2023-06-28 |
||||
|
*/ |
||||
|
@Controller |
||||
|
@RequestMapping("/rfMsg/vnaRawData") |
||||
|
public class VnaRawDataController extends BaseController |
||||
|
{ |
||||
|
private String prefix = "rfMsg/vnaRawData"; |
||||
|
|
||||
|
@Autowired |
||||
|
private IVnaRawDataService vnaRawDataService; |
||||
|
|
||||
|
@RequiresPermissions("rfMsg:vnaRawData:view") |
||||
|
@GetMapping() |
||||
|
public String vnaRawData() |
||||
|
{ |
||||
|
return prefix + "/vnaRawData"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询rf测试历史结果列表 |
||||
|
*/ |
||||
|
@RequiresPermissions("rfMsg:vnaRawData:list") |
||||
|
@PostMapping("/list") |
||||
|
@ResponseBody |
||||
|
public TableDataInfo list(VnaRawData vnaRawData) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List<VnaRawData> list = vnaRawDataService.selectVnaRawDataList(vnaRawData); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/getDataById/{id}") |
||||
|
@ResponseBody |
||||
|
public String getDataById(@PathVariable("id") Long id) |
||||
|
{ |
||||
|
startPage(); |
||||
|
VnaRawData vnaRawData = vnaRawDataService.selectVnaRawDataById(id); |
||||
|
String frequency = vnaRawData.getFrequency(); |
||||
|
// JSONObject jsonObject = (JSONObject) JSONValue.parse(frequency.toJs());
|
||||
|
System.out.println(frequency); |
||||
|
return frequency; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出rf测试历史结果列表 |
||||
|
*/ |
||||
|
@RequiresPermissions("rfMsg:vnaRawData:export") |
||||
|
@Log(title = "rf测试历史结果", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
@ResponseBody |
||||
|
public AjaxResult export(VnaRawData vnaRawData) |
||||
|
{ |
||||
|
List<VnaRawData> list = vnaRawDataService.selectVnaRawDataList(vnaRawData); |
||||
|
ExcelUtil<VnaRawData> util = new ExcelUtil<VnaRawData>(VnaRawData.class); |
||||
|
return util.exportExcel(list, "rf测试历史结果数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增rf测试历史结果 |
||||
|
*/ |
||||
|
@GetMapping("/add") |
||||
|
public String add() |
||||
|
{ |
||||
|
return prefix + "/add"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增保存rf测试历史结果 |
||||
|
*/ |
||||
|
@RequiresPermissions("rfMsg:vnaRawData:add") |
||||
|
@Log(title = "rf测试历史结果", businessType = BusinessType.INSERT) |
||||
|
@PostMapping("/add") |
||||
|
@ResponseBody |
||||
|
public AjaxResult addSave(VnaRawData vnaRawData) |
||||
|
{ |
||||
|
return toAjax(vnaRawDataService.insertVnaRawData(vnaRawData)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改rf测试历史结果 |
||||
|
*/ |
||||
|
@GetMapping("/edit/{id}") |
||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap) |
||||
|
{ |
||||
|
VnaRawData vnaRawData = vnaRawDataService.selectVnaRawDataById(id); |
||||
|
mmap.put("vnaRawData", vnaRawData); |
||||
|
return prefix + "/edit"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改保存rf测试历史结果 |
||||
|
*/ |
||||
|
@RequiresPermissions("rfMsg:vnaRawData:edit") |
||||
|
@Log(title = "rf测试历史结果", businessType = BusinessType.UPDATE) |
||||
|
@PostMapping("/edit") |
||||
|
@ResponseBody |
||||
|
public AjaxResult editSave(VnaRawData vnaRawData) |
||||
|
{ |
||||
|
return toAjax(vnaRawDataService.updateVnaRawData(vnaRawData)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除rf测试历史结果 |
||||
|
*/ |
||||
|
@RequiresPermissions("rfMsg:vnaRawData:remove") |
||||
|
@Log(title = "rf测试历史结果", businessType = BusinessType.DELETE) |
||||
|
@PostMapping( "/remove") |
||||
|
@ResponseBody |
||||
|
public AjaxResult remove(String ids) |
||||
|
{ |
||||
|
return toAjax(vnaRawDataService.deleteVnaRawDataByIds(ids)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,133 @@ |
|||||
|
package com.ruoyi.rfMsg.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; |
||||
|
|
||||
|
/** |
||||
|
* rf测试历史结果对象 vna_raw_data |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2023-06-28 |
||||
|
*/ |
||||
|
public class VnaRawData extends BaseEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
private Long id; |
||||
|
|
||||
|
/** 时间 */ |
||||
|
@Excel(name = "时间") |
||||
|
private String date; |
||||
|
|
||||
|
/** 序列号(设备) */ |
||||
|
@Excel(name = "序列号", readConverterExp = "设=备") |
||||
|
private String serialNumber; |
||||
|
|
||||
|
/** 操作人 */ |
||||
|
@Excel(name = "操作人") |
||||
|
private String operator; |
||||
|
|
||||
|
/** 是否通过,0为NG,1为PASS */ |
||||
|
@Excel(name = "是否通过,0为NG,1为PASS") |
||||
|
private Integer status; |
||||
|
|
||||
|
/** 端口号,例:PORT1 */ |
||||
|
@Excel(name = "端口号,例:PORT1") |
||||
|
private String port; |
||||
|
|
||||
|
/** 频率 */ |
||||
|
private String frequency; |
||||
|
|
||||
|
/** 数值,必须对应频率 */ |
||||
|
private String value; |
||||
|
|
||||
|
public void setId(Long id) |
||||
|
{ |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public Long getId() |
||||
|
{ |
||||
|
return id; |
||||
|
} |
||||
|
public void setDate(String date) |
||||
|
{ |
||||
|
this.date = date; |
||||
|
} |
||||
|
|
||||
|
public String getDate() |
||||
|
{ |
||||
|
return date; |
||||
|
} |
||||
|
public void setSerialNumber(String serialNumber) |
||||
|
{ |
||||
|
this.serialNumber = serialNumber; |
||||
|
} |
||||
|
|
||||
|
public String getSerialNumber() |
||||
|
{ |
||||
|
return serialNumber; |
||||
|
} |
||||
|
public void setOperator(String operator) |
||||
|
{ |
||||
|
this.operator = operator; |
||||
|
} |
||||
|
|
||||
|
public String getOperator() |
||||
|
{ |
||||
|
return operator; |
||||
|
} |
||||
|
public void setStatus(Integer status) |
||||
|
{ |
||||
|
this.status = status; |
||||
|
} |
||||
|
|
||||
|
public Integer getStatus() |
||||
|
{ |
||||
|
return status; |
||||
|
} |
||||
|
public void setPort(String port) |
||||
|
{ |
||||
|
this.port = port; |
||||
|
} |
||||
|
|
||||
|
public String getPort() |
||||
|
{ |
||||
|
return port; |
||||
|
} |
||||
|
public void setFrequency(String frequency) |
||||
|
{ |
||||
|
this.frequency = frequency; |
||||
|
} |
||||
|
|
||||
|
public String getFrequency() |
||||
|
{ |
||||
|
return frequency; |
||||
|
} |
||||
|
public void setValue(String value) |
||||
|
{ |
||||
|
this.value = value; |
||||
|
} |
||||
|
|
||||
|
public String getValue() |
||||
|
{ |
||||
|
return value; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
.append("id", getId()) |
||||
|
.append("date", getDate()) |
||||
|
.append("serialNumber", getSerialNumber()) |
||||
|
.append("operator", getOperator()) |
||||
|
.append("status", getStatus()) |
||||
|
.append("port", getPort()) |
||||
|
.append("frequency", getFrequency()) |
||||
|
.append("value", getValue()) |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
package com.ruoyi.rfMsg.domain; |
||||
|
|
||||
|
import com.ruoyi.common.core.domain.BaseEntity; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
|
||||
|
public class VnaRawDataKeyValue extends BaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
private String key; |
||||
|
|
||||
|
private String value; |
||||
|
|
||||
|
public String getKey() { |
||||
|
return key; |
||||
|
} |
||||
|
|
||||
|
public void setKey(String key) { |
||||
|
this.key = key; |
||||
|
} |
||||
|
|
||||
|
public String getValue() { |
||||
|
return value; |
||||
|
} |
||||
|
|
||||
|
public void setValue(String value) { |
||||
|
this.value = value; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this) |
||||
|
.append("key", key) |
||||
|
.append("value", value) |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,62 @@ |
|||||
|
package com.ruoyi.rfMsg.mapper; |
||||
|
|
||||
|
import com.ruoyi.rfMsg.domain.VnaRawData; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* rf测试历史结果Mapper接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2023-06-28 |
||||
|
*/ |
||||
|
public interface VnaRawDataMapper |
||||
|
{ |
||||
|
/** |
||||
|
* 查询rf测试历史结果 |
||||
|
* |
||||
|
* @param id rf测试历史结果ID |
||||
|
* @return rf测试历史结果 |
||||
|
*/ |
||||
|
public VnaRawData selectVnaRawDataById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询rf测试历史结果列表 |
||||
|
* |
||||
|
* @param vnaRawData rf测试历史结果 |
||||
|
* @return rf测试历史结果集合 |
||||
|
*/ |
||||
|
public List<VnaRawData> selectVnaRawDataList(VnaRawData vnaRawData); |
||||
|
|
||||
|
/** |
||||
|
* 新增rf测试历史结果 |
||||
|
* |
||||
|
* @param vnaRawData rf测试历史结果 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertVnaRawData(VnaRawData vnaRawData); |
||||
|
|
||||
|
/** |
||||
|
* 修改rf测试历史结果 |
||||
|
* |
||||
|
* @param vnaRawData rf测试历史结果 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateVnaRawData(VnaRawData vnaRawData); |
||||
|
|
||||
|
/** |
||||
|
* 删除rf测试历史结果 |
||||
|
* |
||||
|
* @param id rf测试历史结果ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteVnaRawDataById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除rf测试历史结果 |
||||
|
* |
||||
|
* @param ids 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteVnaRawDataByIds(String[] ids); |
||||
|
} |
@ -0,0 +1,61 @@ |
|||||
|
package com.ruoyi.rfMsg.service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.ruoyi.rfMsg.domain.VnaRawData; |
||||
|
|
||||
|
/** |
||||
|
* rf测试历史结果Service接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2023-06-28 |
||||
|
*/ |
||||
|
public interface IVnaRawDataService |
||||
|
{ |
||||
|
/** |
||||
|
* 查询rf测试历史结果 |
||||
|
* |
||||
|
* @param id rf测试历史结果ID |
||||
|
* @return rf测试历史结果 |
||||
|
*/ |
||||
|
public VnaRawData selectVnaRawDataById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询rf测试历史结果列表 |
||||
|
* |
||||
|
* @param vnaRawData rf测试历史结果 |
||||
|
* @return rf测试历史结果集合 |
||||
|
*/ |
||||
|
public List<VnaRawData> selectVnaRawDataList(VnaRawData vnaRawData); |
||||
|
|
||||
|
/** |
||||
|
* 新增rf测试历史结果 |
||||
|
* |
||||
|
* @param vnaRawData rf测试历史结果 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertVnaRawData(VnaRawData vnaRawData); |
||||
|
|
||||
|
/** |
||||
|
* 修改rf测试历史结果 |
||||
|
* |
||||
|
* @param vnaRawData rf测试历史结果 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateVnaRawData(VnaRawData vnaRawData); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除rf测试历史结果 |
||||
|
* |
||||
|
* @param ids 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteVnaRawDataByIds(String ids); |
||||
|
|
||||
|
/** |
||||
|
* 删除rf测试历史结果信息 |
||||
|
* |
||||
|
* @param id rf测试历史结果ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteVnaRawDataById(Long id); |
||||
|
} |
@ -0,0 +1,94 @@ |
|||||
|
package com.ruoyi.rfMsg.service.impl; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.ruoyi.rfMsg.mapper.VnaRawDataMapper; |
||||
|
import com.ruoyi.rfMsg.domain.VnaRawData; |
||||
|
import com.ruoyi.rfMsg.service.IVnaRawDataService; |
||||
|
import com.ruoyi.common.core.text.Convert; |
||||
|
|
||||
|
/** |
||||
|
* rf测试历史结果Service业务层处理 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2023-06-28 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class VnaRawDataServiceImpl implements IVnaRawDataService |
||||
|
{ |
||||
|
@Autowired |
||||
|
private VnaRawDataMapper vnaRawDataMapper; |
||||
|
|
||||
|
/** |
||||
|
* 查询rf测试历史结果 |
||||
|
* |
||||
|
* @param id rf测试历史结果ID |
||||
|
* @return rf测试历史结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public VnaRawData selectVnaRawDataById(Long id) |
||||
|
{ |
||||
|
return vnaRawDataMapper.selectVnaRawDataById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询rf测试历史结果列表 |
||||
|
* |
||||
|
* @param vnaRawData rf测试历史结果 |
||||
|
* @return rf测试历史结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<VnaRawData> selectVnaRawDataList(VnaRawData vnaRawData) |
||||
|
{ |
||||
|
return vnaRawDataMapper.selectVnaRawDataList(vnaRawData); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增rf测试历史结果 |
||||
|
* |
||||
|
* @param vnaRawData rf测试历史结果 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int insertVnaRawData(VnaRawData vnaRawData) |
||||
|
{ |
||||
|
return vnaRawDataMapper.insertVnaRawData(vnaRawData); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改rf测试历史结果 |
||||
|
* |
||||
|
* @param vnaRawData rf测试历史结果 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int updateVnaRawData(VnaRawData vnaRawData) |
||||
|
{ |
||||
|
return vnaRawDataMapper.updateVnaRawData(vnaRawData); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除rf测试历史结果对象 |
||||
|
* |
||||
|
* @param ids 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteVnaRawDataByIds(String ids) |
||||
|
{ |
||||
|
return vnaRawDataMapper.deleteVnaRawDataByIds(Convert.toStrArray(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除rf测试历史结果信息 |
||||
|
* |
||||
|
* @param id rf测试历史结果ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteVnaRawDataById(Long id) |
||||
|
{ |
||||
|
return vnaRawDataMapper.deleteVnaRawDataById(id); |
||||
|
} |
||||
|
} |
@ -0,0 +1,85 @@ |
|||||
|
<?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.rfMsg.mapper.VnaRawDataMapper"> |
||||
|
|
||||
|
<resultMap type="VnaRawData" id="VnaRawDataResult"> |
||||
|
<result property="id" column="id" /> |
||||
|
<result property="date" column="Date" /> |
||||
|
<result property="serialNumber" column="Serial_Number" /> |
||||
|
<result property="operator" column="Operator" /> |
||||
|
<result property="status" column="Status" /> |
||||
|
<result property="port" column="Port" /> |
||||
|
<result property="frequency" column="Frequency" /> |
||||
|
<result property="value" column="Value" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectVnaRawDataVo"> |
||||
|
select id, Date, Serial_Number, Operator, Status, Port, Frequency, Value from vna_raw_data |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectVnaRawDataList" parameterType="VnaRawData" resultMap="VnaRawDataResult"> |
||||
|
<include refid="selectVnaRawDataVo"/> |
||||
|
<where> |
||||
|
<if test="params.beginDate != null and params.beginDate != '' and params.endDate != null and params.endDate != ''"> and Date between #{params.beginDate} and #{params.endDate}</if> |
||||
|
<if test="serialNumber != null and serialNumber != ''"> and Serial_Number like concat('%', #{serialNumber}, '%')</if> |
||||
|
<if test="operator != null and operator != ''"> and Operator like concat('%', #{operator}, '%')</if> |
||||
|
<if test="status != null "> and Status = #{status}</if> |
||||
|
<if test="port != null and port != ''"> and Port = #{port}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectVnaRawDataById" parameterType="Long" resultMap="VnaRawDataResult"> |
||||
|
<include refid="selectVnaRawDataVo"/> |
||||
|
where id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertVnaRawData" parameterType="VnaRawData" useGeneratedKeys="true" keyProperty="id"> |
||||
|
insert into vna_raw_data |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="date != null and date != ''">Date,</if> |
||||
|
<if test="serialNumber != null and serialNumber != ''">Serial_Number,</if> |
||||
|
<if test="operator != null">Operator,</if> |
||||
|
<if test="status != null">Status,</if> |
||||
|
<if test="port != null and port != ''">Port,</if> |
||||
|
<if test="frequency != null">Frequency,</if> |
||||
|
<if test="value != null">Value,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="date != null and date != ''">#{date},</if> |
||||
|
<if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if> |
||||
|
<if test="operator != null">#{operator},</if> |
||||
|
<if test="status != null">#{status},</if> |
||||
|
<if test="port != null and port != ''">#{port},</if> |
||||
|
<if test="frequency != null">#{frequency},</if> |
||||
|
<if test="value != null">#{value},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateVnaRawData" parameterType="VnaRawData"> |
||||
|
update vna_raw_data |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="date != null and date != ''">Date = #{date},</if> |
||||
|
<if test="serialNumber != null and serialNumber != ''">Serial_Number = #{serialNumber},</if> |
||||
|
<if test="operator != null">Operator = #{operator},</if> |
||||
|
<if test="status != null">Status = #{status},</if> |
||||
|
<if test="port != null and port != ''">Port = #{port},</if> |
||||
|
<if test="frequency != null">Frequency = #{frequency},</if> |
||||
|
<if test="value != null">Value = #{value},</if> |
||||
|
</trim> |
||||
|
where id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteVnaRawDataById" parameterType="Long"> |
||||
|
delete from vna_raw_data where id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteVnaRawDataByIds" parameterType="String"> |
||||
|
delete from vna_raw_data where id in |
||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,69 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
||||
|
<head> |
||||
|
<th:block th:include="include :: header('新增rf测试历史结果')" /> |
||||
|
<th:block th:include="include :: datetimepicker-css" /> |
||||
|
</head> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-vnaRawData-add"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">时间:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="input-group date"> |
||||
|
<input name="date" class="form-control" placeholder="yyyy-MM-dd" type="text" required> |
||||
|
<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 is-required">序列号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="serialNumber" 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="operator" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">是否通过,0为NG,1为PASS:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('vna_raw_data_status')}"> |
||||
|
<input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}" required> |
||||
|
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">端口号,例:PORT1:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="port" class="form-control" type="text" required> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "rfMsg/vnaRawData" |
||||
|
$("#form-vnaRawData-add").validate({ |
||||
|
focusCleanup: true |
||||
|
}); |
||||
|
|
||||
|
function submitHandler() { |
||||
|
if ($.validate.form()) { |
||||
|
$.operate.save(prefix + "/add", $('#form-vnaRawData-add').serialize()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$("input[name='date']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd", |
||||
|
minView: "month", |
||||
|
autoclose: true |
||||
|
}); |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,70 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
||||
|
<head> |
||||
|
<th:block th:include="include :: header('修改rf测试历史结果')" /> |
||||
|
<th:block th:include="include :: datetimepicker-css" /> |
||||
|
</head> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-vnaRawData-edit" th:object="${vnaRawData}"> |
||||
|
<input name="id" th:field="*{id}" type="hidden"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">时间:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="input-group date"> |
||||
|
<input name="date" th:value="${#dates.format(vnaRawData.date, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required> |
||||
|
<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 is-required">序列号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="serialNumber" th:field="*{serialNumber}" 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="operator" th:field="*{operator}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">是否通过,0为NG,1为PASS:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('vna_raw_data_status')}"> |
||||
|
<input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}" required> |
||||
|
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">端口号,例:PORT1:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="port" th:field="*{port}" class="form-control" type="text" required> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "rfMsg/vnaRawData"; |
||||
|
$("#form-vnaRawData-edit").validate({ |
||||
|
focusCleanup: true |
||||
|
}); |
||||
|
|
||||
|
function submitHandler() { |
||||
|
if ($.validate.form()) { |
||||
|
$.operate.save(prefix + "/edit", $('#form-vnaRawData-edit').serialize()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$("input[name='date']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd", |
||||
|
minView: "month", |
||||
|
autoclose: true |
||||
|
}); |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,171 @@ |
|||||
|
<!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('rf测试历史结果列表')" /> |
||||
|
</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 class="select-time"> |
||||
|
<label>时间:</label> |
||||
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginDate]"/> |
||||
|
<span>-</span> |
||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endDate]"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>序列号:</label> |
||||
|
<input type="text" name="serialNumber"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>操作人:</label> |
||||
|
<input type="text" name="operator"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>是否通过,0为NG,1为PASS:</label> |
||||
|
<select name="status" th:with="type=${@dict.getType('vna_raw_data_status')}"> |
||||
|
<option value="">所有</option> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
||||
|
</select> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>端口号,例:PORT1:</label> |
||||
|
<input type="text" name="port"/> |
||||
|
</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="rfMsg:vnaRawData:add">--> |
||||
|
<!-- <i class="fa fa-plus"></i> 添加--> |
||||
|
<!-- </a>--> |
||||
|
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="rfMsg:vnaRawData:edit">--> |
||||
|
<!-- <i class="fa fa-edit"></i> 修改--> |
||||
|
<!-- </a>--> |
||||
|
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="rfMsg:vnaRawData:remove">--> |
||||
|
<!-- <i class="fa fa-remove"></i> 删除--> |
||||
|
<!-- </a>--> |
||||
|
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="rfMsg:vnaRawData:export">--> |
||||
|
<!-- <i class="fa fa-download"></i> 导出--> |
||||
|
<!-- </a>--> |
||||
|
</div> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="bootstrap-table"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var editFlag = [[${@permission.hasPermi('rfMsg:vnaRawData:edit')}]]; |
||||
|
var removeFlag = [[${@permission.hasPermi('rfMsg:vnaRawData:remove')}]]; |
||||
|
var statusDatas = [[${@dict.getType('vna_raw_data_status')}]]; |
||||
|
var prefix = ctx + "rfMsg/vnaRawData"; |
||||
|
|
||||
|
$(function() { |
||||
|
var options = { |
||||
|
url: prefix + "/list", |
||||
|
createUrl: prefix + "/add", |
||||
|
updateUrl: prefix + "/edit/{id}", |
||||
|
removeUrl: prefix + "/remove", |
||||
|
exportUrl: prefix + "/export", |
||||
|
modalName: "rf测试历史结果", |
||||
|
detailView: true, |
||||
|
columns: [ |
||||
|
// { |
||||
|
// checkbox: true |
||||
|
// }, |
||||
|
{ |
||||
|
field: 'id', |
||||
|
title: 'id', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'date', |
||||
|
title: '时间' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'serialNumber', |
||||
|
title: '序列号' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'operator', |
||||
|
title: '操作人' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'status', |
||||
|
title: '是否通过,0为NG,1为PASS', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(statusDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'port', |
||||
|
title: '端口号,例:PORT1' |
||||
|
}], |
||||
|
// { |
||||
|
// 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.id + '\')"><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.id + '\')"><i class="fa fa-remove"></i>删除</a>'); |
||||
|
// return actions.join(''); |
||||
|
// } |
||||
|
// } |
||||
|
onExpandRow: function (index, row, $detail) { |
||||
|
initSubTable(index, row, $detail); |
||||
|
}, |
||||
|
}; |
||||
|
$.table.init(options); |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
function initSubTable(index, row, $detail) { |
||||
|
var parentid = row.id; |
||||
|
var cur_table = $detail.html('<table id="table_' + parentid + '"></table>').find('table'); |
||||
|
getData(parentid) |
||||
|
// confirm_income_list_sun: 子表的数据 |
||||
|
var timu = 'nihao' |
||||
|
var timu2 = 'zg' |
||||
|
$(cur_table).bootstrapTable({ |
||||
|
// data: confirm_income_list_sun, |
||||
|
pageSize: 10, |
||||
|
detailView: false, //是否显示父子表 |
||||
|
singleSelect: true, |
||||
|
contentType: "application/x-www-form-urlencoded", |
||||
|
columns: [ |
||||
|
{ |
||||
|
title: timu, |
||||
|
field: "detailData", |
||||
|
formatter: function (value, row, index) { |
||||
|
console.log(row.detailData) |
||||
|
row.detailData = timu2 |
||||
|
return timu2 |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
function getData(id) { |
||||
|
$.ajax({ |
||||
|
url: prefix + '/getDataById/'+id, |
||||
|
type: 'post', |
||||
|
success: function (res) { |
||||
|
console.log(id) |
||||
|
console.log(res) |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,548 @@ |
|||||
|
<!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" /> |
||||
|
<th:block th:include="include :: bootstrap-fileinput-css"/> |
||||
|
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
||||
|
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
||||
|
<th:block th:include="include :: bootstrap-editable-css"/> |
||||
|
<style> |
||||
|
.other-container { |
||||
|
width: 90%; |
||||
|
height: 200px; |
||||
|
margin: auto; |
||||
|
} |
||||
|
.other { |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
h4 { |
||||
|
display: inline-block; |
||||
|
margin-right: 20px; |
||||
|
} |
||||
|
.modal-body{ |
||||
|
height: 550px; |
||||
|
} |
||||
|
iframe{ |
||||
|
width: 100%; |
||||
|
height: 500px; |
||||
|
frameborder: 0; |
||||
|
border: 0; |
||||
|
display: inline-block; |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-warehousingInspectionNotice-add"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">入通知单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="inNoticeNumber" class="form-control" type="text" required readonly> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">订购单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select name="purchaseOrderNumber" class="form-control m-b" required> |
||||
|
<option value="">所有</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">供应商代码:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="supplierCode" 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="supplierName" 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="customerContact" 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="stockName" 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="stockNumber" 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="stockManager" 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="exportSales" class="form-control m-b" th:with="type=${@dict.getType('sys_export_sales')}"> |
||||
|
<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="warehousingCategory" class="form-control m-b" th:with="type=${@dict.getType('warehousing_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="inspectionDate" class="form-control" placeholder="yyyy-MM-dd hh:ii:ss" type="text"> |
||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- <div class="form-group"> --> |
||||
|
<!-- <label class="col-sm-3 control-label">入库日期:</label>--> |
||||
|
<!-- <div class="col-sm-8">--> |
||||
|
<!-- <div class="input-group date">--> |
||||
|
<!-- <input name="warehousingDate" 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"> |
||||
|
<textarea name="remarks" class="form-control"></textarea> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- <div class="form-group"> --> |
||||
|
<!-- <label class="col-sm-3 control-label">检验报告:</label>--> |
||||
|
<!-- <div class="col-sm-8">--> |
||||
|
<!-- <input type="hidden" name="inspectionReport">--> |
||||
|
<!-- <div class="file-loading">--> |
||||
|
<!-- <input class="form-control file-upload" id="inspectionReport" name="file" type="file">--> |
||||
|
<!-- </div>--> |
||||
|
<!-- </div>--> |
||||
|
<!-- </div>--> |
||||
|
<div class="form-group hidden"> |
||||
|
<label class="col-sm-3 control-label">确认否:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select name="confirmFlag" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}"> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<div class="other-container"> |
||||
|
<div class="other"> |
||||
|
<br><hr> |
||||
|
<h4>订单材料信息</h4> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="addDetailTable" style="white-space:nowrap"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<th:block th:include="include :: bootstrap-fileinput-js"/> |
||||
|
<th:block th:include="include :: select2-js"/> |
||||
|
<th:block th:include="include :: bootstrap-table-editable-js"/> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "storehouse/warehousingInspectionNotice" |
||||
|
var prefixDetail = ctx + "storehouse/warehousingInspectionDetail" |
||||
|
var prefixPurchaseOrder = ctx + "purchase/purchaseOrder" |
||||
|
var prefixPurchaseMaterial = ctx + "purchase/purchaseMaterial" |
||||
|
|
||||
|
var purchasingUnitDatas = [[${@dict.getType('sys_unit_class')}]]; |
||||
|
var judgmentResultsDatas = [[${@dict.getType('judgment_results')}]]; |
||||
|
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]]; |
||||
|
|
||||
|
$("#form-warehousingInspectionNotice-add").validate({ |
||||
|
focusCleanup: true |
||||
|
}); |
||||
|
|
||||
|
function submitHandler() { |
||||
|
let getData=$('#addDetailTable').bootstrapTable('getData', true) |
||||
|
if(getData.length > 0){ |
||||
|
//确认添加选中的物料数据 |
||||
|
confirmDetailMaterial(); |
||||
|
if ($.validate.form()) { |
||||
|
$.operate.save(prefix + "/add", $('#form-warehousingInspectionNotice-add').serialize()); |
||||
|
} |
||||
|
} else { |
||||
|
$.modal.alertWarning("未选择物料,请添加!") |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$("input[name='inspectionDate']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd hh:ii:ss", |
||||
|
minView: "month", |
||||
|
autoclose: true, |
||||
|
todayBtn: true |
||||
|
}); |
||||
|
$("input[name='inspectionDate']").datetimepicker("setDate", new Date()); |
||||
|
|
||||
|
$("input[name='warehousingDate']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd", |
||||
|
minView: "month", |
||||
|
autoclose: true, |
||||
|
todayBtn: true |
||||
|
}); |
||||
|
$("input[name='warehousingDate']").datetimepicker("setDate", new Date()); |
||||
|
|
||||
|
$(".file-upload").fileinput({ |
||||
|
uploadUrl: prefix + '/upload', |
||||
|
maxFileCount: 1, |
||||
|
autoReplace: true |
||||
|
}).on('fileuploaded', function (event, data, previewId, index) { |
||||
|
$("input[name='" + event.currentTarget.id + "']").val(data.response.url) |
||||
|
}).on('fileremoved', function (event, id, index) { |
||||
|
$("input[name='" + event.currentTarget.id + "']").val('') |
||||
|
}) |
||||
|
|
||||
|
//获取单号 |
||||
|
$.ajax({ |
||||
|
url: prefix + "/getIdFL", |
||||
|
type: "post", |
||||
|
dateType: "json", |
||||
|
success: function (resp) { |
||||
|
if (resp.code === 0) { |
||||
|
$("input[name='inNoticeNumber']").val(resp.data); |
||||
|
} else { |
||||
|
$.modal.msgError("失败啦"); |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
$.modal.msgError("后台出错啦!"); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
//初始化添加材料表 |
||||
|
$('#addDetailTable').bootstrapTable({ |
||||
|
pagination: true, |
||||
|
pageNumber: 1, |
||||
|
pageSize: 10, |
||||
|
showToggle: false, // 是否显示详细视图和列表视图的切换按钮 |
||||
|
cardView: false, // 是否显示详细视图 |
||||
|
detailView: false, // 是否显示父子表 |
||||
|
smartDisplay: false, // 加了这个才显示每页显示的行数 |
||||
|
showExport: false, // 是否显示导出按钮 |
||||
|
clickToSelect: true,//点击行选中 |
||||
|
contentType: "application/x-www-form-urlencoded", |
||||
|
paginationDetailHAlign: ' hiddenDetailInfo', |
||||
|
height: 250, |
||||
|
uniqueId: 'materialCode', |
||||
|
queryParams: function (params) { |
||||
|
//console.log("123"); |
||||
|
var curParams = { |
||||
|
// 传递参数查询参数 |
||||
|
pageSize: params.limit, |
||||
|
pageNum: params.offset / params.limit + 1, |
||||
|
// enterpriseCode: data[0].enterpriseCode |
||||
|
}; |
||||
|
// console.log(data[0].enterpriseCode) |
||||
|
return curParams |
||||
|
}, |
||||
|
columns: [ |
||||
|
// { |
||||
|
// title: '操作', |
||||
|
// align: 'center', |
||||
|
// formatter: function (value, row, index) { |
||||
|
// var actions = []; |
||||
|
// actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeProductData(\'' + row.rawSubsidiaryCode + '\')" ><i class="fa fa-remove"></i>删除</a>'); |
||||
|
// return actions.join(''); |
||||
|
// } |
||||
|
// }, |
||||
|
{ |
||||
|
field: 'warehousingInspectionDetailId', |
||||
|
title: '入库检验通知物料id', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'inNoticeNumber', |
||||
|
title: '入通知单号', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialCode', |
||||
|
title: '物料代码' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialName', |
||||
|
title: '物料名称' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'specificationModel', |
||||
|
title: '规格型号' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialType', |
||||
|
title: '物料类别', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(materialTypeDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'purchasingUnit', |
||||
|
title: '单位', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(purchasingUnitDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialQuantity', |
||||
|
title: '送货数量', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '送货数量', |
||||
|
emptytext: '送货数量', |
||||
|
validate: function (v) { |
||||
|
// if (isNaN(v)) return '数量必须是数字'; |
||||
|
// var ex = /^[1-9]\d*$/; |
||||
|
// if (!ex.test(v)) return '数量必须是正整数'; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'qualifiedQuantity', |
||||
|
title: '合格数量', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '合格数量', |
||||
|
emptytext: '合格数量', |
||||
|
validate: function (v) { |
||||
|
// if (isNaN(v)) return '数量必须是数字'; |
||||
|
// var ex = /^[1-9]\d*$/; |
||||
|
// if (!ex.test(v)) return '数量必须是正整数'; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'unqualifiedQuantity', |
||||
|
title: '不合格数量', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '不合格数量', |
||||
|
emptytext: '不合格数量', |
||||
|
validate: function (v) { |
||||
|
if (isNaN(v)) return '数量必须是数字'; |
||||
|
var ex = /^[1-9]\d*$/; |
||||
|
if (!ex.test(v)) return '数量必须是正整数'; |
||||
|
} |
||||
|
}, |
||||
|
formatter:function(value, row, index) { |
||||
|
let unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity; |
||||
|
row.unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity; |
||||
|
return unqualifiedQuantity.toFixed(0); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'qualificationRate', |
||||
|
title: '合格率', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '合格率', |
||||
|
emptytext: '合格率', |
||||
|
validate: function (v) { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
formatter:function(value, row, index) { |
||||
|
let total = row.qualifiedQuantity / row.materialQuantity; |
||||
|
row.qualificationRate = row.qualifiedQuantity / row.materialQuantity; |
||||
|
return (total*100).toFixed(2) + '%'; |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'purchaseExplain', |
||||
|
title: '说明', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '说明', |
||||
|
emptytext: '说明', |
||||
|
validate: function (v) { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'judgmentResults', |
||||
|
title: '判定结果', |
||||
|
editable: { |
||||
|
type: 'select', |
||||
|
title: '判定结果', |
||||
|
emptytext: '判定结果', |
||||
|
source: function() { |
||||
|
let result = []; |
||||
|
for (let i = 0;i<judgmentResultsDatas.length;i++) { |
||||
|
result.push({value: judgmentResultsDatas[i].dictValue,text: judgmentResultsDatas[i].dictLabel}) |
||||
|
} |
||||
|
return result; |
||||
|
}, |
||||
|
validate: function (value) { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
// { |
||||
|
// field: 'receiptBatchNumber', |
||||
|
// title: '收货批号', |
||||
|
// editable: { |
||||
|
// type: 'text', |
||||
|
// title: '收货批号', |
||||
|
// emptytext: '收货批号', |
||||
|
// validate: function (v) { |
||||
|
// |
||||
|
// } |
||||
|
// } |
||||
|
// }, |
||||
|
// { |
||||
|
// field: 'manufacturerBatchNumber', |
||||
|
// title: '厂商批号', |
||||
|
// editable: { |
||||
|
// type: 'text', |
||||
|
// title: '厂商批号', |
||||
|
// emptytext: '厂商批号', |
||||
|
// validate: function (v) { |
||||
|
// |
||||
|
// } |
||||
|
// } |
||||
|
// } |
||||
|
] |
||||
|
}) |
||||
|
|
||||
|
//获取订单号 |
||||
|
$.ajax({ |
||||
|
url: prefixPurchaseOrder + '/list', |
||||
|
type: "post", |
||||
|
success: function (res) { |
||||
|
// console.log(res) |
||||
|
if (res.rows.length > 0) { |
||||
|
var orderData = res.rows; |
||||
|
//alert(JSON.stringify(data)); |
||||
|
for (let i in orderData) { |
||||
|
// console.log(finishProductData[i].finishProductCode) |
||||
|
$("#form-warehousingInspectionNotice-add select[name='purchaseOrderNumber']").append("<option value='" + orderData[i].purchaseOrderNumber + "'>" + orderData[i].purchaseOrderNumber + "</option>"); |
||||
|
} |
||||
|
$("#form-warehousingInspectionNotice-add select[name='purchaseOrderNumber']").change(function () { |
||||
|
var purchaseOrderNumber = $(this).val(); |
||||
|
for (let i=0;i<orderData.length;i++) { |
||||
|
if (orderData[i].purchaseOrderNumber == purchaseOrderNumber) { |
||||
|
$("#form-warehousingInspectionNotice-add input[name='supplierCode']").val(orderData[i].supplierCode); |
||||
|
$("#form-warehousingInspectionNotice-add input[name='supplierName']").val(orderData[i].supplierName); |
||||
|
$("#form-warehousingInspectionNotice-add input[name='customerContact']").val(orderData[i].customerContact); |
||||
|
//选择订单号显示表内订单信息 |
||||
|
showDetailMaterial(); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
} else { |
||||
|
$.modal.msgError(res.msg); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
//获取仓库信息 |
||||
|
$.ajax({ |
||||
|
url: ctx + "stock/stockInfo/list", |
||||
|
type: "post", |
||||
|
success: function (res) { |
||||
|
// console.log(res) |
||||
|
if (res.rows.length > 0) { |
||||
|
let stockData = res.rows; |
||||
|
for (let i in stockData) { |
||||
|
// console.log(finishProductData[i].finishProductCode) |
||||
|
$("#form-warehousingInspectionNotice-add select[name='stockName']").append("<option value='" + stockData[i].stockname + "'>" + stockData[i].stockname + "</option>"); |
||||
|
} |
||||
|
$("#form-warehousingInspectionNotice-add select[name='stockName']").change(function () { |
||||
|
var stockName = $(this).val(); |
||||
|
for (let i=0;i<stockData.length;i++) { |
||||
|
if (stockData[i].stockname == stockName) { |
||||
|
$("#form-warehousingInspectionNotice-add input[name='stockNumber']").val(stockData[i].stockNO); |
||||
|
$("#form-warehousingInspectionNotice-add input[name='stockManager']").val(stockData[i].stockmanager); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
//选择订单号显示表内订单信息 |
||||
|
function showDetailMaterial() { |
||||
|
$('#addDetailTable').bootstrapTable("removeAll") |
||||
|
var purchaseOrderNumber = $("select[name='purchaseOrderNumber']").val(); |
||||
|
$.ajax({ |
||||
|
url: prefixPurchaseMaterial + '/list', |
||||
|
type: 'post', |
||||
|
data: { |
||||
|
purchaseOrderNumber: purchaseOrderNumber |
||||
|
}, |
||||
|
success: function (res) { |
||||
|
console.log(res) |
||||
|
var count = res.rows.length; |
||||
|
var data = res.rows; |
||||
|
var inNoticeNumber = $("input[name='inNoticeNumber']").val(); |
||||
|
for (i = 0; i < res.rows.length; i++) { |
||||
|
$("#addDetailTable").bootstrapTable('insertRow', { |
||||
|
index: count + i, |
||||
|
row: { |
||||
|
inNoticeNumber: inNoticeNumber, |
||||
|
materialCode: data[i].rawSubsidiaryCode, |
||||
|
materialName: data[i].rawSubsidiaryName, |
||||
|
specificationModel: data[i].specificationModel, |
||||
|
materialType: data[i].materialType, |
||||
|
purchasingUnit: data[i].purchasingUnit, |
||||
|
materialQuantity: data[i].materialQuantity, |
||||
|
qualifiedQuantity: '', |
||||
|
unqualifiedQuantity: '', |
||||
|
qualificationRate: '', |
||||
|
purchaseExplain: data[i].purchaseExplain, |
||||
|
judgmentResults: '' |
||||
|
// receiptBatchNumber: '', |
||||
|
// manufacturerBatchNumber: '', |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
//确认添加选中的物料数据 |
||||
|
function confirmDetailMaterial() { |
||||
|
$("#addDetailTable").bootstrapTable('refresh'); |
||||
|
let data = $('#addDetailTable').bootstrapTable('getData', true); |
||||
|
// let getData=$('#addProductTable').bootstrapTable('getData', true) |
||||
|
// console.log(data) |
||||
|
$.ajax({ |
||||
|
url: prefixDetail + '/addEditSave', |
||||
|
type: "POST", |
||||
|
data: { |
||||
|
data: JSON.stringify(data) |
||||
|
}, |
||||
|
dataType: "json", |
||||
|
success: function (resp) { |
||||
|
// console.log(data) |
||||
|
console.log(resp) |
||||
|
}, |
||||
|
|
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,535 @@ |
|||||
|
<!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" /> |
||||
|
<th:block th:include="include :: bootstrap-fileinput-css"/> |
||||
|
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
||||
|
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
||||
|
<th:block th:include="include :: bootstrap-editable-css"/> |
||||
|
<style> |
||||
|
.other-container { |
||||
|
width: 90%; |
||||
|
height: 200px; |
||||
|
margin: auto; |
||||
|
} |
||||
|
.other { |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
h4 { |
||||
|
display: inline-block; |
||||
|
margin-right: 20px; |
||||
|
} |
||||
|
.modal-body{ |
||||
|
height: 550px; |
||||
|
} |
||||
|
iframe{ |
||||
|
width: 100%; |
||||
|
height: 500px; |
||||
|
frameborder: 0; |
||||
|
border: 0; |
||||
|
display: inline-block; |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-warehousingInspectionNotice-edit" th:object="${warehousingInspectionNotice}"> |
||||
|
<input name="warehousingInspectionNoticeId" th:field="*{warehousingInspectionNoticeId}" type="hidden"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">入通知单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="inNoticeNumber" th:field="*{inNoticeNumber}" class="form-control" type="text" required readonly> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">订购单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select name="purchaseOrderNumber" class="form-control m-b" th:field="*{purchaseOrderNumber}" readonly> |
||||
|
<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="supplierCode" th:field="*{supplierCode}" 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="supplierName" th:field="*{supplierName}" 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="customerContact" th:field="*{customerContact}" 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="stockName" class="form-control m-b" th:field="*{stockName}"> |
||||
|
<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="stockNumber" th:field="*{stockNumber}" 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="stockManager" th:field="*{stockManager}" 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="exportSales" class="form-control m-b" th:with="type=${@dict.getType('sys_export_sales')}"> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{exportSales}"></option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">入库类别:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select name="warehousingCategory" class="form-control m-b" th:with="type=${@dict.getType('warehousing_category')}"> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehousingCategory}"></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="inspectionDate" th:field="*{inspectionDate}" class="form-control" placeholder="yyyy-MM-dd hh:ii:ss" type="text"> |
||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- <div class="form-group"> --> |
||||
|
<!-- <label class="col-sm-3 control-label">入库日期:</label>--> |
||||
|
<!-- <div class="col-sm-8">--> |
||||
|
<!-- <div class="input-group date">--> |
||||
|
<!-- <input name="warehousingDate" th:field="*{warehousingDate}" 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"> |
||||
|
<textarea name="remarks" class="form-control">[[*{remarks}]]</textarea> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- <div class="form-group"> --> |
||||
|
<!-- <label class="col-sm-3 control-label">检验报告:</label>--> |
||||
|
<!-- <div class="col-sm-8">--> |
||||
|
<!-- <input type="hidden" name="inspectionReport" th:field="*{inspectionReport}">--> |
||||
|
<!-- <div class="file-loading">--> |
||||
|
<!-- <input class="form-control file-upload" id="inspectionReport" name="file" type="file">--> |
||||
|
<!-- </div>--> |
||||
|
<!-- </div>--> |
||||
|
<!-- </div>--> |
||||
|
</form> |
||||
|
</div> |
||||
|
<div class="other-container"> |
||||
|
<div class="other"> |
||||
|
<br><hr> |
||||
|
<h4>订单材料信息</h4> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="addDetailTable" style="white-space:nowrap"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<th:block th:include="include :: bootstrap-fileinput-js"/> |
||||
|
<th:block th:include="include :: select2-js"/> |
||||
|
<th:block th:include="include :: bootstrap-table-editable-js"/> |
||||
|
<script th:inline="javascript"> |
||||
|
|
||||
|
var getData = [[${warehousingInspectionNotice}]]; |
||||
|
var prefix = ctx + "storehouse/warehousingInspectionNotice"; |
||||
|
var prefixDetail = ctx + "storehouse/warehousingInspectionDetail"; |
||||
|
var prefixPurchaseOrder = ctx + "purchase/purchaseOrder" |
||||
|
var prefixPurchaseMaterial = ctx + "purchase/purchaseMaterial" |
||||
|
|
||||
|
var purchasingUnitDatas = [[${@dict.getType('sys_unit_class')}]]; |
||||
|
var judgmentResultsDatas = [[${@dict.getType('judgment_results')}]]; |
||||
|
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]]; |
||||
|
|
||||
|
$("#form-warehousingInspectionNotice-edit").validate({ |
||||
|
focusCleanup: true |
||||
|
}); |
||||
|
|
||||
|
function submitHandler() { |
||||
|
let getData=$('#addDetailTable').bootstrapTable('getData', true) |
||||
|
if(getData.length > 0){ |
||||
|
//确认添加选中的物料数据 |
||||
|
confirmDetailMaterial(); |
||||
|
if ($.validate.form()) { |
||||
|
$.operate.save(prefix + "/edit", $('#form-warehousingInspectionNotice-edit').serialize()); |
||||
|
} |
||||
|
} else { |
||||
|
$.modal.alertWarning("未选择物料,请添加!") |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$("input[name='inspectionDate']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd hh:ii:ss", |
||||
|
minView: "month", |
||||
|
autoclose: true |
||||
|
}); |
||||
|
|
||||
|
$("input[name='warehousingDate']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd", |
||||
|
minView: "month", |
||||
|
autoclose: true |
||||
|
}); |
||||
|
|
||||
|
$(".file-upload").each(function (i) { |
||||
|
var val = $("input[name='" + this.id + "']").val() |
||||
|
$(this).fileinput({ |
||||
|
'uploadUrl': prefix + '/upload', |
||||
|
initialPreviewAsData: true, |
||||
|
initialPreview: [val], |
||||
|
maxFileCount: 1, |
||||
|
autoReplace: true |
||||
|
}).on('fileuploaded', function (event, data, previewId, index) { |
||||
|
$("input[name='" + event.currentTarget.id + "']").val(data.response.url) |
||||
|
}).on('fileremoved', function (event, id, index) { |
||||
|
$("input[name='" + event.currentTarget.id + "']").val('') |
||||
|
}) |
||||
|
$(this).fileinput('_initFileActions'); |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
//初始化添加材料表 |
||||
|
$('#addDetailTable').bootstrapTable({ |
||||
|
url: prefixDetail + '/list', |
||||
|
pagination: true, |
||||
|
pageNumber: 1, |
||||
|
pageSize: 10, |
||||
|
method: "post", |
||||
|
contentType: "application/x-www-form-urlencoded", |
||||
|
striped: true, // 是否显示行间隔色 |
||||
|
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) |
||||
|
showToggle: false, // 是否显示详细视图和列表视图的切换按钮 |
||||
|
cardView: false, // 是否显示详细视图 |
||||
|
detailView: false, // 是否显示父子表 |
||||
|
smartDisplay: false, // 加了这个才显示每页显示的行数 |
||||
|
showExport: false, // 是否显示导出按钮 |
||||
|
clickToSelect: true, |
||||
|
paginationDetailHAlign: ' hiddenDetailInfo', |
||||
|
height: 250, |
||||
|
uniqueId: 'materialCode', |
||||
|
queryParams: function (params) { |
||||
|
//console.log("123"); |
||||
|
var curParams = { |
||||
|
// 传递参数查询参数 |
||||
|
pageSize: params.limit, |
||||
|
pageNum: params.offset / params.limit + 1, |
||||
|
inNoticeNumber: getData.inNoticeNumber |
||||
|
// enterpriseCode: data[0].enterpriseCode |
||||
|
}; |
||||
|
// console.log(data[0].enterpriseCode) |
||||
|
return curParams |
||||
|
}, |
||||
|
columns: [ |
||||
|
// { |
||||
|
// title: '操作', |
||||
|
// align: 'center', |
||||
|
// formatter: function (value, row, index) { |
||||
|
// var actions = []; |
||||
|
// actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeProductData(\'' + row.rawSubsidiaryCode + '\')" ><i class="fa fa-remove"></i>删除</a>'); |
||||
|
// return actions.join(''); |
||||
|
// } |
||||
|
// }, |
||||
|
{ |
||||
|
field: 'warehousingInspectionDetailId', |
||||
|
title: '入库检验通知物料id', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'inNoticeNumber', |
||||
|
title: '入通知单号', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialCode', |
||||
|
title: '物料代码' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialName', |
||||
|
title: '物料名称' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'specificationModel', |
||||
|
title: '规格型号' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialType', |
||||
|
title: '物料类别', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(materialTypeDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'purchasingUnit', |
||||
|
title: '单位', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(purchasingUnitDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialQuantity', |
||||
|
title: '送货数量', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '送货数量', |
||||
|
emptytext: '送货数量', |
||||
|
validate: function (v) { |
||||
|
// if (isNaN(v)) return '数量必须是数字'; |
||||
|
// var ex = /^[1-9]\d*$/; |
||||
|
// if (!ex.test(v)) return '数量必须是正整数'; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'qualifiedQuantity', |
||||
|
title: '合格数量', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '合格数量', |
||||
|
emptytext: '合格数量', |
||||
|
validate: function (v) { |
||||
|
// if (isNaN(v)) return '数量必须是数字'; |
||||
|
// var ex = /^[1-9]\d*$/; |
||||
|
// if (!ex.test(v)) return '数量必须是正整数'; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'unqualifiedQuantity', |
||||
|
title: '不合格数量', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '不合格数量', |
||||
|
emptytext: '不合格数量', |
||||
|
validate: function (v) { |
||||
|
if (isNaN(v)) return '数量必须是数字'; |
||||
|
var ex = /^[1-9]\d*$/; |
||||
|
if (!ex.test(v)) return '数量必须是正整数'; |
||||
|
} |
||||
|
}, |
||||
|
formatter:function(value, row, index) { |
||||
|
let unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity; |
||||
|
row.unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity; |
||||
|
return unqualifiedQuantity.toFixed(0); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'qualificationRate', |
||||
|
title: '合格率', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '合格率', |
||||
|
emptytext: '合格率', |
||||
|
validate: function (v) { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
formatter:function(value, row, index) { |
||||
|
let total = row.qualifiedQuantity / row.materialQuantity; |
||||
|
row.qualificationRate = row.qualifiedQuantity / row.materialQuantity; |
||||
|
return (total*100).toFixed(2) + '%'; |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'purchaseExplain', |
||||
|
title: '说明', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '说明', |
||||
|
emptytext: '说明', |
||||
|
validate: function (v) { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'judgmentResults', |
||||
|
title: '判定结果', |
||||
|
editable: { |
||||
|
type: 'select', |
||||
|
title: '判定结果', |
||||
|
emptytext: '判定结果', |
||||
|
source: function() { |
||||
|
let result = []; |
||||
|
for (let i = 0;i<judgmentResultsDatas.length;i++) { |
||||
|
result.push({value: judgmentResultsDatas[i].dictValue,text: judgmentResultsDatas[i].dictLabel}) |
||||
|
} |
||||
|
return result; |
||||
|
}, |
||||
|
validate: function (value) { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
// { |
||||
|
// field: 'receiptBatchNumber', |
||||
|
// title: '收货批号', |
||||
|
// editable: { |
||||
|
// type: 'text', |
||||
|
// title: '收货批号', |
||||
|
// emptytext: '收货批号', |
||||
|
// validate: function (v) { |
||||
|
// |
||||
|
// } |
||||
|
// } |
||||
|
// }, |
||||
|
// { |
||||
|
// field: 'manufacturerBatchNumber', |
||||
|
// title: '厂商批号', |
||||
|
// editable: { |
||||
|
// type: 'text', |
||||
|
// title: '厂商批号', |
||||
|
// emptytext: '厂商批号', |
||||
|
// validate: function (v) { |
||||
|
// |
||||
|
// } |
||||
|
// } |
||||
|
// } |
||||
|
] |
||||
|
}) |
||||
|
|
||||
|
//获取订单号 |
||||
|
$.ajax({ |
||||
|
url: prefixPurchaseOrder + '/list', |
||||
|
type: "post", |
||||
|
success: function (res) { |
||||
|
// console.log(res) |
||||
|
if (res.rows.length > 0) { |
||||
|
var orderData = res.rows; |
||||
|
//alert(JSON.stringify(data)); |
||||
|
for (let i in orderData) { |
||||
|
// console.log(finishProductData[i].finishProductCode) |
||||
|
$("#form-warehousingInspectionNotice-edit select[name='purchaseOrderNumber']").append("<option value='" + orderData[i].purchaseOrderNumber + "'>" + orderData[i].purchaseOrderNumber + "</option>"); |
||||
|
} |
||||
|
$("#form-warehousingInspectionNotice-edit select[name='purchaseOrderNumber']").val(getData.purchaseOrderNumber).trigger("change"); |
||||
|
$("#form-warehousingInspectionNotice-edit select[name='purchaseOrderNumber']").change(function () { |
||||
|
var purchaseOrderNumber = $(this).val(); |
||||
|
for (let i=0;i<orderData.length;i++) { |
||||
|
if (orderData[i].purchaseOrderNumber == purchaseOrderNumber) { |
||||
|
$("#form-warehousingInspectionNotice-edit input[name='supplierCode']").val(orderData[i].supplierCode); |
||||
|
$("#form-warehousingInspectionNotice-edit input[name='supplierName']").val(orderData[i].supplierName); |
||||
|
$("#form-warehousingInspectionNotice-edit input[name='customerContact']").val(orderData[i].customerContact); |
||||
|
//选择订单号显示表内订单信息 |
||||
|
showDetailMaterial(); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
} else { |
||||
|
$.modal.msgError(res.msg); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
//获取仓库信息 |
||||
|
$.ajax({ |
||||
|
url: ctx + "stock/stockInfo/list", |
||||
|
type: "post", |
||||
|
success: function (res) { |
||||
|
// console.log(res) |
||||
|
if (res.rows.length > 0) { |
||||
|
let stockData = res.rows; |
||||
|
for (let i in stockData) { |
||||
|
// console.log(finishProductData[i].finishProductCode) |
||||
|
$("#form-warehousingInspectionNotice-edit select[name='stockName']").append("<option value='" + stockData[i].stockname + "'>" + stockData[i].stockname + "</option>"); |
||||
|
} |
||||
|
$("#form-warehousingInspectionNotice-edit select[name='stockName']").val(getData.stockName).trigger("change"); |
||||
|
$("#form-warehousingInspectionNotice-edit select[name='stockName']").change(function () { |
||||
|
var stockName = $(this).val(); |
||||
|
for (let i=0;i<stockData.length;i++) { |
||||
|
if (stockData[i].stockname == stockName) { |
||||
|
$("#form-warehousingInspectionNotice-edit input[name='stockNumber']").val(stockData[i].stockNO); |
||||
|
$("#form-warehousingInspectionNotice-edit input[name='stockManager']").val(stockData[i].stockmanager); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
//选择订单号显示表内订单信息 |
||||
|
function showDetailMaterial() { |
||||
|
$('#addDetailTable').bootstrapTable("removeAll") |
||||
|
var purchaseOrderNumber = $("select[name='purchaseOrderNumber']").val(); |
||||
|
$.ajax({ |
||||
|
url: prefixPurchaseMaterial + '/list', |
||||
|
type: 'post', |
||||
|
data: { |
||||
|
purchaseOrderNumber: purchaseOrderNumber |
||||
|
}, |
||||
|
success: function (res) { |
||||
|
console.log(res) |
||||
|
var count = res.rows.length; |
||||
|
var data = res.rows; |
||||
|
var inNoticeNumber = $("input[name='inNoticeNumber']").val(); |
||||
|
for (i = 0; i < res.rows.length; i++) { |
||||
|
$("#addDetailTable").bootstrapTable('insertRow', { |
||||
|
index: count + i, |
||||
|
row: { |
||||
|
inNoticeNumber: inNoticeNumber, |
||||
|
materialCode: data[i].rawSubsidiaryCode, |
||||
|
materialName: data[i].rawSubsidiaryName, |
||||
|
specificationModel: data[i].specificationModel, |
||||
|
materialType: data[i].materialType, |
||||
|
purchasingUnit: data[i].purchasingUnit, |
||||
|
materialQuantity: data[i].materialQuantity, |
||||
|
qualifiedQuantity: '', |
||||
|
unqualifiedQuantity: '', |
||||
|
qualificationRate: '', |
||||
|
purchaseExplain: data[i].purchaseExplain, |
||||
|
judgmentResults: '' |
||||
|
// receiptBatchNumber: '', |
||||
|
// manufacturerBatchNumber: '', |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
//确认添加选中的物料数据 |
||||
|
function confirmDetailMaterial() { |
||||
|
$("#addDetailTable").bootstrapTable('refresh'); |
||||
|
let data = $('#addDetailTable').bootstrapTable('getData', true); |
||||
|
// let getData=$('#addProductTable').bootstrapTable('getData', true) |
||||
|
// console.log(data) |
||||
|
$.ajax({ |
||||
|
url: prefixDetail + '/addEditSave', |
||||
|
type: "POST", |
||||
|
data: { |
||||
|
data: JSON.stringify(data) |
||||
|
}, |
||||
|
dataType: "json", |
||||
|
success: function (resp) { |
||||
|
// console.log(data) |
||||
|
console.log(resp) |
||||
|
}, |
||||
|
|
||||
|
}) |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,394 @@ |
|||||
|
<!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('入库检验通知列表')" /> |
||||
|
<th:block th:include="include :: datetimepicker-css"/> |
||||
|
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script> |
||||
|
</head> |
||||
|
<body class="gray-bg"> |
||||
|
<div class="container-div"> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 search-collapse"> |
||||
|
<form id="formId"> |
||||
|
<div class="select-list"> |
||||
|
<ul> |
||||
|
<li> |
||||
|
<label>入通知单号:</label> |
||||
|
<input type="text" name="inNoticeNumber"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>订购单号:</label> |
||||
|
<input type="text" name="purchaseOrderNumber"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>供应商代码:</label> |
||||
|
<input type="text" name="supplierCode"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>供应商名称:</label> |
||||
|
<input type="text" name="supplierName"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>入库类别:</label> |
||||
|
<select name="warehousingCategory" th:with="type=${@dict.getType('warehousing_category')}"> |
||||
|
<option value="">所有</option> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
||||
|
</select> |
||||
|
</li> |
||||
|
<!-- <li class="select-time">--> |
||||
|
<!-- <label>入库日期:</label>--> |
||||
|
<!-- <input type="text" class="time-input" id="startTime" placeholder="开始日期" name="params[beginWarehousingDate]"/>--> |
||||
|
<!-- <span>-</span>--> |
||||
|
<!-- <input type="text" class="time-input" id="endTime" placeholder="结束日期" name="params[endWarehousingDate]"/>--> |
||||
|
<!-- </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="storehouse:warehousingInspectionNotice:add"> |
||||
|
<i class="fa fa-plus"></i> 添加 |
||||
|
</a> |
||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="storehouse:warehousingInspectionNotice:edit"> |
||||
|
<i class="fa fa-edit"></i> 修改 |
||||
|
</a> |
||||
|
<a class="btn btn-danger multiple disabled" onclick="removeSelected()" shiro:hasPermission="storehouse:warehousingInspectionNotice:remove"> |
||||
|
<i class="fa fa-remove"></i> 删除 |
||||
|
</a> |
||||
|
<!-- <a class="btn btn-warning" onclick="exportSelected()" shiro:hasPermission="storehouse:warehousingInspectionNotice:export">--> |
||||
|
<!-- <i class="fa fa-download"></i> 导出--> |
||||
|
<!-- </a>--> |
||||
|
<a class="btn btn-primary" onclick="reviewConfirm()" shiro:hasPermission="storehouse:warehousingInspectionNotice:confirm"> |
||||
|
<i class="fa fa-hand-grab-o"></i> 确认 |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="bootstrap-table" style="white-space: nowrap"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!--订单确认--> |
||||
|
<div class="modal fade" id="confirmModel"> |
||||
|
<div class="modal-dialog"> |
||||
|
<div class="modal-content message_align"> |
||||
|
<div class="modal-header"> |
||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span |
||||
|
aria-hidden="true">×</span></button> |
||||
|
<h4 class="modal-title">确认信息</h4> |
||||
|
</div> |
||||
|
<div class="modal-body" style="height: 180px"> |
||||
|
<form id="form-confirm-edit"> |
||||
|
<div class="form-group" style="display: none"> |
||||
|
<label class="col-sm-3 control-label is-required">入库检验通知id:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input id="warehousingInspectionNoticeId" name="warehousingInspectionNoticeId" class="form-control" type="text" required |
||||
|
readonly> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">确认否:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select id="confirmFlag" name="confirmFlag" class="form-control" th:with="type=${@dict.getType('sys_whether')}"> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">确认日期:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="input-group date"> |
||||
|
<input id="confirmTime" name="confirmTime" class="form-control" placeholder="yyyy-mm-dd hh:ii:ss" type="text"> |
||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">确认人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input id="confirmPerson" name="confirmPerson" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<div class="modal-footer"> |
||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button> |
||||
|
<button type="button" onclick="confirmSubmit()" class="btn btn-success" data-dismiss="modal">确定</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var editFlag = [[${@permission.hasPermi('storehouse:warehousingInspectionNotice:edit')}]]; |
||||
|
var removeFlag = [[${@permission.hasPermi('storehouse:warehousingInspectionNotice:remove')}]]; |
||||
|
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]]; |
||||
|
var warehousingCategoryDatas = [[${@dict.getType('warehousing_category')}]]; |
||||
|
var confirmNoDatas = [[${@dict.getType('sys_whether')}]]; |
||||
|
|
||||
|
var prefix = ctx + "storehouse/warehousingInspectionNotice"; |
||||
|
var prefixDetail = ctx + "storehouse/warehousingInspectionDetail" |
||||
|
|
||||
|
$(function() { |
||||
|
var options = { |
||||
|
url: prefix + "/listFL", |
||||
|
createUrl: prefix + "/addFL", |
||||
|
updateUrl: prefix + "/editFL/{id}", |
||||
|
removeUrl: prefix + "/remove", |
||||
|
exportUrl: prefix + "/export", |
||||
|
clickToSelect: true, |
||||
|
modalName: "入库检验通知", |
||||
|
columns: [{ |
||||
|
checkbox: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'warehousingInspectionNoticeId', |
||||
|
title: '入库检验通知id', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'confirmFlag', |
||||
|
title: '确认否', |
||||
|
formatter: function(value, row, index) { |
||||
|
// return $.table.selectDictLabel(confirmNoDatas, value); |
||||
|
var actions = []; |
||||
|
if ($.table.selectDictLabel(confirmNoDatas, value) == "<span class=''>是</span>") { |
||||
|
actions.push('<a class="btn btn-primary btn-xs disabled">已确认</a> '); |
||||
|
} else { |
||||
|
actions.push('<a class="btn btn-danger btn-xs disabled">未确认</a> '); |
||||
|
} |
||||
|
return actions.join(''); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'inNoticeNumber', |
||||
|
title: '入通知单号' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'purchaseOrderNumber', |
||||
|
title: '订购单号' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'supplierCode', |
||||
|
title: '供应商代码' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'supplierName', |
||||
|
title: '供应商名称' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'customerContact', |
||||
|
title: '联系人' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'stockNumber', |
||||
|
title: '仓库编号' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'stockName', |
||||
|
title: '仓库名称' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'stockManager', |
||||
|
title: '仓库管理员' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'exportSales', |
||||
|
title: '内外销', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(exportSalesDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'warehousingCategory', |
||||
|
title: '入库类别', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(warehousingCategoryDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'inspectionDate', |
||||
|
title: '交检时间' |
||||
|
}, |
||||
|
// { |
||||
|
// field: 'warehousingDate', |
||||
|
// title: '入库日期' |
||||
|
// }, |
||||
|
{ |
||||
|
field: 'remarks', |
||||
|
title: '备注' |
||||
|
}, |
||||
|
// { |
||||
|
// field: 'inspectionReport', |
||||
|
// title: '检验报告', |
||||
|
// formatter: function(value, row, index) { |
||||
|
// console.log(value) |
||||
|
// if (value !== null) { |
||||
|
// var filepath = value.substring(value.lastIndexOf("/")+1) |
||||
|
// var actions = []; |
||||
|
// actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> '); |
||||
|
// return actions.join(''); |
||||
|
// } else { |
||||
|
// return value |
||||
|
// } |
||||
|
// |
||||
|
// } |
||||
|
// }, |
||||
|
{ |
||||
|
field: 'confirmPerson', |
||||
|
title: '确认人', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'confirmTime', |
||||
|
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]; |
||||
|
} |
||||
|
} |
||||
|
}] |
||||
|
}; |
||||
|
$.table.init(options); |
||||
|
}); |
||||
|
|
||||
|
/*下载*/ |
||||
|
function downloadFile(filepath) { |
||||
|
window.location.href =prefix + "/downloadFile?filepath="+ filepath; |
||||
|
} |
||||
|
|
||||
|
//删除 |
||||
|
function removeSelected() { |
||||
|
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); |
||||
|
console.log(rows) |
||||
|
if (rows.length > 0) { |
||||
|
$.modal.confirm("是否删除选中的"+ rows.length +"条辅料入库检验通知单?", function () { |
||||
|
$.ajax({ |
||||
|
url: prefix + '/removeSelected', |
||||
|
type: 'post', |
||||
|
data: { |
||||
|
ids : rows.join() |
||||
|
}, |
||||
|
success: function (res) { |
||||
|
// console.log(res) |
||||
|
$("#bootstrap-table").bootstrapTable("refresh"); |
||||
|
$.modal.msgSuccess("删除成功!") |
||||
|
}, |
||||
|
error: function (res) { |
||||
|
$.modal.msgError(res.error()) |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
} else { |
||||
|
$.modal.msgWarning("请选择一条数据") |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//导出 |
||||
|
function exportSelected() { |
||||
|
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); |
||||
|
var data = $("#bootstrap-table").bootstrapTable("getSelections") |
||||
|
|
||||
|
if (rows.length !== 1) { |
||||
|
$.modal.alert("请选择一条记录"); |
||||
|
return; |
||||
|
} else { |
||||
|
// rows为选中行的id |
||||
|
// console.log(rows); |
||||
|
// console.log(data); |
||||
|
// console.log(data[0].orderNumber) |
||||
|
$.modal.confirm("是否确认要导出本条订单?", function (){ |
||||
|
axios({ |
||||
|
url: prefix + '/exportSelected/'+data[0].warehousingInspectionNoticeId, |
||||
|
method: 'POST', |
||||
|
responseType: 'blob' |
||||
|
}).then(response => { |
||||
|
// console.log(response) |
||||
|
const URL = window.URL.createObjectURL(response.data) |
||||
|
// 创建隐藏<a>标签进行下载 |
||||
|
const tempLink = document.createElement('a') |
||||
|
tempLink.style.display = 'none' |
||||
|
tempLink.href = URL |
||||
|
let time = new Date().toLocaleString() |
||||
|
tempLink.setAttribute('download', time + "物料检验通知单.xlsx") |
||||
|
if (typeof tempLink.download === 'undefined') { |
||||
|
tempLink.setAttribute('target', '_blank') |
||||
|
} |
||||
|
document.body.appendChild(tempLink) |
||||
|
tempLink.click() |
||||
|
document.body.removeChild(tempLink)// 移除dom元素 |
||||
|
window.URL.revokeObjectURL(URL)//释放内存 |
||||
|
}) |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$("input[name='confirmTime']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd hh:ii:ss", |
||||
|
minView: "month", |
||||
|
autoclose: true |
||||
|
}); |
||||
|
|
||||
|
// 订单确认 |
||||
|
function reviewConfirm(){ |
||||
|
let data = $("#bootstrap-table").bootstrapTable("getSelections"); |
||||
|
let userName = [[${@permission.getPrincipalProperty('userName')}]]; |
||||
|
if (data.length ===1) { |
||||
|
$("#warehousingInspectionNoticeId").val(data[0].warehousingInspectionNoticeId) |
||||
|
$("#confirmFlag").val(data[0].confirmFlag).trigger("change") |
||||
|
$("#confirmPerson").val(userName) |
||||
|
$("#confirmTime").datetimepicker("setDate", new Date()); |
||||
|
$("#confirmModel").modal("show"); |
||||
|
}else { |
||||
|
$.modal.alert("请选择一条数据"); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
// 订单确认 |
||||
|
function confirmSubmit(){ |
||||
|
$.ajax({ |
||||
|
url: prefix + "/edit", |
||||
|
type: "post", |
||||
|
resultType: "json", |
||||
|
data: $('#form-confirm-edit').serialize(), |
||||
|
success: function (resp) { |
||||
|
// console.log(resp) |
||||
|
$("#confirmModel").modal("hide"); |
||||
|
$("#bootstrap-table").bootstrapTable('refresh'); |
||||
|
$.modal.msgSuccess("操作成功!") |
||||
|
}, |
||||
|
error: function () { |
||||
|
$.modal.msgError("出错了!"); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,547 @@ |
|||||
|
<!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" /> |
||||
|
<th:block th:include="include :: bootstrap-fileinput-css"/> |
||||
|
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
||||
|
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
||||
|
<th:block th:include="include :: bootstrap-editable-css"/> |
||||
|
<style> |
||||
|
.other-container { |
||||
|
width: 90%; |
||||
|
height: 200px; |
||||
|
margin: auto; |
||||
|
} |
||||
|
.other { |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
h4 { |
||||
|
display: inline-block; |
||||
|
margin-right: 20px; |
||||
|
} |
||||
|
.modal-body{ |
||||
|
height: 550px; |
||||
|
} |
||||
|
iframe{ |
||||
|
width: 100%; |
||||
|
height: 500px; |
||||
|
frameborder: 0; |
||||
|
border: 0; |
||||
|
display: inline-block; |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-warehousingInspectionNotice-add"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">入通知单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="inNoticeNumber" class="form-control" type="text" required readonly> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">订购单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select name="purchaseOrderNumber" class="form-control m-b" required> |
||||
|
<option value="">所有</option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">供应商代码:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="supplierCode" 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="supplierName" 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="customerContact" 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="stockName" 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="stockNumber" 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="stockManager" 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="exportSales" class="form-control m-b" th:with="type=${@dict.getType('sys_export_sales')}"> |
||||
|
<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="warehousingCategory" class="form-control m-b" th:with="type=${@dict.getType('warehousing_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="inspectionDate" class="form-control" placeholder="yyyy-MM-dd hh:ii:ss" type="text"> |
||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- <div class="form-group"> --> |
||||
|
<!-- <label class="col-sm-3 control-label">入库日期:</label>--> |
||||
|
<!-- <div class="col-sm-8">--> |
||||
|
<!-- <div class="input-group date">--> |
||||
|
<!-- <input name="warehousingDate" 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"> |
||||
|
<textarea name="remarks" class="form-control"></textarea> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">检验报告:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input type="hidden" name="inspectionReport"> |
||||
|
<div class="file-loading"> |
||||
|
<input class="form-control file-upload" id="inspectionReport" name="file" type="file"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group hidden"> |
||||
|
<label class="col-sm-3 control-label">确认否:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select name="confirmFlag" class="form-control m-b" th:with="type=${@dict.getType('sys_whether')}"> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<div class="other-container"> |
||||
|
<div class="other"> |
||||
|
<br><hr> |
||||
|
<h4>订单材料信息</h4> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="addDetailTable" style="white-space:nowrap"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<th:block th:include="include :: bootstrap-fileinput-js"/> |
||||
|
<th:block th:include="include :: select2-js"/> |
||||
|
<th:block th:include="include :: bootstrap-table-editable-js"/> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "storehouse/warehousingInspectionNotice" |
||||
|
var prefixDetail = ctx + "storehouse/warehousingInspectionDetail" |
||||
|
var prefixPurchaseOrder = ctx + "purchase/purchaseOrder" |
||||
|
var prefixPurchaseMaterial = ctx + "purchase/purchaseMaterial" |
||||
|
|
||||
|
var purchasingUnitDatas = [[${@dict.getType('sys_unit_class')}]]; |
||||
|
var judgmentResultsDatas = [[${@dict.getType('judgment_results')}]]; |
||||
|
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]]; |
||||
|
|
||||
|
$("#form-warehousingInspectionNotice-add").validate({ |
||||
|
focusCleanup: true |
||||
|
}); |
||||
|
|
||||
|
function submitHandler() { |
||||
|
let getData=$('#addDetailTable').bootstrapTable('getData', true) |
||||
|
if(getData.length > 0){ |
||||
|
//确认添加选中的物料数据 |
||||
|
confirmDetailMaterial(); |
||||
|
if ($.validate.form()) { |
||||
|
$.operate.save(prefix + "/add", $('#form-warehousingInspectionNotice-add').serialize()); |
||||
|
} |
||||
|
} else { |
||||
|
$.modal.alertWarning("未选择物料,请添加!") |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$("input[name='inspectionDate']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd hh:ii:ss", |
||||
|
minView: "month", |
||||
|
autoclose: true, |
||||
|
todayBtn: true |
||||
|
}); |
||||
|
$("input[name='inspectionDate']").datetimepicker("setDate", new Date()); |
||||
|
|
||||
|
$("input[name='warehousingDate']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd", |
||||
|
minView: "month", |
||||
|
autoclose: true, |
||||
|
todayBtn: true |
||||
|
}); |
||||
|
$("input[name='warehousingDate']").datetimepicker("setDate", new Date()); |
||||
|
|
||||
|
$(".file-upload").fileinput({ |
||||
|
uploadUrl: prefix + '/upload', |
||||
|
maxFileCount: 1, |
||||
|
autoReplace: true |
||||
|
}).on('fileuploaded', function (event, data, previewId, index) { |
||||
|
$("input[name='" + event.currentTarget.id + "']").val(data.response.url) |
||||
|
}).on('fileremoved', function (event, id, index) { |
||||
|
$("input[name='" + event.currentTarget.id + "']").val('') |
||||
|
}) |
||||
|
|
||||
|
//获取单号 |
||||
|
$.ajax({ |
||||
|
url: prefix + "/getIdYL", |
||||
|
type: "post", |
||||
|
dateType: "json", |
||||
|
success: function (resp) { |
||||
|
if (resp.code === 0) { |
||||
|
$("input[name='inNoticeNumber']").val(resp.data); |
||||
|
} else { |
||||
|
$.modal.msgError("失败啦"); |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
$.modal.msgError("后台出错啦!"); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
//初始化添加材料表 |
||||
|
$('#addDetailTable').bootstrapTable({ |
||||
|
pagination: true, |
||||
|
pageNumber: 1, |
||||
|
pageSize: 10, |
||||
|
showToggle: false, // 是否显示详细视图和列表视图的切换按钮 |
||||
|
cardView: false, // 是否显示详细视图 |
||||
|
detailView: false, // 是否显示父子表 |
||||
|
smartDisplay: false, // 加了这个才显示每页显示的行数 |
||||
|
showExport: false, // 是否显示导出按钮 |
||||
|
clickToSelect: true,//点击行选中 |
||||
|
contentType: "application/x-www-form-urlencoded", |
||||
|
paginationDetailHAlign: ' hiddenDetailInfo', |
||||
|
height: 250, |
||||
|
uniqueId: 'materialCode', |
||||
|
queryParams: function (params) { |
||||
|
//console.log("123"); |
||||
|
var curParams = { |
||||
|
// 传递参数查询参数 |
||||
|
pageSize: params.limit, |
||||
|
pageNum: params.offset / params.limit + 1, |
||||
|
// enterpriseCode: data[0].enterpriseCode |
||||
|
}; |
||||
|
// console.log(data[0].enterpriseCode) |
||||
|
return curParams |
||||
|
}, |
||||
|
columns: [ |
||||
|
// { |
||||
|
// title: '操作', |
||||
|
// align: 'center', |
||||
|
// formatter: function (value, row, index) { |
||||
|
// var actions = []; |
||||
|
// actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeProductData(\'' + row.rawSubsidiaryCode + '\')" ><i class="fa fa-remove"></i>删除</a>'); |
||||
|
// return actions.join(''); |
||||
|
// } |
||||
|
// }, |
||||
|
{ |
||||
|
field: 'warehousingInspectionDetailId', |
||||
|
title: '入库检验通知物料id', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'inNoticeNumber', |
||||
|
title: '入通知单号', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialCode', |
||||
|
title: '物料代码' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialName', |
||||
|
title: '物料名称' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'specificationModel', |
||||
|
title: '规格型号' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialType', |
||||
|
title: '物料类别', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(materialTypeDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'purchasingUnit', |
||||
|
title: '单位', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(purchasingUnitDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialQuantity', |
||||
|
title: '送货数量', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '送货数量', |
||||
|
emptytext: '送货数量', |
||||
|
validate: function (v) { |
||||
|
// if (isNaN(v)) return '数量必须是数字'; |
||||
|
// var ex = /^[1-9]\d*$/; |
||||
|
// if (!ex.test(v)) return '数量必须是正整数'; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
// { |
||||
|
// field: 'qualifiedQuantity', |
||||
|
// title: '合格数量', |
||||
|
// editable: { |
||||
|
// type: 'text', |
||||
|
// title: '合格数量', |
||||
|
// emptytext: '合格数量', |
||||
|
// validate: function (v) { |
||||
|
// // if (isNaN(v)) return '数量必须是数字'; |
||||
|
// // var ex = /^[1-9]\d*$/; |
||||
|
// // if (!ex.test(v)) return '数量必须是正整数'; |
||||
|
// } |
||||
|
// } |
||||
|
// }, |
||||
|
// { |
||||
|
// field: 'unqualifiedQuantity', |
||||
|
// title: '不合格数量', |
||||
|
// editable: { |
||||
|
// type: 'text', |
||||
|
// title: '不合格数量', |
||||
|
// emptytext: '不合格数量', |
||||
|
// validate: function (v) { |
||||
|
// if (isNaN(v)) return '数量必须是数字'; |
||||
|
// var ex = /^[1-9]\d*$/; |
||||
|
// if (!ex.test(v)) return '数量必须是正整数'; |
||||
|
// } |
||||
|
// }, |
||||
|
// formatter:function(value, row, index) { |
||||
|
// let unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity; |
||||
|
// row.unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity; |
||||
|
// return unqualifiedQuantity.toFixed(0); |
||||
|
// } |
||||
|
// }, |
||||
|
// { |
||||
|
// field: 'qualificationRate', |
||||
|
// title: '合格率', |
||||
|
// editable: { |
||||
|
// type: 'text', |
||||
|
// title: '合格率', |
||||
|
// emptytext: '合格率', |
||||
|
// validate: function (v) { |
||||
|
// |
||||
|
// } |
||||
|
// }, |
||||
|
// formatter:function(value, row, index) { |
||||
|
// let total = row.qualifiedQuantity / row.materialQuantity; |
||||
|
// row.qualificationRate = row.qualifiedQuantity / row.materialQuantity; |
||||
|
// return (total*100).toFixed(2) + '%'; |
||||
|
// } |
||||
|
// }, |
||||
|
{ |
||||
|
field: 'purchaseExplain', |
||||
|
title: '说明', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '说明', |
||||
|
emptytext: '说明', |
||||
|
validate: function (v) { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'judgmentResults', |
||||
|
title: '判定结果', |
||||
|
editable: { |
||||
|
type: 'select', |
||||
|
title: '判定结果', |
||||
|
emptytext: '判定结果', |
||||
|
source: function() { |
||||
|
let result = []; |
||||
|
for (let i = 0;i<judgmentResultsDatas.length;i++) { |
||||
|
result.push({value: judgmentResultsDatas[i].dictValue,text: judgmentResultsDatas[i].dictLabel}) |
||||
|
} |
||||
|
return result; |
||||
|
}, |
||||
|
validate: function (value) { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'receiptBatchNumber', |
||||
|
title: '收货批号', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '收货批号', |
||||
|
emptytext: '收货批号', |
||||
|
validate: function (v) { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'manufacturerBatchNumber', |
||||
|
title: '厂商批号', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '厂商批号', |
||||
|
emptytext: '厂商批号', |
||||
|
validate: function (v) { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}] |
||||
|
}) |
||||
|
|
||||
|
//获取订单号 |
||||
|
$.ajax({ |
||||
|
url: prefixPurchaseOrder + '/list', |
||||
|
type: "post", |
||||
|
success: function (res) { |
||||
|
// console.log(res) |
||||
|
if (res.rows.length > 0) { |
||||
|
var orderData = res.rows; |
||||
|
//alert(JSON.stringify(data)); |
||||
|
for (let i in orderData) { |
||||
|
// console.log(finishProductData[i].finishProductCode) |
||||
|
$("#form-warehousingInspectionNotice-add select[name='purchaseOrderNumber']").append("<option value='" + orderData[i].purchaseOrderNumber + "'>" + orderData[i].purchaseOrderNumber + "</option>"); |
||||
|
} |
||||
|
$("#form-warehousingInspectionNotice-add select[name='purchaseOrderNumber']").change(function () { |
||||
|
var purchaseOrderNumber = $(this).val(); |
||||
|
for (let i=0;i<orderData.length;i++) { |
||||
|
if (orderData[i].purchaseOrderNumber == purchaseOrderNumber) { |
||||
|
$("#form-warehousingInspectionNotice-add input[name='supplierCode']").val(orderData[i].supplierCode); |
||||
|
$("#form-warehousingInspectionNotice-add input[name='supplierName']").val(orderData[i].supplierName); |
||||
|
$("#form-warehousingInspectionNotice-add input[name='customerContact']").val(orderData[i].customerContact); |
||||
|
//选择订单号显示表内订单信息 |
||||
|
showDetailMaterial(); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
} else { |
||||
|
$.modal.msgError(res.msg); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
//获取仓库信息 |
||||
|
$.ajax({ |
||||
|
url: ctx + "stock/stockInfo/list", |
||||
|
type: "post", |
||||
|
success: function (res) { |
||||
|
// console.log(res) |
||||
|
if (res.rows.length > 0) { |
||||
|
let stockData = res.rows; |
||||
|
for (let i in stockData) { |
||||
|
// console.log(finishProductData[i].finishProductCode) |
||||
|
$("#form-warehousingInspectionNotice-add select[name='stockName']").append("<option value='" + stockData[i].stockname + "'>" + stockData[i].stockname + "</option>"); |
||||
|
} |
||||
|
$("#form-warehousingInspectionNotice-add select[name='stockName']").change(function () { |
||||
|
var stockName = $(this).val(); |
||||
|
for (let i=0;i<stockData.length;i++) { |
||||
|
if (stockData[i].stockname == stockName) { |
||||
|
$("#form-warehousingInspectionNotice-add input[name='stockNumber']").val(stockData[i].stockNO); |
||||
|
$("#form-warehousingInspectionNotice-add input[name='stockManager']").val(stockData[i].stockmanager); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
//选择订单号显示表内订单信息 |
||||
|
function showDetailMaterial() { |
||||
|
$('#addDetailTable').bootstrapTable("removeAll") |
||||
|
var purchaseOrderNumber = $("select[name='purchaseOrderNumber']").val(); |
||||
|
$.ajax({ |
||||
|
url: prefixPurchaseMaterial + '/list', |
||||
|
type: 'post', |
||||
|
data: { |
||||
|
purchaseOrderNumber: purchaseOrderNumber |
||||
|
}, |
||||
|
success: function (res) { |
||||
|
console.log(res) |
||||
|
var count = res.rows.length; |
||||
|
var data = res.rows; |
||||
|
var inNoticeNumber = $("input[name='inNoticeNumber']").val(); |
||||
|
for (i = 0; i < res.rows.length; i++) { |
||||
|
$("#addDetailTable").bootstrapTable('insertRow', { |
||||
|
index: count + i, |
||||
|
row: { |
||||
|
inNoticeNumber: inNoticeNumber, |
||||
|
materialCode: data[i].rawSubsidiaryCode, |
||||
|
materialName: data[i].rawSubsidiaryName, |
||||
|
specificationModel: data[i].specificationModel, |
||||
|
materialType: data[i].materialType, |
||||
|
purchasingUnit: data[i].purchasingUnit, |
||||
|
materialQuantity: data[i].materialQuantity, |
||||
|
// qualifiedQuantity: '', |
||||
|
// unqualifiedQuantity: '', |
||||
|
// qualificationRate: '', |
||||
|
purchaseExplain: data[i].purchaseExplain, |
||||
|
judgmentResults: '', |
||||
|
receiptBatchNumber: '', |
||||
|
manufacturerBatchNumber: '', |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
//确认添加选中的物料数据 |
||||
|
function confirmDetailMaterial() { |
||||
|
$("#addDetailTable").bootstrapTable('refresh'); |
||||
|
let data = $('#addDetailTable').bootstrapTable('getData', true); |
||||
|
// let getData=$('#addProductTable').bootstrapTable('getData', true) |
||||
|
// console.log(data) |
||||
|
$.ajax({ |
||||
|
url: prefixDetail + '/addEditSave', |
||||
|
type: "POST", |
||||
|
data: { |
||||
|
data: JSON.stringify(data) |
||||
|
}, |
||||
|
dataType: "json", |
||||
|
success: function (resp) { |
||||
|
// console.log(data) |
||||
|
console.log(resp) |
||||
|
}, |
||||
|
|
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,534 @@ |
|||||
|
<!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" /> |
||||
|
<th:block th:include="include :: bootstrap-fileinput-css"/> |
||||
|
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
||||
|
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
||||
|
<th:block th:include="include :: bootstrap-editable-css"/> |
||||
|
<style> |
||||
|
.other-container { |
||||
|
width: 90%; |
||||
|
height: 200px; |
||||
|
margin: auto; |
||||
|
} |
||||
|
.other { |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
h4 { |
||||
|
display: inline-block; |
||||
|
margin-right: 20px; |
||||
|
} |
||||
|
.modal-body{ |
||||
|
height: 550px; |
||||
|
} |
||||
|
iframe{ |
||||
|
width: 100%; |
||||
|
height: 500px; |
||||
|
frameborder: 0; |
||||
|
border: 0; |
||||
|
display: inline-block; |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-warehousingInspectionNotice-edit" th:object="${warehousingInspectionNotice}"> |
||||
|
<input name="warehousingInspectionNoticeId" th:field="*{warehousingInspectionNoticeId}" type="hidden"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">入通知单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="inNoticeNumber" th:field="*{inNoticeNumber}" class="form-control" type="text" required readonly> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">订购单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select name="purchaseOrderNumber" class="form-control m-b" th:field="*{purchaseOrderNumber}" disabled> |
||||
|
<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="supplierCode" th:field="*{supplierCode}" 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="supplierName" th:field="*{supplierName}" 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="customerContact" th:field="*{customerContact}" 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="stockName" class="form-control m-b" th:field="*{stockName}"> |
||||
|
<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="stockNumber" th:field="*{stockNumber}" 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="stockManager" th:field="*{stockManager}" 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="exportSales" class="form-control m-b" th:with="type=${@dict.getType('sys_export_sales')}"> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{exportSales}"></option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">入库类别:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select name="warehousingCategory" class="form-control m-b" th:with="type=${@dict.getType('warehousing_category')}"> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehousingCategory}"></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="inspectionDate" th:field="*{inspectionDate}" class="form-control" placeholder="yyyy-MM-dd hh:ii:ss" type="text"> |
||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- <div class="form-group"> --> |
||||
|
<!-- <label class="col-sm-3 control-label">入库日期:</label>--> |
||||
|
<!-- <div class="col-sm-8">--> |
||||
|
<!-- <div class="input-group date">--> |
||||
|
<!-- <input name="warehousingDate" th:field="*{warehousingDate}" 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"> |
||||
|
<textarea name="remarks" class="form-control">[[*{remarks}]]</textarea> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">检验报告:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input type="hidden" name="inspectionReport" th:field="*{inspectionReport}"> |
||||
|
<div class="file-loading"> |
||||
|
<input class="form-control file-upload" id="inspectionReport" name="file" type="file"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<div class="other-container"> |
||||
|
<div class="other"> |
||||
|
<br><hr> |
||||
|
<h4>订单材料信息</h4> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="addDetailTable" style="white-space:nowrap"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<th:block th:include="include :: bootstrap-fileinput-js"/> |
||||
|
<th:block th:include="include :: select2-js"/> |
||||
|
<th:block th:include="include :: bootstrap-table-editable-js"/> |
||||
|
<script th:inline="javascript"> |
||||
|
|
||||
|
var getData = [[${warehousingInspectionNotice}]]; |
||||
|
var prefix = ctx + "storehouse/warehousingInspectionNotice"; |
||||
|
var prefixDetail = ctx + "storehouse/warehousingInspectionDetail"; |
||||
|
var prefixPurchaseOrder = ctx + "purchase/purchaseOrder" |
||||
|
var prefixPurchaseMaterial = ctx + "purchase/purchaseMaterial" |
||||
|
|
||||
|
var purchasingUnitDatas = [[${@dict.getType('sys_unit_class')}]]; |
||||
|
var judgmentResultsDatas = [[${@dict.getType('judgment_results')}]]; |
||||
|
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]]; |
||||
|
|
||||
|
$("#form-warehousingInspectionNotice-edit").validate({ |
||||
|
focusCleanup: true |
||||
|
}); |
||||
|
|
||||
|
function submitHandler() { |
||||
|
let getData=$('#addDetailTable').bootstrapTable('getData', true) |
||||
|
if(getData.length > 0){ |
||||
|
//确认添加选中的物料数据 |
||||
|
confirmDetailMaterial(); |
||||
|
if ($.validate.form()) { |
||||
|
$.operate.save(prefix + "/edit", $('#form-warehousingInspectionNotice-edit').serialize()); |
||||
|
} |
||||
|
} else { |
||||
|
$.modal.alertWarning("未选择物料,请添加!") |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$("input[name='inspectionDate']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd hh:ii:ss", |
||||
|
minView: "month", |
||||
|
autoclose: true |
||||
|
}); |
||||
|
|
||||
|
$("input[name='warehousingDate']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd", |
||||
|
minView: "month", |
||||
|
autoclose: true |
||||
|
}); |
||||
|
|
||||
|
$(".file-upload").each(function (i) { |
||||
|
var val = $("input[name='" + this.id + "']").val() |
||||
|
$(this).fileinput({ |
||||
|
'uploadUrl': prefix + '/upload', |
||||
|
initialPreviewAsData: true, |
||||
|
initialPreview: [val], |
||||
|
maxFileCount: 1, |
||||
|
autoReplace: true |
||||
|
}).on('fileuploaded', function (event, data, previewId, index) { |
||||
|
$("input[name='" + event.currentTarget.id + "']").val(data.response.url) |
||||
|
}).on('fileremoved', function (event, id, index) { |
||||
|
$("input[name='" + event.currentTarget.id + "']").val('') |
||||
|
}) |
||||
|
$(this).fileinput('_initFileActions'); |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
//初始化添加材料表 |
||||
|
$('#addDetailTable').bootstrapTable({ |
||||
|
url: prefixDetail + '/list', |
||||
|
pagination: true, |
||||
|
pageNumber: 1, |
||||
|
pageSize: 10, |
||||
|
method: "post", |
||||
|
contentType: "application/x-www-form-urlencoded", |
||||
|
striped: true, // 是否显示行间隔色 |
||||
|
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) |
||||
|
showToggle: false, // 是否显示详细视图和列表视图的切换按钮 |
||||
|
cardView: false, // 是否显示详细视图 |
||||
|
detailView: false, // 是否显示父子表 |
||||
|
smartDisplay: false, // 加了这个才显示每页显示的行数 |
||||
|
showExport: false, // 是否显示导出按钮 |
||||
|
clickToSelect: true, |
||||
|
paginationDetailHAlign: ' hiddenDetailInfo', |
||||
|
height: 250, |
||||
|
uniqueId: 'materialCode', |
||||
|
queryParams: function (params) { |
||||
|
//console.log("123"); |
||||
|
var curParams = { |
||||
|
// 传递参数查询参数 |
||||
|
pageSize: params.limit, |
||||
|
pageNum: params.offset / params.limit + 1, |
||||
|
inNoticeNumber: getData.inNoticeNumber |
||||
|
// enterpriseCode: data[0].enterpriseCode |
||||
|
}; |
||||
|
// console.log(data[0].enterpriseCode) |
||||
|
return curParams |
||||
|
}, |
||||
|
columns: [ |
||||
|
// { |
||||
|
// title: '操作', |
||||
|
// align: 'center', |
||||
|
// formatter: function (value, row, index) { |
||||
|
// var actions = []; |
||||
|
// actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeProductData(\'' + row.rawSubsidiaryCode + '\')" ><i class="fa fa-remove"></i>删除</a>'); |
||||
|
// return actions.join(''); |
||||
|
// } |
||||
|
// }, |
||||
|
{ |
||||
|
field: 'warehousingInspectionDetailId', |
||||
|
title: '入库检验通知物料id', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'inNoticeNumber', |
||||
|
title: '入通知单号', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialCode', |
||||
|
title: '物料代码' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialName', |
||||
|
title: '物料名称' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'specificationModel', |
||||
|
title: '规格型号' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialType', |
||||
|
title: '物料类别', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(materialTypeDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'purchasingUnit', |
||||
|
title: '单位', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(purchasingUnitDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'materialQuantity', |
||||
|
title: '送货数量', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '送货数量', |
||||
|
emptytext: '送货数量', |
||||
|
validate: function (v) { |
||||
|
// if (isNaN(v)) return '数量必须是数字'; |
||||
|
// var ex = /^[1-9]\d*$/; |
||||
|
// if (!ex.test(v)) return '数量必须是正整数'; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
// { |
||||
|
// field: 'qualifiedQuantity', |
||||
|
// title: '合格数量', |
||||
|
// editable: { |
||||
|
// type: 'text', |
||||
|
// title: '合格数量', |
||||
|
// emptytext: '合格数量', |
||||
|
// validate: function (v) { |
||||
|
// // if (isNaN(v)) return '数量必须是数字'; |
||||
|
// // var ex = /^[1-9]\d*$/; |
||||
|
// // if (!ex.test(v)) return '数量必须是正整数'; |
||||
|
// } |
||||
|
// } |
||||
|
// }, |
||||
|
// { |
||||
|
// field: 'unqualifiedQuantity', |
||||
|
// title: '不合格数量', |
||||
|
// editable: { |
||||
|
// type: 'text', |
||||
|
// title: '不合格数量', |
||||
|
// emptytext: '不合格数量', |
||||
|
// validate: function (v) { |
||||
|
// if (isNaN(v)) return '数量必须是数字'; |
||||
|
// var ex = /^[1-9]\d*$/; |
||||
|
// if (!ex.test(v)) return '数量必须是正整数'; |
||||
|
// } |
||||
|
// }, |
||||
|
// formatter:function(value, row, index) { |
||||
|
// let unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity; |
||||
|
// row.unqualifiedQuantity = row.materialQuantity - row.qualifiedQuantity; |
||||
|
// return unqualifiedQuantity.toFixed(0); |
||||
|
// } |
||||
|
// }, |
||||
|
// { |
||||
|
// field: 'qualificationRate', |
||||
|
// title: '合格率', |
||||
|
// editable: { |
||||
|
// type: 'text', |
||||
|
// title: '合格率', |
||||
|
// emptytext: '合格率', |
||||
|
// validate: function (v) { |
||||
|
// |
||||
|
// } |
||||
|
// }, |
||||
|
// formatter:function(value, row, index) { |
||||
|
// let total = row.qualifiedQuantity / row.materialQuantity; |
||||
|
// row.qualificationRate = row.qualifiedQuantity / row.materialQuantity; |
||||
|
// return (total*100).toFixed(2) + '%'; |
||||
|
// } |
||||
|
// }, |
||||
|
{ |
||||
|
field: 'purchaseExplain', |
||||
|
title: '说明', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '说明', |
||||
|
emptytext: '说明', |
||||
|
validate: function (v) { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'judgmentResults', |
||||
|
title: '判定结果', |
||||
|
editable: { |
||||
|
type: 'select', |
||||
|
title: '判定结果', |
||||
|
emptytext: '判定结果', |
||||
|
source: function() { |
||||
|
let result = []; |
||||
|
for (let i = 0;i<judgmentResultsDatas.length;i++) { |
||||
|
result.push({value: judgmentResultsDatas[i].dictValue,text: judgmentResultsDatas[i].dictLabel}) |
||||
|
} |
||||
|
return result; |
||||
|
}, |
||||
|
validate: function (value) { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'receiptBatchNumber', |
||||
|
title: '收货批号', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '收货批号', |
||||
|
emptytext: '收货批号', |
||||
|
validate: function (v) { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'manufacturerBatchNumber', |
||||
|
title: '厂商批号', |
||||
|
editable: { |
||||
|
type: 'text', |
||||
|
title: '厂商批号', |
||||
|
emptytext: '厂商批号', |
||||
|
validate: function (v) { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}] |
||||
|
}) |
||||
|
|
||||
|
//获取订单号 |
||||
|
$.ajax({ |
||||
|
url: prefixPurchaseOrder + '/list', |
||||
|
type: "post", |
||||
|
success: function (res) { |
||||
|
// console.log(res) |
||||
|
if (res.rows.length > 0) { |
||||
|
var orderData = res.rows; |
||||
|
//alert(JSON.stringify(data)); |
||||
|
for (let i in orderData) { |
||||
|
// console.log(finishProductData[i].finishProductCode) |
||||
|
$("#form-warehousingInspectionNotice-edit select[name='purchaseOrderNumber']").append("<option value='" + orderData[i].purchaseOrderNumber + "'>" + orderData[i].purchaseOrderNumber + "</option>"); |
||||
|
} |
||||
|
$("#form-warehousingInspectionNotice-edit select[name='purchaseOrderNumber']").val(getData.purchaseOrderNumber).trigger("change"); |
||||
|
$("#form-warehousingInspectionNotice-edit select[name='purchaseOrderNumber']").change(function () { |
||||
|
var purchaseOrderNumber = $(this).val(); |
||||
|
for (let i=0;i<orderData.length;i++) { |
||||
|
if (orderData[i].purchaseOrderNumber == purchaseOrderNumber) { |
||||
|
$("#form-warehousingInspectionNotice-edit input[name='supplierCode']").val(orderData[i].supplierCode); |
||||
|
$("#form-warehousingInspectionNotice-edit input[name='supplierName']").val(orderData[i].supplierName); |
||||
|
$("#form-warehousingInspectionNotice-edit input[name='customerContact']").val(orderData[i].customerContact); |
||||
|
//选择订单号显示表内订单信息 |
||||
|
showDetailMaterial(); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
} else { |
||||
|
$.modal.msgError(res.msg); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
//获取仓库信息 |
||||
|
$.ajax({ |
||||
|
url: ctx + "stock/stockInfo/list", |
||||
|
type: "post", |
||||
|
success: function (res) { |
||||
|
// console.log(res) |
||||
|
if (res.rows.length > 0) { |
||||
|
let stockData = res.rows; |
||||
|
for (let i in stockData) { |
||||
|
// console.log(finishProductData[i].finishProductCode) |
||||
|
$("#form-warehousingInspectionNotice-edit select[name='stockName']").append("<option value='" + stockData[i].stockname + "'>" + stockData[i].stockname + "</option>"); |
||||
|
} |
||||
|
$("#form-warehousingInspectionNotice-edit select[name='stockName']").val(getData.stockName).trigger("change"); |
||||
|
$("#form-warehousingInspectionNotice-edit select[name='stockName']").change(function () { |
||||
|
var stockName = $(this).val(); |
||||
|
for (let i=0;i<stockData.length;i++) { |
||||
|
if (stockData[i].stockname == stockName) { |
||||
|
$("#form-warehousingInspectionNotice-edit input[name='stockNumber']").val(stockData[i].stockNO); |
||||
|
$("#form-warehousingInspectionNotice-edit input[name='stockManager']").val(stockData[i].stockmanager); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
//选择订单号显示表内订单信息 |
||||
|
function showDetailMaterial() { |
||||
|
$('#addDetailTable').bootstrapTable("removeAll") |
||||
|
var purchaseOrderNumber = $("select[name='purchaseOrderNumber']").val(); |
||||
|
$.ajax({ |
||||
|
url: prefixPurchaseMaterial + '/list', |
||||
|
type: 'post', |
||||
|
data: { |
||||
|
purchaseOrderNumber: purchaseOrderNumber |
||||
|
}, |
||||
|
success: function (res) { |
||||
|
console.log(res) |
||||
|
var count = res.rows.length; |
||||
|
var data = res.rows; |
||||
|
var inNoticeNumber = $("input[name='inNoticeNumber']").val(); |
||||
|
for (i = 0; i < res.rows.length; i++) { |
||||
|
$("#addDetailTable").bootstrapTable('insertRow', { |
||||
|
index: count + i, |
||||
|
row: { |
||||
|
inNoticeNumber: inNoticeNumber, |
||||
|
materialCode: data[i].rawSubsidiaryCode, |
||||
|
materialName: data[i].rawSubsidiaryName, |
||||
|
specificationModel: data[i].specificationModel, |
||||
|
materialType: data[i].materialType, |
||||
|
purchasingUnit: data[i].purchasingUnit, |
||||
|
materialQuantity: data[i].materialQuantity, |
||||
|
qualifiedQuantity: '', |
||||
|
unqualifiedQuantity: '', |
||||
|
qualificationRate: '', |
||||
|
purchaseExplain: data[i].purchaseExplain, |
||||
|
judgmentResults: '', |
||||
|
receiptBatchNumber: '', |
||||
|
manufacturerBatchNumber: '', |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
//确认添加选中的物料数据 |
||||
|
function confirmDetailMaterial() { |
||||
|
$("#addDetailTable").bootstrapTable('refresh'); |
||||
|
let data = $('#addDetailTable').bootstrapTable('getData', true); |
||||
|
// let getData=$('#addProductTable').bootstrapTable('getData', true) |
||||
|
// console.log(data) |
||||
|
$.ajax({ |
||||
|
url: prefixDetail + '/addEditSave', |
||||
|
type: "POST", |
||||
|
data: { |
||||
|
data: JSON.stringify(data) |
||||
|
}, |
||||
|
dataType: "json", |
||||
|
success: function (resp) { |
||||
|
// console.log(data) |
||||
|
console.log(resp) |
||||
|
}, |
||||
|
|
||||
|
}) |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,394 @@ |
|||||
|
<!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('入库检验通知列表')" /> |
||||
|
<th:block th:include="include :: datetimepicker-css"/> |
||||
|
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script> |
||||
|
</head> |
||||
|
<body class="gray-bg"> |
||||
|
<div class="container-div"> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 search-collapse"> |
||||
|
<form id="formId"> |
||||
|
<div class="select-list"> |
||||
|
<ul> |
||||
|
<li> |
||||
|
<label>入通知单号:</label> |
||||
|
<input type="text" name="inNoticeNumber"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>订购单号:</label> |
||||
|
<input type="text" name="purchaseOrderNumber"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>供应商代码:</label> |
||||
|
<input type="text" name="supplierCode"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>供应商名称:</label> |
||||
|
<input type="text" name="supplierName"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label>入库类别:</label> |
||||
|
<select name="warehousingCategory" th:with="type=${@dict.getType('warehousing_category')}"> |
||||
|
<option value="">所有</option> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
||||
|
</select> |
||||
|
</li> |
||||
|
<!-- <li class="select-time">--> |
||||
|
<!-- <label>入库日期:</label>--> |
||||
|
<!-- <input type="text" class="time-input" id="startTime" placeholder="开始日期" name="params[beginWarehousingDate]"/>--> |
||||
|
<!-- <span>-</span>--> |
||||
|
<!-- <input type="text" class="time-input" id="endTime" placeholder="结束日期" name="params[endWarehousingDate]"/>--> |
||||
|
<!-- </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="storehouse:warehousingInspectionNotice:add"> |
||||
|
<i class="fa fa-plus"></i> 添加 |
||||
|
</a> |
||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="storehouse:warehousingInspectionNotice:edit"> |
||||
|
<i class="fa fa-edit"></i> 修改 |
||||
|
</a> |
||||
|
<a class="btn btn-danger multiple disabled" onclick="removeSelected()" shiro:hasPermission="storehouse:warehousingInspectionNotice:remove"> |
||||
|
<i class="fa fa-remove"></i> 删除 |
||||
|
</a> |
||||
|
<!-- <a class="btn btn-warning" onclick="exportSelected()" shiro:hasPermission="storehouse:warehousingInspectionNotice:export">--> |
||||
|
<!-- <i class="fa fa-download"></i> 导出--> |
||||
|
<!-- </a>--> |
||||
|
<a class="btn btn-primary" onclick="reviewConfirm()" shiro:hasPermission="storehouse:warehousingInspectionNotice:confirm"> |
||||
|
<i class="fa fa-hand-grab-o"></i> 确认 |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="bootstrap-table" style="white-space: nowrap"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!--订单确认--> |
||||
|
<div class="modal fade" id="confirmModel"> |
||||
|
<div class="modal-dialog"> |
||||
|
<div class="modal-content message_align"> |
||||
|
<div class="modal-header"> |
||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span |
||||
|
aria-hidden="true">×</span></button> |
||||
|
<h4 class="modal-title">确认信息</h4> |
||||
|
</div> |
||||
|
<div class="modal-body" style="height: 180px"> |
||||
|
<form id="form-confirm-edit"> |
||||
|
<div class="form-group" style="display: none"> |
||||
|
<label class="col-sm-3 control-label is-required">入库检验通知id:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input id="warehousingInspectionNoticeId" name="warehousingInspectionNoticeId" class="form-control" type="text" required |
||||
|
readonly> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">确认否:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<select id="confirmFlag" name="confirmFlag" class="form-control" th:with="type=${@dict.getType('sys_whether')}"> |
||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">确认日期:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="input-group date"> |
||||
|
<input id="confirmTime" name="confirmTime" class="form-control" placeholder="yyyy-mm-dd hh:ii:ss" type="text"> |
||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">确认人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input id="confirmPerson" name="confirmPerson" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<div class="modal-footer"> |
||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button> |
||||
|
<button type="button" onclick="confirmSubmit()" class="btn btn-success" data-dismiss="modal">确定</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var editFlag = [[${@permission.hasPermi('storehouse:warehousingInspectionNotice:edit')}]]; |
||||
|
var removeFlag = [[${@permission.hasPermi('storehouse:warehousingInspectionNotice:remove')}]]; |
||||
|
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]]; |
||||
|
var warehousingCategoryDatas = [[${@dict.getType('warehousing_category')}]]; |
||||
|
var confirmNoDatas = [[${@dict.getType('sys_whether')}]]; |
||||
|
|
||||
|
var prefix = ctx + "storehouse/warehousingInspectionNotice"; |
||||
|
var prefixDetail = ctx + "storehouse/warehousingInspectionDetail" |
||||
|
|
||||
|
$(function() { |
||||
|
var options = { |
||||
|
url: prefix + "/listYL", |
||||
|
createUrl: prefix + "/addYL", |
||||
|
updateUrl: prefix + "/editYL/{id}", |
||||
|
removeUrl: prefix + "/remove", |
||||
|
exportUrl: prefix + "/export", |
||||
|
clickToSelect: true, |
||||
|
modalName: "入库检验通知", |
||||
|
columns: [{ |
||||
|
checkbox: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'warehousingInspectionNoticeId', |
||||
|
title: '入库检验通知id', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'confirmFlag', |
||||
|
title: '确认否', |
||||
|
formatter: function(value, row, index) { |
||||
|
// return $.table.selectDictLabel(confirmNoDatas, value); |
||||
|
var actions = []; |
||||
|
if ($.table.selectDictLabel(confirmNoDatas, value) == "<span class=''>是</span>") { |
||||
|
actions.push('<a class="btn btn-primary btn-xs disabled">已确认</a> '); |
||||
|
} else { |
||||
|
actions.push('<a class="btn btn-danger btn-xs disabled">未确认</a> '); |
||||
|
} |
||||
|
return actions.join(''); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'inNoticeNumber', |
||||
|
title: '入通知单号' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'purchaseOrderNumber', |
||||
|
title: '订购单号' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'supplierCode', |
||||
|
title: '供应商代码' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'supplierName', |
||||
|
title: '供应商名称' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'customerContact', |
||||
|
title: '联系人' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'stockNumber', |
||||
|
title: '仓库编号' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'stockName', |
||||
|
title: '仓库名称' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'stockManager', |
||||
|
title: '仓库管理员' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'exportSales', |
||||
|
title: '内外销', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(exportSalesDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'warehousingCategory', |
||||
|
title: '入库类别', |
||||
|
formatter: function(value, row, index) { |
||||
|
return $.table.selectDictLabel(warehousingCategoryDatas, value); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'inspectionDate', |
||||
|
title: '交检时间' |
||||
|
}, |
||||
|
// { |
||||
|
// field: 'warehousingDate', |
||||
|
// title: '入库日期' |
||||
|
// }, |
||||
|
{ |
||||
|
field: 'remarks', |
||||
|
title: '备注' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'inspectionReport', |
||||
|
title: '检验报告', |
||||
|
formatter: function(value, row, index) { |
||||
|
console.log(value) |
||||
|
if (value !== null) { |
||||
|
var filepath = value.substring(value.lastIndexOf("/")+1) |
||||
|
var actions = []; |
||||
|
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> '); |
||||
|
return actions.join(''); |
||||
|
} else { |
||||
|
return value |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'confirmPerson', |
||||
|
title: '确认人', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'confirmTime', |
||||
|
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]; |
||||
|
} |
||||
|
} |
||||
|
}] |
||||
|
}; |
||||
|
$.table.init(options); |
||||
|
}); |
||||
|
|
||||
|
/*下载*/ |
||||
|
function downloadFile(filepath) { |
||||
|
window.location.href =prefix + "/downloadFile?filepath="+ filepath; |
||||
|
} |
||||
|
|
||||
|
//删除 |
||||
|
function removeSelected() { |
||||
|
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); |
||||
|
console.log(rows) |
||||
|
if (rows.length > 0) { |
||||
|
$.modal.confirm("是否删除选中的"+ rows.length +"条原料入库检验通知单?", function () { |
||||
|
$.ajax({ |
||||
|
url: prefix + '/removeSelected', |
||||
|
type: 'post', |
||||
|
data: { |
||||
|
ids : rows.join() |
||||
|
}, |
||||
|
success: function (res) { |
||||
|
// console.log(res) |
||||
|
$("#bootstrap-table").bootstrapTable("refresh"); |
||||
|
$.modal.msgSuccess("删除成功!") |
||||
|
}, |
||||
|
error: function (res) { |
||||
|
$.modal.msgError(res.error()) |
||||
|
} |
||||
|
}) |
||||
|
}) |
||||
|
} else { |
||||
|
$.modal.msgWarning("请选择一条数据") |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//导出 |
||||
|
function exportSelected() { |
||||
|
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); |
||||
|
var data = $("#bootstrap-table").bootstrapTable("getSelections") |
||||
|
|
||||
|
if (rows.length !== 1) { |
||||
|
$.modal.alert("请选择一条记录"); |
||||
|
return; |
||||
|
} else { |
||||
|
// rows为选中行的id |
||||
|
// console.log(rows); |
||||
|
// console.log(data); |
||||
|
// console.log(data[0].orderNumber) |
||||
|
$.modal.confirm("是否确认要导出本条订单?", function (){ |
||||
|
axios({ |
||||
|
url: prefix + '/exportSelected/'+data[0].warehousingInspectionNoticeId, |
||||
|
method: 'POST', |
||||
|
responseType: 'blob' |
||||
|
}).then(response => { |
||||
|
// console.log(response) |
||||
|
const URL = window.URL.createObjectURL(response.data) |
||||
|
// 创建隐藏<a>标签进行下载 |
||||
|
const tempLink = document.createElement('a') |
||||
|
tempLink.style.display = 'none' |
||||
|
tempLink.href = URL |
||||
|
let time = new Date().toLocaleString() |
||||
|
tempLink.setAttribute('download', time + "物料检验通知单.xlsx") |
||||
|
if (typeof tempLink.download === 'undefined') { |
||||
|
tempLink.setAttribute('target', '_blank') |
||||
|
} |
||||
|
document.body.appendChild(tempLink) |
||||
|
tempLink.click() |
||||
|
document.body.removeChild(tempLink)// 移除dom元素 |
||||
|
window.URL.revokeObjectURL(URL)//释放内存 |
||||
|
}) |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$("input[name='confirmTime']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd hh:ii:ss", |
||||
|
minView: "month", |
||||
|
autoclose: true |
||||
|
}); |
||||
|
|
||||
|
// 订单确认 |
||||
|
function reviewConfirm(){ |
||||
|
let data = $("#bootstrap-table").bootstrapTable("getSelections"); |
||||
|
let userName = [[${@permission.getPrincipalProperty('userName')}]]; |
||||
|
if (data.length ===1) { |
||||
|
$("#warehousingInspectionNoticeId").val(data[0].warehousingInspectionNoticeId) |
||||
|
$("#confirmFlag").val(data[0].confirmFlag).trigger("change") |
||||
|
$("#confirmPerson").val(userName) |
||||
|
$("#confirmTime").datetimepicker("setDate", new Date()); |
||||
|
$("#confirmModel").modal("show"); |
||||
|
}else { |
||||
|
$.modal.alert("请选择一条数据"); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
// 订单确认 |
||||
|
function confirmSubmit(){ |
||||
|
$.ajax({ |
||||
|
url: prefix + "/edit", |
||||
|
type: "post", |
||||
|
resultType: "json", |
||||
|
data: $('#form-confirm-edit').serialize(), |
||||
|
success: function (resp) { |
||||
|
// console.log(resp) |
||||
|
$("#confirmModel").modal("hide"); |
||||
|
$("#bootstrap-table").bootstrapTable('refresh'); |
||||
|
$.modal.msgSuccess("操作成功!") |
||||
|
}, |
||||
|
error: function () { |
||||
|
$.modal.msgError("出错了!"); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue