对接财务对账

parent 249a0d31
......@@ -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
//猎芯数据库
......
......@@ -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 ApiAccountCheckingListExport($request, $id){
ExportModel::ApiAccountCheckingListExport($request);
private function ApiReconcilePurListExport($request, $id){
ExportModel::ApiReconcilePurListExport($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();
......
......@@ -104,12 +104,12 @@ class WebController extends Controller
return view('pc',$data);
}
//财务对账列表
private function CheckingList($request,$data,$id){
private function ReconcilePurList($request,$data,$id){
$data['title']='对账列表';
return view('pc',$data);
}
//财务对账列表-明细
private function CheckingDetail($request,$data,$id){
private function ReconcilePurDetail($request,$data,$id){
$data['title']='对账详情';
return view('pc',$data);
}
......
......@@ -65,10 +65,10 @@ class ExportModel
export_csv($out,['退货单号','创建单时间','金额','状态','币种','商品编码','型号','品牌','封装','包装方式','MPQ','数量','单价'],'退货列表导出'.time().'.csv');
}
//对账单列表导出
static function ApiAccountCheckingListExport($request, $id){
static function ApiReconcilePurListExport($request, $id){
$input = $request->input();
$input['type'] = 2; //导出类型
$res = (new ServerFinanceModel($request->appid,$request->key))->accountCheckingList($input,2);
$res = (new ServerFinanceModel($request->appid,$request->key))->reconcilePurList($input,2);
if ($res['errcode'] > 0 ){
exit("没有数据");
}
......
......@@ -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 accountCheckingList($input,$type=1){
return $this->push('/thrid/accountCheckingList',$input,$type);
public function reconcilePurList($input,$type=1){
return $this->push('/thrid/reconcilePurList',$input,$type);
}
//获取对账单列表明细
public function accountCheckingDetail($input){
return $this->push('/thrid/accountCheckingDetail',$input);
public function reconcilePurDetail($input){
return $this->push('/thrid/reconcilePurDetail',$input);
}
//对账确定
public function accountChangeChecking($input){
......
......@@ -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'
],
......
......@@ -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.errmsg,function () {
window.location.reload()
});
})
})
},
tableList:function (page) {
var res = ajax_push(URL_YUNXIN + '/api/ApiAccountCheckingDetail',{'p':page,'checking_id':$("#checking_id").val()})
if (res.errcode == 0) {
var res = ajax_push(URL_YUNXIN + '/api/ApiReconcilePurDetail',{'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);
......
......@@ -8,7 +8,7 @@
})
//导出
$("#export").click(function () {
exportUrl('/api/ApiAccountCheckingListExport','form1','确定导出数据?')
exportUrl('/api/ApiReconcilePurListExport','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/ApiAccountCheckingList',postData)
var res = ajax_push(URL_YUNXIN + '/api/ApiReconcilePurList',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{
......
......@@ -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>
......
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment