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
4ac640c5
Commit
4ac640c5
authored
Oct 23, 2020
by
季圣华
Browse files
优化销售出库单据,改为选择关联单据的方式
parent
cc7df2b4
Changes
8
Hide whitespace changes
Inline
Side-by-side
erp_web/css/bill_detail.css
View file @
4ac640c5
...
...
@@ -7,12 +7,18 @@
#bill
.retail_back
{
display
:
none
;
}
#bill
.purchase_orders
{
display
:
none
;
}
#bill
.purchase_in
{
display
:
none
;
}
#bill
.purchase_back
{
display
:
none
;
}
#bill
.sale_orders
{
display
:
none
;
}
#bill
.sale_out
{
display
:
none
;
}
...
...
erp_web/css/common.css
View file @
4ac640c5
...
...
@@ -54,4 +54,10 @@
color
:
blue
;
text-decoration
:
underline
;
cursor
:
pointer
;
}
#depotHeadDlgShow
.n-link
{
color
:
blue
;
text-decoration
:
underline
;
cursor
:
pointer
;
}
\ No newline at end of file
erp_web/js/pages/bill/bill_detail.js
View file @
4ac640c5
...
...
@@ -95,7 +95,12 @@
if
(
listSubType
)
{
listSubType
=
decodeURI
(
listSubType
);
}
if
(
listSubType
==
"
采购入库
"
)
{
if
(
listSubType
==
"
采购订单
"
)
{
billType
=
"
material
"
;
$
(
"
#bill .purchase_orders
"
).
show
();
tableString
=
$
(
"
.purchase_orders
"
).
html
();
}
else
if
(
listSubType
==
"
采购入库
"
)
{
billType
=
"
material
"
;
$
(
"
#bill .purchase_in
"
).
show
();
tableString
=
$
(
"
.purchase_in
"
).
html
();
...
...
@@ -105,6 +110,11 @@
$
(
"
#bill .purchase_back
"
).
show
();
tableString
=
$
(
"
.purchase_back
"
).
html
();
}
else
if
(
listSubType
==
"
销售订单
"
)
{
billType
=
"
material
"
;
$
(
"
#bill .sale_orders
"
).
show
();
tableString
=
$
(
"
.sale_orders
"
).
html
();
}
else
if
(
listSubType
==
"
销售出库
"
)
{
billType
=
"
material
"
;
$
(
"
#bill .sale_out
"
).
show
();
...
...
@@ -361,12 +371,18 @@
//打印table
$
(
"
#print_bill_detail
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
(){
var
tableString
=
""
;
//打印table
if
(
listSubType
==
"
采购入库
"
)
{
if
(
listSubType
==
"
采购订单
"
)
{
tableString
=
$
(
"
.purchase_orders
"
).
html
();
}
else
if
(
listSubType
==
"
采购入库
"
)
{
tableString
=
$
(
"
.purchase_in
"
).
html
();
}
else
if
(
listSubType
==
"
采购退货出库
"
)
{
tableString
=
$
(
"
.purchase_back
"
).
html
();
}
else
if
(
listSubType
==
"
销售订单
"
)
{
tableString
=
$
(
"
.sale_orders
"
).
html
();
}
else
if
(
listSubType
==
"
销售出库
"
)
{
tableString
=
$
(
"
.sale_out
"
).
html
();
}
...
...
@@ -426,7 +442,8 @@
depotHeadName
=
"
仓库名称
"
;
}
var
isShowTaxColumn
=
false
;
//是否显示税率相关的列,true为隐藏,false为显示
if
(
listSubType
==
"
调拨出库
"
||
listSubType
==
"
其它出库
"
||
listSubType
==
"
其它入库
"
||
if
(
listSubType
==
"
采购订单
"
||
listSubType
==
"
销售订单
"
||
listSubType
==
"
调拨出库
"
||
listSubType
==
"
其它出库
"
||
listSubType
==
"
其它入库
"
||
listSubType
==
"
零售出库
"
||
listSubType
==
"
零售退货入库
"
||
listSubType
==
"
盘点复盘
"
){
isShowTaxColumn
=
true
;
//隐藏
}
...
...
erp_web/pages/bill/bill_detail.html
View file @
4ac640c5
...
...
@@ -159,6 +159,41 @@
</tr>
</table>
</div>
<!--采购订单-->
<div
class=
"purchase_orders"
style=
"width:1300px;padding:10px 20px;top:20px"
closed=
"true"
modal=
"true"
cache=
"false"
collapsible=
"false"
closable=
"true"
>
<table>
<tr>
<td
style=
"width:60px;"
>
供应商:
</td>
<td
style=
"padding:5px;width:130px;"
>
<span
class=
"OrganIdShow"
></span>
</td>
<td
style=
"width:70px;"
>
单据日期:
</td>
<td
style=
"padding:5px;width:130px;"
>
<span
class=
"OperTimeShow"
></span>
</td>
<td
style=
"width:80px;"
>
单据编号:
</td>
<td
style=
"padding:5px;width:140px;"
>
<span
class=
"NumberShow"
></span>
</td>
<td
style=
"width:70px;"
></td>
<td
style=
"padding:5px;width:130px;"
></td>
<td
style=
"width:100px;"
></td>
</tr>
<tr>
<td
colspan=
"9"
style=
"width: 1300px;"
>
<!-- 商品列表table -->
<table
class=
"materialDataShow"
style=
"top:100px;border-bottom-color:#FFFFFF"
></table>
</td>
</tr>
<tr>
<td
style=
"width:60px;"
>
单据备注:
</td>
<td
colspan=
"8"
style=
"height:35px;"
>
<span
class=
"RemarkShow"
style=
"width: 1070px; height:35px;"
></span>
</td>
</tr>
</table>
</div>
<!--采购入库-->
<div
class=
"purchase_in"
style=
"width:1300px;padding:10px 20px;top:20px"
closed=
"true"
modal=
"true"
cache=
"false"
collapsible=
"false"
closable=
"true"
>
...
...
@@ -306,6 +341,43 @@
</tr>
</table>
</div>
<!--销售订单-->
<div
class=
"sale_orders"
style=
"width:1300px;padding:10px 20px;top:20px"
closed=
"true"
modal=
"true"
cache=
"false"
collapsible=
"false"
closable=
"true"
>
<table>
<tr>
<td
style=
"width:60px;"
>
客户:
</td>
<td
style=
"padding:5px;width:130px;"
>
<span
class=
"OrganIdShow"
></span>
</td>
<td
style=
"width:70px;"
>
单据日期:
</td>
<td
style=
"padding:5px;width:140px;"
>
<span
class=
"OperTimeShow"
></span>
</td>
<td
style=
"width:80px;"
>
单据编号:
</td>
<td
style=
"padding:5px;width:140px;"
>
<span
class=
"NumberShow"
></span>
</td>
<td
style=
"width:70px;"
>
销售人员:
</td>
<td
style=
"padding:5px;width:130px;"
>
<span
class=
"SalesmanShow"
></span>
</td>
<td
style=
"width:100px;"
></td>
</tr>
<tr>
<td
colspan=
"9"
style=
"width: 1300px;"
>
<!-- 商品列表table -->
<table
class=
"materialDataShow"
style=
"top:100px;border-bottom-color:#FFFFFF"
></table>
</td>
</tr>
<tr>
<td
style=
"width:60px;"
>
单据备注:
</td>
<td
colspan=
"8"
style=
"height:35px;"
>
<span
class=
"RemarkShow"
style=
"width: 1070px; height:35px;"
></span>
</td>
</tr>
</table>
</div>
<!--销售出库-->
<div
class=
"sale_out"
style=
"width:1300px;padding:10px 20px;top:20px"
closed=
"true"
modal=
"true"
cache=
"false"
collapsible=
"false"
closable=
"true"
>
...
...
erp_web/pages/bill/purchase_in_list.html
View file @
4ac640c5
...
...
@@ -381,7 +381,7 @@
},
{
title
:
'
供应商名称
'
,
field
:
'
organName
'
,
width
:
120
},
{
title
:
'
单据编号
'
,
field
:
'
number
'
,
width
:
155
,
formatter
:
function
(
value
,
rec
)
{
if
(
rec
.
link
n
umber
)
{
if
(
rec
.
link
N
umber
)
{
return
value
+
"
[转]
"
;
}
else
{
return
value
;
...
...
@@ -459,12 +459,13 @@
onClickButton
:
function
(){
$
(
'
#linkBillDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="/js/easyui/themes/icons/edit_add.png"/> 选择关联单据
'
);
$
(
"
#linkBillDlg
"
).
panel
(
"
move
"
,{
top
:
$
(
document
).
scrollTop
()
+
(
$
(
window
).
height
()
-
400
)
*
0.5
});
initLinkBillTableData
();
initLinkBillTableData
(
1
,
initPageSize
);
initLinkBillPager
();
}
});
url
=
'
/depotHead/addDepotHeadAndDetail
'
;
}
function
initLinkBillTableData
()
{
function
initLinkBillTableData
(
pageNo
,
pageSize
)
{
$
(
'
#linkBillData
'
).
datagrid
({
height
:
300
,
rownumbers
:
false
,
...
...
@@ -476,7 +477,7 @@
pagination
:
true
,
//交替出现背景
striped
:
true
,
pageSize
:
10
,
pageSize
:
2
,
pageList
:
initPageNum
,
columns
:[[
{
field
:
'
id
'
,
width
:
35
,
align
:
"
center
"
,
checkbox
:
true
},
...
...
@@ -513,8 +514,8 @@
materialParam
:
""
,
depotIds
:
depotString
}),
currentPage
:
1
,
pageSize
:
initP
ageSize
currentPage
:
pageNo
,
pageSize
:
p
ageSize
}),
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
){
...
...
@@ -540,6 +541,26 @@
}
});
}
function
initLinkBillPager
()
{
try
{
var
opts
=
$
(
"
#linkBillData
"
).
datagrid
(
'
options
'
);
var
pager
=
$
(
"
#linkBillData
"
).
datagrid
(
'
getPager
'
);
pager
.
pagination
({
onSelectPage
:
function
(
pageNum
,
pageSize
)
{
opts
.
pageNumber
=
pageNum
;
opts
.
pageSize
=
pageSize
;
pager
.
pagination
(
'
refresh
'
,
{
pageNumber
:
pageNum
,
pageSize
:
pageSize
});
initLinkBillTableData
(
pageNum
,
pageSize
);
}
});
}
catch
(
e
)
{
$
.
messager
.
alert
(
'
异常处理提示
'
,
"
分页信息异常 :
"
+
e
.
name
+
"
:
"
+
e
.
message
,
'
error
'
);
}
}
//编辑信息
function
editDepotHead
(
index
)
{
var
res
=
$
(
"
#tableData
"
).
datagrid
(
"
getRows
"
)[
index
];
...
...
@@ -634,7 +655,10 @@
}
$
(
"
#DebtShow
"
).
text
(
debt
);
$
(
"
#AccountDayShow
"
).
text
(
res
.
accountDay
);
//结算天数
$
(
"
#LinkNumberShow
"
).
text
(
res
.
linkNumber
);
//关联订单号
//关联订单号
$
(
"
#LinkNumberShow
"
).
text
(
res
.
linkNumber
).
addClass
(
"
n-link
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
turnBillDetailPage
(
res
.
linkNumber
,
"
采购订单
"
);
});
var
otherMoney
=
res
.
otherMoney
?
res
.
otherMoney
:
0
;
if
(
otherMoney
!=
0
&&
res
.
otherMoneyList
&&
res
.
otherMoneyItem
){
var
itemArr
=
res
.
otherMoneyList
.
split
(
"
,
"
);
//支出项目id列表
...
...
erp_web/pages/bill/purchase_orders_list.html
View file @
4ac640c5
...
...
@@ -305,7 +305,7 @@
},
{
title
:
'
供应商名称
'
,
field
:
'
organName
'
,
width
:
120
},
{
title
:
'
单据编号
'
,
field
:
'
number
'
,
width
:
155
,
formatter
:
function
(
value
,
rec
)
{
if
(
rec
.
link
n
umber
)
{
if
(
rec
.
link
N
umber
)
{
return
value
+
"
[转]
"
;
}
else
{
return
value
;
...
...
erp_web/pages/bill/sale_orders_list.html
View file @
4ac640c5
...
...
@@ -293,7 +293,7 @@
pageList
:
initPageNum
,
columns
:[[
{
field
:
'
id
'
,
width
:
35
,
align
:
"
center
"
,
checkbox
:
true
},
{
title
:
'
操作
'
,
field
:
'
op
'
,
align
:
"
center
"
,
width
:
12
0
,
{
title
:
'
操作
'
,
field
:
'
op
'
,
align
:
"
center
"
,
width
:
9
0
,
formatter
:
function
(
value
,
rec
,
index
)
{
var
str
=
''
;
var
orgId
=
rec
.
organId
?
rec
.
organId
:
0
;
...
...
@@ -302,13 +302,12 @@
str
+=
'
<img title="编辑" src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepotHead(
\'
'
+
index
+
'
\'
);"/>
'
;
str
+=
'
<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="inOutService.deleteDepotHead(
'
+
rec
.
id
+
'
,
'
+
orgId
+
'
,
'
+
rec
.
totalPrice
+
'
,
'
+
rec
.
status
+
'
);"/>
'
;
}
str
+=
'
<img title="转销售出库" src="/js/easyui/themes/icons/redo.png" style="cursor: pointer;" onclick="skipDepotHead(
\'
'
+
index
+
'
\'
);"/>
'
;
return
str
;
}
},
{
title
:
'
客户名称
'
,
field
:
'
organName
'
,
width
:
120
},
{
title
:
'
单据编号
'
,
field
:
'
number
'
,
width
:
155
,
formatter
:
function
(
value
,
rec
)
{
if
(
rec
.
link
n
umber
)
{
if
(
rec
.
link
N
umber
)
{
return
value
+
"
[转]
"
;
}
else
{
return
value
;
...
...
erp_web/pages/bill/sale_out_list.html
View file @
4ac640c5
...
...
@@ -82,7 +82,7 @@
</td>
<td
style=
"width:70px;"
>
关联订单
</td>
<td
style=
"padding:5px"
>
<input
name=
"LinkNumber"
id=
"LinkNumber"
class=
"easyui-
validatebox radius-ui
"
style=
"width: 15
0
px;"
readonly
/>
<input
name=
"LinkNumber"
id=
"LinkNumber"
class=
"easyui-
textbox"
data-options=
"buttonText:'选择',editable:false
"
style=
"width: 1
8
5px;"
/>
</td>
<td
style=
"width:100px;"
></td>
</tr>
...
...
@@ -288,6 +288,15 @@
<a
href=
"javascript:void(0)"
id=
"saveOtherMoneyDlg"
class=
"easyui-linkbutton"
iconCls=
"icon-ok"
>
保存
</a>
<a
href=
"javascript:void(0)"
id=
"cancelOtherMoneyDlg"
class=
"easyui-linkbutton"
iconCls=
"icon-cancel"
>
取消
</a>
</div>
<div
id=
"linkBillDlg"
class=
"easyui-dialog"
style=
"width:880px;padding:10px 20px;"
closed=
"true"
modal=
"true"
buttons=
"#linkBillDlgBtn"
cache=
"false"
collapsible=
"false"
closable=
"true"
>
<table
id=
"linkBillData"
style=
"top:100px;border-bottom-color:#FFFFFF"
></table>
</div>
<div
id=
"linkBillDlgBtn"
>
<a
href=
"javascript:void(0)"
id=
"saveLinkBill"
class=
"easyui-linkbutton"
iconCls=
"icon-ok"
>
选择
</a>
<a
href=
"javascript:void(0)"
id=
"cancelLinkBill"
class=
"easyui-linkbutton"
iconCls=
"icon-cancel"
onclick=
"javascript:$('#linkBillDlg').dialog('close')"
>
取消
</a>
</div>
<div
id=
"supplier"
></div>
<div
id=
"depot"
></div>
<div
id=
"account"
></div>
...
...
@@ -374,7 +383,7 @@
},
{
title
:
'
客户名称
'
,
field
:
'
organName
'
,
width
:
120
},
{
title
:
'
单据编号
'
,
field
:
'
number
'
,
width
:
155
,
formatter
:
function
(
value
,
rec
)
{
if
(
rec
.
link
n
umber
)
{
if
(
rec
.
link
N
umber
)
{
return
value
+
"
[转]
"
;
}
else
{
return
value
;
...
...
@@ -457,8 +466,113 @@
$
(
'
#accountFM
'
).
form
(
'
clear
'
);
bindAccountEvent
();
});
//关联订单的选择事件
$
(
'
#LinkNumber
'
).
textbox
({
onClickButton
:
function
(){
$
(
'
#linkBillDlg
'
).
dialog
(
'
open
'
).
dialog
(
'
setTitle
'
,
'
<img src="/js/easyui/themes/icons/edit_add.png"/> 选择关联单据
'
);
$
(
"
#linkBillDlg
"
).
panel
(
"
move
"
,{
top
:
$
(
document
).
scrollTop
()
+
(
$
(
window
).
height
()
-
400
)
*
0.5
});
initLinkBillTableData
(
1
,
initPageSize
);
initLinkBillPager
();
}
});
url
=
'
/depotHead/addDepotHeadAndDetail
'
;
}
function
initLinkBillTableData
(
pageNo
,
pageSize
)
{
$
(
'
#linkBillData
'
).
datagrid
({
height
:
300
,
rownumbers
:
false
,
//动画效果
animate
:
false
,
//选中单行
singleSelect
:
true
,
collapsible
:
false
,
pagination
:
true
,
//交替出现背景
striped
:
true
,
pageSize
:
10
,
pageList
:
initPageNum
,
columns
:[[
{
field
:
'
id
'
,
width
:
35
,
align
:
"
center
"
,
checkbox
:
true
},
{
title
:
'
供应商名称
'
,
field
:
'
organName
'
,
width
:
120
},
{
title
:
'
单据编号
'
,
field
:
'
number
'
,
width
:
155
},
{
title
:
'
商品信息
'
,
field
:
'
materialsList
'
,
width
:
200
,
formatter
:
function
(
value
){
if
(
value
)
{
return
value
.
replace
(
"
,
"
,
"
,
"
);
}
}
},
{
title
:
'
单据日期
'
,
field
:
'
operTimeStr
'
,
width
:
145
},
{
title
:
'
操作员
'
,
field
:
'
userName
'
,
width
:
60
},
{
title
:
'
金额合计
'
,
field
:
'
totalPrice
'
,
width
:
70
}
]],
onLoadError
:
function
()
{
$
.
messager
.
alert
(
'
页面加载提示
'
,
'
页面加载异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
$
.
ajax
({
type
:
"
get
"
,
url
:
"
/depotHead/list
"
,
dataType
:
"
json
"
,
data
:
({
search
:
JSON
.
stringify
({
type
:
"
其它
"
,
subType
:
"
销售订单
"
,
roleType
:
roleType
,
status
:
"
1
"
,
number
:
""
,
beginTime
:
""
,
endTime
:
""
,
materialParam
:
""
,
depotIds
:
depotString
}),
currentPage
:
1
,
pageSize
:
initPageSize
}),
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
){
if
(
res
.
data
&&
res
.
data
.
page
)
{
$
(
"
#linkBillData
"
).
datagrid
(
'
loadData
'
,
res
.
data
.
page
);
$
(
"
#saveLinkBill
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
(){
var
res
=
$
(
'
#linkBillData
'
).
datagrid
(
'
getChecked
'
)[
0
];
$
(
'
#OrganId
'
).
combobox
(
'
setValue
'
,
res
.
organId
);
$
(
"
#LinkNumber
"
).
textbox
(
"
setValue
"
,
res
.
number
);
//关联订单号
$
(
"
#DiscountLastMoney
"
).
val
(
res
.
totalPrice
);
//优惠后金额
$
(
"
#ChangeAmount
"
).
val
(
res
.
totalPrice
).
attr
(
"
data-changeamount
"
,
res
.
totalPrice
);
depotHeadID
=
res
.
id
;
initTableData_material
(
"
edit
"
,
res
.
totalPrice
);
//商品列表
$
(
'
#linkBillDlg
'
).
dialog
(
'
close
'
);
});
}
}
},
//此处添加错误处理
error
:
function
()
{
$
.
messager
.
alert
(
'
查询提示
'
,
'
查询数据后台异常,请稍后再试!
'
,
'
error
'
);
return
;
}
});
}
function
initLinkBillPager
()
{
try
{
var
opts
=
$
(
"
#linkBillData
"
).
datagrid
(
'
options
'
);
var
pager
=
$
(
"
#linkBillData
"
).
datagrid
(
'
getPager
'
);
pager
.
pagination
({
onSelectPage
:
function
(
pageNum
,
pageSize
)
{
opts
.
pageNumber
=
pageNum
;
opts
.
pageSize
=
pageSize
;
pager
.
pagination
(
'
refresh
'
,
{
pageNumber
:
pageNum
,
pageSize
:
pageSize
});
initLinkBillTableData
(
pageNum
,
pageSize
);
}
});
}
catch
(
e
)
{
$
.
messager
.
alert
(
'
异常处理提示
'
,
"
分页信息异常 :
"
+
e
.
name
+
"
:
"
+
e
.
message
,
'
error
'
);
}
}
//编辑信息
function
editDepotHead
(
index
)
{
var
res
=
$
(
"
#tableData
"
).
datagrid
(
"
getRows
"
)[
index
];
...
...
@@ -579,7 +693,10 @@
}
$
(
"
#DebtShow
"
).
text
(
debt
);
$
(
"
#AccountDayShow
"
).
text
(
res
.
accountDay
);
//结算天数
$
(
"
#LinkNumberShow
"
).
text
(
res
.
linkNumber
);
//关联订单号
//关联订单号
$
(
"
#LinkNumberShow
"
).
text
(
res
.
linkNumber
).
addClass
(
"
n-link
"
).
off
(
"
click
"
).
on
(
"
click
"
,
function
()
{
turnBillDetailPage
(
res
.
linkNumber
,
"
销售订单
"
);
});
var
otherMoney
=
res
.
otherMoney
?
res
.
otherMoney
:
0
;
if
(
otherMoney
!=
0
&&
res
.
otherMoneyList
&&
res
.
otherMoneyItem
){
var
itemArr
=
res
.
otherMoneyList
.
split
(
"
,
"
);
//支出项目id列表
...
...
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