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
99cb6cda
authored
Mar 19, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_com_20210302'
parents
8678f987
44f4bed0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
136 additions
and
59 deletions
app/Http/Controllers/AddOrderController.php
app/Model/CmsModel.php
public/js/add_order.js
resources/views/addOrder/content.blade.php
resources/views/detail/order_service.blade.php
app/Http/Controllers/AddOrderController.php
View file @
99cb6cda
...
...
@@ -78,6 +78,7 @@ Class AddOrderController extends Controller
$url
=
Config
(
'website.api_domain'
)
.
'cart/getDJKConfg'
;
$info
[
'api_dgk_url'
]
=
(
$url
.
'?k1='
.
$data
[
'k1'
]
.
"&"
.
'k2='
.
$data
[
'k2'
]);
$info
[
'company'
]
=
(
new
CmsModel
())
->
getCompany
();
// 获取公司组织
return
view
(
'addOrder'
,
$info
);
}
...
...
@@ -552,6 +553,8 @@ Class AddOrderController extends Controller
$data
[
'cart_id'
]
=
implode
(
','
,
$request
->
input
(
'cart_ids'
));
$data
[
'type'
]
=
$request
->
input
(
'type'
);
$data
[
'remark'
]
=
$request
->
input
(
'remark'
);
$data
[
'com_id'
]
=
$request
->
input
(
'com_id'
,
0
);
$data
[
'com_name'
]
=
$request
->
input
(
'com_name'
,
''
);
if
(
$data
[
'type'
]
==
3
)
{
// 自营线下订单
$data
[
'address_name'
]
=
$request
->
input
(
'address_name'
);
...
...
app/Model/CmsModel.php
View file @
99cb6cda
<?php
namespace
App\Model
;
use
Illuminate\Database\Eloquent\Model
;
use
Request
;
use
Excel
;
use
DB
;
class
CmsModel
extends
Model
{
protected
$table
=
'user_info'
;
protected
$primaryKey
=
'userId'
;
public
$timestamps
=
false
;
// 获取用户名称
public
function
getUserName
(
$userId
,
$field
=
'name'
)
{
$user
=
$this
->
where
([
'userId'
=>
$userId
])
->
select
(
$field
)
->
first
();
return
$user
?
$user
->
$field
:
''
;
}
// 获取用户ID
public
function
getSaleId
(
$name
=
''
)
{
if
(
!
$name
)
return
false
;
$name
&&
$map
[
'name'
]
=
$name
;
$user
=
$this
->
where
(
$map
)
->
select
(
'userId'
)
->
first
();
return
$user
?
$user
->
userId
:
0
;
}
/*
查询cms系统用户信息
*/
public
function
getUserInfo
(
$where
){
return
$this
->
where
(
$where
)
->
select
(
'userId'
)
->
first
();
}
/*
批量查询用户姓名
*/
public
function
getBatchUserName
(
$user_ids
){
return
$this
->
whereIn
(
'userId'
,
$user_ids
)
->
select
(
'userId'
,
'name'
,
'email'
)
->
get
()
->
toArray
();
}
<?php
namespace
App\Model
;
use
Illuminate\Database\Eloquent\Model
;
use
Request
;
use
Excel
;
use
DB
;
class
CmsModel
extends
Model
{
protected
$table
=
'user_info'
;
protected
$primaryKey
=
'userId'
;
public
$timestamps
=
false
;
// 获取用户名称
public
function
getUserName
(
$userId
,
$field
=
'name'
)
{
$user
=
$this
->
where
([
'userId'
=>
$userId
])
->
select
(
$field
)
->
first
();
return
$user
?
$user
->
$field
:
''
;
}
// 获取用户ID
public
function
getSaleId
(
$name
=
''
)
{
if
(
!
$name
)
return
false
;
$name
&&
$map
[
'name'
]
=
$name
;
$user
=
$this
->
where
(
$map
)
->
select
(
'userId'
)
->
first
();
return
$user
?
$user
->
userId
:
0
;
}
/*
查询cms系统用户信息
*/
public
function
getUserInfo
(
$where
){
return
$this
->
where
(
$where
)
->
select
(
'userId'
)
->
first
();
}
/*
批量查询用户姓名
*/
public
function
getBatchUserName
(
$user_ids
)
{
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 @
99cb6cda
...
...
@@ -427,7 +427,8 @@
}
// if (goods_type == 1) { // 联营需要选择交货地
delivery_place
=
$
(
'input[name=delivery_place]:checked'
).
val
();
// delivery_place = $('input[name=delivery_place]:checked').val();
delivery_place
=
$
(
'.delivery_place'
).
val
();
if
(
delivery_place
==
null
)
{
layer
.
msg
(
'请选择交货地'
);
...
...
@@ -481,14 +482,44 @@
})
})
// 切换交货地
$
(
'.delivery_place'
).
click
(
function
()
{
var
user_id
=
$
(
'.user_id'
).
val
();
var
delivery_place
=
$
(
this
).
val
();
// 选择销售组织
$
(
'.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');
$
(
'.delivery_place'
).
val
(
delivery_place
);
$
(
'.currency-sign'
).
text
(
currency_sign
);
$
(
'.currency-section'
).
show
();
var
user_id
=
$
(
'.user_id'
).
val
();
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
()
{
var
self
=
$
(
this
);
...
...
@@ -818,6 +849,17 @@
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
.
user_coupon_id
=
user_coupon_id
;
datax
.
zy_delivery_type
=
zy_delivery_type
;
...
...
resources/views/addOrder/content.blade.php
View file @
99cb6cda
...
...
@@ -241,15 +241,40 @@
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<div
class=
"form-group"
>
<span><i
class=
"text-danger"
>
*
</i>
销售组织:
</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
class=
"form-group"
>
<span>
交货地址:
</span>
<select
name=
"delivery_place"
class=
"delivery_place"
disabled
>
<option
value=
"1"
>
大陆
</option>
<option
value=
"2"
>
香港
</option>
</select>
</div>
</div>
<!-- <div class="col-sm-6">
<div class="form-group">
<span>交货地址:</span>
<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"
disabled="disabled"
> 大陆
</label>
<label class="radio-inline">
<input
type=
"radio"
name=
"delivery_place"
class=
"delivery_place"
value=
"2"
>
香港
<input type="radio" name="delivery_place" class="delivery_place" value="2"
disabled="disabled"
> 香港
</label>
</div>
</div>
</div>
-->
</div>
</div>
...
...
resources/views/detail/order_service.blade.php
View file @
99cb6cda
...
...
@@ -136,7 +136,7 @@
<!-- 目前仅支持联营商品退款 -->
<?php
$goods_count
=
0
;
?>
@foreach ($order_items_info as $k => $v)
@if ($v['order_goods_type'] == 1)
@if ($v['order_goods_type'] == 1
&&
$v['status'] == 1
)
<?php
$goods_count
++
;
?>
<tr>
<input
type=
"hidden"
name=
"service_item[{{ $v['rec_id'] }}][rec_id]"
value=
"{{ $v['rec_id'] }}"
>
...
...
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