From 5adb65d2e6ca540e9453424a212d608e1f10da6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com>
Date: Wed, 6 Nov 2019 09:26:41 +0800
Subject: [PATCH 01/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9sh=E5=90=AF=E5=8A=A8?=
=?UTF-8?q?=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/main/bin/run-manage.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/bin/run-manage.sh b/src/main/bin/run-manage.sh
index 74d03305..bd97f784 100644
--- a/src/main/bin/run-manage.sh
+++ b/src/main/bin/run-manage.sh
@@ -1,4 +1,4 @@
-FILE_PATH=/home/jshERP2.0
+FILE_PATH=
SERVER_NAME=jshERP
readonly APP_HOME=${FILE_PATH:-$(dirname $(cd `dirname $0`; pwd))}
From 4f045219455f690956bbced723dee5f0460c872f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com>
Date: Wed, 6 Nov 2019 14:15:21 +0800
Subject: [PATCH 02/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0erp=E7=9A=84=E5=8D=9A?=
=?UTF-8?q?=E5=AE=A2=E9=93=BE=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
erp_web/login.html | 6 +++---
erp_web/register.html | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/erp_web/login.html b/erp_web/login.html
index 066aa758..be9c843a 100644
--- a/erp_web/login.html
+++ b/erp_web/login.html
@@ -72,10 +72,10 @@
From 4d613006a320009790a11a009b665e691ce6b065 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com>
Date: Thu, 7 Nov 2019 10:11:58 +0800
Subject: [PATCH 03/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=9F=E8=AE=A1?=
=?UTF-8?q?=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
erp_web/home.html | 1 +
erp_web/js/common/common.js | 9 +++++++++
erp_web/login.html | 1 +
3 files changed, 11 insertions(+)
diff --git a/erp_web/home.html b/erp_web/home.html
index d6429059..7d50512b 100644
--- a/erp_web/home.html
+++ b/erp_web/home.html
@@ -106,6 +106,7 @@
+
+
From 245cd9ddb7321782c1ad94c05bcd7432b02ee756 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com>
Date: Thu, 7 Nov 2019 14:11:22 +0800
Subject: [PATCH 04/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=AC=E5=85=B1js?=
=?UTF-8?q?=E7=9A=84bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
erp_web/js/common/common.js | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/erp_web/js/common/common.js b/erp_web/js/common/common.js
index 7c57f2fb..fb9f6ba6 100644
--- a/erp_web/js/common/common.js
+++ b/erp_web/js/common/common.js
@@ -57,10 +57,12 @@
}
function dgResize() {
var searchTabHeight = $('#searchTable').height();
- $('#tableData').datagrid('resize', {
- width: $(window).width() - 6,
- height: $(window).height() - searchTabHeight -46
- });
+ if($('#tableData').length) {
+ $('#tableData').datagrid('resize', {
+ width: $(window).width() - 6,
+ height: $(window).height() - searchTabHeight -46
+ });
+ }
}
$(window).resize(function () {
dgResize();
From 478db55c231f6940f69fd84c2b1dd9addfcca29f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com>
Date: Thu, 7 Nov 2019 15:05:25 +0800
Subject: [PATCH 05/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8F=8F=E8=BF=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 1a0e3aaa..ae60b9ae 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
* 欢迎加入华夏ERP交流QQ群,群1:120725710(满)、群2:732152262
* 系统的默认超管账户:admin,默认租户账号:jsh,默认密码均为:123456
* 部署如遇到困难请参考Wiki文档 **https://gitee.com/jishenghua/JSH_ERP/wikis/pages**
-* 官网地址:[http://www.huaxiaerp.com](http://www.huaxiaerp.com),测试账号:jsh,密码:123456,**(如需长期使用,欢迎注册)**
+* 官网地址:[http://www.huaxiaerp.com](https://www.huaxiaerp.com),测试账号:jsh,密码:123456,**(如需长期使用,欢迎注册)**
# 定制服务
* 如有ERP **私人定制** 需求,请将需求整理成文档,发给邮箱: **514869858@qq.com** ,我会及时回复哒
From d07c3040eada1323e22e9fa6dbe107feea449def Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com>
Date: Thu, 7 Nov 2019 16:25:20 +0800
Subject: [PATCH 06/10] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=A6=96=E9=A1=B5?=
=?UTF-8?q?=E7=9A=84=E5=8D=9A=E5=AE=A2=E9=93=BE=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
erp_web/home.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/erp_web/home.html b/erp_web/home.html
index 7d50512b..7bb66522 100644
--- a/erp_web/home.html
+++ b/erp_web/home.html
@@ -95,7 +95,7 @@
[ 立即注册 ]
From e07c3d17906e51cf06b2a136abe15a428262d94c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com>
Date: Fri, 8 Nov 2019 10:54:29 +0800
Subject: [PATCH 09/10] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8D=95=E6=8D=AEjs?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
erp_web/js/pages/materials/in_out.js | 426 ++++++++++++++-------------
1 file changed, 215 insertions(+), 211 deletions(-)
diff --git a/erp_web/js/pages/materials/in_out.js b/erp_web/js/pages/materials/in_out.js
index 175c9740..b9930922 100644
--- a/erp_web/js/pages/materials/in_out.js
+++ b/erp_web/js/pages/materials/in_out.js
@@ -667,7 +667,6 @@
//初始化表格数据-商品列表-编辑状态
function initTableData_material(type,TotalPrice){
var body,footer,input; //定义表格和文本框
- var ratio = 1; //比例-品名专用
var ratioDepot = 1; //比例-仓库用
var monthTime = getNowFormatMonth();
var isShowAnotherDepot = true; //显示对方仓库,true为隐藏,false为显示
@@ -760,216 +759,7 @@
param.mpList = mPropertyList; //商品属性
},
onSelect:function(rec){
- if(rec) {
- var mId = rec.Id;
- $.ajax({
- url: "/material/findById",
- type: "get",
- dataType: "json",
- data: {
- id: mId
- },
- success: function (res) {
- if(res && res.code === 200 && res.data && res.data[0]) {
- var retailPrice = res.data[0].retailprice-0; //零售价格
- var presetPriceOne = res.data[0].presetpriceone-0; //预计采购价
- var presetPriceTwo = res.data[0].presetpricetwo-0; //批发价
- var firstInUnit = res.data[0].firstinunit; //首选入库单位
- var firstOutUnit = res.data[0].firstoutunit; //首选出库单位
- var basicPresetPriceOne = ""; //多单位-入库-基础价格
- var basicPresetPriceTwo = ""; //多单位-出库-基础价格
- var retailPriceOne = ""; //多单位-入库-零售价格
- var otherPresetPriceOne = ""; //多单位-入库-其他价格
- var otherPresetPriceTwo = ""; //多单位-出库-其他价格
- var retailPriceTwo = ""; //多单位-出库-零售价格
- var basicUnit = ""; //基础单位
- var otherUnit = ""; //其他单位
- if(!res.data[0].unit){
- var ps = res.data[0].pricestrategy;
- var psObj = JSON.parse(ps);
- basicPresetPriceOne = psObj[0].basic.PresetPriceOne-0;
- basicPresetPriceTwo = psObj[0].basic.PresetPriceTwo-0;
- retailPriceOne = psObj[0].basic.RetailPrice-0;
- otherPresetPriceOne = psObj[1].other.PresetPriceOne-0;
- otherPresetPriceTwo = psObj[1].other.PresetPriceTwo-0;
- retailPriceTwo = psObj[1].other.RetailPrice-0;
- basicUnit = psObj[0].basic.Unit;
- otherUnit = psObj[1].other.Unit;
- }
- body =$("#depotHeadFM .datagrid-body");
- footer =$("#depotHeadFM .datagrid-footer");
- input = ".datagrid-editable-input";
- if(res.data[0].unit){ //如果存在计量单位信息
- ratio = 1; //重置比例为1
- body.find("[field='Unit']").find(input).val(res.data[0].unit); //设置-计量单位信息
- body.find("[field='Unit']").find(input).prop("readonly","readonly"); //设置计量单位为只读
- body.find("[field='Unit']").find(input).off("click"); //移除点击事件
- body.find("[field='Unit']").find(input).attr("data-ratio",ratio); //修改比例缓存信息
- }
- else {
- var unitName = res.data[0].unitName;
- if(unitName) {
- ratio = unitName.substring(unitName.indexOf(":")+1).replace(")",""); //给比例赋值
- unitName = unitName.substring(0, unitName.indexOf("("));
- }
- var unitArr = unitName.split(",");
- var basicUnit = unitArr[0]; //基础单位
- var otherUnit = unitArr[1]; //副单位
- var unitSetInput =""; //单位
- body.find("[field='Unit']").find(input).prop("readonly","readonly"); //设置计量单位为只读
- var loadRatio = 1; //在单位输入框上面加载比例字段
- if(listSubType === "采购" || listSubType === "采购退货" || listSubType === "采购订单"){
- unitSetInput = res.data[0].firstinunit; //给单位文本框赋值
- if(basicUnit==unitSetInput){ //基础单位等于选择的单位
- loadRatio = 1;
- }
- else if(otherUnit==unitSetInput){ //副单位等于选择的单位
- loadRatio = ratio;
- }
- }
- else if(listSubType === "销售" || listSubType === "销售退货" || listSubType === "销售订单" || listSubType === "零售" || listSubType === "零售退货"){
- unitSetInput = res.data[0].firstoutunit; //给单位文本框赋值
- if(basicUnit==unitSetInput){ //基础单位等于选择的单位
- loadRatio = 1;
- }
- else if(otherUnit==unitSetInput){ //副单位等于选择的单位
- loadRatio = ratio;
- }
- }
- body.find("[field='Unit']").find(input).val(unitSetInput).attr("data-ratio", loadRatio); //设置-首选单位
-
- body.find("[field='Unit']").find(input).off("click").on("click",function(){
- if(basicUnit && otherUnit) {
- var self = this;
- //定义模版
- var temp = "
";
- temp +="
";
- temp +="- " + basicUnit + "
";
- temp +="- " + otherUnit + "
";
- temp +="
";
- temp +="
";
- if($('.unit-list').length){
- $('.unit-list').remove(); //如果存在计量单位列表先移除
- }
- else {
- $(self).after(temp); //加载列表信息
- }
- //计量单位列表的单击事件
- $('.unit-list ul li').off("click").on("click",function(){
- var unit = $(this).text();
- var thisRatio = $(this).attr("data-ratio"); //获取比例
- $(self).val(unit).attr("data-ratio", thisRatio);
- $(self).keyup(); //模拟键盘操作
- $('.unit-list').remove(); //移除计量单位列表
- var stock = body.find("[field='Stock']").find(input).attr("data-stock"); //从缓存中取值
- var type = $(this).attr("data-type");
- var UnitPrice = 0;
- if(type === "basic"){
- if(listTitle == "采购订单列表" || listTitle == "采购入库列表" || listTitle == "销售退货列表" || listTitle == "其它入库列表") {
- UnitPrice = basicPresetPriceOne;
- }
- else if(listTitle == "销售订单列表" || listTitle == "销售出库列表" || listTitle == "采购退货列表" || listTitle == "其它出库列表" || listTitle == "调拨出库列表") {
- UnitPrice = basicPresetPriceTwo;
- }
- else if(listTitle == "零售出库列表" || listTitle == "零售退货列表"){
- UnitPrice = retailPriceOne;
- }
- body.find("[field='Stock']").find(input).val(stock); //修改库存
- }
- else if(type === "other"){
- if(listTitle == "采购订单列表" || listTitle == "采购入库列表" || listTitle == "销售退货列表" || listTitle == "其它入库列表") {
- UnitPrice = otherPresetPriceOne;
- }
- else if(listTitle == "销售订单列表" || listTitle == "销售出库列表" || listTitle == "采购退货列表" || listTitle == "其它出库列表" || listTitle == "调拨出库列表") {
- UnitPrice = otherPresetPriceTwo;
- }
- else if(listTitle == "零售出库列表" || listTitle == "零售退货列表"){
- UnitPrice = retailPriceTwo;
- }
- body.find("[field='Stock']").find(input).val((stock/ratio).toFixed(2)); //修改库存
- }
- body.find("[field='UnitPrice']").find(input).val(UnitPrice); //单价
- var OperNumber = body.find("[field='OperNumber']").find(input).val(); //获取数量
- var taxRate = body.find("[field='TaxRate']").find(input).val(); //获取税率
- body.find("[field='TaxUnitPrice']").find(input).val((UnitPrice*(1+taxRate/100)).toFixed(2)); //含税单价
- body.find("[field='AllPrice']").find(input).val((UnitPrice*OperNumber).toFixed(2)); //金额
- body.find("[field='TaxMoney']").find(input).val((UnitPrice*OperNumber*(taxRate/100)).toFixed(2)); //税额
- body.find("[field='TaxLastMoney']").find(input).val((UnitPrice*OperNumber*(1+taxRate/100)).toFixed(2)); //价税合计
- statisticsFun(body,UnitPrice,OperNumber,footer,taxRate);
- });
- //点击空白处移除计量单位列表
- $(".datagrid-body").off("click").on("click",function(){
- $('.unit-list').remove(); //移除计量单位列表
- });
- }
- });
- }
- var detailPrice = 0; //明细列表-单价
- if(listSubType == "零售" || listSubType == "零售退货") {
- if(res.data[0].unit) { //如果存在计量单位信息
- detailPrice = retailPrice;
- }
- else {
- if (firstOutUnit == basicUnit) {
- detailPrice = retailPriceOne;
- }
- else if (firstOutUnit == otherUnit) {
- detailPrice = retailPriceTwo;
- }
- }
- }
- else if(listTitle == "采购订单列表" || listTitle == "采购入库列表" || listTitle == "销售退货列表" || listTitle == "其它入库列表") {
- if(res.data[0].unit) { //如果存在计量单位信息
- detailPrice = presetPriceOne;
- }
- else {
- if (firstInUnit == basicUnit) {
- detailPrice = basicPresetPriceOne;
- }
- else if (firstInUnit == otherUnit) {
- detailPrice = otherPresetPriceOne;
- }
- }
- }
- else if(listTitle == "销售订单列表" || listTitle == "销售出库列表" || listTitle == "采购退货列表" || listTitle == "其它出库列表" || listTitle == "调拨出库列表") {
- if(res.data[0].unit) { //如果存在计量单位信息
- detailPrice = presetPriceTwo;
- }
- else {
- if(firstOutUnit==basicUnit) {
- detailPrice = basicPresetPriceTwo;
- }
- else if(firstOutUnit==otherUnit){
- detailPrice = otherPresetPriceTwo;
- }
- }
- }
- body.find("[field='OperNumber']").find(input).val(1); //数量初始化为1
- //单价和总价赋值
- if(!detailPrice) {
- detailPrice = 0;
- }
- body.find("[field='UnitPrice']").find(input).val(detailPrice);
- body.find("[field='AllPrice']").find(input).val(detailPrice);
- var taxRate = body.find("[field='TaxRate']").find(input).val()-0; //获取税率
- body.find("[field='TaxUnitPrice']").find(input).val((detailPrice*(1+taxRate/100)).toFixed(2)); //含税单价
- body.find("[field='TaxMoney']").find(input).val((detailPrice*(taxRate/100)).toFixed(2)); //税额
- body.find("[field='TaxLastMoney']").find(input).val((detailPrice*(1+taxRate/100)).toFixed(2)); //价税合计
- statisticsFun(body,detailPrice,1,footer,taxRate);
-
- //查询库存信息
- var depotId = body.find("[field='DepotId']").find(".combo-value").val();
- if(depotId) {
- var type = "select"; //type 类型:点击 click,选择 select
- findStockNumById(depotId, mId, monthTime, body, input, loadRatio, type);
- }
- }
- },
- error: function() {
- $.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
- }
- });
- }
+ materialSelect(rec);
}
}
}
@@ -1096,6 +886,220 @@
$.messager.alert('查询提示','查询数据后台异常,请稍后再试!','error');
}
});
+ function materialSelect(rec) {
+ var body,footer,input; //定义表格和文本框
+ var ratio = 1; //比例-品名专用
+ if(rec) {
+ var mId = rec.Id;
+ $.ajax({
+ url: "/material/findById",
+ type: "get",
+ dataType: "json",
+ data: {
+ id: mId
+ },
+ success: function (res) {
+ if(res && res.code === 200 && res.data && res.data[0]) {
+ var retailPrice = res.data[0].retailprice-0; //零售价格
+ var presetPriceOne = res.data[0].presetpriceone-0; //预计采购价
+ var presetPriceTwo = res.data[0].presetpricetwo-0; //批发价
+ var firstInUnit = res.data[0].firstinunit; //首选入库单位
+ var firstOutUnit = res.data[0].firstoutunit; //首选出库单位
+ var basicPresetPriceOne = ""; //多单位-入库-基础价格
+ var basicPresetPriceTwo = ""; //多单位-出库-基础价格
+ var retailPriceOne = ""; //多单位-入库-零售价格
+ var otherPresetPriceOne = ""; //多单位-入库-其他价格
+ var otherPresetPriceTwo = ""; //多单位-出库-其他价格
+ var retailPriceTwo = ""; //多单位-出库-零售价格
+ var basicUnit = ""; //基础单位
+ var otherUnit = ""; //其他单位
+ if(!res.data[0].unit){
+ var ps = res.data[0].pricestrategy;
+ var psObj = JSON.parse(ps);
+ basicPresetPriceOne = psObj[0].basic.PresetPriceOne-0;
+ basicPresetPriceTwo = psObj[0].basic.PresetPriceTwo-0;
+ retailPriceOne = psObj[0].basic.RetailPrice-0;
+ otherPresetPriceOne = psObj[1].other.PresetPriceOne-0;
+ otherPresetPriceTwo = psObj[1].other.PresetPriceTwo-0;
+ retailPriceTwo = psObj[1].other.RetailPrice-0;
+ basicUnit = psObj[0].basic.Unit;
+ otherUnit = psObj[1].other.Unit;
+ }
+ body =$("#depotHeadFM .datagrid-body");
+ footer =$("#depotHeadFM .datagrid-footer");
+ input = ".datagrid-editable-input";
+ if(res.data[0].unit){ //如果存在计量单位信息
+ ratio = 1; //重置比例为1
+ body.find("[field='Unit']").find(input).val(res.data[0].unit); //设置-计量单位信息
+ body.find("[field='Unit']").find(input).prop("readonly","readonly"); //设置计量单位为只读
+ body.find("[field='Unit']").find(input).off("click"); //移除点击事件
+ body.find("[field='Unit']").find(input).attr("data-ratio",ratio); //修改比例缓存信息
+ }
+ else {
+ var unitName = res.data[0].unitName;
+ if(unitName) {
+ ratio = unitName.substring(unitName.indexOf(":")+1).replace(")",""); //给比例赋值
+ unitName = unitName.substring(0, unitName.indexOf("("));
+ }
+ var unitArr = unitName.split(",");
+ var basicUnit = unitArr[0]; //基础单位
+ var otherUnit = unitArr[1]; //副单位
+ var unitSetInput =""; //单位
+ body.find("[field='Unit']").find(input).prop("readonly","readonly"); //设置计量单位为只读
+ var loadRatio = 1; //在单位输入框上面加载比例字段
+ if(listSubType === "采购" || listSubType === "采购退货" || listSubType === "采购订单"){
+ unitSetInput = res.data[0].firstinunit; //给单位文本框赋值
+ if(basicUnit==unitSetInput){ //基础单位等于选择的单位
+ loadRatio = 1;
+ }
+ else if(otherUnit==unitSetInput){ //副单位等于选择的单位
+ loadRatio = ratio;
+ }
+ }
+ else if(listSubType === "销售" || listSubType === "销售退货" || listSubType === "销售订单" || listSubType === "零售" || listSubType === "零售退货"){
+ unitSetInput = res.data[0].firstoutunit; //给单位文本框赋值
+ if(basicUnit==unitSetInput){ //基础单位等于选择的单位
+ loadRatio = 1;
+ }
+ else if(otherUnit==unitSetInput){ //副单位等于选择的单位
+ loadRatio = ratio;
+ }
+ }
+ body.find("[field='Unit']").find(input).val(unitSetInput).attr("data-ratio", loadRatio); //设置-首选单位
+
+ body.find("[field='Unit']").find(input).off("click").on("click",function(){
+ if(basicUnit && otherUnit) {
+ var self = this;
+ //定义模版
+ var temp = "
";
+ temp +="
";
+ temp +="- " + basicUnit + "
";
+ temp +="- " + otherUnit + "
";
+ temp +="
";
+ temp +="
";
+ if($('.unit-list').length){
+ $('.unit-list').remove(); //如果存在计量单位列表先移除
+ }
+ else {
+ $(self).after(temp); //加载列表信息
+ }
+ //计量单位列表的单击事件
+ $('.unit-list ul li').off("click").on("click",function(){
+ var unit = $(this).text();
+ var thisRatio = $(this).attr("data-ratio"); //获取比例
+ $(self).val(unit).attr("data-ratio", thisRatio);
+ $(self).keyup(); //模拟键盘操作
+ $('.unit-list').remove(); //移除计量单位列表
+ var stock = body.find("[field='Stock']").find(input).attr("data-stock"); //从缓存中取值
+ var type = $(this).attr("data-type");
+ var UnitPrice = 0;
+ if(type === "basic"){
+ if(listTitle == "采购订单列表" || listTitle == "采购入库列表" || listTitle == "销售退货列表" || listTitle == "其它入库列表") {
+ UnitPrice = basicPresetPriceOne;
+ }
+ else if(listTitle == "销售订单列表" || listTitle == "销售出库列表" || listTitle == "采购退货列表" || listTitle == "其它出库列表" || listTitle == "调拨出库列表") {
+ UnitPrice = basicPresetPriceTwo;
+ }
+ else if(listTitle == "零售出库列表" || listTitle == "零售退货列表"){
+ UnitPrice = retailPriceOne;
+ }
+ body.find("[field='Stock']").find(input).val(stock); //修改库存
+ }
+ else if(type === "other"){
+ if(listTitle == "采购订单列表" || listTitle == "采购入库列表" || listTitle == "销售退货列表" || listTitle == "其它入库列表") {
+ UnitPrice = otherPresetPriceOne;
+ }
+ else if(listTitle == "销售订单列表" || listTitle == "销售出库列表" || listTitle == "采购退货列表" || listTitle == "其它出库列表" || listTitle == "调拨出库列表") {
+ UnitPrice = otherPresetPriceTwo;
+ }
+ else if(listTitle == "零售出库列表" || listTitle == "零售退货列表"){
+ UnitPrice = retailPriceTwo;
+ }
+ body.find("[field='Stock']").find(input).val((stock/ratio).toFixed(2)); //修改库存
+ }
+ body.find("[field='UnitPrice']").find(input).val(UnitPrice); //单价
+ var OperNumber = body.find("[field='OperNumber']").find(input).val(); //获取数量
+ var taxRate = body.find("[field='TaxRate']").find(input).val(); //获取税率
+ body.find("[field='TaxUnitPrice']").find(input).val((UnitPrice*(1+taxRate/100)).toFixed(2)); //含税单价
+ body.find("[field='AllPrice']").find(input).val((UnitPrice*OperNumber).toFixed(2)); //金额
+ body.find("[field='TaxMoney']").find(input).val((UnitPrice*OperNumber*(taxRate/100)).toFixed(2)); //税额
+ body.find("[field='TaxLastMoney']").find(input).val((UnitPrice*OperNumber*(1+taxRate/100)).toFixed(2)); //价税合计
+ statisticsFun(body,UnitPrice,OperNumber,footer,taxRate);
+ });
+ //点击空白处移除计量单位列表
+ $(".datagrid-body").off("click").on("click",function(){
+ $('.unit-list').remove(); //移除计量单位列表
+ });
+ }
+ });
+ }
+ var detailPrice = 0; //明细列表-单价
+ if(listSubType == "零售" || listSubType == "零售退货") {
+ if(res.data[0].unit) { //如果存在计量单位信息
+ detailPrice = retailPrice;
+ }
+ else {
+ if (firstOutUnit == basicUnit) {
+ detailPrice = retailPriceOne;
+ }
+ else if (firstOutUnit == otherUnit) {
+ detailPrice = retailPriceTwo;
+ }
+ }
+ }
+ else if(listTitle == "采购订单列表" || listTitle == "采购入库列表" || listTitle == "销售退货列表" || listTitle == "其它入库列表") {
+ if(res.data[0].unit) { //如果存在计量单位信息
+ detailPrice = presetPriceOne;
+ }
+ else {
+ if (firstInUnit == basicUnit) {
+ detailPrice = basicPresetPriceOne;
+ }
+ else if (firstInUnit == otherUnit) {
+ detailPrice = otherPresetPriceOne;
+ }
+ }
+ }
+ else if(listTitle == "销售订单列表" || listTitle == "销售出库列表" || listTitle == "采购退货列表" || listTitle == "其它出库列表" || listTitle == "调拨出库列表") {
+ if(res.data[0].unit) { //如果存在计量单位信息
+ detailPrice = presetPriceTwo;
+ }
+ else {
+ if(firstOutUnit==basicUnit) {
+ detailPrice = basicPresetPriceTwo;
+ }
+ else if(firstOutUnit==otherUnit){
+ detailPrice = otherPresetPriceTwo;
+ }
+ }
+ }
+ body.find("[field='OperNumber']").find(input).val(1); //数量初始化为1
+ //单价和总价赋值
+ if(!detailPrice) {
+ detailPrice = 0;
+ }
+ body.find("[field='UnitPrice']").find(input).val(detailPrice);
+ body.find("[field='AllPrice']").find(input).val(detailPrice);
+ var taxRate = body.find("[field='TaxRate']").find(input).val()-0; //获取税率
+ body.find("[field='TaxUnitPrice']").find(input).val((detailPrice*(1+taxRate/100)).toFixed(2)); //含税单价
+ body.find("[field='TaxMoney']").find(input).val((detailPrice*(taxRate/100)).toFixed(2)); //税额
+ body.find("[field='TaxLastMoney']").find(input).val((detailPrice*(1+taxRate/100)).toFixed(2)); //价税合计
+ statisticsFun(body,detailPrice,1,footer,taxRate);
+
+ //查询库存信息
+ var depotId = body.find("[field='DepotId']").find(".combo-value").val();
+ if(depotId) {
+ var type = "select"; //type 类型:点击 click,选择 select
+ findStockNumById(depotId, mId, monthTime, body, input, loadRatio, type);
+ }
+ }
+ },
+ error: function() {
+ $.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
+ }
+ });
+ }
+ }
}
//初始化表格数据-商品列表-查看状态
function initTableData_material_show(TotalPrice){
From 6be4f9014fe75ef32b3b4cdc539bfea3d1e9dae3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com>
Date: Fri, 8 Nov 2019 12:57:21 +0800
Subject: [PATCH 10/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5?=
=?UTF-8?q?=E5=86=85=E5=AE=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
erp_web/index.html | 6 +++++-
erp_web/js/modules/sys/sysIndex.js | 19 +++++++++++++++----
2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/erp_web/index.html b/erp_web/index.html
index 34adc65e..7f6fa750 100644
--- a/erp_web/index.html
+++ b/erp_web/index.html
@@ -50,7 +50,11 @@
-
+ 阿里云促销中
+
+
腾讯云促销中
diff --git a/erp_web/js/modules/sys/sysIndex.js b/erp_web/js/modules/sys/sysIndex.js
index 90c91324..d04dce1c 100644
--- a/erp_web/js/modules/sys/sysIndex.js
+++ b/erp_web/js/modules/sys/sysIndex.js
@@ -418,8 +418,19 @@ $(function () {
});
})
-
-
-
-
+ //根据时间戳决定展示aliyun还是tencent
+ function autoChangeTip() {
+ var timestamp=new Date().getTime();
+ var checkShow = timestamp%2;
+ if(checkShow) {
+ $(".aliyun").show();
+ $(".tencent").hide();
+ } else {
+ $(".aliyun").hide();
+ $(".tencent").show();
+ }
+ }
+ setInterval(function () {
+ autoChangeTip();
+ },10*1000);
});
\ No newline at end of file