Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
d838c891
Commit
d838c891
authored
Nov 08, 2019
by
qiankunpingtai
Browse files
从源更新
parents
3e3c1d75
6be4f901
Changes
8
Hide whitespace changes
Inline
Side-by-side
erp_web/home.html
View file @
d838c891
...
...
@@ -95,7 +95,7 @@
</div>
<footer
class=
"main-footer m0"
>
<div
class=
"pull-right hidden-xs"
>
当前版本: V2.1
</div>
©
2015-2020 华夏ERP Demo - Powered By
<a
href=
"http
s
://
www
.huaxiaerp.com/"
target=
"_blank"
>
官方网站
</a>
©
2015-2020 华夏ERP Demo - Powered By
<a
href=
"http://
home
.huaxiaerp.com/"
target=
"_blank"
>
官方网站
</a>
</footer>
</div>
...
...
@@ -106,6 +106,7 @@
<script
src=
"js/layer/3.1/layer.js"
></script>
<script
src=
"js/my97/WdatePicker.js"
></script>
<script
src=
"js/common/jsherp.js"
></script>
<script
src=
"js/common/common.js"
></script>
<script
src=
"js/common/i18n/jsherp_zh_CN.js"
></script>
<script>
if
(
$
(
'
#switchSkin
'
).
length
>
0
){
...
...
erp_web/index.html
View file @
d838c891
...
...
@@ -50,7 +50,11 @@
</a>
</li>
<li
class=
"treeview"
>
<a
target=
"_blank"
style=
"color:yellow;font-weight: bold"
<a
target=
"_blank"
class=
"aliyun"
style=
"color:yellow;font-weight: bold;display: none;"
href=
"https://www.aliyun.com/acts/hotsale?userCode=axva2vlr"
>
<i
class=
"fa fa-cloud"
></i>
阿里云促销中
</a>
<a
target=
"_blank"
class=
"tencent"
style=
"color:yellow;font-weight: bold;display: none;"
href=
"https://cloud.tencent.com/act/cps/redirect?fromSource=gwzcw.3018172.3018172.3018172&redirect=10140&cps_key=4fb6482d716575dcb7b8fe600d93766a&from=activity"
>
<i
class=
"fa fa-cloud"
></i>
腾讯云促销中
</a>
...
...
erp_web/js/common/common.js
View file @
d838c891
//baidu-tongji
var
_hmt
=
_hmt
||
[];
(
function
()
{
var
hm
=
document
.
createElement
(
"
script
"
);
hm
.
src
=
"
https://hm.baidu.com/hm.js?1cd9bcbaae133f03a6eb19da6579aaba
"
;
var
s
=
document
.
getElementsByTagName
(
"
script
"
)[
0
];
s
.
parentNode
.
insertBefore
(
hm
,
s
);
})();
$
.
fn
.
serializeObject
=
function
()
{
var
o
=
{};
var
a
=
this
.
serializeArray
();
...
...
@@ -48,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
();
...
...
erp_web/js/modules/sys/sysIndex.js
View file @
d838c891
...
...
@@ -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
erp_web/js/pages/materials/in_out.js
View file @
d838c891
...
...
@@ -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
=
"
<div class='unit-list'>
"
;
temp
+=
"
<ul>
"
;
temp
+=
"
<li data-type='basic' data-ratio='1'>
"
+
basicUnit
+
"
</li>
"
;
temp
+=
"
<li data-type='other' data-ratio='
"
+
ratio
+
"
'>
"
+
otherUnit
+
"
</li>
"
;
temp
+=
"
</ul>
"
;
temp
+=
"
</div>
"
;
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
=
"
<div class='unit-list'>
"
;
temp
+=
"
<ul>
"
;
temp
+=
"
<li data-type='basic' data-ratio='1'>
"
+
basicUnit
+
"
</li>
"
;
temp
+=
"
<li data-type='other' data-ratio='
"
+
ratio
+
"
'>
"
+
otherUnit
+
"
</li>
"
;
temp
+=
"
</ul>
"
;
temp
+=
"
</div>
"
;
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
){
...
...
erp_web/login.html
View file @
d838c891
...
...
@@ -72,10 +72,10 @@
</div>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<a
href=
"register.html"
class=
"pull-left"
>
[ 立即注册 ]
</a>
<a
href=
"register.html"
class=
"pull-left"
>
<b>
[ 立即注册 ]
</
b></
a>
<div
class=
"dropdown pull-right"
>
<a
href=
"http
s
://
www
.huaxiaerp.com/"
class=
"dropdown-toggle"
target=
"_blank"
>
<i
class=
"fa icon-globe"
></i>
官方网站
<a
href=
"http://
home
.huaxiaerp.com/"
class=
"dropdown-toggle"
target=
"_blank"
>
<b>
<i
class=
"fa icon-globe"
></i>
官方网站
</b>
</a>
</div>
</div>
...
...
@@ -103,5 +103,6 @@
<script
src=
"js/jquery-validation/1.16/jquery.validate.extend.js"
></script>
<script
src=
"js/common/jsherp.js"
></script>
<script
src=
"js/common/i18n/jsherp_zh_CN.js"
></script>
<script
src=
"js/common/common.js"
></script>
<script
src=
"js/md5/md5.js"
></script>
<script
src=
"js/modules/sys/sysLogin.js"
></script>
erp_web/register.html
View file @
d838c891
...
...
@@ -89,10 +89,10 @@
</div>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<a
href=
"login.html"
class=
"pull-left"
>
[ 立即登录 ]
</a>
<a
href=
"login.html"
class=
"pull-left"
>
<b>
[ 立即登录 ]
</
b></
a>
<div
class=
"dropdown pull-right"
>
<a
href=
"
#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
data-hover=
"dropdown
"
>
<i
class=
"fa icon-globe"
></i>
官方网站
<a
href=
"
http://home.huaxiaerp.com/"
class=
"dropdown-toggle"
target=
"_blank
"
>
<b>
<i
class=
"fa icon-globe"
></i>
官方网站
</b>
</a>
</div>
</div>
...
...
src/main/bin/run-manage.sh
View file @
d838c891
FILE_PATH
=
/home/jshERP2.0
FILE_PATH
=
SERVER_NAME
=
jshERP
readonly
APP_HOME
=
${
FILE_PATH
:-
$(
dirname
$(
cd
`
dirname
$0
`
;
pwd
))
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment