解决商品和日志的bug

This commit is contained in:
季圣华
2020-08-07 00:08:49 +08:00
parent 5eed8a6845
commit 5635cb35ef
2 changed files with 23 additions and 35 deletions

View File

@@ -424,7 +424,7 @@
} }
} }
}, },
{title: '安全存量', field: 'safetystock', width: 70}, {title: '安全存量', field: 'safetyStock', width: 70},
{ {
title: '库存', field: 'stock', width: 70, formatter: function (value, rec) { title: '库存', field: 'stock', width: 70, formatter: function (value, rec) {
var str = ''; var str = '';
@@ -442,7 +442,7 @@
} }
}, },
{ {
title: '序列号', field: 'enableserialnumber', width: 70, align: "center", formatter: function (value) { title: '序列号', field: 'enableSerialNumber', width: 70, align: "center", formatter: function (value) {
return value=='1' ? "<span style='color:green'></span>" : ""; return value=='1' ? "<span style='color:green'></span>" : "";
} }
} }
@@ -1219,42 +1219,29 @@
var rowsdata = $("#tableData").datagrid("getRows")[index]; var rowsdata = $("#tableData").datagrid("getRows")[index];
bindMProperty(); //根据商品属性绑定 bindMProperty(); //根据商品属性绑定
$("#Name").focus().textbox("setValue", rowsdata.name); $("#Name").focus().textbox("setValue", rowsdata.name);
$("#EnableSerialNumber").val(rowsdata.enableserialnumber=='1'?'1':'0'); $("#EnableSerialNumber").val(rowsdata.enableSerialNumber=='1'?'1':'0');
//商品类别id //商品类别id
$("#parentId").val(rowsdata.categoryid); $("#parentId").val(rowsdata.categoryId);
//商品类别名称 //商品类别名称
$("#parentName").textbox("setValue", rowsdata.categoryName); $("#parentName").textbox("setValue", rowsdata.categoryName);
mId = rowsdata.categoryid; mId = rowsdata.categoryId;
mName = rowsdata.categoryName; mName = rowsdata.categoryName;
$("#SafetyStock").textbox("setValue", rowsdata.safetystock); $("#SafetyStock").textbox("setValue", rowsdata.safetyStock);
$("#Model").textbox("setValue", rowsdata.model); $("#Model").textbox("setValue", rowsdata.model);
$("#Standard").val(rowsdata.standard); $("#Standard").val(rowsdata.standard);
$("#Color").val(rowsdata.color); $("#Color").val(rowsdata.color);
$("#Mfrs").val(rowsdata.mfrs); $("#Mfrs").val(rowsdata.mfrs);
$("#OtherField1").val(rowsdata.otherfield1); $("#OtherField1").val(rowsdata.otherField1);
$("#OtherField2").val(rowsdata.otherfield2); $("#OtherField2").val(rowsdata.otherField2);
$("#OtherField3").val(rowsdata.otherfield3); $("#OtherField3").val(rowsdata.otherField3);
$("#Unit").val(rowsdata.unit); $("#Unit").val(rowsdata.unit);
$("#Remark").textbox("setValue", rowsdata.remark); $("#Remark").textbox("setValue", rowsdata.remark);
$("#manyUnit").val(rowsdata.unitid); $("#manyUnit").val(rowsdata.unitId);
if (rowsdata.unitid) { if (rowsdata.unitId) {
$("#manyUnitCheck").prop("checked", true); $("#manyUnitCheck").prop("checked", true);
//当前为选中状态 //当前为选中状态
$("#Unit").hide(); $("#Unit").hide();
$("#manyUnit").show(); $("#manyUnit").show();
var selectItem = $("#manyUnit").children('option:selected').text();
if (selectItem !== "()") {
var firstOutUnitOptions = selectItem.substring(0, selectItem.indexOf("("));
var firstOptions = "";
var arr = firstOutUnitOptions.split(",");
var basic = '<option value="' + arr[0] + '">' + arr[0] + '</option>';
var other = '<option value="' + arr[1] + '">' + arr[1] + '</option>';
firstOptions = firstOptions + basic + other;
$("#FirstOutUnit").empty().append('<option value="">(空)</option>').append(firstOptions); //首选销售单位
$("#FirstInUnit").empty().append('<option value="">(空)</option>').append(firstOptions); //首选采购单位
$("#FirstOutUnit").val(rowsdata.firstoutunit);//首选销售单位
$("#FirstInUnit").val(rowsdata.firstinunit);//首选采购单位
}
} }
else { else {
$("#manyUnitCheck").prop("checked", false); $("#manyUnitCheck").prop("checked", false);
@@ -1268,11 +1255,11 @@
oldColor = rowsdata.color; oldColor = rowsdata.color;
oldStandard = rowsdata.standard; oldStandard = rowsdata.standard;
oldMfrs = rowsdata.mfrs; oldMfrs = rowsdata.mfrs;
oldOtherField1 = rowsdata.otherfield1; oldOtherField1 = rowsdata.otherField1;
oldOtherField2 = rowsdata.otherfield2; oldOtherField2 = rowsdata.otherField2;
oldOtherField3 = rowsdata.otherfield3; oldOtherField3 = rowsdata.otherField3;
oldUnit = rowsdata.unit; oldUnit = rowsdata.unit;
oldManyUnit = rowsdata.unitid; oldManyUnit = rowsdata.unitId;
$('#materialDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/>&nbsp;编辑商品信息'); $('#materialDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/>&nbsp;编辑商品信息');
$(".window-mask").css({width: webW, height: webH}); $(".window-mask").css({width: webW, height: webH});
materialID = rowsdata.id; materialID = rowsdata.id;

View File

@@ -38,20 +38,21 @@
</select> </select>
<select id="countsByLog" resultType="java.lang.Long"> <select id="countsByLog" resultType="java.lang.Long">
SELECT SELECT
COUNT(id) COUNT(1)
FROM jsh_log FROM jsh_log l
left join jsh_user u on l.user_id = u.id and ifnull(u.status,'0') not in('1','2')
WHERE 1=1 WHERE 1=1
<if test="operation != null"> <if test="operation != null">
and operation like '%${operation}%' and l.operation like '%${operation}%'
</if> </if>
<if test="userId != null"> <if test="userId != null">
and user_id=${userId} and l.user_id=${userId}
</if> </if>
<if test="clientIp != null"> <if test="clientIp != null">
and client_ip like '%${clientIp}%' and l.client_ip like '%${clientIp}%'
</if> </if>
<if test="status != null"> <if test="status != null">
and status = ${status} and l.status = ${status}
</if> </if>
<if test="beginTime != null"> <if test="beginTime != null">
and l.create_time &gt;= '${beginTime}' and l.create_time &gt;= '${beginTime}'
@@ -60,7 +61,7 @@
and l.create_time &lt;= '${endTime}' and l.create_time &lt;= '${endTime}'
</if> </if>
<if test="content != null"> <if test="content != null">
and content like '%${content}%' and l.content like '%${content}%'
</if> </if>
</select> </select>
</mapper> </mapper>