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
88830c72
Commit
88830c72
authored
May 07, 2019
by
qiankunpingtai
Browse files
修改单据相关js效率低下的问题
parent
4f26664b
Changes
1
Hide whitespace changes
Inline
Side-by-side
erp_web/js/pages/materials/in_out.js
View file @
88830c72
...
@@ -553,26 +553,26 @@
...
@@ -553,26 +553,26 @@
columns
:[[
columns
:[[
{
field
:
'
id
'
,
width
:
35
,
align
:
"
center
"
,
checkbox
:
true
},
{
field
:
'
id
'
,
width
:
35
,
align
:
"
center
"
,
checkbox
:
true
},
{
title
:
'
操作
'
,
field
:
'
op
'
,
align
:
"
center
"
,
width
:
opWidth
,
{
title
:
'
操作
'
,
field
:
'
op
'
,
align
:
"
center
"
,
width
:
opWidth
,
formatter
:
function
(
value
,
rec
)
{
formatter
:
function
(
value
,
rec
,
index
)
{
var
str
=
''
;
var
str
=
''
;
var
rowInfo
=
rec
.
id
+
'
AaBb
'
+
rec
.
projectid
+
'
AaBb
'
+
rec
.
number
+
'
AaBb
'
+
rec
.
operpersonname
//
var rowInfo = rec.id + 'AaBb' + rec.projectid+ 'AaBb' + rec.number+ 'AaBb' + rec.operpersonname
+
'
AaBb
'
+
rec
.
opertimeStr
+
'
AaBb
'
+
rec
.
organid
+
'
AaBb
'
+
rec
.
handspersonid
//
+ 'AaBb' + rec.opertimeStr+ 'AaBb' + rec.organid+ 'AaBb' + rec.handspersonid
+
'
AaBb
'
+
rec
.
accountid
+
'
AaBb
'
+
rec
.
changeamount
+
'
AaBb
'
+
rec
.
remark
//
+ 'AaBb' + rec.accountid+ 'AaBb' + rec.changeamount+ 'AaBb' + rec.remark
+
'
AaBb
'
+
rec
.
projectName
+
'
AaBb
'
+
rec
.
organName
+
'
AaBb
'
+
rec
.
handsPersonName
//
+ 'AaBb' + rec.projectName+ 'AaBb' + rec.organName+ 'AaBb' + rec.handsPersonName
+
'
AaBb
'
+
rec
.
accountName
+
'
AaBb
'
+
rec
.
totalprice
+
'
AaBb
'
+
rec
.
allocationprojectid
//
+ 'AaBb' + rec.accountName + 'AaBb' + rec.totalprice + 'AaBb' + rec.allocationprojectid
+
'
AaBb
'
+
rec
.
allocationProjectName
+
'
AaBb
'
+
rec
.
paytype
+
'
AaBb
'
+
rec
.
salesman
//
+ 'AaBb' + rec.allocationProjectName + 'AaBb' + rec.paytype + 'AaBb' + rec.salesman
+
'
AaBb
'
+
rec
.
discount
+
'
AaBb
'
+
rec
.
discountmoney
+
'
AaBb
'
+
rec
.
discountlastmoney
//
+ 'AaBb' + rec.discount + 'AaBb' + rec.discountmoney + 'AaBb' + rec.discountlastmoney
+
'
AaBb
'
+
rec
.
accountidlist
+
'
AaBb
'
+
rec
.
accountmoneylist
//
+ 'AaBb' + rec.accountidlist + 'AaBb' + rec.accountmoneylist
+
'
AaBb
'
+
rec
.
othermoney
+
'
AaBb
'
+
rec
.
othermoneylist
+
'
AaBb
'
+
rec
.
othermoneyitem
//
+ 'AaBb' + rec.othermoney + 'AaBb' + rec.othermoneylist + 'AaBb' + rec.othermoneyitem
+
'
AaBb
'
+
rec
.
accountday
+
'
AaBb
'
+
rec
.
linknumber
;
//
+ 'AaBb' + rec.accountday + 'AaBb' + rec.linknumber;
rowInfo
=
rowInfo
.
replace
(
/
\"
/g
,
""
);
//
rowInfo = rowInfo.replace(/\"/g, "");
rowInfo
=
rowInfo
.
replace
(
/
\[
|]/g
,
""
);
//
rowInfo = rowInfo.replace(/\[|]/g,"");
var
orgId
=
rec
.
organid
?
rec
.
organid
:
0
;
var
orgId
=
rec
.
organid
?
rec
.
organid
:
0
;
str
+=
'
<img title="查看" src="/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showDepotHead(
\'
'
+
rowInfo
+
'
\'
);"/>
'
;
str
+=
'
<img title="查看" src="/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showDepotHead(
\'
'
+
index
+
'
\'
);"/>
'
;
str
+=
'
<img title="编辑" src="/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepotHead(
\'
'
+
rowInfo
+
'
\'
'
+
'
,
'
+
rec
.
status
+
'
);"/>
'
;
str
+=
'
<img title="编辑" src="/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepotHead(
\'
'
+
index
+
'
\'
'
+
'
,
'
+
rec
.
status
+
'
);"/>
'
;
str
+=
'
<img title="删除" src="/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepotHead(
'
+
rec
.
id
+
'
,
'
+
orgId
+
'
,
'
+
rec
.
totalprice
+
'
,
'
+
rec
.
status
+
'
);"/>
'
;
str
+=
'
<img title="删除" src="/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepotHead(
'
+
rec
.
id
+
'
,
'
+
orgId
+
'
,
'
+
rec
.
totalprice
+
'
,
'
+
rec
.
status
+
'
);"/>
'
;
if
(
isShowSkip
)
{
if
(
isShowSkip
)
{
str
+=
'
<img title="
'
+
opTitle
+
'
" src="/js/easyui-1.3.5/themes/icons/redo.png" style="cursor: pointer;" onclick="skipDepotHead(
\'
'
+
rowInfo
+
'
\'
'
+
'
,
'
+
rec
.
status
+
'
);"/>
'
;
str
+=
'
<img title="
'
+
opTitle
+
'
" src="/js/easyui-1.3.5/themes/icons/redo.png" style="cursor: pointer;" onclick="skipDepotHead(
\'
'
+
index
+
'
\'
'
+
'
,
'
+
rec
.
status
+
'
);"/>
'
;
}
}
return
str
;
return
str
;
}
}
...
@@ -1338,11 +1338,13 @@
...
@@ -1338,11 +1338,13 @@
}
}
//订单转采购或销售
//订单转采购或销售
function
skipDepotHead
(
rowInfo
,
status
){
function
skipDepotHead
(
index
,
status
){
//获取当前行
var
rowsdata
=
$
(
"
#tableData
"
).
datagrid
(
"
getRows
"
)[
index
];
if
(
status
==
"
0
"
||
status
==
"
2
"
)
{
if
(
status
==
"
0
"
||
status
==
"
2
"
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
未审核和已转的单据禁止操作!
'
,
'
warning
'
);
$
.
messager
.
alert
(
'
提示
'
,
'
未审核和已转的单据禁止操作!
'
,
'
warning
'
);
}
else
{
}
else
{
sessionStorage
.
setItem
(
"
rowInfo
"
,
rowInfo
);
//将单据信息存入缓存中
sessionStorage
.
setItem
(
"
rowInfo
"
,
JSON
.
stringify
(
rowsdata
)
);
//将单据信息存入缓存中
if
(
listTitle
==
"
采购订单列表
"
)
{
if
(
listTitle
==
"
采购订单列表
"
)
{
parent
.
addTab
(
"
订单转采购
"
,
"
../materials/purchase_in_list.html?t=skip
"
,
""
);
parent
.
addTab
(
"
订单转采购
"
,
"
../materials/purchase_in_list.html?t=skip
"
,
""
);
}
else
if
(
listTitle
==
"
销售订单列表
"
)
{
}
else
if
(
listTitle
==
"
销售订单列表
"
)
{
...
@@ -1644,54 +1646,61 @@
...
@@ -1644,54 +1646,61 @@
}
}
//编辑信息
//编辑信息
function
editDepotHead
(
depotHeadTotalInfo
,
status
){
function
editDepotHead
(
index
,
status
){
if
(
status
==
"
1
"
||
status
==
"
2
"
)
{
if
(
status
==
"
1
"
||
status
==
"
2
"
)
{
$
.
messager
.
alert
(
'
编辑提示
'
,
'
已审核和已转的单据不能编辑!
'
,
'
warning
'
);
$
.
messager
.
alert
(
'
编辑提示
'
,
'
已审核和已转的单据不能编辑!
'
,
'
warning
'
);
return
;
return
;
}
}
var
depotHeadInfo
=
depotHeadTotalInfo
.
split
(
"
AaBb
"
);
// var depotHeadInfo = depotHeadTotalInfo.split("AaBb");
$
(
"
#ProjectId
"
).
focus
().
val
(
depotHeadInfo
[
1
]);
//获取当前行
var
ProjectId
=
depotHeadInfo
[
1
];
var
rowsdata
=
''
;
if
(
Number
(
index
).
toString
()
==
'
NaN
'
){
rowsdata
=
$
.
parseJSON
(
index
);
}
else
{
rowsdata
=
$
(
"
#tableData
"
).
datagrid
(
"
getRows
"
)[
index
];
}
$
(
"
#ProjectId
"
).
focus
().
val
(
rowsdata
.
projectid
);
var
ProjectId
=
rowsdata
.
projectid
;
if
(
ProjectId
!=
''
)
{
if
(
ProjectId
!=
''
)
{
initSystemData_person
(
ProjectId
);
initSystemData_person
(
ProjectId
);
initSelectInfo_person
();
initSelectInfo_person
();
}
}
var
TotalPrice
=
depotHeadInfo
[
14
]
;
//合计金额
var
TotalPrice
=
rowsdata
.
totalprice
;
//合计金额
if
(
pageType
===
"
skip
"
)
{
//从订单跳转过来
if
(
pageType
===
"
skip
"
)
{
//从订单跳转过来
buildNumber
();
//生成单据编号
buildNumber
();
//生成单据编号
var
thisDateTime
=
getNowFormatDateTime
();
//当前时间
var
thisDateTime
=
getNowFormatDateTime
();
//当前时间
$
(
"
#OperTime
"
).
val
(
thisDateTime
);
$
(
"
#OperTime
"
).
val
(
thisDateTime
);
$
(
"
#LinkNumber
"
).
val
(
depotHeadInfo
[
2
]
);
//关联订单号
$
(
"
#LinkNumber
"
).
val
(
rowsdata
.
number
);
//关联订单号
$
(
"
#AccountId
"
).
val
(
defaultAccountId
);
//初始化默认的账户Id
$
(
"
#AccountId
"
).
val
(
defaultAccountId
);
//初始化默认的账户Id
$
(
"
#DiscountLastMoney
"
).
val
(
TotalPrice
);
//优惠后金额
$
(
"
#DiscountLastMoney
"
).
val
(
TotalPrice
);
//优惠后金额
$
(
"
#ChangeAmount
"
).
val
(
TotalPrice
).
attr
(
"
data-changeamount
"
,
TotalPrice
);
$
(
"
#ChangeAmount
"
).
val
(
TotalPrice
).
attr
(
"
data-changeamount
"
,
TotalPrice
);
}
else
{
}
else
{
$
(
"
#Number
"
).
val
(
depotHeadInfo
[
2
]
).
attr
(
"
data-defaultNumber
"
,
depotHeadInfo
[
2
]
);
$
(
"
#Number
"
).
val
(
rowsdata
.
number
).
attr
(
"
data-defaultNumber
"
,
rowsdata
.
number
);
$
(
"
#OperTime
"
).
val
(
depotHeadInfo
[
4
]
);
$
(
"
#OperTime
"
).
val
(
rowsdata
.
opertimeStr
);
$
(
"
#LinkNumber
"
).
val
(
depotHeadInfo
[
28
].
replace
(
"
undefined
"
,
""
)
);
//关联订单号
$
(
"
#LinkNumber
"
).
val
(
rowsdata
.
linknumber
==
undefined
?
""
:
rowsdata
.
linknumber
);
//关联订单号
$
(
"
#AccountId
"
).
val
(
depotHeadInfo
[
7
]
);
//账户Id
$
(
"
#AccountId
"
).
val
(
rowsdata
.
accountid
);
//账户Id
$
(
"
#DiscountLastMoney
"
).
val
(
depotHeadInfo
[
21
].
replace
(
"
undefined
"
,
"
0.00
"
)
);
//优惠后金额
$
(
"
#DiscountLastMoney
"
).
val
(
rowsdata
.
discountlastmoney
==
undefined
?
"
0.00
"
:
rowsdata
.
discountlastmoney
);
//优惠后金额
$
(
"
#ChangeAmount
"
).
val
(
depotHeadInfo
[
8
]
).
attr
(
"
data-changeamount
"
,
depotHeadInfo
[
8
]
);
$
(
"
#ChangeAmount
"
).
val
(
rowsdata
.
changeamount
).
attr
(
"
data-changeamount
"
,
rowsdata
.
changeamount
);
}
}
$
(
'
#OrganId
'
).
combobox
(
'
setValue
'
,
depotHeadInfo
[
5
]
==
'
undefined
'
?
''
:
depotHeadInfo
[
5
]
);
$
(
'
#OrganId
'
).
combobox
(
'
setValue
'
,
rowsdata
.
organid
==
undefined
?
''
:
rowsdata
.
organid
);
$
(
"
#HandsPersonId
"
).
val
(
depotHeadInfo
[
6
]
);
$
(
"
#HandsPersonId
"
).
val
(
rowsdata
.
handspersonid
);
$
(
"
#Remark
"
).
val
(
depotHeadInfo
[
9
]
);
$
(
"
#Remark
"
).
val
(
rowsdata
.
remark
);
$
(
"
#Discount
"
).
val
(
depotHeadInfo
[
19
].
replace
(
"
undefined
"
,
"
0
"
)
);
$
(
"
#Discount
"
).
val
(
rowsdata
.
discount
==
undefined
?
"
0
"
:
rowsdata
.
discount
);
$
(
"
#DiscountMoney
"
).
val
(
depotHeadInfo
[
20
].
replace
(
"
undefined
"
,
"
0.00
"
)
);
$
(
"
#DiscountMoney
"
).
val
(
rowsdata
.
discountmoney
==
undefined
?
"
0.00
"
:
rowsdata
.
discountmoney
);
$
(
"
#Debt
"
).
val
(
(
depotHeadInfo
[
21
].
replace
(
"
undefined
"
,
"
0.00
"
)
-
depotHeadInfo
[
8
]
).
toFixed
(
2
));
$
(
"
#Debt
"
).
val
(
Number
((
rowsdata
.
discountlastmoney
==
undefined
?
'
0.00
'
:
rowsdata
.
discountlastmoney
-
rowsdata
.
changeamount
)
).
toFixed
(
2
));
$
(
"
#AccountDay
"
).
val
(
depotHeadInfo
[
27
].
replace
(
"
undefined
"
,
""
)
);
//结算天数
$
(
"
#AccountDay
"
).
val
(
rowsdata
.
accountday
==
undefined
?
""
:
rowsdata
.
accountday
);
//结算天数
preTotalPrice
=
depotHeadInfo
[
14
]
;
//记录前一次合计金额,用于扣预付款
preTotalPrice
=
rowsdata
.
totalprice
;
//记录前一次合计金额,用于扣预付款
$
(
"
#AllocationProjectId
"
).
val
(
depotHeadInfo
[
15
]
);
$
(
"
#AllocationProjectId
"
).
val
(
rowsdata
.
allocationprojectid
);
oldNumber
=
depotHeadInfo
[
2
]
;
//记录编辑前的单据编号
oldNumber
=
rowsdata
.
number
;
//记录编辑前的单据编号
oldId
=
depotHeadInfo
[
0
]
;
//记录单据Id
oldId
=
rowsdata
.
id
;
//记录单据Id
var
editTitle
=
listTitle
.
replace
(
"
列表
"
,
"
信息
"
);
var
editTitle
=
listTitle
.
replace
(
"
列表
"
,
"
信息
"
);
$
(
'
#depotHeadDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑
'
+
editTitle
);
$
(
'
#depotHeadDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑
'
+
editTitle
);
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
depotHeadID
=
depotHeadInfo
[
0
]
;
depotHeadID
=
rowsdata
.
id
;
if
(
listSubType
==
"
零售
"
){
if
(
listSubType
==
"
零售
"
){
var
option
=
""
;
var
option
=
""
;
if
(
depotHeadInfo
[
17
]
=
==
"
预付款
"
){
if
(
rowsdata
.
paytype
==
"
预付款
"
){
option
=
'
<option value="预付款">预付款</option>
'
;
option
=
'
<option value="预付款">预付款</option>
'
;
option
+=
'
<option value="现付">现付</option>
'
;
option
+=
'
<option value="现付">现付</option>
'
;
}
}
...
@@ -1701,9 +1710,9 @@
...
@@ -1701,9 +1710,9 @@
$
(
"
#payType
"
).
empty
().
append
(
option
);
$
(
"
#payType
"
).
empty
().
append
(
option
);
}
}
if
(
listSubType
==
=
"
销售
"
||
listSubType
==
=
"
销售退货
"
){
if
(
listSubType
==
"
销售
"
||
listSubType
==
"
销售退货
"
){
if
(
depotHeadInfo
[
18
]
){
if
(
rowsdata
.
salesman
){
var
arr
=
depotHeadInfo
[
18
]
.
split
(
"
,
"
);
var
arr
=
rowsdata
.
salesman
.
split
(
"
,
"
);
var
salesmanArray
=
[];
var
salesmanArray
=
[];
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
){
if
(
arr
[
i
]){
if
(
arr
[
i
]){
...
@@ -1715,10 +1724,10 @@
...
@@ -1715,10 +1724,10 @@
}
}
//采购入库、销售出库的多账户加载
//采购入库、销售出库的多账户加载
if
(
depotHeadInfo
[
22
]
!=
"
undefined
"
&&
depotHeadInfo
[
23
]
!=
"
undefined
"
){
if
(
rowsdata
.
accountidlist
!=
undefined
&&
rowsdata
.
accountmoneylist
!=
undefined
){
$
(
"
#AccountId
"
).
val
(
"
many
"
);
//下拉框选中多账户
$
(
"
#AccountId
"
).
val
(
"
many
"
);
//下拉框选中多账户
var
accountArr
=
depotHeadInfo
[
22
]
.
split
(
"
,
"
);
var
accountArr
=
rowsdata
.
accountidlist
.
split
(
"
,
"
);
var
accountMoneyArr
=
depotHeadInfo
[
23
]
.
split
(
"
,
"
);
var
accountMoneyArr
=
rowsdata
.
accountmoneylist
.
split
(
"
,
"
);
accountMoneyArr
=
changeListFmtPlus
(
accountMoneyArr
)
//将数组单个金额中的数值转为正数
accountMoneyArr
=
changeListFmtPlus
(
accountMoneyArr
)
//将数组单个金额中的数值转为正数
if
(
listSubType
==
"
零售
"
||
listSubType
==
"
零售退货
"
)
{
if
(
listSubType
==
"
零售
"
||
listSubType
==
"
零售退货
"
)
{
...
@@ -1743,10 +1752,10 @@
...
@@ -1743,10 +1752,10 @@
}
}
//采购入库、销售出库的费用数据加载
//采购入库、销售出库的费用数据加载
if
(
depotHeadInfo
[
25
]
&&
depotHeadInfo
[
26
]
){
if
(
rowsdata
.
othermoneylist
&&
rowsdata
.
othermoneyitem
){
$
(
"
#OtherMoney
"
).
val
(
depotHeadInfo
[
24
].
replace
(
"
undefined
"
,
"
0
"
)
);
//采购费用、销售费用
$
(
"
#OtherMoney
"
).
val
(
rowsdata
.
othermoney
==
undefined
?
"
0
"
:
rowsdata
.
othermoney
);
//采购费用、销售费用
var
itemArr
=
depotHeadInfo
[
25
]
.
split
(
"
,
"
);
var
itemArr
=
rowsdata
.
othermoneylist
.
split
(
"
,
"
);
var
itemMoneyArr
=
depotHeadInfo
[
26
]
.
split
(
"
,
"
);
var
itemMoneyArr
=
rowsdata
.
othermoneyitem
.
split
(
"
,
"
);
$
(
"
#OtherMoney
"
).
attr
(
"
data-itemArr
"
,
JSON
.
stringify
(
itemArr
)).
attr
(
"
data-itemMoneyArr
"
,
JSON
.
stringify
(
itemMoneyArr
));
//json数据存储
$
(
"
#OtherMoney
"
).
attr
(
"
data-itemArr
"
,
JSON
.
stringify
(
itemArr
)).
attr
(
"
data-itemMoneyArr
"
,
JSON
.
stringify
(
itemMoneyArr
));
//json数据存储
}
}
...
@@ -1757,24 +1766,26 @@
...
@@ -1757,24 +1766,26 @@
//jshjshjsh
//jshjshjsh
$
(
"
#depotHeadFM .datagrid-body
"
).
find
(
"
[field='DepotId']
"
).
click
();
$
(
"
#depotHeadFM .datagrid-body
"
).
find
(
"
[field='DepotId']
"
).
click
();
}
else
{
}
else
{
url
=
'
/depotHead/updateDepotHeadAndDetail?id=
'
+
depotHeadInfo
[
0
]
;
//更新接口
url
=
'
/depotHead/updateDepotHeadAndDetail?id=
'
+
rowsdata
.
id
;
//更新接口
}
}
}
}
//查看信息
//查看信息
function
showDepotHead
(
depotHeadTotalInfo
){
function
showDepotHead
(
index
){
var
depotHeadInfo
=
depotHeadTotalInfo
.
split
(
"
AaBb
"
);
// var depotHeadInfo = depotHeadTotalInfo.split("AaBb");
//获取当前行
var
rowsdata
=
$
(
"
#tableData
"
).
datagrid
(
"
getRows
"
)[
index
];
var
manyAccountMoney
=
0
;
//多账户合计-零售
var
manyAccountMoney
=
0
;
//多账户合计-零售
$
(
"
#ProjectIdShow
"
).
text
(
depotHeadInfo
[
10
]
);
$
(
"
#ProjectIdShow
"
).
text
(
rowsdata
.
projectName
);
$
(
"
#NumberShow
"
).
text
(
depotHeadInfo
[
2
]
);
$
(
"
#NumberShow
"
).
text
(
rowsdata
.
number
);
$
(
"
#OperTimeShow
"
).
text
(
depotHeadInfo
[
4
]
);
$
(
"
#OperTimeShow
"
).
text
(
rowsdata
.
opertimeStr
);
$
(
'
#OrganIdShow
'
).
text
(
depotHeadInfo
[
11
]
==
"
undefined
"
?
''
:
depotHeadInfo
[
11
]
);
$
(
'
#OrganIdShow
'
).
text
(
rowsdata
.
organName
==
undefined
?
''
:
rowsdata
.
organName
);
$
(
"
#HandsPersonIdShow
"
).
text
(
depotHeadInfo
[
12
]
);
$
(
"
#HandsPersonIdShow
"
).
text
(
rowsdata
.
handsPersonName
);
if
(
depotHeadInfo
[
13
]
&&
depotHeadInfo
[
13
]
!=
"
undefined
"
){
if
(
rowsdata
.
accountName
&&
rowsdata
.
accountName
!=
undefined
){
$
(
"
#AccountIdShow
"
).
text
(
depotHeadInfo
[
13
]
);
//结算账户
$
(
"
#AccountIdShow
"
).
text
(
rowsdata
.
accountName
);
//结算账户
}
else
{
}
else
{
var
accountArr
=
depotHeadInfo
[
22
]
.
split
(
"
,
"
);
//账户id列表
var
accountArr
=
(
rowsdata
.
accountidlist
==
undefined
?
""
:
rowsdata
.
accountidlist
)
.
split
(
"
,
"
);
//账户id列表
var
accountMoneyArr
=
depotHeadInfo
[
23
]
.
split
(
"
,
"
);
//账户金额列表
var
accountMoneyArr
=
(
rowsdata
.
accountmoneylist
==
undefined
?
""
:
rowsdata
.
accountmoneylist
)
.
split
(
"
,
"
);
//账户金额列表
var
accountIdShow
=
""
;
var
accountIdShow
=
""
;
for
(
var
j
=
0
;
j
<
accountArr
.
length
;
j
++
){
for
(
var
j
=
0
;
j
<
accountArr
.
length
;
j
++
){
if
(
accountList
!=
null
){
if
(
accountList
!=
null
){
...
@@ -1793,17 +1804,17 @@
...
@@ -1793,17 +1804,17 @@
}
}
$
(
"
#AccountIdShow
"
).
text
(
accountIdShow
);
$
(
"
#AccountIdShow
"
).
text
(
accountIdShow
);
}
}
$
(
"
#ChangeAmountShow
"
).
text
(
depotHeadInfo
[
8
]
);
$
(
"
#ChangeAmountShow
"
).
text
(
rowsdata
.
changeamount
);
$
(
"
#RemarkShow
"
).
text
(
depotHeadInfo
[
9
]
);
$
(
"
#RemarkShow
"
).
text
(
rowsdata
.
remark
);
$
(
"
#DiscountShow
"
).
text
(
depotHeadInfo
[
19
]
);
$
(
"
#DiscountShow
"
).
text
(
rowsdata
.
discount
);
$
(
"
#DiscountMoneyShow
"
).
text
(
depotHeadInfo
[
20
]
);
$
(
"
#DiscountMoneyShow
"
).
text
(
rowsdata
.
discountmoney
);
$
(
"
#DiscountLastMoneyShow
"
).
text
(
depotHeadInfo
[
21
]
);
$
(
"
#DiscountLastMoneyShow
"
).
text
(
rowsdata
.
discountlastmoney
);
$
(
"
#DebtShow
"
).
text
((
depotHeadInfo
[
21
]
-
depotHeadInfo
[
8
]
).
toFixed
(
2
));
$
(
"
#DebtShow
"
).
text
((
rowsdata
.
discountlastmoney
-
rowsdata
.
changeamount
).
toFixed
(
2
));
$
(
"
#AccountDayShow
"
).
text
(
depotHeadInfo
[
27
].
replace
(
"
undefined
"
,
""
)
);
//结算天数
$
(
"
#AccountDayShow
"
).
text
(
rowsdata
.
accountday
==
undefined
?
""
:
rowsdata
.
accountday
);
//结算天数
$
(
"
#LinkNumberShow
"
).
text
(
depotHeadInfo
[
28
].
replace
(
"
undefined
"
,
""
)
);
//关联订单号
$
(
"
#LinkNumberShow
"
).
text
(
rowsdata
.
linknumber
==
undefined
?
""
:
rowsdata
.
linknumber
);
//关联订单号
if
(
depotHeadInfo
[
25
]
&&
depotHeadInfo
[
26
]
){
if
(
rowsdata
.
othermoneylist
&&
rowsdata
.
othermoneyitem
){
var
itemArr
=
depotHeadInfo
[
25
]
.
split
(
"
,
"
);
//支出项目id列表
var
itemArr
=
rowsdata
.
othermoneylist
.
split
(
"
,
"
);
//支出项目id列表
var
itemMoneyArr
=
depotHeadInfo
[
26
]
.
split
(
"
,
"
);
//支出项目金额列表
var
itemMoneyArr
=
rowsdata
.
othermoneyitem
.
split
(
"
,
"
);
//支出项目金额列表
var
otherMoneyShow
=
""
;
var
otherMoneyShow
=
""
;
for
(
var
j
=
0
;
j
<
itemArr
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
itemArr
.
length
;
j
++
)
{
if
(
outItemList
!=
null
)
{
if
(
outItemList
!=
null
)
{
...
@@ -1815,19 +1826,19 @@
...
@@ -1815,19 +1826,19 @@
}
}
}
}
}
}
$
(
"
#OtherMoneyShow
"
).
text
(
otherMoneyShow
+
"
总计:
"
+
depotHeadInfo
[
24
].
replace
(
"
undefined
"
,
"
0
"
)
+
"
元
"
);
//采购费用、销售费用
$
(
"
#OtherMoneyShow
"
).
text
(
otherMoneyShow
+
"
总计:
"
+
rowsdata
.
othermoney
==
undefined
?
"
0
"
:
rowsdata
.
othermoney
+
"
元
"
);
//采购费用、销售费用
}
}
else
{
else
{
$
(
"
#OtherMoneyShow
"
).
text
(
depotHeadInfo
[
24
].
replace
(
"
undefined
"
,
"
0
"
)
);
//采购费用、销售费用
$
(
"
#OtherMoneyShow
"
).
text
(
rowsdata
.
othermoney
==
undefined
?
"
0
"
:
rowsdata
.
othermoney
);
//采购费用、销售费用
}
}
$
(
"
#payTypeShow
"
).
text
(
depotHeadInfo
[
17
]
);
$
(
"
#payTypeShow
"
).
text
(
rowsdata
.
paytype
);
var
TotalPrice
=
depotHeadInfo
[
14
]
;
var
TotalPrice
=
rowsdata
.
totalprice
;
$
(
"
#AllocationProjectIdShow
"
).
text
(
depotHeadInfo
[
16
]
);
$
(
"
#AllocationProjectIdShow
"
).
text
(
rowsdata
.
allocationProjectName
);
var
showTitle
=
listTitle
.
replace
(
"
列表
"
,
"
信息
"
);
var
showTitle
=
listTitle
.
replace
(
"
列表
"
,
"
信息
"
);
$
(
'
#depotHeadDlgShow
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="/js/easyui-1.3.5/themes/icons/list.png"/> 查看
'
+
showTitle
);
$
(
'
#depotHeadDlgShow
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="/js/easyui-1.3.5/themes/icons/list.png"/> 查看
'
+
showTitle
);
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
$
(
"
.window-mask
"
).
css
({
width
:
webW
,
height
:
webH
});
depotHeadID
=
depotHeadInfo
[
0
]
;
depotHeadID
=
rowsdata
.
id
;
initTableData_material_show
(
TotalPrice
);
//商品列表-查看状态
initTableData_material_show
(
TotalPrice
);
//商品列表-查看状态
//零售单据展示数据
//零售单据展示数据
...
@@ -1843,8 +1854,8 @@
...
@@ -1843,8 +1854,8 @@
}
}
}
}
if
(
listSubType
===
"
销售
"
||
listSubType
===
"
销售退货
"
){
if
(
listSubType
===
"
销售
"
||
listSubType
===
"
销售退货
"
){
if
(
depotHeadInfo
[
18
]
){
if
(
rowsdata
.
salesman
){
var
arr
=
depotHeadInfo
[
18
]
.
split
(
"
,
"
);
var
arr
=
rowsdata
.
salesman
.
split
(
"
,
"
);
var
salesmanStr
=
""
;
var
salesmanStr
=
""
;
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
){
if
(
arr
[
i
]){
if
(
arr
[
i
]){
...
...
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