YYC
2023-07-04 585e878b169bdeb2bc8cc452b9d2e640d00caa6d
igds-web/src/main/resources/static/admin/inout/in-sample.js
@@ -309,7 +309,8 @@
        btnAlign: 'c',
        btn: ['打印并保存', '仅保存', '关闭取消'],
        yes: function () {
            printSimpleStart();
            printBar(curSampleData);
            submit();
        }, btn2: function () {
            // 更新到页面
            var data = form.val("form-detail");
@@ -321,32 +322,6 @@
            layer.closeAll();
        },
        closeBtn: 0
    });
}
//执行打印
function printSimpleStart() {
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/report/bill-simple",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(curSampleData),
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                alertError(result.msg);
            } else {
                printSimpleBill(result.data);
                submit();
            }
        },
        error: function () {
            layer.close(index);
            alertError("打印单据调用失败");
        }
    });
}
@@ -370,7 +345,7 @@
        success: function (result) {
            if (result.code != "0000") {
                layer.close(index);
                notify(result.msg, result.data);
                alertError(result.msg);
            } else {
                layer.closeAll();
                curSampleData = null;