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
d64e4a57
authored
Jun 11, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复各种样式问题
parent
7a504e10
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
77 additions
and
17 deletions
app/Http/Controllers/Api/SupplierReceiptApiController.php
app/Http/Controllers/Filter/SupplierFilter.php
app/Http/Controllers/SupplierController.php
app/Http/Validators/ReceiptValidator.php
app/Http/Validators/SupplierContactValidator.php
app/Http/Validators/SupplierValidator.php
resources/views/script/AddSupplierContactScript.blade.php
resources/views/script/AddSupplierReceiptScript.blade.php
resources/views/script/UpdateSupplierContactScript.blade.php
resources/views/web/AddSupplierAccount.blade.php
resources/views/web/AddSupplierReceipt.blade.php
resources/views/web/AllocatePurchaseUser.blade.php
resources/views/web/AuditSupplier.blade.php
resources/views/web/BatchOffShelf.blade.php
resources/views/web/SetYunxinChannelUser.blade.php
resources/views/web/UpdateSupplierAccount.blade.php
app/Http/Controllers/Api/SupplierReceiptApiController.php
View file @
d64e4a57
...
@@ -57,6 +57,9 @@ class SupplierReceiptApiController extends Controller
...
@@ -57,6 +57,9 @@ class SupplierReceiptApiController extends Controller
'remark'
,
'remark'
,
]);
]);
$receipt
[
'account_adderss'
]
=
empty
(
$receipt
[
'account_adderss'
])
?
' '
:
$receipt
[
'account_adderss'
];
$receipt
[
'account_adderss'
]
=
empty
(
$receipt
[
'account_adderss'
])
?
' '
:
$receipt
[
'account_adderss'
];
if
(
$receipt
[
'receipt_type'
]
==
1
)
{
$receipt
[
'swift_code'
]
=
''
;
}
$receiptId
=
$request
->
get
(
'receipt_id'
);
$receiptId
=
$request
->
get
(
'receipt_id'
);
$supplierId
=
$request
->
get
(
'supplier_id'
);
$supplierId
=
$request
->
get
(
'supplier_id'
);
$model
=
new
SupplierReceiptModel
();
$model
=
new
SupplierReceiptModel
();
...
...
app/Http/Controllers/Filter/SupplierFilter.php
View file @
d64e4a57
...
@@ -88,6 +88,8 @@ class SupplierFilter
...
@@ -88,6 +88,8 @@ class SupplierFilter
});
});
}
}
//默认过滤带有-1字符串的供应商名称的数据
$query
->
whereRaw
(
'supplier_name NOT LIKE "%-1"'
);
return
$query
;
return
$query
;
}
}
...
...
app/Http/Controllers/SupplierController.php
View file @
d64e4a57
...
@@ -165,8 +165,12 @@ class SupplierController extends Controller
...
@@ -165,8 +165,12 @@ class SupplierController extends Controller
$auditContent
=
$logModel
->
where
(
'supplier_id'
,
$supplierId
)
->
where
(
'action'
,
'!='
,
'分配渠道开发员'
)
$auditContent
=
$logModel
->
where
(
'supplier_id'
,
$supplierId
)
->
where
(
'action'
,
'!='
,
'分配渠道开发员'
)
->
where
(
'type'
,
'!='
,
3
)
->
where
(
'type'
,
'!='
,
3
)
->
orderBy
(
'id'
,
'desc'
)
->
first
();
->
orderBy
(
'id'
,
'desc'
)
->
first
();
$logTransformer
=
new
LogTransformer
();
if
(
!
empty
(
$auditContent
))
{
$auditContent
=
$logTransformer
->
transformInfo
(
$auditContent
);
$logTransformer
=
new
LogTransformer
();
$auditContent
=
$logTransformer
->
transformInfo
(
$auditContent
);
}
else
{
$auditContent
=
[];
}
$this
->
data
[
'auditContent'
]
=
$auditContent
;
$this
->
data
[
'auditContent'
]
=
$auditContent
;
$this
->
data
[
'supplier'
]
=
$supplier
?
$supplier
->
toArray
()
:
[];
$this
->
data
[
'supplier'
]
=
$supplier
?
$supplier
->
toArray
()
:
[];
return
$this
->
view
(
'审核供应商'
);
return
$this
->
view
(
'审核供应商'
);
...
...
app/Http/Validators/ReceiptValidator.php
View file @
d64e4a57
...
@@ -18,10 +18,14 @@ class ReceiptValidator
...
@@ -18,10 +18,14 @@ class ReceiptValidator
"bank_name"
=>
"required"
,
"bank_name"
=>
"required"
,
"bank_adderss"
=>
"required"
,
"bank_adderss"
=>
"required"
,
"account_no"
=>
"required"
,
"account_no"
=>
"required"
,
"swift_code"
=>
"required"
,
// "account_name" => "required",
// "account_name" => "required",
"certificate"
=>
"required"
,
"certificate"
=>
"required"
,
];
];
$receipt
[
'certificate'
]
=
'111'
;
if
(
$receipt
[
'receipt_type'
]
==
2
)
{
$rules
[
"swift_code"
]
=
'required'
;
}
$messages
=
$this
->
messages
();
$messages
=
$this
->
messages
();
$validator
=
Validator
::
make
(
$receipt
,
$rules
,
$messages
);
$validator
=
Validator
::
make
(
$receipt
,
$rules
,
$messages
);
...
...
app/Http/Validators/SupplierContactValidator.php
View file @
d64e4a57
...
@@ -14,8 +14,9 @@ class SupplierContactValidator
...
@@ -14,8 +14,9 @@ class SupplierContactValidator
$data
=
$request
->
all
();
$data
=
$request
->
all
();
$rules
=
[
$rules
=
[
"supplier_consignee"
=>
"required"
,
"supplier_consignee"
=>
"required"
,
"supplier_email"
=>
"required"
,
"supplier_email"
=>
"required
|email
"
,
"supplier_mobile"
=>
"required"
,
"supplier_mobile"
=>
"required"
,
"supplier_telephone"
=>
"required"
,
"supplier_position"
=>
"required"
,
"supplier_position"
=>
"required"
,
"can_check_uids"
=>
"required"
,
"can_check_uids"
=>
"required"
,
];
];
...
@@ -33,7 +34,9 @@ class SupplierContactValidator
...
@@ -33,7 +34,9 @@ class SupplierContactValidator
return
[
return
[
'supplier_consignee.required'
=>
'联系人不能为空'
,
'supplier_consignee.required'
=>
'联系人不能为空'
,
'supplier_email.required'
=>
'联系人邮箱不能为空'
,
'supplier_email.required'
=>
'联系人邮箱不能为空'
,
'supplier_email.email'
=>
'邮箱格式不对'
,
'supplier_mobile.required'
=>
'联系人电话不能为空'
,
'supplier_mobile.required'
=>
'联系人电话不能为空'
,
'supplier_telephone.required'
=>
'联系人座机不能为空'
,
'supplier_position.required'
=>
'联系人职位不能为空'
,
'supplier_position.required'
=>
'联系人职位不能为空'
,
'can_check_uids.required'
=>
'采购员不能为空'
,
'can_check_uids.required'
=>
'采购员不能为空'
,
];
];
...
...
app/Http/Validators/SupplierValidator.php
View file @
d64e4a57
...
@@ -19,9 +19,9 @@ class SupplierValidator
...
@@ -19,9 +19,9 @@ class SupplierValidator
$rules
=
[
$rules
=
[
'supplier_name'
=>
'required'
,
'supplier_name'
=>
'required'
,
'legal_representative'
=>
'required'
,
'legal_representative'
=>
'required'
,
'register_company_name'
=>
'required'
,
//
'register_company_name' => 'required',
'stockup_type'
=>
'required'
,
'stockup_type'
=>
'required'
,
// 'supplier_group
' => 'required',
'supplier_address
'
=>
'required'
,
'region'
=>
'required'
,
'region'
=>
'required'
,
'cn_delivery_time'
=>
'regex:/^\d+\-\d$/'
,
'cn_delivery_time'
=>
'regex:/^\d+\-\d$/'
,
'us_delivery_time'
=>
'regex:/^\d+\-\d$/'
,
'us_delivery_time'
=>
'regex:/^\d+\-\d$/'
,
...
@@ -89,6 +89,7 @@ class SupplierValidator
...
@@ -89,6 +89,7 @@ class SupplierValidator
'stockup_type.required'
=>
'合作类型不能为空'
,
'stockup_type.required'
=>
'合作类型不能为空'
,
'register_company_name.required'
=>
'注册公司名不能为空'
,
'register_company_name.required'
=>
'注册公司名不能为空'
,
'supplier_group.required'
=>
'公司性质不能为空'
,
'supplier_group.required'
=>
'公司性质不能为空'
,
'supplier_address.required'
=>
'注册地址不能为空'
,
'region.required'
=>
'所在区域不能为空'
,
'region.required'
=>
'所在区域不能为空'
,
'purchase_uid.required'
=>
'渠道开发员不能为空'
,
'purchase_uid.required'
=>
'渠道开发员不能为空'
,
'cn_ratio.min'
=>
'人民币系数必须是大于1的浮点数'
,
'cn_ratio.min'
=>
'人民币系数必须是大于1的浮点数'
,
...
...
resources/views/script/AddSupplierContactScript.blade.php
View file @
d64e4a57
...
@@ -3,6 +3,17 @@
...
@@ -3,6 +3,17 @@
let
admin
=
layui
.
admin
;
let
admin
=
layui
.
admin
;
let
form
=
layui
.
form
;
let
form
=
layui
.
form
;
let
element
=
layui
.
element
;
let
element
=
layui
.
element
;
$
(
'#supplier_email'
).
blur
(
function
()
{
let
value
=
$
(
this
).
val
();
if
(
value
!==
''
)
{
let
reg
=
/^
([
a-zA-Z0-9_-
])
+@
([
a-zA-Z0-9_-
])
+
(
.
[
a-zA-Z0-9_-
])
+/
;
if
(
!
reg
.
test
(
value
)){
layer
.
msg
(
'邮箱格式不对'
,
{
icon
:
5
});
}
}
});
form
.
on
(
'submit(load)'
,
function
(
data
)
{
form
.
on
(
'submit(load)'
,
function
(
data
)
{
// layer.confirm('确定要保存联系人吗?一旦保存,该供应商就会再次进入审核阶段', function (index) {
// layer.confirm('确定要保存联系人吗?一旦保存,该供应商就会再次进入审核阶段', function (index) {
let
supplierId
=
getQueryVariable
(
'supplier_id'
);
let
supplierId
=
getQueryVariable
(
'supplier_id'
);
...
...
resources/views/script/AddSupplierReceiptScript.blade.php
View file @
d64e4a57
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
const
form
=
layui
.
form
const
form
=
layui
.
form
const
upload
=
layui
.
upload
;
const
upload
=
layui
.
upload
;
const
admin
=
layui
.
admin
;
const
admin
=
layui
.
admin
;
//提交数据
//提交数据
form
.
on
(
'submit(addSupplierReceipt)'
,
function
(
data
)
{
form
.
on
(
'submit(addSupplierReceipt)'
,
function
(
data
)
{
// layer.confirm('确定要保存银行信息吗?一旦保存,该供应商就会再次进入审核阶段', function (index) {
// layer.confirm('确定要保存银行信息吗?一旦保存,该供应商就会再次进入审核阶段', function (index) {
...
@@ -23,6 +24,15 @@
...
@@ -23,6 +24,15 @@
});
});
return
false
;
return
false
;
})
})
form
.
on
(
'radio(receipt_type)'
,
function
(
data
)
{
if
(
data
.
value
==
1
)
{
$
(
'#swift_code_div'
)
.
hide
();
}
else
{
$
(
'#swift_code_div'
)
.
show
();
}
});
//图片上传
//图片上传
upload
.
render
({
upload
.
render
({
elem
:
'.upload-img'
elem
:
'.upload-img'
...
...
resources/views/script/UpdateSupplierContactScript.blade.php
View file @
d64e4a57
<script>
<script>
layui
.
use
([
'table'
,
'form'
,
'element'
,
'layer'
,
'admin'
],
function
()
{
layui
.
use
([
'table'
,
'form'
,
'element'
,
'layer'
,
'admin'
],
function
()
{
let
admin
=
layui
.
admin
;
let
admin
=
layui
.
admin
;
let
form
=
layui
.
form
;
let
form
=
layui
.
form
;
let
element
=
layui
.
element
;
let
element
=
layui
.
element
;
$
(
'#supplier_email'
).
blur
(
function
()
{
let
value
=
$
(
this
).
val
();
if
(
value
!==
''
)
{
let
reg
=
/^
([
a-zA-Z0-9_-
])
+@
([
a-zA-Z0-9_-
])
+
(
.
[
a-zA-Z0-9_-
])
+/
;
if
(
!
reg
.
test
(
value
)){
layer
.
msg
(
'邮箱格式不对'
,
{
icon
:
5
});
}
}
});
form
.
on
(
'submit(load)'
,
function
(
data
)
{
form
.
on
(
'submit(load)'
,
function
(
data
)
{
let
url
=
'/api/supplier_contact/SaveSupplierContact'
;
let
url
=
'/api/supplier_contact/SaveSupplierContact'
;
let
res
=
ajax
(
url
,
data
.
field
);
let
res
=
ajax
(
url
,
data
.
field
);
...
...
resources/views/web/AddSupplierAccount.blade.php
View file @
d64e4a57
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
lay-filter=
"addSupplierAccount"
>
确认
lay-filter=
"addSupplierAccount"
>
确认
</button>
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-
warm
"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-
primary
"
lay-submit
lay-filter=
"cancel"
>
取消
lay-filter=
"cancel"
>
取消
</button>
</button>
</div>
</div>
...
...
resources/views/web/AddSupplierReceipt.blade.php
View file @
d64e4a57
...
@@ -11,8 +11,16 @@
...
@@ -11,8 +11,16 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
银行类型 :
</label>
<label
class=
"layui-form-label"
>
银行类型 :
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
type=
"radio"
name=
"receipt_type"
value=
"1"
title=
"国内"
checked
>
<input
type=
"radio"
name=
"receipt_type"
lay-filter=
"receipt_type"
value=
"1"
title=
"国内"
<input
type=
"radio"
name=
"receipt_type"
value=
"2"
title=
"港澳台和国外"
>
@
if
(!
empty
($
receipt
['
receipt_type
'])&&$
receipt
['
receipt_type
']==
1
)
checked
@
endif
>
<input
type=
"radio"
name=
"receipt_type"
lay-filter=
"receipt_type"
value=
"2"
title=
"港澳台和国外"
@
if
(!
empty
($
receipt
['
receipt_type
'])&&$
receipt
['
receipt_type
']==
2
)
checked
@
endif
>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
...
@@ -55,7 +63,9 @@
...
@@ -55,7 +63,9 @@
value=
"{{$receipt['account_adderss'] or ''}}"
>
value=
"{{$receipt['account_adderss'] or ''}}"
>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
id=
"swift_code_div"
@
if
((!
empty
($
receipt
['
receipt_type
'])&&$
receipt
['
receipt_type
']==
1
)||
empty
($
receipt
['
receipt_type
']))
style=
"display: none"
@
endif
>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
Swift Code :
</label>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
Swift Code :
</label>
<div
class=
"layui-input-block block-42"
>
<div
class=
"layui-input-block block-42"
>
<input
type=
"text"
name=
"swift_code"
id=
"Swift Code"
<input
type=
"text"
name=
"swift_code"
id=
"Swift Code"
...
@@ -88,7 +98,8 @@
...
@@ -88,7 +98,8 @@
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<div
align=
"center"
style=
"margin-top: 20px"
>
<div
align=
"center"
style=
"margin-top: 20px"
>
<button
type=
"button"
id=
"addSupplierReceipt"
class=
"layui-btn layui-btn-info submit-loading"
lay-submit
<button
type=
"button"
id=
"addSupplierReceipt"
class=
"layui-btn layui-btn-info submit-loading"
lay-submit
lay-filter=
"addSupplierReceipt"
>
保存
lay-filter=
"addSupplierReceipt"
>
保存
</button>
</button>
</div>
</div>
...
...
resources/views/web/AllocatePurchaseUser.blade.php
View file @
d64e4a57
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
lay-filter=
"auditSupplier"
>
保存
lay-filter=
"auditSupplier"
>
保存
</button>
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-
warm
"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-
primary
"
lay-submit
lay-filter=
"cancel"
>
取消
lay-filter=
"cancel"
>
取消
</button>
</button>
</div>
</div>
...
...
resources/views/web/AuditSupplier.blade.php
View file @
d64e4a57
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
lay-filter=
"auditSupplier"
>
保存
lay-filter=
"auditSupplier"
>
保存
</button>
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-
warm
"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-
primary
"
lay-submit
lay-filter=
"cancel"
>
取消
lay-filter=
"cancel"
>
取消
</button>
</button>
</div>
</div>
...
...
resources/views/web/BatchOffShelf.blade.php
View file @
d64e4a57
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
lay-filter=
"batchOffShelf"
>
确认
lay-filter=
"batchOffShelf"
>
确认
</button>
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-
warm
"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-
primary
"
lay-submit
lay-filter=
"cancel"
>
取消
lay-filter=
"cancel"
>
取消
</button>
</button>
</div>
</div>
...
...
resources/views/web/SetYunxinChannelUser.blade.php
View file @
d64e4a57
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
lay-filter=
"setYunxinChannelUid"
>
保存
lay-filter=
"setYunxinChannelUid"
>
保存
</button>
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-
warm
"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-
primary
"
lay-submit
lay-filter=
"cancel"
>
取消
lay-filter=
"cancel"
>
取消
</button>
</button>
</div>
</div>
...
...
resources/views/web/UpdateSupplierAccount.blade.php
View file @
d64e4a57
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
lay-filter=
"addSupplierAccount"
>
确认
lay-filter=
"addSupplierAccount"
>
确认
</button>
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-
warm
"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-
primary
"
lay-submit
lay-filter=
"cancel"
>
取消
lay-filter=
"cancel"
>
取消
</button>
</button>
</div>
</div>
...
...
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