|
@@ -77,7 +77,7 @@ class Purchase extends Controller
|
|
$validate->failException()->check($item,[
|
|
$validate->failException()->check($item,[
|
|
'name|名称'=>['require'],
|
|
'name|名称'=>['require'],
|
|
'spec|规格'=>['require'],
|
|
'spec|规格'=>['require'],
|
|
- 'number|数量'=>['require'],
|
|
|
|
|
|
+ 'number|数量'=>['require','integer'],
|
|
// 'standard|验收标准'=>['require'],
|
|
// 'standard|验收标准'=>['require'],
|
|
// 'price|价格'=>['require','float'],
|
|
// 'price|价格'=>['require','float'],
|
|
]);
|
|
]);
|
|
@@ -187,7 +187,7 @@ class Purchase extends Controller
|
|
$validate->failException()->check($item,[
|
|
$validate->failException()->check($item,[
|
|
'name|名称'=>['require'],
|
|
'name|名称'=>['require'],
|
|
'spec|规格'=>['require'],
|
|
'spec|规格'=>['require'],
|
|
- 'number|数量'=>['require'],
|
|
|
|
|
|
+ 'number|数量'=>['require','integer'],
|
|
// 'enclosure|附件'=>['array',],
|
|
// 'enclosure|附件'=>['array',],
|
|
]);
|
|
]);
|
|
// if(!empty($item['enclosure'])){
|
|
// if(!empty($item['enclosure'])){
|
|
@@ -372,7 +372,7 @@ class Purchase extends Controller
|
|
$validate->failException()->check($item,[
|
|
$validate->failException()->check($item,[
|
|
'name|名称'=>['require'],
|
|
'name|名称'=>['require'],
|
|
'spec|规格'=>['require'],
|
|
'spec|规格'=>['require'],
|
|
- 'number|数量'=>['require'],
|
|
|
|
|
|
+ 'number|数量'=>['require','integer'],
|
|
// 'enclosure|附件'=>['array',],
|
|
// 'enclosure|附件'=>['array',],
|
|
]);
|
|
]);
|
|
// if(!empty($item['enclosure'])){
|
|
// if(!empty($item['enclosure'])){
|
|
@@ -614,6 +614,7 @@ class Purchase extends Controller
|
|
$model->save();
|
|
$model->save();
|
|
|
|
|
|
Db::commit();
|
|
Db::commit();
|
|
|
|
+
|
|
$url = setword($data['tab']+1,$data['id']);
|
|
$url = setword($data['tab']+1,$data['id']);
|
|
ShopPurchase::getItem($data['tab'])->where('id',$model['id'])->update(['down_word'=>$url]);
|
|
ShopPurchase::getItem($data['tab'])->where('id',$model['id'])->update(['down_word'=>$url]);
|
|
$this->success('匹配成功');
|
|
$this->success('匹配成功');
|