Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
yunxin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
37b619a0
authored
May 28, 2019
by
PRY5YKGJ82EZEPX\Administrator
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
对接财务对账
parent
249a0d31
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
51 additions
and
52 deletions
.env
app/Http/Controllers/ApiController.php
app/Http/Controllers/WebController.php
app/Model/ExportModel.php
app/Model/Server/ServerFinanceModel.php
config/yunxin_conf.php
public/pc/js/controller/CheckingDetail.js → public/pc/js/controller/ReconcilePurDetail.js
public/pc/js/controller/CheckingList.js → public/pc/js/controller/ReconcilePurList.js
resources/views/pc.blade.php
resources/views/pc/CheckingDetail.blade.php → resources/views/pc/ReconcilePurDetail.blade.php
resources/views/pc/CheckingList.blade.php → resources/views/pc/ReconcilePurList.blade.php
.env
View file @
37b619a0
...
...
@@ -8,28 +8,28 @@ DB_CONNECTION=mysql
DB_HOST=192.168.1.232
DB_PORT=3306
DB_DATABASE=ichuntcms
DB_USERNAME=
root
DB_PASSWORD=
123456
DB_USERNAME=
ichuntcms
DB_PASSWORD=
ichuntcms#zsyM
//云芯数据库
DB_HOST_PUR=192.168.1.232
DB_DATABASE_PUR=liexin_wms
DB_USERNAME_PUR=
root
DB_PASSWORD_PUR=
123456
DB_USERNAME_PUR=
liexin_wms
DB_PASSWORD_PUR=
liexin_wms#zsyM
DB_PORT_PUR=3306
//财务数据库
DB_HOST_FINANCE=192.168.1.232
DB_DATABASE_FINANCE=liexin_finance
DB_USERNAME_FINANCE=
root
DB_PASSWORD_FINANCE=
123456
DB_USERNAME_FINANCE=
liexin_finance
DB_PASSWORD_FINANCE=
liexin_finance#zsyM
DB_PORT_FINANCE=3306
//云芯数据库
DB_HOST_YUNXIN=192.168.1.232
DB_DATABASE_YUNXIN=liexin_yunxin
DB_USERNAME_YUNXIN=
root
DB_PASSWORD_YUNXIN=
123456
DB_USERNAME_YUNXIN=
liexin_yunxin
DB_PASSWORD_YUNXIN=
liexin_yunxin#zsyM
DB_PORT_YUNXIN=3306
//猎芯数据库
...
...
app/Http/Controllers/ApiController.php
View file @
37b619a0
...
...
@@ -104,12 +104,16 @@ class ApiController extends Controller
Export
(
0
,
$id
);
}
//获取对账单列表
private
function
ApiAccountCheckingList
(
$request
,
$id
){
(
new
ServerFinanceModel
(
$request
->
appid
,
$request
->
key
))
->
accountCheckingList
(
$request
->
input
());
private
function
ApiReconcilePurList
(
$request
,
$id
){
(
new
ServerFinanceModel
(
$request
->
appid
,
$request
->
key
))
->
reconcilePurList
(
$request
->
input
());
}
//获取对账单列表明细
private
function
ApiReconcilePurDetail
(
$request
,
$id
){
(
new
ServerFinanceModel
(
$request
->
appid
,
$request
->
key
))
->
reconcilePurDetail
(
$request
->
input
());
}
//对账单列表导出
private
function
Api
AccountChecking
ListExport
(
$request
,
$id
){
ExportModel
::
Api
AccountChecking
ListExport
(
$request
);
private
function
Api
ReconcilePur
ListExport
(
$request
,
$id
){
ExportModel
::
Api
ReconcilePur
ListExport
(
$request
);
}
//价格审核列表
private
function
ApiGoodsAuditList
(
$request
,
$id
){
...
...
@@ -125,10 +129,6 @@ class ApiController extends Controller
private
function
ApiGoodsAuditExmine
(
$request
,
$id
){
Export
((
new
GoodsAuditModel
())
->
exmine
(
$request
->
input
(
'id'
),
$request
->
input
(
'status'
),
$request
->
supplier_id
));
}
//获取对账单列表明细
private
function
ApiAccountCheckingDetail
(
$request
,
$id
){
(
new
ServerFinanceModel
(
$request
->
appid
,
$request
->
key
))
->
accountCheckingDetail
(
$request
->
input
());
}
//对账列表明细
private
function
ApiAccountChangeChecking
(
$request
,
$id
){
$input
=
$request
->
input
();
...
...
app/Http/Controllers/WebController.php
View file @
37b619a0
...
...
@@ -104,12 +104,12 @@ class WebController extends Controller
return
view
(
'pc'
,
$data
);
}
//财务对账列表
private
function
Checking
List
(
$request
,
$data
,
$id
){
private
function
ReconcilePur
List
(
$request
,
$data
,
$id
){
$data
[
'title'
]
=
'对账列表'
;
return
view
(
'pc'
,
$data
);
}
//财务对账列表-明细
private
function
Checking
Detail
(
$request
,
$data
,
$id
){
private
function
ReconcilePur
Detail
(
$request
,
$data
,
$id
){
$data
[
'title'
]
=
'对账详情'
;
return
view
(
'pc'
,
$data
);
}
...
...
app/Model/ExportModel.php
View file @
37b619a0
...
...
@@ -65,10 +65,10 @@ class ExportModel
export_csv
(
$out
,[
'退货单号'
,
'创建单时间'
,
'金额'
,
'状态'
,
'币种'
,
'商品编码'
,
'型号'
,
'品牌'
,
'封装'
,
'包装方式'
,
'MPQ'
,
'数量'
,
'单价'
],
'退货列表导出'
.
time
()
.
'.csv'
);
}
//对账单列表导出
static
function
Api
AccountChecking
ListExport
(
$request
,
$id
){
static
function
Api
ReconcilePur
ListExport
(
$request
,
$id
){
$input
=
$request
->
input
();
$input
[
'type'
]
=
2
;
//导出类型
$res
=
(
new
ServerFinanceModel
(
$request
->
appid
,
$request
->
key
))
->
accountChecking
List
(
$input
,
2
);
$res
=
(
new
ServerFinanceModel
(
$request
->
appid
,
$request
->
key
))
->
reconcilePur
List
(
$input
,
2
);
if
(
$res
[
'errcode'
]
>
0
){
exit
(
"没有数据"
);
}
...
...
app/Model/Server/ServerFinanceModel.php
View file @
37b619a0
...
...
@@ -22,7 +22,7 @@ class ServerFinanceModel
public
function
push
(
$url
,
$data
,
$type
=
1
){
$datas
=
ExcessEncryption
(
$data
,
$this
->
appid
,
$this
->
key
);
$urls
=
$this
->
_url
.
$url
;
$res
=
(
curl
(
$urls
,
$datas
)
);
$res
=
curl
(
$urls
,
$datas
);
if
(
self
::
IS_DEBUG
){
print_r
(
$urls
);
...
...
@@ -42,12 +42,12 @@ class ServerFinanceModel
}
}
//获取对账单列表
public
function
accountChecking
List
(
$input
,
$type
=
1
){
return
$this
->
push
(
'/thrid/
accountChecking
List'
,
$input
,
$type
);
public
function
reconcilePur
List
(
$input
,
$type
=
1
){
return
$this
->
push
(
'/thrid/
reconcilePur
List'
,
$input
,
$type
);
}
//获取对账单列表明细
public
function
accountChecking
Detail
(
$input
){
return
$this
->
push
(
'/thrid/
accountChecking
Detail'
,
$input
);
public
function
reconcilePur
Detail
(
$input
){
return
$this
->
push
(
'/thrid/
reconcilePur
Detail'
,
$input
);
}
//对账确定
public
function
accountChangeChecking
(
$input
){
...
...
config/yunxin_conf.php
View file @
37b619a0
...
...
@@ -9,7 +9,7 @@ return [
'release'
=>
'http://footstone.ichunt.net'
],
'finance_domain'
=>
[
//财务网址
'local'
=>
'http://finance.liexin.
net
'
,
'local'
=>
'http://finance.liexin.
com
'
,
'sz'
=>
'http://szfinance.ichunt.net'
,
'release'
=>
'http://finance.ichunt.net'
],
...
...
public/pc/js/controller/
Checking
Detail.js
→
public/pc/js/controller/
ReconcilePur
Detail.js
View file @
37b619a0
...
...
@@ -9,18 +9,18 @@
//对账完成
$
(
"#changeChecking"
).
click
(
function
()
{
alert_confirm
(
"确定对账完成?"
,
function
()
{
var
res
=
ajax_push
(
"/api/ApiAccountChangeChecking"
,{
"
checking_id"
:
$
(
"#checking_
id"
).
val
()});
res
.
code
>
0
?
alert_err
(
res
.
msg
)
:
alert_succ
(
res
.
msg
,
function
()
{
var
res
=
ajax_push
(
"/api/ApiAccountChangeChecking"
,{
"
id"
:
$
(
"#
id"
).
val
()});
res
.
code
>
0
?
alert_err
(
res
.
msg
)
:
alert_succ
(
res
.
err
msg
,
function
()
{
window
.
location
.
reload
()
});
})
})
},
tableList
:
function
(
page
)
{
var
res
=
ajax_push
(
URL_YUNXIN
+
'/api/Api
AccountCheckingDetail'
,{
'p'
:
page
,
'checking_id'
:
$
(
"#checking_
id"
).
val
()})
if
(
res
.
err
code
==
0
)
{
var
res
=
ajax_push
(
URL_YUNXIN
+
'/api/Api
ReconcilePurDetail'
,{
'p'
:
page
,
'id'
:
$
(
"#
id"
).
val
()})
if
(
res
.
code
==
0
)
{
var
other
=
res
.
other
;
$
(
".
checking_sn"
).
html
(
other
.
checking
_sn
);
$
(
".
reconcile_pur_sn"
).
html
(
other
.
reconcile_pur
_sn
);
$
(
".settle"
).
html
(
other
.
settle
);
$
(
".status"
).
html
(
other
.
status
);
$
(
".create_time"
).
html
(
other
.
create_time
);
...
...
public/pc/js/controller/
Checking
List.js
→
public/pc/js/controller/
ReconcilePur
List.js
View file @
37b619a0
...
...
@@ -8,7 +8,7 @@
})
//导出
$
(
"#export"
).
click
(
function
()
{
exportUrl
(
'/api/Api
AccountChecking
ListExport'
,
'form1'
,
'确定导出数据?'
)
exportUrl
(
'/api/Api
ReconcilePur
ListExport'
,
'form1'
,
'确定导出数据?'
)
})
//下单时间选择
layui
.
laydate
.
render
({
...
...
@@ -29,14 +29,14 @@
'create_time1'
:
$
(
"#create_time1"
).
val
(),
'create_time2'
:
$
(
"#create_time2"
).
val
(),
}
var
res
=
ajax_push
(
URL_YUNXIN
+
'/api/Api
AccountChecking
List'
,
postData
)
var
res
=
ajax_push
(
URL_YUNXIN
+
'/api/Api
ReconcilePur
List'
,
postData
)
if
(
res
.
code
==
0
)
{
var
html
=
""
;
if
(
res
.
data
.
length
>
0
)
{
for
(
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
var
s
=
res
.
data
[
i
];
html
+=
"<tr class=\"you\"> "
+
"<td><span class=\"t1\">"
+
s
.
checking
_sn
+
"</span></td>"
+
"<td><span class=\"t1\">"
+
s
.
reconcile_pur
_sn
+
"</span></td>"
+
"<td><span class=\"t1\">"
+
s
.
amount
+
"</span></td>"
+
"<td><span class=\"t1\">"
+
s
.
currency
+
"</span></td>"
+
"<td><span class=\"t1\">"
+
s
.
day_num
+
"</span></td>"
+
...
...
@@ -44,7 +44,7 @@
"<td><span class=\"t1\">"
+
s
.
create_time
+
"</span></td>"
+
"<td><span class=\"t1\">"
+
s
.
checking_time
+
"</span></td>"
+
"<td><span class=\"t1\">"
+
s
.
status
+
"</span></td>"
+
"<td><a href=\"/web/
CheckingDetail?id="
+
s
.
checking_
id
+
"\" class=\"lineBlock va-m operation-1\"><i class=\"iconfont icon-mingxi-\"></i><em>明细</em></a></td></tr>"
"<td><a href=\"/web/
ReconcilePurDetail?id="
+
s
.
id
+
"\" class=\"lineBlock va-m operation-1\"><i class=\"iconfont icon-mingxi-\"></i><em>明细</em></a></td></tr>"
;
}
}
else
{
...
...
resources/views/pc.blade.php
View file @
37b619a0
...
...
@@ -138,20 +138,19 @@
</dl>
</li>
<?php
}
?>
<!--
{{--<li >--}}
{{--<a href="javascript:;" class="bx">--}}
{{--<i class="iconfont icon-dingdanguanli- va-m"></i>--}}
{{--<span class="t1 lineBlock va-m">财务管理</span>--}}
{{--<b class="iconfont icon-xiala-"></b>--}}
{{--</a>--}}
{{--<dl
<?php
if
(
in_array
(
$id
,[
'CheckingList'
,
'CheckingDetail'
])
!==
false
)
echo
"style='display: block;'"
?>
>--}}
{{--<dd class="curr">--}}
{{--<i class="line"></i>--}}
{{--<a href="/web/CheckingList">对账列表</a>--}}
{{--</dd>--}}
{{--</dl>--}}
{{--</li>--}} -->
<li
>
<a
href=
"javascript:;"
class=
"bx"
>
<i
class=
"iconfont icon-dingdanguanli- va-m"
></i>
<span
class=
"t1 lineBlock va-m"
>
财务管理
</span>
<b
class=
"iconfont icon-xiala-"
></b>
</a>
<dl
<?php
if
(
in_array
(
$id
,[
'ReconcilePurList'
,
'ReconcilePurDetail'
])
!==
false
)
echo
"style='display: block;'"
?>
>
<dd
class=
"curr"
>
<i
class=
"line"
></i>
<a
href=
"/web/ReconcilePurList"
>
对账列表
</a>
</dd>
</dl>
</li>
</ul>
</div>
...
...
resources/views/pc/
Checking
Detail.blade.php
→
resources/views/pc/
ReconcilePur
Detail.blade.php
View file @
37b619a0
...
...
@@ -11,7 +11,7 @@
<div
class=
"detail-list"
>
<div
class=
"lineBlock va-m mr100"
>
<span
class=
"lineBlock t1"
>
对账单号:
</span>
<span
class=
"lineBlock t2
checking
_sn"
></span>
<span
class=
"lineBlock t2
reconcile_pur
_sn"
></span>
</div>
<div
class=
"lineBlock va-m mr126"
>
<span
class=
"lineBlock t1"
>
创建时间:
</span>
...
...
@@ -72,4 +72,4 @@
</div>
</div>
<!--隐藏域-->
<input
type=
"hidden"
value=
"{{ @$_GET['id'] }}"
id=
"checking_id"
>
\ No newline at end of file
<input
type=
"hidden"
value=
"{{ @$_GET['id'] }}"
id=
"id"
>
\ No newline at end of file
resources/views/pc/
Checking
List.blade.php
→
resources/views/pc/
ReconcilePur
List.blade.php
View file @
37b619a0
File moved
Write
Preview
Markdown
is supported
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