<add>添加绑定供应商
This commit is contained in:
parent
d9d5263428
commit
ba6ef4b46a
|
|
@ -81,6 +81,7 @@ public class TOngoodsshelfController extends BaseController
|
|||
@Autowired
|
||||
private ITBaseProviderService tBaseProviderService;
|
||||
|
||||
|
||||
@RequiresPermissions("business:ongoodsshelf:view")
|
||||
@GetMapping()
|
||||
public String ongoodsshelf(ModelMap mmap)
|
||||
|
|
@ -91,6 +92,7 @@ public class TOngoodsshelfController extends BaseController
|
|||
// 获取供应商
|
||||
List<TBaseProvider> providers = tBaseProviderService.list();
|
||||
mmap.put("providers", providers);
|
||||
|
||||
return prefix + "/ongoodsshelf";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import java.util.List;
|
|||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.business.domain.TBaseProvider;
|
||||
import com.ruoyi.business.service.ITBaseProviderService;
|
||||
import com.ruoyi.common.enums.LoginType;
|
||||
import com.ruoyi.common.utils.*;
|
||||
import com.ruoyi.framework.shiro.UserToken;
|
||||
|
|
@ -46,6 +48,9 @@ public class SysIndexController extends BaseController
|
|||
@Autowired
|
||||
private SysPasswordService passwordService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private ITBaseProviderService tBaseProviderService;
|
||||
// 系统首页
|
||||
@GetMapping("/index")
|
||||
public String index(ModelMap mmap)
|
||||
|
|
@ -135,6 +140,7 @@ public class SysIndexController extends BaseController
|
|||
SysUser sysUser = ShiroUtils.getCurrentUser();
|
||||
mmap.put("sysUser", sysUser);
|
||||
mmap.put("version", RuoYiConfig.getVersion());
|
||||
|
||||
// return "business/ongoodsshelf/ongoodsshelf";
|
||||
return "business/ongoodsshelf/ongoodsshelf";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
<h5>当前作业任务</h5>
|
||||
</div>
|
||||
<div class="ibox-content ibox-content-1" style="margin: 0;height: 80px">
|
||||
<form style="margin-left: 10px">
|
||||
<form th:object="${providers}" style="margin-left: 10px">
|
||||
<div class=" form-horizontal">
|
||||
<label class="control-label">当前温度:</label>
|
||||
<label class="control-label" style="font-weight: bold" id="temperNow"></label>
|
||||
|
|
@ -51,11 +51,10 @@
|
|||
<div class=" form-horizontal">
|
||||
<label for="providerInSelect" class="control-label">当前入库供应商:</label>
|
||||
<select class="select-list" style="font-weight: bold; width: 300px" id="providerInSelect">
|
||||
<option value="0">请选择供应商后点击开始入库</option>
|
||||
<option th:each="providerIn : ${providers}" th:value="${providerIn.providerId}" th:text="${providerIn.providerName}"></option>
|
||||
</select>
|
||||
<button type="button" class="btn btn-primary btn-xs" id="getProviderIn" style="margin-left: 30px" onclick="getTemperNow()">获取供应商列表</button>
|
||||
<button type="button" class="btn btn-warning btn-xs" id="startIn" style="margin-left: 5px" onclick="getTemperNow()">开始入库</button>
|
||||
<button type="button" class="btn btn-danger btn-xs" id="stopIn" style="margin-left: 5px" onclick="getTemperNow()">停止入库</button>
|
||||
<button type="button" class="btn btn-warning btn-xs" id="startIn" style="margin-left: 5px" onclick="startInBtn()">开始入库</button>
|
||||
<button type="button" class="btn btn-danger btn-xs" id="stopIn" style="margin-left: 5px" onclick="stopInBtn()">停止入库</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -425,7 +424,53 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
// 开始入库
|
||||
function startInBtn() {
|
||||
$.post({
|
||||
url: ctx + "business/ongoodsshelf/startIn",
|
||||
data: JSON.stringify({
|
||||
providerId: $("#providerInSelect").val(),
|
||||
}),
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
success: function (data) {
|
||||
if(data.code === 0) {
|
||||
$("#inStatus").text("正在入库")
|
||||
$.modal.msgSuccess("开始入库成功:" + data.msg);
|
||||
} else {
|
||||
$.modal.msgError("开始入库失败:" + data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function (data) {
|
||||
$.modal.msgError("开始入库失败:" + data.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 结束入库
|
||||
function stopInBtn() {
|
||||
$.post({
|
||||
url: ctx + "business/ongoodsshelf/stopIn",
|
||||
data: JSON.stringify({
|
||||
providerId: $("#providerInSelect").val(),
|
||||
}),
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
success: function (data) {
|
||||
if(data.code === 0) {
|
||||
$("#inStatus").text("请选择供应商")
|
||||
$.modal.msgSuccess("结束入库成功:" + data.msg);
|
||||
} else {
|
||||
$.modal.msgError("结束入库失败:" + data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function (data) {
|
||||
$.modal.msgError("结束入库失败:" + data.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
// ERP入库
|
||||
function scanFunctionProviderIn() {
|
||||
let keycode = event.keyCode;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
<h5>当前作业任务</h5>
|
||||
</div>
|
||||
<div class="ibox-content ibox-content-1" style="margin: 0;height: 80px">
|
||||
<form style="margin-left: 10px">
|
||||
<form th:object="${providers}" style="margin-left: 10px">
|
||||
<div class=" form-horizontal">
|
||||
<label class="control-label">当前温度:</label>
|
||||
<label class="control-label" style="font-weight: bold" id="temperNow"></label>
|
||||
|
|
@ -51,11 +51,10 @@
|
|||
<div class=" form-horizontal">
|
||||
<label for="providerInSelect" class="control-label">当前入库供应商:</label>
|
||||
<select class="select-list" style="font-weight: bold; width: 300px" id="providerInSelect">
|
||||
<option value="0">请选择供应商后点击开始入库</option>
|
||||
<option th:each="providerIn : ${providers}" th:value="${providerIn.providerId}" th:text="${providerIn.providerName}"></option>
|
||||
</select>
|
||||
<button type="button" class="btn btn-primary btn-xs" id="getProviderIn" style="margin-left: 30px" onclick="getTemperNow()">获取供应商列表</button>
|
||||
<button type="button" class="btn btn-warning btn-xs" id="startIn" style="margin-left: 5px" onclick="getTemperNow()">开始入库</button>
|
||||
<button type="button" class="btn btn-danger btn-xs" id="stopIn" style="margin-left: 5px" onclick="getTemperNow()">停止入库</button>
|
||||
<button type="button" class="btn btn-warning btn-xs" id="startIn" style="margin-left: 5px" onclick="startInBtn()">开始入库</button>
|
||||
<button type="button" class="btn btn-danger btn-xs" id="stopIn" style="margin-left: 5px" onclick="stopInBtn()">停止入库</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -425,7 +424,53 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
// 开始入库
|
||||
function startInBtn() {
|
||||
$.post({
|
||||
url: ctx + "business/ongoodsshelf/startIn",
|
||||
data: JSON.stringify({
|
||||
providerId: $("#providerInSelect").val(),
|
||||
}),
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
success: function (data) {
|
||||
if(data.code === 0) {
|
||||
$("#inStatus").text("正在入库")
|
||||
$.modal.msgSuccess("开始入库成功:" + data.msg);
|
||||
} else {
|
||||
$.modal.msgError("开始入库失败:" + data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function (data) {
|
||||
$.modal.msgError("开始入库失败:" + data.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 结束入库
|
||||
function stopInBtn() {
|
||||
$.post({
|
||||
url: ctx + "business/ongoodsshelf/stopIn",
|
||||
data: JSON.stringify({
|
||||
providerId: $("#providerInSelect").val(),
|
||||
}),
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
success: function (data) {
|
||||
if(data.code === 0) {
|
||||
$("#inStatus").text("请选择供应商")
|
||||
$.modal.msgSuccess("结束入库成功:" + data.msg);
|
||||
} else {
|
||||
$.modal.msgError("结束入库失败:" + data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function (data) {
|
||||
$.modal.msgError("结束入库失败:" + data.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
// ERP入库
|
||||
function scanFunctionProviderIn() {
|
||||
let keycode = event.keyCode;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.business.mapper.TBaseProviderMapper">
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user