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
7d3ecbce
authored
Jul 18, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复修改问题
parent
d05ff3df
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
28 deletions
app/Http/Controllers/SupplierExaminationController.php
resources/views/script/SupplierExaminationListScript.blade.php
resources/views/web/AddSupplierExamination.blade.php
resources/views/web/SupplierExaminationList.blade.php
resources/views/web/UpdateSupplierExamination.blade.php
app/Http/Controllers/SupplierExaminationController.php
View file @
7d3ecbce
...
...
@@ -46,7 +46,7 @@ class SupplierExaminationController extends Controller
{
//获取所有采购员提供选择
$purchaseUsers
=
(
new
IntracodeModel
())
->
getAllEncode
();
$purchaseUserNames
=
collect
(
$purchaseUsers
)
->
pluck
(
'name'
,
'name'
)
->
toArray
();
$purchaseUserNames
=
collect
(
$purchaseUsers
)
->
pluck
(
'name'
,
'name'
)
->
toArray
();
$this
->
data
[
'purchaseUserNames'
]
=
$purchaseUserNames
;
$this
->
data
[
'title'
]
=
'IQC检测列表'
;
return
$this
->
view
(
'IQC检测列表'
);
...
...
@@ -54,9 +54,14 @@ class SupplierExaminationController extends Controller
public
function
AddSupplierExamination
(
$request
)
{
$supplierId
=
$request
->
get
(
'supplier_id'
);
if
(
$supplierId
)
{
$supplierName
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
value
(
'supplier_name'
);
$this
->
data
[
'supplierName'
]
=
$supplierName
;
}
//获取所有采购员提供选择
$purchaseUsers
=
(
new
IntracodeModel
())
->
getAllEncode
();
$purchaseUserNames
=
collect
(
$purchaseUsers
)
->
pluck
(
'name'
,
'name'
)
->
toArray
();
$purchaseUserNames
=
collect
(
$purchaseUsers
)
->
pluck
(
'name'
,
'name'
)
->
toArray
();
$this
->
data
[
'purchaseUserNames'
]
=
$purchaseUserNames
;
$this
->
data
[
'title'
]
=
'添加IQC检测记录'
;
return
$this
->
view
(
'添加IQC检测记录'
);
...
...
@@ -68,12 +73,17 @@ class SupplierExaminationController extends Controller
if
(
empty
(
$id
))
{
return
'请选择对应的检测记录'
;
}
$supplierId
=
$request
->
get
(
'supplier_id'
);
if
(
$supplierId
)
{
$supplierName
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
value
(
'supplier_name'
);
$this
->
data
[
'supplierName'
]
=
$supplierName
;
}
//获取所有采购员提供选择
$purchaseUsers
=
(
new
IntracodeModel
())
->
getAllEncode
();
$purchaseUserNames
=
collect
(
$purchaseUsers
)
->
pluck
(
'name'
,
'name'
)
->
toArray
();
$purchaseUserNames
=
collect
(
$purchaseUsers
)
->
pluck
(
'name'
,
'name'
)
->
toArray
();
$this
->
data
[
'purchaseUserNames'
]
=
$purchaseUserNames
;
$examination
=
SupplierExaminationModel
::
where
(
'id'
,
$id
)
->
first
()
->
toArray
();
$examination
[
'examine_time'
]
=
date
(
'Y-m-d'
,
$examination
[
'examine_time'
])
;
$examination
[
'examine_time'
]
=
$examination
[
'examine_time'
]
?
date
(
'Y-m-d'
,
$examination
[
'examine_time'
])
:
''
;
$this
->
data
[
'examination'
]
=
$examination
;
$this
->
data
[
'title'
]
=
'添加IQC检测记录'
;
return
$this
->
view
(
'添加IQC检测记录'
);
...
...
resources/views/script/SupplierExaminationListScript.blade.php
View file @
7d3ecbce
...
...
@@ -61,13 +61,14 @@
$
(
"#add_supplier_examination"
).
click
(
function
()
{
layer
.
open
({
type
:
2
,
content
:
'/supplier_examination/AddSupplierExamination?view=iframe
'
,
content
:
'/supplier_examination/AddSupplierExamination?view=iframe
&supplier_id='
+
getQueryVariable
(
'supplier_id'
)
,
area
:
[
'80%'
,
'70%'
],
title
:
'添加IQC检测记录'
,
end
:
function
()
{
table
.
reload
(
'supplierExaminationList'
);
}
});
return
false
;
});
$
(
"#update_supplier_examination"
).
click
(
function
()
{
...
...
@@ -83,7 +84,7 @@
let
id
=
data
[
0
].
id
;
layer
.
open
({
type
:
2
,
content
:
'/supplier_examination/UpdateSupplierExamination?view=iframe&id='
+
id
,
content
:
'/supplier_examination/UpdateSupplierExamination?view=iframe&id='
+
id
+
'&supplier_id='
+
getQueryVariable
(
'supplier_id'
)
,
area
:
[
'80%'
,
'70%'
],
title
:
'添加IQC检测记录'
,
end
:
function
()
{
...
...
@@ -91,6 +92,7 @@
}
});
}
return
false
;
});
//启用
...
...
resources/views/web/AddSupplierExamination.blade.php
View file @
7d3ecbce
...
...
@@ -15,19 +15,36 @@
{!! $datePresenter->render('examine_time','检货时间 : ','') !!}
</div>
<div
class=
"layui-col-md6"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_name','采购员 : ','',
$purchaseUserNames,['required'=>true]) !!}
@if(empty($supplierName))
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_name','采购员 : ','',
$purchaseUserNames,['required'=>true]) !!}
@else
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
采购员 :
</label>
<div
class=
"layui-input-block"
style=
"padding-top: 7px"
>
<input
type=
"hidden"
name=
"purchase_name"
value=
"{{request()->user->name}}"
>
{{request()->user->name}}
</div>
@endif
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-col-md6"
>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
供应商 :
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"supplier_name"
id=
"supplier_name"
placeholder=
"请输入供应商名称"
class=
"layui-input"
value=
"{{$account['mobile'] or ''}}"
>
</div>
@if(empty($supplierName))
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
供应商 :
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"supplier_name"
id=
"supplier_name"
placeholder=
"请输入供应商名称"
class=
"layui-input"
value=
"{{$account['supplier_name'] or ''}}"
>
</div>
@else
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
供应商 :
</label>
<div
class=
"layui-input-block"
style=
"padding-top: 7px"
>
<input
type=
"hidden"
name=
"supplier_name"
value=
"{{$supplierName}}"
>
{{$supplierName}}
</div>
@endif
</div>
<div
class=
"layui-col-md6"
>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
数量 :
</label>
...
...
@@ -96,7 +113,7 @@
<div
class=
"layui-col-md6"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('abnormal_level','异常等级 : ','',
[
0=>0,
1=>1,2=>2,3=>3],['required'=>true]) !!}
[1=>1,2=>2,3=>3],['required'=>true]) !!}
</div>
<div
class=
"layui-col-md6"
>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
处理方式 :
</label>
...
...
resources/views/web/SupplierExaminationList.blade.php
View file @
7d3ecbce
...
...
@@ -58,4 +58,6 @@
<table
class=
"layui-table"
id=
"supplierExaminationList"
lay-filter=
"supplierExaminationList"
></table>
</div>
@include('script.SupplierExaminationListScript')
\ No newline at end of file
@if(request()->get('supplier_id'))
@include('script.SupplierExaminationListScript')
@endif
resources/views/web/UpdateSupplierExamination.blade.php
View file @
7d3ecbce
...
...
@@ -16,19 +16,35 @@
{!! $datePresenter->render('examine_time','检货时间 : ',$examination['examine_time']) !!}
</div>
<div
class=
"layui-col-md6"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_name','采购员 : ',$examination['purchase_name'],
$purchaseUserNames,['required'=>true]) !!}
@if(empty($supplierName))
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_name','采购员 : ',$examination['purchase_name'],
$purchaseUserNames,['required'=>true]) !!}
@else
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
采购员 :
</label>
<div
class=
"layui-input-block"
style=
"padding-top: 7px"
>
<input
type=
"hidden"
name=
"purchase_name"
value=
"{{request()->user->name}}"
>
{{request()->user->name}}
</div>
@endif
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-col-md6"
>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
供应商 :
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"supplier_name"
id=
"supplier_name"
placeholder=
"请输入供应商名称"
class=
"layui-input"
value=
"{{$examination['supplier_name'] or ''}}"
>
</div>
@if(empty($supplierName))
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
供应商 :
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"supplier_name"
id=
"supplier_name"
placeholder=
"请输入供应商名称"
class=
"layui-input"
value=
"{{$examination['supplier_name'] or ''}}"
>
</div>
@else
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
供应商 :
</label>
<div
class=
"layui-input-block"
style=
"padding-top: 7px"
>
<input
type=
"hidden"
name=
"supplier_name"
value=
"{{$supplierName}}"
>
{{$supplierName}}
</div>
@endif
</div>
<div
class=
"layui-col-md6"
>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
数量 :
</label>
...
...
@@ -97,7 +113,7 @@
<div
class=
"layui-col-md6"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('abnormal_level','异常等级 : ',$examination['abnormal_level'],
[
0=>0,
1=>1,2=>2,3=>3],['required'=>true]) !!}
[1=>1,2=>2,3=>3],['required'=>true]) !!}
</div>
<div
class=
"layui-col-md6"
>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
处理方式 :
</label>
...
...
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