mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:03:27 +08:00
【优化】移除后台提货单的删除功能,防止删除后导致无法提货的问题。
This commit is contained in:
@@ -327,25 +327,25 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Description("单选删除")]
|
||||
public async Task<AdminUiCallBack> DoDelete([FromBody] FMIntId entity)
|
||||
{
|
||||
var jm = new AdminUiCallBack();
|
||||
//[HttpPost]
|
||||
//[Description("单选删除")]
|
||||
//public async Task<AdminUiCallBack> DoDelete([FromBody] FMIntId entity)
|
||||
//{
|
||||
// var jm = new AdminUiCallBack();
|
||||
|
||||
var model = await _coreCmsBillLadingServices.QueryByIdAsync(entity.id);
|
||||
if (model == null)
|
||||
{
|
||||
jm.msg = GlobalConstVars.DataisNo;
|
||||
return jm;
|
||||
}
|
||||
// var model = await _coreCmsBillLadingServices.QueryByIdAsync(entity.id);
|
||||
// if (model == null)
|
||||
// {
|
||||
// jm.msg = GlobalConstVars.DataisNo;
|
||||
// return jm;
|
||||
// }
|
||||
|
||||
var bl = await _coreCmsBillLadingServices.DeleteByIdAsync(entity.id);
|
||||
jm.code = bl ? 0 : 1;
|
||||
jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
|
||||
return jm;
|
||||
// var bl = await _coreCmsBillLadingServices.DeleteByIdAsync(entity.id);
|
||||
// jm.code = bl ? 0 : 1;
|
||||
// jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
|
||||
// return jm;
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<script type="text/html" id="LAY-app-CoreCmsBillLading-tableBox-bar">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit">详情</a>
|
||||
<a class="layui-btn layui-btn-xs" lay-event="ladingOperating">核销</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
||||
<!--<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>-->
|
||||
</script>
|
||||
|
||||
<script>
|
||||
@@ -185,9 +185,7 @@
|
||||
//监听工具条
|
||||
table.on('tool(LAY-app-CoreCmsBillLading-tableBox)',
|
||||
function (obj) {
|
||||
if (obj.event === 'del') {
|
||||
doDelete(obj);
|
||||
} else if (obj.event === 'edit') {
|
||||
if (obj.event === 'edit') {
|
||||
doEdit(obj)
|
||||
} else if (obj.event === 'ladingOperating') {
|
||||
ladingOperating(obj);
|
||||
@@ -238,15 +236,15 @@
|
||||
});
|
||||
}
|
||||
//执行单个删除
|
||||
function doDelete(obj) {
|
||||
layer.confirm('确定删除吗?删除后将无法恢复。', function (index) {
|
||||
coreHelper.Post("Api/CoreCmsBillLading/DoDelete", { id: obj.data.id }, function (e) {
|
||||
if (debug) { console.log(e); } //开启调试返回数据
|
||||
table.reloadData('LAY-app-CoreCmsBillLading-tableBox');
|
||||
layer.msg(e.msg);
|
||||
});
|
||||
});
|
||||
}
|
||||
//function doDelete(obj) {
|
||||
// layer.confirm('确定删除吗?删除后将无法恢复。', function (index) {
|
||||
// coreHelper.Post("Api/CoreCmsBillLading/DoDelete", { id: obj.data.id }, function (e) {
|
||||
// if (debug) { console.log(e); } //开启调试返回数据
|
||||
// table.reloadData('LAY-app-CoreCmsBillLading-tableBox');
|
||||
// layer.msg(e.msg);
|
||||
// });
|
||||
// });
|
||||
//}
|
||||
|
||||
//批量核销
|
||||
function doBatchLadingOperating(checkStatus) {
|
||||
|
||||
Reference in New Issue
Block a user