提交 b21c9a2e 编写于 作者: Skyeye云's avatar Skyeye云

feat: 表格组件修改

上级 876533e9
......@@ -42,6 +42,7 @@ layui.config({
var showType = [
{id: "input", name: "输入框"},
{id: "textarea", name: "文本框"},
{id: "chooseInput", name: "选择输入框"},
{id: "select", name: "下拉框"},
{id: "detail", name: "文本"}
......
......@@ -13,7 +13,8 @@ layui.config({
var materialId = getNotUndefinedVal(GetUrlParam("materialId"));
var normsId = getNotUndefinedVal(GetUrlParam("normsId"));
var depotId = getNotUndefinedVal(GetUrlParam("depotId"));
var objectId = getNotUndefinedVal(GetUrlParam("objectId"));
var fromObjectId = getNotUndefinedVal(GetUrlParam("fromObjectId"));
var toObjectId = getNotUndefinedVal(GetUrlParam("toObjectId"));
// 产品规格明细列表
table.render({
......@@ -109,7 +110,8 @@ layui.config({
materialId: materialId,
normsId: normsId,
depotId: depotId,
objectId: objectId
fromObjectId: fromObjectId,
toObjectId: toObjectId
}
return $.extend(true, params, initTableSearchUtil.getSearchValue("messageTable"));
}
......
......@@ -113,9 +113,11 @@ var initTableChooseUtil = {
var verify = isNull(item.verify) ? "" : item.verify;
if (item.formType == 'input') {
tbodyStr += '<td><input type="text" class="layui-input ' + className + '" value="' + value + '" id="' + tdId + '" win-verify="' + verify + '"/></td>';
} else if (item.formType == 'textarea') {
tbodyStr += '<td><textarea style="height: 100px;" class="layui-textarea ' + className + '" value="' + value + '" id="' + tdId + '" win-verify="' + verify + '"></textarea></td>';
} else if (item.formType == 'chooseInput') {
tbodyStr += '<td><input type="text" class="layui-input ' + className + '" value="' + value + '" id="' + tdId + '" win-verify="' + verify + '" readonly="readonly"/>' +
'<i class="fa fa-plus-circle input-icon ' + item.iconClassName + '" style="top: 12px;"></i></td>';
'<i class="fa fa-plus-circle input-icon add-icon ' + item.iconClassName + '"></i></td>';
} else if (item.formType == 'select') {
var modelHtml = isNull(item.modelHtml) ? "" : item.modelHtml;
tbodyStr += '<td><select id="' + tdId + '" lay-filter="' + item.layFilter + '" lay-search win-verify="' + verify + '" class="' + className + '">' + modelHtml + '</select></td>';
......@@ -195,6 +197,8 @@ var initTableChooseUtil = {
var value = "";
if (bean.formType == 'input') {
value = $("#" + tdId).val();
} if (bean.formType == 'textarea') {
value = $("#" + tdId).val();
} else if (bean.formType == 'select') {
value = $("#" + tdId).val();
} else if (bean.formType == 'detail') {
......@@ -286,6 +290,8 @@ var initTableChooseUtil = {
var formType = bean.formType;
if (formType == 'input') {
$("#" + tdId).val(value);
} else if (formType == 'textarea') {
$("#" + tdId).val(value);
} else if (formType == 'chooseInput') {
$("#" + tdId).attr(initTableChooseUtil.chooseInputDataIdKey, value);
var key = dsFormUtil.getKeyIdToMation(bean.id);
......
......@@ -232,4 +232,12 @@ select option {
.margin-top-10 {
margin-top: 10px
}
.add-icon {
height: calc(100% - 16px) !important;
display: flex !important;
flex-direction: column;
justify-content: center;
align-items: center;
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册