作者 王智

222

... ... @@ -49,6 +49,9 @@ class Invoice extends Api
{
$user_id = $this->is_token($this->request->header());
$param = $this->request->param();
$selectedOptionszero = input('selectedOptionszero');
// $arr = json_decode(htmlspecialchars_decode($selectedOptionszero), true);
$str=implode(',', $arr);
// if ($param['type'] == 1) {
// $is_company = Db::name('company')->where(['company_holder' => $user_id])->find();
// if (empty($is_company)) {
... ... @@ -64,7 +67,7 @@ class Invoice extends Api
'address' => $param['address'],
'address_con' => $param['address_con'],
'invoice_head' => $param['invoice_head'],
'selectedOptionszero' => $param['selectedOptionszero']
'selectedOptionszero' => $selectedOptionszero
];
// } else {
// $data = [
... ... @@ -124,9 +127,6 @@ class Invoice extends Api
public function InvoiceDataRendering()
{
$user_id = $this->is_token($this->request->header());
$selectedOptionszero = input('selectedOptionszero');
$arr = json_decode(htmlspecialchars_decode($selectedOptionszero), true);
$str=implode(',', $arr);
$is_company = Db::name('company')->where(['company_holder' => $user_id])->where(['status' => 1])->value('id');
if (empty($is_company)) {
$is_team = Db::name('team')->where(['user_id' => $user_id])->where(['status' => 1])->value('company_id');
... ... @@ -164,7 +164,7 @@ class Invoice extends Api
'address' => $ziliao['address'],
'address_con' => $ziliao['address_con'],
'invoice_head' => $ziliao['invoice_head'],
'selectedOptionszero' => $str
'selectedOptionszero' => $ziliao['selectedOptionszero']
];
}
$return['company_list'] = $company_list;
... ...