3.8K Star 15.2K Fork 5K

卓源软件 / JeeSite 4.4 and 5.0

 / 详情

调用的js.template中的时间控件失效 star

Backlog
Opened this issue  
2022-07-14 12:57

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

  1. 调用的js.template中的时间控件失效

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

$('#btnInventory').click(function () {
		js.layer.open({
			type: 1,
			area: ['400px'],
			title: "盘点",
			resize: false,
			scrollbar: true,
			content: js.template('inventory'),
			success: function (layero, index) {
				laydate.render({elem:'#inventoryMonth',type:'month',format:'yyyy-MM'});
			},
			btn: ['<i class="fa fa-check"></i> ${text("确定")}', '<i class="fa fa-remove"></i> ${text("关闭")}'],
			btn1: function (index, layero) {
				const params = {
					date: layero.find('#inventoryMonth').val()
				}
				js.ajaxSubmit({
					url: "${ctx}/wms/wmsRecordInventory/inventory",
					data: JSON.stringify(params),
					dataType: "json",
					contentType: "application/json",
					callback: function (data) {
						js.showMessage(data.message);
						if (data.result === Global.TRUE) {
							js.layer.closeAll();
						}
						page();
					}
				});
			}
		});
<script id="inventory" type="text/template">//<!--
<div style="margin: 0 30px">
	<div class="form-group">
		<label class="control-label">${text('日期')}:</label>
		<div class="control-inline">
				<#form:input id="inventoryMonth" path="inventoryMonth" dataFormat="month" class="form-control laydate" data-type="month" data-format="yyyy-MM"/>
		</div>
	</div>
</div>
//--></script>

实际结果、报错信息、截图

时间控件失效, 选择后未出现时间选择

![时间控件失效](https://images.gitee.com/uploads/images/2022/0714/130138_1103f441_5468554.png "在这里输入图片标题")

环境版本:

  • JDK版本:1.8
  • 浏览器版本:Chrome 102.0.5005.63(正式版本)
  • 平台版本:JeeSite 4.4.1

Comments (1)

lidongqi created任务
lidongqi changed description
lidongqi changed description
lidongqi changed description
Expand operation logs

看 demoFormLaydate.html 文件的例子

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(2)
6732 thinkgem 1651893329
Java
1
https://gitee.com/thinkgem/jeesite4.git
git@gitee.com:thinkgem/jeesite4.git
thinkgem
jeesite4
JeeSite 4.4 and 5.0

Search