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
00d0f598
authored
Aug 17, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整联营下单dgk终端信息
parent
5d370327
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
31 deletions
app/Http/Controllers/AddOrderController.php
public/js/add_order.js
resources/views/addOrder/content.blade.php
app/Http/Controllers/AddOrderController.php
View file @
00d0f598
...
...
@@ -212,6 +212,18 @@ Class AddOrderController extends Controller
$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
->
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 +568,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
)
{
...
...
public/js/add_order.js
View file @
00d0f598
...
...
@@ -240,6 +240,26 @@
}
$
(
'.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
);
if
(
data
.
customer_en
&&
data
.
product_use_classone_sn
&&
data
.
product_use_classtwo_sn
&&
data
.
customer_website
)
{
// 信息都存在的话,客户类型为终端
$
(
'.customer_type'
).
val
(
1
);
}
$
(
'.customer_en'
).
val
(
data
.
customer_en
);
$
(
'.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
{
layer
.
msg
(
'购物车中存在digikey商品,请选择增值税普票或专票'
);
}
}
}
}
})
...
...
@@ -729,38 +749,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_cn
)
{
layer
.
msg
(
'请填写终端中文名称'
);
return
false
;
}
// if (!customer_en
) {
// layer.msg('请填写终端英文名称
');
//
return false;
//
}
if
(
customer_type
==
''
)
{
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
==
1
)
{
// 若客户类型为终端,则外文名称,产品用途和网址为必填
if
(
!
customer_en
)
{
layer
.
msg
(
'请填写终端
英文名称'
);
return
false
;
}
// if (customer_type == '') {
// layer.msg('请选择客户类型');
// return false;
// }
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
(
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
;
...
...
@@ -1054,6 +1083,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 @
00d0f598
...
...
@@ -228,21 +228,29 @@
</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"
>
<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)
...
...
@@ -253,24 +261,40 @@
</div>
</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=
""
>
<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"
>
<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>
...
...
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