From 7f26cd7c3e492062418cdc7dbe9d7ce14cbe5f05 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期三, 26 六月 2024 11:47:37 +0800 Subject: [PATCH] 铺货修改 --- CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/puhuo/index.html | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 109 insertions(+), 6 deletions(-) diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/puhuo/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/puhuo/index.html index 9ce45d8..b392421 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/puhuo/index.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/baifenbingfa/puhuo/index.html @@ -188,8 +188,10 @@ <script type="text/html" id="LAY-app-Puhuo-tableBox-bar"> <!--<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">鏌ョ湅</a>--> + <a class="layui-btn layui-btn-xs" lay-event="editshoukuan">鍥炴</a> <a class="layui-btn layui-btn-xs" lay-event="edit">閾鸿揣</a> <a class="layui-btn layui-btn-xs" lay-event="edittui">閫�璐�</a> + <a class="layui-btn layui-btn-xs" lay-event="editpandian">鐩樼偣</a> <!--<a class="layui-btn layui-btn-danger layui-btn-xs" data-dropdown="#PuhuoTbDelDrop{{d.LAY_INDEX}}" no-shade="true">鍒犻櫎</a>--> <div class="dropdown-menu-nav dropdown-popconfirm dropdown-top-right layui-hide" id="PuhuoTbDelDrop{{d.LAY_INDEX}}" style="max-width: 200px;white-space: normal;min-width: auto;margin-left: 10px;"> @@ -255,20 +257,21 @@ /* { field: 'id', title: '涓婚敭ID', width: 60, sort: false},*/ { field: 'areaCodeName', title: '鍖哄煙鍚嶇О', sort: false, width: 165 }, /* { field: 'distributionId', title: '缁忛攢鍟唅d', sort: false,width: 105 },*/ - { field: 'distributionName', title: '缁忛攢鍟�', sort: false, width: 165 }, + { field: 'distributionName', title: '缁忛攢鍟�', sort: false, width: 125 }, + { field: 'schoolName', title: '瀛︽牎', sort: false, width: 125 }, /* { field: 'areaCode', title: '鍖哄煙', sort: false,width: 105 },*/ /* { field: 'categoryId', title: '鍟嗗搧鍒嗙被id', sort: false,width: 105 },*/ - { field: 'categoryName', title: '鍟嗗搧绫诲埆', sort: false, width: 165 }, + { field: 'categoryName', title: '鍟嗗搧绫诲埆', sort: false, width: 105 }, /* { field: 'goodsId', title: '鍟嗗搧id', sort: false,width: 105 },*/ { field: 'goodsName', title: '鍟嗗搧鍚嶇О', sort: false, width: 165 }, /* { field: 'productsId', title: '璐у搧id', sort: false,width: 105 },*/ - { field: 'productsName', title: '璐у搧缂栧彿', sort: false, width: 165 }, + { field: 'productsName', title: '璐у搧缂栧彿', sort: false, width: 215 }, /* { field: 'spesDesc', title: '璐у搧瑙勬牸', sort: false,width: 105 },*/ - { field: 'nums', title: '鏁伴噺', sort: false, width: 165 }, - { field: 'price', title: '鍗曚环', sort: false, width: 165 }, + { field: 'nums', title: '鏁伴噺', sort: false, width: 125 }, + { field: 'price', title: '鍗曚环', sort: false, width: 125 }, - { field: 'amount', title: '閲戦', sort: false, width: 165 }, + { field: 'amount', title: '閲戦', sort: false, width: 125 }, //{ field: 'createTime', title: '寤虹珛鏃堕棿', width: 130, sort: false}, //{ field: 'upDataTime', title: '淇敼鏃堕棿', width: 130, sort: false}, //{ field: 'createBy', title: '鍒涘缓浜�', sort: false,width: 105 }, @@ -322,6 +325,10 @@ doEdit(obj) } else if (obj.event === 'edittui') { doEdittui(obj) + } else if (obj.event === 'editpandian') { + doEditpandian(obj) + } else if (obj.event === 'editshoukuan') { + doEditshoukuan(obj) } }); @@ -462,6 +469,102 @@ } }); } + + + + //鎵ц鐩樼偣鎿嶄綔 + function doEditpandian(obj) { + coreHelper.Post("Api/Puhuo/GetEdit", { id: obj.data.id, jintui: 3 }, function (e) { + if (e.code === 0) { + admin.popup({ + shadeClose: false, + title: '鐩樼偣', + area: ['1200px', '90%'], + id: 'LAY-popup-Puhuo-edit', + success: function (layero, index) { + view(this.id).render('baifenbingfa/Puhuo/edit', { data: e.data }).done(function () { + //鐩戝惉鎻愪氦 + form.on('submit(LAY-app-Puhuo-editForm-submit)', + function (data) { + var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈� + + field.isdelete = field.isdelete == 'on'; + + if (debug) { console.log(field); } //寮�鍚皟璇曡繑鍥炴暟鎹� + //鎻愪氦 Ajax 鎴愬姛鍚庯紝鍏抽棴褰撳墠寮瑰眰骞堕噸杞借〃鏍� + coreHelper.Post("Api/Puhuo/DoEdit", field, function (e) { + console.log(e) + if (e.code === 0) { + layui.table.reloadData('LAY-app-Puhuo-tableBox'); //閲嶈浇琛ㄦ牸 + layer.close(index); //鍐嶆墽琛屽叧闂� + layer.msg(e.msg); + } else { + layer.msg(e.msg); + } + }); + }); + }) + //// 绂佹寮圭獥鍑虹幇婊氬姩鏉� + //$(layero).children('.layui-layer-content').css('overflow', 'visible'); + } + , btn: ['纭畾', '鍙栨秷'] + , yes: function (index, layero) { + layero.contents().find("#LAY-app-Puhuo-editForm-submit").click(); + } + }); + } else { + layer.msg(e.msg); + } + }); + } + + + //鎵ц閫�璐ф搷浣� + function doEditshoukuan(obj) { + coreHelper.Post("Api/Puhuo/GetEdit", { id: obj.data.id, jintui: 4 }, function (e) { + if (e.code === 0) { + admin.popup({ + shadeClose: false, + title: '鍥炴', + area: ['1200px', '90%'], + id: 'LAY-popup-Puhuo-edit', + success: function (layero, index) { + view(this.id).render('baifenbingfa/Puhuo/editshoukuan', { data: e.data }).done(function () { + //鐩戝惉鎻愪氦 + form.on('submit(LAY-app-Puhuo-editForm-submit)', + function (data) { + var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈� + + field.isdelete = field.isdelete == 'on'; + + if (debug) { console.log(field); } //寮�鍚皟璇曡繑鍥炴暟鎹� + //鎻愪氦 Ajax 鎴愬姛鍚庯紝鍏抽棴褰撳墠寮瑰眰骞堕噸杞借〃鏍� + coreHelper.Post("Api/Puhuo/DoEdit", field, function (e) { + console.log(e) + if (e.code === 0) { + layui.table.reloadData('LAY-app-Puhuo-tableBox'); //閲嶈浇琛ㄦ牸 + layer.close(index); //鍐嶆墽琛屽叧闂� + layer.msg(e.msg); + } else { + layer.msg(e.msg); + } + }); + }); + }) + //// 绂佹寮圭獥鍑虹幇婊氬姩鏉� + //$(layero).children('.layui-layer-content').css('overflow', 'visible'); + } + , btn: ['纭畾', '鍙栨秷'] + , yes: function (index, layero) { + layero.contents().find("#LAY-app-Puhuo-editForm-submit").click(); + } + }); + } else { + layer.msg(e.msg); + } + }); + } + //鎵ц棰勮鎿嶄綔 function doDetails(obj) { coreHelper.Post("Api/Puhuo/GetDetails", { id: obj.data.id }, function (e) { -- Gitblit v1.9.1