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