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
fe4671f9
authored
Jul 27, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复bug
parent
53822317
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
40 additions
and
10 deletions
app/Http/Controllers/Filter/SupplierExaminationFilter.php
app/Http/Services/SupplierExaminationService.php
app/Presenters/DatePresenter.php
app/Presenters/Filter/TransformableTimeIntervalPresenter.php
app/Presenters/StatusPresenter.php
resources/views/script/BatchAddTagScript.blade.php
resources/views/script/SupplierExaminationListScript.blade.php
resources/views/web/AddSupplierExamination.blade.php
resources/views/web/BatchAddTag.blade.php
resources/views/web/SupplierExaminationList.blade.php
resources/views/web/UpdateSupplierExamination.blade.php
app/Http/Controllers/Filter/SupplierExaminationFilter.php
View file @
fe4671f9
...
...
@@ -54,6 +54,11 @@ class SupplierExaminationFilter
$query
->
where
(
'purchase_name'
,
$map
[
'purchase_name'
]);
}
if
(
!
empty
(
$map
[
'examine_result'
]))
{
$query
->
where
(
'examine_result'
,
$map
[
'examine_result'
]);
}
if
((
isset
(
$map
[
'abnormal_level'
])
&&
$map
[
'abnormal_level'
]
===
'0'
)
||
!
empty
(
$map
[
'abnormal_level'
]))
{
$query
->
where
(
'abnormal_level'
,
$map
[
'abnormal_level'
]);
}
...
...
app/Http/Services/SupplierExaminationService.php
View file @
fe4671f9
...
...
@@ -138,9 +138,8 @@ class SupplierExaminationService
array_values
(
config
(
'field.SupplierExamineResult'
))))
{
throw
new
\Exception
(
"检验结果只能(退货|特批入库|正常入库)其中一个且不能为空 (第${lineNo}行),请修改后再次提交"
);
}
if
(
!
in_array
(
$abnormalLevel
,
[
1
,
2
,
3
]))
{
throw
new
\Exception
(
"存在不合理的异常等级,等级必须为纯数字1,2,3 (第${lineNo}行),请修改后再次提交"
);
if
(
!
empty
(
$abnormalLevel
)
&&
!
in_array
(
$abnormalLevel
,
[
1
,
2
,
3
]))
{
throw
new
\Exception
(
"存在不合理的异常等级,等级必须为纯数字1,2,3或者不填 (第${lineNo}行),请修改后再次提交"
);
}
$examineData
[]
=
[
...
...
app/Presenters/DatePresenter.php
View file @
fe4671f9
...
...
@@ -31,6 +31,8 @@ class DatePresenter
,type: 'date'
,format: 'yyyy-MM-dd'
});
// $('input[name=$name]').removeAttr('lay-key');
});
}
</script>
...
...
app/Presenters/Filter/TransformableTimeIntervalPresenter.php
View file @
fe4671f9
...
...
@@ -39,7 +39,7 @@ class TransformableTimeIntervalPresenter
dateInterval="$todayTimeInterval"
id="${unique}_today">今日</button>
</div>
<div class="layui-col-md2">
<div class="layui-col-md2"
id="three_days_button"
>
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm day_type_button"
dateInterval="$threeDayTimeInterval"
id="${unique}_last_days">近三天</button>
...
...
app/Presenters/StatusPresenter.php
View file @
fe4671f9
...
...
@@ -20,7 +20,7 @@ class StatusPresenter
$requiredHtml
$text
</label>
<div class="layui-input-inline" style="width: $width
;margin-top: 0px
">
<div class="layui-input-inline" style="width: $width">
<select name="$name" id="$name" lay-filter="$name" $isDisable lay-search="">
{$this->optionsRender($data, $status)}
</select>
...
...
resources/views/script/BatchAddTagScript.blade.php
View file @
fe4671f9
...
...
@@ -88,19 +88,32 @@
}
let
suppliers
=
{
!!
json_encode
(
$suppliers
)
!!
};
let
supplier
=
suppliers
[
supplierCode
];
let
selectedSupplierIds
=
$
(
'#supplier_ids'
).
val
();
selectedSupplierIds
=
selectedSupplierIds
?
selectedSupplierIds
.
split
(
','
)
:
[];
if
(
jQuery
.
inArray
(
supplier
[
'supplier_id'
],
selectedSupplierIds
)
===
0
)
{
layer
.
msg
(
'列表已经有该供应商,请重新选择'
,
{
icon
:
6
});
return
;
}
let
appendHtml
=
`
<tr>
<td>
${
supplier
[
'supplier_name'
]}
</td>
<td>
${
supplier
[
'system_tags'
]}
</td>
<td>
${
supplier
[
'customer_tags'
]}
</td>
<td><button type="button" class="layui-btn layui-btn-xs deleteSupplier" value="
${
supplier
[
'supplier_id'
]}
">删除</button> </td>
</tr>
`
;
console
.
log
(
appendHtml
);
let
selectedSupplierIds
=
$
(
'#supplier_ids'
).
val
();
selectedSupplierIds
=
selectedSupplierIds
?
selectedSupplierIds
.
split
(
','
)
:
[];
selectedSupplierIds
.
push
(
supplier
[
'supplier_id'
]);
$
(
'#supplier_ids'
).
val
(
selectedSupplierIds
.
join
(
','
));
$
(
'#operateSupplierList'
).
append
(
appendHtml
);
});
$
(
document
).
on
(
'click'
,
'.deleteSupplier'
,
function
()
{
let
selectedSupplierIds
=
$
(
'#supplier_ids'
).
val
();
let
deleteSupplierId
=
$
(
this
).
attr
(
'value'
);
selectedSupplierIds
=
selectedSupplierIds
?
selectedSupplierIds
.
split
(
','
)
:
[];
selectedSupplierIds
.
splice
(
jQuery
.
inArray
(
deleteSupplierId
,
selectedSupplierIds
),
1
);
$
(
'#supplier_ids'
).
val
(
selectedSupplierIds
.
join
(
','
));
$
(
this
).
parents
(
'tr'
).
remove
();
});
});
</script>
\ No newline at end of file
resources/views/script/SupplierExaminationListScript.blade.php
View file @
fe4671f9
...
...
@@ -87,6 +87,7 @@
{
field
:
'delivery_sn'
,
title
:
'送货单'
,
align
:
'center'
,
width
:
80
},
{
field
:
'tally_request'
,
title
:
'理货要求'
,
align
:
'center'
,
width
:
80
},
{
field
:
'examine_request'
,
title
:
'验货要求'
,
align
:
'center'
,
width
:
100
},
{
field
:
'unhealthy_amount'
,
title
:
'不良数'
,
align
:
'center'
,
width
:
80
},
{
field
:
'abnormal_level'
,
title
:
'异常等级'
,
align
:
'center'
,
width
:
80
},
{
field
:
'unhealthy_content'
,
title
:
'不良现象'
,
align
:
'center'
,
width
:
150
},
{
field
:
'examine_result'
,
title
:
'检验结果'
,
align
:
'center'
,
width
:
150
},
...
...
@@ -97,6 +98,9 @@
if
(
getQueryVariable
(
'supplier_id'
))
{
url
=
'/api/supplier_examination/GetSupplierExaminationList?supplier_id='
+
getQueryVariable
(
'supplier_id'
);
}
$
(
'#three_days_button'
).
remove
();
table
.
render
({
elem
:
'#supplierExaminationList'
,
url
:
url
...
...
resources/views/web/AddSupplierExamination.blade.php
View file @
fe4671f9
...
...
@@ -179,7 +179,7 @@
<div
class=
"layui-col-xs6"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('abnormal_level','异常等级 : ','',
config('field.SupplierAbnormalLevel'),['
required'=>true,'
width'=>'250px']) !!}
config('field.SupplierAbnormalLevel'),['width'=>'250px']) !!}
</div>
<div
class=
"layui-col-xs6"
>
<label
class=
"layui-form-label"
>
不良现象 :
</label>
...
...
resources/views/web/BatchAddTag.blade.php
View file @
fe4671f9
...
...
@@ -58,12 +58,14 @@
<col
width=
"300"
>
<col
width=
"400"
>
<col
width=
"400"
>
<col
width=
"200"
>
</colgroup>
<thead>
<tr>
<th>
供应商名称
</th>
<th>
系统标签
</th>
<th>
自定义标签
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody
id=
"operateSupplierList"
>
...
...
resources/views/web/SupplierExaminationList.blade.php
View file @
fe4671f9
...
...
@@ -24,6 +24,10 @@
@inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter')
{!! $transformableTimeIntervalPresenter->render(['examine_time'=>'检货时间']) !!}
</div>
<div
class=
"layui-inline"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('examine_result','检验结果',request()->get('status'),config('field.SupplierExamineResult')) !!}
</div>
</div>
<div
class=
"layui-row"
style=
"margin-top:10px;margin-bottom: 10px;margin-left: 20px;"
>
<button
class=
"layui-btn layui-btn-sm layui-btn load"
id=
"getSupplierListButton"
lay-submit=
""
...
...
resources/views/web/UpdateSupplierExamination.blade.php
View file @
fe4671f9
...
...
@@ -180,7 +180,7 @@
<div
class=
"layui-col-xs6"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('abnormal_level','异常等级 : ',$examination['abnormal_level'],
config('field.SupplierAbnormalLevel'),['
required'=>true,'
width'=>'250px']) !!}
config('field.SupplierAbnormalLevel'),['width'=>'250px']) !!}
</div>
<div
class=
"layui-col-xs6"
>
<label
class=
"layui-form-label"
>
不良现象 :
</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