Commit a2f26084 authored by Asjoker's avatar Asjoker

writePeople啥的

parent a0a40d85
...@@ -648,12 +648,20 @@ function getSaveData() { ...@@ -648,12 +648,20 @@ function getSaveData() {
} }
function saveQuestionnaire(type){ function saveQuestionnaire(type){
var writePeople = ''
var phoneNumber = ''
formData = []; formData = [];
$(document).ready(function () { $(document).ready(function () {
$('input[name*="option_"]').each(function () { $('input[name*="option_"]').each(function () {
if ($(this).val()) { if ($(this).val()) {
var tempObj = {}; var tempObj = {};
tempObj['optionsId'] = $(this).attr('name').replace('option_', ''); tempObj['optionsId'] = $(this).attr('name').replace('option_', '');
if ($(this).attr('name') === 'option_3') {
writePeople = $(this).val();
}
if ($(this).attr('name') === 'option_4') {
phoneNumber = $(this).val();
}
if ($(this.parentNode).parent("tr").prevAll().length + 1) { if ($(this.parentNode).parent("tr").prevAll().length + 1) {
if ($(this.parentNode).parent("tr").prevAll().length > 0){ if ($(this.parentNode).parent("tr").prevAll().length > 0){
tempObj['group'] = $(this.parentNode).parent("tr").prevAll().length + 1; tempObj['group'] = $(this.parentNode).parent("tr").prevAll().length + 1;
...@@ -738,7 +746,9 @@ function saveQuestionnaire(type){ ...@@ -738,7 +746,9 @@ function saveQuestionnaire(type){
var param = { var param = {
id: 1, id: 1,
type: type, type: type,
answersList: formData answersList: formData,
writePeople: writePeople,
phoneNumber: phoneNumber
}; };
$.ajax({ $.ajax({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment