...
|
...
|
@@ -298,43 +298,14 @@ class Registers extends Backend |
|
|
$this->success();
|
|
|
}
|
|
|
|
|
|
//导出excel
|
|
|
//导出套餐订单列表excel
|
|
|
public function export(){//导出Excel
|
|
|
$ids = $this->request->param('ids');
|
|
|
if(!$ids){
|
|
|
return;
|
|
|
}
|
|
|
$ids = explode(',',$ids);
|
|
|
$expTableData = Common::selectWhereData('order',['r_id'=>['in',$ids]],'r_id,order_sn,price,content,total_num,use_num,not_use_num,advice,address,organization,pin_user,mark','id asc');
|
|
|
//查询手机号
|
|
|
$r_ids = array_unique(array_column($expTableData,'r_id'));
|
|
|
$res_mobile = Common::selectWhereData('registers',['id'=>['in',$r_ids]],'id,mobile');
|
|
|
$expCellName = [
|
|
|
['order_sn','订单编号',15],
|
|
|
['price','订单金额',15],
|
|
|
['content','购买服务内容',20],
|
|
|
['total_num','购买次数',15],
|
|
|
['use_num','已用服务次数',15],
|
|
|
['not_use_num','剩余服务次数',15],
|
|
|
['advice','所属顾问',10],
|
|
|
['mobile','VIP手机号',20],
|
|
|
['address','详细地址',30],
|
|
|
['organization','归属机构',30],
|
|
|
['pin_user','品拓人员',15],
|
|
|
['mark','备注',40],
|
|
|
];
|
|
|
|
|
|
foreach ($expTableData as &$v) {
|
|
|
$v['mobile'] = '';
|
|
|
foreach ($res_mobile as $value){
|
|
|
if($v['r_id'] == $value['id']){
|
|
|
$v['mobile'] = $value['mobile'];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
$expTitle = "套餐订单列表";
|
|
|
$fileName = "套餐订单列表";//文件名
|
|
|
AdminCommon::exportExcel($expTitle,$expCellName,$expTableData,$fileName);
|
|
|
AdminCommon::exportOrderList(['r_id'=>['in',$ids]]);
|
|
|
}
|
|
|
|
|
|
//导出服务列表excel
|
...
|
...
|
@@ -344,32 +315,6 @@ class Registers extends Backend |
|
|
return;
|
|
|
}
|
|
|
$ids = explode(',',$ids);
|
|
|
$expTableData = Common::selectWhereData('service_order',['r_id'=>['in',$ids]],'r_id,order_sn,customer_name,service_time,service_content,service_name,assess,mark','id asc');
|
|
|
//查询手机号
|
|
|
$r_ids = array_unique(array_column($expTableData,'r_id'));
|
|
|
$res_mobile = Common::selectWhereData('registers',['id'=>['in',$r_ids]],'id,mobile');
|
|
|
$expCellName = [
|
|
|
['order_sn','服务订单编号',20],
|
|
|
['customer_name','客户姓名',10],
|
|
|
['service_time','服务时间',20],
|
|
|
['service_content','服务项目',30],
|
|
|
['service_name','服务员',10],
|
|
|
['mobile','VIP手机号',20],
|
|
|
['assess','评价',30],
|
|
|
['mark','备注',40],
|
|
|
];
|
|
|
|
|
|
foreach ($expTableData as &$v) {
|
|
|
$v['mobile'] = '';
|
|
|
foreach ($res_mobile as $value){
|
|
|
if($v['r_id'] == $value['id']){
|
|
|
$v['mobile'] = $value['mobile'];
|
|
|
}
|
|
|
}
|
|
|
$v['service_time'] = date('Y-m-d H:i:s',$v['service_time']);
|
|
|
}
|
|
|
$expTitle = "服务订单列表";
|
|
|
$fileName = "服务订单列表";//文件名
|
|
|
AdminCommon::exportExcel($expTitle,$expCellName,$expTableData,$fileName);
|
|
|
AdminCommon::exportServiceList(['r_id'=>['in',$ids]]);
|
|
|
}
|
|
|
} |
...
|
...
|
|