| | |
| | | payloadJson.AWS_Data_Id__c = '{!AWSDataId}'; |
| | | if (isNewMode || {!isCloneMode}) { |
| | | payloadJson.AWS_Data_Id__c = r.object[0].dataId; |
| | | delete payloadJson.OwnerId; |
| | | } else { |
| | | payloadJson.AWS_Data_Id__c = '{!AWSDataId}'; |
| | | } |
| | |
| | | } else if (ele.type == 'checkbox') { |
| | | result[field_api_name] = ele.checked; |
| | | } else if (ele.type == 'select-multiple') { |
| | | //field_api_name |
| | | let multiple = field_api_name; |
| | | let targets = ""; |
| | | //InquiryForm特殊处理 |
| | | if(multiple == "Product1__c"){ |
| | | targets = GetEleByClass(config.ApiPrefix+'_'+field_api_name).parentNode.children[1].rows[1].cells[2].innerText; |
| | | }else if(multiple == "Request1__c"){ |
| | | targets = GetEleByClass(config.ApiPrefix+'_'+field_api_name).parentNode.children[2].rows[1].cells[2].innerText; |
| | | }else{ |
| | | targets = GetEleByClass(config.ApiPrefix+'_'+field_api_name).parentNode.children[1].children[0].children[1].children[2].children[0].innerText; |
| | | //After Update By zhj 20220411 Start |
| | | let multiple = nodelist[index].getAttribute("data-id"); |
| | | let targets = document.querySelector("[data-id=" + multiple + "]").options; |
| | | let selValues = []; |
| | | for(i=0; i < targets.length; i++){ |
| | | if(targets[i].selected){ |
| | | selValues.push(targets[i].value); |
| | | } |
| | | } |
| | | targets = targets.replace(/\n/g, ";"); |
| | | console.log('targets = ' + targets); |
| | | result[field_api_name] = targets; |
| | | let setValuesStr = JSON.stringify(selValues); |
| | | setValuesStr = setValuesStr.substring(1,setValuesStr.length-1); |
| | | if(setValuesStr){ |
| | | setValuesStr = setValuesStr.replace(/"/g,""); |
| | | if(setValuesStr.indexOf(',')!=-1){ |
| | | setValuesStr = setValuesStr.replace(/,/g,";"); |
| | | } |
| | | } |
| | | console.log('targets = ' + setValuesStr); |
| | | result[nodelist[index].getAttribute("data-id")] = setValuesStr; |
| | | //After Update By zhj 20220411 end |
| | | } else { |
| | | result[field_api_name] = ele.value; |
| | | } |