Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
87b52648
authored
Jun 27, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
特殊规则修改
parent
a02b4b1e
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
406 additions
and
568 deletions
app/Http/Controllers/Api/CommonApiController.php
app/Http/Controllers/Api/PurchaseRemarkApiController.php
app/Http/Controllers/PurchaseRemarkController.php
app/Http/Services/StandardBrandService.php
app/Http/Transformers/PurchaseRemarkTransformer.php
app/Http/routes.php
resources/views/script/SavePurchaseRemarkScript.blade.php
resources/views/script/supplier/OrderRemarkScript.blade.php
resources/views/script/supplier/SupplierAttachmentScript.blade.php
resources/views/script/supplier/SupplierRulerScript.blade.php
resources/views/web/SavePurchaseRemark.blade.php
resources/views/web/UpdateSupplier.blade.php
resources/views/web/supplier/OrderRemark.blade.php
resources/views/web/supplier/SupplierRuler.blade.php
app/Http/Controllers/Api/CommonApiController.php
View file @
87b52648
...
@@ -92,7 +92,7 @@ class CommonApiController extends Controller
...
@@ -92,7 +92,7 @@ class CommonApiController extends Controller
if
(
!
$company
)
{
if
(
!
$company
)
{
$this
->
response
(
-
1
,
'获取不到公司'
);
$this
->
response
(
-
1
,
'获取不到公司'
);
}
}
}
else
{
}
else
{
$this
->
response
(
-
2
,
'供应商跳过天眼查校验'
);
$this
->
response
(
-
2
,
'供应商跳过天眼查校验'
);
}
}
...
@@ -100,4 +100,21 @@ class CommonApiController extends Controller
...
@@ -100,4 +100,21 @@ class CommonApiController extends Controller
}
}
//批量校验标准品牌,并且返回具体的id和错误信息
public
function
checkStandardBrandNameList
(
Request
$request
)
{
//接收的是标准品牌名称
$standardBrandNameList
=
$request
->
input
(
'standard_brand_name_list'
);
if
(
empty
(
$standardBrandNameList
))
{
$this
->
response
(
0
,
'ok'
,
[
'invalid_brand_name_list'
=>
[],
'valid_brand_name_list'
=>
[],
'valid_brand_ids'
=>
[],
]);
}
$standardBrandNameList
=
explode
(
','
,
trim
(
$standardBrandNameList
,
','
));
$result
=
(
new
StandardBrandService
())
->
checkStandardBrandNameList
(
$standardBrandNameList
);
$this
->
response
(
0
,
'ok'
,
$result
);
}
}
}
app/Http/Controllers/Api/PurchaseRemarkApiController.php
View file @
87b52648
...
@@ -58,12 +58,17 @@ class PurchaseRemarkApiController extends Controller
...
@@ -58,12 +58,17 @@ class PurchaseRemarkApiController extends Controller
$remark
=
$request
->
only
([
$remark
=
$request
->
only
([
'id'
,
'id'
,
'supplier_id'
,
'supplier_id'
,
'participate_type'
,
'participate_content'
,
'participate_content'
,
'start_time'
,
'start_time'
,
'end_time'
,
'end_time'
,
'description'
,
'remark'
,
'remark'
,
]);
]);
$remark
[
'start_time'
]
=
strtotime
(
$remark
[
'start_time'
]);
if
(
$remark
[
'start_time'
]
<
time
())
{
$this
->
response
(
-
1
,
'开始时间不能低于当前日期'
);
}
$remark
[
'end_time'
]
=
strtotime
(
$remark
[
'end_time'
]);
$remarkService
=
new
PurchaseRemarkService
();
$remarkService
=
new
PurchaseRemarkService
();
$result
=
$remarkService
->
savePurchaseRemark
(
$id
,
$remark
);
$result
=
$remarkService
->
savePurchaseRemark
(
$id
,
$remark
);
if
(
!
$result
)
{
if
(
!
$result
)
{
...
@@ -71,8 +76,9 @@ class PurchaseRemarkApiController extends Controller
...
@@ -71,8 +76,9 @@ class PurchaseRemarkApiController extends Controller
}
else
{
}
else
{
$logService
=
new
LogService
();
$logService
=
new
LogService
();
$content
=
!
empty
(
$remark
[
'id'
])
?
'修改采购备注'
:
'添加采购备注'
;
$content
=
!
empty
(
$remark
[
'id'
])
?
'修改采购备注'
:
'添加采购备注'
;
$supplierId
=
$remark
[
'supplier_id'
];
$remark
=
json_encode
(
$remark
);
$remark
=
json_encode
(
$remark
);
$logService
->
AddLog
(
$
remark
[
'supplier_id'
]
,
LogModel
::
UPDATE_OPERATE
,
$content
,
$content
,
$remark
);
$logService
->
AddLog
(
$
supplierId
,
LogModel
::
UPDATE_OPERATE
,
$content
,
$content
,
$remark
);
$this
->
response
(
0
,
'保存成功'
);
$this
->
response
(
0
,
'保存成功'
);
}
}
}
}
...
...
app/Http/Controllers/PurchaseRemarkController.php
View file @
87b52648
...
@@ -41,6 +41,8 @@ class PurchaseRemarkController extends Controller
...
@@ -41,6 +41,8 @@ class PurchaseRemarkController extends Controller
if
(
!
empty
(
$id
))
{
if
(
!
empty
(
$id
))
{
$model
=
new
PurchaseRemarkModel
();
$model
=
new
PurchaseRemarkModel
();
$remark
=
$model
->
where
(
'id'
,
$id
)
->
first
()
->
toArray
();
$remark
=
$model
->
where
(
'id'
,
$id
)
->
first
()
->
toArray
();
$remark
[
'start_time'
]
=
date
(
'Y-m-d'
,
$remark
[
'start_time'
]);
$remark
[
'end_time'
]
=
date
(
'Y-m-d'
,
$remark
[
'end_time'
]);
$this
->
data
[
'remark'
]
=
$remark
;
$this
->
data
[
'remark'
]
=
$remark
;
}
}
$this
->
data
[
'title'
]
=
'保存采购备注'
;
$this
->
data
[
'title'
]
=
'保存采购备注'
;
...
...
app/Http/Services/StandardBrandService.php
View file @
87b52648
...
@@ -4,11 +4,13 @@
...
@@ -4,11 +4,13 @@
namespace
App\Http\Services
;
namespace
App\Http\Services
;
use
App\Model\BrandModel
;
use
App\Model\SpuBrandModel
;
use
App\Model\SpuBrandModel
;
use
App\Model\RedisModel
;
use
App\Model\RedisModel
;
use
App\Model\StandardBrandMappingModel
;
use
App\Model\StandardBrandMappingModel
;
use
App\Model\StandardBrandModel
;
use
App\Model\StandardBrandModel
;
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\Redis
;
class
StandardBrandService
class
StandardBrandService
{
{
...
@@ -95,4 +97,68 @@ class StandardBrandService
...
@@ -95,4 +97,68 @@ class StandardBrandService
$standardBrandIds
=
StandardBrandModel
::
whereIn
(
'brand_name'
,
$standardBrandNames
)
->
pluck
(
'standard_brand_id'
)
->
toArray
();
$standardBrandIds
=
StandardBrandModel
::
whereIn
(
'brand_name'
,
$standardBrandNames
)
->
pluck
(
'standard_brand_id'
)
->
toArray
();
return
$this
->
getBrandInitValue
(
implode
(
','
,
$standardBrandIds
));
return
$this
->
getBrandInitValue
(
implode
(
','
,
$standardBrandIds
));
}
}
//根据品牌id获取标准品牌名字列表
public
function
getStandardBrandNameListByBrandIds
(
$brandIds
)
{
$brandIds
=
explode
(
','
,
trim
(
$brandIds
,
','
));
if
(
empty
(
$brandIds
))
{
return
''
;
}
$redis
=
Redis
::
connection
();
$brands
=
$redis
->
hmget
(
'standard_brand'
,
$brandIds
);
$standardBrandNameList
=
[];
foreach
(
$brands
as
$brand
)
{
$brand
=
json_decode
(
$brand
,
true
);
$standardBrandNameList
[]
=
$brand
[
'brand_name'
];
}
return
$standardBrandNameList
?
implode
(
','
,
$standardBrandNameList
)
:
''
;
}
public
function
checkStandardBrandNameList
(
$standardBrandNameList
=
[])
{
//去数据库查询
$validStandardBrandList
=
StandardBrandModel
::
whereIn
(
'brand_name'
,
$standardBrandNameList
)
->
pluck
(
'brand_name'
,
'standard_brand_id'
)
->
toArray
();
$validStandardBrandMap
=
array_flip
(
$validStandardBrandList
);
$invalidBrandNameList
=
[];
$validStandardBrandNameList
=
[];
$validStandardBrandIds
=
[];
//判断哪些是错误的,哪些是正确的
$redis
=
Redis
::
connection
();
foreach
(
$standardBrandNameList
as
$key
=>
$standardBrandName
)
{
if
(
in_array
(
$standardBrandName
,
array_values
(
$validStandardBrandList
)))
{
$validStandardBrandIds
[]
=
$validStandardBrandMap
[
$standardBrandName
];
$validStandardBrandNameList
[]
=
$standardBrandName
;
unset
(
$standardBrandNameList
[
$key
]);
}
}
//剩下没有能直接找到标准品牌的,先当作普通品牌处理,然后去找出标准品牌,如果还是找不到,那就是无效品牌了
foreach
(
$standardBrandNameList
as
$key
=>
$checkStandardBrandName
)
{
//先去找对应的标准品牌
$brandId
=
BrandModel
::
where
(
'brand_name'
,
$checkStandardBrandName
)
->
value
(
'brand_id'
);
$standardBrandId
=
$redis
->
hget
(
'standard_brand_mapping'
,
$brandId
);
if
(
empty
(
$standardBrandId
))
{
$invalidBrandNameList
[]
=
$checkStandardBrandName
;
continue
;
}
$standardBrand
=
$redis
->
hget
(
'standard_brand'
,
$standardBrandId
);
$standardBrand
=
json_decode
(
$standardBrand
,
true
);
$standardBrandName
=
array_get
(
$standardBrand
,
'brand_name'
,
''
);
$standardBrandId
=
array_get
(
$standardBrand
,
'standard_brand_id'
,
''
);
if
(
empty
(
$standardBrandName
))
{
$invalidBrandNameList
[]
=
$checkStandardBrandName
;
continue
;
}
$validStandardBrandIds
[]
=
$standardBrandId
;
$validStandardBrandNameList
[]
=
$standardBrandName
;
}
//整合数据,返回标准的数据和无效的数据
return
[
'invalid_brand_name_list'
=>
$invalidBrandNameList
,
'valid_brand_name_list'
=>
$validStandardBrandNameList
,
'valid_brand_ids'
=>
$validStandardBrandIds
,
];
}
}
}
\ No newline at end of file
app/Http/Transformers/PurchaseRemarkTransformer.php
View file @
87b52648
...
@@ -17,16 +17,18 @@ class PurchaseRemarkTransformer
...
@@ -17,16 +17,18 @@ class PurchaseRemarkTransformer
if
(
!
$remark
)
{
if
(
!
$remark
)
{
continue
;
continue
;
}
}
$remark
[
'participate_type_name'
]
=
array_get
(
config
(
'field.PurchaseRemarkParticipateType'
),
$remark
[
'participate_type'
],
'无'
);
$remark
[
'participate_type_name'
]
=
array_get
(
config
(
'field.PurchaseRemarkParticipateType'
),
$remark
[
'participate_type'
],
'无'
);
$remark
[
'create_time'
]
=
$remark
[
'create_time'
]
?
date
(
'Y-m-d H:i:s'
,
$remark
[
'create_time'
]
=
$remark
[
'create_time'
]
?
date
(
'Y-m-d H:i:s'
,
$remark
[
'create_time'
])
:
''
;
$remark
[
'create_time'
])
:
''
;
$remark
[
'update_time'
]
=
$remark
[
'update_time'
]
?
date
(
'Y-m-d H:i:s'
,
$remark
[
'update_time'
]
=
$remark
[
'update_time'
]
?
date
(
'Y-m-d H:i:s'
,
$remark
[
'update_time'
])
:
''
;
$remark
[
'update_time'
])
:
''
;
$remark
[
'start_time'
]
=
$remark
[
'update_time'
]
?
date
(
'Y-m-d'
,
$remark
[
'status'
]
=
$remark
[
'end_time'
]
<
time
()
?
1
:
-
1
;
$remark
[
'end_time'
])
:
''
;
$remark
[
'end_time'
]
=
$remark
[
'update_time'
]
?
date
(
'Y-m-d'
,
$remark
[
'start_time'
]
=
$remark
[
'start_time'
]
?
date
(
'Y-m-d'
,
$remark
[
'start_time'
])
:
''
;
$remark
[
'end_time'
]
=
$remark
[
'start_time'
]
?
date
(
'Y-m-d'
,
$remark
[
'end_time'
])
:
''
;
$remark
[
'end_time'
])
:
''
;
$remark
[
'duration'
]
=
$remark
[
'start_time'
]
.
' ~ '
.
$remark
[
'end_time'
];
$remark
[
'duration'
]
=
$remark
[
'start_time'
]
.
' ~ '
.
$remark
[
'end_time'
];
}
}
unset
(
$remark
);
unset
(
$remark
);
return
$list
;
return
$list
;
...
...
app/Http/routes.php
View file @
87b52648
...
@@ -31,6 +31,7 @@ Route::group(['middleware' => ['web', 'menu']], function () {
...
@@ -31,6 +31,7 @@ Route::group(['middleware' => ['web', 'menu']], function () {
Route
::
match
([
'get'
,
'post'
],
'/log/{key}'
,
'LogController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/log/{key}'
,
'LogController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/supplier_apply/{key}'
,
'SupplierApplyController@info'
);
Route
::
match
([
'get'
,
'post'
],
'/supplier_apply/{key}'
,
'SupplierApplyController@info'
);
Route
::
match
([
'get'
,
'post'
],
'/purchase_remark/{key}'
,
'PurchaseRemarkController@info'
);
Route
::
match
([
'get'
,
'post'
],
'/purchase_remark/{key}'
,
'PurchaseRemarkController@info'
);
Route
::
match
([
'get'
,
'post'
],
'/shipping_cost_ruler/{key}'
,
'ShippingCostRulerController@info'
);
});
});
Route
::
group
([
'middleware'
=>
[
'web'
],
'namespace'
=>
'Api'
],
function
()
{
Route
::
group
([
'middleware'
=>
[
'web'
],
'namespace'
=>
'Api'
],
function
()
{
...
@@ -52,6 +53,7 @@ Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () {
...
@@ -52,6 +53,7 @@ Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () {
Route
::
match
([
'get'
,
'post'
],
'/api/sku_upload_log/{key}'
,
'SkuUploadLogApiController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/api/sku_upload_log/{key}'
,
'SkuUploadLogApiController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/api/supplier_apply/{key}'
,
'SupplierApplyApiController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/api/supplier_apply/{key}'
,
'SupplierApplyApiController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/api/purchase_remark/{key}'
,
'PurchaseRemarkApiController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/api/purchase_remark/{key}'
,
'PurchaseRemarkApiController@Entrance'
);
Route
::
match
([
'get'
,
'post'
],
'/api/shipping_cost_ruler/{key}'
,
'ShippingCostRulerApiController@Entrance'
);
//单独的统计接口
//单独的统计接口
Route
::
match
([
'get'
,
'post'
],
'/statisticsSkuNumber'
,
function
()
{
Route
::
match
([
'get'
,
'post'
],
'/statisticsSkuNumber'
,
function
()
{
(
new
\App\Http\Services\DataService
())
->
statisticsSkuNumber
();
(
new
\App\Http\Services\DataService
())
->
statisticsSkuNumber
();
...
...
resources/views/script/SavePurchaseRemarkScript.blade.php
View file @
87b52648
<script>
<script>
layui
.
use
([
'table'
,
'form'
,
'element'
,
'table'
,
'layer'
,
'admin'
,
'xmSelect'
],
function
()
{
layui
.
use
([
'table'
,
'form'
,
'element'
,
'table'
,
'layer'
,
'admin'
,
'xmSelect'
,
'laydate'
],
function
()
{
let
admin
=
layui
.
admin
;
let
admin
=
layui
.
admin
;
let
form
=
layui
.
form
;
let
form
=
layui
.
form
;
let
element
=
layui
.
element
;
let
element
=
layui
.
element
;
let
laydate
=
layui
.
laydate
;
let
xmSelect
=
layui
.
xmSelect
;
let
xmSelect
=
layui
.
xmSelect
;
laydate
.
render
({
elem
:
'#start_time'
,
format
:
'yyyy-MM-dd'
});
laydate
.
render
({
elem
:
'#end_time'
,
format
:
'yyyy-MM-dd'
});
form
.
on
(
'radio(participate_type)'
,
function
(
data
)
{
let
type
=
data
.
value
;
if
(
type
===
'1'
)
{
$
(
'#participate_content'
).
attr
(
'disabled'
,
true
);
$
(
'#participate_content'
).
addClass
(
'layui-disabled'
);
}
else
{
$
(
'#participate_content'
).
attr
(
'disabled'
,
false
);
$
(
'#participate_content'
).
removeClass
(
'layui-disabled'
);
}
});
form
.
on
(
'submit(savePurchaseRemark)'
,
function
(
data
)
{
form
.
on
(
'submit(savePurchaseRemark)'
,
function
(
data
)
{
let
url
=
'/api/purchase_remark/SavePurchaseRemark'
;
let
url
=
'/api/purchase_remark/SavePurchaseRemark'
;
data
.
field
.
supplier_id
=
getQueryVariable
(
'supplier_id'
);
let
participateType
=
data
.
field
.
participate_type
;
//如果是品牌类型,那么就要去校验品牌是否都是对的
if
(
participateType
==
3
)
{
let
checkBrandRes
=
ajax
(
'/api/common/checkStandardBrandNameList'
,
{
standard_brand_name_list
:
data
.
field
.
participate_content
});
if
(
checkBrandRes
.
code
==
0
)
{
if
(
checkBrandRes
.
data
.
invalid_brand_name_list
.
length
>
0
)
{
let
list
=
checkBrandRes
.
data
.
invalid_brand_name_list
.
join
(
','
);
list
+=
' 不是标准品牌名称'
;
$
(
'#checkStandardBrandNameResult'
).
text
(
list
);
layer
.
msg
(
"标准品牌校验未通过,请修正品牌后再重新提交"
)
return
false
;
}
}
}
let
res
=
ajax
(
url
,
data
.
field
);
let
res
=
ajax
(
url
,
data
.
field
);
if
(
!
res
)
{
if
(
!
res
)
{
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
6
});
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
6
});
...
@@ -23,19 +60,5 @@
...
@@ -23,19 +60,5 @@
form
.
on
(
'submit(cancel)'
,
function
(
data
)
{
form
.
on
(
'submit(cancel)'
,
function
(
data
)
{
admin
.
closeThisDialog
();
admin
.
closeThisDialog
();
});
});
form
.
on
(
'submit(delete)'
,
function
(
data
)
{
layer
.
confirm
(
'确定要删除该条采购备注吗?'
,
function
(
index
)
{
let
id
=
getQueryVariable
(
'id'
);
let
res
=
ajax
(
'/api/purchase_remark/DeletePurchaseRemark'
,
{
id
:
id
})
if
(
res
.
err_code
===
0
)
{
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
})
setTimeout
(
function
()
{
admin
.
closeThisDialog
();
},
1000
);
}
else
{
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
})
}
});
});
});
});
</script>
</script>
\ No newline at end of file
resources/views/script/supplier/OrderRemarkScript.blade.php
deleted
100644 → 0
View file @
a02b4b1e
<script>
layui
.
use
([
'table'
,
'form'
,
'element'
,
'layer'
,
'admin'
,
'laydate'
,
'xmSelect'
],
function
()
{
let
admin
=
layui
.
admin
;
let
form
=
layui
.
form
;
let
table
=
layui
.
table
;
let
layDate
=
layui
.
laydate
;
let
element
=
layui
.
element
;
let
xmSelect
=
layui
.
xmSelect
;
table
.
render
({
elem
:
'#purchaseRemarkList'
,
url
:
'/api/purchase_remark/GetPurchaseRemarkList'
,
method
:
'get'
,
cellMinWidth
:
80
,
//全局定义常规单元格的最小宽度
where
:
{
supplier_id
:
getQueryVariable
(
"supplier_id"
)
},
loading
:
true
,
first
:
true
,
//不显示首页
last
:
false
,
//不显示尾页
cols
:
[[
{
field
:
'participate_type_name'
,
title
:
'参与类型'
,
align
:
'center'
,
width
:
140
},
{
field
:
'participate_content'
,
title
:
'传真'
,
align
:
'center'
,
width
:
140
},
{
field
:
'duration'
,
title
:
'开始时间 - 截至时间'
,
align
:
'center'
,
width
:
300
},
{
field
:
'remark'
,
title
:
'备注内容'
,
align
:
'center'
},
]],
id
:
'purchaseRemarkList'
,
page
:
{},
});
//新增联系方式
$
(
"#savePurchaserRemark"
).
click
(
function
()
{
let
supplierId
=
getQueryVariable
(
'supplier_id'
);
layer
.
open
({
type
:
2
,
content
:
'/purchase_remark/SavePurchaseRemark?view=iframe&supplier_id='
+
supplierId
,
area
:
[
'800px'
,
'725px'
],
title
:
'新增采购备注'
,
end
:
function
()
{
// 监听弹窗关闭
table
.
reload
(
'purchaseRemarkList'
);
}
});
})
});
</script>
\ No newline at end of file
resources/views/script/supplier/SupplierAttachmentScript.blade.php
View file @
87b52648
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
},
},
{
field
:
'description'
,
title
:
'附件说明'
,
align
:
'center'
,
width
:
250
},
{
field
:
'description'
,
title
:
'附件说明'
,
align
:
'center'
,
width
:
250
},
{
field
:
'validity_period'
,
title
:
'
<
span
class
=
"require"
>*
<
/span>有效期', align: 'center', width: 220}
,
{
field
:
'validity_period'
,
title
:
'
<
span
class
=
"require"
>*
<
/span>有效期', align: 'center', width: 220}
,
{
field
:
'create_name'
,
title
:
'
上传人
'
,
align
:
'center'
,
width
:
100
},
{
field
:
'create_name'
,
title
:
'
内部采购
'
,
align
:
'center'
,
width
:
100
},
{
field
:
'create_time'
,
title
:
'上传时间'
,
align
:
'center'
,
width
:
150
},
{
field
:
'create_time'
,
title
:
'上传时间'
,
align
:
'center'
,
width
:
150
},
]],
]],
id
:
'attachmentList'
,
id
:
'attachmentList'
,
...
...
resources/views/script/supplier/SupplierRulerScript.blade.php
View file @
87b52648
...
@@ -18,113 +18,83 @@
...
@@ -18,113 +18,83 @@
}
}
});
});
//渲染主营品牌的多选
function
getExcludeBrandOption
(
element
,
idName
=
'exclude_main_brands'
)
{
table
.
render
({
return
{
elem
:
'#purchaseRemarkList'
,
el
:
'#'
+
element
,
url
:
'/api/purchase_remark/GetPurchaseRemarkList'
,
filterable
:
true
,
method
:
'get'
,
paging
:
true
,
cellMinWidth
:
80
,
//全局定义常规单元格的最小宽度
height
:
'250px'
,
where
:
{
size
:
'mini'
,
supplier_id
:
getQueryVariable
(
"supplier_id"
)
direction
:
'auto'
,
},
autoRow
:
true
,
loading
:
true
,
prop
:
{
first
:
true
,
//不显示首页
name
:
'brand_name'
,
last
:
false
,
//不显示尾页
value
:
'brand_id'
,
cols
:
[[
},
{
field
:
'operate'
,
title
:
'操作'
,
fixed
:
'left'
,
width
:
130
,
templet
:
'#operate'
},
remoteSearch
:
true
,
{
field
:
'participate_type_name'
,
title
:
'参与类型'
,
align
:
'center'
,
width
:
140
},
pageRemote
:
true
,
{
template
({
item
,
sels
,
name
,
value
})
{
field
:
'status'
,
title
:
'状态'
,
align
:
'center'
,
width
:
80
,
templet
:
function
(
data
)
{
return
item
.
brand_name
+
'
<
span
style
=
"position: absolute; right: 10px; color: #8799a3"
>
' + item.mapping_brand_names + '
<
/span>
'
return
data
.
status
==
1
?
"
<
span
style
=
'color: red'
>
停用
<
/span>" : '启用'
;
},
filterMethod
:
function
(
val
,
item
,
index
,
prop
)
{
},
pageSize
:
30
,
remoteMethod
:
function
(
val
,
cb
,
show
,
pageIndex
)
{
//val: 搜索框的内容, 不开启搜索默认为空, cb: 回调函数, show: 当前下拉框是否展开, pageIndex: 当前第几页
$
.
ajax
({
url
:
'/api/common/getStandardBrandList'
,
type
:
'post'
,
data
:
{
brand_name
:
val
,
page
:
pageIndex
},
dataType
:
'json'
,
timeout
:
10000
,
success
:
function
(
res
)
{
if
(
!
res
)
return
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
5
});
if
(
res
.
err_code
===
0
)
{
cb
(
res
.
data
,
res
.
last_page
);
}
else
{
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
});
}
},
error
:
function
()
{
return
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
5
});
}
});
},
on
:
function
(
data
)
{
let
arr
=
data
.
arr
;
let
excludeBrandIds
=
''
;
for
(
let
i
in
arr
)
{
excludeBrandIds
+=
arr
[
i
].
brand_id
+
','
;
}
}
$
(
'#'
+
idName
).
val
(
excludeBrandIds
);
},
},
};
{
field
:
'duration'
,
title
:
'开始时间 - 截至时间'
,
align
:
'center'
,
width
:
250
},
}
{
field
:
'remark'
,
title
:
'备注内容'
,
align
:
'center'
},
]],
//主营品牌的渲染
id
:
'purchaseRemarkList'
,
let
brandOption
=
getExcludeBrandOption
(
'exclude_brand_selector'
);
page
:
{},
let
excludeBrandSelector
=
xmSelect
.
render
(
brandOption
);
});
let
excludeBrandIds
=
$
(
'#exclude_main_brands'
).
attr
(
'value'
);
let
excludeBrandInitValue
=
{
!!
json_encode
(
$exclude_brand_init_value
?:[])
!!
};
excludeBrandSelector
.
setValue
(
excludeBrandInitValue
);
//批量新增主营品牌
//新增
$
(
'#batchAddExcludeMainBrands'
).
click
(
function
()
{
$
(
"#savePurchaserRemark"
).
click
(
function
()
{
let
supplierId
=
getQueryVariable
(
'supplier_id'
);
layer
.
open
({
layer
.
open
({
title
:
"批量增加主营品牌"
,
type
:
2
,
area
:
[
'600px'
,
'400px'
],
content
:
'/purchase_remark/SavePurchaseRemark?view=iframe&supplier_id='
+
supplierId
,
type
:
1
,
area
:
[
'800px'
,
'725px'
],
content
:
$
(
'#batchAddExcludeMainBrandsDiv'
)
title
:
'新增采购备注'
,
end
:
function
()
{
// 监听弹窗关闭
table
.
reload
(
'purchaseRemarkList'
);
}
});
});
})
;
})
$
(
'#confirmBatchAddExcludeMainBrands'
).
click
(
function
()
{
table
.
on
(
'tool(purchaseRemarkList)'
,
function
(
obj
)
{
let
brandValue
=
excludeBrandSelector
.
getValue
();
let
data
=
obj
.
data
;
console
.
log
(
brandValue
);
console
.
log
(
data
);
let
standardBrandNames
=
$
(
'#batchAddExcludeMainBrandsTextarea'
).
val
();
let
layEvent
=
obj
.
event
;
//请求接口获取返回的数据,并且合并目前选择的主营品牌,重新渲染xm-select
if
(
layEvent
===
'edit'
)
{
let
res
=
ajax
(
'/api/supplier/getBatchAddExcludeMainBrandsData'
,
{
standard_brand_names
:
standardBrandNames
});
layer
.
open
({
let
data
=
res
.
data
;
type
:
2
,
let
brandNames
=
arrayColumn
(
data
,
'brand_name'
).
join
(
','
)
area
:
[
'800px'
,
'725px'
],
$
(
'#batchAddExcludeMainBrandsBlockQuote'
).
text
(
brandNames
);
fixed
:
false
,
if
(
data
.
length
===
0
)
{
offset
:
'50px'
,
layer
.
msg
(
'没有匹配到有效的标准品牌'
,
{
icon
:
5
});
//不固定
return
false
;
// maxmin: true,
}
else
{
title
:
'查看采购备注 '
,
brandValue
=
brandValue
.
concat
(
data
);
content
:
'/purchase_remark/SavePurchaseRemark?view=iframe&supplier_id='
+
getQueryVariable
(
'supplier_id'
)
+
'&id='
+
data
.
id
,
brandValue
=
multiArrayUnique
(
brandValue
);
end
:
function
()
{
// 监听弹窗关闭
excludeBrandSelector
.
setValue
(
brandValue
);
table
.
reload
(
'purchaseRemarkList'
);
$
(
'#exclude_main_brands'
).
val
(
arrayColumn
(
brandValue
,
'brand_id'
).
join
(
','
));
}
$
(
'#batchAddExcludeMainBrandsTextarea'
).
val
(
''
);
});
$
(
'#batchAddExcludeMainBrandsBlockQuote'
).
text
(
''
);
}
layer
.
msg
(
'批量添加主营品牌成功'
,
{
icon
:
6
});
if
(
layEvent
===
'delete'
)
{
layer
.
confirm
(
'确定要删除该条采购备注吗?'
,
function
(
index
)
{
let
res
=
ajax
(
'/api/purchase_remark/DeletePurchaseRemark'
,
{
id
:
data
.
id
});
if
(
res
.
err_code
===
0
)
{
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
})
table
.
reload
(
'purchaseRemarkList'
);
}
else
{
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
})
}
});
}
}
});
});
$
(
'#closeBatchAddExcludeMainBrands'
).
click
(
function
()
{
$
(
'#batchAddExcludeMainBrandsTextarea'
).
val
(
''
);
$
(
'#batchAddExcludeMainBrandsBlockQuote'
).
text
(
''
);
layer
.
closeAll
();
});
table
.
render
({
table
.
render
({
elem
:
'#
purchaseRemark
List'
,
elem
:
'#
shippingCostRuler
List'
,
url
:
'/api/
purchase_remark/GetPurchaseRemark
List'
,
url
:
'/api/
shipping_cost_ruler/GetShippingCostRuler
List'
,
method
:
'get'
,
method
:
'get'
,
cellMinWidth
:
80
,
//全局定义常规单元格的最小宽度
cellMinWidth
:
80
,
//全局定义常规单元格的最小宽度
where
:
{
where
:
{
...
@@ -134,13 +104,64 @@
...
@@ -134,13 +104,64 @@
first
:
true
,
//不显示首页
first
:
true
,
//不显示首页
last
:
false
,
//不显示尾页
last
:
false
,
//不显示尾页
cols
:
[[
cols
:
[[
{
field
:
'operate'
,
title
:
'操作'
,
fixed
:
'left'
,
width
:
130
,
templet
:
'#operate'
},
{
field
:
'participate_type_name'
,
title
:
'参与类型'
,
align
:
'center'
,
width
:
140
},
{
field
:
'participate_type_name'
,
title
:
'参与类型'
,
align
:
'center'
,
width
:
140
},
{
field
:
'participate_content'
,
title
:
'传真'
,
align
:
'center'
,
width
:
140
},
{
{
field
:
'duration'
,
title
:
'开始时间 - 截至时间'
,
align
:
'center'
,
width
:
300
},
field
:
'status'
,
title
:
'状态'
,
align
:
'center'
,
width
:
80
,
templet
:
function
(
data
)
{
return
data
.
status
==
1
?
"
<
span
style
=
'color: red'
>
停用
<
/span>" : '启用'
;
}
},
{
field
:
'duration'
,
title
:
'开始时间 - 截至时间'
,
align
:
'center'
,
width
:
250
},
{
field
:
'remark'
,
title
:
'备注内容'
,
align
:
'center'
},
{
field
:
'remark'
,
title
:
'备注内容'
,
align
:
'center'
},
]],
]],
id
:
'
purchaseRemark
List'
,
id
:
'
shippingCostRuler
List'
,
page
:
{},
page
:
{},
});
});
//新增
$
(
"#saveShippingCostRuler"
).
click
(
function
()
{
let
supplierId
=
getQueryVariable
(
'supplier_id'
);
layer
.
open
({
type
:
2
,
content
:
'/shipping_cost_ruler/SaveShippingCostRuler?view=iframe&supplier_id='
+
supplierId
,
area
:
[
'800px'
,
'725px'
],
title
:
'新增采购备注'
,
end
:
function
()
{
// 监听弹窗关闭
table
.
reload
(
'shippingCostRulerList'
);
}
});
})
table
.
on
(
'tool(shippingCostRulerList)'
,
function
(
obj
)
{
let
data
=
obj
.
data
;
console
.
log
(
data
);
let
layEvent
=
obj
.
event
;
if
(
layEvent
===
'edit'
)
{
layer
.
open
({
type
:
2
,
area
:
[
'800px'
,
'725px'
],
fixed
:
false
,
offset
:
'50px'
,
//不固定
// maxmin: true,
title
:
'查看运费规则 '
,
content
:
'/shipping_cost_ruler/SaveShippingCostRuler?view=iframe&supplier_id='
+
getQueryVariable
(
'supplier_id'
)
+
'&id='
+
data
.
id
,
end
:
function
()
{
// 监听弹窗关闭
table
.
reload
(
'shippingCostRulerList'
);
}
});
}
if
(
layEvent
===
'delete'
)
{
layer
.
confirm
(
'确定要删除该条运费规则吗?'
,
function
(
index
)
{
let
res
=
ajax
(
'/api/shipping_cost_ruler/DeleteShippingCostRuler'
,
{
id
:
data
.
id
});
if
(
res
.
err_code
===
0
)
{
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
})
table
.
reload
(
'shippingCostRulerList'
);
}
else
{
layer
.
msg
(
res
.
err_msg
,
{
icon
:
5
})
}
});
}
});
});
});
</script>
</script>
\ No newline at end of file
resources/views/web/SavePurchaseRemark.blade.php
View file @
87b52648
...
@@ -8,45 +8,65 @@
...
@@ -8,45 +8,65 @@
<form
class=
"layui-form"
action=
""
>
<form
class=
"layui-form"
action=
""
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
@inject('singleSelectPresenter','App\Presenters\SingleSelectPresenter')
@inject('singleSelectPresenter','App\Presenters\SingleSelectPresenter')
{!! $singleSelectPresenter->render('participate_type','参与类型 :',!empty($remark)?$remark['participate_type']:1,config('field.PurchaseRemarkParticipateType'),['required'=>true]) !!}
{!! $singleSelectPresenter->render('participate_type','参与类型 :',!empty($remark)?$remark['participate_type']:1,config('field.PurchaseRemarkParticipateType'),['required'=>true
,'disable' => !empty($remark)?true:false
]) !!}
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><span
style=
"color: red"
>
*
</span>
参与内容 :
</label>
<label
class=
"layui-form-label"
><span
style=
"color: red"
>
*
</span>
参与内容 :
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"register_company_name"
id=
"register_company_name"
<div
id=
"participate_content_div"
>
placeholder=
"请输入注册公司名,注册公司名必须同执照"
class=
"layui-input"
<textarea
rows=
"7"
name=
"participate_content"
value=
"{{$remark['register_company_name'] or ''}}"
>
placeholder=
"请输入 型号/标准品牌 全称,多个以英文逗号隔开,如果选择品牌类型,会去校验标准品牌是否正确"
class=
"layui-textarea @if(empty($remark) || (!empty($remark) && $remark['participate_type']==1)) layui-disabled @endif"
@
if
(
empty
($
remark
)||
(!
empty
($
remark
)
&&
$
remark
['
participate_type
']==
1
))
disabled
@
endif
id=
"participate_content"
>
{{$remark['participate_content'] or ''}}
</textarea>
</div>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b
style=
"color: red"
id=
"checkStandardBrandNameResult"
></b>
</blockquote>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><span
style=
"color: red"
>
*
</span>
参与时间 :
</label>
<label
class=
"layui-form-label"
><span
style=
"color: red"
>
*
</span>
参与时间 :
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"established_time"
name=
"established_time"
<div
class=
"layui-col-xs4"
>
placeholder=
"请输入成立时间"
<div
class=
"layui-input-inline"
>
class=
"layui-input"
<input
type=
"text"
id=
"start_time"
name=
"start_time"
autocomplete=
"off"
placeholder=
"请输入开始时间"
value=
"{{$supplier['established_time'] or ''}}"
>
class=
"layui-input"
autocomplete=
"off"
value=
"{{$remark['start_time'] or ''}}"
>
</div>
</div>
<div
class=
"layui-col-xs1"
>
<span
style=
"width: 10px"
>
--
</span>
</div>
<div
class=
"layui-col-xs7"
style=
"margin-left: -25px"
>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"end_time"
name=
"end_time"
placeholder=
"请输入截止时间"
class=
"layui-input"
autocomplete=
"off"
value=
"{{$remark['end_time'] or ''}}"
>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><span
style=
"color: red"
>
*
</span>
备注内容 :
</label>
<label
class=
"layui-form-label"
><span
style=
"color: red"
>
*
</span>
备注内容 :
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<textarea
rows=
"7"
name=
"remark
_content
"
placeholder=
"活动内容(展示在【询报价系统】供销售查看的内容通知)"
<textarea
rows=
"7"
name=
"remark"
placeholder=
"活动内容(展示在【询报价系统】供销售查看的内容通知)"
class=
"layui-textarea"
class=
"layui-textarea"
id=
"remark
_content"
>
{{$remark['remark_content
'] or ''}}
</textarea>
id=
"remark
"
>
{{$remark['remark
'] or ''}}
</textarea>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<div
align=
"right"
style=
"margin-top: 20px"
>
<div
align=
"right"
style=
"margin-top: 20px"
>
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-info submit-loading"
lay-submit
lay-filter=
"
load
"
>
确认
lay-filter=
"
savePurchaseRemark
"
>
确认
</button>
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-primary"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-primary"
lay-submit
lay-filter=
"cancel"
>
关闭
lay-filter=
"cancel"
>
关闭
</button>
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-sm layui-btn-danger"
lay-submit
lay-filter=
"delete"
>
删除
</button>
</div>
</div>
</div>
</div>
...
...
resources/views/web/UpdateSupplier.blade.php
View file @
87b52648
...
@@ -133,12 +133,6 @@
...
@@ -133,12 +133,6 @@
@endif
@endif
id="examination">检测记录
id="examination">检测记录
</li>
</li>
<li
@
if
(!
checkPerm
('
ViewOrderRemark
'))
style=
"display: none"
@
endif
@
if
(
request
()
-
>
get('tab')=='order_remark')
class="layui-this"
@endif
id="order_remark">下单备注
</li>
</ul>
</ul>
<div
class=
"layui-tab-content"
>
<div
class=
"layui-tab-content"
>
<div
class=
"layui-tab-item
<div
class=
"layui-tab-item
...
@@ -259,10 +253,6 @@
...
@@ -259,10 +253,6 @@
@include('web.SupplierExaminationList')
@include('web.SupplierExaminationList')
</div>
</div>
</div>
</div>
{{--下单备注--}}
<div
class=
"layui-tab-item @if(request()->get('tab')=='order_remark') layui-show @endif"
>
@include('web.supplier.OrderRemark')
</div>
</div>
</div>
</div>
</div>
@include('web.supplier.ApplyAuditReason')
@include('web.supplier.ApplyAuditReason')
...
...
resources/views/web/supplier/OrderRemark.blade.php
deleted
100644 → 0
View file @
a02b4b1e
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
采购备注
<span
style=
"color: orange;margin-left: 10px"
>
PS:设置后的备注信息,将会应用在【询报价系统】供销售看到(仅做为提示)
</span></b>
</blockquote>
<div
class=
"layui-form-item"
>
<button
class=
"layui-btn layui-btn-sm"
type=
"button"
id=
"savePurchaserRemark"
>
添加备注
</button>
<table
class=
"layui-table"
lay-filter=
"purchaseRemarkList"
id=
"purchaseRemarkList"
></table>
</div>
<div
style=
"margin-bottom: 300px"
></div>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
采购附加费设置
</b>
</blockquote>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
商品总价不满
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[max]"
id=
"cn_max"
value=
"{{$supplier['extra_fee']['cn']['max'] or ''}}"
lay-verify=
"num"
>
</div>
<div
class=
"layui-form-label"
style=
"width: 100px;margin-left: -20px"
>
元(人民币),收取
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[price]"
value=
"{{$supplier['extra_fee']['cn']['price'] or ''}}"
lay-verify=
"float"
value=
""
>
</div>
<div
class=
"layui-form-label"
style=
"width: 40px;margin-left: -20px"
>
元运费
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
type=
"checkbox"
title=
"全渠道收费"
lay-skin=
"primary"
lay-filter=
"cn_filter"
>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
商品总价不满
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"hk[max]"
id=
"hk_max"
value=
"{{$supplier['extra_fee']['hk']['max'] or ''}}"
lay-verify=
"num"
value=
""
>
</div>
<div
class=
"layui-form-label"
style=
"width: 55px;margin-left: -20px"
>
美金,收取
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"hk[price]"
value=
"{{$supplier['extra_fee']['hk']['price'] or ''}}"
lay-verify=
"float"
value=
""
>
</div>
<div
class=
"layui-form-label"
style=
"width: 40px;margin-left: -20px"
>
元运费
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
type=
"checkbox"
title=
"全渠道收费"
lay-skin=
"primary"
lay-filter=
"hk_filter"
>
</div>
</div>
</div>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
采购价格系数调整
</b>
</blockquote>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
人民币系数
</label>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<input
type=
"text"
name=
"cn_ratio"
value=
"{{$supplier['cn_ratio'] or 1}}"
placeholder=
"请输入人民币系数"
autocomplete=
"off"
class=
"layui-input"
style=
"display: inline-block"
>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
美金系数
</label>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<input
type=
"text"
name=
"us_ratio"
value=
"{{$supplier['us_ratio'] or 1}}"
placeholder=
"请输入采购附加费"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
基数为1,如利润为10%,请填写1.1
</div>
</div>
</div>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
货期调整
</b>
</blockquote>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
大陆交期
</label>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<input
type=
"text"
name=
"cn_delivery_time"
value=
"{{$supplier['cn_delivery_time'] or 1}}"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<select
name=
"cn_delivery_time_period"
>
<option
value=
"天"
@
if
($
supplier
['
cn_delivery_time_period
']
==
'天')
selected
@
endif
>
天
</option>
<option
value=
"周"
@
if
($
supplier
['
cn_delivery_time_period
']
==
'周')
selected
@
endif
>
周
</option>
</select>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
香港交期
</label>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<input
type=
"text"
name=
"us_delivery_time"
value=
"{{$supplier['us_delivery_time'] or 1}}"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<select
name=
"us_delivery_time_period"
>
<option
value=
"天"
@
if
($
supplier
['
us_delivery_time_period
']
==
'天')
selected
@
endif
>
天
</option>
<option
value=
"周"
@
if
($
supplier
['
us_delivery_time_period
']
==
'周')
selected
@
endif
>
周
</option>
</select>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
单位为工作日,周。格式2-6工作日,1-2周
</div>
</div>
</div>
@include('script.supplier.OrderRemarkScript')
\ No newline at end of file
resources/views/web/supplier/SupplierRuler.blade.php
View file @
87b52648
<blockquote
class=
"layui-elem-quote layui-text"
>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
运费设置
<span
style=
"color: orange;margin-left: 10px"
>
PS:设置后的运费规则,将会应用在网站下单页面;
</span></b>
<b>
采购备注
<span
style=
"color: orange;margin-left: 10px"
>
PS:设置后的备注信息,将会应用在【询报价系统】供销售看到(仅做为提示)
</span></b>
</blockquote>
</blockquote>
{{--运费规则--}}
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<table
class=
"layui-table"
>
<button
class=
"layui-btn layui-btn-sm"
type=
"button"
id=
"saveShippingCostRuler"
>
添加运费规则
</button>
<colgroup>
<table
class=
"layui-table"
lay-filter=
"shippingCostRulerList"
id=
"shippingCostRulerList"
></table>
<col
width=
"300"
>
<col
width=
"400"
>
</colgroup>
<thead>
<tr>
<th>
包邮
</th>
<th>
不包邮
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div
class=
"layui-row"
>
<div
class=
"layui-col-md12"
>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
type=
"checkbox"
title=
"无条件包邮"
lay-skin=
"primary"
lay-filter=
"cn_filter"
>
</div>
</div>
<br>
<br>
<div
class=
"layui-col-md12"
>
<div>
<label
class=
"layui-form-label"
style=
"width: 150px"
>
商品下单数量达到或者超过
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[max]"
id=
"cn_max"
value=
"{{$supplier['extra_fee']['cn']['max'] or ''}}"
lay-verify=
"num"
>
</div>
<div
class=
"layui-form-label"
style=
"width: 50px;margin-left: -20px"
>
个,包邮
</div>
</div>
</div>
<div
class=
"layui-col-md12"
>
<div>
<label
class=
"layui-form-label"
style=
"width: 150px"
>
商品下单金额达到或超过
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[max]"
id=
"cn_max"
value=
"{{$supplier['extra_fee']['cn']['max'] or ''}}"
lay-verify=
"num"
>
</div>
<div
class=
"layui-form-label"
style=
"width: 100px;margin-left: -20px"
>
元(RMB)包邮
</div>
</div>
</div>
<div
class=
"layui-col-md12"
>
<div>
<label
class=
"layui-form-label"
style=
"width: 150px"
>
商品下单数量达到或超过
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[max]"
id=
"cn_max"
value=
"{{$supplier['extra_fee']['cn']['max'] or ''}}"
lay-verify=
"num"
>
</div>
<div
class=
"layui-form-label"
style=
"width: 170px;margin-left: -10px"
>
个 +
商品下单金额达到或者超过
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[price]"
value=
"{{$supplier['extra_fee']['cn']['price'] or ''}}"
lay-verify=
"float"
value=
""
>
</div>
<div
class=
"layui-form-label"
style=
"width: 110px;margin-left: -20px"
>
元(RMB),包邮
</div>
</div>
</div>
</div>
</td>
<td>
<div
class=
"layui-row"
>
<div
class=
"layui-col-md12"
>
<div>
<label
class=
"layui-form-label"
style=
"width: 110px"
>
商品下单数量未达到
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[max]"
id=
"cn_max"
value=
"{{$supplier['extra_fee']['cn']['max'] or ''}}"
lay-verify=
"num"
>
</div>
<div
class=
"layui-form-label"
style=
"width: 70px;margin-left: -10px"
>
个,收取运费
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[price]"
value=
"{{$supplier['extra_fee']['cn']['price'] or ''}}"
lay-verify=
"float"
value=
""
>
</div>
<div
class=
"layui-form-label"
style=
"width:80px;margin-left: -20px"
>
元(RMB)
</div>
</div>
</div>
<div
class=
"layui-col-md12"
>
<div>
<label
class=
"layui-form-label"
style=
"width: 110px"
>
商品下单金额未达到
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[max]"
id=
"cn_max"
value=
"{{$supplier['extra_fee']['cn']['max'] or ''}}"
lay-verify=
"num"
>
</div>
<div
class=
"layui-form-label"
style=
"width: 120px;margin-left: -10px"
>
元(RMB),收取运费
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[price]"
value=
"{{$supplier['extra_fee']['cn']['price'] or ''}}"
lay-verify=
"float"
value=
""
>
</div>
<div
class=
"layui-form-label"
style=
"width: 70px;margin-left: -20px"
>
元(RMB)
</div>
</div>
</div>
<div
class=
"layui-col-md12"
>
<div>
<label
class=
"layui-form-label"
style=
"width: 110px"
>
商品下单数量未达到
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[max]"
id=
"cn_max"
value=
"{{$supplier['extra_fee']['cn']['max'] or ''}}"
lay-verify=
"num"
>
</div>
<div
class=
"layui-form-label"
style=
"width: 140px;margin-left: -10px"
>
个 + 商品下单金额未达到
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[price]"
value=
"{{$supplier['extra_fee']['cn']['price'] or ''}}"
lay-verify=
"float"
value=
""
>
</div>
<div
class=
"layui-form-label"
style=
"width: 130px;margin-left: -20px"
>
元(RMB),收取运费
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[price]"
value=
"{{$supplier['extra_fee']['cn']['price'] or ''}}"
lay-verify=
"float"
value=
""
>
</div>
<div
class=
"layui-form-label"
style=
"width: 110px;margin-left: -20px"
>
元(RMB)
</div>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<blockquote
class=
"layui-elem-quote layui-text"
>
{{--采购备注--}}
<b>
商品上架限制
</b>
</blockquote>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<span>
ECCN编码包含以下内容的,不允许上架
</span>
<button
class=
"layui-btn layui-btn-sm"
type=
"button"
id=
"savePurchaserRemark"
>
添加备注
</button>
<div
class=
"layui-form-item layui-form-text"
>
<table
class=
"layui-table"
lay-filter=
"purchaseRemarkList"
id=
"purchaseRemarkList"
></table>
<textarea
name=
"credit_investigation"
placeholder=
"请输入资信调查"
class=
"layui-textarea"
>
{{$supplier['credit_investigation'] or ''}}
</textarea>
</div>
<span
style=
"color: darkgrey"
>
支持通配符“%”,如:①EAR开头:EAR%;②002结尾:%002;③包含A99:%A99%;
</span>
</div>
</div>
<div
class=
"layui-form-item"
>
<span>
供应商品牌包含以下标准品牌的,不允许上架
</span>
<div
style=
"display: none"
>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
采购附加费设置
</b>
</blockquote>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-col-md12"
>
<div
class=
"layui-inline"
>
<div
id=
"exclude_brand_selector"
class=
"layui-input-inline"
style=
"width: 100%;"
>
<label
class=
"layui-form-label"
>
商品总价不满
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[max]"
id=
"cn_max"
value=
"{{$supplier['extra_fee']['cn']['max'] or ''}}"
lay-verify=
"num"
>
</div>
</div>
<input
type=
"hidden"
name=
"exclude_main_brands"
value=
""
<div
class=
"layui-form-label"
style=
"width: 100px;margin-left: -20px"
>
元(人民币),收取
</div>
id=
"main_brands"
value=
"{{$supplier['exclude_main_brands'] or ''}}"
>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<a
style=
"color: #009688;"
id=
"batchAddExcludeMainBrands"
>
+批量增加主营品牌
</a>
<input
class=
"layui-input"
type=
"text"
name=
"cn[price]"
<div
id=
"batchAddExcludeMainBrandsDiv"
value=
"{{$supplier['extra_fee']['cn']['price'] or ''}}"
style=
"padding-left: 30px;padding-top: 30px;padding-right: 30px;display: none"
>
lay-verify=
"float"
value=
""
>
<div
class=
"layui-col-md12"
>
</div>
<textarea
rows=
"7"
placeholder=
"标准品牌名称,多个用英文逗号隔开"
class=
"layui-textarea"
<div
class=
"layui-form-label"
style=
"width: 40px;margin-left: -20px"
>
元运费
</div>
id=
"batchAddExcludeMainBrandsTextarea"
></textarea>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<blockquote
class=
"layui-elem-quote"
id=
"batchAddExcludeMainBrandsBlockQuote"
></blockquote>
<input
type=
"checkbox"
title=
"全渠道收费"
lay-skin=
"primary"
lay-filter=
"cn_filter"
>
<span
style=
"color: red"
id=
"invalid_exclude_brand_name_list"
></span>
</div>
<div
class=
"layui-col-md12"
>
<button
class=
"layui-btn layui-btn-sm"
type=
"button"
id=
"confirmBatchAddExcludeMainBrands"
>
验证并且添加
</button>
<button
class=
"layui-btn layui-btn-sm layui-btn-primary"
type=
"button"
id=
"closeBatchAddExcludeMainBrands"
>
关闭
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
商品总价不满
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<div
style=
"margin-bottom: 300px"
></div>
<input
class=
"layui-input"
type=
"text"
name=
"hk[max]"
id=
"hk_max"
value=
"{{$supplier['extra_fee']['hk']['max'] or ''}}"
<blockquote
class=
"layui-elem-quote layui-text"
>
lay-verify=
"num"
value=
""
>
<b>
采购附加费设置
</b>
</div>
</blockquote>
<div
class=
"layui-form-label"
style=
"width: 55px;margin-left: -20px"
>
美金,收取
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<div
class=
"layui-inline"
>
<input
class=
"layui-input"
type=
"text"
name=
"hk[price]"
<label
class=
"layui-form-label"
>
商品总价不满
</label>
value=
"{{$supplier['extra_fee']['hk']['price'] or ''}}"
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
lay-verify=
"float"
value=
""
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[max]"
id=
"cn_max"
</div>
value=
"{{$supplier['extra_fee']['cn']['max'] or ''}}"
<div
class=
"layui-form-label"
style=
"width: 40px;margin-left: -20px"
>
元运费
</div>
lay-verify=
"num"
>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
</div>
<input
type=
"checkbox"
title=
"全渠道收费"
lay-skin=
"primary"
lay-filter=
"hk_filter"
>
<div
class=
"layui-form-label"
style=
"width: 100px;margin-left: -20px"
>
元(人民币),收取
</div>
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[price]"
value=
"{{$supplier['extra_fee']['cn']['price'] or ''}}"
lay-verify=
"float"
value=
""
>
</div>
<div
class=
"layui-form-label"
style=
"width: 40px;margin-left: -20px"
>
元运费
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
type=
"checkbox"
title=
"全渠道收费"
lay-skin=
"primary"
lay-filter=
"cn_filter"
>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
商品总价不满
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"hk[max]"
id=
"hk_max"
value=
"{{$supplier['extra_fee']['hk']['max'] or ''}}"
lay-verify=
"num"
value=
""
>
</div>
<div
class=
"layui-form-label"
style=
"width: 55px;margin-left: -20px"
>
美金,收取
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"hk[price]"
value=
"{{$supplier['extra_fee']['hk']['price'] or ''}}"
lay-verify=
"float"
value=
""
>
</div>
<div
class=
"layui-form-label"
style=
"width: 40px;margin-left: -20px"
>
元运费
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
type=
"checkbox"
title=
"全渠道收费"
lay-skin=
"primary"
lay-filter=
"hk_filter"
>
</div>
</div>
</div>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
采购价格系数调整
</b>
</blockquote>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
人民币系数
</label>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<input
type=
"text"
name=
"cn_ratio"
value=
"{{$supplier['cn_ratio'] or 1}}"
placeholder=
"请输入人民币系数"
autocomplete=
"off"
class=
"layui-input"
style=
"display: inline-block"
>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
美金系数
</label>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<input
type=
"text"
name=
"us_ratio"
value=
"{{$supplier['us_ratio'] or 1}}"
placeholder=
"请输入采购附加费"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
基数为1,如利润为10%,请填写1.1
</div>
</div>
</div>
</div>
</div>
<blockquote
class=
"layui-elem-quote layui-text"
>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
采购价格系数调整
</b>
<b>
货期调整
</b>
</blockquote>
</blockquote>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
人民币系数
</label>
<label
class=
"layui-form-label"
>
大陆交期
</label>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<input
type=
"text"
name=
"cn_ratio"
value=
"{{$supplier['cn_ratio'] or 1}}"
<input
type=
"text"
name=
"cn_delivery_time"
value=
"{{$supplier['cn_delivery_time'] or 1}}"
placeholder=
"请输入人民币系数"
autocomplete=
"off"
class=
"layui-input"
autocomplete=
"off"
class=
"layui-input"
>
style=
"display: inline-block"
>
</div>
</div>
</div>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<div
class=
"layui-inline"
>
<select
name=
"cn_delivery_time_period"
>
<label
class=
"layui-form-label"
>
美金系数
</label>
<option
value=
"天"
@
if
($
supplier
['
cn_delivery_time_period
']
==
'天')
selected
@
endif
>
天
</option>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<option
value=
"周"
@
if
($
supplier
['
cn_delivery_time_period
']
==
'周')
selected
@
endif
>
周
</option>
<input
type=
"text"
name=
"us_ratio"
value=
"{{$supplier['us_ratio'] or 1}}"
</select>
placeholder=
"请输入采购附加费"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
基数为1,如利润为10%,请填写1.1
</div>
</div>
</div>
</div>
</div>
<div
class=
"layui-inline"
>
<blockquote
class=
"layui-elem-quote layui-text"
>
<label
class=
"layui-form-label"
>
香港交期
</label>
<b>
货期调整
</b>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
</blockquote>
<input
type=
"text"
name=
"us_delivery_time"
value=
"{{$supplier['us_delivery_time'] or 1}}"
<div
class=
"layui-form-item"
>
autocomplete=
"off"
class=
"layui-input"
>
<div
class=
"layui-inline"
>
</div>
<label
class=
"layui-form-label"
>
大陆交期
</label>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<select
name=
"us_delivery_time_period"
>
<input
type=
"text"
name=
"cn_delivery_time"
value=
"{{$supplier['cn_delivery_time'] or 1}}"
<option
value=
"天"
@
if
($
supplier
['
us_delivery_time_period
']
==
'天')
selected
@
endif
>
天
</option>
autocomplete=
"off"
class=
"layui-input"
>
<option
value=
"周"
@
if
($
supplier
['
us_delivery_time_period
']
==
'周')
selected
@
endif
>
周
</option>
</div>
</select>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<select
name=
"cn_delivery_time_period"
>
<option
value=
"天"
@
if
($
supplier
['
cn_delivery_time_period
']
==
'天')
selected
@
endif
>
天
</option>
<option
value=
"周"
@
if
($
supplier
['
cn_delivery_time_period
']
==
'周')
selected
@
endif
>
周
</option>
</select>
</div>
</div>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
<div
class=
"layui-inline"
>
单位为工作日,周。格式2-6工作日,1-2周
<label
class=
"layui-form-label"
>
香港交期
</label>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<input
type=
"text"
name=
"us_delivery_time"
value=
"{{$supplier['us_delivery_time'] or 1}}"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<div
class=
"layui-input-inline"
style=
"width: 50px"
>
<select
name=
"us_delivery_time_period"
>
<option
value=
"天"
@
if
($
supplier
['
us_delivery_time_period
']
==
'天')
selected
@
endif
>
天
</option>
<option
value=
"周"
@
if
($
supplier
['
us_delivery_time_period
']
==
'周')
selected
@
endif
>
周
</option>
</select>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
单位为工作日,周。格式2-6工作日,1-2周
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script
type=
"text/html"
id=
"shippingCostOperate"
>
<
button
class
=
"layui-btn layui-btn-xs"
type
=
"button"
lay
-
event
=
"edit"
>
查看
<
/button
>
<
button
class
=
"layui-btn layui-btn-xs layui-btn-danger"
type
=
"button"
lay
-
event
=
"delete"
>
删除
<
/button
>
</script>
<script
type=
"text/html"
id=
"operate"
>
<
button
class
=
"layui-btn layui-btn-xs"
type
=
"button"
lay
-
event
=
"edit"
>
查看
<
/button
>
<
button
class
=
"layui-btn layui-btn-xs layui-btn-danger"
type
=
"button"
lay
-
event
=
"delete"
>
删除
<
/button
>
</script>
@include('script.supplier.SupplierRulerScript')
@include('script.supplier.SupplierRulerScript')
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment