v1.0

parent b1f6e217
......@@ -85,4 +85,13 @@ class WebController extends Controller
$data['time']=time();
return view('pc',$data);
}
//财务对账列表-明细
private function CheckingDetail($request,$data,$id){
$data['title']='对账详情';
$data['time']=time();
return view('pc',$data);
}
}
<?php
return [
//需要自动补0的封装参数
'encap'=>array(
'1005'=>'01005',
'201'=>'0201',
'402'=>'0402',
'603'=>'0603',
'805'=>'0805',
'501'=>'0501',
'102'=>'0102',
'204'=>'0204',
'306'=>'0306',
'508'=>'0508',
'612'=>'0612',
'618'=>'0618',
'818'=>'0818',
)
];
......@@ -79,7 +79,7 @@ return [
*/
'failed' => [
'database' => env('DB_CONNECTION', 'mysql'),
'database' => 'yunxin',
'table' => 'failed_jobs',
],
......
......@@ -179,8 +179,8 @@ body { overflow-x: hidden; }
.lx-content .lx-content-wrap .lx-content-r .con-section .table-list table tr td .operation-0 em, .lx-content .lx-content-wrap .lx-content-r .con-section .table-list table tr td .operation-1 em { font-size: 12px; color: #1080d0; margin-left: 6px; }
.lx-content .lx-content-wrap .lx-content-r .con-section .table-list table tr:hover { background-color: #f6f6f6; }
.lx-content .lx-content-wrap .lx-content-r .con-section .detail-list { margin-left: 20px; margin-right: 20px; padding: 20px 0; }
.lx-content .lx-content-wrap .lx-content-r .con-section .detail-list .mr100 { margin-right: 100px; }
.lx-content .lx-content-wrap .lx-content-r .con-section .detail-list .mr126 { margin-right: 126px; }
.lx-content .lx-content-wrap .lx-content-r .con-section .detail-list .mr100 { margin-right: 5px; }
.lx-content .lx-content-wrap .lx-content-r .con-section .detail-list .mr126 { margin-right: 5px; }
.lx-content .lx-content-wrap .lx-content-r .con-section .detail-list .mr26 { margin-right: 26px; }
.lx-content .lx-content-wrap .lx-content-r .con-section .detail-list .mr33 { margin-right: 33px; }
.lx-content .lx-content-wrap .lx-content-r .con-section .detail-list .mr40 { margin-right: 40px; }
......
;!function () {
window.Login = {
init: function () {
this.tableList(1);
//刷新搜索
$("#search").click(function () {
tableList(1)
})
//对账完成
$("#changeChecking").click(function () {
alert_confirm("确定对账完成?",function () {
var res = ajax_push("/api/ApiAccountChangeChecking",{"checking_id":$("#checking_id").val()});
res.errcode > 0 ? alert_err(res.errmsg) : 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 other = res.other;
$(".checking_sn").html(other.checking_sn);
$(".settle").html(other.settle);
$(".status").html(other.status);
$(".create_time").html(other.create_time);
$(".checking_time").html(other.checking_time);
$(".finish_time").html(other.finish_time);
$(".currency").html(other.currency);
$(".day_num").html(other.day_num);
if(other.status == "已对账"){
$("#changeChecking").remove()
}
var html;
for (i = 0; i < res.data.length; i++) {
var s = res.data[i];
html += "<tr class=\"you\"> " +
"<td><span class=\"t1\">"+s.type+"</span></td>" +
"<td><span class=\"t1\">"+s.order_sn+"</span></td>" +
"<td><span class=\"t1\">"+s.supplier_goods_id+"</span></td>" +
"<td><span class=\"t1\">"+s.goods_name+"</span></td>" +
"<td><span class=\"t1\">"+s.brand_name+"</span></td>" +
"<td><span class=\"t1\">"+s.encap+"</span></td>" +
"<td><span class=\"t1\">"+s.packing_name+"</span></td>" +
"<td><span class=\"t1\">"+s.mpq+"</span></td>" +
"<td><span class=\"t1\">"+other.finish_time+"</span></td>" +
"<td><span class=\"t1\">"+s.number+"</span></td>" +
"<td><span class=\"t1\">"+s.putaway_price+"</span></td>" +
"</tr>"
;
}
$("#shopListContent").html(html)
layui.laypage.render({
elem: 'pagination',
theme: '#1080d0',
count: res.count,
groups:10,
curr: page,
jump:function (obj, first) {
if(!first){
this.tableList(obj.curr)
}
}
});
} else {
alert_err(res.errmsg)
return false;
}
}
}, $(function () {
Login.init();
})
}();
\ No newline at end of file
......@@ -9,56 +9,41 @@
handleBind: function (opt) {
tableList(1);
function tableList(page) {
$.ajax({
url: URL_YUNXIN + '/api/ApiAccountCheckingList',
type: 'post',
data: {'p':page},
async: false,
dataType: 'json',
timeout: 10000,
success: function (res) {
console.log(res)
if (res.code == 0) {
var html;
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.amount+"</span></td>" +
"<td><span class=\"t1\">"+s.currency+"</span></td>" +
"<td><span class=\"t1\">"+s.day_num+"</span></td>" +
"<td><span class=\"t1\">"+s.finish_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.status+"</span></td>" +
"<td><a href=\"javascript:;\" class=\"lineBlock va-m operation-1\"><i class=\"iconfont icon-mingxi-\"></i><em>明细</em></a></td> </tr>"
;
var res = ajax_push(URL_YUNXIN + '/api/ApiAccountCheckingList',{'p':page})
if (res.errcode == 0) {
var html;
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.amount+"</span></td>" +
"<td><span class=\"t1\">"+s.currency+"</span></td>" +
"<td><span class=\"t1\">"+s.day_num+"</span></td>" +
"<td><span class=\"t1\">"+s.finish_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.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>"
;
}
$("#shopListContent").html(html)
layui.laypage.render({
elem: 'pagination',
theme: '#1080d0',
count: res.count,
groups:10,
curr: page,
jump:function (obj, first) {
if(!first){
tableList(obj.curr)
}
$("#shopListContent").html(html)
layui.laypage.render({
elem: 'pagination',
theme: '#1080d0',
count: res.count,
groups:10,
curr: page,
jump:function (obj, first) {
if(!first){
tableList(obj.curr)
}
}
});
} else {
$(".error").show().text(res.errmsg);
return false;
}
},
error: function (res) {
alert_err('网络阻塞,请重试!')
}
})
});
} else {
alert_err(res.errmsg)
return false;
}
}
$("#search").click(function () {
......@@ -66,36 +51,7 @@
})
return this;
},
getData: function (params, callback) {
$.ajax({
url: URL_YUNXIN + '/api/ApiLogin',
type: 'post',
data: params,
async: false,
dataType: 'json',
timeout: 10000,
success: function (res) {
if (res.errcode == 0) {
typeof callback == 'function' && callback(res);
} else {
$(".error").show().text(res.errmsg);
return false;
}
},
error: function (res) {
alert_err('网络阻塞,请重试!')
}
})
},
calcForm: function (opt) {
if (!opt.getCode()) {
$(".error").show().text('请输入验证码');
return false;
}
$(".error").hide().text('');
return true;
},
}
}, $(function () {
Login.init();
})
......
;!function () {
window.Login = {
'code': "#code",//验证码
'submit': "#submit",//提交按钮
'search': "#search",//搜索按钮
init: function () {
this.handleBind(this);
},
handleBind: function (opt) {
layui.table.render({
elem: '#shopList'
,url:'/api/ApiAccountCheckingList'
,method:'post'
,cellMinWidth: 100 //全局定义常规单元格的最小宽度
,request: {
pageName: 'p' //页码的参数名称,默认:page
,limitName: 'limit' //每页数据量的参数名,默认:limit
}
,where: {} //如果无需传递额外参数,可不加该参数
,loading:true
,first: true //不显示首页
,last: false //不显示尾页
,cols: [[
{field:'checking_sn', title: '对账单号',align:'center'}
,{field:'amount', title: '账单金额',align:'center'}
,{field:'currency', title: '结算币种',align:'center'}
,{field:'day_num', title: '结算方式',align:'center'}
,{field:'finish_time', title: '完成时间',align:'center'}
,{field:'create_time', title: '创建时间',align:'center'}
,{field:'checking_time', title: '对账时间',align:'center'}
,{field:'status', title: '状态',align:'center'}
,{field:'cahe', title: '操作',templet:'#cahe',align:'center', fixed: 'right'}
]]
,id:'shopList'
,page:{
}
,done: function(res, curr, count) {
// 若无数据,则禁用导出按钮
if (!count) {
$('.export').addClass('layui-disabled');
} else {
$('.export').removeClass('layui-disabled');
}
}
});
//提交
$(opt.search).on('click', function (data) {
console.log(data);
layui.form.render();
var data=data.field;
console.log(data);
layui.table.reload('shopList', {
page: {
curr: 1
}
,where: {}
});
});
//下单时间选择
layui.laydate.render({
elem: '.order-time-1',
theme: '#1080d0'
});
layui.laydate.render({
elem: '.order-time-2',
theme: '#1080d0'
});
// layui.laypage.render({
// elem: 'pagination',
// theme: '#1080d0',
// count: 500,
// groups:10,
// jump:function (obj, first) {
// console.log(obj.curr);
// }
// });
return this;
},
getData: function (params, callback) {
$.ajax({
url: URL_YUNXIN + '/api/ApiLogin',
type: 'post',
data: params,
async: false,
dataType: 'json',
timeout: 10000,
success: function (res) {
if (res.errcode == 0) {
typeof callback == 'function' && callback(res);
} else {
$(".error").show().text(res.errmsg);
return false;
}
},
error: function (res) {
alert_err('网络阻塞,请重试!')
}
})
},
calcForm: function (opt) {
if (!opt.getCode()) {
$(".error").show().text('请输入验证码');
return false;
}
$(".error").hide().text('');
return true;
},
}, $(function () {
Login.init();
})
}();
\ No newline at end of file
/*
存放公共函数地方
*/
/*
ajax 请求
@param str url 请求地址
@param json data 请求参数
@return json
*/
function ajax_push(url,data){
layer.msg('加载中', {
icon: 16
,shade: 0.01
});
var result=false;
$.ajax({
url:url,
type:'post',
data:data,
async: false,
dataType:'json',
timeout:10000,
success:function (resp) {
if(resp){
result=resp;
}
},
error: function (res) {
alert_err('网络阻塞,请重试!')
}
})
layer.closeAll();
return result;
}
//layer弹出子窗口关闭并且刷新父窗口页面
function closeparent() {
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
......
......@@ -105,13 +105,13 @@
</dd>
</dl>
</li>
<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>
<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>
......
<div class="lx-content-r fr">
<div class="tit-bar">
<a href="">订单管理</a>
<span>&gt;</span>
<a href="">订单列表</a>
<span>&gt;</span>
<a class="text" href="">{{ $title }}</a>
</div>
<div class="con-section shop-list">
<p class="text">{{ $title }}</p>
<div class="detail-list">
<div class="lineBlock va-m mr100">
<span class="lineBlock t1">对账单号:</span>
<span class="lineBlock t2 checking_sn"></span>
</div>
<div class="lineBlock va-m mr126">
<span class="lineBlock t1">创建时间:</span>
<span class="lineBlock t2 create_time"></span>
</div>
<div class="lineBlock va-m mr100">
<span class="lineBlock t1">结算时间:</span>
<span class="lineBlock t2 finish_time"></span>
</div>
<div class="lineBlock va-m mr126">
<span class="lineBlock t1">对账时间:</span>
<span class="lineBlock t2 checking_time"></span>
</div>
<div class="mt20">
<div class="lineBlock va-m mr26">
<span class="lineBlock t3">结算方式:</span>
<span class="lineBlock t4 day_num"></span>
</div>
<div class="lineBlock va-m mr33">
<span class="lineBlock t3">状态:</span>
<span class="lineBlock t5"><em class="a status"></em></span>
</div>
<div class="lineBlock va-m mr40">
<span class="lineBlock t3">总金额:</span>
<span class="lineBlock t4 settle"></span>
</div>
<div class="lineBlock va-m">
<span class="lineBlock t3">结算币种:</span>
<span class="lineBlock t4 currency"></span>
</div>
<div class="lineBlock va-m">
<span class="lineBlock t3"></span>
<input type="button" id="changeChecking" style="margin-left: 30px;" value="对账完成" class="layui-btn layui-btn-sm" >
</div>
</div>
</div>
<div class="table-list" id="shopList">
<table>
<tr>
<th>类型<b></b></th>
<th>单据号<b></b></th>
<th>商家商品编码<b></b></th>
<th>型号<b></b></th>
<th>品牌<b></b></th>
<th>封装</th>
<th>包装方式</th>
<th>标准包装量</th>
<th>单据完成时间</th>
<th>数量</th>
<th>单价</th>
</tr>
<tbody id="shopListContent">
</tbody>
</table>
</div>
<div class="pagination-with" id="pagination"></div>
</div>
</div>
<!--隐藏域-->
<input type="hidden" value="{{ @$_GET['id'] }}" id="checking_id">
\ No newline at end of file
......@@ -9,11 +9,11 @@
<form action="">
<div class="search-bar">
<div class="lineBlock input-inline va-m">
<label class="tag">单号:</label>
<label class="tag">对账单号:</label>
<input type="text" class="inp w180">
</div>
<div class="lineBlock input-inline va-m">
<label class="tag">商品型号</label>
<label class="tag">创建时间</label>
<input type="text" class="inp w180">
</div>
<div class="lineBlock input-inline va-m">
......
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