diff --git a/erp_web/css/css.css b/erp_web/css/css.css
index 8e01aa8c..84f029a1 100644
--- a/erp_web/css/css.css
+++ b/erp_web/css/css.css
@@ -636,10 +636,10 @@ input.inputstyle:hover{
background:#EAF2FD;
z-index:90;
}
-#login_body{
+#login_body,#register_body{
background:#93bbe5 url(../images/bg_login.jpg) top center no-repeat;
}
-#login_main{
+#login_main,#register_main{
width:459px;
overflow:hidden;
margin:160px auto 0 auto;
@@ -649,7 +649,14 @@ input.inputstyle:hover{
height:263px;
overflow:hidden;
position:relative;
- background:url(../images/bg_loginmain.jpg) no-repeat;
+ background:url(../images/bg_login_main.jpg) no-repeat;
+}
+#register{
+ width:459px;
+ height:300px;
+ overflow:hidden;
+ position:relative;
+ background:url(../images/bg_register_main.jpg) no-repeat;
}
#login .login_btn{
float:left;
@@ -657,13 +664,13 @@ input.inputstyle:hover{
height:50px;
margin:160px auto 0 120px;
}
-#login .register_btn{
+#register .register_btn{
float:left;
width:230px;
height:50px;
- margin:218px auto 0 120px;
+ margin:228px auto 0px 120px;
}
-#login_signal{
+#login_signal,#register_signal{
position:absolute;
left: 63px;
top: 19px;
@@ -707,7 +714,7 @@ input.inputstyle:hover{
border:none;
font-family:Arial, Helvetica, sans-serif;
background:url(../images/bg_logininout.jpg) no-repeat;
- left: 118px;
+ left: 120px;
top: 84px;
}
#user_pwd{
@@ -719,7 +726,7 @@ input.inputstyle:hover{
border:none;
font-family:Arial, Helvetica, sans-serif;
background:url(../images/bg_logininout.jpg) no-repeat;
- left: 118px;
+ left: 120px;
top: 118px;
}
#user_pwd_repeat{
@@ -731,7 +738,7 @@ input.inputstyle:hover{
border:none;
font-family:Arial, Helvetica, sans-serif;
background:url(../images/bg_logininout.jpg) no-repeat;
- left: 118px;
+ left: 120px;
top: 152px;
}
#user_captcha{
@@ -743,7 +750,7 @@ input.inputstyle:hover{
border:none;
font-family:Arial, Helvetica, sans-serif;
background:url(../images/bg_logininout.jpg) no-repeat;
- left: 118px;
+ left: 120px;
top: 186px;
}
#imgCaptcha{
diff --git a/erp_web/images/bg_loginmain.jpg b/erp_web/images/bg_login_main.jpg
similarity index 100%
rename from erp_web/images/bg_loginmain.jpg
rename to erp_web/images/bg_login_main.jpg
diff --git a/erp_web/images/bg_register_main.jpg b/erp_web/images/bg_register_main.jpg
new file mode 100644
index 00000000..3dfaa729
Binary files /dev/null and b/erp_web/images/bg_register_main.jpg differ
diff --git a/erp_web/js/common/common.js b/erp_web/js/common/common.js
index bb3fdff5..3c65679c 100644
--- a/erp_web/js/common/common.js
+++ b/erp_web/js/common/common.js
@@ -275,4 +275,16 @@
}
}
return newArr;
+ }
+
+ /**
+ * 验证单据
+ * @param id
+ */
+ function validateForm(id) {
+ if(!$('#'+ id).form('validate')) {
+ return true;
+ } else {
+ return false;
+ }
}
\ No newline at end of file
diff --git a/erp_web/js/pages/manage/supplier.js b/erp_web/js/pages/manage/supplier.js
index 9ba584e5..8ef1b329 100644
--- a/erp_web/js/pages/manage/supplier.js
+++ b/erp_web/js/pages/manage/supplier.js
@@ -76,7 +76,7 @@
{ title: '预付款',field: 'advancein',width:70,align:"center"},
{ title: '期初应收',field: 'beginneedget',width:70,align:"center"},
{ title: '期初应付',field: 'beginneedpay',width:70,align:"center"},
- { title: '税率', field: 'taxrate',width:50,align:"center"},
+ { title: '税率(%)', field: 'taxrate',width:50,align:"center"},
{ title: '状态',field: 'enabled',width:70,align:"center",formatter:function(value){
return value? "启用":"禁用";
}}
@@ -457,6 +457,9 @@
});
//保存信息
$("#saveSupplier").off("click").on("click", function () {
+ if(validateForm("supplierFM")) {
+ return;
+ }
if (checkSupplierName()) {
return;
}
@@ -554,13 +557,15 @@
//编辑信息
function editSupplier(supplierTotalInfo) {
var supplierInfo = supplierTotalInfo.split("AaBb");
+ var beginNeedGet = supplierInfo[5];
+ var beginNeedPay = supplierInfo[6];
var row = {
supplier : supplierInfo[1],
contacts : supplierInfo[2].replace("undefined",""),
phonenum : supplierInfo[3].replace("undefined",""),
email : supplierInfo[4].replace("undefined",""),
- BeginNeedGet : supplierInfo[5],
- BeginNeedPay : supplierInfo[6],
+ BeginNeedGet : beginNeedGet == "0"? "":beginNeedGet,
+ BeginNeedPay : beginNeedPay == "0"? "":beginNeedPay,
AllNeedGet: "",
AllNeedPay: "",
description : supplierInfo[8].replace("undefined",""),
@@ -602,7 +607,7 @@
supType: supType
}),
success: function(res){
- if (res && res.code === 200 && res.data && res.data.rows && res.data.rows.getAllMoney) {
+ if (res && res.code === 200 && res.data && res.data.rows && res.data.rows.getAllMoney !== "") {
var moneyA = res.data.rows.getAllMoney.toFixed(2)-0;
$.ajax({
type:"get",
@@ -615,7 +620,7 @@
supType: supType
}),
success: function(res){
- if (res && res.code === 200 && res.data && res.data.rows && res.data.rows.getAllMoney) {
+ if (res && res.code === 200 && res.data && res.data.rows && res.data.rows.getAllMoney !== "") {
var moneyB = res.data.rows.getAllMoney.toFixed(2)-0;
var money = moneyA+moneyB;
var moneyBeginNeedGet = $("#BeginNeedGet").val()-0; //期初应收
diff --git a/erp_web/js/pages/materials/in_out.js b/erp_web/js/pages/materials/in_out.js
index 678b0741..4c14f6e1 100644
--- a/erp_web/js/pages/materials/in_out.js
+++ b/erp_web/js/pages/materials/in_out.js
@@ -1,4 +1,5 @@
//初始化界面
+ var defDepotId = null;
var kid = sessionStorage.getItem("userId");
var pageType = getUrlParam('t'); //获取页面类型传值
var depotList = null;
@@ -53,7 +54,7 @@
initMProperty(); //初始化商品属性
initTableData();
ininPager();
- initForm();
+ initForm();
bindEvent();//绑定操作事件
});
//根据单据名称获取类型
@@ -74,8 +75,8 @@
amountNum = "CGDD";
}
else if(listTitle === "采购入库列表"){
- listType = "入库";
- listSubType = "采购";
+ listType = "入库";
+ listSubType = "采购";
payTypeTitle = "付款";
organUrl = supUrl;
amountNum = "CGRK";
@@ -88,15 +89,15 @@
amountNum = "LSTH";
}
else if(listTitle === "销售退货列表"){
- listType = "入库";
- listSubType = "销售退货";
+ listType = "入库";
+ listSubType = "销售退货";
payTypeTitle = "付款";
organUrl = cusUrl;
amountNum = "XSTH";
}
else if(listTitle === "其它入库列表"){
- listType = "入库";
- listSubType = "其它";
+ listType = "入库";
+ listSubType = "其它";
payTypeTitle = "隐藏";
organUrl = supUrl;
amountNum = "QTRK";
@@ -116,29 +117,29 @@
amountNum = "XSDD";
}
else if(listTitle === "销售出库列表"){
- listType = "出库";
- listSubType = "销售";
+ listType = "出库";
+ listSubType = "销售";
payTypeTitle = "收款";
organUrl = cusUrl;
amountNum = "XSCK";
}
else if(listTitle === "采购退货列表"){
- listType = "出库";
+ listType = "出库";
listSubType = "采购退货";
payTypeTitle = "收款";
organUrl = supUrl;
amountNum = "CGTH";
}
else if(listTitle === "其它出库列表"){
- listType = "出库";
- listSubType = "其它";
+ listType = "出库";
+ listSubType = "其它";
payTypeTitle = "隐藏";
organUrl = cusUrl;
amountNum = "QTCK";
}
else if(listTitle === "调拨出库列表"){
- listType = "出库";
- listSubType = "调拨";
+ listType = "出库";
+ listSubType = "调拨";
payTypeTitle = "隐藏";
organUrl = supUrl;
amountNum = "DBCK";
@@ -178,12 +179,12 @@
userBusinessList = null;
}
}
- });
-
+ });
+
}
//初始化页面选项卡
function initSelectInfo_UB(){
-
+
if(userBusinessList !=null)
{
if(userBusinessList.length>0)
@@ -193,8 +194,8 @@
}
}
}
-
-
+
+
//初始化系统基础信息
function initSystemData_depot(){
$.ajax({
@@ -211,24 +212,27 @@
return;
}
}
- });
+ });
}
//初始化页面选项卡
function initSelectInfo_depot(){
var options = "";
-
+
if(depotList !=null)
{
options = "";
for(var i = 0 ;i < depotList.length;i++)
{
var depot = depotList[i];
-
+
if(userdepot!=null)
{
if(userdepot.indexOf("["+depot.id+"]")!=-1)
{
- options += '';
+ if(depot.isDefault){
+ defDepotId = depot.id;
+ }
+ options += '';
depotString = depotString + depot.id + ",";
}
}
@@ -238,16 +242,16 @@
}
depotString = depotString.substring(1, depotString.length-1);
$("#ProjectId").empty().append(options);
- $("#AllocationProjectId").empty().append(options);
+ $("#AllocationProjectId").empty().append(options);
$("#searchProjectId").empty().append('').append(options);
}
}
-
+
//初始化供应商、客户、散户信息
function initSupplier(){
$('#OrganId').combobox({
url: organUrl,
- valueField:'id',
+ valueField:'id',
textField:'supplier',
filter: function(q, row){
var opts = $(this).combobox('options');
@@ -297,7 +301,7 @@
});
}
}
- });
+ });
}
//初始化销售人员
@@ -364,7 +368,7 @@
}
});
}
-
+
//初始化系统基础信息
function initSystemData_person(){
$.ajax({
@@ -380,12 +384,12 @@
}
}
}
- });
+ });
}
//初始化页面选项卡
function initSelectInfo_person(){
var options1 = "";
-
+
if(personList !=null)
{
for(var i = 0 ;i < personList.length;i++)
@@ -398,7 +402,7 @@
if(person.type=="仓管员")
{
options1 += '';
- }
+ }
}
$("#HandsPersonId").empty().append(options1);
}
@@ -418,11 +422,11 @@
}
}
}
- });
+ });
}
//获取账户信息
function initSelectInfo_account(){
- var options = "";
+ var options = "";
if(accountList !=null){
options = "";
options += "";
@@ -432,11 +436,11 @@
if(account.isdefault) {
defaultAccountId = account.id; //给账户赋值默认id
}
- }
+ }
$("#AccountId").empty().append(options);
}
}
-
+
//防止表单提交重复
function initForm(){
$('#depotHeadFM').form({
@@ -445,7 +449,7 @@
}
});
}
-
+
//初始化表格数据
function initTableData(){
if(pageType === "skip") {
@@ -616,7 +620,7 @@
onLoadError:function() {
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
- }
+ }
});
}
@@ -1112,7 +1116,7 @@
iconCls:'icon-undo',
handler:function()
{
- reject(); //撤销
+ reject(); //撤销
}
}
],
@@ -1120,7 +1124,7 @@
{
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
- }
+ }
});
$.ajax({
type:"get",
@@ -1164,8 +1168,8 @@
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
}
});
- }
-
+ }
+
//初始化表格数据-商品列表-查看状态
function initTableData_material_show(TotalPrice){
var isShowAnotherDepot = true; //显示对方仓库,true为隐藏,false为显示
@@ -1221,7 +1225,7 @@
onLoadError:function() {
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return;
- }
+ }
});
$.ajax({
type:"get",
@@ -1256,28 +1260,28 @@
function ininPager(){
try
{
- var opts = $("#tableData").datagrid('options');
- var pager = $("#tableData").datagrid('getPager');
- pager.pagination({
+ var opts = $("#tableData").datagrid('options');
+ var pager = $("#tableData").datagrid('getPager');
+ pager.pagination({
onSelectPage:function(pageNum, pageSize)
- {
- opts.pageNumber = pageNum;
- opts.pageSize = pageSize;
+ {
+ opts.pageNumber = pageNum;
+ opts.pageSize = pageSize;
pager.pagination('refresh',
- {
- pageNumber:pageNum,
- pageSize:pageSize
- });
+ {
+ pageNumber:pageNum,
+ pageSize:pageSize
+ });
showDepotHeadDetails(pageNum,pageSize);
- }
- });
+ }
+ });
}
- catch (e)
+ catch (e)
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
}
}
-
+
//删除单据信息
function deleteDepotHead(depotHeadID, thisOrganId, totalPrice, status){
if(status == "1" || status == "2") {
@@ -1349,11 +1353,11 @@
//批量删除单据信息
function batDeleteDepotHead(){
- var row = $('#tableData').datagrid('getChecked');
+ var row = $('#tableData').datagrid('getChecked');
if(row.length == 0)
{
- $.messager.alert('删除提示','没有记录被选中!','info');
- return;
+ $.messager.alert('删除提示','没有记录被选中!','info');
+ return;
}
if(row.length > 0)
{
@@ -1575,14 +1579,24 @@
var addTitle = listTitle.replace("列表","信息");
$('#depotHeadDlg').dialog('open').dialog('setTitle','
增加' + addTitle);
$(".window-mask").css({ width: webW ,height: webH});
-
+
orgDepotHead = "";
depotHeadID = 0;
initTableData_material("add"); //商品列表
reject(); //撤销下、刷新商品列表
$("#addOrgan").off("click").on("click",function(){
$('#supplierDlg').dialog('open').dialog('setTitle','
增加供应商信息');
+ $('#supplierFM').form('clear');
});
+
+ $("#addMember").off("click").on("click",function(){
+ $('#supplierDlg').dialog('open').dialog('setTitle','
增加会员信息');
+ $('#supplierFM').form('clear');
+ });
+ $("#addCustomer").off("click").on("click",function(){
+ $('#supplierDlg').dialog('open').dialog('setTitle','
增加客户信息');
+ $('#supplierFM').form('clear');
+ });
url = '/depotHead/addDepotHeadAndDetail';
//零售单据修改收款时,自动计算找零
@@ -1627,7 +1641,7 @@
}
});
}
- }
+ }
//编辑信息
function editDepotHead(depotHeadTotalInfo, status){
@@ -1735,7 +1749,7 @@
var itemMoneyArr = depotHeadInfo[26].split(",");
$("#OtherMoney").attr("data-itemArr",JSON.stringify(itemArr)).attr("data-itemMoneyArr",JSON.stringify(itemMoneyArr)); //json数据存储
}
-
+
initTableData_material("edit",TotalPrice); //商品列表
reject(); //撤销下、刷新商品列表
if(pageType === "skip") {
@@ -1746,7 +1760,7 @@
url = '/depotHead/updateDepotHeadAndDetail?id=' + depotHeadInfo[0]; //更新接口
}
}
-
+
//查看信息
function showDepotHead(depotHeadTotalInfo){
var depotHeadInfo = depotHeadTotalInfo.split("AaBb");
@@ -1812,7 +1826,7 @@
var showTitle = listTitle.replace("列表","信息");
$('#depotHeadDlgShow').dialog('open').dialog('setTitle','
查看' + showTitle);
$(".window-mask").css({ width: webW ,height: webH});
-
+
depotHeadID = depotHeadInfo[0];
initTableData_material_show(TotalPrice); //商品列表-查看状态
@@ -1862,7 +1876,7 @@
}
}
}
-
+
//绑定操作事件
function bindEvent(){
showDepotHeadDetails(1,initPageSize); //初始化时自动查询
@@ -2569,7 +2583,13 @@
$("#otherMoneyTotalDlg").text($("#OtherMoney").val());
});
- if(listTitle === "采购入库列表" || listTitle === "其它入库列表" || listTitle === "采购订单列表"){
+ if(listTitle === "采购入库列表" || listTitle === "其它入库列表" || listTitle === "采购订单列表"|| listTitle === "零售出库列表"|| listTitle === "销售出库列表"|| listTitle === "销售订单列表"){
+ var supplierType = "供应商";
+ if(listTitle === "零售出库列表"){
+ supplierType = "会员";
+ }else if(listTitle === "销售出库列表" || listTitle === "销售订单列表"){
+ supplierType = "客户";
+ }
//检查单位名称是否存在 ++ 重名无法提示问题需要跟进
function checkSupplierName() {
var supplierName = $.trim($("#supplier").val());
@@ -2608,8 +2628,12 @@
}
return flag;
}
+
//保存供应商信息
$("#saveSupplier").off("click").on("click",function() {
+ if(validateForm("supplierFM")) {
+ return;
+ }
if(checkSupplierName()){
return;
}
@@ -2629,7 +2653,7 @@
}
var url = '/supplier/add';
var supObj = $("#supplierFM").serializeObject();
- supObj.type = "供应商";
+ supObj.type = supplierType;
supObj.enabled = 1;
$.ajax({
url: url,
@@ -2706,7 +2730,7 @@
}
});
}
-
+
//自动计算事件
function autoReckon() {
//延时绑定事件
@@ -2892,8 +2916,8 @@
}
},500);
}
-
- //结束编辑
+
+ //结束编辑
function endEditing() {
if (editIndex == undefined) { return true }
if ($('#materialData').datagrid('validateRow', editIndex)) {
@@ -2927,7 +2951,7 @@
//新增
function append(){
if (endEditing()) {
- $('#materialData').datagrid('appendRow', {});
+ $('#materialData').datagrid('appendRow', {DepotId:defDepotId});
editIndex = $('#materialData').datagrid('getRows').length - 1;
$('#materialData').datagrid('selectRow', editIndex).datagrid('beginEdit', editIndex);
autoReckon();
@@ -3000,7 +3024,7 @@
}
if (totalRowNum != "") {
var totalRowNum = totalRowNum.substring(0, totalRowNum.length - 1);
- $.messager.alert('提示',"第" + totalRowNum + "行数据填写不完整!",'info');
+ $.messager.alert('提示',"第" + totalRowNum + "行数据填写不完整!",'info');
return false;
}
return true;
@@ -3056,7 +3080,7 @@
}
}
});
-
+
if(depotHeadMax !=null) {
depotHeadMaxId=depotHeadMax;
}
diff --git a/erp_web/js/print/print_form.html b/erp_web/js/print/print_form.html
index a948c274..1caf5a61 100644
--- a/erp_web/js/print/print_form.html
+++ b/erp_web/js/print/print_form.html
@@ -20,6 +20,15 @@