作者 王智

222

@@ -49,6 +49,9 @@ class Invoice extends Api @@ -49,6 +49,9 @@ class Invoice extends Api
49 { 49 {
50 $user_id = $this->is_token($this->request->header()); 50 $user_id = $this->is_token($this->request->header());
51 $param = $this->request->param(); 51 $param = $this->request->param();
  52 + $selectedOptionszero = input('selectedOptionszero');
  53 +// $arr = json_decode(htmlspecialchars_decode($selectedOptionszero), true);
  54 + $str=implode(',', $arr);
52 // if ($param['type'] == 1) { 55 // if ($param['type'] == 1) {
53 // $is_company = Db::name('company')->where(['company_holder' => $user_id])->find(); 56 // $is_company = Db::name('company')->where(['company_holder' => $user_id])->find();
54 // if (empty($is_company)) { 57 // if (empty($is_company)) {
@@ -64,7 +67,7 @@ class Invoice extends Api @@ -64,7 +67,7 @@ class Invoice extends Api
64 'address' => $param['address'], 67 'address' => $param['address'],
65 'address_con' => $param['address_con'], 68 'address_con' => $param['address_con'],
66 'invoice_head' => $param['invoice_head'], 69 'invoice_head' => $param['invoice_head'],
67 - 'selectedOptionszero' => $param['selectedOptionszero'] 70 + 'selectedOptionszero' => $selectedOptionszero
68 ]; 71 ];
69 // } else { 72 // } else {
70 // $data = [ 73 // $data = [
@@ -124,9 +127,6 @@ class Invoice extends Api @@ -124,9 +127,6 @@ class Invoice extends Api
124 public function InvoiceDataRendering() 127 public function InvoiceDataRendering()
125 { 128 {
126 $user_id = $this->is_token($this->request->header()); 129 $user_id = $this->is_token($this->request->header());
127 - $selectedOptionszero = input('selectedOptionszero');  
128 - $arr = json_decode(htmlspecialchars_decode($selectedOptionszero), true);  
129 - $str=implode(',', $arr);  
130 $is_company = Db::name('company')->where(['company_holder' => $user_id])->where(['status' => 1])->value('id'); 130 $is_company = Db::name('company')->where(['company_holder' => $user_id])->where(['status' => 1])->value('id');
131 if (empty($is_company)) { 131 if (empty($is_company)) {
132 $is_team = Db::name('team')->where(['user_id' => $user_id])->where(['status' => 1])->value('company_id'); 132 $is_team = Db::name('team')->where(['user_id' => $user_id])->where(['status' => 1])->value('company_id');
@@ -164,7 +164,7 @@ class Invoice extends Api @@ -164,7 +164,7 @@ class Invoice extends Api
164 'address' => $ziliao['address'], 164 'address' => $ziliao['address'],
165 'address_con' => $ziliao['address_con'], 165 'address_con' => $ziliao['address_con'],
166 'invoice_head' => $ziliao['invoice_head'], 166 'invoice_head' => $ziliao['invoice_head'],
167 - 'selectedOptionszero' => $str 167 + 'selectedOptionszero' => $ziliao['selectedOptionszero']
168 ]; 168 ];
169 } 169 }
170 $return['company_list'] = $company_list; 170 $return['company_list'] = $company_list;