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
8480e942
authored
Aug 29, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
merge
parents
b585cc1e
be9a9476
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
142 additions
and
56 deletions
app/Http/Controllers/AddOrderController.php
app/Http/Controllers/OrderController.php
public/js/add_order.js
resources/views/addOrder/content.blade.php
resources/views/changeOrder/content.blade.php
app/Http/Controllers/AddOrderController.php
View file @
8480e942
...
...
@@ -193,7 +193,7 @@ Class AddOrderController extends Controller
$address
=
DB
::
connection
(
'order'
)
->
table
(
'lie_user_address'
)
->
where
(
'address_id'
,
$address_id
)
->
first
();
$address
->
province_val
=
$this
->
getAddress
(
$address
->
province
);
$address
->
city_val
=
$this
->
getAddress
(
$address
->
city
);
$address
->
city_val
=
$this
->
getAddress
(
$address
->
city
);
$address
->
district_val
=
$this
->
getAddress
(
$address
->
district
);
return
[
'errcode'
=>
0
,
'errmsg'
=>
''
,
'data'
=>
$address
];
...
...
@@ -209,9 +209,22 @@ Class AddOrderController extends Controller
$invoice
=
DB
::
connection
(
'order'
)
->
table
(
'lie_taxinfo'
)
->
where
(
'tax_id'
,
$tax_id
)
->
first
();
$invoice
->
province_val
=
$invoice
->
consignee_province
?
$this
->
getAddress
(
$invoice
->
consignee_province
)
:
''
;
$invoice
->
city_val
=
$invoice
->
consignee_city
?
$this
->
getAddress
(
$invoice
->
consignee_city
)
:
''
;
$invoice
->
city_val
=
$invoice
->
consignee_city
?
$this
->
getAddress
(
$invoice
->
consignee_city
)
:
''
;
$invoice
->
district_val
=
$invoice
->
consignee_district
?
$this
->
getAddress
(
$invoice
->
consignee_district
)
:
''
;
// 发票公司信息
if
(
in_array
(
$invoice
->
inv_type
,
[
3
,
4
]))
{
$company_info
=
DB
::
connection
(
'order'
)
->
table
(
'lie_invoice_company'
)
->
where
(
'com_name'
,
$invoice
->
tax_title
)
->
first
();
if
(
$company_info
)
{
$invoice
->
customer_en
=
$company_info
->
customer_en
;
$invoice
->
customer_type
=
$company_info
->
customer_type
;
$invoice
->
product_use_classone_sn
=
$company_info
->
product_use_classone_sn
;
$invoice
->
product_use_classtwo_sn
=
$company_info
->
product_use_classtwo_sn
;
$invoice
->
customer_website
=
$company_info
->
customer_website
;
}
}
return
[
'errcode'
=>
0
,
'errmsg'
=>
''
,
'data'
=>
$invoice
];
}
}
...
...
@@ -556,6 +569,7 @@ Class AddOrderController extends Controller
$data
[
'customer_type'
]
=
$request
->
input
(
'customer_type'
,
''
);
$data
[
'product_use_classone_sn'
]
=
$request
->
input
(
'product_use_classone_sn'
,
''
);
$data
[
'product_use_classtwo_sn'
]
=
$request
->
input
(
'product_use_classtwo_sn'
,
''
);
$data
[
'customer_website'
]
=
$request
->
input
(
'customer_website'
,
''
);
}
if
(
$data
[
'type'
]
==
4
)
{
...
...
app/Http/Controllers/OrderController.php
View file @
8480e942
...
...
@@ -885,6 +885,7 @@ Class OrderController extends Controller
"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'
,
''
),
// 终端客户信息 二级分类
"customer_website"
=>
$request
->
input
(
'customer_website'
,
''
),
// 终端客户信息 客户网址
];
$is_temp_save
=
$request
->
input
(
'is_temp_save'
,
''
);
...
...
public/js/add_order.js
View file @
8480e942
...
...
@@ -240,6 +240,28 @@
}
$
(
'.inv_type'
).
text
(
inv_type_val
);
// 若购物车存在Digikey商品,选择增值税普票或专票后,默认将发票抬头赋值给终端信息(中文名称),且不能更改
if
(
$
(
'.client-info'
).
css
(
'display'
)
==
'block'
)
{
if
(
data
.
inv_type
==
3
||
data
.
inv_type
==
4
)
{
$
(
'.customer_cn'
).
val
(
data
.
tax_title
);
$
(
'.customer_en'
).
val
(
data
.
customer_en
);
$
(
'.customer_type'
).
val
(
data
.
customer_type
);
$
(
'.product_use_classone_sn'
).
val
(
data
.
product_use_classone_sn
);
$
(
'.product_use_classone_sn'
).
change
();
// 添加change事件
$
(
'.product_use_classtwo_sn'
).
val
(
data
.
product_use_classtwo_sn
);
$
(
'.customer_website'
).
val
(
data
.
customer_website
);
}
else
{
$
(
'.customer_cn'
).
val
(
''
);
$
(
'.customer_en'
).
val
(
''
);
$
(
'.customer_type'
).
val
(
''
);
$
(
'.product_use_classone_sn'
).
val
(
''
);
$
(
'.product_use_classone_sn'
).
change
();
$
(
'.customer_website'
).
val
(
''
);
layer
.
msg
(
'购物车中存在digikey商品,请选择增值税普票或专票'
);
}
}
}
}
})
...
...
@@ -729,38 +751,47 @@
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
();
var
customer_website
=
$
(
'.customer_website'
).
val
();
if
(
!
customer_cn
)
{
layer
.
msg
(
'请填写终端中文名称'
);
return
false
;
}
if
(
customer_type
==
''
)
{
layer
.
msg
(
'请选择客户类型'
);
return
false
;
}
if
(
customer_type
==
1
)
{
// 若客户类型为终端,则外文名称,产品用途和网址为必填
if
(
!
customer_en
)
{
layer
.
msg
(
'请填写终端英文名称'
);
return
false
;
}
// 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;
// }
datax
.
customer_cn
=
customer_cn
;
datax
.
customer_en
=
customer_en
;
datax
.
customer_type
=
customer_type
;
var
en_reg
=
/^
[
a-zA-Z0-9
\.\s\,\(\)]
+$/
;
if
(
!
en_reg
.
test
(
customer_en
)){
layer
.
msg
(
'请填写全英文名称'
);
return
false
;
}
if
(
product_use_classone_sn
==
''
)
{
layer
.
msg
(
'请选择产品用途一级分类'
);
return
false
;
}
if
(
!
customer_website
)
{
layer
.
msg
(
'请填写客户网址'
);
return
false
;
}
}
datax
.
customer_cn
=
customer_cn
;
datax
.
customer_en
=
customer_en
;
datax
.
customer_type
=
customer_type
;
datax
.
product_use_classone_sn
=
product_use_classone_sn
;
datax
.
product_use_classtwo_sn
=
product_use_classtwo_sn
;
datax
.
customer_website
=
customer_website
;
}
datax
.
tax_id
=
tax_id
;
...
...
@@ -831,11 +862,13 @@
layer
.
alert
(
'该用户已进入公司黑名单,具体请联系吴承义,同时订单无法提交'
);
return
false
;
}
else
if
(
resp
.
errcode
==
21030
)
{
layer
.
alert
(
resp
.
errmsg
);
var
delivery_place
=
$
(
'.delivery_place'
).
val
();
layer
.
alert
(
resp
.
errmsg
,
function
()
{
var
delivery_place
=
$
(
'.delivery_place'
).
val
();
loading
.
lists
(
user_id
,
goods_type
,
is_online
,
delivery_place
);
// 加载购物车列表
loading
.
confirm
(
user_id
,
address_id
,
cart_ids
,
user_coupon_id
,
goods_type
,
is_online
);
// 确认订单信息
loading
.
lists
(
user_id
,
goods_type
,
is_online
,
delivery_place
);
// 加载购物车列表
loading
.
confirm
(
user_id
,
address_id
,
cart_ids
,
user_coupon_id
,
goods_type
,
is_online
);
// 确认订单信息
});
return
false
;
}
...
...
@@ -1054,6 +1087,11 @@
if
(
is_dgk
)
{
$
(
'.client-info'
).
css
(
'display'
,
'block'
);
// 若已选择发票,再次触发发票事件,添加终端信息
if
(
$
(
'.tax_id'
).
val
())
{
$
(
'#invoice'
).
trigger
(
'change'
);
}
}
else
{
$
(
'.client-info'
).
css
(
'display'
,
'none'
);
}
...
...
resources/views/addOrder/content.blade.php
View file @
8480e942
...
...
@@ -227,29 +227,38 @@
</div>
</div>
</div>
<div
class=
"client-info"
>
<style>
.client-info
input
{
width
:
300px
;
}
.customer_type
{
width
:
30%
;
}
.product_use_classone_sn
,
.product_use_classtwo_sn
{
float
:
left
;
width
:
30%
;
}
</style>
<div
class=
"client-info form-horizontal"
>
<h4>
终端客户信息
<span
class=
"title-tips"
><i
class=
"fa fa-info-circle"
></i>
digikey渠道商品必填,其他渠道可不填写
</span></h4>
<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=
""
>
<label
class=
"col-sm-2 control-label"
><i
class=
"text-danger"
>
*
</i>
终端中文名称:
</label>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"form-control customer_cn"
name=
"customer_cn"
value=
""
autocomplete=
"off"
disabled=
"disabled"
>
</div>
</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>
<label
class=
"col-sm-2 control-label"
><i
class=
"text-danger"
>
*
</i>
客户类型:
</label>
<div
class=
"col-sm-10"
>
<select
class=
"form-control 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>
...
...
@@ -257,20 +266,35 @@
<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=
""
>
<a
href=
"https://translate.google.cn/"
target=
"_blank"
>
谷歌翻译
</a>
<label
class=
"col-sm-2 control-label"
><i
class=
"text-danger"
>
*
</i>
终端英文名称:
</label>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"customer_en"
name=
"customer_en"
value=
""
autocomplete=
"off"
>
<a
href=
"https://translate.google.cn/"
target=
"_blank"
>
谷歌翻译
</a>
</div>
</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>
</select>
<label
class=
"col-sm-2 control-label"
><i
class=
"text-danger"
>
*
</i>
产品用途:
</label>
<div
class=
"col-sm-10"
>
<select
class=
"form-control product_use_classone_sn"
name=
"product_use_classone_sn"
>
<option
value=
""
>
请选择
</option>
</select>
<select
class=
"layui-select product_use_classtwo_sn"
name=
"product_use_classtwo_sn"
></select>
<select
class=
"form-control product_use_classtwo_sn"
name=
"product_use_classtwo_sn"
></select>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
><i
class=
"text-danger"
>
*
</i>
客户网址:
</label>
<div
class=
"col-sm-10"
>
<input
type=
"text"
class=
"customer_website"
name=
"customer_website"
value=
""
autocomplete=
"off"
>
</div>
</div>
</div>
</div>
...
...
resources/views/changeOrder/content.blade.php
View file @
8480e942
...
...
@@ -117,6 +117,15 @@
</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_website"
name=
"customer_website"
value=
"{{ $order_extra ? $order_extra['customer_website'] : '' }}"
>
</div>
</div>
</div>
</div>
<hr/>
...
...
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