1
duhe
2024-03-15 be7d738131c8cf9c8e00c6abfde469f2d82cbfb0
WebTM/views/ÏúÊÛ¹ÜÀí/ÏúÊÛ¶©µ¥±ä¸üµ¥/Xs_SeOrderChangeBill.html
@@ -75,21 +75,21 @@
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label">销售部门</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly>
                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label">销售员</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="HEmpName" id="HEmpName" " class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly>
                                                <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                </button>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <label class="layui-form-label">销售部门</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly>
                                                <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                </button>
                                            </div>
@@ -456,6 +456,8 @@
                    "计量单位": "",
                    "HQty_Old": "0",
                    "HQty_New": "0",
                    "HTaxRate_Old": "0",
                    "HTaxRate_New": "0",
                    "HTaxPrice_Old": "0",
                    "HTaxPrice_New": "0",
                    "HDate_Old": "",
@@ -676,6 +678,8 @@
                        , { field: '计量单位', title: '计量单位', width: 100, style: "background-color:#efefef4d;" }//f7
                        , { field: 'HQty_Old', title: '原数量', width: 100, totalRow: true, style: "background-color:#efefef4d;"}
                        , { field: 'HQty_New', title: '新数量', width: 100, totalRow: true, edit: 'text' }
                        , { field: 'HTaxRate_Old', title: '原税率%', width: 100, style: "background-color:#efefef4d;" }
                        , { field: 'HTaxRate_New', title: '新税率%', width: 100, edit: 'text' }
                        , { field: 'HTaxPrice_Old', title: '原含税单价', width: 100, style: "background-color:#efefef4d;" }
                        , { field: 'HTaxPrice_New', title: '新含税单价', width: 100, edit: 'text' }
                        , { field: 'HDate_Old', title: '原交货日期', width: 120, style: "background-color:#efefef4d;" }
@@ -687,7 +691,7 @@
                        , { field: 'HSourceBillNo', title: '源单单号', hide: true, style: 'background-color: #f9f9f9;' }     //f7
                        , { field: 'HSourceBillType', title: '源单类型', hide: true, style: 'background-color: #f9f9f9;' }     //f7
                       /* , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }*/
                        , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }
                    ]]
                }
@@ -700,6 +704,8 @@
                    "计量单位": "",
                    "HQty_Old": "0",
                    "HQty_New": "0",
                    "HTaxRate_Old": "0",
                    "HTaxRate_New": "0",
                    "HTaxPrice_Old": "0",
                    "HTaxPrice_New": "0",
                    "HDate_Old": "",
@@ -803,6 +809,8 @@
                                        "计量单位": result.data[i]["计量单位"],
                                        "HQty_Old": dealDoubleToFixed(result.data[i]["原数量"], 1),
                                        "HQty_New": dealDoubleToFixed(result.data[i]["新数量"], 1),
                                        "HTaxRate_Old": result.data[i]["原税率"],
                                        "HTaxRate_New": result.data[i]["新税率"],
                                        "HTaxPrice_Old": dealDoubleToFixed(result.data[i]["原含税单价"], 3),
                                        "HTaxPrice_New": dealDoubleToFixed(result.data[i]["新含税单价"], 3),
                                        "HDate_Old": formatDate(result.data[i]["原交货日期"]),
@@ -891,10 +899,12 @@
                                        "计量单位": result.data[i]["计量单位"],
                                        "HQty_Old": dealDoubleToFixed(result.data[i]["数量"], 1),
                                        "HQty_New": dealDoubleToFixed(result.data[i]["数量"], 1),
                                        "HTaxRate_Old": result.data[i]["税率"],
                                        "HTaxRate_New": result.data[i]["税率"],
                                        "HTaxPrice_Old": dealDoubleToFixed(result.data[i]["含税单价"], 3),
                                        "HTaxPrice_New": dealDoubleToFixed(result.data[i]["含税单价"] ,3),
                                        "HDate_Old": formatDate(result.data[i]["交货日期"]),
                                        "HDate_New": formatDate(result.data[i]["交货日期"]),
                                        "HDate_New": new Date(result.data[i]["交货日期"]).getTime() < new Date().getTime() ? Format(new Date(),"yyyy-MM-dd"):formatDate(result.data[i]["交货日期"]),
                                        "HRemark": "",
                                        "HSourceInterID": result.data[i]["hmainid"],
                                        "HSourceEntryID": result.data[i]["hsubid"],
@@ -963,6 +973,8 @@
                        }
                        $("#HEmpName").val(checkStatus.data[0].HName);
                        $("#HEmpID").val(checkStatus.data[0].HItemID);
                        getEmpInfoByHEmpID(checkStatus.data[0].HItemID);
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
@@ -998,13 +1010,14 @@
            //#region å®¢æˆ·é€‰æ‹©é¡µé¢
            function get_checkCus() {
                var HEmpID = $("#HEmpID").val();
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '客户列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../Baseset/基础资料/Gy_CustomerList.html', 'yes']
                    , content: ['../../Baseset/基础资料/Gy_CustomerList.html?Type=1&openType=3&HEmp=' + HEmpID, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -1487,9 +1500,9 @@
                if (obj.event === 'del') {
                    layer.confirm('真的删除行么', function (index) {
                        console.log("索引为:" + rowIndex);
                        if (rowIndex === '0') {
                            layer.msg('首行无法删除!!!');
                        } else {
                        //if (rowIndex === '0') {
                        //    layer.msg('首行无法删除!!!');
                        //} else {
                            //obj.del();
                            //layer.close(index);
                            var oldData = table.cache["mainTable"];
@@ -1497,7 +1510,7 @@
                            option.data = oldData;
                            table.render(option);
                            layer.close(index);
                        }
                        /*}*/
                    });
                }
            }
@@ -1766,6 +1779,8 @@
        {
            $("#HEmpName").val(obj[0].HName);
            $("#HEmpID").val(obj[0].HItemID);
            getEmpInfoByHEmpID(obj[0].HItemID);
        }
        function GetHSupValue(obj)  //返回客户
@@ -1833,6 +1848,31 @@
            }
        }
            //#endregion
        //#region æ ¹æ®èŒå‘˜èŽ·å–éƒ¨é—¨
        function getEmpInfoByHEmpID(HEmpID) {
            $.ajax({
                url: GetWEBURL() + "/Xs_SeOrderBill/getEmpInfoByHEmpID",
                async: false,
                type: "GET",
                data: {
                    "HEmpID": HEmpID
                },
                success: function (result) {
                    if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                        var data = result.data[0];
                        $("#HDeptID").val(data.HDeptID);
                        $("#HDeptName").val(data.HDeptName);
                    } else {
                        layer.alert(result.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.alert("发生错误!", { icon: 5 });
                }
            });
        }
        //#endregion
    </script>
</body>
</html>