Commit b077cc23 by hcy001

1

parent d9d3a3d3
......@@ -7,3 +7,4 @@ Homestead.json
websit.php
/public/php_errors.log
/public/pdf
......@@ -228,7 +228,7 @@ class ApiController extends Controller
//获取客户信息
public function ApiGetUser($input, $id)
{
(new CommonModel())->getUser($input["k"],$input["types"]);
(new CommonModel())->getMyUser($input["user_id"],$input["k"]);
}
// 统计询价数据
public function ApiInquiryCount($input, $id)
......
......@@ -27,6 +27,18 @@ class CommonModel extends Model
$Redis= \RedisDB::connection();
return $Redis->hget("erp_rate",$k);
}
//搜索自己的客户
public function getMyUser($create_uid,$k)
{
$dbspu = DB::connection("rfq");
$brandInfo = $dbspu->select("select id value,user_name name from lie_inquiry_users where create_uid = $create_uid and user_name like '".$k."%' limit 10");
if (count($brandInfo) == 0){
$brandInfo = [["value"=>0,"name"=>$k]];
}
echo json_encode($brandInfo, JSON_UNESCAPED_UNICODE);
exit();
}
//搜索用户或者公司
public function getUser($k,$types=1)
{
......
<?php
namespace App\Model;
use App\map\InquiryMap;
use App\map\OperationLogMap;
use App\map\QuoteMap;
use Illuminate\Database\Eloquent\Model;
use Request;
use DB;
use App\Http\Controllers\PermController;
use App\Model\InquiryItemsUrgeModel;
use RedisDB;
//询价客户
class InquiryUsersModel extends Model
{
protected $connection='rfq';
protected $table='inquiry_users';
protected $primaryKey='id';
public $timestamps = false;
}
\ No newline at end of file
......@@ -18,7 +18,7 @@ class QuoteMap{
];
//可用报价状态
static $status_used = [self::status_ready,self::status_fix,self::status_fix];
static $status_used = [self::status_ready,self::status_fix,self::status_sure];
}
......
......@@ -75,7 +75,7 @@ layui.config({
{field: 'create_name', title: '报价人'},
{field: 'create_time', title: '报价时间'},
{field: 'status', title: '状态'},
{title: '操作', toolbar: '#son', width: 130}
{field:'son', title: '操作',templet:'#main',width:230,align:'center'}
]]
}
}
......
......@@ -79,6 +79,7 @@
<!--子操作栏-->
<script type="text/html" id="son">
<a href="/web/SaveSupplier?supplier_id=@{{ d.supplier_id }}" class="btn btn-xs btn-outline btn-primary"><strong>催报价</strong></a>
@{{# if(d.status_val=='待报价' ){ }}
<a href="/web/SaveSupplier?supplier_id=@{{ d.supplier_id }}" class="btn btn-xs btn-outline btn-primary"><strong>催报价</strong></a>
@{{# }else if(d.status=='-1' ){ }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment