|
@@ -22,10 +22,11 @@ class Filing extends HomeBaseController
|
|
|
//添加
|
|
|
public function add()
|
|
|
{
|
|
|
- $param = $this->request->only(['companyName', 'num', 'is_determine_price', 'price' => 0, 'service_proportion', 'expect_service', 'cgd_charge' => 0, 'brand_id', 'preservation_day', 'delivery_day', 'make_day', 'tax', 'unit_id', 'cat_id', 'spec_list' => [], 'good_name', 'origin_place', 'delivery_place', 'weight', 'supply_area', 'pay_way', 'nake_fee', 'gold_weight', 'noble_metal', 'config', 'other_config', 'remark', 'cost_desc', 'good_img', 'supplierNo', 'supplierName'], 'post');
|
|
|
+ $param = $this->request->only(['customerCode','companyName', 'num', 'is_determine_price', 'price' => 0, 'service_proportion', 'expect_service', 'cgd_charge' => 0, 'brand_id', 'preservation_day', 'delivery_day', 'make_day', 'tax', 'unit_id', 'cat_id', 'spec_list' => [], 'good_name', 'origin_place', 'delivery_place', 'weight', 'supply_area', 'pay_way', 'gold_weight', 'noble_metal', 'config', 'other_config', 'remark', 'cost_desc', 'good_img'], 'post');
|
|
|
|
|
|
$val = Validate::rule([
|
|
|
- 'companyName|业务公司' => 'require|max:255',
|
|
|
+ 'customerCode|业务公司' => 'require|max:255',
|
|
|
+ 'companyName|客户名称' => 'require|max:255',
|
|
|
'num|销售数量' => 'require|number|gt:0|lt:999999999',
|
|
|
'is_determine_price|是否确定售价' => 'require|number|in:1,0',
|
|
|
'price|销售价' => 'requireIf:is_determine_price,1|float|max:99999999.99',
|
|
@@ -46,16 +47,14 @@ class Filing extends HomeBaseController
|
|
|
'weight|总重量' => 'require|float|max:99999999.99',
|
|
|
'supply_area|供货区域' => 'require|number|in:1,2',
|
|
|
'pay_way|付款方式' => 'require|number|in:1,2,3',
|
|
|
- 'nake_fee|裸价' => 'require|float|max:99999999.99',
|
|
|
'gold_weight|贵金属重量' => 'float|max:99999999.99',
|
|
|
- 'noble_metal|贵金属类型' => 'require|number|in:1,2,3',
|
|
|
+ 'noble_metal|贵金属类型' => 'number|in:1,2,3',
|
|
|
'config|配置要求' => 'require|max:255',
|
|
|
'other_config|其他配置要求' => 'require|max:255',
|
|
|
'remark|采购备注' => 'require|max:255',
|
|
|
'cost_desc|工艺说明' => 'max:255',
|
|
|
'good_img|商品图片' => 'require|max:255',
|
|
|
- 'supplierNo|供应商编码' => 'require|max:255',
|
|
|
- 'supplierName|供应商名称' => 'require|max:255',
|
|
|
+
|
|
|
]);
|
|
|
|
|
|
if (!$val->check($param)) return json_show(1004, $val->getError());
|
|
@@ -79,6 +78,9 @@ class Filing extends HomeBaseController
|
|
|
$spec_list['spec_value_name'] = $all_spec_value[$spec_list['spec_value_id']] ?? '';
|
|
|
}
|
|
|
|
|
|
+ $param['supplierNo']= $this->request->user['supplierNo'];
|
|
|
+ $param['supplierName']= $this->request->user['supplierName'];
|
|
|
+
|
|
|
return FilingLogic::add($param);
|
|
|
|
|
|
}
|