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
16956301
authored
Mar 02, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
下单添加销售组织
parent
f94825ee
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
5 deletions
app/Http/Controllers/AddOrderController.php
app/Model/CmsModel.php
public/js/add_order.js
resources/views/addOrder/content.blade.php
app/Http/Controllers/AddOrderController.php
View file @
16956301
...
@@ -78,6 +78,7 @@ Class AddOrderController extends Controller
...
@@ -78,6 +78,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'cart/getDJKConfg'
;
$url
=
Config
(
'website.api_domain'
)
.
'cart/getDJKConfg'
;
$info
[
'api_dgk_url'
]
=
(
$url
.
'?k1='
.
$data
[
'k1'
]
.
"&"
.
'k2='
.
$data
[
'k2'
]);
$info
[
'api_dgk_url'
]
=
(
$url
.
'?k1='
.
$data
[
'k1'
]
.
"&"
.
'k2='
.
$data
[
'k2'
]);
$info
[
'company'
]
=
(
new
CmsModel
())
->
getCompany
();
// 获取公司组织
return
view
(
'addOrder'
,
$info
);
return
view
(
'addOrder'
,
$info
);
}
}
...
@@ -552,6 +553,8 @@ Class AddOrderController extends Controller
...
@@ -552,6 +553,8 @@ Class AddOrderController extends Controller
$data
[
'cart_id'
]
=
implode
(
','
,
$request
->
input
(
'cart_ids'
));
$data
[
'cart_id'
]
=
implode
(
','
,
$request
->
input
(
'cart_ids'
));
$data
[
'type'
]
=
$request
->
input
(
'type'
);
$data
[
'type'
]
=
$request
->
input
(
'type'
);
$data
[
'remark'
]
=
$request
->
input
(
'remark'
);
$data
[
'remark'
]
=
$request
->
input
(
'remark'
);
$data
[
'com_id'
]
=
$request
->
input
(
'com_id'
,
0
);
$data
[
'com_name'
]
=
$request
->
input
(
'com_name'
,
''
);
if
(
$data
[
'type'
]
==
3
)
{
// 自营线下订单
if
(
$data
[
'type'
]
==
3
)
{
// 自营线下订单
$data
[
'address_name'
]
=
$request
->
input
(
'address_name'
);
$data
[
'address_name'
]
=
$request
->
input
(
'address_name'
);
...
...
app/Model/CmsModel.php
View file @
16956301
...
@@ -43,9 +43,15 @@ class CmsModel extends Model
...
@@ -43,9 +43,15 @@ class CmsModel extends Model
/*
/*
批量查询用户姓名
批量查询用户姓名
*/
*/
public
function
getBatchUserName
(
$user_ids
)
{
public
function
getBatchUserName
(
$user_ids
)
{
return
$this
->
whereIn
(
'userId'
,
$user_ids
)
->
select
(
'userId'
,
'name'
,
'email'
)
->
get
()
->
toArray
();
return
$this
->
whereIn
(
'userId'
,
$user_ids
)
->
select
(
'userId'
,
'name'
,
'email'
)
->
get
()
->
toArray
();
}
}
// 获取后台公司组织
public
function
getCompany
()
{
return
$this
->
from
(
'lie_organization'
)
->
where
(
'status'
,
1
)
->
select
(
'com_name'
,
'com_currency'
,
'id'
)
->
get
()
->
keyBy
(
'id'
)
->
toArray
();
}
}
}
\ No newline at end of file
public/js/add_order.js
View file @
16956301
...
@@ -481,14 +481,43 @@
...
@@ -481,14 +481,43 @@
})
})
})
})
// 切换交货地
// 选择销售组织
$
(
'.delivery_place'
).
click
(
function
()
{
$
(
'.com_id'
).
change
(
function
()
{
var
val
=
$
(
this
).
val
();
if
(
!
val
)
return
false
;
var
currency
=
$
(
this
).
find
(
"option:selected"
).
data
(
'currency'
);
var
currency_sign
=
''
;
var
delivery_place
=
0
;
if
(
currency
==
1
)
{
currency_sign
=
'RMB'
;
delivery_place
=
1
;
}
else
{
currency_sign
=
'USD'
;
delivery_place
=
2
;
}
// $('input[name=delivery_place][value='+delivery_place+']').attr('checked', true);
$
(
'input[name=delivery_place][value='
+
delivery_place
+
']'
).
trigger
(
'click'
);
$
(
'.currency-sign'
).
text
(
currency_sign
);
$
(
'.currency-section'
).
show
();
var
user_id
=
$
(
'.user_id'
).
val
();
var
user_id
=
$
(
'.user_id'
).
val
();
var
delivery_place
=
$
(
this
).
val
();
loading
.
lists
(
user_id
,
goods_type
,
is_online
,
delivery_place
);
// 加载购物车列表
loading
.
lists
(
user_id
,
goods_type
,
is_online
,
delivery_place
);
// 加载购物车列表
})
})
// 切换交货地
// $('.delivery_place').click(function() {
// var user_id = $('.user_id').val();
// var delivery_place = $(this).val();
// loading.lists(user_id, goods_type, is_online, delivery_place); // 加载购物车列表
// })
// 调整商品数量
// 调整商品数量
$
(
'.shop-table'
).
delegate
(
'.goods_num'
,
'blur'
,
function
()
{
$
(
'.shop-table'
).
delegate
(
'.goods_num'
,
'blur'
,
function
()
{
var
self
=
$
(
this
);
var
self
=
$
(
this
);
...
@@ -818,6 +847,17 @@
...
@@ -818,6 +847,17 @@
datax
.
customer_website
=
customer_website
;
datax
.
customer_website
=
customer_website
;
}
}
var
com_id
=
$
(
'.com_id'
).
val
();
// 公司ID
var
com_name
=
$
(
'.com_id'
).
find
(
"option:selected"
).
text
();
// 公司名称
if
(
!
com_id
)
{
layer
.
msg
(
'请选择销售组织'
);
return
false
;
}
datax
.
com_id
=
com_id
;
datax
.
com_name
=
com_name
;
datax
.
tax_id
=
tax_id
;
datax
.
tax_id
=
tax_id
;
datax
.
user_coupon_id
=
user_coupon_id
;
datax
.
user_coupon_id
=
user_coupon_id
;
datax
.
zy_delivery_type
=
zy_delivery_type
;
datax
.
zy_delivery_type
=
zy_delivery_type
;
...
...
resources/views/addOrder/content.blade.php
View file @
16956301
...
@@ -241,6 +241,22 @@
...
@@ -241,6 +241,22 @@
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<div
class=
"col-sm-6"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<span>
销售组织:
</span>
<select
name=
"com_id"
class=
"com_id"
>
<option
value=
""
>
请选择
</option>
@if ($company)
@foreach ($company as $k=>$v)
<option
value=
"{{ $k }}"
data-currency=
"{{ $v['com_currency'] }}"
>
{{ $v['com_name'] }}
</option>
@endforeach
@endif
</select>
<span
class=
"currency-section hide"
>
币别:
<span
class=
"currency-sign"
></span></span>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"form-group"
>
<span>
交货地址:
</span>
<span>
交货地址:
</span>
<label
class=
"radio-inline"
>
<label
class=
"radio-inline"
>
<input
type=
"radio"
name=
"delivery_place"
class=
"delivery_place"
value=
"1"
checked=
"checked"
>
大陆
<input
type=
"radio"
name=
"delivery_place"
class=
"delivery_place"
value=
"1"
checked=
"checked"
>
大陆
...
...
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