Commit 53822317 by 杨树贤

修改bug

parent 6c390430
...@@ -104,8 +104,18 @@ class SupplierExaminationService ...@@ -104,8 +104,18 @@ class SupplierExaminationService
throw new \Exception("供应商名称不能为空! (第${lineNo}行),请修改后再次提交"); throw new \Exception("供应商名称不能为空! (第${lineNo}行),请修改后再次提交");
} }
if (empty($examineTime)) { if (empty($examineTime)) {
throw new \Exception("检货时间不能为空! (第${lineNo}行),请修改后再次提交"); throw new \Exception("检货时间不能为空! (第${lineNo}行),请修改为 2000-01-01 这种格式后再次提交");
} }
if (!isDateTime($examineTime)) {
throw new \Exception("检货时间格式不规范! (第${lineNo}行),请修改为 2000-01-01 这种格式后再次提交");
}
if (!empty($stockInDate) && !isDateTime($stockInDate)) {
throw new \Exception("入库日期时间格式不规范! (第${lineNo}行),请修改后再次提交");
}
if (!in_array($supplierName, $supplierNames)) { if (!in_array($supplierName, $supplierNames)) {
throw new \Exception("存在无效供应商(供应商系统不存在)的数据(第${lineNo}行),请修改后再次提交"); throw new \Exception("存在无效供应商(供应商系统不存在)的数据(第${lineNo}行),请修改后再次提交");
} }
...@@ -134,23 +144,9 @@ class SupplierExaminationService ...@@ -134,23 +144,9 @@ class SupplierExaminationService
} }
$examineData[] = [ $examineData[] = [
'examine_time' => $examineTime ? strtotime($examineTime) : '',
'purchase_name' => $channelUserName,
'supplier_name' => $supplierName,
'sku_name' => $skuName,
'brand_name' => $brandName,
'amount' => $amount,
'unhealthy_amount' => $unhealthyAmount,
'abnormal_level' => $abnormalLevel,
'examine_result' => $examineResult,
'remark' => $remark,
'data_md5' => $dataMd5,
];
$examineData[] = [
'order_sn' => $orderSn, 'order_sn' => $orderSn,
'purchase_sn' => $orderSn, 'purchase_sn' => $purchaseSn,
'examine_time' => $examineTime, 'examine_time' => $examineTime ? strtotime($examineTime) : 0,
'sales_name' => $salesName, 'sales_name' => $salesName,
'purchase_name' => $channelUserName, 'purchase_name' => $channelUserName,
'ticket_type' => $ticketType, 'ticket_type' => $ticketType,
...@@ -160,7 +156,7 @@ class SupplierExaminationService ...@@ -160,7 +156,7 @@ class SupplierExaminationService
'amount' => $amount, 'amount' => $amount,
'batch' => $batch, 'batch' => $batch,
'producing_area' => $producingArea, 'producing_area' => $producingArea,
'stock_in_date' => $stockInDate, 'stock_in_date' => $stockInDate ? strtotime($stockInDate) : 0,
'income_sn' => $incomeSn, 'income_sn' => $incomeSn,
'delivery_sn' => $deliverySn, 'delivery_sn' => $deliverySn,
'tally_request' => $tallyRequest, 'tally_request' => $tallyRequest,
......
...@@ -17,6 +17,7 @@ class SupplierExaminationTransformer ...@@ -17,6 +17,7 @@ class SupplierExaminationTransformer
$item['create_time'] = $item['create_time'] ? date('Y-m-d H:i:s', $item['create_time']) : ''; $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['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']) : ''; $item['examine_time'] = $item['examine_time'] ? date('Y-m-d', $item['examine_time']) : '';
$item['stock_in_date'] = $item['stock_in_date'] ? date('Y-m-d', $item['stock_in_date']) : '';
} }
unset($item); unset($item);
return $list; return $list;
......
...@@ -244,3 +244,8 @@ function makePassword($length) ...@@ -244,3 +244,8 @@ function makePassword($length)
} }
return $password; return $password;
} }
function isDateTime($dateTime){
$ret = strtotime($dateTime);
return $ret !== FALSE && $ret != -1;
}
\ No newline at end of file
...@@ -6,7 +6,7 @@ namespace App\Presenters; ...@@ -6,7 +6,7 @@ namespace App\Presenters;
class DatePresenter class DatePresenter
{ {
public function render($name, $text, $value,$option = []) public function render($name, $text, $value, $option = [])
{ {
$isRequired = array_get($option, 'required', false); $isRequired = array_get($option, 'required', false);
$isDisable = array_get($option, 'disable') === true ? 'disabled' : ''; $isDisable = array_get($option, 'disable') === true ? 'disabled' : '';
...@@ -16,7 +16,7 @@ class DatePresenter ...@@ -16,7 +16,7 @@ class DatePresenter
$time = $value; $time = $value;
return <<<EOF return <<<EOF
<label class="layui-form-label"> $requiredHtml $text</label> <label class="layui-form-label"> $requiredHtml $text</label>
<div class="layui-input-inline"> <div class="layui-input-inline" style="margin-top: 0px">
<input type="text" id="$name" name="$name" <input type="text" id="$name" name="$name"
placeholder="请输入$text" placeholder="请输入$text"
class="layui-input $disableClass" $isDisable class="layui-input $disableClass" $isDisable
...@@ -24,7 +24,7 @@ class DatePresenter ...@@ -24,7 +24,7 @@ class DatePresenter
</div> </div>
<script> <script>
window.onload = function(){ window.onload = function(){
layui.use('laydate', function(){ layui.use(['laydate'], function(){
let laydate = layui.laydate; let laydate = layui.laydate;
laydate.render({ laydate.render({
elem: 'input[name=$name]' elem: 'input[name=$name]'
......
...@@ -20,7 +20,7 @@ class StatusPresenter ...@@ -20,7 +20,7 @@ class StatusPresenter
$requiredHtml $requiredHtml
$text $text
</label> </label>
<div class="layui-input-inline" style="width: $width"> <div class="layui-input-inline" style="width: $width;margin-top: 0px">
<select name="$name" id="$name" lay-filter="$name" $isDisable lay-search=""> <select name="$name" id="$name" lay-filter="$name" $isDisable lay-search="">
{$this->optionsRender($data, $status)} {$this->optionsRender($data, $status)}
</select> </select>
......
...@@ -194,9 +194,9 @@ return [ ...@@ -194,9 +194,9 @@ return [
], ],
'SupplierAbnormalLevel' => [ 'SupplierAbnormalLevel' => [
1 => '(假货,贴牌,翻新,散新)', 1 => '1 : (假货,贴牌,翻新,散新)',
2 => '(氧化,划痕,歪角,丝印不清楚/磨字)', 2 => '2 : (氧化,划痕,歪角,丝印不清楚/磨字)',
3 => '(来料错误,包装不良,无标签)', 3 => '3 : (来料错误,包装不良,无标签)',
], ],
'SupplierExamineResult' => [ 'SupplierExamineResult' => [
......
检货时间,采购员,供应商,型号,品牌,数量,检验数量,不良数,异常等级,不良现象,检验结果,处理方式,备注
检货时间,采购员,供应商,型号,品牌,数量,检验数量,不良数,异常等级,不良现象,检验结果,处理方式,备注
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,标签不正常,,本体丝印错误,山寨货,退货1,
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,,包装盒标签不正确,本体丝印不正常。,山寨货,退货1,
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,,标签涂抹,料件本体外形及丝印字体均不正常,山寨货,建议退货,
销售订单号,采购订单号,检货时间,销售,采购员,A/B单,供应商,型号,品牌,数量,批次,产地,入库日期,来货单号,送货单,理货要求,验货要求,不良数,异常等级,不良现象,检验结果,备注
销售订单号,采购订单号,检货时间,销售,采购员,A/B单,供应商,型号,品牌,数量,批次,产地,入库日期,来货单号,送货单,理货要求,验货要求,不良数,异常等级,不良现象,检验结果,备注
123,123,2020/2/3,123,易敏,123,深圳市华之电科技有限公司,123,123,123,123,123,2020/2/3,123,123,123,123,123,1,特批入库,特批入库,123
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
layer.open({ layer.open({
type: 2, type: 2,
content: '/supplier_examination/AddSupplierExamination?view=iframe&supplier_id=' + getQueryVariable('supplier_id'), content: '/supplier_examination/AddSupplierExamination?view=iframe&supplier_id=' + getQueryVariable('supplier_id'),
area: ['80%', '70%'], area: ['80%', '90%'],
title: '添加IQC检测记录', title: '添加IQC检测记录',
end: function () { end: function () {
table.reload('supplierExaminationList'); table.reload('supplierExaminationList');
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
layer.open({ layer.open({
type: 2, type: 2,
content: '/supplier_examination/UpdateSupplierExamination?view=iframe&id=' + id + '&supplier_id=' + getQueryVariable('supplier_id'), content: '/supplier_examination/UpdateSupplierExamination?view=iframe&id=' + id + '&supplier_id=' + getQueryVariable('supplier_id'),
area: ['80%', '70%'], area: ['80%', '90%'],
title: '添加IQC检测记录', title: '添加IQC检测记录',
end: function () { end: function () {
table.reload('supplierExaminationList'); table.reload('supplierExaminationList');
......
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
<div class="layui-col-xs6"> <div class="layui-col-xs6">
@inject('statusPresenter','App\Presenters\StatusPresenter') @inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('abnormal_level','异常等级 : ','', {!! $statusPresenter->render('abnormal_level','异常等级 : ','',
[1=>1,2=>2,3=>3],['required'=>true]) !!} config('field.SupplierAbnormalLevel'),['required'=>true,'width'=>'250px']) !!}
</div> </div>
<div class="layui-col-xs6"> <div class="layui-col-xs6">
<label class="layui-form-label">不良现象 : </label> <label class="layui-form-label">不良现象 : </label>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
<div class="layui-inline"> <div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter') @inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('abnormal_level','异常等级',request()->get('abnormal_level'),[1=>1,2=>2,3=>3]) !!} {!! $statusPresenter->render('abnormal_level','异常等级',request()->get('abnormal_level'),config('field.SupplierAbnormalLevel')) !!}
</div> </div>
<div class="layui-inline" style="width: 600px"> <div class="layui-inline" style="width: 600px">
@inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter') @inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter')
......
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
<div class="layui-col-xs6"> <div class="layui-col-xs6">
@inject('statusPresenter','App\Presenters\StatusPresenter') @inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('abnormal_level','异常等级 : ',$examination['abnormal_level'], {!! $statusPresenter->render('abnormal_level','异常等级 : ',$examination['abnormal_level'],
[1=>1,2=>2,3=>3],['required'=>true]) !!} config('field.SupplierAbnormalLevel'),['required'=>true,'width'=>'250px']) !!}
</div> </div>
<div class="layui-col-xs6"> <div class="layui-col-xs6">
<label class="layui-form-label">不良现象 : </label> <label class="layui-form-label">不良现象 : </label>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment