transfer_1231_3

This commit is contained in:
dengbw
2021-12-31 10:30:04 +08:00
committed by lccsw
parent 8684871d36
commit 14daae4b2a
2 changed files with 21 additions and 15 deletions
+13 -7
View File
@@ -371,13 +371,16 @@ class Transfer extends HD_Controller
if ($cache_transports) {
$time = date('Y-m-d', strtotime("-1 month"));
foreach ($cache_transports as $key => $value) {
if (trim($value['name']) && $value['time'] >= $time) {//小于1个月过期不显示
if ($value['name'] && $value['time'] >= $time) {//小于1个月过期不显示
$transports[] = $value;
}
}
}
$cache->save($this->cacheKeyTransports, $transports);
$transports && $transports = array_reverse($transports);//倒
if ($transports) {//按最近日期排
$timeKey = array_column($transports, 'time');
array_multisort($timeKey, SORT_DESC, $transports);
}
$this->data['transports'] = $transports;//常用运输人员
$this->data['showInfo'] = $showInfo;
}
@@ -443,16 +446,19 @@ class Transfer extends HD_Controller
$transports = [];
$cache = &load_cache('redis');
$cache_transports = $cache->get($this->cacheKeyTransports);
if ($cache_transports) {
if ($cache_transports) {//按最近日期排序
$time = date('Y-m-d', strtotime("-1 month"));
foreach ($cache_transports as $key => $value) {
if ($value['time'] >= $time) {//小于1个月过期不显示
if ($value['name'] && $value['time'] >= $time) {//小于1个月过期不显示
$transports[] = $value;
}
}
}
$cache->save($this->cacheKeyTransports, $transports);
$transports && $transports = array_reverse($transports);//倒
if ($transports) {//按最近日期排
$timeKey = array_column($transports, 'time');
array_multisort($timeKey, SORT_DESC, $transports);
}
$this->data['transports'] = $transports;//常用运输人员
$this->data['showInfo'] = $showInfo;
$this->data['info'] = $info;
@@ -553,8 +559,8 @@ class Transfer extends HD_Controller
}
}
//常用运输人员
$transport_name = trim($info['transport']['name']);
$transport_mobile = trim($info['transport']['mobile']);
$transport_name = $info['transport']['name'] ? trim($info['transport']['name']) : '';
$transport_mobile = $info['transport']['mobile'] ? trim($info['transport']['mobile']) : '';
if ($transport_name && $transport_mobile) {
$cache = &load_cache('redis');
$cache_transports = $cache->get($this->cacheKeyTransports);
+8 -8
View File
@@ -70,7 +70,7 @@
</select>
</div>
<div v-if="takeCar1.type==2">
<div class="am-para-inline w150">
<div class="am-para-inline w180">
<select v-model="takeCar1.admin_id">
<option value="">选择信息员</option>
<template v-for="(v,i) in takeCar1.adminList">
@@ -88,7 +88,7 @@
</div>
</div>
<div v-else>
<div class="am-para-inline w150">
<div class="am-para-inline w180">
<select v-model="takeCar1.biz_id">
<option value="">选择门店</option>
<template v-for="(v,i) in takeCar1.bizList">
@@ -131,7 +131,7 @@
</select>
</div>
<div v-if="takeCar2.type==2">
<div class="am-para-inline w150">
<div class="am-para-inline w180">
<select v-model="takeCar2.admin_id">
<option value="">选择信息员</option>
<template v-for="(v,i) in takeCar2.adminList">
@@ -149,7 +149,7 @@
</div>
</div>
<div v-else>
<div class="am-para-inline w150">
<div class="am-para-inline w180">
<select v-model="takeCar2.biz_id">
<option value="">选择门店</option>
<template v-for="(v,i) in takeCar2.bizList">
@@ -188,7 +188,7 @@
</select>
</div>
<div v-if="takeCar3.type==2">
<div class="am-para-inline w150">
<div class="am-para-inline w180">
<select v-model="takeCar3.admin_id">
<option value="">选择信息员</option>
<template v-for="(v,i) in takeCar3.adminList">
@@ -206,7 +206,7 @@
</div>
</div>
<div v-else>
<div class="am-para-inline w150">
<div class="am-para-inline w180">
<select v-model="takeCar3.biz_id">
<option value="">选择门店</option>
<template v-for="(v,i) in takeCar3.bizList">
@@ -249,7 +249,7 @@
</select>
</div>
<div v-if="takeCar4.type==2">
<div class="am-para-inline w150">
<div class="am-para-inline w180">
<select v-model="takeCar4.admin_id">
<option value="">选择信息员</option>
<template v-for="(v,i) in takeCar4.adminList">
@@ -267,7 +267,7 @@
</div>
</div>
<div v-else>
<div class="am-para-inline w150">
<div class="am-para-inline w180">
<select v-model="takeCar4.biz_id">
<option value="">选择门店</option>
<template v-for="(v,i) in takeCar4.bizList">