|
@@ -5,6 +5,8 @@ class Returngoodsexcel extends Start_Controller {
|
|
|
parent::__construct();
|
|
|
$this->load->library('session');
|
|
|
$this->load->_model('Model_returngoods','returngoods');
|
|
|
+ $this->load->_model("Model_logic_order","logic_order");
|
|
|
+ $this->load->_model("Model_express","express");
|
|
|
}
|
|
|
//定义方法的调用规则 获取URI第二段值
|
|
|
public function _remap($arg,$arg_array)
|
|
@@ -97,6 +99,8 @@ class Returngoodsexcel extends Start_Controller {
|
|
|
$cate_one_show = $this->returngoods->getCateOne();
|
|
|
$cate_two_show = $this->returngoods->getCateTwo();
|
|
|
$back_status_show = $this->returngoods->getBackStatus();
|
|
|
+ $express_list = $this->express->find_all("1 = 1","id,servicename");
|
|
|
+ $express_tran = array_column($express_list,"servicename",'id');
|
|
|
//格式化数据
|
|
|
foreach ($info_list as $key=>$value)
|
|
|
{
|
|
@@ -126,7 +130,26 @@ class Returngoodsexcel extends Start_Controller {
|
|
|
$tmp['退款金额'] = $value['back_money'];
|
|
|
$tmp['登记人'] = $value['recorder'];
|
|
|
$tmp['登记时间'] = $value['create_time'];
|
|
|
-
|
|
|
+ $tmp_info = $this->logic_order->getInfoByType($value['table_type'],$number);
|
|
|
+ $tmp['仓库品名'] = isset($tmp_info['shipremarks'])?$tmp_info['shipremarks']:" ";
|
|
|
+ if(isset($tmp_info['express'])){
|
|
|
+ $express = $tmp_info['express'];
|
|
|
+ $tmp['快递方式'] = isset($express_tran[$express])?$express_tran[$express]:"快递异常";
|
|
|
+ }else{
|
|
|
+ $tmp['快递方式'] = " 无";
|
|
|
+ }
|
|
|
+
|
|
|
+ $tmp['运单号'] = isset($tmp_info['waybill'])?$tmp_info['waybill']:" ";
|
|
|
+ if(isset($tmp_info['librarytime'])){
|
|
|
+ if($tmp_info['librarytime'] != 0){
|
|
|
+ $tmp['出库时间'] = date('Y-m-d H:i',$tmp_info['librarytime']);
|
|
|
+ }else{
|
|
|
+ $tmp['出库时间'] = "无";
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $tmp['出库时间'] = "无";
|
|
|
+ }
|
|
|
+ isset($tmp_info['librarytime'])?$tmp_info['shipremarks']:" ";
|
|
|
$data_list[] = $tmp;
|
|
|
}
|
|
|
echo json_encode(['data'=>$data_list,'success'=>true,'msg'=>'导出成功']);
|