Commit 7a504e10 by mushishixian

地区模型

parent b97d4088
...@@ -27,6 +27,13 @@ WMS_DB_DATABASE=liexin_wms ...@@ -27,6 +27,13 @@ WMS_DB_DATABASE=liexin_wms
WMS_DB_USERNAME=liexin_wms WMS_DB_USERNAME=liexin_wms
WMS_DB_PASSWORD=liexin_wms#zsyM WMS_DB_PASSWORD=liexin_wms#zsyM
//主站3.0的数据库
LIEXIN_DB_HOST=192.168.1.252
LIEXIN_DB_PORT=3306
LIEXIN_DB_DATABASE=liexin
LIEXIN_DB_USERNAME=liexin
LIEXIN_DB_PASSWORD=liexin#zsyM
//自营基石数据库 //自营基石数据库
DB_SELF_HOST=192.168.1.235 DB_SELF_HOST=192.168.1.235
DB_SELF_DATABASE=liexin_data DB_SELF_DATABASE=liexin_data
......
...@@ -43,6 +43,9 @@ Route::match(['get', 'post'], '/test', function () { ...@@ -43,6 +43,9 @@ Route::match(['get', 'post'], '/test', function () {
// set_time_limit(0); // set_time_limit(0);
// sleep(30); // sleep(30);
// echo 123; // echo 123;
$model = new \App\Model\RegionModel();
$r = $model->limit(10)->get();
dd($r);
$service = new \App\Http\Services\DataService(); $service = new \App\Http\Services\DataService();
// $service->checkSupplierChannelUser(); // $service->checkSupplierChannelUser();
// $service->removeEmptyContactChannelUser(); // $service->removeEmptyContactChannelUser();
......
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class RegionModel extends Model
{
protected $connection = 'liexin';
protected $table='region';
public $timestamps = false;
}
...@@ -67,7 +67,7 @@ return [ ...@@ -67,7 +67,7 @@ return [
'engine' => null, 'engine' => null,
], ],
'sys'=>[ 'sys' => [
'driver' => 'mysql', 'driver' => 'mysql',
'host' => env('ZT_DB_HOST', 'localhost'), 'host' => env('ZT_DB_HOST', 'localhost'),
'port' => env('ZT_DB_PORT', '3306'), 'port' => env('ZT_DB_PORT', '3306'),
...@@ -93,6 +93,20 @@ return [ ...@@ -93,6 +93,20 @@ return [
'schema' => 'public', 'schema' => 'public',
], ],
'liexin' => [
'driver' => 'mysql',
'host' => env('LIEXIN_DB_HOST', 'localhost'),
'port' => env('LIEXIN_DB_PORT', '3306'),
'database' => env('LIEXIN_DB_DATABASE', 'forge'),
'username' => env('LIEXIN_DB_USERNAME', 'forge'),
'password' => env('LIEXIN_DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_general_ci',
'prefix' => 'lie_',
'strict' => false,
'engine' => null,
],
'web' => [ 'web' => [
'driver' => 'mysql', 'driver' => 'mysql',
'host' => env('WEB_DB_HOST', 'localhost'), 'host' => env('WEB_DB_HOST', 'localhost'),
...@@ -134,7 +148,7 @@ return [ ...@@ -134,7 +148,7 @@ return [
'strict' => false, 'strict' => false,
'engine' => null, 'engine' => null,
], ],
'self'=>[ 'self' => [
'driver' => 'mysql', 'driver' => 'mysql',
'host' => env('DB_SELF_HOST', ''), 'host' => env('DB_SELF_HOST', ''),
'database' => env('DB_SELF_DATABASE', ''), 'database' => env('DB_SELF_DATABASE', ''),
...@@ -146,7 +160,7 @@ return [ ...@@ -146,7 +160,7 @@ return [
'prefix' => 'lie_', 'prefix' => 'lie_',
'strict' => false, 'strict' => false,
], ],
'sku'=>[ 'sku' => [
'driver' => 'mysql', 'driver' => 'mysql',
'host' => env('DB_SKU_HOST', ''), 'host' => env('DB_SKU_HOST', ''),
'database' => env('DB_SKU_DATABASE', ''), 'database' => env('DB_SKU_DATABASE', ''),
...@@ -158,7 +172,7 @@ return [ ...@@ -158,7 +172,7 @@ return [
'prefix' => 'lie_', 'prefix' => 'lie_',
'strict' => false, 'strict' => false,
], ],
'spu'=>[ 'spu' => [
'driver' => 'mysql', 'driver' => 'mysql',
'host' => env('DB_SPU_HOST', ''), 'host' => env('DB_SPU_HOST', ''),
'database' => env('DB_SPU_DATABASE', ''), 'database' => env('DB_SPU_DATABASE', ''),
...@@ -170,7 +184,7 @@ return [ ...@@ -170,7 +184,7 @@ return [
'prefix' => 'lie_', 'prefix' => 'lie_',
'strict' => false, 'strict' => false,
], ],
'yunxin'=>[ 'yunxin' => [
'driver' => 'mysql', 'driver' => 'mysql',
'host' => env('DB_HOST_YUNXIN', ''), 'host' => env('DB_HOST_YUNXIN', ''),
'database' => env('DB_DATABASE_YUNXIN', ''), 'database' => env('DB_DATABASE_YUNXIN', ''),
...@@ -193,7 +207,6 @@ return [ ...@@ -193,7 +207,6 @@ return [
], ],
], ],
/* /*
...@@ -224,13 +237,13 @@ return [ ...@@ -224,13 +237,13 @@ return [
'cluster' => false, 'cluster' => false,
// 'options'=>['cluster'=>'redis'], // 'options'=>['cluster'=>'redis'],
'default' => [ 'default' => [
'host' => env('REDIS_HOST',''), 'host' => env('REDIS_HOST', ''),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', 6379),
'database' => 0, 'database' => 0,
'read_write_timeout' => 0,//new 'read_write_timeout' => 0,//new
], ],
'read' =>[ 'read' => [
'host' => env('REDIS_READ_HOST', ''), 'host' => env('REDIS_READ_HOST', ''),
'password' => env('REDIS_READ_PASSWORD', null), 'password' => env('REDIS_READ_PASSWORD', null),
'port' => env('REDIS_READ_PORT', 6379), 'port' => env('REDIS_READ_PORT', 6379),
......
...@@ -33,6 +33,10 @@ ...@@ -33,6 +33,10 @@
font-size: 16px; font-size: 16px;
margin-right: 5px; margin-right: 5px;
} }
.table-selected {
background-color: #ecf0f1;
}
</style> </style>
<body> <body>
<!-- 正文开始 --> <!-- 正文开始 -->
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
}); });
}); });
let cols = [ let cols = [
{type: 'radio'}, {type: 'checkbox'},
{field: 'supplier_id', title: '供应商ID', align: 'center', width: 80}, {field: 'supplier_id', title: '供应商ID', align: 'center', width: 80},
{ {
field: 'supplier_code', title: '供应商编码', align: 'center', width: 90, templet: function (data) { field: 'supplier_code', title: '供应商编码', align: 'center', width: 90, templet: function (data) {
...@@ -96,6 +96,13 @@ ...@@ -96,6 +96,13 @@
} }
}); });
table.on('row(list)', function(obj){
obj.tr.addClass('table-selected')
obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');
console.log(obj.tr) //得到当前行元素对象
console.log(obj.data) //得到当前行数据
});
//保存需要刷新的页面数据 //保存需要刷新的页面数据
function saveRefreshData(type, supplierId = 0) { function saveRefreshData(type, supplierId = 0) {
admin.putTempData("needFreshDetail_supplier_id=" + supplierId, 1); admin.putTempData("needFreshDetail_supplier_id=" + supplierId, 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