|
@@ -570,9 +570,10 @@ class Consult extends Base
|
|
|
// ]);
|
|
|
if($isbids==1){
|
|
|
$bidlist = Db::name("consult_bids")->where(["infoNo"=>$zxinfo['infoNo'],"is_del"=>0])->select()->toArray();
|
|
|
- if (!empty($bidlist)){
|
|
|
+ if (!empty($bidlist)){
|
|
|
foreach ($bidlist as $value){
|
|
|
unset($value['id']);
|
|
|
+ $bidno=$value['bidNo'];
|
|
|
$value['infoNo']=$innew;
|
|
|
$value['bidNo']=makeNo("BD");
|
|
|
$value['spuCode']=makeNo("SKU");
|
|
@@ -590,6 +591,18 @@ class Consult extends Base
|
|
|
"action_remark" => '',//备注
|
|
|
"action_type" => "create"//新建create,编辑edit,更改状态status
|
|
|
], "FKD", 1, $this->post);
|
|
|
+ if($value['is_combind']==1){
|
|
|
+ $combine = ConsultTemp::where(["bidNo"=>$bidno,"is_del"=>0])->select();
|
|
|
+ if(!$combine->isEmpty()){
|
|
|
+ (new ConsultTemp)->saveAll(array_map(function(&$v,$key)use($value){
|
|
|
+ $v['id']=null;
|
|
|
+ $v['bidNo']=$value['bidNo'];
|
|
|
+ $v['spuCode']= substr(makeNo('SKU'), 0, -2) . str_pad($key, 2, '0', STR_PAD_LEFT);;
|
|
|
+ $v['out_tax_id'] =0;
|
|
|
+ $v['out_tax'] ="";
|
|
|
+ }));
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|