Commit 7a504e10 by mushishixian

地区模型

parent b97d4088
......@@ -27,6 +27,13 @@ WMS_DB_DATABASE=liexin_wms
WMS_DB_USERNAME=liexin_wms
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_DATABASE=liexin_data
......
......@@ -43,6 +43,9 @@ Route::match(['get', 'post'], '/test', function () {
// set_time_limit(0);
// sleep(30);
// echo 123;
$model = new \App\Model\RegionModel();
$r = $model->limit(10)->get();
dd($r);
$service = new \App\Http\Services\DataService();
// $service->checkSupplierChannelUser();
// $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 [
'engine' => null,
],
'sys'=>[
'sys' => [
'driver' => 'mysql',
'host' => env('ZT_DB_HOST', 'localhost'),
'port' => env('ZT_DB_PORT', '3306'),
......@@ -93,6 +93,20 @@ return [
'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' => [
'driver' => 'mysql',
'host' => env('WEB_DB_HOST', 'localhost'),
......@@ -134,7 +148,7 @@ return [
'strict' => false,
'engine' => null,
],
'self'=>[
'self' => [
'driver' => 'mysql',
'host' => env('DB_SELF_HOST', ''),
'database' => env('DB_SELF_DATABASE', ''),
......@@ -146,7 +160,7 @@ return [
'prefix' => 'lie_',
'strict' => false,
],
'sku'=>[
'sku' => [
'driver' => 'mysql',
'host' => env('DB_SKU_HOST', ''),
'database' => env('DB_SKU_DATABASE', ''),
......@@ -158,7 +172,7 @@ return [
'prefix' => 'lie_',
'strict' => false,
],
'spu'=>[
'spu' => [
'driver' => 'mysql',
'host' => env('DB_SPU_HOST', ''),
'database' => env('DB_SPU_DATABASE', ''),
......@@ -170,7 +184,7 @@ return [
'prefix' => 'lie_',
'strict' => false,
],
'yunxin'=>[
'yunxin' => [
'driver' => 'mysql',
'host' => env('DB_HOST_YUNXIN', ''),
'database' => env('DB_DATABASE_YUNXIN', ''),
......@@ -193,7 +207,6 @@ return [
],
],
/*
......@@ -224,13 +237,13 @@ return [
'cluster' => false,
// 'options'=>['cluster'=>'redis'],
'default' => [
'host' => env('REDIS_HOST',''),
'host' => env('REDIS_HOST', ''),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
'read_write_timeout' => 0,//new
],
'read' =>[
'read' => [
'host' => env('REDIS_READ_HOST', ''),
'password' => env('REDIS_READ_PASSWORD', null),
'port' => env('REDIS_READ_PORT', 6379),
......
......@@ -33,6 +33,10 @@
font-size: 16px;
margin-right: 5px;
}
.table-selected {
background-color: #ecf0f1;
}
</style>
<body>
<!-- 正文开始 -->
......
......@@ -27,7 +27,7 @@
});
});
let cols = [
{type: 'radio'},
{type: 'checkbox'},
{field: 'supplier_id', title: '供应商ID', align: 'center', width: 80},
{
field: 'supplier_code', title: '供应商编码', align: 'center', width: 90, templet: function (data) {
......@@ -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) {
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