优化表结构

This commit is contained in:
季圣华
2020-07-21 01:36:26 +08:00
parent 1393244160
commit 70f0dae473
104 changed files with 5005 additions and 9006 deletions

View File

@@ -115,7 +115,7 @@
<input name="parentName" id="parentName" class="easyui-textbox" style="width: 180px;" readonly="readonly"/>
<a href="javascript:void(0)" class="l-btn l-btn-plain" group="" id="lookForMaterialCategory">
<span class="l-btn-left"><span class="l-btn-text icon-search l-btn-icon-left" style="height: 20px;"></span></span></a>
<input name="parentid" id="parentid" type="hidden"/>
<input name="parentId" id="parentId" type="hidden"/>
</td>
<td style="text-align: left;"></td>
</tr>
@@ -362,7 +362,7 @@
var thisRows = res.data.page.rows; //属性列表
for (var i = 0; i < thisRows.length; i++) {
if (thisRows[i].enabled) {
mPropertyListShort += thisRows[i].nativename + ",";
mPropertyListShort += thisRows[i].nativeName + ",";
}
}
if (mPropertyListShort) {
@@ -906,9 +906,9 @@
//表格模板变更
$(".tb-other-info").html("");
for (var i = 0; i < mPropertyList.length; i++) {
if (mPropertyList[i].nativename === "制造商") {
if (mPropertyList[i].nativeName === "制造商") {
$(".tb-other-info").append(trMfrs);
$(".tr-mfrs td").first().text(mPropertyList[i].anothername);
$(".tr-mfrs td").first().text(mPropertyList[i].anotherName);
if (mPropertyList[i].enabled) {
$(".tr-mfrs").show();
}
@@ -916,9 +916,9 @@
$(".tr-mfrs").hide();
}
}
if (mPropertyList[i].nativename === "自定义1") {
if (mPropertyList[i].nativeName === "自定义1") {
$(".tb-other-info").append(trOtherField1);
$(".tr-otherField1 td").first().text(mPropertyList[i].anothername);
$(".tr-otherField1 td").first().text(mPropertyList[i].anotherName);
if (mPropertyList[i].enabled) {
$(".tr-otherField1").show();
}
@@ -926,9 +926,9 @@
$(".tr-otherField1").hide();
}
}
if (mPropertyList[i].nativename === "自定义2") {
if (mPropertyList[i].nativeName === "自定义2") {
$(".tb-other-info").append(trOtherField2);
$(".tr-otherField2 td").first().text(mPropertyList[i].anothername);
$(".tr-otherField2 td").first().text(mPropertyList[i].anotherName);
if (mPropertyList[i].enabled) {
$(".tr-otherField2").show();
}
@@ -936,9 +936,9 @@
$(".tr-otherField2").hide();
}
}
if (mPropertyList[i].nativename === "自定义3") {
if (mPropertyList[i].nativeName === "自定义3") {
$(".tb-other-info").append(trOtherField3);
$(".tr-otherField3 td").first().text(mPropertyList[i].anothername);
$(".tr-otherField3 td").first().text(mPropertyList[i].anotherName);
if (mPropertyList[i].enabled) {
$(".tr-otherField3").show();
}
@@ -1156,7 +1156,7 @@
}
var objInfo = $("#materialFM").serializeObject();
objInfo.UnitId = $("#manyUnit").val();
objInfo.CategoryId =$("#parentid").val();
objInfo.CategoryId =$("#parentId").val();
//初始库存信息
var stockArr = [];
$("#initDepot input").each(function () {
@@ -1221,7 +1221,7 @@
$("#Name").focus().textbox("setValue", rowsdata.name);
$("#EnableSerialNumber").val(rowsdata.enableserialnumber=='1'?'1':'0');
//商品类别id
$("#parentid").val(rowsdata.categoryid);
$("#parentId").val(rowsdata.categoryid);
//商品类别名称
$("#parentName").textbox("setValue", rowsdata.categoryName);
mId = rowsdata.categoryid;
@@ -1397,7 +1397,7 @@
console.log(res.length);
if (res.length) {
for (var i = 0; i < res.length; i++) {
options += '<option value="' + res[i].id + '">' + res[i].uname + '</option>';
options += '<option value="' + res[i].id + '">' + res[i].name + '</option>';
}
$("#manyUnit").empty().append('<option value="">(空)</option>').append(options);
//下拉框事件

View File

@@ -111,7 +111,7 @@
//loadFilter: pagerFilter,
columns: [[
{field: 'id', width: 10, align: "center", hidden: true},
{title: '名称', field: 'nativename', width: 100},
{title: '名称', field: 'nativeName', width: 100},
{
title: '是否启用', field: 'enabled', width: 100, formatter: function (value, rec) {
if (rec.enabled) {
@@ -123,7 +123,7 @@
}
},
{title: '排序', field: 'sort', width: 100},
{title: '别名', field: 'anothername', width: 100},
{title: '别名', field: 'anotherName', width: 100},
{
title: '操作', field: 'op', align: "center", width: 80, formatter: function (value, rec, index) {
var str = '';
@@ -213,10 +213,10 @@
//编辑信息
function editMaterialProperty(index) {
var rowsdata = $("#tableData").datagrid("getRows")[index];
$("#nativeName").text(rowsdata.nativename);
$("#nativeName").text(rowsdata.nativeName);
$("#enabled").attr("checked", rowsdata.enabled == true ? true : false);
$("#sort").textbox("setValue", rowsdata.sort);
$("#anotherName").textbox("setValue", rowsdata.anothername);
$("#anotherName").textbox("setValue", rowsdata.anotherName);
$('#materialPropertyDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/>&nbsp;编辑商品属性');
$(".window-mask").css({width: webW, height: webH});
//焦点在名称输入框==定焦在输入文字后面

View File

@@ -36,13 +36,13 @@
<input name="parentName" id="parentName" class="easyui-textbox" style="width: 200px;" readonly="readonly"/>
<a href="javascript:void(0)" class="l-btn l-btn-plain" group="" id="lookForSelectMaterialCategory">
<span class="l-btn-left"><span class="l-btn-text icon-search l-btn-icon-left" style="height: 20px;"></span></span></a>
<input name="parentid" id="parentid" type="hidden"/>
<input name="parentId" id="parentId" type="hidden"/>
</td>
</tr>
<tr>
<td>名称</td>
<td style="padding:5px">
<input name="Name" id="Name" class="easyui-textbox"
<input name="name" id="name" class="easyui-textbox"
data-options="required:true,validType:'length[2,30]'" style="width: 200px;"/>
<input name="id" id="id" type="hidden"/>
</td>
@@ -145,9 +145,9 @@
$('#materialCategoryFM').form('clear');
$('#materialCategoryDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/>&nbsp;修改商品类别信息');
$(".window-mask").css({width: webW, height: webH});
$("#Name").textbox("setValue", res.data.name).focus();
$("#name").textbox("setValue", res.data.name).focus();
$("#parentName").textbox("setValue", res.data.parentName);
$("#parentid").val(res.data.parentId);
$("#parentId").val(res.data.parentId);
$("#serialNo").textbox("setValue", res.data.serialNo);
$("#sort").textbox("setValue", res.data.sort);
$("#remark").textbox("setValue", res.data.remark);
@@ -250,7 +250,7 @@
//保存信息
$("#saveMaterialCategory").off("click").on("click", function () {
if (!$("#Name").val()) {
if (!$("#name").val()) {
$.messager.alert('提示', '商品类别名称不能为空!', 'warning');
return;
}

View File

@@ -56,12 +56,12 @@
initMCData(node.id);
} else if(clickType == "editBtn") {
$("#parentName").textbox("setValue", node.text);
$("#parentid").val(node.id);
$("#parentId").val(node.id);
}
}
else {
$("#parentName").textbox("setValue", node.text);
$("#parentid").val(node.id);
$("#parentId").val(node.id);
}
$('#forSelectMaterialCategoryDlg').dialog('close');
}