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
c60c9d82
authored
Jul 14, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
IQC检测需求
parent
1474e927
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
256 additions
and
42 deletions
app/Http/Controllers/Api/SupplierExaminationApiController.php
app/Http/Controllers/Filter/SupplierExaminationFilter.php
app/Http/Services/SupplierExaminationService.php
app/Http/Transformers/SupplierExaminationTransformer.php
public/data/import_supplier_examination_template - 副本.csv
public/data/import_supplier_examination_template.csv
public/data/import_supplier_examination_template.xlsx
resources/views/script/SupplierExaminationListScript.blade.php
resources/views/web/AddSupplierExamination.blade.php
resources/views/web/SupplierExaminationList.blade.php
resources/views/web/UpdateSupplier.blade.php
resources/views/web/UpdateSupplierExamination.blade.php
app/Http/Controllers/Api/SupplierExaminationApiController.php
View file @
c60c9d82
...
...
@@ -9,6 +9,7 @@ use App\Http\Validators\SupplierExaminationValidator;
use
App\Model\LogModel
;
use
App\Model\SupplierLogModel
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Storage
;
//供应商检测
class
SupplierExaminationApiController
extends
Controller
...
...
@@ -102,4 +103,30 @@ class SupplierExaminationApiController extends Controller
}
$this
->
response
(
-
1
,
'删除失败'
,
$result
);
}
//上传相似商品
private
function
ImportSupplierExamination
(
$request
)
{
$file
=
$request
->
file
(
'file'
);
if
(
$file
->
isValid
())
{
$ext
=
$file
->
getClientOriginalExtension
();
$realPath
=
$file
->
getRealPath
();
if
(
$ext
!=
'csv'
)
{
$this
->
response
(
-
1
,
'上传格式错误'
);
}
// 上传文件
$filename
=
date
(
'Y-m-d-H-i-s'
)
.
'-'
.
uniqid
()
.
'.'
.
$ext
;
$bool
=
Storage
::
put
(
$filename
,
file_get_contents
(
$realPath
));
if
(
!
$bool
)
{
$this
->
response
(
-
1
,
'文件处理失败'
);
}
$filePath
=
storage_path
(
'app/'
)
.
$filename
;
$result
=
(
new
SupplierExaminationService
())
->
ImportSupplierExamination
(
$filePath
);
if
(
$result
!==
true
)
{
$this
->
response
(
-
1
,
$result
);
}
$this
->
response
(
0
,
'上传成功'
);
}
}
}
app/Http/Controllers/Filter/SupplierExaminationFilter.php
View file @
c60c9d82
...
...
@@ -30,6 +30,12 @@ class SupplierExaminationFilter
$query
->
where
(
'supplier_name'
,
'like'
,
"%${map['supplier_name']}%"
);
}
if
(
!
empty
(
$map
[
'supplier_id'
]))
{
$supplierName
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$map
[
'supplier_id'
])
->
value
(
'supplier_name'
);
$query
->
where
(
'supplier_name'
,
$supplierName
);
}
if
(
!
empty
(
$map
[
'purchase_name'
]))
{
$query
->
where
(
'purchase_name'
,
$map
[
'purchase_name'
]);
...
...
app/Http/Services/SupplierExaminationService.php
View file @
c60c9d82
...
...
@@ -9,10 +9,12 @@ use App\Http\Controllers\Filter\SupplierExaminationFilter;
use
App\Http\Transformers\SupplierAccountTransformer
;
use
App\Http\Transformers\SupplierExaminationTransformer
;
use
App\Model\LogModel
;
use
App\Model\RedisModel
;
use
App\Model\SupplierChannelModel
;
use
App\Model\SupplierContactModel
;
use
App\Model\SupplierExaminationModel
;
use
Carbon\Carbon
;
use
Maatwebsite\Excel\Facades\Excel
;
use
PhpAmqpLib\Connection\AMQPStreamConnection
;
use
PhpAmqpLib\Message\AMQPMessage
;
...
...
@@ -47,4 +49,77 @@ class SupplierExaminationService
{
return
SupplierExaminationModel
::
whereIn
(
'id'
,
$ids
)
->
delete
();
}
//上传
public
function
ImportSupplierExamination
(
$filePath
)
{
ini_set
(
'memory_limit'
,
-
1
);
try
{
$content
=
file_get_contents
(
$filePath
);
$fileType
=
mb_detect_encoding
(
$content
,
array
(
'UTF-8'
,
'GBK'
,
'LATIN1'
,
'BIG5'
));
Excel
::
load
(
$filePath
,
function
(
$reader
)
{
$data
=
$reader
->
getSheet
(
0
)
->
toArray
();
$dataMd5
=
md5
(
json_encode
(
$data
));
if
(
SupplierExaminationModel
::
where
(
'data_md5'
,
$dataMd5
)
->
exists
())
{
throw
new
\Exception
(
'该文件已经上传过,请选择其它文件'
);
}
//拼装数据插入校验,校验完成插入数据库
$examineData
=
[];
foreach
(
$data
as
$index
=>
$item
)
{
if
(
$index
==
0
)
{
continue
;
}
$item
=
array_map
(
function
(
$value
)
{
return
trim
(
$value
);
},
$item
);
$examineTime
=
$item
[
0
];
$purchaseName
=
$item
[
1
];
$supplierName
=
$item
[
2
];
$skuName
=
$item
[
3
];
$brandName
=
$item
[
4
];
$amount
=
$item
[
5
];
$examineAmount
=
$item
[
6
];
$unhealthyAmount
=
$item
[
7
];
$abnormalLevel
=
$item
[
8
];
$unhealthyContent
=
$item
[
9
];
$examineResult
=
$item
[
10
];
$handleWay
=
$item
[
11
];
$remark
=
$item
[
12
];
if
(
empty
(
$supplierName
))
{
throw
new
\Exception
(
'上传文件里面存在供应商名称为空的数据,请修改后再次提交'
);
}
$examineData
[]
=
[
'examine_time'
=>
$examineTime
?
strtotime
(
$examineTime
)
:
''
,
'purchase_name'
=>
$purchaseName
,
'supplier_name'
=>
$supplierName
,
'sku_name'
=>
$skuName
,
'brand_name'
=>
$brandName
,
'amount'
=>
$amount
,
'examine_amount'
=>
$examineAmount
,
'unhealthy_amount'
=>
$unhealthyAmount
,
'abnormal_level'
=>
$abnormalLevel
,
'unhealthy_content'
=>
$unhealthyContent
,
'examine_result'
=>
$examineResult
,
'handle_way'
=>
$handleWay
,
'remark'
=>
$remark
,
'data_md5'
=>
$dataMd5
,
];
}
$examineData
=
collect
(
$examineData
);
foreach
(
$examineData
->
chunk
(
50
)
as
$chunk
)
{
SupplierExaminationModel
::
insert
(
$chunk
->
toArray
());
}
return
true
;
},
$fileType
);
}
catch
(
\Exception
$exception
)
{
return
$exception
->
getMessage
();
}
return
true
;
}
}
\ No newline at end of file
app/Http/Transformers/SupplierExaminationTransformer.php
View file @
c60c9d82
...
...
@@ -13,6 +13,7 @@ class SupplierExaminationTransformer
foreach
(
$list
as
&
$item
)
{
$item
[
'create_time'
]
=
$item
[
'create_time'
]
?
date
(
'Y-m-d H:i:s'
,
$item
[
'create_time'
])
:
''
;
$item
[
'update_time'
]
=
$item
[
'update_time'
]
?
date
(
'Y-m-d H:i:s'
,
$item
[
'update_time'
])
:
''
;
$item
[
'examine_time'
]
=
$item
[
'examine_time'
]
?
date
(
'Y-m-d'
,
$item
[
'examine_time'
])
:
''
;
}
unset
(
$item
);
return
$list
;
...
...
public/data/import_supplier_examination_template - 副本.csv
0 → 100644
View file @
c60c9d82
检货时间,采购员,供应商,型号,品牌,数量,检验数量,不良数,异常等级,不良现象,检验结果,处理方式,备注
检货时间,采购员,供应商,型号,品牌,数量,检验数量,不良数,异常等级,不良现象,检验结果,处理方式,备注
2020/8/28,张华,北京创易特科技有限公司,MIC2940A-12WU-TR ,MICROCHIP,3K,3K,,,标签不正常,疑是山寨货,,采购有原厂COC
2020/8/31,谭博利,Bentley Technologies,PM75CSA120,MITSUBISHI,2,2,,,使用过的擦磨旧货,,己跟采购说明,已出货。,
2020/8/31,马玉强,深圳市有芯电子有限公司,17-21/Y2C-AN1P2B/3T,亿光,3K,3K,,,标签不正常,,己跟采购说明,已出货。,
2020/9/1,邓小姣,深圳市铭盛微电子有限公司,MP6922DSE-LF-Z,MPS,2253,2253,标签不正常,,本体丝印格式错误且与标签信息不符,山寨货,退货,
2020/9/1,陈燕,深圳市长河世纪科技有限公司,LMDL301T1G,LRC,3K,3K,标签不正常,,本体丝印错误,山寨货,退货,
2020/9/1,段灵芝,Integrated Electronics Company,IXBA14N300HV,IXYS,525,525,无原标签,,本体丝印不统一且与标签D/C不相符,重编带货,让步采用,
2020/9/17,汤浩升,深圳市亿威盛创科技有限公司,TS3USB221RSER,TI,800,800,无盘无标签,,反面有明显划痕,1136重新编带货,,
2020/9/21,陈泽彬,深圳市满多鑫电子有限公司,MTFC4GMDEA-4M IT,MICRON,12,12,无盘无标签,,反面有污迹少数球珠有伤痕个别球珠有氧化现象,重编带货,,
2020/10/19,邓小姣,深圳市沃德顺科电子科技有限公司,ADP151AUJZ-3.3,ADI,600,600,无盘无标签有盘标签照片,,丝印格式不正常,标签不正常,山寨货,退货,
2020/10/21,张佑辉,深圳市芯毅科技有限公司,MP3202DJ-LF-Z,MPS,"3,000",3000,3000,,标签不正常,本体丝印错误,山寨货,退货,
2020/11/3,马玉强,深圳市粤鑫朋电子有限公司,RT8272GSP,RICHTEK,60,6,6,,反面金属面及引脚有明显氧化现象,氧化货,退货,
2020/12/8,王秋,深圳市菱睿供应链管理有限公司,FQP13N50C,ON,2400,1000X8,2400,,包装盒标签不正确,本体丝印不正常。,山寨货,退货,
2020/12/29,陈欢,深圳市联翔兴业电子有限公司,24LC512T-I/SN, MicroChip,3300,4,4,,包装盘袋标签均不正常,本体外形非MicroChip封装外形,山寨货,退货,
2020/12/30,汤浩升,深圳明嘉瑞科技有限公司,TL431AILPR,TI,2000,4,4,,本体信息与包装标签信息不一致且标签涂抹,山寨货,退货,
2021/1/4,廖长青,深圳市路泽半导体有限公司(顺乐),SG6742MRSY,ON,2500+1500,8,8,,本体信息与包装标签信息不一致,换盘换标签货,换货,
2021/1/5,张佑辉,深圳市汇联微电子有限公司,MSS6132-103MLC,COILCAFT,1500+300,4,4,,1500PCS整盘标签不正常且无负标签,山寨货,退货,
2021/1/8,陈欢,HongXin Technology Limited,RPI-221,ROHM,4000,4,4,,包装盒标签明显错误,本体无丝印,山寨货,退货,
2021/1/12,杨康,上海竹开电子科技有限公司,DS1302ZN-TR,MAX,510,4,4,,无盘无外包装无标签,本体外形不正常,此封装此系列无台湾产地,山寨货,建议退货,
2021/1/25,陈欢,深圳市纳立科技有限公司,LESD5Z12T1G,LRC,18K,4,4,,盘标签错误,本体丝印信息与标签信息不一致。,山寨货,建议退货,
2021/1/29,陈燕,深圳市潮光科技有限公司,SM712-02HTG,??LITTELFUSE,6K,4,4,,盘标签错误,本体丝印少定位点,山寨货,建议退货,
2021/2/1,陈燕,深圳市佰昇电子有限公司,MT41K128M16JT-125:K,MICRON,2K,6,6,,内外标签及包装均不正常,IC本体为磨面重打字,反面球珠平头和掉珠,旧翻新货,退货,
2021/2/2,陈海佳,深圳市福田区联信源经营部,PMEG3010EGWJ,NEXPERIA,120K,4,4,,盒标签错误,本体丝印不正常。,山寨货,建议退货,
2021/3/2,廖长青,北京京北通宇电子元件有限公司济南分公司,H5008NL,PULSE,705,3,3,,盘标签有低级的错误,山寨货,建议退货,
2021/3/8,陈燕,北京京北通宇电子元件有限公司济南分公司,P0353NLT,PULSE,403,3,3,,盘标签有低级的错误,山寨货,建议退货,
2021/3/10,陈海佳,深圳市成轩恒业电子科技有限公司,FDN306P,ON,3000,4,4,,盘标签不正常,本体D/C与标签D/C不一致,老D/C换标签货,建议退货,
2021/3/16,张佑辉,深圳市独角兽半导体有限公司,MP3202DJ-LF-Z,MPS,3000,4,4,,盘标签不正常,本体丝印不正确,山寨货,建议退货,
2021/3/17,段灵芝,北京京北通宇电子元件有限公司济南分公司,VLCF5020T-3R3N2R0-1,TDK,1000,4,4,,盘标签不正常,本体做功粗糙,山寨货,建议退货,
2021/3/24,陈海佳,深圳市福田区联信源经营部,BSH114,215,NEXPERIA,51K,4,4,,标签错误,本体外形不正常,山寨货,建议退货,
2021/3/29,王秋,?东莞一锋光电材料有限公司,FQD2N90TM,ON,10K,5,5,,包装及标签均不正常,D/C表示方法错误,山寨货,建议退货,
2021/4/9,夏继永,深圳禾靖贸易有限公司,CD74HC4514M,TI,650,4,5,,"本体丝印不正常:Logo非原品牌Logo,丝印信息错误",山寨货,建议退货,
2021/4/9,夏继永,深圳禾靖贸易有限公司,AD8346ARUZ,ADI,150,3,3,,本体非原面非原字非原引脚,旧翻新货,建议退货,
2021/4/14,陈欢,深圳庞田科技有限公司,STM8S208RBT6??,STM,1920,8,8,,本体非原面非原字非原引脚,磨面重新改丝印货,建议退货,
2021/6/3,韦诗相,深圳市特克电子技术有限公司,SN65HVD230QDRG4Q1,TI,5000,8,8,,标签有明显的错误,包装不正常,本体丝印信息与标签信息不一致,老D/C重编带换标签货,建议退货,
2021/6/4,韦诗相,上海贤泽电子科技有限公司,SPZT651T1G,ON,24K,12,12,,标签有明显的错误,本体丝印信息与标签信息不一致,山寨货,建议退货,
2021/6/7,王文娟,深圳市亿博创电子公司,TLC372CDR,TI,10K,4,4,,包装不正常,标签错误,本体外形不正常,本体信息与标签不一致。,山寨货,建议退货,
2021/6/17,刘域芳,深圳市天富盛电子有限公司,SM6T36CA,ST,40K,8,8,,包装不正常,标签错误,本体丝印字体不正常。,山寨货,建议退货,
2021/7/5,刘巍雄,武汉芯中心科技有限公司,TJA1021TK/20/C,NXP,100,4,4,,磨面打字,改丝印货,改丝印货,建议退货,
2021/7/9,刘巍雄,深圳市炬荣电子有限公司,PESD3V3L1UB,NXP,34000,6,6,,标签错误,本体外形不正常,山寨货,建议退货,
2021/7/14,韦燕,KST COMPONENTS LIMITED,NVTR01P02LT1G,ON,21000,10,10,,标签错误,本体信息与标签信息不一致,换盘换标签货,建议退货,
2021/7/23,刘巍雄,武汉芯中心科技有限公司,AO4616,AOS,520,4,4,,标签错误,本体外形及丝印字体不正常,山寨货,建议退货,
2021/7/27,邓小姣,深圳市展卓信电子有限公司 ,ADP7118WAUJZ-5.0-R7?,ADI,6K,6,6,,标签错误,本体外形不正常,山寨货,建议退货,
2021/7/28,陈欢,深圳纳立科技有限公司,DRV8702QRHBRQ1,TI,3K,10,10,,标签明显低级错误,本体正反面均有明显划痕,丝印不统一,散新重新编带打标签货,建议退货,
2021/8/2,刘巍雄,武汉蜜蜂微科技有限公司,AOZ1282CI,AOS,3K,4,4,,标签错误,本体外形及丝印均不正常,山寨货,建议退货,
2021/8/5,彭红超,深圳市深晔电子有限公司,SN65HVD72DR,TI,5K,6,6,,包装不正常,标签已涂抹,本体丝印信息与标签信息不一致。,山寨货,建议退货,
2021/8/24,张越,Zilex Electronics Inc,TS922AIDT,STM,2500,4,4,,标签完全错误,IC本体非原面非原字非原引脚,丝印错误,旧翻新货,建议退货,
,李妹,深圳市世芯电子有限公司,FSV10150V,ON,4000,4,4,,标签错误,料件本体丝印错误,字体也不正常,山寨货,建议退货,
,李妹,深圳市世芯电子有限公司,EGF1T-E3/67A,VISHAY,30000,6,6,,标签错误,料件本体外形不正常,山寨货,建议退货,
2021/9/10,邹琪,厦门翰科科技有限公司,STL130N6F7,STM,6000,6,6,,涂标,料件本体为磨面喷柒打字,旧引脚,磨面重新改丝印货,建议退货,
2021/9/10,邹琪,深圳市誉鼎科技有限公司,FSUSB42MUX,ON,10000,12,12,,标签错误,本体丝印信息与标签信息不一致,老D/C换盘换标签货,建议退货,
2021/9/13,彭红超,深圳市深晔电子有限公司,OPA2277UA/2K5,TI,2500,4,4,,标签错误,本体信息与标签信息不一致,山寨货,建议退货,
2021/9/16,张雪佳,深圳市卓美信电子科技有限公司,DMP2035U-7,DIODES,12000,8,8,,包装盘及标签均不正常,本体外形及丝印均不正常,山寨货,建议退货,
2021/9/16,易娜,深圳市成兴光电子科技有限公司,LPA675-N1P2-25-0-30-R33-Z,OSRAM,6000,6,6,,包装标签不正常,本体是无字的LED,山寨货,建议退货,
2021/9/17,彭红超,深圳市深晔电子有限公司,LM324MX/NOPB,TI,3150,4,4,,标签涂抹,料件本体外形及丝印字体均不正常,山寨货,建议退货,
public/data/import_supplier_examination_template.csv
0 → 100644
View file @
c60c9d82
检货时间,采购员,供应商,型号,品牌,数量,检验数量,不良数,异常等级,不良现象,检验结果,处理方式,备注
public/data/import_supplier_examination_template.xlsx
deleted
100644 → 0
View file @
1474e927
No preview for this file type
resources/views/script/SupplierExaminationListScript.blade.php
View file @
c60c9d82
<script>
layui
.
use
([
'table'
,
'form'
,
'element'
,
'layer'
,
'Split'
,
'admin'
,
'xmSelect'
],
function
()
{
layui
.
use
([
'table'
,
'form'
,
'element'
,
'
upload'
,
'
layer'
,
'Split'
,
'admin'
,
'xmSelect'
],
function
()
{
let
$
=
layui
.
jquery
;
let
Split
=
layui
.
Split
;
let
table
=
layui
.
table
;
let
upload
=
layui
.
upload
;
let
form
=
layui
.
form
;
let
admin
=
layui
.
admin
;
let
xmSelect
=
layui
.
xmSelect
;
...
...
@@ -14,9 +15,9 @@
{
type
:
'checkbox'
},
{
field
:
'id'
,
title
:
'ID'
,
align
:
'center'
,
width
:
80
},
{
field
:
'examine_time'
,
title
:
'检货时间'
,
align
:
'center'
,
width
:
1
5
0
field
:
'examine_time'
,
title
:
'检货时间'
,
align
:
'center'
,
width
:
1
3
0
},
{
field
:
'purchase_name'
,
title
:
'采购员'
,
align
:
'center'
,
width
:
1
1
0
},
{
field
:
'purchase_name'
,
title
:
'采购员'
,
align
:
'center'
,
width
:
1
0
0
},
{
field
:
'supplier_name'
,
title
:
'供应商'
,
align
:
'center'
,
width
:
200
},
...
...
@@ -25,19 +26,24 @@
{
field
:
'amount'
,
title
:
'数量'
,
align
:
'center'
,
width
:
100
},
{
field
:
'examine_amount'
,
title
:
'检测数量'
,
align
:
'center'
,
width
:
100
},
{
field
:
'unhealthy_amount'
,
title
:
'不良数'
,
align
:
'center'
,
width
:
100
},
{
field
:
'abnormal_level'
,
title
:
'异常等级'
,
align
:
'center'
,
width
:
80
},
{
field
:
'unhealthy_content'
,
title
:
'不良现象'
,
align
:
'center'
,
width
:
150
},
{
field
:
'examine_result'
,
title
:
'检验结果'
,
align
:
'center'
,
width
:
150
},
{
field
:
'abnormal_level'
,
title
:
'异常等级'
,
align
:
'center'
,
width
:
150
},
{
field
:
'handle_way'
,
title
:
'处理方式'
,
align
:
'center'
,
width
:
150
},
{
field
:
'remark'
,
title
:
'备注'
,
align
:
'center'
,
width
:
150
},
];
let
currentPage
=
0
;
let
url
=
'/api/supplier_examination/GetSupplierExaminationList'
;
if
(
getQueryVariable
(
'supplier_id'
))
{
url
=
'/api/supplier_examination/GetSupplierExaminationList?supplier_id='
+
getQueryVariable
(
'supplier_id'
);
}
table
.
render
({
elem
:
'#supplierExaminationList'
,
url
:
'/api/supplier_examination/GetSupplierExaminationList'
,
url
:
url
,
method
:
'post'
,
size
:
'sm'
,
limit
:
20
,
height
:
600
,
cellMinWidth
:
50
//全局定义常规单元格的最小宽度
,
where
:
whereCondition
,
loading
:
true
...
...
@@ -129,5 +135,31 @@
location
.
reload
();
});
//执行实例
var
uploadInst
=
upload
.
render
({
elem
:
'#import_supplier_examination'
,
//绑定元素
url
:
'/api/supplier_examination/ImportSupplierExamination'
,
//上传接口
auto
:
true
,
exts
:
'csv'
,
before
:
function
(
obj
)
{
//obj参数包含的信息,跟 choose回调完全一致,可参见上文。
layer
.
msg
(
'上传中'
,
{
icon
:
16
});
//上传loading
},
done
:
function
(
res
)
{
if
(
!
res
)
{
return
layui
.
msg
(
'上传失败'
,
{
icon
:
5
});
}
if
(
res
.
err_code
===
0
)
{
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
});
table
.
reload
(
'supplierExaminationList'
);
}
else
{
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
});
}
},
error
:
function
()
{
return
layer
.
msg
(
'上传失败'
,
{
icon
:
5
});
}
});
});
</script>
\ No newline at end of file
resources/views/web/AddSupplierExamination.blade.php
View file @
c60c9d82
...
...
@@ -96,7 +96,7 @@
<div
class=
"layui-col-md6"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('abnormal_level','异常等级 : ','',
[1=>1,2=>2,3=>3],['required'=>true]) !!}
[
0=>0,
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 @
c60c9d82
<div
class=
"layui-collapse"
>
<form
class=
"layui-form"
style=
"margin-top: 15px"
>
<?php
$routerName
=
explode
(
'/'
,
request
()
->
path
())[
1
];
?>
<div
class=
"layui-row"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
供应商名称
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
value=
""
name=
"supplier_name"
placeholder=
"支持模糊匹配"
autocomplete=
"off"
class=
"layui-input"
>
<?php
$routerName
=
explode
(
'/'
,
request
()
->
path
())[
1
];
?>
@if($routerName=='SupplierExaminationList')
<form
class=
"layui-form"
style=
"margin-top: 15px"
>
<div
class=
"layui-row"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
供应商名称
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
value=
""
name=
"supplier_name"
placeholder=
"支持模糊匹配"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-inline"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_name','采购员',request()->get('status'),$purchaseUserNames) !!}
</div>
<div
class=
"layui-inline"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('abnormal_level','异常等级',request()->get('abnormal_level'),[0=>0,1=>1,2=>2,3=>3]) !!}
</div>
<div
class=
"layui-inline"
style=
"width: 600px"
>
@inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter')
{!! $transformableTimeIntervalPresenter->render(['examine_time'=>'检货时间']) !!}
</div>
</div>
<div
class=
"layui-inline"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_name','采购员',request()->get('status'),$purchaseUserNames) !!}
</div>
<div
class=
"layui-inline"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('abnormal_level','异常等级',request()->get('abnormal_level'),[1=>1,2=>2,3=>3]) !!}
</div>
<div
class=
"layui-inline"
style=
"width: 600px"
>
@inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter')
{!! $transformableTimeIntervalPresenter->render(['examine_time'=>'检货时间']) !!}
<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=
""
lay-filter=
"load"
>
查询
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn"
lay-submit=
""
lay-filter=
"reset"
>
重置
</button>
</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=
""
lay-filter=
"load"
>
查询
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn"
lay-submit=
""
lay-filter=
"reset"
>
重置
</button>
</div>
</form>
</form>
</div>
@endif
<div
style=
"margin-left: 20px;margin-right: 20px"
>
<div
class=
"layui-btn-group demoTable"
style=
"margin-top: 15px"
>
@if(checkPerm('AddSupplierExamination'))
...
...
@@ -42,12 +44,13 @@
<button
type=
"button"
class=
"layui-btn layui-btn-sm"
id=
"update_supplier_examination"
>
编辑
</button>
@endif
@if(checkPerm('ImportSupplierExamination'))
<button
type=
"button"
class=
"layui-btn layui-btn-sm"
id=
"import_supplier_examination"
>
导入
</button>
@if($routerName=='SupplierExaminationList')
@if(checkPerm('ImportSupplierExamination'))
<button
type=
"button"
class=
"layui-btn layui-btn-sm"
id=
"import_supplier_examination"
>
导入
</button>
@endif
<a
href=
"/data/import_supplier_examination_template.csv"
target=
"_blank"
class=
"layui-btn layui-btn-sm"
id=
"download_supplier_examination_import_template"
>
下载模板
</a>
@endif
<a
href=
"/data/import_supplier_examination_template.xlsx"
target=
"_blank"
class=
"layui-btn layui-btn-sm"
id=
"download_supplier_examination_import_template"
>
下载模板
</a>
@if(checkPerm('DeleteSupplierExamination'))
<button
type=
"button"
class=
"layui-btn layui-btn-sm"
id=
"delete_supplier_examination"
>
删除
</button>
@endif
...
...
@@ -55,3 +58,4 @@
<table
class=
"layui-table"
id=
"supplierExaminationList"
lay-filter=
"supplierExaminationList"
></table>
</div>
@include('script.SupplierExaminationListScript')
\ No newline at end of file
resources/views/web/UpdateSupplier.blade.php
View file @
c60c9d82
...
...
@@ -125,6 +125,13 @@
id="sku_ruler">SKU概况
</li>
<li
@
if
(!
checkPerm
('
ViewSupplierExamination
'))
style=
"display: none"
@
endif
@
if
(
request
()
-
>
get('tab')=='examination')
class="layui-this"
@endif
id="examination">检测记录
</li>
</ul>
<div
class=
"layui-tab-content"
>
<div
class=
"layui-tab-item @if(request()->get('tab')=='base_info'||empty(request()->get('tab'))) layui-show @endif"
>
...
...
@@ -235,6 +242,9 @@
<div
class=
"layui-tab-item @if(request()->get('tab')=='sku_ruler') layui-show @endif"
>
@include('web.supplier.SkuRuler')
</div>
<div
class=
"layui-tab-item @if(request()->get('tab')=='examination') layui-show @endif"
>
@include('web.SupplierExaminationList')
</div>
</div>
</div>
</div>
...
...
resources/views/web/UpdateSupplierExamination.blade.php
View file @
c60c9d82
...
...
@@ -97,7 +97,7 @@
<div
class=
"layui-col-md6"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('abnormal_level','异常等级 : ',$examination['abnormal_level'],
[1=>1,2=>2,3=>3],['required'=>true]) !!}
[
0=>0,
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