transfer_1230
This commit is contained in:
@@ -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 ? '/' : '<br>';
|
||||
$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
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<a class="mr10 order-lists-time-btn" href="javascript:void (0);" data-date="30day">最近30天</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<div class="am-form-group fl" style="display:none;">
|
||||
<label class="am-para-label w60">精品:</label>
|
||||
<div class="am-para-inline">
|
||||
<div class="label-group-wrap label-group-sortable" style="display: inline">
|
||||
@@ -162,7 +162,7 @@
|
||||
<table class="am-table am-table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="24%">
|
||||
<th width="23%">
|
||||
<span :class="'order'+('brand_id'==params.order?' order-on':' order-none')">
|
||||
<a href="javascript:void(0)" @click="set_order('brand_id')">
|
||||
<span class="mr10">车辆</span>
|
||||
@@ -180,7 +180,7 @@
|
||||
</a>
|
||||
</span>
|
||||
</th>
|
||||
<th width="15%">
|
||||
<th width="16%">
|
||||
<span :class="'order'+('addr_id'==params.order?' order-on':' order-none')">
|
||||
<a href="javascript:void(0)" @click="set_order('addr_id')">
|
||||
<span>存放地</span>
|
||||
@@ -189,7 +189,7 @@
|
||||
</a>
|
||||
</span>
|
||||
</th>
|
||||
<th width="8%">
|
||||
<th width="10%">
|
||||
<span :class="'order'+('in_time'==params.order?' order-on':' order-none')">
|
||||
<a href="javascript:void(0)" @click="set_order('in_time')">
|
||||
<span>入库日期</span>
|
||||
@@ -198,7 +198,7 @@
|
||||
</a>
|
||||
</span>
|
||||
</th>
|
||||
<th width="15%">
|
||||
<th width="15%" style="display: none">
|
||||
<span :class="'order'+('fine_num'==params.order?' order-on':' order-none')">
|
||||
<a href="javascript:void(0)" @click="set_order('fine_num')">
|
||||
<span>精品加装</span>
|
||||
@@ -207,10 +207,10 @@
|
||||
</a>
|
||||
</span>
|
||||
</th>
|
||||
<th width="10%">
|
||||
<th width="12%">
|
||||
<span>公司归属</span>
|
||||
</th>
|
||||
<th width=""><span>操作</span></th>
|
||||
<th width="15%"><span>操作</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -223,7 +223,7 @@
|
||||
</td>
|
||||
<td>{{v.address}}</td>
|
||||
<td>{{v.in_time}}</td>
|
||||
<td>{{v.auto_fine}}</td>
|
||||
<td style="display: none">{{v.auto_fine}}</td>
|
||||
<td>{{v.company_name}}</td>
|
||||
<td><a href="javascript:void(0);"
|
||||
:data-open="'/items/transfer/get?vin='+v.vin"
|
||||
|
||||
@@ -244,9 +244,8 @@
|
||||
<th width="15%"><span>车架号</span></th>
|
||||
<th width="7%"><span>运输人员</span></th>
|
||||
<th width="12%"><span>调拨时间</span></th>
|
||||
<th width="12%"><span>提车人</span></th>
|
||||
<th width="12%"><span>接车人</span></th>
|
||||
<th width="12%"><span>车辆存放地</span></th>
|
||||
<th width="17%"><span>提车人</span></th>
|
||||
<th width="17%"><span>接车人</span></th>
|
||||
<th width="5%"><span>异常</span></th>
|
||||
<th width="7%"><span>状态</span></th>
|
||||
<th width="5%"><span>操作</span></th>
|
||||
@@ -260,9 +259,8 @@
|
||||
<td><?= $v['vin'] ?></td>
|
||||
<td><?= $v['transport_name'] ?></td>
|
||||
<td><?= $v['c_time'] ?></td>
|
||||
<td><?= $v['out_uid_title'] ?></td>
|
||||
<td><?= $v['in_uid_title'] ?></td>
|
||||
<td><?= $v['addr_name'] ?></td>
|
||||
<td><?= $v['out_uid_title'] ?><?= $v['out_addr_name'] ? '<br>' . $v['out_addr_name'] : '' ?></td>
|
||||
<td><?= $v['in_uid_title'] ?><?= $v['in_addr_name'] ? '<br>' . $v['in_addr_name'] : '' ?></td>
|
||||
<td><?= $v['abnormal'] ?></td>
|
||||
<td><?= $v['status_name'] ?></td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user