王 垚
2021-12-03 d042a6fd02f8256dea3298b5c3c7482bcb0b8ae7
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill_Edit.html
@@ -109,10 +109,16 @@
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-row">
                                                <div class="layui-col-xs6">
                                                <div class="layui-col-xs3">
                                                    <label class="layui-form-label"> 送货单号:</label>
                                                    <div class="layui-input-block">
                                                        <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete="off">
                                                        <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" readonly autocomplete="off">
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs3">
                                                    <label class="layui-form-label"> 物流单号:</label>
                                                    <div class="layui-input-block">
                                                        <input class="layui-input" name="HDeliveryNo" id="HDeliveryNo"  autocomplete="off">
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs6">
@@ -124,55 +130,55 @@
                                            </div>
                                        </div>
                                    </div>
                                            <div class="layui-tab-item">
                                                <div class="layui-form-item">
                                                    <div class="layui-row">
                                                        <div class="layui-col-xs3">
                                                            <label class="layui-form-label">制 单 人:</label>
                                                            <div class="layui-input-inline">
                                                                <input class="layui-input" name="HMaker" id="HMaker" readonly="readonly" autocomplete="off">
                                                            </div>
                                                        </div>
                                                        <div class="layui-col-xs3">
                                                            <label class="layui-form-label">审 核 人:</label>
                                                            <div class="layui-input-inline">
                                                                <input class="layui-input" name="HChecker" id="HChecker" readonly="readonly" autocomplete="off">
                                                            </div>
                                                        </div>
                                                        <div class="layui-col-xs3">
                                                            <label class="layui-form-label">变 更 人:</label>
                                                            <div class="layui-input-inline">
                                                                <input class="layui-input" name="HUpDater" id="HUpDater" readonly="readonly" autocomplete="off">
                                                            </div>
                                                        </div>
                                    <div class="layui-tab-item">
                                        <div class="layui-form-item">
                                            <div class="layui-row">
                                                <div class="layui-col-xs3">
                                                    <label class="layui-form-label">制 单 人:</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HMaker" id="HMaker" readonly="readonly" autocomplete="off">
                                                    </div>
                                                </div>
                                                <div class="layui-form-item">
                                                    <div class="layui-row">
                                                        <div class="layui-col-xs3">
                                                            <label class="layui-form-label">制单日期:</label>
                                                            <div class="layui-input-inline">
                                                                <input class="layui-input" name="HMakeDate" id="HMakeDate" readonly="readonly" autocomplete="off">
                                                            </div>
                                                        </div>
                                                        <div class="layui-col-xs3">
                                                            <label class="layui-form-label">审核日期:</label>
                                                            <div class="layui-input-inline">
                                                                <input class="layui-input" name="HCheckDate" id="HCheckDate" readonly="readonly" autocomplete="off">
                                                            </div>
                                                        </div>
                                                        <div class="layui-col-xs3">
                                                            <label class="layui-form-label">变更日期:</label>
                                                            <div class="layui-input-inline">
                                                                <input class="layui-input" name="HUpDateDate" id="HUpDateDate" readonly="readonly" autocomplete="off">
                                                            </div>
                                                        </div>
                                                <div class="layui-col-xs3">
                                                    <label class="layui-form-label">审 核 人:</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HChecker" id="HChecker" readonly="readonly" autocomplete="off">
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs3">
                                                    <label class="layui-form-label">变 更 人:</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HUpDater" id="HUpDater" readonly="readonly" autocomplete="off">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-row">
                                                <div class="layui-col-xs3">
                                                    <label class="layui-form-label">制单日期:</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HMakeDate" id="HMakeDate" readonly="readonly" autocomplete="off">
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs3">
                                                    <label class="layui-form-label">审核日期:</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HCheckDate" id="HCheckDate" readonly="readonly" autocomplete="off">
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs3">
                                                    <label class="layui-form-label">变更日期:</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HUpDateDate" id="HUpDateDate" readonly="readonly" autocomplete="off">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                        <script type="text/html" id="toolbarDemo">
@@ -184,7 +190,7 @@
                        <blockquote class="layui-elem-quote">送货单</blockquote>
                    </form>
                </div>
                        </div>
            </div>
        </div>
    </div>
    <!--<script src="../../layuiadmin/layui/lay/modules/mobile/jquery-3.3.1.min.js"></script>-->
@@ -210,17 +216,18 @@
        var lSourceBillType = params[params[2]];
        // debugger;
        $.ajax({
            url: GetWEBURL()+"GetNewPOInStockBillNo",
            url: GetWEBURL() + "GetNewPOInStockBillNo",
            type: "GET",
            data: { "sMsg": linterid, "sMsg3": lSourceBillType },
            success: function (d) {
                //console.log(d.data);
                $("#HBillNo").val(d.data[0].HBillNo);
                $("#HInnerBillNo").val(d.data[0].HInnerBillNo);
                $("#HDate").val(d.data[0].HDate);
            }
        });
        $.ajax({
            url: GetWEBURL()+"GetNewPOInStockShowBillMain",
            url: GetWEBURL() + "GetNewPOInStockShowBillMain",
            type: "GET",
            data: { "sMsg": linterid, "sMsg3": lSourceBillType },
            success: function (d) {
@@ -252,15 +259,15 @@
            index: 'lib/index' //主入口模块
        }).use(['index', 'table', 'form', 'element', 'layer', 'laydate'], function () {
            var table = layui.table
            , $ = layui.$
            , form = layui.form
            , layer = layui.layer
            , laydate = layui.laydate
            , element = layui.element; //Tab的切换功能,切换事件监听等,需要依赖element模块
                , $ = layui.$
                , form = layui.form
                , layer = layui.layer
                , laydate = layui.laydate
                , element = layui.element; //Tab的切换功能,切换事件监听等,需要依赖element模块
            //常规用法
            laydate.render({
                elem: '#HDHDate'
            });
            });
            //监听提交
            //form.verify({
            //    numberOrEmpty: function (value, item) {
@@ -275,57 +282,57 @@
            layer.load(3)
            table.render({
                elem: '#mainTable'
              //, url: GetWEBURL()+'GetNewPOInStockShowBillSub'
              , toolbar: '#toolbarDemo'
             //, where: { sMsg: linterid, sMsg2: lentryid, sMsg3: lSourceBillType }
             // , where: { sMsg: '28', sMsg2: '28,5;' }
              , cols: [[
                  { type: 'checkbox', fixed: 'left' }
                , { field: 'sorderid', title: '序号', width: 80,  hide: true ,fixed: true }
                , { field: 'HMTONO', title: '计划跟踪单号', width: 100, fixed: true ,edit: 'text', hide: true }
                , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
                , { field: 'HMaterNumber', title: '物料代码', width: 100}
                , { field: 'HMaterName', title: '物料名称', width: 200 }
                , { field: 'HMaterModel', title: '规格型号', width: 200 }
                , { field: 'HUnitName', title: '计量单位', width: 100}
                , { field: 'HUnitNumber', title: '计量单位代码', width: 100, hide: true }
                , { field: 'HUnitID', title: '计量单位ID', width: 100, hide: true }
                , { field: 'HQty', title: '送货数量', width: 100, edit: 'text', event: "inputHQty" }
                , { field: 'HRQty', title: '未入库数量', width: 100}
                , { field: 'HSQty', title: '源单数量', width: 100 }
                , { field: 'HBatchNo', title: '批次', width: 100, edit: 'text' }
                , { field: 'HKFDate', title: '生产日期', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate" }
                , { field: 'HKFPeriod', title: '保质期', width: 100}
                , { field: 'HDate', title: '预计到货日期', align: 'center', width: 150, data_field: 'HDate', event: "chooseHDate", hide: true }
                , { field: 'HPrice', title: '单价', width: 100 }
                , { field: 'HMoney', title: '金额', width: 100 }
                //, { field: 'HRemark', title: '备注', width: 100 }
                , { field: 'HPOOrderInterID', title: '采购订单主内码', width: 150, hide: true }
                , { field: 'HPOOrderEntryID', title: '采购订单子内码', width: 150, hide: true }
                , { field: 'HPOOrderBillNo', title: '采购订单号', width: 200 }
                , { field: 'HWWOrderInterID', title: '委外订单主内码', width: 150, hide: true }
                , { field: 'HWWOrderEntryID', title: '委外订单子内码', width: 150, hide: true }
                , { field: 'HWWOrderBillNo', title: '委外订单号', width: 200 }
                , { field: 'HBillType', title: '单据类型', width: 100, hide: true }
                , { field: 'HSourceBillType', title: '源单类型', width: 100, hide: true }
                , { field: 'HSourceBillNo', title: '源单单号', width: 200 }
                , { field: 'HSourceInterID', title: '源单主内码', width: 150, hide: true }
                , { field: 'HSourceEntryID', title: '源单子内码', width: 150, hide: true }
                //, url: GetWEBURL()+'GetNewPOInStockShowBillSub'
                , toolbar: '#toolbarDemo'
                //, where: { sMsg: linterid, sMsg2: lentryid, sMsg3: lSourceBillType }
                // , where: { sMsg: '28', sMsg2: '28,5;' }
                , cols: [[
                    { type: 'checkbox', fixed: 'left' }
                    , { field: 'sorderid', title: '序号', width: 80, hide: true, fixed: true }
                    , { field: 'HMTONO', title: '计划跟踪单号', width: 100, fixed: true, edit: 'text', hide: true }
                    , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
                    , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                    , { field: 'HMaterName', title: '物料名称', width: 200 }
                    , { field: 'HMaterModel', title: '规格型号', width: 200 }
                    , { field: 'HUnitName', title: '计量单位', width: 100 }
                    , { field: 'HUnitNumber', title: '计量单位代码', width: 100, hide: true }
                    , { field: 'HUnitID', title: '计量单位ID', width: 100, hide: true }
                    , { field: 'HQty', title: '送货数量', width: 100, edit: 'text', event: "inputHQty" }
                    , { field: 'HRQty', title: '未入库数量', width: 100 }
                    , { field: 'HSQty', title: '源单数量', width: 100 }
                    , { field: 'HBatchNo', title: '批次', width: 100, edit: 'text' }
                    , { field: 'HKFDate', title: '生产日期', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate" }
                    , { field: 'HKFPeriod', title: '保质期', width: 100 }
                    , { field: 'HDate', title: '预计到货日期', align: 'center', width: 150, data_field: 'HDate', event: "chooseHDate", hide: true }
                    , { field: 'HPrice', title: '单价', width: 100 }
                    , { field: 'HMoney', title: '金额', width: 100 }
                    //, { field: 'HRemark', title: '备注', width: 100 }
                    , { field: 'HPOOrderInterID', title: '采购订单主内码', width: 150, hide: true }
                    , { field: 'HPOOrderEntryID', title: '采购订单子内码', width: 150, hide: true }
                    , { field: 'HPOOrderBillNo', title: '采购订单号', width: 200 }
                    , { field: 'HWWOrderInterID', title: '委外订单主内码', width: 150, hide: true }
                    , { field: 'HWWOrderEntryID', title: '委外订单子内码', width: 150, hide: true }
                    , { field: 'HWWOrderBillNo', title: '委外订单号', width: 200 }
                    , { field: 'HBillType', title: '单据类型', width: 100, hide: true }
                    , { field: 'HSourceBillType', title: '源单类型', width: 100, hide: true }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 200 }
                    , { field: 'HSourceInterID', title: '源单主内码', width: 150, hide: true }
                    , { field: 'HSourceEntryID', title: '源单子内码', width: 150, hide: true }
               //// , { field: 'HCheckDate', title: '审核日期', width: 150 }
               // , { field: 'HChecker', title: '审核人', width: 100 }
               // , { field: 'HSupID', title: '供应商ID', width: 150 }
               // , { field: 'HManagerID', title: '主管ID', width: 100 }
               // , { field: 'HEmpID', title: '职员ID', width: 100 }
               // , { field: 'HMaker', title: '制单人', width: 100 }
              ]]
              // , data: [linterid]
                    //// , { field: 'HCheckDate', title: '审核日期', width: 150 }
                    // , { field: 'HChecker', title: '审核人', width: 100 }
                    // , { field: 'HSupID', title: '供应商ID', width: 150 }
                    // , { field: 'HManagerID', title: '主管ID', width: 100 }
                    // , { field: 'HEmpID', title: '职员ID', width: 100 }
                    // , { field: 'HMaker', title: '制单人', width: 100 }
                ]]
                // , data: [linterid]
                // , page: true
            , limit: 500 //每页默认显示的数量
              //, height: 500
              , done: function () {
                     layer.closeAll("loading");
                 }
                , limit: 500 //每页默认显示的数量
                //, height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            });
            //事件监听
            //layui.table.on("tool(mainTable)", function (obj) {
@@ -341,7 +348,7 @@
                    case "btn-add":
                        var oldData = table.cache["mainTable"];
                        var checkStatus = table.checkStatus('mainTable')
                        , data = checkStatus.data;
                            , data = checkStatus.data;
                        var rows = '';
                        for (var i = 0; i < data.length; i++) {
                            rows += data[i].HMaterID.toString() + ',';
@@ -363,7 +370,7 @@
                                var count = parseInt(HRowCount);
                                if (count > 1) {
                                    var data1;
                                    var dataindex=0;
                                    var dataindex = 0;
                                    for (var i = 0; i < data.length; i++) {
                                        for (var j = 0; j < oldData.length; j++) {
@@ -373,34 +380,34 @@
                                                    //dataindex = dataindex + x;
                                                    data1 = {
                                                        "sorderid": oldData.length + 1
                                                ,"HMaterID": data[i].HMaterID
                                                , "HMaterNumber": data[i].HMaterNumber
                                                , "HMaterName": data[i].HMaterName
                                                , "HMaterModel": data[i].HMaterModel
                                                , "HUnitName": data[i].HUnitName
                                                , "HUnitNumber": data[i].HUnitNumber
                                                , "HUnitID": data[i].HUnitID
                                                , "HQty": data[i].HQty
                                                , "HRQty": data[i].HRQty
                                                , "HSQty": data[i].HSQty
                                                , "HBatchNo": data[i].HBatchNo
                                                , "HKFDate": data[i].HKFDate
                                                , "HKFPeriod": data[i].HKFPeriod
                                                , "HPrice": data[i].HPrice
                                                , "HMoney": data[i].HMoney
                                                , "HPOOrderInterID": data[i].HPOOrderInterID
                                                , "HPOOrderEntryID": data[i].HPOOrderEntryID
                                                , "HPOOrderBillNo": data[i].HPOOrderBillNo
                                                , "HWWOrderInterID": data[i].HWWOrderInterID
                                                , "HWWOrderEntryID": data[i].HWWOrderEntryID
                                                , "HWWOrderBillNo": data[i].HWWOrderBillNo
                                                , "HBillType": data[i].HBillType
                                                , "HSourceBillType": data[i].HSourceBillType
                                                , "HSourceBillNo": data[i].HSourceBillNo
                                                , "HSourceInterID": data[i].HSourceInterID
                                                , "HSourceEntryID": data[i].HSourceEntryID
                                                , "HMTONO": data[i].HMTONO
                                                , "HDate": data[i].HDate
                                                        , "HMaterID": data[i].HMaterID
                                                        , "HMaterNumber": data[i].HMaterNumber
                                                        , "HMaterName": data[i].HMaterName
                                                        , "HMaterModel": data[i].HMaterModel
                                                        , "HUnitName": data[i].HUnitName
                                                        , "HUnitNumber": data[i].HUnitNumber
                                                        , "HUnitID": data[i].HUnitID
                                                        , "HQty": data[i].HQty
                                                        , "HRQty": data[i].HRQty
                                                        , "HSQty": data[i].HSQty
                                                        , "HBatchNo": data[i].HBatchNo
                                                        , "HKFDate": data[i].HKFDate
                                                        , "HKFPeriod": data[i].HKFPeriod
                                                        , "HPrice": data[i].HPrice
                                                        , "HMoney": data[i].HMoney
                                                        , "HPOOrderInterID": data[i].HPOOrderInterID
                                                        , "HPOOrderEntryID": data[i].HPOOrderEntryID
                                                        , "HPOOrderBillNo": data[i].HPOOrderBillNo
                                                        , "HWWOrderInterID": data[i].HWWOrderInterID
                                                        , "HWWOrderEntryID": data[i].HWWOrderEntryID
                                                        , "HWWOrderBillNo": data[i].HWWOrderBillNo
                                                        , "HBillType": data[i].HBillType
                                                        , "HSourceBillType": data[i].HSourceBillType
                                                        , "HSourceBillNo": data[i].HSourceBillNo
                                                        , "HSourceInterID": data[i].HSourceInterID
                                                        , "HSourceEntryID": data[i].HSourceEntryID
                                                        , "HMTONO": data[i].HMTONO
                                                        , "HDate": data[i].HDate
                                                    }
                                                    //oldData.push(data1);
                                                    oldData.splice(dataindex, 0, data1);
@@ -425,7 +432,7 @@
                    case "btn-del":
                        var oldData = table.cache["mainTable"];
                        var checkStatus = table.checkStatus('mainTable')
                        , data = checkStatus.data;
                            , data = checkStatus.data;
                        var rows = '';
@@ -437,17 +444,15 @@
                            layer.msg("至少选择一行记录!")
                        }
                        else
                        {
                        else {
                            layer.confirm('是否确认?', { icon: 3, title: '提示' }, function (index) {
                                for (var i = 0; i < data.length; i++) {
                                    for (var j = 0; j < oldData.length; j++) {
                                        if(data[i].sorderid==oldData[j].sorderid)
                                        {
                                        if (data[i].sorderid == oldData[j].sorderid) {
                                            oldData.splice(j, 1);
                                            break;
                                        }
                                        }
                                    }
                                }
                                table.reload('mainTable', {
@@ -468,26 +473,28 @@
                    var field = $(this).data('field');
                    laydate.render({
                        elem: this.firstChild
                      , show: true //直接显示
                      , closeStop: this
                      , done: function (value, date) {
                          data[field] = value;
                          obj.update(data);
                        , show: true //直接显示
                        , closeStop: this
                        , done: function (value, date) {
                            data[field] = value;
                            obj.update(data);
                      }});
                        }
                    });
                }
                else if (obj.event === 'chooseHDate'){
                else if (obj.event === 'chooseHDate') {
                    var field = $(this).data('field');
                    laydate.render({
                        elem: this.firstChild
                      , show: true //直接显示
                      , closeStop: this
                      , done: function (value, date) {
                          data[field] = value;
                          obj.update(data);
                        , show: true //直接显示
                        , closeStop: this
                        , done: function (value, date) {
                            data[field] = value;
                            obj.update(data);
                      }});
                        }
                    });
                }
                else if (obj.event == 'inputHQty') {
@@ -497,7 +504,7 @@
                        $input.val(val.replace(/[^\d]/g, ''));
                    });
                }
            });
            //table.on('tool(mainTable)', function (d) {
            //          switch (d.event) {
@@ -512,8 +519,8 @@
            //});
            table.on('edit(mainTable)', function (obj) { //注:edit是固定事件名,test是table原始容器的属性 lay-filter="对应的值"
                var value = obj.value //得到修改后的值
                   ,data = obj.data //得到所在行所有键值
                   , field = obj.field; //得到字段
                    , data = obj.data //得到所在行所有键值
                    , field = obj.field; //得到字段
                var oldData = table.cache["mainTable"];
                var HQty = 0;
                if (obj.field == "HQty") {
@@ -526,25 +533,21 @@
                    else {
                        var bresult = true;
                        var SumQty = 0;
                        for (var i = 0; i < oldData.length; i++)
                        {
                            if(oldData[i].HMaterID==obj.data.HMaterID&&oldData[i].HSourceInterID==obj.data.HSourceInterID&&oldData[i].HSourceEntryID==obj.data.HSourceEntryID)
                            {
                        for (var i = 0; i < oldData.length; i++) {
                            if (oldData[i].HMaterID == obj.data.HMaterID && oldData[i].HSourceInterID == obj.data.HSourceInterID && oldData[i].HSourceEntryID == obj.data.HSourceEntryID) {
                                SumQty = SumQty + parseFloat(oldData[i].HQty);
                            }
                        }
                        if (SumQty > obj.data.HRQty)
                        {
                        if (SumQty > obj.data.HRQty) {
                            bresult = false;
                        }
                        if (bresult){
                        obj.update({
                            HMoney: parseFloat(obj.data.HPrice) * parseFloat(obj.value),
                        });
                        if (bresult) {
                            obj.update({
                                HMoney: parseFloat(obj.data.HPrice) * parseFloat(obj.value),
                            });
                        }
                        else
                        {
                        else {
                            layer.msg("错误:" + "下推送货单,合计送货数量不能超过未入库数量!", { icon: 5 });
                        }
                    }
@@ -579,27 +582,31 @@
                //debugger;
                var sMainStr = JSON.stringify(data.field);
                var sSubStr = JSON.stringify(table.cache['mainTable']);
                var sMainSub = sMainStr + ';' + sSubStr;
                $.ajax(
                var sMainSub = sMainStr + ';' + sSubStr;
                if (!AllowLoadData(sSubStr))//数据验证
                {
                    type: "POST",
                    url: GetWEBURL()+"SaverPOInStock", //方法所在页面和方法名
                    async: true,
                    data: {"msg": sMainSub  },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // 说明验证成功了,
                            layer.msg(data.Message, { icon: 1 });
                    return false;
                }
                $.ajax(
                    {
                        type: "POST",
                        url: GetWEBURL() + "SaverPOInStock", //方法所在页面和方法名
                        async: true,
                        data: { "msg": sMainSub },
                        dataType: "json",
                        success: function (data) {
                            if (data.count == 1) { // 说明验证成功了,
                                layer.msg(data.Message, { icon: 1 });
                            }
                            else {
                                f_alert(data.Message);
                            }
                            layer.closeAll("loading");
                        },
                        error: function (err) {
                            f_alert("错误:" + err);
                        }
                        else {
                            f_alert(data.Message);
                        }
                        layer.closeAll("loading");
                    },
                    error: function (err) {
                        f_alert("错误:" + err);
                    }
                });
                    });
            });
            form.on('submit(Exit)', function (data) {//保存
                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
@@ -610,26 +617,26 @@
                //jiuajax从服务器获取
                layer.load(3)
                $.ajax(
                {
                    type: "POST",
                    url: GetWEBURL()+"SaverPOInStock", //方法所在页面和方法名
                    async:true,
                    data: { msg: sMainSub },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // 说明验证成功了,
                            layer.msg(data.Message, { icon: 1 });
                    {
                        type: "POST",
                        url: GetWEBURL() + "SaverPOInStock", //方法所在页面和方法名
                        async: true,
                        data: { msg: sMainSub },
                        dataType: "json",
                        success: function (data) {
                            if (data.count == 1) { // 说明验证成功了,
                                layer.msg(data.Message, { icon: 1 });
                            }
                            else {
                                // $("#verifycode").click();
                                f_alert(data.Message);
                            }
                            layer.closeAll("loading");
                        },
                        error: function (err) {
                            f_alert("错误:" + err);
                        }
                        else {
                            // $("#verifycode").click();
                            f_alert(data.Message);
                        }
                        layer.closeAll("loading");
                    },
                    error: function (err) {
                        f_alert("错误:" + err);
                    }
                });
                    });
            }
            function f_alert(sMsg) {
                layer.alert(sMsg, { icon: 5 });
@@ -644,6 +651,21 @@
                //  }
                //});
            }
            //非空验证
            function AllowLoadData(sSubStr) {
                var Result = true;
                if ($("#HDHDate").val() == '' || $("#HDHDate").val() == null) {
                    layer.msg("预计到货日期不能为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return Result = false;
                }
                if ($("#HDeliveryNo").val() == '' || $("#HDeliveryNo").val() == null) {
                    layer.msg("物流单号不能为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return Result = false;
                }
                return Result;
            }
            //function form2json() {
            //    var jsonuserinfo = jQuery('#form1').serializeObject();
            //    return JSON.stringify(jsonuserinfo).replace(/(")/g, "\\\"");
@@ -670,7 +692,7 @@
            //    return JSON.stringify(ajaxData).replace(/(")/g, "\\\"");
            //   // return false;
            //});
            //function f_SaveBefore() {
            //    //保存前处理(字段格式:int类型不能为空,日期类型符合格式,bool类型)
            //    if ($("#HInterID").val() == '') {
@@ -684,7 +706,8 @@
                var type = $(this).data('type');
                active[type] ? active[type].call(this) : '';
            });
           });
        });
    </script>
</body>
</html>