Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
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
f2ddf168
authored
Apr 17, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
440575ba
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
129 additions
and
115 deletions
resources/views/script/SupplierDetailScript.blade.php
resources/views/script/supplier/SupplierContactScript.blade.php
resources/views/script/supplier/SupplierReceiptScript.blade.php
resources/views/web/SupplierDetail.blade.php
resources/views/web/supplier/SupplierReceipt.blade.php
resources/views/script/SupplierDetailScript.blade.php
View file @
f2ddf168
...
...
@@ -6,106 +6,5 @@
let
element
=
layui
.
element
;
let
upload
=
layui
.
upload
;
let
supplierId
=
getQueryVariable
(
'supplier_id'
)
table
.
render
({
elem
:
'#receiptList'
,
url
:
'/api/supplier_receipt/getSupplierReceiptList'
,
method
:
'post'
,
size
:
'sm'
,
cellMinWidth
:
80
,
//全局定义常规单元格的最小宽度
where
:
{
supplier_id
:
supplierId
},
width
:
'70%'
,
loading
:
true
,
first
:
true
,
//不显示首页
last
:
false
,
//不显示尾页
cols
:
[[
{
type
:
'radio'
,},
{
field
:
'receipt_type'
,
title
:
'银行类型'
,
align
:
'center'
,
width
:
120
},
{
field
:
'bank_name'
,
title
:
'开户名称'
,
align
:
'center'
,
width
:
150
},
{
field
:
'bank_adderss'
,
title
:
'开户行'
,
align
:
'center'
,
width
:
150
},
{
field
:
'account_no'
,
title
:
'银行账号'
,
align
:
'center'
,
width
:
130
},
{
field
:
'account_name'
,
title
:
'账户名称'
,
align
:
'center'
,
width
:
150
},
{
field
:
'swift_code'
,
title
:
'电汇号码'
,
align
:
'center'
,
width
:
150
},
{
field
:
'certificate'
,
title
:
'信息凭证'
,
width
:
150
,
align
:
'center'
,
templet
:
function
(
data
)
{
return
"
<
img
class
=
'certificate_img'
style
=
'width: 70px;height: 60px'
src
=
'" + data.certificate + "'
>
";
}
},
{field: 'remark', title: '备注', align: 'center', width: 200},
]],
id: 'receiptList',
page: {},
});
function openLogView(){
// 打开右侧面板
layer.open({
type: 2,
content: '/log/SupplierLog?view=iframe&supplier_id=' + supplierId,
area: ['400px', '85%'],
shade: 0,
offset: 'rb',
title: '操作日志',
});
}
openLogView();
//新增银行弹窗
$("
#
add_bank
").click(function () {
layer.open({
type: 2,
content: '/supplier_receipt/AddSupplierReceipt?view=iframe&supplier_id=' + supplierId,
area: ['50%', '70%'],
title: '新增银行',
end: function () {
table.reload('receiptList');
}
});
})
//修改银行弹窗
$("
#
update_bank
").click(function () {
let checkStatus = table.checkStatus('receiptList');
let data = checkStatus.data;
if (!data.length) {
layer.msg('请先选择要操作的银行数据', {icon: 5})
} else {
let receiptId = data[0].receipt_id;
let supplierId = data[0].supplier_id;
alert(receiptId);
alert(supplierId);
layer.open({
type: 2,
content: '/supplier_receipt/UpdateSupplierReceipt?view=iframe&supplier_id=' + supplierId + '&receipt_id=' + receiptId,
area: ['50%', '70%'],
title: '修改银行',
end: function () {
table.reload('receiptList');
}
});
}
})
$("
#
delete_bank
"
).
click
(
function
()
{
let
checkStatus
=
table
.
checkStatus
(
'receiptList'
);
let
data
=
checkStatus
.
data
;
if
(
!
data
.
length
)
{
layer
.
msg
(
'请先选择要操作的银行'
,
{
icon
:
5
})
}
else
{
layer
.
confirm
(
'确定要删除该银行信息?'
,
function
(
index
)
{
let
receiptId
=
data
[
0
].
receipt_id
;
let
res
=
ajax
(
'/api/supplier_receipt/DeleteSupplierReceipt'
,
{
receipt_id
:
receiptId
})
if
(
res
.
err_code
===
0
)
{
table
.
reload
(
'receiptList'
)
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
})
openLogView
();
}
else
{
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
})
}
});
}
});
});
</script>
\ No newline at end of file
resources/views/script/supplier/SupplierContactScript.blade.php
View file @
f2ddf168
...
...
@@ -33,11 +33,11 @@
//新增联系方式
$
(
"#add_contact"
).
click
(
function
()
{
let
supplierId
=
getQueryVariable
(
'supplier_id'
);
admin
.
open
({
layer
.
open
({
type
:
2
,
content
:
'/supplier_contact/AddSupplierContact?view=iframe&supplier_id='
+
supplierId
,
area
:
[
'600px'
,
'525px'
],
title
:
'
编辑
联系人'
,
title
:
'
新增
联系人'
,
end
:
function
()
{
// 监听弹窗关闭
table
.
reload
(
'contactList'
);
}
...
...
@@ -52,7 +52,7 @@
layer
.
msg
(
'请先选择要操作的联系人'
,
{
icon
:
5
})
}
let
contactId
=
data
[
0
].
contact_id
;
admin
.
open
({
layer
.
open
({
type
:
2
,
content
:
'/supplier_contact/UpdateSupplierContact?view=iframe&contact_id='
+
contactId
,
area
:
[
'600px'
,
'525px'
],
...
...
resources/views/script/supplier/SupplierReceiptScript.blade.php
0 → 100644
View file @
f2ddf168
<script>
layui
.
use
([
'table'
,
'form'
,
'element'
,
'layer'
,
'admin'
,
'upload'
],
function
()
{
let
table
=
layui
.
table
;
let
form
=
layui
.
form
;
let
admin
=
layui
.
admin
;
let
element
=
layui
.
element
;
let
upload
=
layui
.
upload
;
let
supplierId
=
getQueryVariable
(
'supplier_id'
)
table
.
render
({
elem
:
'#receiptList'
,
url
:
'/api/supplier_receipt/getSupplierReceiptList'
,
method
:
'post'
,
size
:
'sm'
,
cellMinWidth
:
80
,
//全局定义常规单元格的最小宽度
where
:
{
supplier_id
:
supplierId
},
width
:
'70%'
,
loading
:
true
,
first
:
true
,
//不显示首页
last
:
false
,
//不显示尾页
cols
:
[[
{
type
:
'radio'
,},
{
field
:
'receipt_type'
,
title
:
'银行类型'
,
align
:
'center'
,
width
:
120
},
{
field
:
'bank_name'
,
title
:
'开户名称'
,
align
:
'center'
,
width
:
150
},
{
field
:
'bank_adderss'
,
title
:
'开户行'
,
align
:
'center'
,
width
:
150
},
{
field
:
'account_no'
,
title
:
'银行账号'
,
align
:
'center'
,
width
:
130
},
{
field
:
'account_name'
,
title
:
'账户名称'
,
align
:
'center'
,
width
:
150
},
{
field
:
'swift_code'
,
title
:
'电汇号码'
,
align
:
'center'
,
width
:
150
},
{
field
:
'certificate'
,
title
:
'信息凭证'
,
width
:
150
,
align
:
'center'
,
templet
:
function
(
data
)
{
return
"
<
img
class
=
'certificate_img'
style
=
'width: 70px;height: 60px'
src
=
'" + data.certificate + "'
>
";
}
},
{field: 'remark', title: '备注', align: 'center', width: 200},
]],
id: 'receiptList',
page: {},
});
function openLogView(){
// 打开右侧面板
layer.open({
type: 2,
content: '/log/SupplierLog?view=iframe&supplier_id=' + supplierId,
area: ['400px', '85%'],
shade: 0,
offset: 'rb',
title: '操作日志',
});
}
openLogView();
//新增银行弹窗
$("
#
add_bank
").click(function () {
layer.open({
type: 2,
content: '/supplier_receipt/AddSupplierReceipt?view=iframe&supplier_id=' + supplierId,
area: ['50%', '70%'],
title: '新增银行',
end: function () {
table.reload('receiptList');
}
});
})
//修改银行弹窗
$("
#
update_bank
").click(function () {
let checkStatus = table.checkStatus('receiptList');
let data = checkStatus.data;
if (!data.length) {
layer.msg('请先选择要操作的银行数据', {icon: 5})
} else {
let receiptId = data[0].receipt_id;
let supplierId = data[0].supplier_id;
alert(receiptId);
alert(supplierId);
layer.open({
type: 2,
content: '/supplier_receipt/UpdateSupplierReceipt?view=iframe&supplier_id=' + supplierId + '&receipt_id=' + receiptId,
area: ['50%', '70%'],
title: '修改银行',
end: function () {
table.reload('receiptList');
}
});
}
})
$("
#
delete_bank
"
).
click
(
function
()
{
let
checkStatus
=
table
.
checkStatus
(
'receiptList'
);
let
data
=
checkStatus
.
data
;
if
(
!
data
.
length
)
{
layer
.
msg
(
'请先选择要操作的银行'
,
{
icon
:
5
})
}
else
{
layer
.
confirm
(
'确定要删除该银行信息?'
,
function
(
index
)
{
let
receiptId
=
data
[
0
].
receipt_id
;
let
res
=
ajax
(
'/api/supplier_receipt/DeleteSupplierReceipt'
,
{
receipt_id
:
receiptId
})
if
(
res
.
err_code
===
0
)
{
table
.
reload
(
'receiptList'
)
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
})
openLogView
();
}
else
{
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
})
}
});
}
});
});
</script>
\ No newline at end of file
resources/views/web/SupplierDetail.blade.php
View file @
f2ddf168
...
...
@@ -125,14 +125,7 @@
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
财务信息
</b>
</blockquote>
<div
class=
"layui-row"
>
<div
class=
"layui-btn-group demoTable"
style=
"margin-bottom: 15px;margin-top: 15px"
>
<button
class=
"layui-btn layui-btn-sm"
id=
"add_bank"
>
新增
</button>
<button
class=
"layui-btn layui-btn-sm"
id=
"update_bank"
>
修改
</button>
<button
class=
"layui-btn layui-btn-sm"
id=
"delete_bank"
>
删除
</button>
</div>
<table
class=
"layui-table"
lay-filter=
"receiptList"
id=
"receiptList"
></table>
</div>
@include('web.supplier.SupplierReceipt')
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
运输信息
</b>
</blockquote>
...
...
@@ -150,7 +143,7 @@
退货收货人电话:{{$address['return_phone']}}
</div>
</div>
<hr
/>
<hr/>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
其他信息
</b>
</blockquote>
...
...
@@ -170,7 +163,7 @@
最近修改时间:{{$supplier['update_time']}}
</div>
</div>
<hr
/>
<hr/>
</div>
</div>
<div
class=
"layui-tab-item"
>
...
...
resources/views/web/supplier/SupplierReceipt.blade.php
0 → 100644
View file @
f2ddf168
<div
class=
"layui-row"
>
<div
class=
"layui-btn-group demoTable"
style=
"margin-bottom: 15px;margin-top: 15px"
>
<button
class=
"layui-btn layui-btn-sm"
id=
"add_bank"
>
新增
</button>
<button
class=
"layui-btn layui-btn-sm"
id=
"update_bank"
>
修改
</button>
<button
class=
"layui-btn layui-btn-sm"
id=
"delete_bank"
>
删除
</button>
</div>
<table
class=
"layui-table"
lay-filter=
"receiptList"
id=
"receiptList"
></table>
</div>
@include('script.supplier.SupplierReceiptScript')
\ No newline at end of file
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