|
@@ -57,7 +57,9 @@ class InterOrder extends Base
|
|
|
"workCode|单据号"=>"max:255|min:1",
|
|
|
]);
|
|
|
$data=[];
|
|
|
+ $i=0;
|
|
|
foreach ($param['list'] as $item){
|
|
|
+ $i++;
|
|
|
if($valid->check($item)==false) return error_show(1004,$valid->getError());
|
|
|
$comArr= $userCom->handle("getCodeAndName",["code"=>[$item['companyNo'],$item['customerNo'],$item['supplierNo']]]);
|
|
|
if(!isset($comArr['code'])|| $comArr['code']!=0){
|
|
@@ -65,6 +67,7 @@ class InterOrder extends Base
|
|
|
}
|
|
|
$compAr= $comArr['data']??[];
|
|
|
$interNo = makeNo("RE");
|
|
|
+ $interNo .=str_pad($i.'', 3, '0', STR_PAD_LEFT);
|
|
|
$data[] =[
|
|
|
"interNo"=>$interNo,
|
|
|
"apply_id"=>$this->uid,
|
|
@@ -76,6 +79,8 @@ class InterOrder extends Base
|
|
|
"supplierNo"=>$item['supplierNo'],
|
|
|
"supplierName"=>$compAr[$item['supplierNo']],
|
|
|
"platform_name"=>Db::name("platform")->where(["id"=>$item["platform_id"]])->value("platform_name",''),
|
|
|
+ "cat_id"=>$item['cat_id'],
|
|
|
+ "platform_id"=>$item['platform_id'],
|
|
|
"good_name"=>$item['good_name'],
|
|
|
"good_unit"=>$item['good_unit'],
|
|
|
"good_tax"=>$item['good_tax'],
|
|
@@ -140,6 +145,7 @@ class InterOrder extends Base
|
|
|
->field("*,cat_id as cat_info")
|
|
|
->page(intval($page),intval($param['size']))
|
|
|
->withAttr("cat_info",function ($v){return made($v);})
|
|
|
+ ->order("id desc")
|
|
|
->select();
|
|
|
return app_show(0,"获取成功",["list"=>$list,"count"=>$count]);
|
|
|
}
|