Browse Source

修改出库申请审批页面

lwx_dev
erdanergou 3 years ago
parent
commit
507d2a7ac2
  1. 14
      src/main/java/com/dreamchaser/depository_manage/controller/PageController.java
  2. 5
      src/main/java/com/dreamchaser/depository_manage/entity/ApplicationOutRecordMin.java
  3. 120
      src/main/resources/templates/pages/application/application-review.html
  4. 4
      src/main/resources/templates/pages/application/form-step-look_back.html
  5. 120
      target/classes/templates/pages/application/application-review.html
  6. 4
      target/classes/templates/pages/application/form-step-look_back.html

14
src/main/java/com/dreamchaser/depository_manage/controller/PageController.java

@ -1241,10 +1241,6 @@ public class PageController {
// 获取所有子订单
List<ApplicationOutRecordMin> applicationOutRecordMinByParent = depositoryRecordService.findApplicationOutRecordMinByParent(recordP.getId());
// 展示物料名
StringBuilder mname = new StringBuilder();
// 展示物料编码
StringBuilder mcode = new StringBuilder();
// 展示出库的仓库名
StringBuilder depositoryName = new StringBuilder();
// 展示出库的库位编码
@ -1265,10 +1261,13 @@ public class PageController {
// 获取出库库位
Place placeById = placeService.findPlaceById(applicationOutRecordMin.getPlaceId());
if (placeById != null) {
if ("0000".equals(placeById.getCode())) {
placeCode.append("默认库位").append(",");
} else {
placeCode.append(placeById.getCode()).append(",");
}
mname.append(inventoryById.getMname()).append(",");
mcode.append(inventoryById.getCode()).append(",");
}
applicationOutRecordMin.setMname(inventoryById.getMname());
depositoryName.append(depository.getDname()).append(",");
sumQuantity += applicationOutRecordMin.getQuantity();
@ -1320,13 +1319,12 @@ public class PageController {
recordP.setDepositoryManagerName(depositoryManagerNames.toString());
recordP.setApplicantName(userByPort.getName());
recordP.setDepartmentheadName(departmentHeadName.toString());
recordP.setMcode(mcode.toString());
recordP.setMname(mname.toString());
recordP.setDepositoryName(depositoryName.toString());
recordP.setQuantity(sumQuantity);
recordP.setPrice(sumPrice);
recordP.setUnit(sumUnit.toString());
mv.addObject("record", recordP);
mv.addObject("recordMinList", applicationOutRecordMinByParent);
return mv;
}

5
src/main/java/com/dreamchaser/depository_manage/entity/ApplicationOutRecordMin.java

@ -64,4 +64,9 @@ public class ApplicationOutRecordMin {
*/
private String unit;
/**
* 出库物料名称
*/
private String mname;
}

120
src/main/resources/templates/pages/application/application-review.html

@ -34,7 +34,10 @@
</tr>
<tr>
<td>物料名称</td>
<td id="materialName" th:text="${record.getMname()}">骁龙888芯片</td>
<td>
<button th:each="recordMin,iterStar: ${recordMinList}" th:text="${recordMin.getMname()}" th:value="${recordMin.getId()}"
onclick="selectThisMinRecord(this)"></button>
</td>
</tr>
<tr>
<td>仓库名称</td>
@ -67,9 +70,11 @@
</tr>
<tr>
<td>请求提交时间</td>
<td id="applicantTime" th:text="${record.getApplicantTime() }">1970-01-01 08:00:00</td>
<td id="applicantTime" th:text="${record.getApplicantTime() }">1970-01-01 08:00:00
</td>
</tr>
<tr>
<tr>
<td>申请备注</td>
<td id="applyRemarks" th:text="${record.getApplyRemark()}">申请备注</td>
@ -80,15 +85,21 @@
</tr>
<tr id="departmentheadMessageT" style="display: none">
<td>审核意见</td>
<td id="departmentheadMessage" th:text="${record.getDepartmentheadMessage()}">审核意见</td>
<td id="departmentheadMessage" th:text="${record.getDepartmentheadMessage()}">审核意见
</td>
</tr>
<tr id="departmentheadTimeT" style="display: none">
<td>审核时间</td>
<td id="departmentheadTime" th:text="${record.getDepartmentheadTime().equals('1970-01-01 08:00:00')?'':record.getDepartmentheadTime()}">1970-01-01 08:00:00</td>
<td id="departmentheadTime"
th:text="${record.getDepartmentheadTime().equals('1970-01-01 08:00:00')?'':record.getDepartmentheadTime()}">
1970-01-01 08:00:00
</td>
</tr>
<tr id="depositoryManagerNameT" style="display: none">
<td>仓储负责人</td>
<td id="depositoryManagerName" th:text="${record.getDepositoryManagerName()}">仓储负责人</td>
<td id="depositoryManagerName" th:text="${record.getDepositoryManagerName()}">
仓储负责人
</td>
</tr>
</tbody>
</table>
@ -100,7 +111,8 @@
<div class="layui-form-item">
<label class="layui-form-label">审核备注:</label>
<div class="layui-input-block">
<input id="departmentheadMessageF" name="departmentheadMessage" placeholder="请填写相关原因及申请原因" value="" class="layui-input"/>
<input id="departmentheadMessageF" name="departmentheadMessage"
placeholder="请填写相关原因及申请原因" value="" class="layui-input"/>
</div>
</div>
@ -128,7 +140,8 @@
<div class="layui-form-item">
<label class="layui-form-label">审核备注:</label>
<div class="layui-input-block">
<input id="depositoryManagerMessageF" name="depositoryManagerMessage" placeholder="请填写相关原因及申请原因" value="" class="layui-input"/>
<input id="depositoryManagerMessageF" name="depositoryManagerMessage"
placeholder="请填写相关原因及申请原因" value="" class="layui-input"/>
</div>
</div>
@ -152,7 +165,6 @@
</div>
</div>
</div>
@ -163,8 +175,16 @@
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>
function check(){}
function review(){}
function check() {
}
function review() {
}
function selectThisMinRecord(obj){
}
layui.use(['form', 'step'], function () {
var $ = layui.$,
form = layui.form,
@ -206,71 +226,89 @@
stepItems: []
});
let departmentheadTime=$("#departmentheadTime").text();
if (departmentheadTime!=null&&departmentheadTime!==""){
let departmentheadTime = $("#departmentheadTime").text();
if (departmentheadTime != null && departmentheadTime !== "") {
$("#departmentheadTimeT").show();
$("#departmentheadMessageT").show();
$("#depositoryManagerNameT").show();
$("#review").hide();
$("#check").show();
}
review=function (pass) {
let data={};
data.id=$("#id").text();
if (pass == 1){
data.departmentheadPass=1;
}else {
data.departmentheadPass=2;
review = function (pass) {
let data = {};
data.id = $("#id").text();
if (pass == 1) {
data.departmentheadPass = 1;
} else {
data.departmentheadPass = 2;
}
data.departmentheadMessage=$("#departmentheadMessageF").val();
data.departmentheadMessage = $("#departmentheadMessageF").val();
send(data);
};
check=function(pass) {
let data={};
data.id=$("#id").text();
if (pass == 1){
data.depositoryManagerPass=1;
}else {
data.depositoryManagerPass=2;
check = function (pass) {
let data = {};
data.id = $("#id").text();
if (pass == 1) {
data.depositoryManagerPass = 1;
} else {
data.depositoryManagerPass = 2;
}
data.depositoryManagerMessage=$("#depositoryManagerMessageF").val();
data.depositoryManagerMessage = $("#depositoryManagerMessageF").val();
send(data);
};
function send(req) {
$.ajax({
url:"/depositoryRecord/review",
type:'put',
dataType:'json',
url: "/depositoryRecord/review",
type: 'put',
dataType: 'json',
contentType: "application/json;charset=utf-8",
data:JSON.stringify(req),
beforeSend:function () {
this.layerIndex = layer.load(0, { shade: [0.5, '#393D49'] });
data: JSON.stringify(req),
beforeSend: function () {
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
},
success:function(data){
success: function (data) {
layer.close(this.layerIndex);
if(data.status >= 300){
if (data.status >= 300) {
layer.msg(data.statusInfo.detail,
{
icon: 2,
time:300
time: 300
},
function () {
window.location = '/ApplicationOutView?id='+req.id;
window.location = '/ApplicationOutView?id=' + req.id;
});//失败的表情
return;
}else{
} else {
layer.msg("提交成功", {
icon: 6,//成功的表情
time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function(){
window.location = '/ApplicationOutView?id='+req.id;
}, function () {
window.location = '/ApplicationOutView?id=' + req.id;
});
}
},
})
}
selectThisMinRecord = function (obj) {
// console.log(obj)
var minId = obj.value;
layer.open({
type: 2,
title: '详情',
skin: 'layui-layer-rim',
maxmin: true,
shadeClose: true, //点击遮罩关闭层
area: ['100%', '100%'],
move : '.layui-layer-title',
fixed:false,
content: '/form_step_lookByminRecordOut?id='+minId,
});
}
})
</script>
</body>

4
src/main/resources/templates/pages/application/form-step-look_back.html

@ -113,7 +113,9 @@
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>
function selectThisMinRecord(obj){};
function selectThisMinRecord(obj){
}
layui.use(['form', 'step'], function () {
var $ = layui.$,
form = layui.form,

120
target/classes/templates/pages/application/application-review.html

@ -34,7 +34,10 @@
</tr>
<tr>
<td>物料名称</td>
<td id="materialName" th:text="${record.getMname()}">骁龙888芯片</td>
<td>
<button th:each="recordMin,iterStar: ${recordMinList}" th:text="${recordMin.getMname()}" th:value="${recordMin.getId()}"
onclick="selectThisMinRecord(this)"></button>
</td>
</tr>
<tr>
<td>仓库名称</td>
@ -67,9 +70,11 @@
</tr>
<tr>
<td>请求提交时间</td>
<td id="applicantTime" th:text="${record.getApplicantTime() }">1970-01-01 08:00:00</td>
<td id="applicantTime" th:text="${record.getApplicantTime() }">1970-01-01 08:00:00
</td>
</tr>
<tr>
<tr>
<td>申请备注</td>
<td id="applyRemarks" th:text="${record.getApplyRemark()}">申请备注</td>
@ -80,15 +85,21 @@
</tr>
<tr id="departmentheadMessageT" style="display: none">
<td>审核意见</td>
<td id="departmentheadMessage" th:text="${record.getDepartmentheadMessage()}">审核意见</td>
<td id="departmentheadMessage" th:text="${record.getDepartmentheadMessage()}">审核意见
</td>
</tr>
<tr id="departmentheadTimeT" style="display: none">
<td>审核时间</td>
<td id="departmentheadTime" th:text="${record.getDepartmentheadTime().equals('1970-01-01 08:00:00')?'':record.getDepartmentheadTime()}">1970-01-01 08:00:00</td>
<td id="departmentheadTime"
th:text="${record.getDepartmentheadTime().equals('1970-01-01 08:00:00')?'':record.getDepartmentheadTime()}">
1970-01-01 08:00:00
</td>
</tr>
<tr id="depositoryManagerNameT" style="display: none">
<td>仓储负责人</td>
<td id="depositoryManagerName" th:text="${record.getDepositoryManagerName()}">仓储负责人</td>
<td id="depositoryManagerName" th:text="${record.getDepositoryManagerName()}">
仓储负责人
</td>
</tr>
</tbody>
</table>
@ -100,7 +111,8 @@
<div class="layui-form-item">
<label class="layui-form-label">审核备注:</label>
<div class="layui-input-block">
<input id="departmentheadMessageF" name="departmentheadMessage" placeholder="请填写相关原因及申请原因" value="" class="layui-input"/>
<input id="departmentheadMessageF" name="departmentheadMessage"
placeholder="请填写相关原因及申请原因" value="" class="layui-input"/>
</div>
</div>
@ -128,7 +140,8 @@
<div class="layui-form-item">
<label class="layui-form-label">审核备注:</label>
<div class="layui-input-block">
<input id="depositoryManagerMessageF" name="depositoryManagerMessage" placeholder="请填写相关原因及申请原因" value="" class="layui-input"/>
<input id="depositoryManagerMessageF" name="depositoryManagerMessage"
placeholder="请填写相关原因及申请原因" value="" class="layui-input"/>
</div>
</div>
@ -152,7 +165,6 @@
</div>
</div>
</div>
@ -163,8 +175,16 @@
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>
function check(){}
function review(){}
function check() {
}
function review() {
}
function selectThisMinRecord(obj){
}
layui.use(['form', 'step'], function () {
var $ = layui.$,
form = layui.form,
@ -206,71 +226,89 @@
stepItems: []
});
let departmentheadTime=$("#departmentheadTime").text();
if (departmentheadTime!=null&&departmentheadTime!==""){
let departmentheadTime = $("#departmentheadTime").text();
if (departmentheadTime != null && departmentheadTime !== "") {
$("#departmentheadTimeT").show();
$("#departmentheadMessageT").show();
$("#depositoryManagerNameT").show();
$("#review").hide();
$("#check").show();
}
review=function (pass) {
let data={};
data.id=$("#id").text();
if (pass == 1){
data.departmentheadPass=1;
}else {
data.departmentheadPass=2;
review = function (pass) {
let data = {};
data.id = $("#id").text();
if (pass == 1) {
data.departmentheadPass = 1;
} else {
data.departmentheadPass = 2;
}
data.departmentheadMessage=$("#departmentheadMessageF").val();
data.departmentheadMessage = $("#departmentheadMessageF").val();
send(data);
};
check=function(pass) {
let data={};
data.id=$("#id").text();
if (pass == 1){
data.depositoryManagerPass=1;
}else {
data.depositoryManagerPass=2;
check = function (pass) {
let data = {};
data.id = $("#id").text();
if (pass == 1) {
data.depositoryManagerPass = 1;
} else {
data.depositoryManagerPass = 2;
}
data.depositoryManagerMessage=$("#depositoryManagerMessageF").val();
data.depositoryManagerMessage = $("#depositoryManagerMessageF").val();
send(data);
};
function send(req) {
$.ajax({
url:"/depositoryRecord/review",
type:'put',
dataType:'json',
url: "/depositoryRecord/review",
type: 'put',
dataType: 'json',
contentType: "application/json;charset=utf-8",
data:JSON.stringify(req),
beforeSend:function () {
this.layerIndex = layer.load(0, { shade: [0.5, '#393D49'] });
data: JSON.stringify(req),
beforeSend: function () {
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
},
success:function(data){
success: function (data) {
layer.close(this.layerIndex);
if(data.status >= 300){
if (data.status >= 300) {
layer.msg(data.statusInfo.detail,
{
icon: 2,
time:300
time: 300
},
function () {
window.location = '/ApplicationOutView?id='+req.id;
window.location = '/ApplicationOutView?id=' + req.id;
});//失败的表情
return;
}else{
} else {
layer.msg("提交成功", {
icon: 6,//成功的表情
time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function(){
window.location = '/ApplicationOutView?id='+req.id;
}, function () {
window.location = '/ApplicationOutView?id=' + req.id;
});
}
},
})
}
selectThisMinRecord = function (obj) {
// console.log(obj)
var minId = obj.value;
layer.open({
type: 2,
title: '详情',
skin: 'layui-layer-rim',
maxmin: true,
shadeClose: true, //点击遮罩关闭层
area: ['100%', '100%'],
move : '.layui-layer-title',
fixed:false,
content: '/form_step_lookByminRecordOut?id='+minId,
});
}
})
</script>
</body>

4
target/classes/templates/pages/application/form-step-look_back.html

@ -113,7 +113,9 @@
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>
function selectThisMinRecord(obj){};
function selectThisMinRecord(obj){
}
layui.use(['form', 'step'], function () {
var $ = layui.$,
form = layui.form,

Loading…
Cancel
Save