对接财务对账

parent 249a0d31
...@@ -8,28 +8,28 @@ DB_CONNECTION=mysql ...@@ -8,28 +8,28 @@ DB_CONNECTION=mysql
DB_HOST=192.168.1.232 DB_HOST=192.168.1.232
DB_PORT=3306 DB_PORT=3306
DB_DATABASE=ichuntcms DB_DATABASE=ichuntcms
DB_USERNAME=root DB_USERNAME=ichuntcms
DB_PASSWORD=123456 DB_PASSWORD=ichuntcms#zsyM
//云芯数据库 //云芯数据库
DB_HOST_PUR=192.168.1.232 DB_HOST_PUR=192.168.1.232
DB_DATABASE_PUR=liexin_wms DB_DATABASE_PUR=liexin_wms
DB_USERNAME_PUR=root DB_USERNAME_PUR=liexin_wms
DB_PASSWORD_PUR=123456 DB_PASSWORD_PUR=liexin_wms#zsyM
DB_PORT_PUR=3306 DB_PORT_PUR=3306
//财务数据库 //财务数据库
DB_HOST_FINANCE=192.168.1.232 DB_HOST_FINANCE=192.168.1.232
DB_DATABASE_FINANCE=liexin_finance DB_DATABASE_FINANCE=liexin_finance
DB_USERNAME_FINANCE=root DB_USERNAME_FINANCE=liexin_finance
DB_PASSWORD_FINANCE=123456 DB_PASSWORD_FINANCE=liexin_finance#zsyM
DB_PORT_FINANCE=3306 DB_PORT_FINANCE=3306
//云芯数据库 //云芯数据库
DB_HOST_YUNXIN=192.168.1.232 DB_HOST_YUNXIN=192.168.1.232
DB_DATABASE_YUNXIN=liexin_yunxin DB_DATABASE_YUNXIN=liexin_yunxin
DB_USERNAME_YUNXIN=root DB_USERNAME_YUNXIN=liexin_yunxin
DB_PASSWORD_YUNXIN=123456 DB_PASSWORD_YUNXIN=liexin_yunxin#zsyM
DB_PORT_YUNXIN=3306 DB_PORT_YUNXIN=3306
//猎芯数据库 //猎芯数据库
......
...@@ -104,12 +104,16 @@ class ApiController extends Controller ...@@ -104,12 +104,16 @@ class ApiController extends Controller
Export(0,$id); Export(0,$id);
} }
//获取对账单列表 //获取对账单列表
private function ApiAccountCheckingList($request, $id){ private function ApiReconcilePurList($request, $id){
(new ServerFinanceModel($request->appid,$request->key))->accountCheckingList($request->input()); (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){ private function ApiReconcilePurListExport($request, $id){
ExportModel::ApiAccountCheckingListExport($request); ExportModel::ApiReconcilePurListExport($request);
} }
//价格审核列表 //价格审核列表
private function ApiGoodsAuditList($request, $id){ private function ApiGoodsAuditList($request, $id){
...@@ -125,10 +129,6 @@ class ApiController extends Controller ...@@ -125,10 +129,6 @@ class ApiController extends Controller
private function ApiGoodsAuditExmine($request, $id){ private function ApiGoodsAuditExmine($request, $id){
Export((new GoodsAuditModel())->exmine($request->input('id'),$request->input('status'),$request->supplier_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){ private function ApiAccountChangeChecking($request, $id){
$input = $request->input(); $input = $request->input();
......
...@@ -104,12 +104,12 @@ class WebController extends Controller ...@@ -104,12 +104,12 @@ class WebController extends Controller
return view('pc',$data); return view('pc',$data);
} }
//财务对账列表 //财务对账列表
private function CheckingList($request,$data,$id){ private function ReconcilePurList($request,$data,$id){
$data['title']='对账列表'; $data['title']='对账列表';
return view('pc',$data); return view('pc',$data);
} }
//财务对账列表-明细 //财务对账列表-明细
private function CheckingDetail($request,$data,$id){ private function ReconcilePurDetail($request,$data,$id){
$data['title']='对账详情'; $data['title']='对账详情';
return view('pc',$data); return view('pc',$data);
} }
......
...@@ -65,10 +65,10 @@ class ExportModel ...@@ -65,10 +65,10 @@ class ExportModel
export_csv($out,['退货单号','创建单时间','金额','状态','币种','商品编码','型号','品牌','封装','包装方式','MPQ','数量','单价'],'退货列表导出'.time().'.csv'); export_csv($out,['退货单号','创建单时间','金额','状态','币种','商品编码','型号','品牌','封装','包装方式','MPQ','数量','单价'],'退货列表导出'.time().'.csv');
} }
//对账单列表导出 //对账单列表导出
static function ApiAccountCheckingListExport($request, $id){ static function ApiReconcilePurListExport($request, $id){
$input = $request->input(); $input = $request->input();
$input['type'] = 2; //导出类型 $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 ){ if ($res['errcode'] > 0 ){
exit("没有数据"); exit("没有数据");
} }
......
...@@ -22,7 +22,7 @@ class ServerFinanceModel ...@@ -22,7 +22,7 @@ class ServerFinanceModel
public function push($url,$data,$type = 1){ public function push($url,$data,$type = 1){
$datas = ExcessEncryption($data,$this->appid,$this->key); $datas = ExcessEncryption($data,$this->appid,$this->key);
$urls = $this->_url.$url; $urls = $this->_url.$url;
$res = (curl($urls,$datas)); $res = curl($urls,$datas);
if (self::IS_DEBUG){ if (self::IS_DEBUG){
print_r($urls); print_r($urls);
...@@ -42,12 +42,12 @@ class ServerFinanceModel ...@@ -42,12 +42,12 @@ class ServerFinanceModel
} }
} }
//获取对账单列表 //获取对账单列表
public function accountCheckingList($input,$type=1){ public function reconcilePurList($input,$type=1){
return $this->push('/thrid/accountCheckingList',$input,$type); return $this->push('/thrid/reconcilePurList',$input,$type);
} }
//获取对账单列表明细 //获取对账单列表明细
public function accountCheckingDetail($input){ public function reconcilePurDetail($input){
return $this->push('/thrid/accountCheckingDetail',$input); return $this->push('/thrid/reconcilePurDetail',$input);
} }
//对账确定 //对账确定
public function accountChangeChecking($input){ public function accountChangeChecking($input){
......
...@@ -9,7 +9,7 @@ return [ ...@@ -9,7 +9,7 @@ return [
'release'=>'http://footstone.ichunt.net' 'release'=>'http://footstone.ichunt.net'
], ],
'finance_domain'=>[ //财务网址 'finance_domain'=>[ //财务网址
'local'=>'http://finance.liexin.net', 'local'=>'http://finance.liexin.com',
'sz'=>'http://szfinance.ichunt.net', 'sz'=>'http://szfinance.ichunt.net',
'release'=>'http://finance.ichunt.net' 'release'=>'http://finance.ichunt.net'
], ],
......
...@@ -9,18 +9,18 @@ ...@@ -9,18 +9,18 @@
//对账完成 //对账完成
$("#changeChecking").click(function () { $("#changeChecking").click(function () {
alert_confirm("确定对账完成?",function () { alert_confirm("确定对账完成?",function () {
var res = ajax_push("/api/ApiAccountChangeChecking",{"checking_id":$("#checking_id").val()}); var res = ajax_push("/api/ApiAccountChangeChecking",{"id":$("#id").val()});
res.code > 0 ? alert_err(res.msg) : alert_succ(res.msg,function () { res.code > 0 ? alert_err(res.msg) : alert_succ(res.errmsg,function () {
window.location.reload() window.location.reload()
}); });
}) })
}) })
}, },
tableList:function (page) { tableList:function (page) {
var res = ajax_push(URL_YUNXIN + '/api/ApiAccountCheckingDetail',{'p':page,'checking_id':$("#checking_id").val()}) var res = ajax_push(URL_YUNXIN + '/api/ApiReconcilePurDetail',{'p':page,'id':$("#id").val()})
if (res.errcode == 0) { if (res.code == 0) {
var other = res.other; var other = res.other;
$(".checking_sn").html(other.checking_sn); $(".reconcile_pur_sn").html(other.reconcile_pur_sn);
$(".settle").html(other.settle); $(".settle").html(other.settle);
$(".status").html(other.status); $(".status").html(other.status);
$(".create_time").html(other.create_time); $(".create_time").html(other.create_time);
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
}) })
//导出 //导出
$("#export").click(function () { $("#export").click(function () {
exportUrl('/api/ApiAccountCheckingListExport','form1','确定导出数据?') exportUrl('/api/ApiReconcilePurListExport','form1','确定导出数据?')
}) })
//下单时间选择 //下单时间选择
layui.laydate.render({ layui.laydate.render({
...@@ -29,14 +29,14 @@ ...@@ -29,14 +29,14 @@
'create_time1':$("#create_time1").val(), 'create_time1':$("#create_time1").val(),
'create_time2':$("#create_time2").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) { if (res.code == 0) {
var html = ""; var html = "";
if(res.data.length > 0) { if(res.data.length > 0) {
for (i = 0; i < res.data.length; i++) { for (i = 0; i < res.data.length; i++) {
var s = res.data[i]; var s = res.data[i];
html += "<tr class=\"you\"> " + 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.amount+"</span></td>" +
"<td><span class=\"t1\">"+s.currency+"</span></td>" + "<td><span class=\"t1\">"+s.currency+"</span></td>" +
"<td><span class=\"t1\">"+s.day_num+"</span></td>" + "<td><span class=\"t1\">"+s.day_num+"</span></td>" +
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
"<td><span class=\"t1\">"+s.create_time+"</span></td>" + "<td><span class=\"t1\">"+s.create_time+"</span></td>" +
"<td><span class=\"t1\">"+s.checking_time+"</span></td>" + "<td><span class=\"t1\">"+s.checking_time+"</span></td>" +
"<td><span class=\"t1\">"+s.status+"</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{ }else{
......
...@@ -138,20 +138,19 @@ ...@@ -138,20 +138,19 @@
</dl> </dl>
</li> </li>
<?php } ?> <?php } ?>
<!-- <li >
{{--<li >--}} <a href="javascript:;" class="bx">
{{--<a href="javascript:;" class="bx">--}} <i class="iconfont icon-dingdanguanli- va-m"></i>
{{--<i class="iconfont icon-dingdanguanli- va-m"></i>--}} <span class="t1 lineBlock va-m">财务管理</span>
{{--<span class="t1 lineBlock va-m">财务管理</span>--}} <b class="iconfont icon-xiala-"></b>
{{--<b class="iconfont icon-xiala-"></b>--}} </a>
{{--</a>--}} <dl <?php if( in_array($id,['ReconcilePurList','ReconcilePurDetail']) !== false ) echo "style='display: block;'" ?>>
{{--<dl <?php if( in_array($id,['CheckingList','CheckingDetail']) !== false ) echo "style='display: block;'" ?>>--}} <dd class="curr">
{{--<dd class="curr">--}} <i class="line"></i>
{{--<i class="line"></i>--}} <a href="/web/ReconcilePurList">对账列表</a>
{{--<a href="/web/CheckingList">对账列表</a>--}} </dd>
{{--</dd>--}} </dl>
{{--</dl>--}} </li>
{{--</li>--}} -->
</ul> </ul>
</div> </div>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="detail-list"> <div class="detail-list">
<div class="lineBlock va-m mr100"> <div class="lineBlock va-m mr100">
<span class="lineBlock t1">对账单号:</span> <span class="lineBlock t1">对账单号:</span>
<span class="lineBlock t2 checking_sn"></span> <span class="lineBlock t2 reconcile_pur_sn"></span>
</div> </div>
<div class="lineBlock va-m mr126"> <div class="lineBlock va-m mr126">
<span class="lineBlock t1">创建时间:</span> <span class="lineBlock t1">创建时间:</span>
...@@ -72,4 +72,4 @@ ...@@ -72,4 +72,4 @@
</div> </div>
</div> </div>
<!--隐藏域--> <!--隐藏域-->
<input type="hidden" value="{{ @$_GET['id'] }}" id="checking_id"> <input type="hidden" value="{{ @$_GET['id'] }}" id="id">
\ No newline at end of file \ 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