在报表的填报预览中,去除了系统自带提交按钮,使用了自定义提交按钮,但是报错

在报表的填报预览中,去除了系统自带提交按钮,使用了自定义提交按钮,但是报错:

ReferenceError: apiVersions is not defined

    at Module.s4Fz (emb?resource=plugin.bundle.js&hash=-946331145:2:5719)

    at i (resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1:518)

    at n (resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1:387)

    at Array.t [as push] (resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1:250)

    at emb?resource=plugin.bundle.js&hash=-946331145:2:51

emb?resource=plugin.bundle.js&hash=-946331145:2 [com-fr-plugin-elite-EliteJsBundleHandler] -- Plugin installation failed

(anonymous) @ emb?resource=plugin.bundle.js&hash=-946331145:2

emb?resource=plugin.bundle.js&hash=-946331145:2 Error: 21300014

    at o (resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1:2042982)

    at resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1:2043351

emb?resource=plugin.bundle.js&hash=-946331145:2 No assistant permission!

multiple?&token=bf3321f30c41f8ab7f4636d723644b01&content={%22version%22:%22Html5_11.5.01%22,%22type%22:%22ios%22,%22systemversion%22:%22web%22,%22terminal%22:%22H5%22,%22macaddress%22:%224BGWIU0N06fFpQhQso72gA%3D%3D%22,%22platform%22:%22iPhone%22,%22cpyname%22:%22f6d26f8f-dd01-11ea-9b2d-7cd30ae4376a%22,%22server%22:%22ZBw4pbCPA3K1azRm4szq1bk6BOdF5vDqm3KCLpfTIcwEI2lDddTobLg9ZnkERWpz4BGWIU0N06fFpQhQso72gA%3D%3D%22,%22items%22:[{%22number%22:1,%22name%22:%22WholeSelect%22,%22info%22:%22selected%22},{%22number%22:1,%22name%22:%22BIlayout%22,%22info%22:%22adaptivelayout%22},{%22number%22:1,%22name%22:%22Report%22,%22info%22:%22write%22}]}&callback=jsonpCallback0:1 Uncaught SyntaxError: Unexpected identifier 'type' (at multiple?&token=bf3321f30c41f8ab7f4636d723644b01&content={%22version%22:%22Html5_11.5.01%22,%22type%22:%22ios%22,%22systemversion%22:%22web%22,%22terminal%22:%22H5%22,%22macaddress%22:%224BGWIU0N06fFpQhQso72gA%3D%3D%22,%22platform%22:%22iPhone%22,%22cpyname%22:%22f6d26f8f-dd01-11ea-9b2d-7cd30ae4376a%22,%22server%22:%22ZBw4pbCPA3K1azRm4szq1bk6BOdF5vDqm3KCLpfTIcwEI2lDddTobLg9ZnkERWpz4BGWIU0N06fFpQhQso72gA%3D%3D%22,%22items%22:[{%22number%22:1,%22name%22:%22WholeSelect%22,%22info%22:%22selected%22},{%22number%22:1,%22name%22:%22BIlayout%22,%22info%22:%22adaptivelayout%22},{%22number%22:1,%22name%22:%22Report%22,%22info%22:%22write%22}]}&callback=jsonpCallback0:1:12)

2resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1 Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false`

x @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

l @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

r @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

start @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

start @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

fs @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

Uo @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

Sl @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

ul @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

Uo @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

Vo @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

Wo @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

al @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

enqueueSetState @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

errorHandler @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

tc @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

eval @ VM106:2

evaluateScript @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

n @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

setTimeout

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/FRPage.6ca48.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/FRPage.6ca48.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/FRPage.6ca48.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/FRPage.6ca48.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/FRPage.6ca48.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/FRPage.6ca48.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/FRPage.6ca48.js:1

value @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

onClick @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

Gt @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

xr @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

Sr @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

Dt @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

kr @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

Qe @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

Xe @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

Uo @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

Pt @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

Ke @ resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

setTimeout

Z/sv.r.sendClick @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

Z/sv.r.onTouchEnd @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

(anonymous) @ resources?path=/com/fr/plugin/mobile/web/dist/js/app.9e470.js:1

2resources?path=/com/fr/plugin/mobile/web/dist/js/vendor.cf33d.js:1 Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false`

image.png

FineReport griffin 发布于 2025-7-24 17:52
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共2回答
最佳回答
0
农夫三拳1Lv6中级互助
发布于2025-7-24 17:54

有很多js移动端都不支持的,看一下apiVersions 是写在哪里了吧

  • griffin griffin(提问者) 没有写apiVersions ,这是点击的JS: // 获取扫描参数
    var scanParam = _g().getWidgetByName("scanParam").getValue();
    var jydlx = _g().getWidgetByName("jydlx").getValue();
    FR.ajax({
    url: "",
    type: "POST",
    data: {
    number: scanParam,
    jydlx: jydlx
    },
    dataType: "json",
    success: function(res) {
    // 提取物料编码列表
    var materialCodes = [];
    if (res.data && res.data.data && res.data.data.materials) {
    // 遍历物料数组,收集物料编码
    res.data.data.materials.forEach(function(material) {
    if (material.物料编码) {
    materialCodes.push(material.物料编码);
    }
    });
    }

    // 构建弹窗消息
    var message = res.data.data.message || "成功更新物料检验单类型:";
    if (materialCodes.length > 0) {
    message += "\n" + materialCodes.join("\n");
    } else {
    message += "\n未找到物料编码信息";
    }

    alert(message)
    // 回调逻辑应写在这里
    _g().setCellValue(0, 1, 2, "");
    _g().setCellValue(0, 2, 8, "");
    _g().setCellValue(0, 2, 9, "");
    _g().refreshAllSheets();
    2025-07-24 17:56 
最佳回答
0
CD20160914Lv8专家互助
发布于2025-7-24 19:28

试一下如下面这样,你还可以在电脑浏览器中调试看看吧。F12

(function() {
    var scanParam = _g().getWidgetByName("scanParam").getValue();
    var jydlx = _g().getWidgetByName("jydlx").getValue();
    
    FR.ajax({
        url: "",  // 这里应该填写你的接口地址
        type: "POST",
        data: {
            number: scanParam,
            jydlx: jydlx
        },
        dataType: "json",
        success: function(res) {
            // 提取物料编码列表
            var materialCodes = [];
            if (res.data && res.data.data && res.data.data.materials) {
                // 遍历物料数组,收集物料编码
                res.data.data.materials.forEach(function(material) {
                    if (material.物料编码) {
                        materialCodes.push(material.物料编码);
                    }
                });
            }

            // 构建弹窗消息
            var message = res.data.data.message || "成功更新物料检验单类型:";
            if (materialCodes.length > 0) {
                message += "\n" + materialCodes.join("\n");
            } else {
                message += "\n未找到物料编码信息";
            }

            alert(message);

            // 回调逻辑
            _g().setCellValue(0, 1, 2, "");
            _g().setCellValue(0, 2, 8, "");
            _g().setCellValue(0, 2, 9, "");
            _g().refreshAllSheets();
        }
    });
})();

  • 3关注人数
  • 24浏览人数
  • 最后回答于:2025-7-24 19:28
    请选择关闭问题的原因
    确定 取消
    返回顶部