username@email.com
2024-06-26 7f26cd7c3e492062418cdc7dbe9d7ce14cbe5f05
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: '经销商id', 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) {