diff --git a/admin/controllers/items/Transfer.php b/admin/controllers/items/Transfer.php
index 4d55dc74..96fe6d48 100644
--- a/admin/controllers/items/Transfer.php
+++ b/admin/controllers/items/Transfer.php
@@ -183,12 +183,19 @@ class Transfer extends HD_Controller
$item_info = $this->item_info($v['item_id'], 1);
$out_uid_title = $in_uid_title = '-';
$tag = $params['size'] == 10000 ? '/' : '
';
+ $out_addr_name = $in_addr_name = '';
if ($v['out_uid']) {
+ $biz_id = $addr_id = 0;
if ($v['out_type'] == 1) {
$out_uid_title = $uids[$v['out_uid']][0]['uname'] . $tag . date('Y-m-d H:i', strtotime($v['out_time']));
+ $re_out = $this->mdTransferRemind->get(['tran_id' => $v['id'], 'uid' => $v['out_uid'], 'type in(1,2)']);
+ $biz_id = $re_out['biz_id'];
} else if ($v['out_type'] == 2) {
$out_uid_title = $uids_ad[$v['out_uid']][0]['uname'] . $tag . date('Y-m-d H:i', strtotime($v['out_time']));
+ $re_out = $this->mdTransferAdmin->get(['tran_id' => $v['id'], 'uid' => $v['out_uid'], 'type in(1,2)']);
+ $addr_id = $re_out['addr_id'];
}
+ $out_addr_name = $this->take_biz(['uid' => $v['out_uid'], 'biz_id' => $biz_id, 'addr_id' => $addr_id], $v['out_type']);
}
if ($v['in_uid']) {
if ($v['in_type'] == 1) {
@@ -196,6 +203,7 @@ class Transfer extends HD_Controller
} else if ($v['in_type'] == 2) {
$in_uid_title = $uids_ad[$v['in_uid']][0]['uname'] . $tag . date('Y-m-d H:i', strtotime($v['in_time']));
}
+ $in_addr_name = $this->take_biz(['uid' => $v['in_uid'], 'biz_id' => $v['biz_id'], 'addr_id' => $v['addr_id']], $v['in_type']);
}
$setValue = [
'id' => $v['id'],
@@ -208,27 +216,9 @@ class Transfer extends HD_Controller
'c_time' => date('Y.m.d H:i', $v['c_time']),
'status' => $v['status'],
'status_name' => $statusAry[$v['status']],
+ 'out_addr_name' => $out_addr_name,
+ 'in_addr_name' => $in_addr_name,
];
- $city_name = $county_name = $biz_name = '';
- if ($v['biz_id'] > 0) {
- $re_biz = $this->mdBiz->get(array('id' => $v['biz_id']));
- if ($re_biz['county_id']) {
- $re_area = $this->mdArea->get(array('county_id' => $re_biz['county_id']));
- $city_name = $re_area['city_name'];
- $county_name = $re_area['county_name'];
- } else if ($re_biz['city_id']) {
- $re_area = $this->mdArea->get(array('city_id' => $re_biz['city_id']));
- $city_name = $re_area['city_name'];
- }
- $biz_name = $re_biz['biz_name'] ? $re_biz['biz_name'] : '';
- } else if ($v['addr_id']) {
- $re_addr = $this->mdAddr->get(array('id' => $v['addr_id']));
- if ($re_addr) {
- $city_name = $re_addr['city_name'];
- $county_name = $re_addr['county_name'];
- $biz_name = $re_addr['title'];
- }
- }
if ($params['size'] == 10000) {//导出
$jsondata = $v['jsondata'] ? json_decode($v['jsondata'], true) : [];
$trailer_fees = $this->mdTransfer->feesTypeAry($v['fees_type']);
@@ -240,14 +230,9 @@ class Transfer extends HD_Controller
$re_biz = $this->mdBiz->get(array('id' => $v['fees_biz_id']));
$trailer_fees .= '-' . $re_biz['biz_name'];
}
- $setValue['city'] = $city_name;
- $setValue['county'] = $county_name;
- $setValue['biz_name'] = $biz_name;
$setValue['trailer_fees'] = $v['trailer_fees'];
$setValue['fees'] = $trailer_fees;
$setValue['reason'] = $jsondata['reason'] ? $jsondata['reason'] : '';
- } else {
- $setValue['addr_name'] = "{$city_name}-{$county_name}-$biz_name";
}
$lists[] = $setValue;
}
@@ -753,12 +738,11 @@ class Transfer extends HD_Controller
$temp['transport_name'] = $value['transport_name'];
$temp['c_time'] = $value['c_time'];
$temp['out_uid_title'] = $value['out_uid_title'];
+ $temp['out_addr_name'] = $value['out_addr_name'];
$temp['in_uid_title'] = $value['in_uid_title'];
+ $temp['in_addr_name'] = $value['in_addr_name'];
$temp['abnormal'] = $value['abnormal'];
$temp['status_name'] = $value['status_name'];
- $temp['city'] = $value['city'];
- $temp['county'] = $value['county'];
- $temp['biz_name'] = $value['biz_name'];
$temp['trailer_fees'] = $value['trailer_fees'];
$temp['fees'] = $value['fees'];
$temp['reason'] = $value['reason'];
@@ -770,12 +754,11 @@ class Transfer extends HD_Controller
'transport_name' => '运输人员',
'c_time' => '调拨时间',
'out_uid_title' => '提车人',
+ 'out_addr_name' => '提车地址',
"in_uid_title" => "接车人",
+ 'in_addr_name' => '存放地址',
"abnormal" => "异常",
"status_name" => "状态",
- "city" => "城市",
- "county" => "区域",
- "biz_name" => "店名",
"trailer_fees" => "运输费用",
"fees" => "费用承担方",
"reason" => "调拔理由",
@@ -871,6 +854,42 @@ class Transfer extends HD_Controller
return $content;
}
+ /**
+ * Notes:提车/接车人地址
+ * Created on: 2021/12/30 10:16
+ * Created by: dengbw
+ * @param $params
+ * @param int $type
+ * @return string
+ */
+ private function take_biz($params, $type = 1)
+ {
+ $content = $city_name = $title = '';
+ if ($type == 1) {//门店
+ if ($params['biz_id']) {
+ $biz_id = $params['biz_id'];
+ } else {
+ $re_user = $this->mdUsers->get(array('id' => $params['uid']));
+ $biz_id = intval($re_user['biz_id']);
+ }
+ $re_biz = $this->mdBiz->get(array('id' => $biz_id));
+ if ($re_biz['county_id']) {
+ $re_area = $this->mdArea->get(array('county_id' => $re_biz['county_id']));
+ $city_name = $re_area['city_name'] . '-' . $re_area['county_name'];
+ } else if ($re_biz['city_id']) {
+ $re_area = $this->mdArea->get(array('city_id' => $re_biz['city_id']));
+ $city_name = $re_area['city_name'];
+ }
+ $content = "{$city_name}-{$re_biz['biz_name']}";
+ } else if ($type == 2) {
+ $re_addr = $this->mdAddr->get(array('id' => $params['addr_id']));
+ if ($re_addr) {
+ $content = $re_addr['city_name'] . '-' . $re_addr['county_name'] . '-' . $re_addr['title'];
+ }
+ }
+ return $content;
+ }
+
/**
* Notes:短信提醒
* Created on: 2021/12/23 10:42
diff --git a/admin/views/items/goods/lists.php b/admin/views/items/goods/lists.php
index 98759a30..1b47f377 100644
--- a/admin/views/items/goods/lists.php
+++ b/admin/views/items/goods/lists.php
@@ -122,7 +122,7 @@
最近30天
-