一撮面包糠 发表于 2024-9-9 15:28:44

数据

// 批量插入数据函数
                function insertData(data_all, year, month) {
                  data_all.forEach(function(data_one) {
                  self.view.lookup({
                      "view": "工资管理列表-自动生成",
                      "application": "薪酬管理",
                      "filter": [
                        {
                        "logic": "and",
                        "path": "xm",
                        "comparison": "==",
                        "value": data_one.data_xm,
                        "formatType": "textValue"
                        },
                        {
                        "logic": "and",
                        "path": "ssdw",
                        "comparison": "==",
                        "value": data_one.data_ssdw,
                        "formatType": "textValue"
                        },
                        {
                        "logic": "and",
                        "path": "nd",
                        "comparison": "==",
                        "value": year,
                        "formatType": "textValue"
                        },
                        {
                        "logic": "and",
                        "path": "yf",
                        "comparison": "==",
                        "value": month,
                        "formatType": "textValue"
                        }
                      ]
                  }, function(existingData) {
                      if (existingData && existingData.grid.length > 0) {
                        console.log("已有相同的记录,不执行插入操作。");
                      } else {
                        // 执行插入
                        var dataAll = {
                        "identity": "",
                                                      "wf_jobId": "",
                                                      "wf_workId": "",
                                                      "wf_formId": "",
                                                      "wf_attachmentIds": [""],
                                                      "cms_attachmentIds": [""],
                                                      "docData": data_one,
                                                      //"readerList": [{ }],
                                                      //"authorList": [{ }],
                                                      "skipPermission": "",
                                                      "summary": "",
                                                      "title": "",
                                                      "objectSecurityClearance": "",
                                                      "documentType": "数据",
                                                      "docStatus": "",
                                                      "categoryId": "d4ae8b3e-bdef-4cb6-b6d4-c8c222bf454a",
                                                      "publishTime": "",
                                                      "isTop": "",
                                                      "documentNotify": {},
                                                      "stringValue01": "",
                                                      "stringValue02": "",
                                                      "stringValue03": ""
                        };

                        var action = self.Actions.load("x_cms_assemble_control");
                        action.DocumentAction.persist_publishContentMockPutToPost(
                        dataAll,
                        function(json) {
                            console.log("成功", dataAll);
                        }.bind(self),
                        function(json) {
                            console.log("错误", dataAll);
                        }.bind(self)
                        );
                      }
                  });
                  });
                }我这个为什么插入不进去数据往内容管理的表单自动生成数据

论坛管理员 发表于 2024-9-11 10:33:28

前端执行还是后端执行,跟踪过吗?是报错了还是没执行?数据传入的都对不对,现象截图看看,跟踪时的图也都截一下
页: [1]
查看完整版本: 数据