客户具体要求:
1、在我的个人中心里面增加一个 开票功能,点击进去之后可以查看到能开票的订单列表,如果是个人是填写姓名电话邮箱,就是填写单位名称 税号 邮箱,提交申请到后台审核,如果审核通过后线下人工发送,后端可以通过或驳回。驳回的话用户可以重新填写申请
2、轮播图可以跳转页面路径
功能意思是 后台可以修改 首页轮播图可以跳转到程序内页面的路径,比如跳转到个人中心订单,个人中心,某个技师,或者是加盟分销等
1、开票状态的判断
if(!empty($input['invoicing_type'])){switch ($input['invoicing_type']) {case 1: //未开票$dis[] = ['a.invoicing_status', '=', 0];break;case 2: //审核中$dis[] = ['a.invoicing_status','=',1];break;case 3: //已开票$dis[] = ['a.invoicing_status','=',2];break;case 4: //驳回$dis[] = ['a.invoicing_status','=',3];break;}
}
2、申请开票的逻辑代码
public function invoicingApply(){$input = $this->_param;if(!isset($input['id'])|| !isset($input['invoicing_type'])|| !isset($input['invoicing_entname'])|| !isset($input['invoicing_duty_paragraph'])|| !isset($input['invoicing_realname'])|| !isset($input['invoicing_phone'])|| !isset($input['invoicing_mail'])){$this->errorMsg('参数错误');}$order = $this->model->dataInfo(['id'=>$input['id']]);if(empty($order)){$this->errorMsg('订单已关闭');}if($order['pay_type'] != 7){$this->errorMsg('订单当前状态不能申请开票');}if($order['invoicing_status'] == 1){$this->errorMsg('申请开票审核中');}if($order['invoicing_status'] == 2){$this->errorMsg('已开票');}$data = ['invoicing_type' => (int)$input['invoicing_type'],'invoicing_status' => 1,'invoicing_entname' => '','invoicing_duty_paragraph' => '','invoicing_realname' => '','invoicing_phone' => '','invoicing_mail' => $input['invoicing_mail'],];if((int)$input['invoicing_type'] == 1){$data['invoicing_entname'] = $input['invoicing_entname'];$data['invoicing_duty_paragraph'] = $input['invoicing_duty_paragraph'];if(!$input['invoicing_entname']) $this->errorMsg('请输入单位名称');if(!$input['invoicing_duty_paragraph']) $this->errorMsg('请输入税号');}else{$data['invoicing_realname'] = $input['invoicing_realname'];$data['invoicing_phone'] = $input['invoicing_phone'];if(!$input['invoicing_realname']) $this->errorMsg('请输入姓名');if(!$input['invoicing_phone']) $this->errorMsg('请输入电话');}if(!$input['invoicing_mail']) $this->errorMsg('请输入邮箱');$this->model->where('id', $order['id'])->update($data);return $this->success('申请成功');
}