3.8K Star 15.5K Fork 5.1K

卓源软件 / JeeSite 4.5 and 5.0

 / 详情

前台生成的表格改成了表单后就获取不到后台的值了star

待办的
创建于  
2022-08-12 10:40

是什么问题、该问题是怎么引起的?

  1. 我用jeesite生成了一张主表和七张子表,把子表的表格改成了表单,然后点击修改的时候,子表获取不到值了。

重现步骤、期望结果、截图、代码

  1. 把生成的主子表的子表有表格改成了表单
这里贴你的代码块

改之前
生成的表格

//初始化hr_dangan_certificate_managementDataGrid对象
$("#danganCertificateManagementDataGrid").dataGrid({

data: ${toJson(danganBase.danganCertificateManagementList)},
datatype: "local", // 设置本地数据
autoGridHeight: function(){return 'auto'}, // 设置自动高度

// 设置数据表格列
columnModel: [
	{header:'状态', name:'status', editable:true, hidden:true},
	{header:'主键', name:'id', editable:true, hidden:true},
	{header:'${text("员工编码")}', name:'code.code', editable:true, hidden:true},
	{header:'${text("证件名称")}', name:'certificateName', width:150, editable:true, edittype:'text', editoptions:{'maxlength':'255', 'class':'form-control'}},
	{header:'${text("操作")}', name:'actions', width:80, align:'center', formatter: function(val, obj, row, act){
		var actions = [];
		if (val == 'new'){
			actions.push('<a href="#" onclick="js.confirm(\'${text("你确认要删除这条数据吗?")}\', function(){$(\'#danganCertificateManagementDataGrid\').dataGrid(\'delRowData\',\''+obj.rowId+'\')});return false;"><i class="fa fa-trash-o"></i></a>&nbsp;');
		}else{
			actions.push('<a href="#" onclick="js.confirm(\'${text("你确认要删除这条数据吗?")}\', function(){$(\'#danganCertificateManagementDataGrid\').dataGrid(\'setRowData\',\''+obj.rowId+'\',null,{display:\'none\'});$(\'#'+obj.rowId+'_status\').val(\''+Global.STATUS_DELETE+'\');});return false;"><i class="fa fa-trash-o"></i></a>&nbsp;');
		}
		return actions.join('');
	}, editoptions: {defaultValue: 'new'}}
],

// 编辑表格参数
editGrid: true,				// 是否是编辑表格
editGridInitRowNum: 1,		// 编辑表格的初始化新增行数
editGridAddRowBtn: $('#danganCertificateManagementDataGridAddRowBtn'),	// 子表增行按钮
editGridAddRowBtnToHeader: true,	// 子表增行按钮是否显示到表头上
editGridAddRowInitData: {id: '', status: Global.STATUS_NORMAL},	// 新增行的时候初始化的数据

// 编辑表格的提交数据参数
editGridInputFormListName: 'danganCertificateManagementList', // 提交的数据列表名
editGridInputFormListAttrs: 'status,code.code,id,certificateName,', // 提交数据列表的属性字段

// 加载成功后执行事件
ajaxSuccess: function(data){
	
}

});
改之后(表单)

* ${text('证件名称')}:
### 实际结果、报错信息、截图
这里贴错误信息
后台全部都查出来了
08-12 10:32:28.671 DEBUG [c.j.m.sys.interceptor.LogInterceptor   ] - 请求开始 URI: /js/a/dangan/danganBase/form, IP: 0:0:0:0:0:0:0:1
08-12 10:32:28.672 DEBUG [c.j.c.m.m.provider.SelectSqlProvider   ] - 0毫秒: SELECT a.code AS "code", a.id AS "id", a.surname AS "surname", a.name AS "name", a.lastname AS "lastname", a.firstname AS "firstname", a.department AS "department", a.position AS "position", a.marriage_status AS "marriageStatus", a.private_email AS "privateEmail", a.company_email AS "companyEmail", a.phone AS "phone", a.province AS "province", a.city AS "city", a.district AS "district", a.address AS "address", a.zip_code AS "zipCode", a.country AS "country", a.document_type AS "documentType", a.id_number AS "idNumber", a.id_number_start AS "idNumberStart", a.id_number_end AS "idNumberEnd", a.sex AS "sex", a.birthday AS "birthday", a.age AS "age", a.account_address AS "accountAddress", a.account_zip_code AS "accountZipCode", a.account_type AS "accountType", a.nation AS "nation", a.political AS "political", a.hobby AS "hobby" FROM hr_dangan_base a WHERE a.code = #{code}
08-12 10:32:28.673 DEBUG [o.m.s.t.SpringManagedTransaction       ] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@5fd05611] will not be managed by Spring
08-12 10:32:28.696 DEBUG [c.j.c.m.m.provider.SelectSqlProvider   ] - 0毫秒: SELECT a.code AS "code.code", a.id AS "id", a.emergency_contact AS "emergencyContact", a.emergency_contact_name AS "emergencyContactName", a.emergency_contact_relation AS "emergencyContactRelation", a.emergency_contact_phone AS "emergencyContactPhone", a.emergency_contact_landline AS "emergencyContactLandline", a.remarks AS "remarks" FROM hr_dangan_social_relations a WHERE a.code = #{sqlMap.where#code#EQ1} ORDER BY a.id ASC
08-12 10:32:28.697 DEBUG [o.m.s.t.SpringManagedTransaction       ] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@5fd05611] will not be managed by Spring
08-12 10:32:28.717 DEBUG [c.j.c.m.m.provider.SelectSqlProvider   ] - 0毫秒: SELECT a.code AS "code.code", a.id AS "id", a.bank_id AS "bankId", a.bank_name AS "bankName" FROM hr_dangan_bank_card a WHERE a.code = #{sqlMap.where#code#EQ1} ORDER BY a.id ASC
08-12 10:32:28.717 DEBUG [o.m.s.t.SpringManagedTransaction       ] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@5fd05611] will not be managed by Spring
08-12 10:32:28.739 DEBUG [c.j.c.m.m.provider.SelectSqlProvider   ] - 1毫秒: SELECT a.code AS "code.code", a.id AS "id", a.certificate_name AS "certificateName" FROM hr_dangan_certificate_management a WHERE a.code = #{sqlMap.where#code#EQ1} ORDER BY a.id ASC
08-12 10:32:28.739 DEBUG [o.m.s.t.SpringManagedTransaction       ] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@5fd05611] will not be managed by Spring
08-12 10:32:28.759 DEBUG [c.j.c.m.m.provider.SelectSqlProvider   ] - 0毫秒: SELECT a.code AS "code.code", a.id AS "id", a.first_qualifications AS "firstQualifications", a.highest_qualifications AS "highestQualifications", a.qualifications AS "qualifications", a.school AS "school", a.subject AS "subject", a.educational_start_time AS "educationalStartTime", a.educational_end_time AS "educationalEndTime", a.remarks AS "remarks" FROM hr_dangan_educational_information a WHERE a.code = #{sqlMap.where#code#EQ1} ORDER BY a.id ASC
08-12 10:32:28.759 DEBUG [o.m.s.t.SpringManagedTransaction       ] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@5fd05611] will not be managed by Spring
08-12 10:32:28.780 DEBUG [c.j.c.m.m.provider.SelectSqlProvider   ] - 0毫秒: SELECT a.code AS "code.code", a.id AS "id", a.company_chinese_name AS "companyChineseName", a.company_english_name AS "companyEnglishName", a.work_start_time AS "workStartTime", a.work_end_time AS "workEndTime", a.manage_people AS "managePeople", a.job_description AS "jobDescription", a.job AS "job", a.department AS "department", a.report_people AS "reportPeople", a.remarks AS "remarks" FROM hr_dangan_work_experience a WHERE a.code = #{sqlMap.where#code#EQ1} ORDER BY a.id ASC
08-12 10:32:28.781 DEBUG [o.m.s.t.SpringManagedTransaction       ] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@5fd05611] will not be managed by Spring
08-12 10:32:28.803 DEBUG [c.j.c.m.m.provider.SelectSqlProvider   ] - 0毫秒: SELECT a.code AS "code.code", a.id AS "id", a.plans AS "plans", a.attendance_system AS "attendanceSystem", a.salary_package AS "salaryPackage", a.fixed_ratio_amount AS "fixedRatioAmount", a.floating_ratio_amount AS "floatingRatioAmount", a.last_quarter_performance_amount AS "lastQuarterPerformanceAmount", a.traffic_allowance_amount AS "trafficAllowanceAmount", a.seniority_amount AS "seniorityAmount", a.monthly_salary_amount AS "monthlySalaryAmount", a.tax_type AS "taxType", a.cus_latest_payroll_company AS "cusLatestPayrollCompany", a.social_insuracnce_id AS "socialInsuracnceId", a.social_insuracnce_start_time AS "socialInsuracnceStartTime", a.social_insuracnce_end_time AS "socialInsuracnceEndTime", a.social_insuracnce_status AS "socialInsuracnceStatus", a.public_accumulation_funds_id AS "publicAccumulationFundsId", a.public_accumulation_funds_start_time AS "publicAccumulationFundsStartTime", a.public_accumulation_funds_end_time AS "publicAccumulationFundsEndTime", a.public_accumulation_funds_status AS "publicAccumulationFundsStatus", a.public_accumulation_funds_supplementary_id AS "publicAccumulationFundsSupplementaryId" FROM hr_dangan_salary_information a WHERE a.code = #{sqlMap.where#code#EQ1} ORDER BY a.id ASC
08-12 10:32:28.803 DEBUG [o.m.s.t.SpringManagedTransaction       ] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@5fd05611] will not be managed by Spring
08-12 10:32:28.825 DEBUG [c.j.c.m.m.provider.SelectSqlProvider   ] - 0毫秒: SELECT a.code AS "code.code", a.id AS "id", a.sequence_type AS "sequenceType", a.hire_date AS "hireDate", a.social_start_work_time AS "socialStartWorkTime", a.contract_type AS "contractType", a.contract_end_time AS "contractEndTime", a.trial_months AS "trialMonths", a.trial_end_time AS "trialEndTime", a.remarks AS "remarks" FROM hr_dangan_personnel_information a WHERE a.code = #{sqlMap.where#code#EQ1} ORDER BY a.id ASC
08-12 10:32:28.825 DEBUG [o.m.s.t.SpringManagedTransaction       ] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@5fd05611] will not be managed by Spring
08-12 10:32:28.856 DEBUG [c.j.m.sys.interceptor.LogInterceptor   ] - ViewName: hanzhigu/dangan/danganBaseForm <<< /js/a/dangan/danganBase/form >>> com.hanzhigu.dangan.web.DanganBaseController#form(DanganBase, Model)
08-12 10:32:28.866 INFO  [c.j.m.sys.interceptor.LogInterceptor   ] - 请求完成 URI: /js/a/dangan/danganBase/form, 用时: 194毫秒, 总内存: 1.312GB, 剩余: 1.008GB
08-12 10:32:28.886 DEBUG [c.j.c.m.m.provider.InsertSqlProvider   ] - 3毫秒: INSERT INTO js_sys_log (id, log_type, log_title, create_by, create_by_name, create_date, request_uri, request_method, request_params, biz_key, biz_type, remote_addr, server_addr, is_exception, exception_info, user_agent, device_name, browser_name, execute_time) VALUES (#{id}, #{logType}, #{logTitle}, #{createBy}, #{createByName}, #{createDate}, #{requestUri}, #{requestMethod}, #{requestParams}, #{bizKey}, #{bizType}, #{remoteAddr}, #{serverAddr}, #{isException}, #{exceptionInfo}, #{userAgent}, #{deviceName}, #{browserName}, #{executeTime})
08-12 10:32:28.887 DEBUG [o.m.s.t.SpringManagedTransaction       ] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@5fd05611] will be managed by Spring

前台页面没数据
![输入图片说明](https://foruda.gitee.com/images/1660271414274508490/屏幕截图.png "屏幕截图.png")
### 环境版本:

- JDK版本:1.8
- 浏览器版本:Chrome
- 平台版本:JeeSite 4.4.1

评论 (1)

迷人的小弟 创建了任务

上面问题内容看不完整,如果是代码的,请放入代码块,图片的不要放入代码块。Markdown的代码块为 ``` 符号开始和结束

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
6732 thinkgem 1651893329
Java
1
https://gitee.com/thinkgem/jeesite4.git
git@gitee.com:thinkgem/jeesite4.git
thinkgem
jeesite4
JeeSite 4.5 and 5.0

搜索帮助