edit-admin-create_pdf

This commit is contained in:
lccsw
2022-09-01 17:14:42 +08:00
parent 3e7b2eee87
commit f2ebf58d0a
2 changed files with 16 additions and 2 deletions
@@ -1207,7 +1207,9 @@ class Orders extends HD_Controller
}
//重新生成合同
$this->order_contracts_model->delete(['o_id'=>$id]);
$this->orders_v2_entity->create_pdf($id);
$url = http_host_com('api')."/wxapp/licheb/protocol/create_pdf?id={$id}";
file_get_contents($url);
// $this->orders_v2_entity->create_pdf($id);
return $this->show_json(SYS_CODE_SUCCESS, '保存成功!');
}else{
return $this->show_json(SYS_CODE_FAIL, '保存失败!');
@@ -1258,7 +1260,9 @@ class Orders extends HD_Controller
}
//重新生成合同
$this->order_contracts_model->delete(['o_id'=>$id]);
$this->orders_v2_entity->create_pdf($id);
$url = http_host_com('api')."/wxapp/licheb/protocol/create_pdf?id={$id}";
file_get_contents($url);
// $this->orders_v2_entity->create_pdf($id);
return $this->show_json(SYS_CODE_SUCCESS, '保存成功!');
}else{
return $this->show_json(SYS_CODE_FAIL, '保存失败!');
+10
View File
@@ -445,4 +445,14 @@ class Protocol extends CI_Controller{
}
return $imgs;
}
public function create_pdf(){
$oid = $this->input->get('id');
if(!$oid){
$req = ['code'=>0,'msg'=>'参数错误'];
}else{
$req = $this->orders_v2_entity->create_pdf($oid);
}
echo json_encode($req,JSON_UNESCAPED_UNICODE);
}
}