Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
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
0c0aa129
authored
Apr 26, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
审单添加终端信息
parent
b0aca936
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
196 additions
and
34 deletions
app/Http/Controllers/OrderController.php
public/js/add_order.js
public/js/goods.js
public/js/order.js
resources/views/detail/changeOrder.blade.php
resources/views/detail/content.blade.php
app/Http/Controllers/OrderController.php
View file @
0c0aa129
...
...
@@ -854,6 +854,15 @@ Class OrderController extends Controller
return
redirect
(
'/prompt'
)
->
with
([
'message'
=>
"该订单不符合人工审单条件~【status:
{
$info
[
'order_info'
][
'status'
]
}
】"
,
'url'
=>
$redirect
,
'jumpTime'
=>
3
,
'status'
=>
false
]);
}
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$url
=
Config
(
'website.api_domain'
)
.
'cart/getDJKConfg'
;
$res
=
json_decode
(
curlApi
(
$url
,
$data
,
"POST"
),
true
);
$info
[
'api_dgk_config'
]
=
$res
[
'data'
][
'data'
];
$info
[
'api_dgk_config_one'
]
=
array_keys
(
$res
[
'data'
][
'data'
]);
// 一级分类
return
view
(
'detail'
,
$info
);
}
...
...
@@ -916,29 +925,35 @@ Class OrderController extends Controller
$client_source
=
$request
->
input
(
'client_source'
)
==
1
?
$request
->
input
(
'input-other-source'
)
:
$request
->
input
(
'client_source'
);
$resData
=
[
"user_id"
=>
$request
->
input
(
'user_id'
,
''
),
"cancel_reason"
=>
$request
->
input
(
'cancel_reason'
,
''
),
"sale_id"
=>
$request
->
input
(
'sale_id'
,
''
),
"order_pay_type"
=>
$request
->
input
(
'order_pay_type'
,
''
)
?
$request
->
input
(
'order_pay_type'
)
:
1
,
"status"
=>
$request
->
input
(
'order_status'
,
''
)
?
$request
->
input
(
'order_status'
)
:
2
,
"deposit_amount"
=>
$request
->
input
(
'deposit_amount'
,
''
),
"goods_amount"
=>
$request
->
input
(
'goods_amount'
,
''
),
"order_amount"
=>
$request
->
input
(
'order_amount'
,
''
),
"extra_fee"
=>
$request
->
input
(
'extra_fee'
,
''
),
"change_info"
=>
$request
->
input
(
'change_info'
,
''
),
"pay_time_limit"
=>
$pay_time_limit
,
"check_failed"
=>
$request
->
input
(
'check_failed'
,
''
),
"check_failed_info"
=>
$request
->
input
(
'check_failed_info'
,
''
),
"change_pay_type"
=>
$request
->
input
(
'change_pay_type'
,
''
),
"order_id"
=>
$order_id
,
'operator_id'
=>
$request
->
user
->
userId
,
"pf"
=>
1
,
"k1"
=>
$check
[
'k1'
],
"k2"
=>
$check
[
'k2'
],
"client_source"
=>
$client_source
,
"change_extend_fee"
=>
$request
->
input
(
'change_extend_fee'
,
''
),
"kefu_remark"
=>
$request
->
input
(
'kefu_remark'
,
''
),
// 客服备注
"freight_fee"
=>
$request
->
input
(
'freight_fee'
,
''
),
// 运费
"user_id"
=>
$request
->
input
(
'user_id'
,
''
),
"cancel_reason"
=>
$request
->
input
(
'cancel_reason'
,
''
),
"sale_id"
=>
$request
->
input
(
'sale_id'
,
''
),
"order_pay_type"
=>
$request
->
input
(
'order_pay_type'
,
''
)
?
$request
->
input
(
'order_pay_type'
)
:
1
,
"status"
=>
$request
->
input
(
'order_status'
,
''
)
?
$request
->
input
(
'order_status'
)
:
2
,
"deposit_amount"
=>
$request
->
input
(
'deposit_amount'
,
''
),
"goods_amount"
=>
$request
->
input
(
'goods_amount'
,
''
),
"order_amount"
=>
$request
->
input
(
'order_amount'
,
''
),
"extra_fee"
=>
$request
->
input
(
'extra_fee'
,
''
),
"change_info"
=>
$request
->
input
(
'change_info'
,
''
),
"pay_time_limit"
=>
$pay_time_limit
,
"check_failed"
=>
$request
->
input
(
'check_failed'
,
''
),
"check_failed_info"
=>
$request
->
input
(
'check_failed_info'
,
''
),
"change_pay_type"
=>
$request
->
input
(
'change_pay_type'
,
''
),
"order_id"
=>
$order_id
,
'operator_id'
=>
$request
->
user
->
userId
,
"pf"
=>
1
,
"k1"
=>
$check
[
'k1'
],
"k2"
=>
$check
[
'k2'
],
"client_source"
=>
$client_source
,
"change_extend_fee"
=>
$request
->
input
(
'change_extend_fee'
,
''
),
"kefu_remark"
=>
$request
->
input
(
'kefu_remark'
,
''
),
// 客服备注
"freight_fee"
=>
$request
->
input
(
'freight_fee'
,
''
),
// 运费
"customer_id"
=>
$request
->
input
(
'customer_id'
,
''
),
// 终端客户信息 ID
"customer_cn"
=>
$request
->
input
(
'customer_cn'
,
''
),
// 终端客户信息 中文
"customer_en"
=>
$request
->
input
(
'customer_en'
,
''
),
// 终端客户信息 英文
"customer_type"
=>
$request
->
input
(
'customer_type'
,
''
),
// 终端客户信息 客户类型
"product_use_classone_sn"
=>
$request
->
input
(
'product_use_classone_sn'
,
''
),
// 终端客户信息 一级分类
"product_use_classtwo_sn"
=>
$request
->
input
(
'product_use_classtwo_sn'
,
''
),
// 终端客户信息 二级分类
];
// dd(curlApi($url, $resData, "POST"));
$temp
=
json_decode
(
curlApi
(
$url
,
$resData
,
"POST"
),
true
);
...
...
@@ -1590,6 +1605,18 @@ Class OrderController extends Controller
$response
=
array_merge
(
$response
,
$info
);
$is_dgk_exists
=
false
;
// 检查明细中是否存在digikey商品
foreach
(
$response
[
'order_items_info'
]
as
$v
)
{
if
(
$v
[
'supplier_id'
]
==
7
||
strtolower
(
$v
[
'supplier_name'
])
==
'digikey'
)
{
$is_dgk_exists
=
true
;
}
continue
;
}
$response
[
'is_dgk_exists'
]
=
$is_dgk_exists
;
// 获取数组中的采购人id的名字
$this
->
getBuyerName
(
$response
);
...
...
public/js/add_order.js
View file @
0c0aa129
...
...
@@ -736,7 +736,7 @@
return
false
;
}
var
en_reg
=
/^
[
a-zA-Z0-9
\.\s\,]
+$/
;
var
en_reg
=
/^
[
a-zA-Z0-9
\.\s\,
\(\)
]
+$/
;
if
(
!
en_reg
.
test
(
customer_en
)){
layer
.
msg
(
'请填写全英文名称'
);
return
false
;
...
...
public/js/goods.js
View file @
0c0aa129
...
...
@@ -91,9 +91,9 @@
var
val
=
$
(
this
).
val
();
if
(
val
.
toLowerCase
()
==
'digikey'
)
{
layer
.
tips
(
'暂不能添加digikey商品'
,
$
(
this
));
// 临时添加
$
(
this
).
val
(
''
);
return
false
;
//
layer.tips('暂不能添加digikey商品', $(this)); // 临时添加
//
$(this).val('');
//
return false;
$
(
'.skuid-info'
).
css
(
'display'
,
'block'
);
$
(
'.layui-layer-iframe .layui-layer-btn, .layui-layer-page .layui-layer-btn'
).
css
(
'padding-top'
,
'50px'
);
...
...
@@ -248,11 +248,11 @@
var
status_val
=
''
;
// 临时添加,限制新增digikey商品
if
(
data
.
supplier_id
==
7
)
{
layer
.
msg
(
'暂不能添加digikey商品'
);
$
(
'.search-sku'
).
val
(
''
);
return
false
;
}
//
if (data.supplier_id == 7) {
//
layer.msg('暂不能添加digikey商品');
//
$('.search-sku').val('');
//
return false;
//
}
$
(
'.sku-info'
).
show
();
...
...
public/js/order.js
View file @
0c0aa129
...
...
@@ -1979,6 +1979,41 @@
var
order_goods_type
=
$
(
'input[name=order_goods_type]'
).
val
();
var
order_id
=
$
(
'input[name=order_id]'
).
val
();
var
business_type
=
$
(
'input[name=business_type]'
).
val
();
// 若存在digikey商品,终端客户信息必填 2020-4-26
if
(
is_dgk_exists
)
{
var
customer_cn
=
$
(
'.customer_cn'
).
val
();
var
customer_en
=
$
(
'.customer_en'
).
val
();
var
customer_type
=
$
(
'.customer_type'
).
val
();
var
product_use_classone_sn
=
$
(
'.product_use_classone_sn'
).
val
();
var
product_use_classtwo_sn
=
$
(
'.product_use_classtwo_sn'
).
val
();
if
(
!
customer_cn
)
{
layer
.
msg
(
'请填写终端中文名称'
);
return
false
;
}
if
(
!
customer_en
)
{
layer
.
msg
(
'请填写终端英文名称'
);
return
false
;
}
var
en_reg
=
/^
[
a-zA-Z0-9
\.\s\,\(\)]
+$/
;
if
(
!
en_reg
.
test
(
customer_en
)){
layer
.
msg
(
'请填写全英文名称'
);
return
false
;
}
if
(
customer_type
==
''
)
{
layer
.
msg
(
'请选择客户类型'
);
return
false
;
}
if
(
product_use_classone_sn
==
''
)
{
layer
.
msg
(
'请选择产品用途一级分类'
);
return
false
;
}
}
// 联营订单需要先指派业务员
if
(
order_goods_type
==
1
&&
sale_id
==
0
)
{
...
...
resources/views/detail/changeOrder.blade.php
View file @
0c0aa129
...
...
@@ -49,6 +49,71 @@
</tr>
</table>
@endif
<!-- 存在digikey商品的时候展示 -->
@if ($is_dgk_exists)
<style>
#checkOrderForm
.row
{
margin-left
:
0px
!important
;
margin-right
:
0px
!important
;
}
#checkOrderForm
.form-group
{
margin-left
:
0px
!important
;
}
.change-order-end-client
input
{
width
:
300px
;
}
.change-order-end-client
select
{
width
:
200px
;
}
</style>
<div
class=
"change-order-end-client"
>
<h4>
终端客户信息
<span
class=
"title-tips"
><i
class=
"fa fa-info-circle"
></i>
digikey渠道商品必填,其他渠道可不填写
</span></h4>
<input
type=
"hidden"
class=
"customer_id"
name=
"customer_id"
value=
"{{ $order_extra ? $order_extra['id'] : '' }}"
>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<div
class=
"form-group"
>
<span><i
class=
"text-danger"
>
*
</i>
终端中文名称:
</span>
<input
type=
"text"
class=
"customer_cn"
name=
"customer_cn"
value=
"{{ $order_extra ? $order_extra['customer_cn'] : '' }}"
>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"form-group"
>
<span><i
class=
"text-danger"
>
*
</i>
客户类型:
</span>
<select
class=
"layui-select customer_type"
name=
"customer_type"
>
<option
value=
""
>
请选择
</option>
@if (Config('params.end_user_type'))
@foreach (Config('params.end_user_type') as $k => $v)
<option
value=
"{{ $k }}"
>
{{ $v }}
</option>
@endforeach
@endif
</select>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<div
class=
"form-group"
>
<span><i
class=
"text-danger"
>
*
</i>
终端英文名称:
</span>
<input
type=
"text"
class=
"customer_en"
name=
"customer_en"
value=
"{{ $order_extra ? $order_extra['customer_en'] : '' }}"
>
<a
href=
"https://translate.google.cn/"
target=
"_blank"
>
谷歌翻译
</a>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"form-group"
>
<span><i
class=
"text-danger"
>
*
</i>
产品用途:
</span>
<select
class=
"layui-select product_use_classone_sn"
name=
"product_use_classone_sn"
>
<option
value=
""
>
请选择
</option>
@if ($api_dgk_config_one)
@foreach ($api_dgk_config_one as $k=>$v)
<option
value=
"{{ $k }}"
>
{{ $v }}
</option>
@endforeach
@endif
</select>
<select
class=
"layui-select product_use_classtwo_sn"
name=
"product_use_classtwo_sn"
></select>
</div>
</div>
</div>
</div>
<hr/>
@endif
<!-- 审核 -->
@if ($order_info['order_goods_type'] == 1)
...
...
@@ -75,7 +140,6 @@
</tr>
</table>
<hr/>
@else
<table
class=
"table table-bordered table-hover check-table"
>
<tr>
...
...
@@ -624,4 +688,39 @@
}
});
})
// dgk 终端客户信息
var
is_dgk_exists
=
"{{ $is_dgk_exists }}"
;
if
(
is_dgk_exists
)
{
var
api_dgk_config
=
eval
(
'('
+
'{!! isset($api_dgk_config) ? json_encode($api_dgk_config) : '' !!}'
+
')'
);
var
customer_type
=
"{{ $order_extra ? $order_extra['customer_type'] : 0 }}"
;
var
product_use_classone_sn
=
"{{ $order_extra ? $order_extra['product_use_classone_sn'] : '' }}"
;
var
product_use_classtwo_sn
=
"{{ $order_extra ? $order_extra['product_use_classtwo_sn'] : '' }}"
;
$
(
'.order-change-main'
).
delegate
(
'.product_use_classone_sn'
,
'change'
,
function
(
data
){
var
select_key
=
$
(
'.product_use_classone_sn'
).
find
(
'option:selected'
).
text
();
$
(
'.product_use_classtwo_sn'
).
html
(
''
);
for
(
let
key
in
api_dgk_config
){
if
(
key
==
select_key
){
for
(
var
i
=
0
;
i
<
api_dgk_config
[
key
].
length
;
i
++
){
$
(
'.product_use_classtwo_sn'
).
append
(
'
<
option
value
=
"'+i+'"
>
'+api_dgk_config[key][i]+'
<
/option>'
)
}
}
}
})
// select 赋值
if
(
customer_type
)
{
$
(
'select[name=customer_type]'
).
val
(
customer_type
);
}
if
(
product_use_classone_sn
)
{
$
(
'select[name=product_use_classone_sn]'
).
val
(
product_use_classone_sn
);
$
(
'select[name=product_use_classone_sn]'
).
change
();
// 添加change事件
$
(
'select[name=product_use_classtwo_sn]'
).
val
(
product_use_classtwo_sn
);
}
}
</script>
\ No newline at end of file
resources/views/detail/content.blade.php
View file @
0c0aa129
...
...
@@ -453,7 +453,7 @@
@endif
<!-- 终端客户信息 -->
@if ($order_extra)
@if ($order_extra
&&
$action_name == 'details'
)
<table
class=
"table table-bordered table-hover"
>
<tr
class=
"caption"
>
<th
colspan=
"4"
style=
"text-align: center; background: #f9f9f9;"
>
...
...
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