优化表结构

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

@@ -124,13 +124,13 @@
columns: [[
{field: 'id', width: 35, align: "center", checkbox: true},
{title: '名称', field: 'name', width: 100},
{title: '编号', field: 'serialno', width: 150, align: "center"},
{title: '期初金额', field: 'initialamount', width: 100, align: "center"},
{title: '当前余额', field: 'currentamount', width: 100, align: "center"},
{title: '编号', field: 'serialNo', width: 150, align: "center"},
{title: '期初金额', field: 'initialAmount', width: 100, align: "center"},
{title: '当前余额', field: 'currentAmount', width: 100, align: "center"},
{
title: '是否默认', field: 'isdefault', width: 100, align: "center",
title: '是否默认', field: 'isDefault', width: 100, align: "center",
formatter: function (value, rec) {
if (rec.isdefault) {
if (rec.isDefault) {
return "<span style='color:green'></span>";
}
else {
@@ -456,17 +456,14 @@
//编辑结算账户
function editAccount(index) {
var rowsdata = $("#tableData").datagrid("getRows")[index];
var row = {
name: rowsdata.name,
serialNo: rowsdata.serialno,
initialAmount: rowsdata.initialamount,
currentAmount: rowsdata.currentamount,
remark: rowsdata.remark
};
$("#name").textbox("setValue", rowsdata.name);
$("#serialNo").textbox("setValue", rowsdata.serialNo);
$("#initialAmount").textbox("setValue", rowsdata.initialAmount);
$("#currentAmount").textbox("setValue", rowsdata.currentAmount);
$("#remark").textbox("setValue", rowsdata.remark);
oldAccount = rowsdata.name;
$('#accountDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/>&nbsp;编辑结算账户');
$(".window-mask").css({width: webW, height: webH});
$('#accountFM').form('load', row);
accountID = rowsdata.id;
url = '/account/update?id=' + rowsdata.id;
}
@@ -558,7 +555,7 @@
function showAccountInOutList(index) {
var rowsdata = $("#tableData").datagrid("getRows")[index];
var accountId = rowsdata.id;
var initialAmount = rowsdata.initialamount;
var initialAmount = rowsdata.initialAmount;
$('#accountDetailListDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/>&nbsp;查看账户流水');
$(".window-mask").css({width: webW, height: webH});
initAccountDetailData(accountId);

View File

@@ -172,10 +172,10 @@
},
{title: '仓库名称', field: 'name', width: 200},
{title: '仓库地址', field: 'address', width: 200},
{title: '仓储费', field: 'warehousing', width: 60},
{title: '搬运费', field: 'truckage', width: 60},
{title: '负责人', field: 'principalName', width: 60},
{title: '排序', field: 'sort', width: 60},
{title: '仓储费', field: 'warehousing', width: 100},
{title: '搬运费', field: 'truckage', width: 100},
{title: '负责人', field: 'principalName', width: 100},
{title: '排序', field: 'sort', width: 80},
{
title: '是否默认', field: 'isDefault', width: 100, align: "center",
formatter: function (value, rec) {

View File

@@ -153,7 +153,7 @@
{field: 'id', width: 35, align: "center", checkbox: true},
{title: '编号 ', field: 'number', width: 80},
{title: '名称', field: 'name', width: 100},
{title: '上级编号', field: 'pnumber', width: 80},
{title: '上级编号', field: 'parentNumber', width: 80},
{title: '链接', field: 'url', width: 250},
{title: '排序', field: 'sort', width: 60},
{
@@ -257,7 +257,7 @@
if (r) {
$.ajax({
type: "post",
url: "/functions/batchDeleteFunctionsByIds",
url: "/function/batchDeleteFunctionsByIds",
dataType: "json",
data: ({
ids: functionsID
@@ -299,7 +299,7 @@
}
$.ajax({
type: "post",
url: "/functions/batchDeleteFunctionsByIds",
url: "/function/batchDeleteFunctionsByIds",
dataType: "json",
async: false,
data: ({
@@ -339,7 +339,7 @@
iconBtnFun();
oldFunctions = "";
functionsID = 0;
url = '/functions/add';
url = '/function/add';
}
//保存信息
@@ -380,7 +380,7 @@
var rowsdata = $("#tableData").datagrid("getRows")[index];
$("#Number").textbox("setValue", rowsdata.number);
$("#Name").focus().textbox("setValue", rowsdata.name);
$("#PNumber").textbox("setValue", rowsdata.pnumber);
$("#PNumber").textbox("setValue", rowsdata.parentNumber);
$("#URL").textbox("setValue", rowsdata.url);
$("#State").attr("checked", rowsdata.state);
$("#Sort").textbox("setValue", rowsdata.sort);
@@ -389,8 +389,8 @@
$("#Type").textbox("setValue", rowsdata.type);
//点击icon图标弹出页面
iconBtnFun();
if (rowsdata.pushbtn) {
var arr = rowsdata.pushbtn.split(",");
if (rowsdata.pushBtn) {
var arr = rowsdata.pushBtn.split(",");
var pushBtnArray = [];
for (var i = 0; i < arr.length; i++) {
if (arr[i]) {
@@ -411,7 +411,7 @@
functionsID = rowsdata.id;
//焦点在名称输入框==定焦在输入文字后面
$("#Name").val("").focus().val(rowsdata.name);
url = '/functions/update?id=' + rowsdata.id;
url = '/function/update?id=' + rowsdata.id;
}
//点击icon图标弹出页面
@@ -432,7 +432,7 @@
if (name.length > 0 && (oldFunctions.length == 0 || name != oldFunctions)) {
$.ajax({
type: "get",
url: "/functions/checkIsNameExist",
url: "/function/checkIsNameExist",
dataType: "json",
async: false,
data: ({
@@ -480,7 +480,7 @@
var type = $.trim($("#searchType").val());
$.ajax({
type: "get",
url: "/functions/list",
url: "/function/list",
dataType: "json",
data: ({
search: JSON.stringify({

View File

@@ -114,12 +114,12 @@
pageList: initPageNum,
columns: [[
{title: '操作模块', field: 'operation', width: 120},
{title: '操作详情', field: 'contentdetails', width: 350},
{title: '操作人员', field: 'username', width: 100, align: "center"},
{title: '操作详情', field: 'content', width: 350},
{title: '操作人员', field: 'userName', width: 100, align: "center"},
{title: '操作状态',field: 'status',width:80,align:"center",formatter:function(value){
return value? "失败":"成功";
}},
{title: '操作IP', field: 'clientip', width: 100, align: "center"},
{title: '操作IP', field: 'clientIp', width: 100, align: "center"},
{title: '操作时间', field: 'createTimeStr', width: 150, align: "center"}
]],
onLoadError: function () {
@@ -222,25 +222,25 @@
function showLogDetails(pageNo, pageSize) {
var operation = $.trim($("#searchOperation").val());
var usernameID = $.trim($("#searchUsernameID").val());
var userId = $.trim($("#searchUsernameID").val());
var clientIp = $.trim($("#searchIP").val());
var status = $.trim($("#searchStatus").val());
var beginTime = $.trim($("#searchBeginTime").datebox("getValue"));
var endTime = $.trim($("#searchEndTime").datebox("getValue"));
var contentdetails = $.trim($("#searchDesc").val());
var content = $.trim($("#searchDesc").val());
$.ajax({
type: "get",
url: "/log/list",
dataType: "json",
data: ({
search: JSON.stringify({
operation: operation,
usernameID: usernameID,
clientIp: clientIp,
status: status,
beginTime: beginTime,
endTime: endTime,
contentdetails: contentdetails
operation: operation,
userId: userId,
clientIp: clientIp,
status: status,
beginTime: beginTime,
endTime: endTime,
content: content
}),
currentPage: pageNo,
pageSize: pageSize

View File

@@ -64,7 +64,7 @@
$(function () {
$('#tt').tree({
url: '/functions/findRoleFunctions?UBType=' + type + '&UBKeyId=' + url_id,
url: '/function/findRoleFunction?UBType=' + type + '&UBKeyId=' + url_id,
animate: true,
checkbox: true
});

View File

@@ -145,7 +145,7 @@
var arr = getValue.split("][");
arr = arr.toString();
$.ajax({
url: "/functions/findByIds",
url: "/function/findByIds",
type: "get",
data: {
functionsIds: arr

View File

@@ -118,7 +118,7 @@
return str;
}
},
{title: '计量单位', field: 'uname', width: 200}
{title: '计量单位', field: 'name', width: 200}
]],
toolbar: [
{
@@ -356,7 +356,7 @@
dataType: "json",
data: ({
info: JSON.stringify({
uname: name,
name: name,
basicUnit: basicName,
otherUnit: otherName,
ratio: otherNum

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');
}

View File

@@ -88,14 +88,14 @@
pageList: initPageNum,
columns: [[
{title: '名称', field: 'name', width: 100},
{title: '编号', field: 'serialno', width: 150, align: "center"},
{title: '期初金额', field: 'initialamount', width: 100, align: "center"},
{title: '本月发生额', field: 'thismonthamount', width: 100, align: "center"},
{title: '当前余额', field: 'currentamount', width: 100, align: "center"},
{title: '编号', field: 'serialNo', width: 150, align: "center"},
{title: '期初金额', field: 'initialAmount', width: 100, align: "center"},
{title: '本月发生额', field: 'thisMonthAmount', width: 100, align: "center"},
{title: '当前余额', field: 'currentAmount', width: 100, align: "center"},
{
title: '操作', field: 'op', width: 100, align: "center", formatter: function (value, rec) {
var str = '';
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.serialno + 'AaBb' + rec.initialamount + 'AaBb' + rec.currentamount;
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.serialNo + 'AaBb' + rec.initialAmount + 'AaBb' + rec.currentAmount;
str += '<img src="/js/easyui/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountInOutList(\'' + rowInfo + '\');"/>&nbsp;<a onclick="showAccountInOutList(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">流水</a>&nbsp;&nbsp;';
return str;
}

View File

@@ -84,6 +84,8 @@
type: "get",
url: "/materialProperty/list",
dataType: "json",
//设置为同步
async: false,
data: ({
search: JSON.stringify({
name: ""
@@ -96,7 +98,7 @@
var thisRows = res.data.page.rows;
for (var i = 0; i < thisRows.length; i++) {
if (thisRows[i].enabled) {
mPropertyList += thisRows[i].nativename + ",";
mPropertyList += thisRows[i].nativeName + ",";
}
}
if (mPropertyList) {

View File

@@ -187,6 +187,8 @@
type: "get",
url: "/materialProperty/list",
dataType: "json",
//设置为同步
async: false,
data: ({
search: JSON.stringify({
name: ""
@@ -199,7 +201,7 @@
var thisRows = res.data.page.rows;
for (var i = 0; i < thisRows.length; i++) {
if (thisRows[i].enabled) {
mPropertyList += thisRows[i].nativename + ",";
mPropertyList += thisRows[i].nativeName + ",";
}
}
if (mPropertyList) {

View File

@@ -88,6 +88,8 @@
type: "get",
url: "/materialProperty/list",
dataType: "json",
//设置为同步
async: false,
data: ({
search: JSON.stringify({
name: ""
@@ -100,7 +102,7 @@
var thisRows = res.data.page.rows;
for (var i = 0; i < thisRows.length; i++) {
if (thisRows[i].enabled) {
mPropertyList += thisRows[i].nativename + ",";
mPropertyList += thisRows[i].nativeName + ",";
}
}
if (mPropertyList) {

View File

@@ -155,6 +155,8 @@
type: "get",
url: "/materialProperty/list",
dataType: "json",
//设置为同步
async: false,
data: ({
search: JSON.stringify({
name: ""
@@ -167,7 +169,7 @@
var thisRows = res.data.page.rows;
for (var i = 0; i < thisRows.length; i++) {
if (thisRows[i].enabled) {
mPropertyList += thisRows[i].nativename + ",";
mPropertyList += thisRows[i].nativeName + ",";
}
}
if (mPropertyList) {