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
8d6f7479
authored
Feb 21, 2022
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_order_limit_20220218' into development
parents
1e983f66
04e126d9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
314 additions
and
238 deletions
app/Http/Controllers/AddOrderController.php
app/Model/InvoiceCompanyModel.php
public/js/add_order.js
public/js/change_order.js
resources/views/changeOrder/content.blade.php
app/Http/Controllers/AddOrderController.php
View file @
8d6f7479
...
@@ -259,30 +259,32 @@ Class AddOrderController extends Controller
...
@@ -259,30 +259,32 @@ Class AddOrderController extends Controller
// 选择发票信息
// 选择发票信息
public
function
selectInv
(
Request
$request
)
public
function
selectInv
(
Request
$request
)
{
{
if
(
$request
->
isMethod
(
'post'
))
{
$tax_id
=
$request
->
input
(
'tax_id'
);
$tax_id
=
$request
->
input
(
'tax_id'
);
$invoice
=
TaxInfoModel
::
where
(
'tax_id'
,
$tax_id
)
->
first
();
$invoice
=
TaxInfoModel
::
where
(
'tax_id'
,
$tax_id
)
->
first
();
$invoice
->
province_val
=
$invoice
->
consignee_province
?
$this
->
getAddress
(
$invoice
->
consignee_province
)
:
''
;
$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
)
:
''
;
$invoice
->
district_val
=
$invoice
->
consignee_district
?
$this
->
getAddress
(
$invoice
->
consignee_district
)
:
''
;
// 发票公司信息
// 发票公司信息
if
(
in_array
(
$invoice
->
inv_type
,
[
3
,
4
]))
{
if
(
in_array
(
$invoice
->
inv_type
,
[
3
,
4
]))
{
$company_info
=
InvoiceCompanyModel
::
where
(
'com_name'
,
$invoice
->
tax_title
)
->
first
();
$company_info
=
InvoiceCompanyModel
::
where
(
'com_name'
,
$invoice
->
tax_title
)
->
first
();
if
(
$company_info
)
{
if
(
$company_info
)
{
$invoice
->
customer_en
=
$company_info
->
customer_en
;
if
(
$company_info
[
'company_category'
]
==
3
)
return
[
'errcode'
=>
1
,
'errmsg'
=>
'该客户为黑名单客户,禁止下单!'
]
;
$invoice
->
customer_type
=
$company_info
->
customer_type
;
$invoice
->
product_use_classone_sn
=
$company_info
->
product_use_classone_s
n
;
$invoice
->
customer_en
=
$company_info
->
customer_e
n
;
$invoice
->
product_use_classtwo_sn
=
$company_info
->
product_use_classtwo_sn
;
$invoice
->
customer_type
=
$company_info
->
customer_type
;
$invoice
->
customer_website
=
$company_info
->
customer_website
;
$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
];
if
(
$company_info
[
'company_category'
]
==
4
)
return
[
'errcode'
=>
2
,
'errmsg'
=>
'该客户为实体名单客户,是否继续下单!'
,
'data'
=>
$invoice
];
}
}
}
return
[
'errcode'
=>
0
,
'errmsg'
=>
''
,
'data'
=>
$invoice
];
}
}
// 根据发票类型选择发票信息
// 根据发票类型选择发票信息
...
@@ -702,75 +704,73 @@ Class AddOrderController extends Controller
...
@@ -702,75 +704,73 @@ Class AddOrderController extends Controller
// 提交订单
// 提交订单
public
function
create
(
Request
$request
)
public
function
create
(
Request
$request
)
{
{
if
(
$request
->
isMethod
(
'post'
))
{
$data
[
'type'
]
=
$request
->
input
(
'type'
);
$data
[
'type'
]
=
$request
->
input
(
'type'
);
$data
[
'inv_com_id'
]
=
$request
->
input
(
'inv_com_id'
,
0
);
$data
[
'inv_com_id'
]
=
$request
->
input
(
'inv_com_id'
,
0
);
$data
[
'uid'
]
=
$request
->
input
(
'uid'
);
$data
[
'uid'
]
=
$request
->
input
(
'uid'
);
$data
[
'sale_id'
]
=
$request
->
user
->
userId
;
$data
[
'sale_id'
]
=
$request
->
user
->
userId
;
$data
[
'address_id'
]
=
$request
->
input
(
'address_id'
);
$data
[
'address_id'
]
=
$request
->
input
(
'address_id'
);
$data
[
'cart_id'
]
=
implode
(
','
,
$request
->
input
(
'cart_ids'
));
$data
[
'cart_id'
]
=
implode
(
','
,
$request
->
input
(
'cart_ids'
));
$data
[
'remark'
]
=
$request
->
input
(
'remark'
);
$data
[
'remark'
]
=
$request
->
input
(
'remark'
);
$data
[
'com_id'
]
=
$request
->
input
(
'com_id'
,
0
);
$data
[
'com_id'
]
=
$request
->
input
(
'com_id'
,
0
);
$data
[
'com_name'
]
=
$request
->
input
(
'com_name'
,
''
);
$data
[
'com_name'
]
=
$request
->
input
(
'com_name'
,
''
);
$data
[
'shipping_type'
]
=
$request
->
input
(
'shipping_type'
,
1
);
$data
[
'shipping_type'
]
=
$request
->
input
(
'shipping_type'
,
1
);
$data
[
'self_consignee'
]
=
$request
->
input
(
'self_consignee'
,
''
);
$data
[
'self_consignee'
]
=
$request
->
input
(
'self_consignee'
,
''
);
$data
[
'self_mobile'
]
=
$request
->
input
(
'self_mobile'
,
''
);
$data
[
'self_mobile'
]
=
$request
->
input
(
'self_mobile'
,
''
);
$data
[
'is_free_ship'
]
=
$request
->
input
(
'is_free_ship'
,
''
);
$data
[
'is_free_ship'
]
=
$request
->
input
(
'is_free_ship'
,
''
);
if
(
$data
[
'type'
]
==
3
)
{
// 自营线下订单
if
(
$data
[
'type'
]
==
3
)
{
// 自营线下订单
$data
[
'address_name'
]
=
$request
->
input
(
'address_name'
);
$data
[
'address_name'
]
=
$request
->
input
(
'address_name'
);
$data
[
'address_mobile'
]
=
$request
->
input
(
'address_mobile'
);
$data
[
'address_mobile'
]
=
$request
->
input
(
'address_mobile'
);
}
else
{
// 联营、自营线上订单
}
else
{
// 联营、自营线上订单
$data
[
'role'
]
=
$request
->
input
(
'role'
,
''
);
$data
[
'role'
]
=
$request
->
input
(
'role'
,
''
);
$data
[
'tax_id'
]
=
$request
->
input
(
'tax_id'
);
$data
[
'tax_id'
]
=
$request
->
input
(
'tax_id'
);
$data
[
'user_coupon_id'
]
=
$request
->
input
(
'user_coupon_id'
);
$data
[
'user_coupon_id'
]
=
$request
->
input
(
'user_coupon_id'
);
$data
[
'send_type'
]
=
$request
->
input
(
'zy_delivery_type'
);
// 发货方式
$data
[
'send_type'
]
=
$request
->
input
(
'zy_delivery_type'
);
// 发货方式
if
(
$data
[
'type'
]
==
1
)
{
// 联营
if
(
$data
[
'type'
]
==
1
)
{
// 联营
$data
[
'customer_cn'
]
=
$request
->
input
(
'customer_cn'
,
''
);
$data
[
'customer_cn'
]
=
$request
->
input
(
'customer_cn'
,
''
);
$data
[
'customer_en'
]
=
$request
->
input
(
'customer_en'
,
''
);
$data
[
'customer_en'
]
=
$request
->
input
(
'customer_en'
,
''
);
$data
[
'customer_type'
]
=
$request
->
input
(
'customer_type'
,
''
);
$data
[
'customer_type'
]
=
$request
->
input
(
'customer_type'
,
''
);
$data
[
'product_use_classone_sn'
]
=
$request
->
input
(
'product_use_classone_sn'
,
''
);
$data
[
'product_use_classone_sn'
]
=
$request
->
input
(
'product_use_classone_sn'
,
''
);
$data
[
'product_use_classtwo_sn'
]
=
$request
->
input
(
'product_use_classtwo_sn'
,
''
);
$data
[
'product_use_classtwo_sn'
]
=
$request
->
input
(
'product_use_classtwo_sn'
,
''
);
$data
[
'customer_website'
]
=
$request
->
input
(
'customer_website'
,
''
);
$data
[
'customer_website'
]
=
$request
->
input
(
'customer_website'
,
''
);
}
}
if
(
$data
[
'type'
]
==
4
)
{
if
(
$data
[
'type'
]
==
4
)
{
$data
[
'business_type'
]
=
$request
->
input
(
'business_type'
);
$data
[
'business_type'
]
=
$request
->
input
(
'business_type'
);
}
}
}
}
$data
[
'sale_type'
]
=
$request
->
input
(
'sale_type'
,
''
);
// 自营线上选择销售类型
$data
[
'sale_type'
]
=
$request
->
input
(
'sale_type'
,
''
);
// 自营线上选择销售类型
$data
[
'k1'
]
=
time
();
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$url
=
Config
(
'website.api_domain'
)
.
'order/create'
;
$url
=
Config
(
'website.api_domain'
)
.
'order/create'
;
// dd(curlApi($url, $data));
// dd(curlApi($url, $data));
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
),
true
);
if
(
$response
[
'err_code'
]
!=
0
)
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
]];
if
(
$response
[
'err_code'
]
!=
0
)
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
]];
// 若存在销售报价明细ID,则修改对应报价单状态为已成单
$report_ids
=
$request
->
input
(
'report_ids'
,
''
);
if
(
$report_ids
)
{
// 若存在销售报价明细ID,则修改对应报价单状态为已成单
$ids
=
explode
(
','
,
$report_ids
);
$report_ids
=
$request
->
input
(
'report_ids'
,
''
);
foreach
(
$ids
as
$v
)
{
if
(
$report_ids
)
{
$res
=
DB
::
connection
(
'frq'
)
->
table
(
'inquiry_items_report'
)
->
where
(
'id'
,
$v
)
->
select
(
'quote_id'
,
'inquiry_items_id'
)
->
first
(
);
$ids
=
explode
(
','
,
$report_ids
);
if
(
$res
->
quote_id
)
{
foreach
(
$ids
as
$v
)
{
DB
::
connection
(
'frq'
)
->
table
(
'quote'
)
->
where
(
'id'
,
$res
->
quote_id
)
->
update
([
'status'
=>
4
,
'update_time'
=>
time
()]);
$res
=
DB
::
connection
(
'frq'
)
->
table
(
'inquiry_items_report'
)
->
where
(
'id'
,
$v
)
->
select
(
'quote_id'
,
'inquiry_items_id'
)
->
first
();
}
DB
::
connection
(
'frq'
)
->
table
(
'inquiry_items'
)
->
where
(
'id'
,
$res
->
inquiry_items_id
)
->
update
([
'status'
=>
10
,
'update_time'
=>
time
()]);
if
(
$res
->
quote_id
)
{
DB
::
connection
(
'frq'
)
->
table
(
'quote'
)
->
where
(
'id'
,
$res
->
quote_id
)
->
update
([
'status'
=>
4
,
'update_time'
=>
time
()]);
}
}
}
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
[
'order_id'
=>
$response
[
'data'
],
'type'
=>
$data
[
'type'
]]];
DB
::
connection
(
'frq'
)
->
table
(
'inquiry_items'
)
->
where
(
'id'
,
$res
->
inquiry_items_id
)
->
update
([
'status'
=>
10
,
'update_time'
=>
time
()]);
}
}
}
return
[
'errcode'
=>
$response
[
'err_code'
],
'errmsg'
=>
$response
[
'err_msg'
],
'data'
=>
[
'order_id'
=>
$response
[
'data'
],
'type'
=>
$data
[
'type'
]]];
}
}
// 提交订单成功页面
// 提交订单成功页面
...
...
app/Model/InvoiceCompanyModel.php
View file @
8d6f7479
...
@@ -8,8 +8,8 @@ use DB;
...
@@ -8,8 +8,8 @@ use DB;
class
InvoiceCompanyModel
extends
Model
class
InvoiceCompanyModel
extends
Model
{
{
protected
$connection
=
'
web
'
;
protected
$connection
=
'
crm
'
;
protected
$table
=
'
lie_
invoice_company'
;
protected
$table
=
'invoice_company'
;
protected
$primaryKey
=
'id'
;
protected
$primaryKey
=
'id'
;
public
$timestamps
=
false
;
public
$timestamps
=
false
;
...
...
public/js/add_order.js
View file @
8d6f7479
...
@@ -259,55 +259,21 @@
...
@@ -259,55 +259,21 @@
data
:
{
tax_id
:
tax_id
},
data
:
{
tax_id
:
tax_id
},
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
resp
)
{
success
:
function
(
resp
)
{
if
(
resp
.
errcode
==
0
)
{
if
(
resp
.
errcode
==
1
)
{
var
data
=
resp
.
data
;
layer
.
alert
(
resp
.
errmsg
);
var
inv_type_val
=
''
;
return
false
;
}
$
(
'.invoice-content'
).
show
();
$
(
'.tax_id'
).
val
(
data
.
tax_id
);
$
(
'.tax_title'
).
text
(
data
.
tax_title
);
$
(
'.tax_no'
).
text
(
data
.
tax_no
);
$
(
'.bank_account'
).
text
(
data
.
bank_account
);
$
(
'.bank_name'
).
text
(
data
.
bank_name
);
$
(
'.company_phone'
).
text
(
data
.
company_phone
);
$
(
'.company_address'
).
text
(
data
.
company_address
);
$
(
'.consignee'
).
text
(
data
.
consignee
);
$
(
'.consignee_phone'
).
text
(
data
.
consignee_phone
);
$
(
'.consignee_address'
).
text
(
data
.
province_val
+
data
.
city_val
+
data
.
district_val
+
data
.
consignee_address
);
switch
(
data
.
inv_type
)
{
case
2
:
inv_type_val
=
'普通发票'
;
break
;
case
3
:
inv_type_val
=
'增值税专用发票'
;
break
;
case
4
:
inv_type_val
=
'增值税普通发票'
;
break
;
default
:
inv_type_val
=
'未知'
;
break
;
}
$
(
'.inv_type'
).
text
(
inv_type_val
);
if
(
resp
.
errcode
==
2
)
{
layer
.
confirm
(
resp
.
errmsg
,
function
(
index
)
{
// 若购物车存在Digikey商品,选择增值税普票或专票后,默认将发票抬头赋值给终端信息(中文名称),且不能更改
addInvoiceInfo
(
resp
.
data
)
if
(
$
(
'.client-info'
).
css
(
'display'
)
==
'block'
)
{
layer
.
close
(
index
)
if
(
data
.
inv_type
==
3
||
data
.
inv_type
==
4
)
{
});
$
(
'.customer_cn'
).
val
(
data
.
tax_title
);
return
false
;
$
(
'.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商品,请选择增值税普票或专票'
);
}
}
}
}
}
addInvoiceInfo
(
resp
.
data
)
}
})
})
}
else
{
}
else
{
$
(
'.invoice-content'
).
hide
();
$
(
'.invoice-content'
).
hide
();
...
@@ -315,6 +281,55 @@
...
@@ -315,6 +281,55 @@
}
}
})
})
// 添加发票信息
function
addInvoiceInfo
(
data
)
{
var
inv_type_val
=
''
;
$
(
'.invoice-content'
).
show
();
$
(
'.tax_id'
).
val
(
data
.
tax_id
);
$
(
'.tax_title'
).
text
(
data
.
tax_title
);
$
(
'.tax_no'
).
text
(
data
.
tax_no
);
$
(
'.bank_account'
).
text
(
data
.
bank_account
);
$
(
'.bank_name'
).
text
(
data
.
bank_name
);
$
(
'.company_phone'
).
text
(
data
.
company_phone
);
$
(
'.company_address'
).
text
(
data
.
company_address
);
$
(
'.consignee'
).
text
(
data
.
consignee
);
$
(
'.consignee_phone'
).
text
(
data
.
consignee_phone
);
$
(
'.consignee_address'
).
text
(
data
.
province_val
+
data
.
city_val
+
data
.
district_val
+
data
.
consignee_address
);
switch
(
data
.
inv_type
)
{
case
2
:
inv_type_val
=
'普通发票'
;
break
;
case
3
:
inv_type_val
=
'增值税专用发票'
;
break
;
case
4
:
inv_type_val
=
'增值税普通发票'
;
break
;
default
:
inv_type_val
=
'未知'
;
break
;
}
$
(
'.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商品,请选择增值税普票或专票'
);
}
}
}
// 获取SKU信息
// 获取SKU信息
$
(
'.get-sku'
).
click
(
function
()
{
$
(
'.get-sku'
).
click
(
function
()
{
var
sku_id
=
$
(
this
).
siblings
(
'.search-sku'
).
val
();
var
sku_id
=
$
(
this
).
siblings
(
'.search-sku'
).
val
();
...
@@ -762,15 +777,44 @@
...
@@ -762,15 +777,44 @@
// 提交订单
// 提交订单
// $('.submit-order').on('click', function() {
// $('.submit-order').on('click', function() {
$
(
'.submit-order'
).
off
().
on
(
'click'
,
function
()
{
$
(
'.submit-order'
).
off
().
on
(
'click'
,
function
()
{
var
self
=
$
(
this
);
var
tax_id
=
$
(
'.tax_id'
).
val
();
if
(
tax_id
)
{
$
.
ajax
({
url
:
'/ajax/selectInv'
,
type
:
'post'
,
data
:
{
tax_id
:
tax_id
},
dataType
:
'json'
,
success
:
function
(
resp
)
{
if
(
resp
.
errcode
==
1
)
{
layer
.
alert
(
resp
.
errmsg
);
return
false
;
}
if
(
resp
.
errcode
==
2
)
{
layer
.
confirm
(
resp
.
errmsg
,
function
(
index
)
{
createOrder
();
layer
.
close
(
index
)
});
return
false
;
}
}
})
}
else
{
createOrder
();
}
})
function
createOrder
()
{
var
shipping_type
=
$
(
'#shipping_type'
).
val
();
// 配送方式
var
shipping_type
=
$
(
'#shipping_type'
).
val
();
// 配送方式
var
address_id
=
$
(
'input[name=address_id]'
).
val
();
var
address_id
=
$
(
'input[name=address_id]'
).
val
();
var
type
=
self
.
data
(
'type'
);
// 1-联营线上,2-自营线上,3-自营线下,4-自营其他业务
var
type
=
$
(
'.submit-order'
)
.
data
(
'type'
);
// 1-联营线上,2-自营线上,3-自营线下,4-自营其他业务
var
cart_ids
=
[];
var
cart_ids
=
[];
var
user_id
=
0
;
var
user_id
=
0
;
var
remark
=
$
(
'#remark'
).
val
();
// 订单备注
var
remark
=
$
(
'#remark'
).
val
();
// 订单备注
var
is_free_ship
=
$
(
'input[name=is_free_ship]:checked'
).
val
()
||
''
;
// 是否免运费
var
is_free_ship
=
$
(
'input[name=is_free_ship]:checked'
).
val
()
||
''
;
// 是否免运费
if
(
internal_uid
)
{
if
(
internal_uid
)
{
user_id
=
internal_uid
;
user_id
=
internal_uid
;
...
@@ -780,7 +824,7 @@
...
@@ -780,7 +824,7 @@
var
is_dgk
=
false
;
var
is_dgk
=
false
;
$
(
'.shop-table tbody tr'
).
each
(
function
()
{
$
(
'.shop-table tbody tr'
).
each
(
function
()
{
var
cid
=
$
(
this
).
data
(
'cid'
);
var
cid
=
$
(
this
).
data
(
'cid'
);
cart_ids
.
push
(
cid
);
cart_ids
.
push
(
cid
);
...
@@ -809,12 +853,12 @@
...
@@ -809,12 +853,12 @@
datax
.
address_name
=
$
(
'input[name=address_name]'
).
val
();
datax
.
address_name
=
$
(
'input[name=address_name]'
).
val
();
datax
.
address_mobile
=
$
(
'input[name=address_mobile]'
).
val
();
datax
.
address_mobile
=
$
(
'input[name=address_mobile]'
).
val
();
}
else
{
// 联营、自营线上订单
}
else
{
// 联营、自营线上订单
var
tax_id
=
$
(
'.tax_id'
).
val
();
var
tax_id
=
$
(
'.tax_id'
).
val
();
var
inv_type
=
$
(
'input[name=inv_type]:checked'
).
val
();
var
inv_type
=
$
(
'input[name=inv_type]:checked'
).
val
();
var
user_coupon_id
=
$
(
'.user_coupon_id'
).
val
();
var
user_coupon_id
=
$
(
'.user_coupon_id'
).
val
();
var
zy_delivery_type
=
$
(
'.zy_delivery_type'
).
val
();
var
zy_delivery_type
=
$
(
'.zy_delivery_type'
).
val
();
var
self_consignee
=
$
(
'.self_consignee'
).
val
()
||
''
;
var
self_consignee
=
$
(
'.self_consignee'
).
val
()
||
''
;
var
self_mobile
=
$
(
'.self_mobile'
).
val
()
||
''
;
var
self_mobile
=
$
(
'.self_mobile'
).
val
()
||
''
;
if
(
!
address_id
)
{
if
(
!
address_id
)
{
layer
.
msg
(
'请选择快递信息'
);
layer
.
msg
(
'请选择快递信息'
);
...
@@ -846,11 +890,11 @@
...
@@ -846,11 +890,11 @@
return
false
;
return
false
;
}
}
if
((
typeof
(
inv_type
)
==
'undefined'
||
inv_type
!=
''
)
&&
!
tax_id
)
{
if
((
typeof
(
inv_type
)
==
'undefined'
||
inv_type
!=
''
)
&&
!
tax_id
)
{
layer
.
msg
(
'请选择发票信息'
);
layer
.
msg
(
'请选择发票信息'
);
return
false
;
return
false
;
}
}
if
(
type
==
4
)
{
// 自营其他业务
if
(
type
==
4
)
{
// 自营其他业务
var
business_type
=
$
(
'#business_type'
).
val
();
var
business_type
=
$
(
'#business_type'
).
val
();
datax
.
business_type
=
business_type
;
datax
.
business_type
=
business_type
;
...
@@ -911,23 +955,23 @@
...
@@ -911,23 +955,23 @@
// datax.customer_website = customer_website;
// datax.customer_website = customer_website;
// }
// }
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
;
datax
.
self_consignee
=
self_consignee
;
datax
.
self_consignee
=
self_consignee
;
datax
.
self_mobile
=
self_mobile
;
datax
.
self_mobile
=
self_mobile
;
}
}
// 自营线上
// 自营线上
if
(
type
==
2
&&
is_online
==
1
)
{
if
(
type
==
2
&&
is_online
==
1
)
{
var
sale_type
=
$
(
'#sale_type'
).
val
();
var
sale_type
=
$
(
'#sale_type'
).
val
();
var
cart_info
=
[];
var
cart_info
=
[];
$
(
'.shop-table tbody tr'
).
each
(
function
()
{
$
(
'.shop-table tbody tr'
).
each
(
function
()
{
var
gid
=
$
(
this
).
find
(
'.goods_id'
).
text
();
var
gid
=
$
(
this
).
find
(
'.goods_id'
).
text
();
var
num
=
$
(
this
).
find
(
'.goods_num'
).
val
();
var
num
=
$
(
this
).
find
(
'.goods_num'
).
val
();
cart_info
.
push
({
'gid'
:
gid
,
'num'
:
num
});
cart_info
.
push
({
'gid'
:
gid
,
'num'
:
num
});
})
})
datax
.
role
=
role
;
// 自营线上下单添加角色
datax
.
role
=
role
;
// 自营线上下单添加角色
...
@@ -935,17 +979,17 @@
...
@@ -935,17 +979,17 @@
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
'/ajax/checkStock'
,
url
:
'/ajax/checkStock'
,
data
:
{
cart_info
:
JSON
.
stringify
(
cart_info
),
sale_type
:
sale_type
},
data
:
{
cart_info
:
JSON
.
stringify
(
cart_info
),
sale_type
:
sale_type
},
dataType
:
"json"
,
dataType
:
"json"
,
async
:
false
,
async
:
false
,
success
:
function
(
resp
)
{
success
:
function
(
resp
)
{
if
(
resp
.
errcode
==
-
1
)
{
if
(
resp
.
errcode
==
-
1
)
{
var
data
=
eval
(
resp
.
data
);
var
data
=
eval
(
resp
.
data
);
var
content
=
'<p>'
+
resp
.
errmsg
+
'</p>'
;
var
content
=
'<p>'
+
resp
.
errmsg
+
'</p>'
;
submit
=
false
;
submit
=
false
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
content
+=
'<p><span>'
+
(
i
+
1
)
+
'、</span>'
+
data
[
i
][
'goods_name'
]
+
',可用库存:'
+
data
[
i
][
'stock'
]
+
'</p>'
;
content
+=
'<p><span>'
+
(
i
+
1
)
+
'、</span>'
+
data
[
i
][
'goods_name'
]
+
',可用库存:'
+
data
[
i
][
'stock'
]
+
'</p>'
;
}
}
// 弹出提示
// 弹出提示
...
@@ -958,48 +1002,49 @@
...
@@ -958,48 +1002,49 @@
// self.removeAttr('disabled').css('pointer-events', 'auto');
// self.removeAttr('disabled').css('pointer-events', 'auto');
return
false
;
return
false
;
}
}
},
},
})
})
}
}
if
(
submit
)
{
if
(
submit
)
{
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
'/ajax/create'
,
url
:
'/ajax/create'
,
data
:
datax
,
data
:
datax
,
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
resp
)
{
success
:
function
(
resp
)
{
if
(
resp
.
errcode
==
0
)
{
if
(
resp
.
errcode
==
0
)
{
layer
.
msg
(
resp
.
errmsg
);
layer
.
msg
(
resp
.
errmsg
);
location
.
href
=
'/addorder/success?order_id='
+
resp
.
data
.
order_id
+
'&type='
+
resp
.
data
.
type
;
location
.
href
=
'/addorder/success?order_id='
+
resp
.
data
.
order_id
+
'&type='
+
resp
.
data
.
type
;
return
false
;
return
false
;
}
else
if
(
resp
.
errcode
==
21024
)
{
}
else
if
(
resp
.
errcode
==
21024
)
{
layer
.
alert
(
'该用户已进入公司黑名单,具体请联系吴承义,同时订单无法提交'
);
layer
.
alert
(
'该用户已进入公司黑名单,具体请联系吴承义,同时订单无法提交'
);
return
false
;
return
false
;
}
else
if
(
resp
.
errcode
==
21030
)
{
}
else
if
(
resp
.
errcode
==
21030
)
{
layer
.
alert
(
resp
.
errmsg
,
function
()
{
layer
.
alert
(
resp
.
errmsg
,
function
()
{
var
delivery_place
=
$
(
'.delivery_place'
).
val
();
var
delivery_place
=
$
(
'.delivery_place'
).
val
();
loading
.
lists
(
user_id
,
goods_type
,
is_online
,
delivery_place
);
// 加载购物车列表
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
.
confirm
(
user_id
,
address_id
,
cart_ids
,
user_coupon_id
,
goods_type
,
is_online
);
// 确认订单信息
});
});
return
false
;
return
false
;
}
}
layer
.
alert
(
resp
.
errmsg
);
layer
.
alert
(
resp
.
errmsg
);
},
},
})
})
layer
.
msg
(
'订单生成中...'
,
{
icon
:
16
,
time
:
0
,
shade
:
0.3
});
layer
.
msg
(
'订单生成中...'
,
{
icon
:
16
,
time
:
0
,
shade
:
0.3
});
}
}
}
else
{
}
else
{
layer
.
msg
(
'请先添加商品'
);
layer
.
msg
(
'请先添加商品'
);
}
}
})
}
// 发货方式
// 发货方式
$
(
'.zy_delivery_type'
).
change
(
function
()
{
$
(
'.zy_delivery_type'
).
change
(
function
()
{
...
...
public/js/change_order.js
View file @
8d6f7479
...
@@ -486,7 +486,37 @@
...
@@ -486,7 +486,37 @@
})
})
// 提交表单
// 提交表单
$
(
'.checkOrder'
).
click
(
function
(){
$
(
'.checkOrder'
).
click
(
function
()
{
var
tax_id
=
$
(
'.tax_id'
).
val
();
if
(
tax_id
)
{
$
.
ajax
({
url
:
'/ajax/selectInv'
,
type
:
'post'
,
data
:
{
tax_id
:
tax_id
},
dataType
:
'json'
,
success
:
function
(
resp
)
{
if
(
resp
.
errcode
==
1
)
{
layer
.
alert
(
resp
.
errmsg
);
return
false
;
}
if
(
resp
.
errcode
==
2
)
{
layer
.
confirm
(
resp
.
errmsg
,
function
(
index
)
{
checkOrder
();
layer
.
close
(
index
)
});
return
false
;
}
}
})
}
else
{
checkOrder
();
}
})
function
checkOrder
()
{
var
is_newClient
=
$
(
'input[name=is_newClient]:checked'
).
val
();
var
is_newClient
=
$
(
'input[name=is_newClient]:checked'
).
val
();
var
client_source
=
$
(
'input[name=client_source]:checked'
).
val
();
var
client_source
=
$
(
'input[name=client_source]:checked'
).
val
();
var
order_status
=
$
(
'input[name=order_status]:checked'
).
val
();
var
order_status
=
$
(
'input[name=order_status]:checked'
).
val
();
...
@@ -534,67 +564,67 @@
...
@@ -534,67 +564,67 @@
// }
// }
// }
// }
if
(
isNewClient
)
{
if
(
isNewClient
)
{
if
(
client_source
==
null
)
{
if
(
client_source
==
null
)
{
layer
.
msg
(
'请选择用户来源渠道!'
);
layer
.
msg
(
'请选择用户来源渠道!'
);
return
false
;
return
false
;
}
else
if
(
client_source
==
1
)
{
}
else
if
(
client_source
==
1
)
{
if
(
$
(
'#input-other-source'
).
val
()
==
''
)
{
if
(
$
(
'#input-other-source'
).
val
()
==
''
)
{
layer
.
msg
(
'请填写其他来源'
);
layer
.
msg
(
'请填写其他来源'
);
return
false
;
return
false
;
}
}
}
}
}
}
// 审核不通过
// 审核不通过
if
(
order_status
==
-
1
)
{
if
(
order_status
==
-
1
)
{
$
(
'.input-cancel-reason'
).
click
();
$
(
'.input-cancel-reason'
).
click
();
return
false
;
return
false
;
}
}
var
goods_amount
=
parseFloat
(
$
(
'.goods_total'
).
text
());
var
goods_amount
=
parseFloat
(
$
(
'.goods_total'
).
text
());
var
msg_txt
=
''
;
// 获取运费提示
var
msg_txt
=
''
;
// 获取运费提示
// 正常订单校验数量、单价
// 正常订单校验数量、单价
if
(
business_type
==
0
)
{
if
(
business_type
==
0
)
{
var
change_price
=
false
;
var
change_price
=
false
;
var
change_goods_number
=
false
;
var
change_goods_number
=
false
;
var
change_buyer_id
=
false
;
var
change_buyer_id
=
false
;
var
change_batch
=
false
;
var
change_batch
=
false
;
var
change_str
=
''
;
var
change_str
=
''
;
var
is_all_self
=
true
;
// 全部为自营商品
var
is_all_self
=
true
;
// 全部为自营商品
var
is_all_self_xm
=
true
;
// 全部为自营现货
var
is_all_self_xm
=
true
;
// 全部为自营现货
$
(
'.order-change-table'
).
find
(
'tbody tr'
).
each
(
function
()
{
$
(
'.order-change-table'
).
find
(
'tbody tr'
).
each
(
function
()
{
var
goods_number
=
$
(
this
).
find
(
'.change_goods_number'
).
val
();
var
goods_number
=
$
(
this
).
find
(
'.change_goods_number'
).
val
();
var
price
=
$
(
this
).
find
(
'.price'
).
val
();
var
price
=
$
(
this
).
find
(
'.price'
).
val
();
var
goods_name
=
$
(
this
).
find
(
'.change_goods_name'
).
val
();
var
goods_name
=
$
(
this
).
find
(
'.change_goods_name'
).
val
();
var
buyer_id
=
$
(
this
).
find
(
'.change_buyer_id'
).
selectpicker
(
'val'
);
var
buyer_id
=
$
(
this
).
find
(
'.change_buyer_id'
).
selectpicker
(
'val'
);
var
batch
=
$
(
this
).
find
(
'.change_batch'
).
val
();
var
batch
=
$
(
this
).
find
(
'.change_batch'
).
val
();
var
status
=
$
(
this
).
find
(
'.change_status'
).
val
();
var
status
=
$
(
this
).
find
(
'.change_status'
).
val
();
var
supplier_id
=
$
(
this
).
data
(
'sup'
);
// 供应商ID
var
supplier_id
=
$
(
this
).
data
(
'sup'
);
// 供应商ID
var
sale_type
=
$
(
this
).
data
(
'sale_type'
);
// 1-现卖,2-预售
var
sale_type
=
$
(
this
).
data
(
'sale_type'
);
// 1-现卖,2-预售
if
(
status
==
-
1
)
return
true
;
if
(
status
==
-
1
)
return
true
;
if
(
goods_number
==
''
||
goods_number
==
0
)
{
if
(
goods_number
==
''
||
goods_number
==
0
)
{
change_goods_number
=
true
;
change_goods_number
=
true
;
change_str
+=
goods_name
+
'数量不能为0或空 '
;
change_str
+=
goods_name
+
'数量不能为0或空 '
;
}
}
if
(
price
==
''
||
price
==
0
)
{
if
(
price
==
''
||
price
==
0
)
{
change_price
=
true
;
change_price
=
true
;
change_str
+=
goods_name
+
'单价不能为0或空 '
;
change_str
+=
goods_name
+
'单价不能为0或空 '
;
}
}
if
(
order_goods_type
==
1
&&
(
buyer_id
==
null
||
buyer_id
==
''
))
{
if
(
order_goods_type
==
1
&&
(
buyer_id
==
null
||
buyer_id
==
''
))
{
change_buyer_id
=
true
;
change_buyer_id
=
true
;
change_str
+=
goods_name
+
'采购员不能为空 '
;
change_str
+=
goods_name
+
'采购员不能为空 '
;
}
}
if
(
order_goods_type
==
1
&&
batch
==
''
)
{
if
(
order_goods_type
==
1
&&
batch
==
''
)
{
change_batch
=
true
;
change_batch
=
true
;
change_str
+=
goods_name
+
'批次不能为空 '
;
change_str
+=
goods_name
+
'批次不能为空 '
;
}
}
if
(
supplier_id
!=
10000
)
{
if
(
supplier_id
!=
10000
)
{
...
@@ -621,13 +651,13 @@
...
@@ -621,13 +651,13 @@
}
}
$
.
ajax
({
$
.
ajax
({
url
:
'/api/getOrderFreight'
,
url
:
'/api/getOrderFreight'
,
type
:
'post'
,
type
:
'post'
,
data
:
{
order_id
:
order_id
},
data
:
{
order_id
:
order_id
},
dataType
:
'json'
,
dataType
:
'json'
,
async
:
false
,
async
:
false
,
success
:
function
(
resp
)
{
success
:
function
(
resp
)
{
if
(
resp
.
errcode
==
0
)
{
if
(
resp
.
errcode
==
0
)
{
msg_txt
+=
resp
.
data
;
msg_txt
+=
resp
.
data
;
$
(
'.freight_fee'
).
val
(
resp
.
data
).
trigger
(
'keyup'
);
$
(
'.freight_fee'
).
val
(
resp
.
data
).
trigger
(
'keyup'
);
}
}
...
@@ -642,8 +672,8 @@
...
@@ -642,8 +672,8 @@
})
})
}
}
}
}
// 预付款
// 预付款
if
(
pay_type
==
2
)
{
if
(
pay_type
==
2
)
{
var
deposit_amount
=
$
(
'input[name=deposit_amount]'
).
val
();
var
deposit_amount
=
$
(
'input[name=deposit_amount]'
).
val
();
...
@@ -651,7 +681,7 @@
...
@@ -651,7 +681,7 @@
if
(
deposit_amount
==
''
)
{
if
(
deposit_amount
==
''
)
{
layer
.
msg
(
'请填写定金金额'
);
layer
.
msg
(
'请填写定金金额'
);
return
false
;
return
false
;
}
else
if
(
deposit_amount
==
0
)
{
}
else
if
(
deposit_amount
==
0
)
{
layer
.
msg
(
'定金金额不能为0'
);
layer
.
msg
(
'定金金额不能为0'
);
return
false
;
return
false
;
}
}
...
@@ -681,32 +711,32 @@
...
@@ -681,32 +711,32 @@
return
false
;
return
false
;
}
}
}
}
}
}
// 发货方式
// 发货方式
if
(
delivery_type
==
''
)
{
if
(
delivery_type
==
''
)
{
layer
.
msg
(
'请选择发货方式'
);
layer
.
msg
(
'请选择发货方式'
);
return
false
;
return
false
;
}
}
// 非管理员或经理权限、非联营订单、非样片单 需要判断商品价格是否低于80%以下
// 非管理员或经理权限、非联营订单、非样片单 需要判断商品价格是否低于80%以下
if
(
!
is_manager
&&
order_goods_type
!=
1
&&
business_type
!=
1
)
{
if
(
!
is_manager
&&
order_goods_type
!=
1
&&
business_type
!=
1
)
{
// 设置默认值false
// 设置默认值false
$
(
'input[name=check_failed]'
).
val
(
0
);
$
(
'input[name=check_failed]'
).
val
(
0
);
$
(
'input[name=change_pay_type]'
).
val
(
0
);
$
(
'input[name=change_pay_type]'
).
val
(
0
);
var
check_failed_info
=
''
;
var
check_failed_info
=
''
;
// 检查商品单价
// 检查商品单价
$
(
'.order-change-table'
).
find
(
'tbody tr'
).
each
(
function
()
{
$
(
'.order-change-table'
).
find
(
'tbody tr'
).
each
(
function
()
{
var
origin_price
=
parseFloat
(
$
(
this
).
find
(
'.price'
).
data
(
'origin'
));
var
origin_price
=
parseFloat
(
$
(
this
).
find
(
'.price'
).
data
(
'origin'
));
var
price
=
parseFloat
(
$
(
this
).
find
(
'.price'
).
val
())
||
0
;
var
price
=
parseFloat
(
$
(
this
).
find
(
'.price'
).
val
())
||
0
;
var
goods_name
=
$
(
this
).
find
(
'.change_goods_name'
).
val
();
var
goods_name
=
$
(
this
).
find
(
'.change_goods_name'
).
val
();
limit_price
=
(
origin_price
*
0.8
).
toFixed
(
4
);
limit_price
=
(
origin_price
*
0.8
).
toFixed
(
4
);
// 若商品单价降价幅度小于或等于20%则赋值
// 若商品单价降价幅度小于或等于20%则赋值
if
(
price
<=
limit_price
)
{
if
(
price
<=
limit_price
)
{
check_failed_info
+=
'型号:'
+
goods_name
+
',单价:'
+
origin_price
+
' -> '
+
price
+
' | '
;
check_failed_info
+=
'型号:'
+
goods_name
+
',单价:'
+
origin_price
+
' -> '
+
price
+
' | '
;
$
(
'input[name=check_failed]'
).
val
(
1
);
$
(
'input[name=check_failed]'
).
val
(
1
);
$
(
'input[name=check_failed_info]'
).
val
(
check_failed_info
);
$
(
'input[name=check_failed_info]'
).
val
(
check_failed_info
);
}
}
...
@@ -718,30 +748,30 @@
...
@@ -718,30 +748,30 @@
}
}
}
}
var
currencySign
=
currency
==
1
?
'¥'
:
'$'
;
var
currencySign
=
currency
==
1
?
'¥'
:
'$'
;
var
order_amount
=
parseFloat
(
$
(
'.total'
).
text
());
var
order_amount
=
parseFloat
(
$
(
'.total'
).
text
());
var
extra_fee
=
$
(
'input[name=extra_fee]'
).
val
()
?
$
(
'input[name=extra_fee]'
).
val
()
:
0
;
var
extra_fee
=
$
(
'input[name=extra_fee]'
).
val
()
?
$
(
'input[name=extra_fee]'
).
val
()
:
0
;
var
freight_fee
=
$
(
'input[name=freight_fee]'
).
val
()
?
$
(
'input[name=freight_fee]'
).
val
()
:
0
;
var
freight_fee
=
$
(
'input[name=freight_fee]'
).
val
()
?
$
(
'input[name=freight_fee]'
).
val
()
:
0
;
var
discount_amount
=
$
(
'input[name="discount_amount"]'
).
val
()
?
parseFloat
(
$
(
'input[name="discount_amount"]'
).
val
())
:
0
;
// 优惠券
var
discount_amount
=
$
(
'input[name="discount_amount"]'
).
val
()
?
parseFloat
(
$
(
'input[name="discount_amount"]'
).
val
())
:
0
;
// 优惠券
var
last_paid
=
parseFloat
(
order_amount
+
parseFloat
(
pay_preferential
)).
toFixed
(
2
);
// 实际支付金额
var
last_paid
=
parseFloat
(
order_amount
+
parseFloat
(
pay_preferential
)).
toFixed
(
2
);
// 实际支付金额
var
order_type_extend
=
$
(
'#order_type_extend'
).
val
();
var
order_type_extend
=
$
(
'#order_type_extend'
).
val
();
var
content
=
'<div class="submit-check">'
;
var
content
=
'<div class="submit-check">'
;
content
+=
'<p class="error">请仔细核对订单金额,谨慎操作!'
+
msg_txt
+
'</p>'
;
content
+=
'<p class="error">请仔细核对订单金额,谨慎操作!'
+
msg_txt
+
'</p>'
;
content
+=
'<p><label>商品总金额:</label>'
+
currencySign
+
goods_amount
+
'</p>'
;
content
+=
'<p><label>商品总金额:</label>'
+
currencySign
+
goods_amount
+
'</p>'
;
content
+=
'<p><label>优惠金额:</label>'
+
discount_amount
+
'</p>'
+
content
+=
'<p><label>优惠金额:</label>'
+
discount_amount
+
'</p>'
+
'<p><label>附加费金额:</label>'
+
extra_fee
+
'</p>'
+
'<p><label>附加费金额:</label>'
+
extra_fee
+
'</p>'
+
'<p><label>运费金额:</label>'
+
freight_fee
+
'</p>'
+
'<p><label>运费金额:</label>'
+
freight_fee
+
'</p>'
+
'<p><label>订单总金额:</label><span class="error">'
+
currencySign
+
order_amount
+
'</span></p>'
;
'<p><label>订单总金额:</label><span class="error">'
+
currencySign
+
order_amount
+
'</span></p>'
;
if
(
order_goods_type
==
1
)
{
if
(
order_goods_type
==
1
)
{
content
+=
'</div>'
;
content
+=
'</div>'
;
var
url
=
'/details/'
+
order_id
;
var
url
=
'/details/'
+
order_id
;
}
else
{
}
else
{
content
+=
'<p><label>支付优惠:</label>'
+
pay_preferential
+
'</p>'
+
content
+=
'<p><label>支付优惠:</label>'
+
pay_preferential
+
'</p>'
+
'<p><label>实际支付金额:</label><span class="error">'
+
currencySign
+
last_paid
+
'</span></p>'
+
'<p><label>实际支付金额:</label><span class="error">'
+
currencySign
+
last_paid
+
'</span></p>'
+
'</div>'
;
'</div>'
;
var
url
=
'/details/'
+
order_id
+
'?tags=self'
;
var
url
=
'/details/'
+
order_id
+
'?tags=self'
;
}
}
// 弹出提示
// 弹出提示
...
@@ -749,23 +779,23 @@
...
@@ -749,23 +779,23 @@
area
:
[
'360px'
],
area
:
[
'360px'
],
title
:
'提示信息'
,
title
:
'提示信息'
,
content
:
content
,
content
:
content
,
btn
:[
'确定'
,
'取消'
],
btn
:
[
'确定'
,
'取消'
],
yes
:
function
(
index
,
layero
)
{
yes
:
function
(
index
,
layero
)
{
$
.
ajax
({
$
.
ajax
({
url
:
'/ajaxSaveChange'
,
url
:
'/ajaxSaveChange'
,
type
:
'post'
,
type
:
'post'
,
data
:
$
(
'#checkOrderForm'
).
serialize
(),
data
:
$
(
'#checkOrderForm'
).
serialize
(),
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
resp
)
{
success
:
function
(
resp
)
{
if
(
resp
.
errcode
==
0
)
{
if
(
resp
.
errcode
==
0
)
{
layer
.
msg
(
resp
.
errmsg
||
'操作成功'
);
layer
.
msg
(
resp
.
errmsg
||
'操作成功'
);
setTimeout
(
function
()
{
setTimeout
(
function
()
{
// location.reload();
// location.reload();
location
.
href
=
url
;
location
.
href
=
url
;
},
1000
);
},
1000
);
return
false
;
return
false
;
}
}
layer
.
alert
(
resp
.
errmsg
);
layer
.
alert
(
resp
.
errmsg
);
return
false
;
return
false
;
...
@@ -779,13 +809,13 @@
...
@@ -779,13 +809,13 @@
}
}
})
})
layer
.
msg
(
'审核提交中...'
,
{
icon
:
16
,
time
:
0
,
shade
:
0.3
});
// 阻止重复提交
layer
.
msg
(
'审核提交中...'
,
{
icon
:
16
,
time
:
0
,
shade
:
0.3
});
// 阻止重复提交
},
},
btn2
:
function
(
index
,
layero
)
{
btn2
:
function
(
index
,
layero
)
{
layer
.
close
(
index
);
layer
.
close
(
index
);
}
}
});
});
}
)
}
// 临时保存
// 临时保存
$
(
'.tempSave'
).
click
(
function
()
{
$
(
'.tempSave'
).
click
(
function
()
{
...
...
resources/views/changeOrder/content.blade.php
View file @
8d6f7479
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
<input
type=
"hidden"
name=
"check_failed_info"
value=
""
>
<input
type=
"hidden"
name=
"check_failed_info"
value=
""
>
<input
type=
"hidden"
name=
"change_pay_type"
value=
""
>
<input
type=
"hidden"
name=
"change_pay_type"
value=
""
>
<input
type=
"hidden"
name=
"business_type"
value=
"{{$order_temp_info['business_type']}}"
>
<input
type=
"hidden"
name=
"business_type"
value=
"{{$order_temp_info['business_type']}}"
>
<input
type=
"hidden"
class=
"tax_id"
name=
"tax_id"
value=
"{{ isset($order_invoice_info['tax_id']) ? $order_invoice_info['tax_id'] : '' }}"
>
<?php
$isNewClient
=
App\Http\Controllers\isNewClient
(
$order_info
[
'order_goods_type'
],
$order_info
[
'user_id'
],
$order_info
[
'create_time'
]);
?>
<?php
$isNewClient
=
App\Http\Controllers\isNewClient
(
$order_info
[
'order_goods_type'
],
$order_info
[
'user_id'
],
$order_info
[
'create_time'
]);
?>
@if ($isNewClient)
@if ($isNewClient)
...
...
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