Skip to content

Commit

Permalink
同步码云1230
Browse files Browse the repository at this point in the history
  • Loading branch information
jishenghua committed Dec 29, 2020
1 parent 119be2c commit a5c21bb
Show file tree
Hide file tree
Showing 124 changed files with 753 additions and 787 deletions.
10 changes: 4 additions & 6 deletions docs/jsh_erp.sql
Original file line number Diff line number Diff line change
Expand Up @@ -593,12 +593,10 @@ CREATE TABLE `jsh_material_property` (
-- ----------------------------
-- Records of jsh_material_property
-- ----------------------------
INSERT INTO `jsh_material_property` VALUES ('1', '规格', '', '02', '规格', '0');
INSERT INTO `jsh_material_property` VALUES ('2', '颜色', '', '01', '颜色', '0');
INSERT INTO `jsh_material_property` VALUES ('3', '制造商', '', '03', '制造商', '0');
INSERT INTO `jsh_material_property` VALUES ('4', '自定义1', '\0', '04', '自定义1', '0');
INSERT INTO `jsh_material_property` VALUES ('5', '自定义2', '\0', '05', '自定义2', '0');
INSERT INTO `jsh_material_property` VALUES ('6', '自定义3', '\0', '06', '自定义3', '0');
INSERT INTO `jsh_material_property` VALUES ('1', '制造商', '', '01', '制造商', '0');
INSERT INTO `jsh_material_property` VALUES ('2', '自定义1', '', '02', '自定义1', '0');
INSERT INTO `jsh_material_property` VALUES ('3', '自定义2', '', '03', '自定义2', '0');
INSERT INTO `jsh_material_property` VALUES ('4', '自定义3', '', '04', '自定义3', '0');

-- ----------------------------
-- Table structure for jsh_msg
Expand Down
2 changes: 1 addition & 1 deletion erp_web/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ <h3 class="box-title">销售统计</h3>
</div>
</div>
<footer class="main-footer m0">
<div class="pull-right hidden-xs">当前版本 V2.1</div>
<div class="pull-right hidden-xs">当前版本V2.3</div>
&copy; 2015-2030 华夏ERP - Powered By <a href="http://www.huaxiaerp.com/" target="_blank">官方网站</a>
</footer>
</div>
Expand Down
Binary file removed erp_web/images/004.jpg
Binary file not shown.
Binary file removed erp_web/images/admin.png
Binary file not shown.
Binary file removed erp_web/images/bg_actlist.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_actlistcon.gif
Binary file not shown.
Binary file removed erp_web/images/bg_actliston.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_btn.gif
Binary file not shown.
Binary file removed erp_web/images/bg_btnl.gif
Binary file not shown.
Binary file removed erp_web/images/bg_btnlon.gif
Binary file not shown.
Binary file removed erp_web/images/bg_btnon.gif
Binary file not shown.
Binary file removed erp_web/images/bg_btnr.gif
Binary file not shown.
Binary file removed erp_web/images/bg_btnron.gif
Binary file not shown.
Binary file removed erp_web/images/bg_cntnav.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_datath.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_foot.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_head.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_keycode.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_login.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_login_main.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_logininout.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_menulist.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_menuliston.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_menutop.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_positionl.gif
Binary file not shown.
Binary file removed erp_web/images/bg_positionm.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_positionr.jpg
Binary file not shown.
Binary file removed erp_web/images/bg_positionrbak.jpg
Diff not rendered.
Binary file removed erp_web/images/bg_positionrpos.jpg
Diff not rendered.
Binary file removed erp_web/images/bg_psplit.jpg
Diff not rendered.
Binary file removed erp_web/images/bg_register_main.jpg
Diff not rendered.
Binary file removed erp_web/images/blogging.png
Diff not rendered.
Binary file removed erp_web/images/btn_check.gif
Diff not rendered.
Binary file removed erp_web/images/btn_checkon.gif
Diff not rendered.
Binary file removed erp_web/images/btn_goto.gif
Diff not rendered.
Binary file removed erp_web/images/btn_gotoon.gif
Diff not rendered.
Binary file removed erp_web/images/btn_login.jpg
Diff not rendered.
Binary file removed erp_web/images/btn_loginon.jpg
Diff not rendered.
Binary file removed erp_web/images/butterfly.jpg
Diff not rendered.
Binary file removed erp_web/images/draw1.jpg
Diff not rendered.
Binary file removed erp_web/images/draw2.jpg
Diff not rendered.
Binary file removed erp_web/images/draw3.jpg
Diff not rendered.
Binary file removed erp_web/images/draw4.jpg
Diff not rendered.
Binary file removed erp_web/images/favicon.ico.bak
Binary file not shown.
Binary file removed erp_web/images/imac.png
Diff not rendered.
Binary file removed erp_web/images/login_tip.jpg
Diff not rendered.
Binary file removed erp_web/images/logo.jpg
Diff not rendered.
Binary file removed erp_web/images/preferences1.png
Diff not rendered.
Binary file added erp_web/images/progressBar_m.gif
Binary file removed erp_web/images/register_tip.jpg
Diff not rendered.
Binary file removed erp_web/images/suma_logo.png
Diff not rendered.
Binary file removed erp_web/images/sysetem_name.jpg
Diff not rendered.
Binary file removed erp_web/images/sysetem_name3.jpg
Diff not rendered.
Binary file removed erp_web/images/valid_code.jpg
Diff not rendered.
Binary file removed erp_web/images/windvane.png
Diff not rendered.
4 changes: 2 additions & 2 deletions erp_web/js/pages/bill/add_temp.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function bindSupplierEvent() {
success: function(res) {
if (res) {
$('#supplierDlg').dialog('close');
initSupplier(); //刷新供应商
inOutService.initSupplier(); //刷新供应商
}
}
});
Expand Down Expand Up @@ -319,7 +319,7 @@ function bindAccountEvent() {
success: function(res) {
if(res && res.code === 200) {
$('#accountDlg').dialog('close');
initSystemData_account(); //刷新账户
inOutService.initSystemData_account(); //刷新账户
}
},
//此处添加错误处理
Expand Down
4 changes: 2 additions & 2 deletions erp_web/js/pages/bill/bill_detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,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) {
Expand Down Expand Up @@ -307,7 +307,7 @@
$("#bill .back-amount-show").text(0);
}
}
if(listSubType === "销售出库" || listSubType === "销售退货"){
if(listSubType === "销售订单" || listSubType === "销售出库" || listSubType === "销售退货"){
var salesManInfo = data.salesMan;
if(salesManInfo){
var arr = salesManInfo.split(",");
Expand Down
110 changes: 74 additions & 36 deletions erp_web/js/pages/bill/in_out.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,22 +332,24 @@
return materialExtendId;
},
//优惠率、合计的统计方法
statisticsFun: function (body,UnitPrice,OperNumber,footer,taxRate) {
statisticsFun: function (body,UnitPrice,TaxUnitPrice,OperNumber,footer,taxRate) {
var TotalPrice = 0;
var taxLastMoneyTotal = 0;
//金额的合计
body.find("[field='AllPrice']").each(function(){
if($(this).find("input").val()!==""){
TotalPrice = TotalPrice + parseFloat($(this).find("input").val().toString());
if($(this).find("div").text()!==""){
TotalPrice = TotalPrice + parseFloat($(this).find("div").text().toString());
}
});
TotalPrice = TotalPrice + UnitPrice*OperNumber;
footer.find("[field='AllPrice']").find("div").text((TotalPrice).toFixed(2)); //金额的合计
//价税合计的总计
body.find("[field='TaxLastMoney']").each(function(){
if($(this).find("input").val()!==""){
taxLastMoneyTotal = taxLastMoneyTotal + (parseFloat($(this).find("input").val().toString())-0);
if($(this).find("div").text()!==""){
taxLastMoneyTotal = taxLastMoneyTotal + (parseFloat($(this).find("div").text().toString())-0);
}
});
taxLastMoneyTotal = taxLastMoneyTotal + (TaxUnitPrice*OperNumber);
footer.find("[field='TaxLastMoney']").find("div").text((taxLastMoneyTotal).toFixed(2)); //价税合计的页脚总计
var discount = $("#Discount").val(); //优惠率
var discountMoney = (taxLastMoneyTotal*discount/100).toFixed(2);
Expand Down Expand Up @@ -1092,7 +1094,7 @@
$(this).closest(".datagrid-cell").click(); //点击操作
var row = $('#materialData').datagrid('getChecked');
$('#materialData').datagrid('deleteRow', $('#materialData').datagrid("getRowIndex", row[0]));
self.statisticsFun(body,0,0,footer,0);
self.statisticsFun(body,0,0,0,footer,0);
});
//修改数量,自动计算金额和合计,另外计算含税单价、税额、价税合计
body.find("[field='OperNumber']").find(input).off("keyup").on("keyup",function(){
Expand All @@ -1103,9 +1105,10 @@
var OperNumber =$(this).val()-0; //数量
rowDom.find("[field='AllPrice']").find(input).val((UnitPrice*OperNumber).toFixed(2)); //金额
rowDom.find("[field='TaxUnitPrice']").find(input).val((UnitPrice*(1+taxRate/100)).toFixed(2)); //含税单价
var TaxUnitPrice = rowDom.find("[field='TaxUnitPrice']").find(input).val()-0; //含税单价
rowDom.find("[field='TaxMoney']").find(input).val((UnitPrice*OperNumber*(taxRate/100)).toFixed(2)); //税额
rowDom.find("[field='TaxLastMoney']").find(input).val((UnitPrice*OperNumber*(1+taxRate/100)).toFixed(2)); //价税合计
self.statisticsFun(body,UnitPrice,OperNumber,footer,taxRate);
self.statisticsFun(body,UnitPrice,TaxUnitPrice,OperNumber,footer,taxRate);
});
//修改单价,自动计算金额和合计
body.find("[field='UnitPrice']").find(input).off("keyup").on("keyup",function(){
Expand All @@ -1116,9 +1119,10 @@
var OperNumber = rowDom.find("[field='OperNumber']").find(input).val(); //数量
rowDom.find("[field='AllPrice']").find(input).val((UnitPrice*OperNumber).toFixed(2)); //金额
rowDom.find("[field='TaxUnitPrice']").find(input).val((UnitPrice*(1+taxRate/100)).toFixed(2)); //含税单价
var TaxUnitPrice = rowDom.find("[field='TaxUnitPrice']").find(input).val()-0; //含税单价
rowDom.find("[field='TaxMoney']").find(input).val((UnitPrice*OperNumber*(taxRate/100)).toFixed(2)); //税额
rowDom.find("[field='TaxLastMoney']").find(input).val((UnitPrice*OperNumber*(1+taxRate/100)).toFixed(2)); //价税合计
self.statisticsFun(body,UnitPrice,OperNumber,footer,taxRate);
self.statisticsFun(body,UnitPrice,TaxUnitPrice,OperNumber,footer,taxRate);
});
//修改含税单价,自动计算单价、金额、税额、价税合计和合计
body.find("[field='TaxUnitPrice']").find(input).off("keyup").on("keyup",function(){
Expand All @@ -1132,7 +1136,7 @@
rowDom.find("[field='AllPrice']").find(input).val((UnitPrice*OperNumber).toFixed(2)); //金额
rowDom.find("[field='TaxMoney']").find(input).val((UnitPrice*OperNumber*(taxRate/100)).toFixed(2)); //税额
rowDom.find("[field='TaxLastMoney']").find(input).val((UnitPrice*OperNumber*(1+taxRate/100)).toFixed(2)); //价税合计
self.statisticsFun(body,UnitPrice,OperNumber,footer,taxRate);
self.statisticsFun(body,UnitPrice,TaxUnitPrice,OperNumber,footer,taxRate);
});
//修改金额,自动计算单价、税额、价税合计和合计
body.find("[field='AllPrice']").find(input).off("keyup").on("keyup",function(){
Expand All @@ -1144,9 +1148,10 @@
var UnitPrice = (AllPrice/OperNumber).toFixed(2);
rowDom.find("[field='UnitPrice']").find(input).val(UnitPrice); //单价
rowDom.find("[field='TaxUnitPrice']").find(input).val((UnitPrice*(1+taxRate/100)).toFixed(2)); //含税单价
var TaxUnitPrice = rowDom.find("[field='TaxUnitPrice']").find(input).val()-0; //含税单价
rowDom.find("[field='TaxMoney']").find(input).val((UnitPrice*OperNumber*(taxRate/100)).toFixed(2)); //税额
rowDom.find("[field='TaxLastMoney']").find(input).val((UnitPrice*OperNumber*(1+taxRate/100)).toFixed(2)); //价税合计
self.statisticsFun(body,UnitPrice,OperNumber,footer,taxRate);
self.statisticsFun(body,UnitPrice,TaxUnitPrice,OperNumber,footer,taxRate);
});
//修改税率,自动计算含税单价、税额、价税合计和合计
body.find("[field='TaxRate']").find(input).off("keyup").on("keyup",function(){
Expand All @@ -1156,9 +1161,10 @@
var OperNumber = rowDom.find("[field='OperNumber']").find(input).val(); //数量
var UnitPrice = rowDom.find("[field='UnitPrice']").find(input).val(); //单价
rowDom.find("[field='TaxUnitPrice']").find(input).val((UnitPrice*(1+taxRate/100)).toFixed(2)); //含税单价
var TaxUnitPrice = rowDom.find("[field='TaxUnitPrice']").find(input).val()-0; //含税单价
rowDom.find("[field='TaxMoney']").find(input).val((UnitPrice*OperNumber*(taxRate/100)).toFixed(2)); //税额
rowDom.find("[field='TaxLastMoney']").find(input).val((UnitPrice*OperNumber*(1+taxRate/100)).toFixed(2)); //价税合计
self.statisticsFun(body,UnitPrice,OperNumber,footer,taxRate);
self.statisticsFun(body,UnitPrice,TaxUnitPrice,OperNumber,footer,taxRate);
});
//修改税额,自动计算税率、含税单价、价税合计和合计
body.find("[field='TaxMoney']").find(input).off("keyup").on("keyup",function(){
Expand All @@ -1170,9 +1176,10 @@
var OperNumber = rowDom.find("[field='OperNumber']").find(input).val(); //数量
var UnitPrice = rowDom.find("[field='UnitPrice']").find(input).val(); //单价
rowDom.find("[field='TaxUnitPrice']").find(input).val((UnitPrice*(1+taxRate/100)).toFixed(2)); //含税单价
var TaxUnitPrice = rowDom.find("[field='TaxUnitPrice']").find(input).val()-0; //含税单价
rowDom.find("[field='TaxRate']").find(input).val((taxRate).toFixed(2)); //税率
rowDom.find("[field='TaxLastMoney']").find(input).val((UnitPrice*OperNumber*(1+taxRate/100)).toFixed(2)); //价税合计
self.statisticsFun(body,UnitPrice,OperNumber,footer,taxRate);
self.statisticsFun(body,UnitPrice,TaxUnitPrice,OperNumber,footer,taxRate);
});
//修改价税合计,自动计算税率、含税单价、税额和合计
body.find("[field='TaxLastMoney']").find(input).off("keyup").on("keyup",function(){
Expand All @@ -1184,9 +1191,10 @@
var OperNumber = rowDom.find("[field='OperNumber']").find(input).val(); //数量
var UnitPrice = rowDom.find("[field='UnitPrice']").find(input).val(); //单价
rowDom.find("[field='TaxUnitPrice']").find(input).val((UnitPrice*(1+taxRate/100)).toFixed(2)); //含税单价
var TaxUnitPrice = rowDom.find("[field='TaxUnitPrice']").find(input).val()-0; //含税单价
rowDom.find("[field='TaxRate']").find(input).val((taxRate).toFixed(2)); //税率
rowDom.find("[field='TaxMoney']").find(input).val((UnitPrice*OperNumber*(taxRate/100)).toFixed(2)); //税额
self.statisticsFun(body,UnitPrice,OperNumber,footer,taxRate);
self.statisticsFun(body,UnitPrice,TaxUnitPrice,OperNumber,footer,taxRate);
});
setTimeout(function(){
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
Expand All @@ -1208,12 +1216,56 @@
}
},100);
},
//单行单列的点击事件
onClickCell: function(index, field) {
if (editIndex != index) {
if (inOutService.endEditing()) {
if(field != "op") {
$(this).datagrid('beginEdit', index);
var ed = $(this).datagrid('getEditor', {index: index, field: field});
if(ed){
$(ed.target).select();
}
editIndex = index;
inOutService.autoReckon();
}
} else {
$(this).datagrid('selectRow', editIndex);
}
}
},
//新增明细
append: function () {
$('#materialData').datagrid('appendRow', {DepotId:defDepotId});
editIndex = $('#materialData').datagrid('getRows').length - 1;
$('#materialData').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
this.autoReckon();
if (this.endEditing()) {
$('#materialData').datagrid('appendRow', {DepotId: defDepotId});
editIndex = $('#materialData').datagrid('getRows').length - 1;
$('#materialData').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
this.autoReckon();
}
},
//结束编辑
endEditing: function(){
if (editIndex == undefined) { return true }
if ($('#materialData').datagrid('validateRow', editIndex)) {
//仓库信息
var edDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'DepotId'});
if(edDepot) {
var DepotName = $(edDepot.target).combobox('getText');
$('#materialData').datagrid('getRows')[editIndex]['DepotName'] = DepotName;
}
//调入仓库
var edAnotherDepot = $('#materialData').datagrid('getEditor', {index:editIndex,field:'AnotherDepotId'});
if(edAnotherDepot) {
var AnotherDepotName = $(edAnotherDepot.target).combobox('getText');
$('#materialData').datagrid('getRows')[editIndex]['AnotherDepotName'] = AnotherDepotName;
}
$('#materialData').datagrid('endEdit', editIndex);
this.autoReckon();
editIndex = undefined;
return true;
} else {
return false;
}
},
//新增仓库
appendDepot: function () {
Expand Down Expand Up @@ -1262,7 +1314,7 @@
}
var totalRowNum = "";
for (var i = 0; i < row.length; i++) {
if (row[i].DepotId == "" || row[i].barCode == "" || row[i].OperNumber == "" || row[i].UnitPrice === "" || row[i].AllPrice === "") {
if (row[i].barCode == "" || row[i].OperNumber == "" || row[i].UnitPrice === "" || row[i].AllPrice === "") {
totalRowNum += (i + 1) + "、";
}
}
Expand Down Expand Up @@ -1472,9 +1524,10 @@
currentRowDom.find("[field='AllPrice']").find(input).val(detailPrice);
var taxRate = currentRowDom.find("[field='TaxRate']").find(input).val()-0; //获取税率
currentRowDom.find("[field='TaxUnitPrice']").find(input).val((detailPrice*(1+taxRate/100)).toFixed(2)); //含税单价
var TaxUnitPrice = currentRowDom.find("[field='TaxUnitPrice']").find(input).val()-0; //含税单价
currentRowDom.find("[field='TaxMoney']").find(input).val((detailPrice*(taxRate/100)).toFixed(2)); //税额
currentRowDom.find("[field='TaxLastMoney']").find(input).val((detailPrice*(1+taxRate/100)).toFixed(2)); //价税合计
self.statisticsFun(body,detailPrice,1,footer,taxRate);
self.statisticsFun(body,detailPrice,TaxUnitPrice,1,footer,taxRate);

//查询库存信息
var depotId = currentRowDom.find("[field='DepotId']").find(".textbox-value").val();
Expand All @@ -1490,20 +1543,13 @@
});
}
},
//结束全部的编辑
endAllEdit: function(){
var rowLen = $("#materialData").datagrid('getRows').length;
for(var i=0; i<rowLen; i++){
$('#materialData').datagrid('endEdit', i);
}
},
//新增单据主表及单据子表
addDepotHeadAndDetail: function (url,infoStr) {
var self = this;
if(pageType=="skip") {
sessionStorage.removeItem("rowInfo");
}
this.endAllEdit();
this.endEditing();
var rows = $("#materialData").datagrid('getRows');
$.ajax({
type:"post",
Expand All @@ -1519,10 +1565,6 @@
if(tipInfo){
if(tipInfo.code!=200){
$.messager.alert('提示', tipInfo.msg, 'warning');
for(var i=0; i<rows.length; i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
self.autoReckon();
}
return;
}
$.messager.alert('提示','保存成功!','info');
Expand All @@ -1546,7 +1588,7 @@
//修改单据主表及单据子表
updateDepotHeadAndDetail: function (url,infoStr,preTotalPrice) {
var self = this;
this.endAllEdit();
this.endEditing();
var rows = $("#materialData").datagrid('getRows');
$.ajax({
type:"post",
Expand All @@ -1564,10 +1606,6 @@
if(tipInfo){
if(tipInfo.code!=200){
$.messager.alert('提示', tipInfo.msg, 'warning');
for(var i=0; i<rows.length; i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
self.autoReckon();
}
return;
}
$.messager.alert('提示','保存成功!','info');
Expand Down
2 changes: 1 addition & 1 deletion erp_web/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<div class="login-logo">
<a href="/">
<b>华夏ERP</b>
<small>V2.1</small>
<small>V2.3</small>
</a>
</div>
<div class="login-box-body">
Expand Down
12 changes: 5 additions & 7 deletions erp_web/pages/bill/allocation_out_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<div class="form-group">
<label class="control-label">商品信息:</label>
<div class="control-inline">
<input type="text" id="searchMaterial" name="searchMaterial" placeholder="名称,型号" maxlength="100" class="easyui-textbox width-90"/>
<input type="text" id="searchMaterial" name="searchMaterial" data-options="prompt:'名称、规格、型号'" maxlength="100" class="easyui-textbox width-120"/>
</div>
</div>
<div class="form-group">
Expand Down Expand Up @@ -585,6 +585,7 @@
}
}
],
onClickCell: inOutService.onClickCell,
onLoadError:function() {
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
Expand Down Expand Up @@ -618,15 +619,12 @@
});
data.footer = array;
$("#materialData").datagrid('loadData',data);
for(var i=0; i<data.rows.length; i++){
inOutService.autoReckon();
}
$("#depotHeadFM .datagrid-view2 .datagrid-footer").find("[field='op'] img").hide();
if(type === "add") {
$("#depotHeadDlg #append").click(); //新增行
} else if(type === "edit") {
editIndex = 0;
for(var i=0;i<data.rows.length;i++){
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
inOutService.autoReckon();
}
}
}
},
Expand Down
Loading

0 comments on commit a5c21bb

Please sign in to comment.