王晓迪
1 month ago
38 changed files with 337 additions and 6830 deletions
@ -1,129 +0,0 @@ |
|||
package com.ruoyi.system.controller; |
|||
|
|||
import com.ruoyi.common.annotation.Log; |
|||
import com.ruoyi.common.core.controller.BaseController; |
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
import com.ruoyi.common.enums.BusinessType; |
|||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|||
import com.ruoyi.system.domain.SysUnitConvert; |
|||
import com.ruoyi.system.service.ISysUnitConvertService; |
|||
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; |
|||
|
|||
/** |
|||
* 单位换算Controller |
|||
* |
|||
* @author sunzhenhu |
|||
* @date 2021-06-16 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/unitConvert/unitConvert") |
|||
public class SysUnitConvertController extends BaseController |
|||
{ |
|||
private String prefix = "unitConvert/unitConvert"; |
|||
|
|||
@Autowired |
|||
private ISysUnitConvertService sysUnitConvertService; |
|||
|
|||
@RequiresPermissions("unitConvert:unitConvert:view") |
|||
@GetMapping() |
|||
public String unitConvert() |
|||
{ |
|||
return prefix + "/unitConvert"; |
|||
} |
|||
|
|||
/** |
|||
* 查询单位换算列表 |
|||
*/ |
|||
@RequiresPermissions("unitConvert:unitConvert:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(SysUnitConvert sysUnitConvert) |
|||
{ |
|||
startPage(); |
|||
List<SysUnitConvert> list = sysUnitConvertService.selectSysUnitConvertList(sysUnitConvert); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出单位换算列表 |
|||
*/ |
|||
@RequiresPermissions("unitConvert:unitConvert:export") |
|||
@Log(title = "单位换算", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(SysUnitConvert sysUnitConvert) |
|||
{ |
|||
List<SysUnitConvert> list = sysUnitConvertService.selectSysUnitConvertList(sysUnitConvert); |
|||
ExcelUtil<SysUnitConvert> util = new ExcelUtil<SysUnitConvert>(SysUnitConvert.class); |
|||
return util.exportExcel(list, "单位换算数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增单位换算 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存单位换算 |
|||
*/ |
|||
@RequiresPermissions("unitConvert:unitConvert:add") |
|||
@Log(title = "单位换算", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(SysUnitConvert sysUnitConvert) |
|||
{ |
|||
int i=sysUnitConvertService.insertSysUnitConvert(sysUnitConvert); |
|||
if (i<0){ |
|||
AjaxResult result=AjaxResult.error("数据重复", null); |
|||
return result; |
|||
|
|||
} |
|||
return toAjax(i); |
|||
} |
|||
|
|||
/** |
|||
* 修改单位换算 |
|||
*/ |
|||
@GetMapping("/edit/{id}") |
|||
public String edit(@PathVariable("id") Integer id, ModelMap mmap) |
|||
{ |
|||
SysUnitConvert sysUnitConvert = sysUnitConvertService.selectSysUnitConvertById(id); |
|||
mmap.put("sysUnitConvert", sysUnitConvert); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存单位换算 |
|||
*/ |
|||
@RequiresPermissions("unitConvert:unitConvert:edit") |
|||
@Log(title = "单位换算", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(SysUnitConvert sysUnitConvert) |
|||
{ |
|||
return toAjax(sysUnitConvertService.updateSysUnitConvert(sysUnitConvert)); |
|||
} |
|||
|
|||
/** |
|||
* 删除单位换算 |
|||
*/ |
|||
@RequiresPermissions("unitConvert:unitConvert:remove") |
|||
@Log(title = "单位换算", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(sysUnitConvertService.deleteSysUnitConvertByIds(ids)); |
|||
} |
|||
} |
@ -1,93 +0,0 @@ |
|||
package com.ruoyi.system.domain; |
|||
|
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 单位换算对象 sys_unit_convert |
|||
* |
|||
* @author sunzhenhu |
|||
* @date 2021-06-16 |
|||
*/ |
|||
public class SysUnitConvert extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** */ |
|||
private Integer id; |
|||
|
|||
/** 换算起始值 */ |
|||
@Excel(name = "换算起始值") |
|||
private String convertStartValue; |
|||
|
|||
/** 换算起始单位 */ |
|||
@Excel(name = "换算起始单位") |
|||
private String convertStartUnit; |
|||
|
|||
/** 换算结尾值 */ |
|||
@Excel(name = "换算结尾值") |
|||
private String convertEndValue; |
|||
|
|||
/** 换算结尾单位 */ |
|||
@Excel(name = "换算结尾单位") |
|||
private String convertEndUnit; |
|||
|
|||
public void setId(Integer id) |
|||
{ |
|||
this.id = id; |
|||
} |
|||
|
|||
public Integer getId() |
|||
{ |
|||
return id; |
|||
} |
|||
public void setConvertStartValue(String convertStartValue) |
|||
{ |
|||
this.convertStartValue = convertStartValue; |
|||
} |
|||
|
|||
public String getConvertStartValue() |
|||
{ |
|||
return convertStartValue; |
|||
} |
|||
public void setConvertStartUnit(String convertStartUnit) |
|||
{ |
|||
this.convertStartUnit = convertStartUnit; |
|||
} |
|||
|
|||
public String getConvertStartUnit() |
|||
{ |
|||
return convertStartUnit; |
|||
} |
|||
public void setConvertEndValue(String convertEndValue) |
|||
{ |
|||
this.convertEndValue = convertEndValue; |
|||
} |
|||
|
|||
public String getConvertEndValue() |
|||
{ |
|||
return convertEndValue; |
|||
} |
|||
public void setConvertEndUnit(String convertEndUnit) |
|||
{ |
|||
this.convertEndUnit = convertEndUnit; |
|||
} |
|||
|
|||
public String getConvertEndUnit() |
|||
{ |
|||
return convertEndUnit; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("id", getId()) |
|||
.append("convertStartValue", getConvertStartValue()) |
|||
.append("convertStartUnit", getConvertStartUnit()) |
|||
.append("convertEndValue", getConvertEndValue()) |
|||
.append("convertEndUnit", getConvertEndUnit()) |
|||
.toString(); |
|||
} |
|||
} |
@ -1,61 +0,0 @@ |
|||
package com.ruoyi.system.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.system.domain.SysUnitConvert; |
|||
|
|||
/** |
|||
* 单位换算Mapper接口 |
|||
* |
|||
* @author sunzhenhu |
|||
* @date 2021-06-16 |
|||
*/ |
|||
public interface SysUnitConvertMapper |
|||
{ |
|||
/** |
|||
* 查询单位换算 |
|||
* |
|||
* @param id 单位换算ID |
|||
* @return 单位换算 |
|||
*/ |
|||
public SysUnitConvert selectSysUnitConvertById(Integer id); |
|||
|
|||
/** |
|||
* 查询单位换算列表 |
|||
* |
|||
* @param sysUnitConvert 单位换算 |
|||
* @return 单位换算集合 |
|||
*/ |
|||
public List<SysUnitConvert> selectSysUnitConvertList(SysUnitConvert sysUnitConvert); |
|||
|
|||
/** |
|||
* 新增单位换算 |
|||
* |
|||
* @param sysUnitConvert 单位换算 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertSysUnitConvert(SysUnitConvert sysUnitConvert); |
|||
|
|||
/** |
|||
* 修改单位换算 |
|||
* |
|||
* @param sysUnitConvert 单位换算 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateSysUnitConvert(SysUnitConvert sysUnitConvert); |
|||
|
|||
/** |
|||
* 删除单位换算 |
|||
* |
|||
* @param id 单位换算ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysUnitConvertById(Integer id); |
|||
|
|||
/** |
|||
* 批量删除单位换算 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysUnitConvertByIds(String[] ids); |
|||
} |
@ -1,61 +0,0 @@ |
|||
package com.ruoyi.system.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.system.domain.SysUnitConvert; |
|||
|
|||
/** |
|||
* 单位换算Service接口 |
|||
* |
|||
* @author sunzhenhu |
|||
* @date 2021-06-16 |
|||
*/ |
|||
public interface ISysUnitConvertService |
|||
{ |
|||
/** |
|||
* 查询单位换算 |
|||
* |
|||
* @param id 单位换算ID |
|||
* @return 单位换算 |
|||
*/ |
|||
public SysUnitConvert selectSysUnitConvertById(Integer id); |
|||
|
|||
/** |
|||
* 查询单位换算列表 |
|||
* |
|||
* @param sysUnitConvert 单位换算 |
|||
* @return 单位换算集合 |
|||
*/ |
|||
public List<SysUnitConvert> selectSysUnitConvertList(SysUnitConvert sysUnitConvert); |
|||
|
|||
/** |
|||
* 新增单位换算 |
|||
* |
|||
* @param sysUnitConvert 单位换算 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertSysUnitConvert(SysUnitConvert sysUnitConvert); |
|||
|
|||
/** |
|||
* 修改单位换算 |
|||
* |
|||
* @param sysUnitConvert 单位换算 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateSysUnitConvert(SysUnitConvert sysUnitConvert); |
|||
|
|||
/** |
|||
* 批量删除单位换算 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysUnitConvertByIds(String ids); |
|||
|
|||
/** |
|||
* 删除单位换算信息 |
|||
* |
|||
* @param id 单位换算ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysUnitConvertById(Integer id); |
|||
} |
@ -1,103 +0,0 @@ |
|||
package com.ruoyi.system.service.impl; |
|||
|
|||
import com.ruoyi.common.core.text.Convert; |
|||
import com.ruoyi.system.domain.SysUnitConvert; |
|||
import com.ruoyi.system.mapper.SysUnitConvertMapper; |
|||
import com.ruoyi.system.service.ISysUnitConvertService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 单位换算Service业务层处理 |
|||
* |
|||
* @author sunzhenhu |
|||
* @date 2021-06-16 |
|||
*/ |
|||
@Service |
|||
public class SysUnitConvertServiceImpl implements ISysUnitConvertService |
|||
{ |
|||
@Autowired |
|||
private SysUnitConvertMapper sysUnitConvertMapper; |
|||
|
|||
/** |
|||
* 查询单位换算 |
|||
* |
|||
* @param id 单位换算ID |
|||
* @return 单位换算 |
|||
*/ |
|||
@Override |
|||
public SysUnitConvert selectSysUnitConvertById(Integer id) |
|||
{ |
|||
return sysUnitConvertMapper.selectSysUnitConvertById(id); |
|||
} |
|||
|
|||
/** |
|||
* 查询单位换算列表 |
|||
* |
|||
* @param sysUnitConvert 单位换算 |
|||
* @return 单位换算 |
|||
*/ |
|||
@Override |
|||
public List<SysUnitConvert> selectSysUnitConvertList(SysUnitConvert sysUnitConvert) |
|||
{ |
|||
return sysUnitConvertMapper.selectSysUnitConvertList(sysUnitConvert); |
|||
} |
|||
|
|||
/** |
|||
* 新增单位换算 |
|||
* |
|||
* @param sysUnitConvert 单位换算 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertSysUnitConvert(SysUnitConvert sysUnitConvert) |
|||
{ |
|||
SysUnitConvert temp=new SysUnitConvert(); |
|||
temp.setConvertStartUnit(sysUnitConvert.getConvertStartUnit()); |
|||
temp.setConvertEndUnit(sysUnitConvert.getConvertEndUnit()); |
|||
List<SysUnitConvert> sysUnitConverts = new ArrayList<>(sysUnitConvertMapper.selectSysUnitConvertList(temp)); |
|||
if (sysUnitConverts.size()>0){ |
|||
return -1; |
|||
} |
|||
return sysUnitConvertMapper.insertSysUnitConvert(sysUnitConvert); |
|||
} |
|||
|
|||
/** |
|||
* 修改单位换算 |
|||
* |
|||
* @param sysUnitConvert 单位换算 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateSysUnitConvert(SysUnitConvert sysUnitConvert) |
|||
{ |
|||
return sysUnitConvertMapper.updateSysUnitConvert(sysUnitConvert); |
|||
} |
|||
|
|||
/** |
|||
* 删除单位换算对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteSysUnitConvertByIds(String ids) |
|||
{ |
|||
return sysUnitConvertMapper.deleteSysUnitConvertByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除单位换算信息 |
|||
* |
|||
* @param id 单位换算ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteSysUnitConvertById(Integer id) |
|||
{ |
|||
return sysUnitConvertMapper.deleteSysUnitConvertById(id); |
|||
} |
|||
} |
@ -1,184 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('新增qualitySupplierDeduction')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
|||
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
|||
<th:block th:include="include :: bootstrap-editable-css"/> |
|||
<style> |
|||
.other-container { |
|||
width: 90%; |
|||
height: 200px; |
|||
margin: auto; |
|||
} |
|||
.other { |
|||
margin-top: 20px; |
|||
} |
|||
h4 { |
|||
display: inline-block; |
|||
margin-right: 20px; |
|||
} |
|||
.modal-body{ |
|||
height: 550px; |
|||
} |
|||
iframe{ |
|||
width: 100%; |
|||
height: 500px; |
|||
frameborder: 0; |
|||
border: 0; |
|||
display: inline-block; |
|||
} |
|||
</style> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-qualitySupplierDeduction-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">供应商代码:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="supplierCode" class="form-control m-b"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">送达方式:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="modeOfService" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">受理部门:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="acceptanceDepartment" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">受理人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="acceptancePerson" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">联络方式:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="contactNumber" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">返工工时费:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="reworkLaborCost" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">客户扣款:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="customerDeduction" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">惩罚性罚款:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="punitiveDamage" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料报废费用:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="materialScrapCost" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">交通/运输费:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="transportationExpenses" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">其他名字:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="otherName" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">其他金额:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="othersCost" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">合计金额:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="totalAmount" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">提出人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="proposePerson" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">审核人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="reviewedPerson" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">复核人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="approvalPerson" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">索赔扣款详细原因:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="reason" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<th:block th:include="include :: select2-js"/> |
|||
<th:block th:include="include :: bootstrap-table-editable-js"/> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "quality/qualitySupplierDeduction" |
|||
var prefixSupplier = ctx + "system/supplier" |
|||
|
|||
$("#form-qualitySupplierDeduction-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-qualitySupplierDeduction-add').serialize()); |
|||
} |
|||
} |
|||
|
|||
//获取供应商代码 |
|||
$.ajax({ |
|||
url: prefixSupplier + "/list", |
|||
type: "post", |
|||
dateType: "json", |
|||
success: function (res) { |
|||
console.log(res) |
|||
if (res.rows.length > 0) { |
|||
var orderData = res.rows; |
|||
for (let i in orderData) { |
|||
$("#form-qualitySupplierDeduction-add select[name='supplierCode']").append("<option value='" + orderData[i].supplierCode + "'>" + orderData[i].supplierCode + "</option>"); |
|||
} |
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("后台出错啦!"); |
|||
} |
|||
}); |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,184 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改qualitySupplierDeduction')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
|||
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
|||
<th:block th:include="include :: bootstrap-editable-css"/> |
|||
<style> |
|||
.other-container { |
|||
width: 90%; |
|||
height: 200px; |
|||
margin: auto; |
|||
} |
|||
.other { |
|||
margin-top: 20px; |
|||
} |
|||
h4 { |
|||
display: inline-block; |
|||
margin-right: 20px; |
|||
} |
|||
.modal-body{ |
|||
height: 550px; |
|||
} |
|||
iframe{ |
|||
width: 100%; |
|||
height: 500px; |
|||
frameborder: 0; |
|||
border: 0; |
|||
display: inline-block; |
|||
} |
|||
</style> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-qualitySupplierDeduction-edit" th:object="${qualitySupplierDeduction}"> |
|||
<input name="supplierDeductionId" th:field="*{supplierDeductionId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">供应商代码:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="supplierCode" class="form-control m-b" th:field="*{supplierCode}"> |
|||
<option value=""></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">送达方式:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="modeOfService" th:field="*{modeOfService}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">受理部门:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="acceptanceDepartment" th:field="*{acceptanceDepartment}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">受理人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="acceptancePerson" th:field="*{acceptancePerson}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">联络方式:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">返工工时费:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="reworkLaborCost" th:field="*{reworkLaborCost}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">客户扣款:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="customerDeduction" th:field="*{customerDeduction}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">惩罚性罚款:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="punitiveDamage" th:field="*{punitiveDamage}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">物料报废费用:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="materialScrapCost" th:field="*{materialScrapCost}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">交通/运输费:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="transportationExpenses" th:field="*{transportationExpenses}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">其他名字:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="otherName" th:field="*{otherName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">其他金额:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="othersCost" th:field="*{othersCost}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">合计金额:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="totalAmount" th:field="*{totalAmount}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">提出人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="proposePerson" th:field="*{proposePerson}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">审核人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="reviewedPerson" th:field="*{reviewedPerson}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">复核人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="approvalPerson" th:field="*{approvalPerson}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">索赔扣款详细原因:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="reason" class="form-control">[[*{reason}]]</textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<th:block th:include="include :: select2-js"/> |
|||
<th:block th:include="include :: bootstrap-table-editable-js"/> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "quality/qualitySupplierDeduction"; |
|||
var prefixSupplier = ctx + "system/supplier" |
|||
$("#form-qualitySupplierDeduction-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-qualitySupplierDeduction-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
//获取供应商代码 |
|||
$.ajax({ |
|||
url: prefixSupplier + "/list", |
|||
type: "post", |
|||
dateType: "json", |
|||
success: function (res) { |
|||
if (res.rows.length > 0) { |
|||
var orderData = res.rows; |
|||
for(let i in orderData){ |
|||
$("#form-qualitySupplierDeduction-edit select[name='supplierCode']").append("<option value='" + orderData[i].supplierCode + "'>" + orderData[i].supplierCode + "</option>"); |
|||
} |
|||
$("#form-qualitySupplierDeduction-edit select[name='supplierCode']").val(getData.supplierCode).trigger("supplierCode") |
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("后台出错啦!"); |
|||
} |
|||
}); |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,217 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('qualitySupplierDeduction列表')" /> |
|||
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script> |
|||
</head> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<label>供应商代码:</label> |
|||
<select name="supplierCode"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>受理部门:</label> |
|||
<input type="text" name="acceptanceDepartment"/> |
|||
</li> |
|||
<li> |
|||
<label>受理人:</label> |
|||
<input type="text" name="acceptancePerson"/> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="quality:qualitySupplierDeduction:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="quality:qualitySupplierDeduction:edit"> |
|||
<i class="fa fa-edit"></i> 修改 |
|||
</a> |
|||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="quality:qualitySupplierDeduction:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a> |
|||
<a class="btn btn-warning" onclick="exportSelectedRaw()" shiro:hasPermission="quality:qualitySupplierDeduction:export"> |
|||
<i class="fa fa-download"></i> 导出 |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table" style="white-space: nowrap"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('quality:qualitySupplierDeduction:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('quality:qualitySupplierDeduction:remove')}]]; |
|||
var prefix = ctx + "quality/qualitySupplierDeduction"; |
|||
var prefixSupplier = ctx + "system/supplier" |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "qualitySupplierDeduction", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'supplierDeductionId', |
|||
title: '', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'supplierCode', |
|||
title: '供应商代码' |
|||
}, |
|||
{ |
|||
field: 'modeOfService', |
|||
title: '送达方式' |
|||
}, |
|||
{ |
|||
field: 'acceptanceDepartment', |
|||
title: '受理部门' |
|||
}, |
|||
{ |
|||
field: 'acceptancePerson', |
|||
title: '受理人' |
|||
}, |
|||
{ |
|||
field: 'contactNumber', |
|||
title: '联络方式' |
|||
}, |
|||
{ |
|||
field: 'reason', |
|||
title: '索赔扣款详细原因' |
|||
}, |
|||
{ |
|||
field: 'reworkLaborCost', |
|||
title: '返工工时费' |
|||
}, |
|||
{ |
|||
field: 'customerDeduction', |
|||
title: '客户扣款' |
|||
}, |
|||
{ |
|||
field: 'punitiveDamage', |
|||
title: '惩罚性罚款' |
|||
}, |
|||
{ |
|||
field: 'materialScrapCost', |
|||
title: '物料报废费用' |
|||
}, |
|||
{ |
|||
field: 'transportationExpenses', |
|||
title: '交通/运输费' |
|||
}, |
|||
{ |
|||
field: 'otherName', |
|||
title: '其他名字' |
|||
}, |
|||
{ |
|||
field: 'othersCost', |
|||
title: '其他金额' |
|||
}, |
|||
{ |
|||
field: 'totalAmount', |
|||
title: '合计金额' |
|||
}, |
|||
{ |
|||
field: 'proposePerson', |
|||
title: '提出人' |
|||
}, |
|||
{ |
|||
field: 'reviewedPerson', |
|||
title: '审核人' |
|||
}, |
|||
{ |
|||
field: 'approvalPerson', |
|||
title: '复核人' |
|||
}, |
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var actions = []; |
|||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.supplierDeductionId + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
|||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.supplierDeductionId + '\')"><i class="fa fa-remove"></i>删除</a>'); |
|||
return actions.join(''); |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
|
|||
//获取供应商代码 |
|||
$.ajax({ |
|||
url: prefixSupplier + "/list", |
|||
type: "post", |
|||
dateType: "json", |
|||
success: function (res) { |
|||
console.log(res) |
|||
if (res.rows.length > 0) { |
|||
var orderData = res.rows; |
|||
for (let i in orderData) { |
|||
$("#formId select[name='supplierCode']").append("<option value='" + orderData[i].supplierCode + "'>" + orderData[i].supplierCode + "</option>"); |
|||
} |
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("后台出错啦!"); |
|||
} |
|||
}); |
|||
|
|||
//导出 |
|||
function exportSelectedRaw() { |
|||
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); |
|||
var data = $("#bootstrap-table").bootstrapTable("getSelections") |
|||
if (rows.length !== 1) { |
|||
$.modal.alert("请选择一条记录"); |
|||
return; |
|||
} else { |
|||
$.modal.confirm("是否确认要导出本条供应商索赔扣款单?", function (){ |
|||
axios({ |
|||
url: prefix + '/export/'+data[0].supplierDeductionId, |
|||
method: 'POST', |
|||
responseType: 'blob' |
|||
}).then(response => { |
|||
// console.log(response) |
|||
const URL = window.URL.createObjectURL(response.data) |
|||
// 创建隐藏<a>标签进行下载 |
|||
const tempLink = document.createElement('a') |
|||
tempLink.style.display = 'none' |
|||
tempLink.href = URL |
|||
let time = new Date().toLocaleString() |
|||
tempLink.setAttribute('download', time + "供应商索赔扣款单.xlsx") |
|||
if (typeof tempLink.download === 'undefined') { |
|||
tempLink.setAttribute('target', '_blank') |
|||
} |
|||
document.body.appendChild(tempLink) |
|||
tempLink.click() |
|||
document.body.removeChild(tempLink)// 移除dom元素 |
|||
window.URL.revokeObjectURL(URL)//释放内存 |
|||
}) |
|||
}); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,955 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('退换货订单列表')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script> |
|||
<style> |
|||
.table-striped{ |
|||
border: 0px!important; |
|||
white-space:nowrap; |
|||
} |
|||
|
|||
.base-returnGoods-order { |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.base-returnGoods-order .form-group { |
|||
width: 30%; |
|||
} |
|||
|
|||
.details-title { |
|||
width: 100%; |
|||
position: fixed; |
|||
font-size: 20px; |
|||
padding: 10px 0; |
|||
text-align: center; |
|||
background-color: #a7b1c2; |
|||
color: #FFFFFF; |
|||
z-index: 9999; |
|||
|
|||
} |
|||
|
|||
.details-body { |
|||
padding-top: 80px; |
|||
overflow-y: auto; |
|||
max-height: 750px; |
|||
|
|||
} |
|||
|
|||
</style> |
|||
</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="returnGoodsNumber"/> |
|||
</li> |
|||
<li> |
|||
<label>订单号:</label> |
|||
<input type="text" name="orderNumber"/> |
|||
</li> |
|||
<li> |
|||
<label>客户代码:</label> |
|||
<select name="enterpriseCode"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>客户名称:</label> |
|||
<select name="enterpriseName"> |
|||
<option value="">所有</option> |
|||
</select> |
|||
</li> |
|||
<!-- <li>--> |
|||
<!-- <label>接单方式:</label>--> |
|||
<!-- <input type="text" name="orderTakenWay"/>--> |
|||
<!-- </li>--> |
|||
<li> |
|||
<label>内外销:</label> |
|||
<select name="exportSales" th:with="type=${@dict.getType('sys_export_sales')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>确认否:</label> |
|||
<select name="confirmOrNot" th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>结案否:</label> |
|||
<select name="closeCaseOrNot" th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="quality:returnGoodsOrder:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="quality:returnGoodsOrder:edit"> |
|||
<i class="fa fa-edit"></i> 修改 |
|||
</a> |
|||
<!--<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="returnGoods:returnGoodsOrder:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a>--> |
|||
<a class="btn btn-danger multiple disabled" onclick="removeSelected()" shiro:hasPermission="quality:returnGoodsOrder:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a> |
|||
<!--<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="returnGoods:returnGoodsOrder:export"> |
|||
<i class="fa fa-download"></i> 导出 |
|||
</a>--> |
|||
<!-- <a class="btn btn-info single disabled" onclick="showOrderDetailModal()">--> |
|||
<!-- <i class="fa fa-file-text"></i> 订单详情--> |
|||
<!-- </a>--> |
|||
<!-- <a class="btn btn-warning" onclick="exportOrderDetail()" shiro:hasPermission="returnGoods:returnGoodsOrder:export">--> |
|||
<!-- <i class="fa fa-download"></i> 导出订单详情--> |
|||
<!-- </a>--> |
|||
<a class="btn btn-primary" onclick="confirmOrder()" shiro:hasPermission="quality:returnGoodsOrder:confirm"> |
|||
<i class="fa fa-hand-grab-o"></i> 确认 |
|||
</a> |
|||
<a class="btn btn-primary" onclick="closeCaseOrder()" shiro:hasPermission="quality:returnGoodsOrder:close"> |
|||
<i class="fa fa-hand-grab-o"></i> 结案 |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped" style="white-space: nowrap"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!--详情信息模态框--> |
|||
<div class="modal inmodal" id="orderDetailsModal" tabindex="-1" |
|||
role="dilog" aria-hidden="true"> |
|||
<div class="modal-dialog" style="width: 1400px;max-height: 800px; background-color: #FFFFFF"> |
|||
<div class="modal-content" style="background-color: #FFFFFF"> |
|||
<div class="details-title">订单详情</div> |
|||
<div class="modal-body details-body"> |
|||
<div class="row"> |
|||
<div class="base-returnGoods-order"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">退货单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="returnGoodsNumber" name="returnGoodsNumber" 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"> |
|||
<input id="orderNumber" 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"> |
|||
<input id="enterpriseCode" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">客户名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="enterpriseName" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">开单日期时间:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="billingDate" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">联系人:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="customerContact" class="form-control" type="text" readonly> |
|||
|
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">联系电话:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="contactNumber" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">传真号码:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="customerFax" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">交货地点:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="deliveryAddress" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">付款条件:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="paymentCondition" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">交货条件:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="deliveryCondition" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">交货方式:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="deliveryWay" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">接单日期:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="orderTakenDate" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">修改日期:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="reviseDate" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">确认日期:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="confirmDate" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">接单方式:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="orderTakenWay" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">业务负责人:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="businessDirector" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">备注内容:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="returnGoodsRemark" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">内外销:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="exportSales" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">确认否:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="confirmOrNot" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">结案否:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="closeCaseOrNot" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">类别:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="returnGoodsCategory" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<hr> |
|||
<div class="returnGoodsList" style="margin-top: 20px;"> |
|||
<div class="returnGoodsProductList"> |
|||
<div class="col-sm-12 table-striped" style="margin-top: 20px;"> |
|||
<div class="details" style="font-size: 18px">产品信息</div> |
|||
<table id="returnGoodsProductTable"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="modal-footer" style=" border-top: none;background-color: #a7b1c2"> |
|||
<!-- <button type="button" class="btn btn-success" onclick="btnAudit()">审核确认</button>--> |
|||
<button type="button" class="btn btn-default" data-dismiss="modal" onclick="closeOrderDetailModal()">关闭</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!--结案--> |
|||
<div class="modal fade" id="closeCaseModal"> |
|||
<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-closeCase-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="returnGoodsId1" name="returnGoodsId" 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="closeCaseOrNot1" name="closeCaseOrNot" 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="closeCaseTime" name="closeCaseTime" 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="closeCaseName" name="closeCaseName" 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="closeCaseSubmit()" class="btn btn-success" data-dismiss="modal">确定</button> |
|||
</div> |
|||
</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="returnGoodsId2" name="returnGoodsId" 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="confirmOrNot2" name="confirmOrNot" class="form-control" th:with="type=${@dict.getType('sys_whether')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">确认日期:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input id="confirmTime" name="confirmTime" class="form-control" placeholder="yyyy-mm-dd hh:ii:ss" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">确认人:</label> |
|||
<div class="col-sm-8"> |
|||
<input id="confirmName" name="confirmName" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<div class="modal-footer"> |
|||
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button> |
|||
<button type="button" onclick="confirmSubmit()" class="btn btn-success" data-dismiss="modal">确定</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js"/> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('returnGoods:returnGoodsOrder:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('returnGoods:returnGoodsOrder:remove')}]]; |
|||
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]]; |
|||
var confirmOrNotDatas = [[${@dict.getType('sys_whether')}]]; |
|||
var closeCaseOrNotDatas = [[${@dict.getType('sys_whether')}]]; |
|||
var returnGoodsCategoryDatas = [[${@dict.getType('return_goods_category')}]]; |
|||
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]]; |
|||
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]]; |
|||
var currentQuoteDatas = [[${@dict.getType('sys_whether')}]]; |
|||
var approveNoDatas = [[${@dict.getType('sys_whether')}]]; |
|||
var whetherDatas = [[${@dict.getType('sys_whether')}]]; |
|||
|
|||
|
|||
var prefix = ctx + "quality/returnGoodsOrder"; |
|||
var prefixReturnGoodsProduct = ctx + "quality/returnGoodsProduct"; |
|||
|
|||
$(function() { |
|||
/*显示退货列表数据*/ |
|||
selectDataToTable(); |
|||
/*获取客户信息*/ |
|||
getCustomerList(); |
|||
}); |
|||
|
|||
/*显示退货列表数据*/ |
|||
function selectDataToTable() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "退换货订单", |
|||
clickToSelect: true, |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'returnGoodsId', |
|||
title: '退货单号id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'closeCaseOrNot', |
|||
title: '结案否', |
|||
formatter: function(value, row, index) { |
|||
//return $.table.selectDictLabel(confirmOrNotDatas, value); |
|||
// console.log($.table.selectDictLabel(confirmOrNotDatas, value)) |
|||
var actions = []; |
|||
if ($.table.selectDictLabel(closeCaseOrNotDatas, 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: 'confirmOrNot', |
|||
title: '确认否', |
|||
formatter: function(value, row, index) { |
|||
//return $.table.selectDictLabel(confirmOrNotDatas, value); |
|||
// console.log($.table.selectDictLabel(confirmOrNotDatas, value)) |
|||
var actions = []; |
|||
if ($.table.selectDictLabel(confirmOrNotDatas, 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: 'returnGoodsNumber', |
|||
title: '退货单号' |
|||
}, |
|||
{ |
|||
field: 'orderNumber', |
|||
title: '订单号' |
|||
}, |
|||
{ |
|||
field: 'enterpriseCode', |
|||
title: '客户代码' |
|||
}, |
|||
{ |
|||
field: 'enterpriseName', |
|||
title: '客户名称' |
|||
}, |
|||
{ |
|||
field: 'billingDate', |
|||
title: '开单日期时间' |
|||
}, |
|||
{ |
|||
field: 'customerContact', |
|||
title: '联系人' |
|||
}, |
|||
{ |
|||
field: 'contactNumber', |
|||
title: '联系电话' |
|||
}, |
|||
{ |
|||
field: 'customerFax', |
|||
title: '传真号码' |
|||
}, |
|||
{ |
|||
field: 'deliveryAddress', |
|||
title: '交货地点' |
|||
}, |
|||
{ |
|||
field: 'paymentCondition', |
|||
title: '付款条件' |
|||
}, |
|||
{ |
|||
field: 'deliveryCondition', |
|||
title: '交货条件' |
|||
}, |
|||
{ |
|||
field: 'deliveryWay', |
|||
title: '交货方式' |
|||
}, |
|||
{ |
|||
field: 'orderTakenDate', |
|||
title: '接单日期' |
|||
}, |
|||
// { |
|||
// field: 'reviseDate', |
|||
// title: '修改日期' |
|||
// }, |
|||
// { |
|||
// field: 'confirmDate', |
|||
// title: '订单确认日期' |
|||
// }, |
|||
{ |
|||
field: 'orderTakenWay', |
|||
title: '接单方式' |
|||
}, |
|||
{ |
|||
field: 'businessDirector', |
|||
title: '业务负责人' |
|||
}, |
|||
{ |
|||
field: 'returnGoodsRemark', |
|||
title: '备注内容' |
|||
}, |
|||
{ |
|||
field: 'exportSales', |
|||
title: '内外销', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(exportSalesDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'returnGoodsCategory', |
|||
title: '类别', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(returnGoodsCategoryDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'closeCaseName', |
|||
title: '结案人' |
|||
}, |
|||
{ |
|||
field: 'closeCaseTime', |
|||
title: '结案时间' |
|||
}, |
|||
{ |
|||
field: 'confirmName', |
|||
title: '确认人' |
|||
}, |
|||
{ |
|||
field: 'confirmTime', |
|||
title: '确认日期' |
|||
}, |
|||
{ |
|||
field: 'firstAddTime', |
|||
title: '录入时间', |
|||
formatter: function (value, row, index) { |
|||
if (value == null) { |
|||
return " "; |
|||
} else { |
|||
return value; |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'updateInfoTime', |
|||
title: '上次修改时间', |
|||
formatter: function (value, row, index) { |
|||
if (value == null) { |
|||
return " "; |
|||
} else { |
|||
var vArr = value.split(',') |
|||
return vArr[0]; |
|||
} |
|||
} |
|||
} |
|||
// , |
|||
// { |
|||
// title: '操作', |
|||
// align: 'center', |
|||
// formatter: function(value, row, index) { |
|||
// var actions = []; |
|||
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.returnGoodsId + '\')"><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.returnGoodsId + '\')"><i class="fa fa-remove"></i>删除</a>'); |
|||
// return actions.join(''); |
|||
// } |
|||
// } |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
} |
|||
|
|||
/*获取客户信息*/ |
|||
function getCustomerList() { |
|||
$.ajax({ |
|||
url: prefix + "/getCustomerList", |
|||
type: "POST", |
|||
success: function (res) { |
|||
//console.log(res) |
|||
if (res.length > 0) { |
|||
customerListData = res; |
|||
//alert(JSON.stringify(data)); |
|||
for (let i in customerListData) { |
|||
$("select[name='enterpriseCode']").append("<option value='" + customerListData[i].enterpriseCode + "'>" + customerListData[i].enterpriseCode + "</option>"); |
|||
$("select[name='enterpriseName']").append("<option value='" + customerListData[i].enterpriseName + "'>" + customerListData[i].enterpriseName + "</option>"); |
|||
} |
|||
|
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("后台出错啦!"); |
|||
|
|||
} |
|||
}) |
|||
} |
|||
|
|||
/*导出订单信息*/ |
|||
function exportOrderDetail() { |
|||
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].orderNumber, |
|||
method: 'POST', |
|||
responseType: 'blob' |
|||
}).then(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)//释放内存 |
|||
}) |
|||
}); |
|||
|
|||
|
|||
} |
|||
} |
|||
|
|||
/*显示订单详情页面*/ |
|||
function showOrderDetailModal() { |
|||
let data = $("#bootstrap-table").bootstrapTable("getSelections"); |
|||
// console.log(data.length) |
|||
if (data.length ===1) { |
|||
$("#returnGoodsNumber").val(data[0].returnGoodsNumber) |
|||
$("#orderNumber").val(data[0].orderNumber) |
|||
$("#enterpriseCode").val(data[0].enterpriseCode) |
|||
$("#enterpriseName").val(data[0].enterpriseName) |
|||
$("#billingDate").val(data[0].billingDate) |
|||
$("#customerContact").val(data[0].customerContact) |
|||
$("#contactNumber").val(data[0].contactNumber) |
|||
$("#customerFax").val(data[0].customerFax) |
|||
$("#deliveryAddress").val(data[0].deliveryAddress) |
|||
$("#paymentCondition").val(data[0].paymentCondition) |
|||
$("#deliveryCondition").val(data[0].deliveryCondition) |
|||
$("#deliveryWay").val(data[0].deliveryWay) |
|||
$("#orderTakenDate").val(data[0].orderTakenDate) |
|||
$("#reviseDate").val(data[0].reviseDate) |
|||
$("#confirmDate").val(data[0].confirmDate) |
|||
$("#orderTakenWay").val(data[0].orderTakenWay) |
|||
$("#businessDirector").val(data[0].businessDirector) |
|||
$("#returnGoodsRemark").val(data[0].returnGoodsRemark) |
|||
$("#returnGoodsCategory").val(data[0].returnGoodsCategory) |
|||
// $("#exportSales").val(data[0].exportSales) |
|||
// $("#confirmOrNot").val(data[0].confirmOrNot) |
|||
if (data[0].exportSales == 1) { |
|||
$("#exportSales").val("外销") |
|||
} else if (data[0].exportSales == 2) { |
|||
$("#exportSales").val("内销") |
|||
} else { |
|||
$("#exportSales").val("") |
|||
} |
|||
|
|||
if (data[0].confirmOrNot == 0) { |
|||
$("#confirmOrNot").val("否") |
|||
} else if (data[0].confirmOrNot == 1) { |
|||
$("#confirmOrNot").val("是") |
|||
} else { |
|||
$("#confirmOrNot").val("") |
|||
} |
|||
|
|||
if (data[0].closeCaseOrNot == 0) { |
|||
$("#closeCaseOrNot").val("否") |
|||
} else if (data[0].closeCaseOrNot == 1) { |
|||
$("#closeCaseOrNot").val("是") |
|||
} else { |
|||
$("#closeCaseOrNot").val("") |
|||
} |
|||
|
|||
//退货成品信息 |
|||
$('#returnGoodsProductTable').bootstrapTable('destroy'); |
|||
$('#returnGoodsProductTable').bootstrapTable({ |
|||
url: prefixReturnGoodsProduct + '/getReturnGoodsProductByOrderNumber', |
|||
pagination: false, |
|||
// pageNumber: 1, |
|||
// pageSize: 10, |
|||
// pageList: [10, 25, 50, 100], |
|||
showRefresh: false, |
|||
method: "post", |
|||
contentType: "application/x-www-form-urlencoded", |
|||
striped: true, // 是否显示行间隔色 |
|||
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) |
|||
sidePagination: "server", // 分页方式:client客户端分页,server服务端分页(*) |
|||
clickToSelect: true, // 是否启用点击选中行 |
|||
showToggle: false, // 是否显示详细视图和列表视图的切换按钮 |
|||
cardView: false, // 是否显示详细视图 |
|||
detailView: false, // 是否显示父子表 |
|||
smartDisplay: false, // 加了这个才显示每页显示的行数 |
|||
showExport: false, // 是否显示导出按钮 |
|||
singleSelect: true, |
|||
paginationDetailHAlign: ' hiddenDetailInfo', |
|||
height: 150, |
|||
queryParams: function (params) { |
|||
//console.log("123"); |
|||
var curParams = { |
|||
// 传递参数查询参数 |
|||
// pageSize: params.limit, |
|||
// pageNum: params.offset / params.limit + 1, |
|||
orderNumber: data[0].orderNumber |
|||
}; |
|||
// console.log($("input[name='orderNumber']").val()); |
|||
return curParams |
|||
}, |
|||
columns: [ |
|||
// { |
|||
// checkbox: true |
|||
// }, |
|||
{ |
|||
field: 'finishProductCode', |
|||
title: '成品代码' |
|||
}, |
|||
{ |
|||
field: 'finishProductName', |
|||
title: '成品名称' |
|||
}, |
|||
{ |
|||
field: 'specificationModel', |
|||
title: '规格型号' |
|||
}, |
|||
{ |
|||
field: 'typeMachine', |
|||
title: '机种' |
|||
}, |
|||
{ |
|||
field: 'inventoryUnit', |
|||
title: '单位', |
|||
formatter: function (value, row, index) { |
|||
return $.table.selectDictLabel(inventoryUnitDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'commonCurrency', |
|||
title: '币别', |
|||
formatter: function (value, row, index) { |
|||
return $.table.selectDictLabel(commonCurrencyDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'processPrice', |
|||
title: '单价' |
|||
}, |
|||
{ |
|||
field: 'quantity', |
|||
title: '数量' |
|||
}, |
|||
{ |
|||
field: 'amountOfMoney', |
|||
title: '金额' |
|||
}, |
|||
{ |
|||
field: 'deliveryDate', |
|||
title: '交期' |
|||
}, |
|||
{ |
|||
field: 'batchNumber', |
|||
title: '批号' |
|||
}, |
|||
{ |
|||
field: 'description', |
|||
title: '说明' |
|||
}, |
|||
{ |
|||
field: 'completedQuantity', |
|||
title: '完成数量' |
|||
}, |
|||
{ |
|||
field: 'incompletedQuantity', |
|||
title: '欠单数量' |
|||
}, |
|||
{ |
|||
field: 'closeCaseOrNot', |
|||
title: '结案否', |
|||
formatter: function (value, row, index) { |
|||
return $.table.selectDictLabel(whetherDatas, value); |
|||
} |
|||
}] |
|||
}) |
|||
$("#orderDetailsModal").modal("show"); |
|||
} else { |
|||
$.modal.alertWarning("请选择一条数据"); |
|||
} |
|||
|
|||
} |
|||
|
|||
/*关闭订单详情页面*/ |
|||
function closeOrderDetailModal() { |
|||
$("#orderDetailsModal").modal("hide"); |
|||
} |
|||
|
|||
//删除 |
|||
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 closeCaseOrder() { |
|||
var data = $("#bootstrap-table").bootstrapTable("getSelections"); |
|||
let userName = [[${@permission.getPrincipalProperty('userName')}]]; |
|||
if (data.length === 1) { |
|||
$("#returnGoodsId1").val(data[0].returnGoodsId) |
|||
$("#closeCaseOrNot1").val(data[0].closeCaseOrNot).trigger("change") |
|||
$("#closeCaseName").val(userName) |
|||
$("#closeCaseTime").datetimepicker("setDate", new Date()); |
|||
$("#closeCaseModal").modal("show"); |
|||
} else { |
|||
$.modal.alert("请选择一条数据"); |
|||
} |
|||
} |
|||
|
|||
/*结案*/ |
|||
function closeCaseSubmit() { |
|||
$.ajax({ |
|||
url: prefix + "/edit", |
|||
type: "post", |
|||
resultType: "json", |
|||
data: $('#form-closeCase-edit').serialize(), |
|||
success: function (resp) { |
|||
$("#bootstrap-table").bootstrapTable('refresh'); |
|||
$.modal.msgSuccess("操作成功!") |
|||
|
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("出错了!"); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
/*确认订单*/ |
|||
function confirmOrder() { |
|||
var data = $("#bootstrap-table").bootstrapTable("getSelections"); |
|||
let userName = [[${@permission.getPrincipalProperty('userName')}]]; |
|||
if (data.length === 1) { |
|||
$("#returnGoodsId2").val(data[0].returnGoodsId) |
|||
$("#confirmOrNot2").val(data[0].confirmOrNot).trigger("change") |
|||
$("#confirmName").val(userName) |
|||
$("#confirmTime").datetimepicker("setDate", new Date()); |
|||
$("#confirmModel").modal("show"); |
|||
} else { |
|||
$.modal.alert("请选择一条数据"); |
|||
} |
|||
} |
|||
|
|||
/*确认提交*/ |
|||
function confirmSubmit(){ |
|||
var data = $("#bootstrap-table").bootstrapTable("getSelections"); |
|||
$.ajax({ |
|||
url: prefix + "/edit", |
|||
type: "post", |
|||
resultType: "json", |
|||
data: $('#form-confirm-edit').serialize(), |
|||
success: function (resp) { |
|||
$("#bootstrap-table").bootstrapTable('refresh'); |
|||
$.modal.msgSuccess("操作成功!") |
|||
|
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("出错了!"); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
|
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,455 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('新增入库')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
|||
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
|||
<th:block th:include="include :: bootstrap-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-warehousingInInfo-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">入库单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="warehousingNumber" 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"> |
|||
<!-- <input name="inNoticeNumber" class="form-control" type="text">--> |
|||
<select name="inNoticeNumber" 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"> |
|||
<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"> |
|||
<input name="purchaseOrderNumber" 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="contacts" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">入库日期:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="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"> |
|||
<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="documentPreparationPersonnel" 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="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="stockName" 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"> |
|||
<input name="remarks" 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="deliveryMan" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group" hidden> |
|||
<label class="col-sm-3 control-label">入库方式:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="warehousingInWay" class="form-control" type="text"> |
|||
</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 :: select2-js"/> |
|||
<th:block th:include="include :: bootstrap-table-editable-js"/> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "storehouse/warehousingInInfo" |
|||
var prefixDetail = ctx + "storehouse/warehousingInDetail" |
|||
var prefixInspectionNotice = ctx + "storehouse/warehousingInspectionNotice"; |
|||
var prefixInspectionDetail = ctx + "storehouse/warehousingInspectionDetail"; |
|||
|
|||
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]]; |
|||
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]]; |
|||
|
|||
$("#form-warehousingInInfo-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
let getData=$('#addDetailTable').bootstrapTable('getData', true) |
|||
if(getData.length > 0) { |
|||
//确认添加选中的物料数据 |
|||
if ($.validate.form()) { |
|||
confirmDetailMaterial(); |
|||
$.operate.save(prefix + "/add", $('#form-warehousingInInfo-add').serialize()); |
|||
} |
|||
} else { |
|||
$.modal.alertWarning("未选择物料,请添加!") |
|||
} |
|||
} |
|||
|
|||
$("input[name='warehousingDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true, |
|||
todayBtn: true |
|||
}); |
|||
$("input[name='warehousingDate']").datetimepicker('setDate', new Date()) |
|||
$("input[name='warehousingInWay']").val('原料入库') |
|||
|
|||
//获取单号 |
|||
$.ajax({ |
|||
url: prefix + "/getRawId", |
|||
type: "post", |
|||
dateType: "json", |
|||
success: function (resp) { |
|||
if (resp.code === 0) { |
|||
$("input[name='warehousingNumber']").val(resp.data); |
|||
} else { |
|||
$.modal.msgError("失败啦"); |
|||
} |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("后台出错啦!"); |
|||
} |
|||
}); |
|||
|
|||
//获取暂收单号 |
|||
$.ajax({ |
|||
url: prefixInspectionNotice + "/list", |
|||
type: "post", |
|||
dateType: "json", |
|||
success: function (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-warehousingInInfo-add select[name='inNoticeNumber']").append("<option value='" + orderData[i].inNoticeNumber + "'>" + orderData[i].inNoticeNumber + "</option>"); |
|||
} |
|||
$("#form-warehousingInInfo-add select[name='inNoticeNumber']").change(function () { |
|||
var inNoticeNumber = $(this).val(); |
|||
for (let i=0;i<orderData.length;i++) { |
|||
if (orderData[i].inNoticeNumber == inNoticeNumber) { |
|||
$("#form-warehousingInInfo-add input[name='purchaseOrderNumber']").val(orderData[i].purchaseOrderNumber); |
|||
$("#form-warehousingInInfo-add input[name='supplierCode']").val(orderData[i].supplierCode); |
|||
$("#form-warehousingInInfo-add input[name='supplierName']").val(orderData[i].supplierName); |
|||
$("#form-warehousingInInfo-add input[name='contacts']").val(orderData[i].customerContact); |
|||
$("#form-warehousingInInfo-add input[name='stockNumber']").val(orderData[i].stockNumber); |
|||
$("#form-warehousingInInfo-add input[name='stockName']").val(orderData[i].stockName); |
|||
$("#form-warehousingInInfo-add input[name='stockManager']").val(orderData[i].stockManager); |
|||
$("#form-warehousingInInfo-add input[name='exportSales']").val(orderData[i].exportSales); |
|||
$("#form-warehousingInInfo-add select[name='warehousingCategory']").val(orderData[i].warehousingCategory).trigger('change'); |
|||
showDetailMaterial(); |
|||
} |
|||
} |
|||
}) |
|||
|
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
}, |
|||
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, |
|||
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="removeMaterialData(\'' + row.materialCode + '\')" ><i class="fa fa-remove"></i>删除</a>'); |
|||
return actions.join(''); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'warehousingDetailId', |
|||
title: '入库物料id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'warehousingNumber', |
|||
title: '入库单号', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'materialCode', |
|||
title: '物料代码' |
|||
}, |
|||
{ |
|||
field: 'materialName', |
|||
title: '物料名称' |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
title: '物料类别', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'specificationModel', |
|||
title: '规格型号' |
|||
}, |
|||
{ |
|||
field: 'inventoryUnit', |
|||
title: '单位', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(inventoryUnitDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'warehousingQuantity', |
|||
title: '合格数量', |
|||
editable: { |
|||
type: 'text', |
|||
title: '合格数量', |
|||
emptytext: '合格数量', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'description', |
|||
title: '说明', |
|||
editable: { |
|||
type: 'text', |
|||
title: '说明', |
|||
emptytext: '说明', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'batchNumber', |
|||
title: '进货批号', |
|||
editable: { |
|||
type: 'text', |
|||
title: '进货批号', |
|||
emptytext: '进货批号', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'manufacturerBatchNumber', |
|||
title: '厂商批号', |
|||
editable: { |
|||
type: 'text', |
|||
title: '厂商批号', |
|||
emptytext: '厂商批号', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'storageLocation', |
|||
title: '存放地址', |
|||
editable: { |
|||
type: 'text', |
|||
title: '存放地址', |
|||
emptytext: '存放地址', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}] |
|||
}) |
|||
|
|||
//选择暂收单号显示表内订单信息 |
|||
function showDetailMaterial() { |
|||
$('#addDetailTable').bootstrapTable("removeAll") |
|||
var inNoticeNumber = $("select[name='inNoticeNumber']").val(); |
|||
$.ajax({ |
|||
url: prefixInspectionDetail + '/list', |
|||
type: 'post', |
|||
data: { |
|||
inNoticeNumber: inNoticeNumber |
|||
}, |
|||
success: function (res) { |
|||
console.log(res) |
|||
var count = res.rows.length; |
|||
var data = res.rows; |
|||
var warehousingNumber = $("input[name='warehousingNumber']").val(); |
|||
for (i = 0; i < res.rows.length; i++) { |
|||
$("#addDetailTable").bootstrapTable('insertRow', { |
|||
index: count + i, |
|||
row: { |
|||
warehousingNumber: warehousingNumber, |
|||
materialCode: data[i].materialCode, |
|||
materialName: data[i].materialName, |
|||
specificationModel: data[i].specificationModel, |
|||
materialType: data[i].materialType, |
|||
inventoryUnit: data[i].purchasingUnit, |
|||
warehousingQuantity: data[i].qualifiedQuantity, |
|||
description: data[i].purchaseExplain, |
|||
batchNumber: data[i].receiptBatchNumber, |
|||
manufacturerBatchNumber: data[i].manufacturerBatchNumber, |
|||
storageLocation: '' |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
|
|||
//确认添加选中的物料数据 |
|||
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) |
|||
}, |
|||
|
|||
}) |
|||
} |
|||
|
|||
//添加表格内删除物料信息 |
|||
function removeMaterialData(materialCode){ |
|||
var ids = []; |
|||
ids.push(materialCode); |
|||
$('#addDetailTable').bootstrapTable("remove",{ |
|||
field:'materialCode', |
|||
values:ids |
|||
}) |
|||
$("#addDetailTable").bootstrapTable('refresh'); |
|||
} |
|||
|
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,416 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改入库')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
|||
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
|||
<th:block th:include="include :: bootstrap-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-warehousingInInfo-edit" th:object="${warehousingInInfo}"> |
|||
<input name="warehousingInfoId" th:field="*{warehousingInfoId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">入库单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="warehousingNumber" th:field="*{warehousingNumber}" 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"> |
|||
<!-- <input name="inNoticeNumber" th:field="*{inNoticeNumber}" class="form-control" type="text">--> |
|||
<select name="inNoticeNumber" class="form-control m-b" required disabled> |
|||
<option value="">所有</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">入库类型:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="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"> |
|||
<input name="purchaseOrderNumber" th:field="*{purchaseOrderNumber}" 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="contacts" th:field="*{contacts}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">入库日期:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="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"> |
|||
<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="documentPreparationPersonnel" th:field="*{documentPreparationPersonnel}" 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="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="stockName" th:field="*{stockName}" 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"> |
|||
<input name="remarks" th:field="*{remarks}" 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="deliveryMan" th:field="*{deliveryMan}" class="form-control" type="text"> |
|||
</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 :: select2-js"/> |
|||
<th:block th:include="include :: bootstrap-table-editable-js"/> |
|||
<script th:inline="javascript"> |
|||
var getData = [[${warehousingInInfo}]] |
|||
|
|||
var prefix = ctx + "storehouse/warehousingInInfo" |
|||
var prefixDetail = ctx + "storehouse/warehousingInDetail" |
|||
var prefixInspectionNotice = ctx + "storehouse/warehousingInspectionNotice"; |
|||
var prefixInspectionDetail = ctx + "storehouse/warehousingInspectionDetail"; |
|||
|
|||
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]]; |
|||
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]]; |
|||
|
|||
$("#form-warehousingInInfo-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
let getData=$('#addDetailTable').bootstrapTable('getData', true) |
|||
if(getData.length > 0) { |
|||
//确认添加选中的物料数据 |
|||
if ($.validate.form()) { |
|||
confirmDetailMaterial(); |
|||
$.operate.save(prefix + "/edit", $('#form-warehousingInInfo-edit').serialize()); |
|||
} |
|||
} else { |
|||
$.modal.alertWarning("未选择物料,请添加!") |
|||
} |
|||
} |
|||
|
|||
$("input[name='warehousingDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true, |
|||
todayBtn: true |
|||
}); |
|||
|
|||
//获取暂收单号 |
|||
$.ajax({ |
|||
url: prefixInspectionNotice + "/list", |
|||
type: "post", |
|||
dateType: "json", |
|||
success: function (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-warehousingInInfo-edit select[name='inNoticeNumber']").append("<option value='" + orderData[i].inNoticeNumber + "'>" + orderData[i].inNoticeNumber + "</option>"); |
|||
} |
|||
$("#form-warehousingInInfo-edit select[name='inNoticeNumber']").val(getData.inNoticeNumber).trigger("change") |
|||
$("#form-warehousingInInfo-edit select[name='warehousingCategory']").val(getData.warehousingCategory).trigger("change") |
|||
$("#form-warehousingInInfo-edit select[name='inNoticeNumber']").change(function () { |
|||
var inNoticeNumber = $(this).val(); |
|||
for (let i=0;i<orderData.length;i++) { |
|||
if (orderData[i].inNoticeNumber == inNoticeNumber) { |
|||
$("#form-warehousingInInfo-edit input[name='purchaseOrderNumber']").val(orderData[i].purchaseOrderNumber); |
|||
$("#form-warehousingInInfo-edit input[name='supplierCode']").val(orderData[i].supplierCode); |
|||
$("#form-warehousingInInfo-edit input[name='supplierName']").val(orderData[i].supplierName); |
|||
$("#form-warehousingInInfo-edit input[name='contacts']").val(orderData[i].customerContact); |
|||
$("#form-warehousingInInfo-edit input[name='stockNumber']").val(orderData[i].stockNumber); |
|||
$("#form-warehousingInInfo-edit input[name='stockName']").val(orderData[i].stockName); |
|||
$("#form-warehousingInInfo-edit input[name='stockManager']").val(orderData[i].stockManager); |
|||
$("#form-warehousingInInfo-edit input[name='exportSales']").val(orderData[i].exportSales); |
|||
$("#form-warehousingInInfo-edit select[name='warehousingCategory']").val(orderData[i].warehousingCategory).trigger('change'); |
|||
showDetailMaterial(); |
|||
} |
|||
} |
|||
}) |
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("后台出错啦!"); |
|||
} |
|||
}); |
|||
|
|||
|
|||
//初始化添加材料表 |
|||
$('#addDetailTable').bootstrapTable({ |
|||
url: prefixDetail + '/list', |
|||
method: "post", |
|||
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, |
|||
queryParams: function (params) { |
|||
//console.log("123"); |
|||
var curParams = { |
|||
// 传递参数查询参数 |
|||
pageSize: params.limit, |
|||
pageNum: params.offset / params.limit + 1, |
|||
warehousingNumber: getData.warehousingNumber |
|||
// enterpriseCode: data[0].enterpriseCode |
|||
}; |
|||
// console.log(data[0].enterpriseCode) |
|||
return curParams |
|||
}, |
|||
columns: [ |
|||
{ |
|||
field: 'warehousingDetailId', |
|||
title: '入库物料id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'warehousingNumber', |
|||
title: '入库单号', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'materialCode', |
|||
title: '物料代码' |
|||
}, |
|||
{ |
|||
field: 'materialName', |
|||
title: '物料名称' |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
title: '物料类别', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'specificationModel', |
|||
title: '规格型号' |
|||
}, |
|||
{ |
|||
field: 'inventoryUnit', |
|||
title: '单位', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(inventoryUnitDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'warehousingQuantity', |
|||
title: '合格数量', |
|||
editable: { |
|||
type: 'text', |
|||
title: '合格数量', |
|||
emptytext: '合格数量', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'description', |
|||
title: '说明', |
|||
editable: { |
|||
type: 'text', |
|||
title: '说明', |
|||
emptytext: '说明', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'batchNumber', |
|||
title: '进货批号', |
|||
editable: { |
|||
type: 'text', |
|||
title: '进货批号', |
|||
emptytext: '进货批号', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'manufacturerBatchNumber', |
|||
title: '厂商批号', |
|||
editable: { |
|||
type: 'text', |
|||
title: '厂商批号', |
|||
emptytext: '厂商批号', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'storageLocation', |
|||
title: '存放地址', |
|||
editable: { |
|||
type: 'text', |
|||
title: '存放地址', |
|||
emptytext: '存放地址', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}] |
|||
}) |
|||
|
|||
//选择暂收单号显示表内订单信息 |
|||
function showDetailMaterial() { |
|||
$('#addDetailTable').bootstrapTable("removeAll") |
|||
var inNoticeNumber = $("select[name='inNoticeNumber']").val(); |
|||
$.ajax({ |
|||
url: prefixInspectionDetail + '/list', |
|||
type: 'post', |
|||
data: { |
|||
inNoticeNumber: inNoticeNumber |
|||
}, |
|||
success: function (res) { |
|||
console.log(res) |
|||
var count = res.rows.length; |
|||
var data = res.rows; |
|||
var warehousingNumber = $("input[name='warehousingNumber']").val(); |
|||
for (i = 0; i < res.rows.length; i++) { |
|||
$("#addDetailTable").bootstrapTable('insertRow', { |
|||
index: count + i, |
|||
row: { |
|||
warehousingNumber: warehousingNumber, |
|||
materialCode: data[i].materialCode, |
|||
materialName: data[i].materialName, |
|||
specificationModel: data[i].specificationModel, |
|||
materialType: data[i].materialType, |
|||
inventoryUnit: data[i].purchasingUnit, |
|||
warehousingQuantity: data[i].qualifiedQuantity, |
|||
description: data[i].purchaseExplain, |
|||
batchNumber: data[i].receiptBatchNumber, |
|||
manufacturerBatchNumber: '', |
|||
storageLocation: '' |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
|
|||
//确认添加选中的物料数据 |
|||
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> |
@ -1,270 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('入库列表')" /> |
|||
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script> |
|||
</head> |
|||
<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="warehousingNumber"/> |
|||
</li> |
|||
<li> |
|||
<label>暂收单号:</label> |
|||
<input type="text" name="inNoticeNumber"/> |
|||
</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> |
|||
<label>采购订单号:</label> |
|||
<input type="text" name="purchaseOrderNumber"/> |
|||
</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> |
|||
<label>仓库名称:</label> |
|||
<input type="text" name="stockName"/> |
|||
</li> |
|||
<li> |
|||
<label>内外销:</label> |
|||
<select name="exportSales" th:with="type=${@dict.getType('sys_export_sales')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="storehouse:warehousingInInfo:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="storehouse:warehousingInInfo:edit"> |
|||
<i class="fa fa-edit"></i> 修改 |
|||
</a> |
|||
<a class="btn btn-danger multiple disabled" onclick="removeSelected()" shiro:hasPermission="storehouse:warehousingInInfo:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a> |
|||
<!-- <a class="btn btn-warning" onclick="exportSelectedRaw()" shiro:hasPermission="storehouse:warehousingInInfo:export">--> |
|||
<!-- <i class="fa fa-download"></i> 导出--> |
|||
<!-- </a>--> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table" style="white-space: nowrap"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('storehouse:warehousingInInfo:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('storehouse:warehousingInInfo:remove')}]]; |
|||
var warehousingCategoryDatas = [[${@dict.getType('warehousing_category')}]]; |
|||
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]]; |
|||
var prefix = ctx + "storehouse/warehousingInInfo"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/listRaw", |
|||
createUrl: prefix + "/addRaw", |
|||
updateUrl: prefix + "/editRaw/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
exportUrl: prefix + "/export", |
|||
clickToSelect: true, |
|||
modalName: "入库", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'warehousingInfoId', |
|||
title: '入库id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'warehousingNumber', |
|||
title: '入库单号' |
|||
}, |
|||
{ |
|||
field: 'inNoticeNumber', |
|||
title: '暂收单号' |
|||
}, |
|||
{ |
|||
field: 'warehousingCategory', |
|||
title: '入库类型', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(warehousingCategoryDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'purchaseOrderNumber', |
|||
title: '采购订单号' |
|||
}, |
|||
{ |
|||
field: 'contacts', |
|||
title: '联系人' |
|||
}, |
|||
{ |
|||
field: 'warehousingDate', |
|||
title: '入库日期' |
|||
}, |
|||
{ |
|||
field: 'supplierCode', |
|||
title: '供应商代码' |
|||
}, |
|||
{ |
|||
field: 'supplierName', |
|||
title: '供应商名称' |
|||
}, |
|||
{ |
|||
field: 'documentPreparationPersonnel', |
|||
title: '制单人员' |
|||
}, |
|||
{ |
|||
field: 'stockNumber', |
|||
title: '仓库号' |
|||
}, |
|||
{ |
|||
field: 'stockName', |
|||
title: '仓库名称' |
|||
}, |
|||
{ |
|||
field: 'stockManager', |
|||
title: '仓库管理员' |
|||
}, |
|||
{ |
|||
field: 'exportSales', |
|||
title: '内外销', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(exportSalesDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'remarks', |
|||
title: '备注' |
|||
}, |
|||
{ |
|||
field: 'deliveryMan', |
|||
title: '送货人' |
|||
}, |
|||
{ |
|||
field: 'firstAddTime', |
|||
title: '录入时间', |
|||
formatter: function (value, row, index) { |
|||
if (value == null) { |
|||
return " "; |
|||
} else { |
|||
return value; |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'updateInfoTime', |
|||
title: '上次修改时间', |
|||
formatter: function (value, row, index) { |
|||
if (value == null) { |
|||
return " "; |
|||
} else { |
|||
var vArr = value.split(',') |
|||
return vArr[0]; |
|||
} |
|||
} |
|||
}] |
|||
// { |
|||
// title: '操作', |
|||
// align: 'center', |
|||
// formatter: function(value, row, index) { |
|||
// var actions = []; |
|||
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.warehousingInfoId + '\')"><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.warehousingInfoId + '\')"><i class="fa fa-remove"></i>删除</a>'); |
|||
// return actions.join(''); |
|||
// } |
|||
// } |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
|
|||
//删除 |
|||
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 exportSelectedRaw() { |
|||
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); |
|||
var data = $("#bootstrap-table").bootstrapTable("getSelections") |
|||
if (rows.length !== 1) { |
|||
$.modal.alert("请选择一条记录"); |
|||
return; |
|||
} else { |
|||
$.modal.confirm("是否确认要导出本条订单?", function (){ |
|||
axios({ |
|||
url: prefix + '/exportSelectedRaw/'+data[0].warehousingInfoId, |
|||
method: 'POST', |
|||
responseType: 'blob' |
|||
}).then(response => { |
|||
// console.log(response) |
|||
const URL = window.URL.createObjectURL(response.data) |
|||
// 创建隐藏<a>标签进行下载 |
|||
const tempLink = document.createElement('a') |
|||
tempLink.style.display = 'none' |
|||
tempLink.href = URL |
|||
let time = new Date().toLocaleString() |
|||
tempLink.setAttribute('download', time + "原料入库单.xlsx") |
|||
if (typeof tempLink.download === 'undefined') { |
|||
tempLink.setAttribute('target', '_blank') |
|||
} |
|||
document.body.appendChild(tempLink) |
|||
tempLink.click() |
|||
document.body.removeChild(tempLink)// 移除dom元素 |
|||
window.URL.revokeObjectURL(URL)//释放内存 |
|||
}) |
|||
}); |
|||
|
|||
|
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,447 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('新增入库')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
|||
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
|||
<th:block th:include="include :: bootstrap-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-warehousingInInfo-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">入库单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="warehousingNumber" 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"> |
|||
<!-- <input name="inNoticeNumber" class="form-control" type="text">--> |
|||
<select name="inNoticeNumber" 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"> |
|||
<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"> |
|||
<input name="purchaseOrderNumber" 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="contacts" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">入库日期:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="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"> |
|||
<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="documentPreparationPersonnel" 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="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="stockName" 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"> |
|||
<input name="remarks" 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="deliveryMan" class="form-control" type="text"> |
|||
</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 :: select2-js"/> |
|||
<th:block th:include="include :: bootstrap-table-editable-js"/> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "storehouse/warehousingInInfo" |
|||
var prefixDetail = ctx + "storehouse/warehousingInDetail" |
|||
var prefixInspectionNotice = ctx + "storehouse/warehousingInspectionNotice"; |
|||
var prefixInspectionDetail = ctx + "storehouse/warehousingInspectionDetail"; |
|||
|
|||
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]]; |
|||
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]]; |
|||
|
|||
$("#form-warehousingInInfo-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
let getData=$('#addDetailTable').bootstrapTable('getData', true) |
|||
if(getData.length > 0) { |
|||
//确认添加选中的物料数据 |
|||
if ($.validate.form()) { |
|||
confirmDetailMaterial(); |
|||
$.operate.save(prefix + "/add", $('#form-warehousingInInfo-add').serialize()); |
|||
} |
|||
} else { |
|||
$.modal.alertWarning("未选择物料,请添加!") |
|||
} |
|||
} |
|||
|
|||
$("input[name='warehousingDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true, |
|||
todayBtn: true |
|||
}); |
|||
$("input[name='warehousingDate']").datetimepicker('setDate', new Date()) |
|||
|
|||
|
|||
//获取单号 |
|||
$.ajax({ |
|||
url: prefix + "/getSubsidiaryId", |
|||
type: "post", |
|||
dateType: "json", |
|||
success: function (resp) { |
|||
if (resp.code === 0) { |
|||
$("input[name='warehousingNumber']").val(resp.data); |
|||
} else { |
|||
$.modal.msgError("失败啦"); |
|||
} |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("后台出错啦!"); |
|||
} |
|||
}); |
|||
|
|||
//获取暂收单号 |
|||
$.ajax({ |
|||
url: prefixInspectionNotice + "/list", |
|||
type: "post", |
|||
dateType: "json", |
|||
success: function (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-warehousingInInfo-add select[name='inNoticeNumber']").append("<option value='" + orderData[i].inNoticeNumber + "'>" + orderData[i].inNoticeNumber + "</option>"); |
|||
} |
|||
$("#form-warehousingInInfo-add select[name='inNoticeNumber']").change(function () { |
|||
var inNoticeNumber = $(this).val(); |
|||
for (let i=0;i<orderData.length;i++) { |
|||
if (orderData[i].inNoticeNumber == inNoticeNumber) { |
|||
$("#form-warehousingInInfo-add input[name='purchaseOrderNumber']").val(orderData[i].purchaseOrderNumber); |
|||
$("#form-warehousingInInfo-add input[name='supplierCode']").val(orderData[i].supplierCode); |
|||
$("#form-warehousingInInfo-add input[name='supplierName']").val(orderData[i].supplierName); |
|||
$("#form-warehousingInInfo-add input[name='contacts']").val(orderData[i].customerContact); |
|||
$("#form-warehousingInInfo-add input[name='stockNumber']").val(orderData[i].stockNumber); |
|||
$("#form-warehousingInInfo-add input[name='stockName']").val(orderData[i].stockName); |
|||
$("#form-warehousingInInfo-add input[name='stockManager']").val(orderData[i].stockManager); |
|||
$("#form-warehousingInInfo-add input[name='exportSales']").val(orderData[i].exportSales); |
|||
$("#form-warehousingInInfo-add select[name='warehousingCategory']").val(orderData[i].warehousingCategory).trigger('change'); |
|||
showDetailMaterial(); |
|||
} |
|||
} |
|||
}) |
|||
|
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
}, |
|||
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, |
|||
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="removeMaterialData(\'' + row.materialCode + '\')" ><i class="fa fa-remove"></i>删除</a>'); |
|||
return actions.join(''); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'warehousingDetailId', |
|||
title: '入库物料id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'warehousingNumber', |
|||
title: '入库单号', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'materialCode', |
|||
title: '物料代码' |
|||
}, |
|||
{ |
|||
field: 'materialName', |
|||
title: '物料名称' |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
title: '物料类别', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'specificationModel', |
|||
title: '规格型号' |
|||
}, |
|||
{ |
|||
field: 'inventoryUnit', |
|||
title: '单位', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(inventoryUnitDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'warehousingQuantity', |
|||
title: '合格数量', |
|||
editable: { |
|||
type: 'text', |
|||
title: '合格数量', |
|||
emptytext: '合格数量', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'description', |
|||
title: '说明', |
|||
editable: { |
|||
type: 'text', |
|||
title: '说明', |
|||
emptytext: '说明', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'batchNumber', |
|||
title: '进货批号', |
|||
editable: { |
|||
type: 'text', |
|||
title: '进货批号', |
|||
emptytext: '进货批号', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'manufacturerBatchNumber', |
|||
title: '厂商批号', |
|||
editable: { |
|||
type: 'text', |
|||
title: '厂商批号', |
|||
emptytext: '厂商批号', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'storageLocation', |
|||
title: '存放地址', |
|||
editable: { |
|||
type: 'text', |
|||
title: '存放地址', |
|||
emptytext: '存放地址', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}] |
|||
}) |
|||
|
|||
//选择暂收单号显示表内订单信息 |
|||
function showDetailMaterial() { |
|||
$('#addDetailTable').bootstrapTable("removeAll") |
|||
var inNoticeNumber = $("select[name='inNoticeNumber']").val(); |
|||
$.ajax({ |
|||
url: prefixInspectionDetail + '/list', |
|||
type: 'post', |
|||
data: { |
|||
inNoticeNumber: inNoticeNumber |
|||
}, |
|||
success: function (res) { |
|||
console.log(res) |
|||
var count = res.rows.length; |
|||
var data = res.rows; |
|||
var warehousingNumber = $("input[name='warehousingNumber']").val(); |
|||
for (i = 0; i < res.rows.length; i++) { |
|||
$("#addDetailTable").bootstrapTable('insertRow', { |
|||
index: count + i, |
|||
row: { |
|||
warehousingNumber: warehousingNumber, |
|||
materialCode: data[i].materialCode, |
|||
materialName: data[i].materialName, |
|||
specificationModel: data[i].specificationModel, |
|||
materialType: data[i].materialType, |
|||
inventoryUnit: data[i].purchasingUnit, |
|||
warehousingQuantity: data[i].qualifiedQuantity, |
|||
description: data[i].purchaseExplain, |
|||
batchNumber: data[i].receiptBatchNumber, |
|||
manufacturerBatchNumber: data[i].manufacturerBatchNumber, |
|||
storageLocation: '' |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
|
|||
//确认添加选中的物料数据 |
|||
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) |
|||
}, |
|||
|
|||
}) |
|||
} |
|||
|
|||
//添加表格内删除物料信息 |
|||
function removeMaterialData(materialCode){ |
|||
var ids = []; |
|||
ids.push(materialCode); |
|||
$('#addDetailTable').bootstrapTable("remove",{ |
|||
field:'materialCode', |
|||
values:ids |
|||
}) |
|||
$("#addDetailTable").bootstrapTable('refresh'); |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,415 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改入库')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet"> |
|||
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet"> |
|||
<th:block th:include="include :: bootstrap-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-warehousingInInfo-edit" th:object="${warehousingInInfo}"> |
|||
<input name="warehousingInfoId" th:field="*{warehousingInfoId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">入库单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="warehousingNumber" th:field="*{warehousingNumber}" 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"> |
|||
<!-- <input name="inNoticeNumber" th:field="*{inNoticeNumber}" class="form-control" type="text">--> |
|||
<select name="inNoticeNumber" class="form-control m-b" required disabled> |
|||
<option value="">所有</option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">入库类型:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="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"> |
|||
<input name="purchaseOrderNumber" th:field="*{purchaseOrderNumber}" 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="contacts" th:field="*{contacts}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">入库日期:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="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"> |
|||
<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="documentPreparationPersonnel" th:field="*{documentPreparationPersonnel}" 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="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="stockName" th:field="*{stockName}" 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"> |
|||
<input name="remarks" th:field="*{remarks}" 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="deliveryMan" th:field="*{deliveryMan}" class="form-control" type="text"> |
|||
</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 :: select2-js"/> |
|||
<th:block th:include="include :: bootstrap-table-editable-js"/> |
|||
<script th:inline="javascript"> |
|||
var getData = [[${warehousingInInfo}]] |
|||
|
|||
var prefix = ctx + "storehouse/warehousingInInfo"; |
|||
var prefixDetail = ctx + "storehouse/warehousingInDetail" |
|||
var prefixInspectionNotice = ctx + "storehouse/warehousingInspectionNotice"; |
|||
var prefixInspectionDetail = ctx + "storehouse/warehousingInspectionDetail"; |
|||
|
|||
var materialTypeDatas = [[${@dict.getType('ck_meterialt_type')}]]; |
|||
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]]; |
|||
|
|||
$("#form-warehousingInInfo-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
let getData=$('#addDetailTable').bootstrapTable('getData', true) |
|||
if(getData.length > 0) { |
|||
//确认添加选中的物料数据 |
|||
if ($.validate.form()) { |
|||
confirmDetailMaterial(); |
|||
$.operate.save(prefix + "/edit", $('#form-warehousingInInfo-edit').serialize()); |
|||
} |
|||
} else { |
|||
$.modal.alertWarning("未选择物料,请添加!") |
|||
} |
|||
} |
|||
|
|||
$("input[name='warehousingDate']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true, |
|||
todayBtn: true |
|||
}); |
|||
|
|||
//获取暂收单号 |
|||
$.ajax({ |
|||
url: prefixInspectionNotice + "/list", |
|||
type: "post", |
|||
dateType: "json", |
|||
success: function (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-warehousingInInfo-edit select[name='inNoticeNumber']").append("<option value='" + orderData[i].inNoticeNumber + "'>" + orderData[i].inNoticeNumber + "</option>"); |
|||
} |
|||
$("#form-warehousingInInfo-edit select[name='inNoticeNumber']").val(getData.inNoticeNumber).trigger("change") |
|||
$("#form-warehousingInInfo-edit select[name='warehousingCategory']").val(getData.warehousingCategory).trigger("change") |
|||
$("#form-warehousingInInfo-edit select[name='inNoticeNumber']").change(function () { |
|||
var inNoticeNumber = $(this).val(); |
|||
for (let i=0;i<orderData.length;i++) { |
|||
if (orderData[i].inNoticeNumber == inNoticeNumber) { |
|||
$("#form-warehousingInInfo-edit input[name='purchaseOrderNumber']").val(orderData[i].purchaseOrderNumber); |
|||
$("#form-warehousingInInfo-edit input[name='supplierCode']").val(orderData[i].supplierCode); |
|||
$("#form-warehousingInInfo-edit input[name='supplierName']").val(orderData[i].supplierName); |
|||
$("#form-warehousingInInfo-edit input[name='contacts']").val(orderData[i].customerContact); |
|||
$("#form-warehousingInInfo-edit input[name='stockNumber']").val(orderData[i].stockNumber); |
|||
$("#form-warehousingInInfo-edit input[name='stockName']").val(orderData[i].stockName); |
|||
$("#form-warehousingInInfo-edit input[name='stockManager']").val(orderData[i].stockManager); |
|||
$("#form-warehousingInInfo-edit input[name='exportSales']").val(orderData[i].exportSales); |
|||
$("#form-warehousingInInfo-edit select[name='warehousingCategory']").val(orderData[i].warehousingCategory).trigger('change'); |
|||
showDetailMaterial(); |
|||
} |
|||
} |
|||
}) |
|||
} else { |
|||
$.modal.msgError(res.msg); |
|||
} |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("后台出错啦!"); |
|||
} |
|||
}); |
|||
|
|||
//初始化添加材料表 |
|||
$('#addDetailTable').bootstrapTable({ |
|||
url: prefixDetail + '/list', |
|||
method: "post", |
|||
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, |
|||
queryParams: function (params) { |
|||
//console.log("123"); |
|||
var curParams = { |
|||
// 传递参数查询参数 |
|||
pageSize: params.limit, |
|||
pageNum: params.offset / params.limit + 1, |
|||
warehousingNumber: getData.warehousingNumber |
|||
// enterpriseCode: data[0].enterpriseCode |
|||
}; |
|||
// console.log(data[0].enterpriseCode) |
|||
return curParams |
|||
}, |
|||
columns: [ |
|||
{ |
|||
field: 'warehousingDetailId', |
|||
title: '入库物料id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'warehousingNumber', |
|||
title: '入库单号', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'materialCode', |
|||
title: '物料代码' |
|||
}, |
|||
{ |
|||
field: 'materialName', |
|||
title: '物料名称' |
|||
}, |
|||
{ |
|||
field: 'materialType', |
|||
title: '物料类别', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(materialTypeDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'specificationModel', |
|||
title: '规格型号' |
|||
}, |
|||
{ |
|||
field: 'inventoryUnit', |
|||
title: '单位', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(inventoryUnitDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'warehousingQuantity', |
|||
title: '合格数量', |
|||
editable: { |
|||
type: 'text', |
|||
title: '合格数量', |
|||
emptytext: '合格数量', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'description', |
|||
title: '说明', |
|||
editable: { |
|||
type: 'text', |
|||
title: '说明', |
|||
emptytext: '说明', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'batchNumber', |
|||
title: '进货批号', |
|||
editable: { |
|||
type: 'text', |
|||
title: '进货批号', |
|||
emptytext: '进货批号', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'manufacturerBatchNumber', |
|||
title: '厂商批号', |
|||
editable: { |
|||
type: 'text', |
|||
title: '厂商批号', |
|||
emptytext: '厂商批号', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
field: 'storageLocation', |
|||
title: '存放地址', |
|||
editable: { |
|||
type: 'text', |
|||
title: '存放地址', |
|||
emptytext: '存放地址', |
|||
validate: function (v) { |
|||
|
|||
} |
|||
} |
|||
}] |
|||
}) |
|||
|
|||
//选择暂收单号显示表内订单信息 |
|||
function showDetailMaterial() { |
|||
$('#addDetailTable').bootstrapTable("removeAll") |
|||
var inNoticeNumber = $("select[name='inNoticeNumber']").val(); |
|||
$.ajax({ |
|||
url: prefixInspectionDetail + '/list', |
|||
type: 'post', |
|||
data: { |
|||
inNoticeNumber: inNoticeNumber |
|||
}, |
|||
success: function (res) { |
|||
console.log(res) |
|||
var count = res.rows.length; |
|||
var data = res.rows; |
|||
var warehousingNumber = $("input[name='warehousingNumber']").val(); |
|||
for (i = 0; i < res.rows.length; i++) { |
|||
$("#addDetailTable").bootstrapTable('insertRow', { |
|||
index: count + i, |
|||
row: { |
|||
warehousingNumber: warehousingNumber, |
|||
materialCode: data[i].materialCode, |
|||
materialName: data[i].materialName, |
|||
specificationModel: data[i].specificationModel, |
|||
materialType: data[i].materialType, |
|||
inventoryUnit: data[i].purchasingUnit, |
|||
warehousingQuantity: data[i].qualifiedQuantity, |
|||
description: data[i].purchaseExplain, |
|||
batchNumber: data[i].receiptBatchNumber, |
|||
manufacturerBatchNumber: '', |
|||
storageLocation: '' |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
|
|||
//确认添加选中的物料数据 |
|||
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> |
@ -1,260 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('入库列表')" /> |
|||
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script> |
|||
</head> |
|||
<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="warehousingNumber"/> |
|||
</li> |
|||
<li> |
|||
<label>暂收单号:</label> |
|||
<input type="text" name="inNoticeNumber"/> |
|||
</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> |
|||
<label>采购订单号:</label> |
|||
<input type="text" name="purchaseOrderNumber"/> |
|||
</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> |
|||
<label>仓库名称:</label> |
|||
<input type="text" name="stockName"/> |
|||
</li> |
|||
<li> |
|||
<label>内外销:</label> |
|||
<select name="exportSales" th:with="type=${@dict.getType('sys_export_sales')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="storehouse:warehousingInInfo:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="storehouse:warehousingInInfo:edit"> |
|||
<i class="fa fa-edit"></i> 修改 |
|||
</a> |
|||
<a class="btn btn-danger multiple disabled" onclick="removeSelected()" shiro:hasPermission="storehouse:warehousingInInfo:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a> |
|||
<!-- <a class="btn btn-warning" onclick="exportSelectedSubsidiary()" shiro:hasPermission="storehouse:warehousingInInfo:export">--> |
|||
<!-- <i class="fa fa-download"></i> 导出--> |
|||
<!-- </a>--> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table" style="white-space: nowrap"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('storehouse:warehousingInInfo:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('storehouse:warehousingInInfo:remove')}]]; |
|||
var warehousingCategoryDatas = [[${@dict.getType('warehousing_category')}]]; |
|||
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]]; |
|||
var prefix = ctx + "storehouse/warehousingInInfo"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/listSubsidiary", |
|||
createUrl: prefix + "/addSubsidiary", |
|||
updateUrl: prefix + "/editSubsidiary/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
exportUrl: prefix + "/export", |
|||
clickToSelect: true, |
|||
modalName: "入库", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'warehousingInfoId', |
|||
title: '入库id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'warehousingNumber', |
|||
title: '入库单号' |
|||
}, |
|||
{ |
|||
field: 'inNoticeNumber', |
|||
title: '暂收单号' |
|||
}, |
|||
{ |
|||
field: 'warehousingCategory', |
|||
title: '入库类型', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(warehousingCategoryDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'purchaseOrderNumber', |
|||
title: '采购订单号' |
|||
}, |
|||
{ |
|||
field: 'contacts', |
|||
title: '联系人' |
|||
}, |
|||
{ |
|||
field: 'warehousingDate', |
|||
title: '入库日期' |
|||
}, |
|||
{ |
|||
field: 'supplierCode', |
|||
title: '供应商代码' |
|||
}, |
|||
{ |
|||
field: 'supplierName', |
|||
title: '供应商名称' |
|||
}, |
|||
{ |
|||
field: 'documentPreparationPersonnel', |
|||
title: '制单人员' |
|||
}, |
|||
{ |
|||
field: 'stockNumber', |
|||
title: '仓库号' |
|||
}, |
|||
{ |
|||
field: 'stockName', |
|||
title: '仓库名称' |
|||
}, |
|||
{ |
|||
field: 'stockManager', |
|||
title: '仓库管理员' |
|||
}, |
|||
{ |
|||
field: 'exportSales', |
|||
title: '内外销', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(exportSalesDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'remarks', |
|||
title: '备注' |
|||
}, |
|||
{ |
|||
field: 'deliveryMan', |
|||
title: '送货人' |
|||
}, |
|||
{ |
|||
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 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 exportSelectedSubsidiary() { |
|||
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); |
|||
var data = $("#bootstrap-table").bootstrapTable("getSelections") |
|||
if (rows.length !== 1) { |
|||
$.modal.alert("请选择一条记录"); |
|||
return; |
|||
} else { |
|||
$.modal.confirm("是否确认要导出本条订单?", function (){ |
|||
axios({ |
|||
url: prefix + '/exportSelectedSubsidiary/'+data[0].warehousingInfoId, |
|||
method: 'POST', |
|||
responseType: 'blob' |
|||
}).then(response => { |
|||
// console.log(response) |
|||
const URL = window.URL.createObjectURL(response.data) |
|||
// 创建隐藏<a>标签进行下载 |
|||
const tempLink = document.createElement('a') |
|||
tempLink.style.display = 'none' |
|||
tempLink.href = URL |
|||
let time = new Date().toLocaleString() |
|||
tempLink.setAttribute('download', time + "辅料入库单.xlsx") |
|||
if (typeof tempLink.download === 'undefined') { |
|||
tempLink.setAttribute('target', '_blank') |
|||
} |
|||
document.body.appendChild(tempLink) |
|||
tempLink.click() |
|||
document.body.removeChild(tempLink)// 移除dom元素 |
|||
window.URL.revokeObjectURL(URL)//释放内存 |
|||
}) |
|||
}); |
|||
|
|||
|
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,53 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('新增单位换算')" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-unitConvert-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">换算起始值:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="convertStartValue" class="form-control" type="text" oninput="value=value.replace(/[^\d]/g,'')" required> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">换算起始单位:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="convertStartUnit" class="form-control m-b" th:with="type=${@dict.getType('unit_convert')}" required> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required" >换算结尾值:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="convertEndValue" class="form-control" oninput="value=value.replace(/[^\d]/g,'')" type="text" required> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">换算结尾单位:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="convertEndUnit" class="form-control m-b" th:with="type=${@dict.getType('unit_convert')}" required> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "unitConvert/unitConvert" |
|||
$("#form-unitConvert-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-unitConvert-add').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,54 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改单位换算')" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-unitConvert-edit" th:object="${sysUnitConvert}"> |
|||
<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"> |
|||
<input name="convertStartValue" th:field="*{convertStartValue}" class="form-control" oninput="value=value.replace(/[^\d]/g,'')" type="text" required> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">换算起始单位:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="convertStartUnit" class="form-control m-b" th:with="type=${@dict.getType('unit_convert')}" required> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{convertStartUnit}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">换算结尾值:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="convertEndValue" th:field="*{convertEndValue}" class="form-control" oninput="value=value.replace(/[^\d]/g,'')" type="text" required> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">换算结尾单位:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="convertEndUnit" class="form-control m-b" th:with="type=${@dict.getType('unit_convert')}" required> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{convertEndUnit}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "unitConvert/unitConvert"; |
|||
$("#form-unitConvert-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-unitConvert-edit').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,130 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('单位换算列表')" /> |
|||
</head> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<label>换算起始值:</label> |
|||
<input type="text" name="convertStartValue"/> |
|||
</li> |
|||
<li> |
|||
<label>换算起始单位:</label> |
|||
<select name="convertStartUnit" th:with="type=${@dict.getType('unit_convert')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>换算结尾值:</label> |
|||
<input type="text" name="convertEndValue"/> |
|||
</li> |
|||
<li> |
|||
<label>换算结尾单位:</label> |
|||
<select name="convertEndUnit" th:with="type=${@dict.getType('unit_convert')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="unitConvert:unitConvert:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="unitConvert:unitConvert:edit"> |
|||
<i class="fa fa-edit"></i> 修改 |
|||
</a> |
|||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="unitConvert:unitConvert:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a> |
|||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="unitConvert:unitConvert: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('unitConvert:unitConvert:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('unitConvert:unitConvert:remove')}]]; |
|||
var convertStartUnitDatas = [[${@dict.getType('unit_convert')}]]; |
|||
var convertEndUnitDatas = [[${@dict.getType('unit_convert')}]]; |
|||
var prefix = ctx + "unitConvert/unitConvert"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "单位换算", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'id', |
|||
title: '', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'convertStartValue', |
|||
title: '换算起始值' |
|||
}, |
|||
{ |
|||
field: 'convertStartUnit', |
|||
title: '换算起始单位', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(convertStartUnitDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '', |
|||
formatter: function(value, row, index) { |
|||
return "="; |
|||
} |
|||
}, |
|||
{ |
|||
field: 'convertEndValue', |
|||
title: '换算结尾值' |
|||
}, |
|||
{ |
|||
field: 'convertEndUnit', |
|||
title: '换算结尾单位', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(convertEndUnitDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
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(''); |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue