Commit 7d62d6ad by 朱继来

新增联营、自营线上订单

parent c5007003
......@@ -105,6 +105,132 @@ Class AddOrderController extends Controller
return $data;
}
// 新增联营订单
public function addOrder(Request $request)
{
$info = $this->getPageInfo($request);
$info['title'] = '新增联营订单';
$info['paths'] = [["title" => '新增联营订单', "href" => '#']];
$info['sale_id'] = $request->user->userId;
return view('addOrder', $info);
}
// 新增自营线上订单
public function addOnline(Request $request)
{
$info = $this->getPageInfo($request);
$info['title'] = '新增自营线上订单';
$info['paths'] = [["title" => '新增自营线上订单', "href" => '#']];
$info['sale_id'] = $request->user->userId;
return view('addOnline', $info);
}
// 获取用户信息
public function getUserInfo(Request $request)
{
if ($request->isMethod('post')) {
$mobile = $request->input('mobile');
$user = DB::connection('order')->table('lie_user_main')->where('mobile', $mobile)->select('user_id', 'mobile', 'is_test')->first();
if (!empty($user)) {
// 收货地址
$address = DB::connection('order')->table('lie_user_address')->where('user_id', $user->user_id)->get();
// 发票信息
$invoice = DB::connection('order')->table('lie_taxinfo')->where('user_id', $user->user_id)->get();
$info['user'] = $user;
$info['address'] = $address;
$info['invoice'] = $invoice;
}
if (isset($info)) {
return ['errcode' => 0, 'errmsg' => '', 'data' => $info];
} else {
return ['errcode' => -1, 'errmsg' => '未找用户信息'];
}
}
}
// 选择收货地址
public function selectAddr(Request $request)
{
if ($request->isMethod('post')) {
$address_id = $request->input('address_id');
$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->district_val = $this->getAddress($address->district);
return ['errcode' => 0, 'errmsg' => '', 'data' => $address];
}
}
// 选择发票信息
public function selectInv(Request $request)
{
if ($request->isMethod('post')) {
$tax_id = $request->input('tax_id');
$invoice = DB::connection('order')->table('lie_taxinfo')->where('tax_id', $tax_id)->first();
$invoice->province_val = $this->getAddress($invoice->consignee_province);
$invoice->city_val = $this->getAddress($invoice->consignee_city);
$invoice->district_val = $this->getAddress($invoice->consignee_district);
return ['errcode' => 0, 'errmsg' => '', 'data' => $invoice];
}
}
// 根据发票类型选择发票信息
public function selectInvType(Request $request)
{
if ($request->isMethod('post')) {
$user_id = $request->input('user_id');
$inv_type = $request->input('inv_type');
if ($inv_type == 3) {
$invoice = DB::connection('order')->table('lie_taxinfo')->where(['user_id' => $user_id, 'inv_type' => $inv_type])->get();
} else {
$invoice = DB::connection('order')->table('lie_taxinfo')->where('user_id', $user_id)->whereIn('inv_type', [2, 4])->get();
}
return ['errcode' => 0, 'errmsg' => '', 'data' => $invoice];
}
}
// 获取可用优惠券
public function getCoupon(Request $request)
{
if ($request->isMethod('post')) {
$data['uid'] = $request->input('uid');
$data['order_goods_type'] = $request->input('goods_type');
$data['cart_ids'] = $request->input('cart_ids');
$data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$url = Config('website.api_domain').'ucoupon/bestusebyordersystem';
$response = json_decode(curlApi($url, $data), true);
if ($response['err_code'] == 0) {
return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg'], 'data'=>$response['data']];
} else {
return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg']];
}
}
}
// 查询省市区
public function getAddress($id)
{
......@@ -259,6 +385,28 @@ Class AddOrderController extends Controller
}
}
// 获取自营运费
public function getExpressFee(Request $request)
{
if ($request->isMethod('post')) {
$data['uid'] = $request->input('uid');
$data['address_id'] = $request->input('address_id');
$data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$url = Config('website.api_domain').'cart/getExpressFeeByOrder';
$response = json_decode(curlApi($url, $data), true);
if ($response['err_code'] == 0) {
return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg'], 'data'=>$response['data']];
} else {
return ['errcode' => $response['err_code'], 'errmsg' => $response['err_msg']];
}
}
}
// 提交订单
public function create(Request $request)
{
......@@ -269,9 +417,12 @@ Class AddOrderController extends Controller
$data['cart_id'] = implode(',', $request->input('cart_ids'));
$data['type'] = $request->input('type');
if ($data['type'] == 3) {
if ($data['type'] == 3) { // 自营线下订单
$data['address_name'] = $request->input('address_name');
$data['address_mobile'] = $request->input('address_mobile');
} else { // 联营、自营线上订单
$data['tax_id'] = $request->input('tax_id');
$data['user_coupon_id'] = $request->input('user_coupon_id');
}
$data['k1'] = time();
......@@ -307,10 +458,16 @@ Class AddOrderController extends Controller
$info['title'] = $title;
$info['paths'] = [["title" => $title, "href" => '#']];
$info['type'] = $type;
$order = DB::connection('order')->table('lie_order')->where('order_id', $order_id)->first();
$info['order_info'] = $order;
if ($type != 3) {
$user = DB::connection('order')->table('lie_user_main')->where('user_id', $order->user_id)->select('mobile')->first();
$info['user_info'] = $user;
}
$info['order_info'] = $order;
return view('success', $info);
}
......
......@@ -78,6 +78,16 @@ Route::group(['middleware' => 'web'], function () {
Route::post('/ajaxInputCancelReason', 'OrderController@ajaxInputCancelReason');
Route::get('/add_order', 'AddOrderController@addOrder');
Route::post('/ajax/getUserInfo', 'AddOrderController@getUserInfo');
Route::post('/ajax/selectAddr', 'AddOrderController@selectAddr');
Route::post('/ajax/selectInv', 'AddOrderController@selectInv');
Route::post('/ajax/selectInvType', 'AddOrderController@selectInvType');
Route::post('/ajax/getCoupon', 'AddOrderController@getCoupon');
Route::get('/add_online', 'AddOrderController@addOnline');
Route::post('/ajax/getExpressFee', 'AddOrderController@getExpressFee');
Route::get('/add_offline', 'AddOrderController@addOffline');
Route::post('/ajax/getSku', 'AddOrderController@getSku');
Route::post('/ajax/addCart', 'AddOrderController@addCart');
......
......@@ -58,4 +58,6 @@ return [
// 查询自营SKU入口
'search-sku-url-2' => 'http://footstone.liexin.net/manage/GoodsList',
// 新增自营线上订单付款地址
'pay_online_url' => 'http://www.liexin.com/v3/pay/online?id=',
];
......@@ -100,6 +100,10 @@ li {
}
/*新增订单*/
.user-info, .address-content, .invoice-content, .order-info {
display: none;
}
.title-tips {
font-size: 12px;
color: #ff9900;
......@@ -164,3 +168,14 @@ li {
margin-left: 33%;
}
.con-title {
float: left;
width: 100px;
}
.con-title span {
float: right;
}
.con-val {
float: left;
}
......@@ -3,14 +3,211 @@
$.extend($.lie, {
add_order:{
offline: function() {
this.bind(2);
this.lists(user_id, 2);
lyorder: function() { // 联营订单
this.bind(1, 1);
},
bind: function(type) {
zyorder: function() { // 自营线上订单
this.bind(2, 1);
},
offline: function() { // 自营线下订单
this.bind(2, 0);
this.lists(user_id, 2, 0);
},
bind: function(goods_type, is_online) { //goods_type:1-联营,2-自营 is_online:是否线上订单
var loading = this;
// 获取用户信息
$('.get-user').click(function(){
var mobile = $(this).siblings('.search-user').val();
if (!mobile) return false;
$.ajax({
url: '/ajax/getUserInfo',
type: 'post',
data: {mobile : mobile.trim()},
dataType: 'json',
success: function (resp) {
if (resp.errcode == 0) {
var data = resp.data;
$('.user-info').show();
// 账号信息
$('.user_id').val(data.user.user_id);
$('.user-mobile').text(data.user.mobile);
var is_test = data.user.is_test ? '是' : '否';
$('.user-test').text(is_test);
// 快递信息
if (data.address != null) {
var addr_len = data.address.length;
var addr_str = '<option value="">请选择</option>';
for (var i = 0; i < addr_len; i++) {
addr_str += '<option value="'+data.address[i]['address_id']+'">'+data.address[i]['consignee']+'</option>';
}
$('#address').empty().append(addr_str);
}
// 发票信息
if (data.invoice != null) {
var inv_len = data.invoice.length;
var inv_str = '<option value="">请选择</option>';
for (var i = 0; i < inv_len; i++) {
inv_str += '<option value="'+data.invoice[i]['tax_id']+'">'+data.invoice[i]['tax_title']+'</option>';
}
$('#invoice').empty().append(inv_str);
}
loading.lists(data.user.user_id, goods_type, is_online); // 加载该用户购物车
return false;
}
layer.msg(resp.errmsg)
},
})
})
// 选择收货地址
$('.user-info').delegate('#address', 'change', function() {
var user_id = $('.user_id').val();
var address_id = $(this).val();
var goods_amount = parseFloat($('.goods_amount').val());
var currency = $('.currency').val();
var coupon_amount = $('.user_coupon_id').val() != '' ? parseFloat($('#user_coupon').data('amount')) : 0;
if (address_id) {
$.ajax({
url: '/ajax/selectAddr',
type: 'post',
data: {address_id : address_id},
dataType: 'json',
success: function (resp) {
if (resp.errcode == 0) {
var data = resp.data;
$('.address-content').show();
$('.address_id').val(data.address_id);
$('.address-consignee').text(data.consignee);
$('.address-mobile').text(data.mobile);
$('.address-detail').text(data.province_val + data.city_val + data.district_val + data.detail_address);
if (goods_type == 2 && address_id) {
loading.getExpressFee(user_id, address_id); // 获取自营运费
}
}
}
})
} else {
$('.address-content').hide();
$('.address_id').val('');
if (goods_type == 2) {
$('.express_fee').val(0);
$('.express_fee_val').text('¥0.00');
}
var express_fee = parseFloat($('.express_fee').val());
var order_amount = parseFloat(goods_amount-coupon_amount+express_fee).toFixed(4);
$('.order_amount').text(currency+order_amount);
}
})
// 选择发票类型
$('.user-info').delegate('.radio-inv-type', 'click', function() {
var inv_type = $(this).val();
var user_id = $('.user_id').val();
var inv_str = '<option value="">请选择</option>';
$('.invoice-content').hide();
$('.tax_id').val('');
if (inv_type) {
$.ajax({
url: '/ajax/selectInvType',
type: 'post',
data: {user_id: user_id, inv_type: inv_type},
dataType: 'json',
success: function (resp) { console.log(resp)
if (resp.errcode == 0) {
var data = resp.data;
if (data != null) {
var inv_len = data.length;
for (var i = 0; i < inv_len; i++) {
inv_str += '<option value="'+data[i]['tax_id']+'">'+data[i]['tax_title']+'</option>';
}
$('#invoice').empty().append(inv_str);
} else {
$('#invoice').empty().append(inv_str);
}
}
}
})
} else {
$('#invoice').empty().append(inv_str);
}
})
// 选择发票信息
$('.user-info').delegate('#invoice', 'change', function() {
var tax_id = $(this).val();
if (tax_id) {
$.ajax({
url: '/ajax/selectInv',
type: 'post',
data: {tax_id : tax_id},
dataType: 'json',
success: function (resp) {
if (resp.errcode == 0) {
var data = resp.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);
}
}
})
} else {
$('.invoice-content').hide();
$('.tax_id').val('');
}
})
// 获取SKU信息
$('.get-sku').click(function() {
var sku_id = $(this).siblings('.search-sku').val();
......@@ -40,7 +237,13 @@
$('.moq').text(data.moq);
$('.mpq').text(data.mpq);
switch (data.status) {
if (goods_type == 1) {
var status = data.goods_status;
} else {
var status = data.status;
}
switch (status) {
case 0: status_val = '待入库'; break;
case 1: status_val = '审核通过(上架)'; break;
case 3: status_val = '下架'; break;
......@@ -76,13 +279,32 @@
$('.add-to-lists').click(function() {
var goods_min_num = $(this).parents('.sku-info').find('.goods-min-num').text();
var goods_id = $(this).siblings('.goods_id').val();
var delivery_place = 1; // 1.大陆,2.香港 自营默认是大陆
if (is_online) { // 线上订单
var user_id = $('.user_id').val();
if (goods_type == 1) { // 联营需要选择交货地
delivery_place = $('input[name=delivery_place]:checked').val();
if (delivery_place == null) {
layer.msg('请选择交货地');
return false;
}
}
}
if (!user_id) {
layer.msg('请先选择用户');
return false;
}
var datax = {
uid: user_id,
id: goods_id,
num: goods_min_num,
buy: -1,
delivery_place: 1, // 1.大陆,2.香港 自营默认是大陆
delivery_place: delivery_place,
}
$.ajax({
......@@ -92,7 +314,7 @@
dataType: "json",
success: function(resp){
layer.msg(resp.errmsg);
loading.lists(user_id, type); // 加载购物车列表
loading.lists(user_id, goods_type, is_online); // 加载购物车列表
return false;
},
})
......@@ -104,6 +326,10 @@
var num = self.val();
var cart_id = self.parents('tr').data('cid');
if (is_online) {
var user_id = $('.user_id').val();
}
$.ajax({
type: "POST",
url: '/ajax/changeNum',
......@@ -111,7 +337,7 @@
dataType: "json",
success: function(resp){
if (resp.errcode == 0) {
loading.lists(user_id, type); // 加载购物车列表
loading.lists(user_id, goods_type, is_online); // 加载购物车列表
// var data = resp.data;
// self.parents('tr').find('.goods_price').text(data.goods_price);
......@@ -128,6 +354,10 @@
var self = $(this);
var cart_id = self.parents('tr').data('cid');
if (is_online) {
var user_id = $('.user_id').val();
}
layer.open({
title: '删除提示',
content: '确定删除该商品吗?',
......@@ -141,7 +371,7 @@
success: function(resp){
layer.msg(resp.errmsg);
// self.parents('tr').remove();
loading.lists(user_id, type); // 加载购物车列表
loading.lists(user_id, goods_type, is_online); // 加载购物车列表
return false;
},
})
......@@ -152,14 +382,41 @@
})
})
// 选择优惠券
$('#user_coupon').change(function(){
var coupon_id = $(this).val();
var goods_amount = parseFloat($('.goods_amount').val());
var currency = $('.currency').val();
var coupon_amount = parseFloat($(this).data('amount'));
var express_fee = 0;
if (goods_type == 2) {
express_fee = parseFloat($('.express_fee').val());
}
if (coupon_id) {
var order_amount = parseFloat(goods_amount-coupon_amount+express_fee).toFixed(4);
$('.user_coupon_id').val(coupon_id);
$('.order_amount').text(currency+order_amount);
} else {
$('.user_coupon_id').val('');
var order_amount = parseFloat(goods_amount+express_fee).toFixed(4);
$('.order_amount').text(currency+order_amount);
}
})
// 提交订单
$('.submit-order').click(function() {
var address_id = $('input[name=address_id]').val();
var address_name = $('input[name=address_name]').val();
var address_mobile = $('input[name=address_mobile]').val();
var type = $(this).data('type');
var cart_ids = [];
if (is_online) {
var user_id = $('.user_id').val();
}
$('.shop-table tbody tr').each(function() {
var cid = $(this).data('cid');
cart_ids.push(cid);
......@@ -175,8 +432,24 @@
}
if (type == 3) { // 自营线下订单
datax.address_name = address_name;
datax.address_mobile = address_mobile;
datax.address_name = $('input[name=address_name]').val();
datax.address_mobile = $('input[name=address_mobile]').val();
} else { // 联营、自营线上订单
var tax_id = $('.tax_id').val();
var user_coupon_id = $('.user_coupon_id').val();
if (!address_id) {
layer.msg('请选择快递信息');
return false;
}
if (!tax_id) {
layer.msg('请选择发票信息');
return false;
}
datax.tax_id = tax_id;
datax.user_coupon_id = user_coupon_id;
}
$.ajax({
......@@ -201,11 +474,14 @@
})
},
lists: function(user_id, type=1) {
// 购物车商品列表
lists: function(user_id, goods_type, is_online) { // type:1-联营,2-自营
var self = this;
$.ajax({
type: 'post',
url: '/ajax/cartList',
data: {uid : user_id, type: type},
data: {uid : user_id, type: goods_type},
dataType: "json",
success: function(resp){
if (resp.errcode == 0) {
......@@ -213,6 +489,8 @@
var len = list.length;
var html = '';
var order_amount = 0;
var currency = '';
var cart_ids = [];
if (len > 0) {
for (var i = 0; i < len; i++) {
......@@ -228,30 +506,116 @@
'<td><a class="btn btn-danger btn-xs remove-goods">删除</a></td>'+
'</tr>';
cart_ids.push(list[i].cart_id); // 购物车ID集合
order_amount += list[i].goods_number * list[i].goods_price;
}
order_amount = parseFloat(order_amount).toFixed(4);
if (list[0].currency == 1) {
order_amount = '¥'+ order_amount;
currency = '¥';
} else {
order_amount = '$'+ order_amount;
currency = '$';
}
$('.shop-lists').show();
$('.shop-table tbody').empty().append(html);
$('.amount-section').show();
$('.order_amount').empty().text(order_amount);
if (is_online) {
$('.order-info').show();
$('.goods_amount').val(order_amount);
$('.currency').val(currency);
$('.goods_amount_val').empty().text(currency+order_amount);
$('.order_amount').empty().text(currency+order_amount);
self.getCoupon(user_id, goods_type, cart_ids); // 获取最优的优惠券
var address_id = $('.address_id').val();
if (goods_type == 2 && address_id) {
self.getExpressFee(user_id, address_id); // 获取自营运费
var express_fee = $('.express_fee').val();
$('.order_amount').empty().text(currency+order_amount+express_fee);
}
} else {
$('.amount-section').show();
$('.order_amount').empty().text(currency+order_amount);
}
}
} else {
$('.shop-lists').hide();
$('.amount-section').hide();
if (is_online) {
// $('.goods_amount').val(''); // 清空值
$('.order-info').hide();
} else {
$('.amount-section').hide();
}
}
},
});
}
},
// 可用优惠券
getCoupon: function (user_id, goods_type, cart_ids)
{
$.ajax({
type: 'post',
url: '/ajax/getCoupon',
data: {uid : user_id, goods_type: goods_type, cart_ids : cart_ids},
dataType: "json",
success: function(resp){
if (resp.errcode == 0) {
var data = resp.data;
var str = '<option value="">请选择</option>';
if (data.user_coupon_id != null) {
layer.msg(resp.errmsg);
str += '<option value="'+data.user_coupon_id+'">'+data.coupon_name+'</option>';
$('#user_coupon').attr('data-amount', data.sale_amount); // 优惠券金额
$('#user_coupon').empty().append(str);
return false;
} else {
$('#user_coupon').empty().append(str);
}
}
return false;
}
})
},
// 获取自营运费
getExpressFee: function(user_id, address_id) {
$.ajax({
type: 'post',
url: '/ajax/getExpressFee',
data: {uid: user_id, address_id: address_id},
dataType: "json",
success: function(resp){
if (resp.errcode == 0) {
var data = parseFloat(resp.data);
$('.express_fee').val(data);
$('.express_fee_val').empty().text('¥' + data);
var goods_amount = parseFloat($('.goods_amount').val());
var currency = $('.currency').val();
var coupon_amount = $('.user_coupon_id').val() != '' ? parseFloat($('#user_coupon').data('amount')) : 0;
var order_amount = parseFloat(goods_amount-coupon_amount+data).toFixed(4);
$('.order_amount').empty().text(currency+order_amount);
}
return false;
}
})
},
}
});
})(jQuery)
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单管理后台 | {{ $title }}</title>
<script>document.domain="{{ Config::get('website.domain') }}";</script>
@include('addOffline.css')
@include('addOffline.js')
</head>
<body class="body-small" style="min-width:1024px;">
<div id="wrapper">
<!-- layouts.navigation -->
@include('layouts.navigation')
@include('addOnline.content')
</div>
</body>
<div id="page-wrapper" class="gray-bg">
@include('layouts.header')
<div class="wrapper wrapper-content">
<div class="row">
<div class="col-lg-12">
<div class="ibox float-e-margins">
<form>
<div class="ibox-title" style="border-top:0;">
<h3>客户信息</h3>
</div>
<div class="ibox-content">
<div class="row" style="margin-bottom: 30px;">
<style>
.search-user{width: 240px !important;}
.label-prompt{padding: 6px 6px;}
.get-user{padding: 3px 6px; margin-right: 20px;}
</style>
<div class="col-sm-6">
<input type="text" class="search-user" name="user-mobile" value="" placeholder="请输入用户手机号码">
<a class="btn btn-info get-user">获取用户信息</a>
<span>快捷入口:<a href="{{Config('website.add-user-url')}}" target="_blank">新增用户账号</a></span>
</div>
</div>
<div class="user-info">
<div class="account-info">
<h4>账户信息</h4>
<input type="hidden" name="user_id" class="user_id" value="">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>手机号码:</span>
<span class="user-mobile"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>密码:</span>
<span>******</span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>测试账号:</span>
<span class="user-test"></span>
</div>
</div>
</div>
</div>
<div class="express-info">
<h4>快递信息 <span class="title-tips"><i class="fa fa-info-circle"></i>必须在下单前填写快递信息</span></h4>
<input type="hidden" name="address_id" class="address_id" value="">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>收货方式:</span>
<span>快递上门</span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span><i class="text-danger">*</i> 选择收货地址:</span>
<select name="address" id="address">
</select>
</div>
</div>
</div>
<div class="address-content">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>联系人:</span>
<span class="address-consignee"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>联系电话:</span>
<span class="address-mobile"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>收货地址:</span>
<span class="address-detail"></span>
</div>
</div>
</div>
</div>
</div>
<div class="invoice-info">
<h4>发票信息 <span class="title-tips"><i class="fa fa-info-circle"></i>可在订单中心完善发票信息,需要在订单审核通过前填写发票信息,否则无法同步至ERP</span></h4>
<input type="hidden" name="tax_id" class="tax_id" value="">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>发票类型:</span>
<label class="radio-inline">
<input type="radio" name="inv_type" class="radio-inv-type" value="3"> 增值税专用发票
</label>
<label class="radio-inline">
<input type="radio" name="inv_type" class="radio-inv-type" value="4"> 增值税普通发票
</label>
<label class="radio-inline">
<input type="radio" name="inv_type" class="radio-inv-type" value=""> 不开发票
</label>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span><i class="text-danger">*</i> 选择发票信息:</span>
<select name="invoice" id="invoice">
</select>
</div>
</div>
</div>
<div class="invoice-content">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>发票抬头:</span>
<span class="tax_title"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>税务登记号:</span>
<span class="tax_no"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>银行卡号:</span>
<span class="bank_account"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>开户银行:</span>
<span class="bank_name"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>公司电话:</span>
<span class="company_phone"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>公司注册地址:</span>
<span class="company_address"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>联系人:</span>
<span class="consignee"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>联系电话:</span>
<span class="consignee_phone"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>收货地址:</span>
<span class="consignee_address"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>发票类型:</span>
<span class="inv_type"></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="ibox-title">
<h3>商品信息</h3>
</div>
<div class="ibox-content">
<div class="row">
<style>
.search-sku{width: 240px !important;}
.label-prompt{padding: 6px 6px;}
.get-sku{padding: 3px 6px; margin-right: 20px;}
</style>
<div class="col-sm-12">
<input type="text" class="search-sku" name="sku_id" value="" placeholder="请输入SKUID">
<a class="btn btn-info get-sku">获取SKU信息</a>
<span>快捷入口:
<a href="{{Config('website.search-sku-url-2')}}" target="_blank">查询SKU</a>
</span>
</div>
</div>
<!-- SKU信息 -->
<div class="sku-info">
<h4>型号信息</h4>
<div class="sku-info-left">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>SKU型号:</span>
<span class="goods_name"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>制造商:</span>
<span class="brand_name"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>供应商:</span>
<span class="supplier_name"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>库存数量:</span>
<span class="stock"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>起订量:</span>
<span class="moq"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>标准包装量:</span>
<span class="mpq"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>状态:</span>
<span class="status"></span>
</div>
</div>
</div>
</div>
<div class="sku-info-right">
<table class="table table-hover ladder_price_table">
<tr>
<th>阶梯</th>
<th>RMB价格</th>
</tr>
</table>
</div>
<input type="hidden" name="goods_id" class="goods_id" value="">
<div class="clear"></div>
<a class="btn btn-success add-to-lists">添加至商品列表</a>
</div>
<!-- 商品列表 -->
<div class="shop-lists">
<table class="table table-bordered table-hover shop-table">
<thead>
<tr>
<th width="15%">SKUID</th>
<th width="20%">商品名称</th>
<th width="10%">制造商</th>
<th width="10%">采购数量</th>
<th width="10%">采购单价</th>
<th width="10%">小计</th>
<th width="10%">货期</th>
<th width="10%">供应商</th>
<th width="5%">操作</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<div class="order-info">
<div class="ibox-title">
<h3>订单信息</h3>
</div>
<div class="ibox-content">
<input type="hidden" class="currency" name="currency" value="¥">
<input type="hidden" class="goods_amount" name="goods_amount" value="0">
<input type="hidden" class="express_fee" name="express_fee" value="0">
<div class="row">
<p class="con-title"><span>商品总额:</span></p>
<p class="con-val goods_amount_val"></p>
</div>
<div class="row">
<input type="hidden" class="user_coupon_id" name="user_coupon_id" value="">
<p class="con-title"><span>选择优惠券:</span></p>
<p class="con-val">
<select name="user_coupon" id="user_coupon">
<option value="">请选择</option>
</select>
</p>
</div>
<div class="row">
<p class="con-title"><span>运费:</span></p>
<p class="con-val express_fee_val">¥0.00</p>
</div>
<div class="row">
<p class="con-title"><span>应付金额:</span></p>
<p class="con-val text-danger order_amount"></p>
</div>
</div>
</div>
<div class="ibox-title" style="text-align: right;">
<a class="btn btn-success submit-order" data-type="2">提交</a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
var sale_id = "{{$sale_id}}";
var URL_api = "{{Config('website.api_domain')}}";
$.lie.add_order.zyorder();
</script>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单管理后台 | {{ $title }}</title>
<script>document.domain="{{ Config::get('website.domain') }}";</script>
@include('addOffline.css')
@include('addOffline.js')
</head>
<body class="body-small" style="min-width:1024px;">
<div id="wrapper">
<!-- layouts.navigation -->
@include('layouts.navigation')
@include('addOrder.content')
</div>
</body>
......@@ -11,67 +11,228 @@
</div>
<div class="ibox-content">
<div class="account-info">
<h4>账户信息 <span class="title-tips"><i class="fa fa-info-circle"></i> 此账号为内部下单账号,前台不可登录。</span></h4>
<input type="hidden" name="user_id" value="{{$internal_uid}}">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>手机号码:</span>
<span>{{Config('website.internal-account')}}</span>
<div class="row" style="margin-bottom: 30px;">
<style>
.search-user{width: 240px !important;}
.label-prompt{padding: 6px 6px;}
.get-user{padding: 3px 6px; margin-right: 20px;}
</style>
<div class="col-sm-6">
<input type="text" class="search-user" name="user-mobile" value="" placeholder="请输入用户手机号码">
<a class="btn btn-info get-user">获取用户信息</a>
<span>快捷入口:<a href="{{Config('website.add-user-url')}}" target="_blank">新增用户账号</a></span>
</div>
</div>
<div class="user-info">
<div class="account-info">
<h4>账户信息</h4>
<input type="hidden" name="user_id" class="user_id" value="">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>手机号码:</span>
<span class="user-mobile"></span>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>密码:</span>
<span>******</span>
<div class="col-sm-6">
<div class="form-group">
<span>密码:</span>
<span>******</span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>测试账号:</span>
<span></span>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>测试账号:</span>
<span class="user-test"></span>
</div>
</div>
</div>
</div>
</div>
<div class="express-info">
<h4>快递信息</h4>
</div>
<div class="express-info">
<h4>快递信息 <span class="title-tips"><i class="fa fa-info-circle"></i>必须在下单前填写快递信息</span></h4>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>收货方式:</span>
<span>快递上门</span>
<input type="hidden" name="address_id" class="address_id" value="">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>收货方式:</span>
<span>快递上门</span>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>联系人:</span>
<span>{{$name}}</span>
<div class="col-sm-6">
<div class="form-group">
<span><i class="text-danger">*</i> 选择收货地址:</span>
<select name="address" id="address">
</select>
</div>
</div>
</div>
<div class="address-content">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>联系人:</span>
<span class="address-consignee"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>联系电话:</span>
<span class="address-mobile"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>收货地址:</span>
<span class="address-detail"></span>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>联系电话:</span>
<span>{{$mobile}}</span>
<div class="invoice-info">
<h4>发票信息 <span class="title-tips"><i class="fa fa-info-circle"></i>可在订单中心完善发票信息,需要在订单审核通过前填写发票信息,否则无法同步至ERP</span></h4>
<input type="hidden" name="tax_id" class="tax_id" value="">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>发票类型:</span>
<label class="radio-inline">
<input type="radio" name="inv_type" class="radio-inv-type" value="3"> 增值税专用发票
</label>
<label class="radio-inline">
<input type="radio" name="inv_type" class="radio-inv-type" value="4"> 增值税普通发票
</label>
<label class="radio-inline">
<input type="radio" name="inv_type" class="radio-inv-type" value=""> 不开发票
</label>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span><i class="text-danger">*</i> 选择发票信息:</span>
<select name="invoice" id="invoice">
</select>
</div>
</div>
</div>
<div class="invoice-content">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>发票抬头:</span>
<span class="tax_title"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>税务登记号:</span>
<span class="tax_no"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>银行卡号:</span>
<span class="bank_account"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>开户银行:</span>
<span class="bank_name"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>公司电话:</span>
<span class="company_phone"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>收货地址:</span>
<span>广东省深圳市龙岗区坂田街道五和大道南路2号万科星火Online天枢仓6栋3楼</span>
<div class="col-sm-6">
<div class="form-group">
<span>公司注册地址:</span>
<span class="company_address"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>联系人:</span>
<span class="consignee"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>联系电话:</span>
<span class="consignee_phone"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>收货地址:</span>
<span class="consignee_address"></span>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<span>发票类型:</span>
<span class="inv_type"></span>
</div>
</div>
</div>
</div>
</div>
<div class="delivery-info">
<h4>交货信息</h4>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>交货地址:</span>
<label class="radio-inline">
<input type="radio" name="delivery_place" value="1"> 大陆
</label>
<label class="radio-inline">
<input type="radio" name="delivery_place" value="2"> 香港
</label>
</div>
</div>
</div>
</div>
......@@ -89,11 +250,14 @@
.label-prompt{padding: 6px 6px;}
.get-sku{padding: 3px 6px; margin-right: 20px;}
</style>
<div class="col-sm-6">
<div class="col-sm-12">
<input type="text" class="search-sku" name="sku_id" value="" placeholder="请输入SKUID">
<a class="btn btn-info get-sku">获取SKU信息</a>
<span>快捷入口:<a href="{{Config('website.search-sku-url')}}" target="_blank">查询SKU</a></span>
<span>快捷入口:
<a href="{{Config('website.add-sku-url')}}" target="_blank" style="margin-right: 10px;">+新增SKU</a>
<a href="{{Config('website.search-sku-url-1')}}" target="_blank">查询SKU</a>
</span>
</div>
</div>
......@@ -149,6 +313,15 @@
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span>状态:</span>
<span class="status"></span>
</div>
</div>
</div>
</div>
<div class="sku-info-right">
......@@ -158,10 +331,9 @@
<th>RMB价格</th>
</tr>
</table>
</div>
</div>
<input type="hidden" name="goods_id" class="goods_id" value="">
<input type="hidden" name="cn_delivery_time" class="cn_delivery_time" value="">
<div class="clear"></div>
......@@ -173,27 +345,55 @@
<table class="table table-bordered table-hover shop-table">
<thead>
<tr>
<th width="15%">商品型号</th>
<th width="15%">制造商</th>
<th width="15%">SKUID</th>
<th width="20%">商品名称</th>
<th width="10%">制造商</th>
<th width="10%">采购数量</th>
<th width="10%">采购单价</th>
<th width="10%">小计</th>
<th width="15%">货期</th>
<th width="15%">供应商</th>
<th width="10%">操作</th>
<th width="10%">货期</th>
<th width="10%">供应商</th>
<th width="5%">操作</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<div class="order-info">
<div class="ibox-title">
<h3>订单信息</h3>
</div>
<div class="ibox-title">
<h3>订单信息</h3>
<div class="ibox-content">
<input type="hidden" class="currency" name="currency" value="">
<input type="hidden" class="goods_amount" name="goods_amount" value="">
<div class="row">
<p class="con-title"><span>商品总额:</span></p>
<p class="con-val goods_amount_val"></p>
</div>
<div class="row">
<input type="hidden" class="user_coupon_id" name="user_coupon_id" value="">
<p class="con-title"><span>选择优惠券:</span></p>
<p class="con-val">
<select name="user_coupon" id="user_coupon">
<option value="">请选择</option>
</select>
</p>
</div>
<div class="row">
<p class="con-title"><span>应付金额:</span></p>
<p class="con-val text-danger order_amount"></p>
</div>
</div>
</div>
<div class="ibox-content">
<div class="ibox-title" style="text-align: right;">
<a class="btn btn-success submit-order" data-type="1">提交</a>
</div>
</form>
</div>
......@@ -203,8 +403,8 @@
</div>
<script>
var user_id = "{{$internal_uid}}";
var sale_id = "{{$sale_id}}";
var URL_api = "{{Config('website.api_domain')}}";
$.lie.add_order.offline();
$.lie.add_order.lyorder();
</script>
\ No newline at end of file
......@@ -18,13 +18,29 @@
</div>
<div class="section-2">
@if ($type != 3)
<style>.section-2{height: 150px;}</style>
<p>手机号码:{{ $user_info->mobile }}</p>
@endif
<p>订单编号:{{ $order_info->order_sn }}</p>
<p>应付金额:<span class="text-danger">{{ $currency.$order_info->order_amount }}</span></p>
@if ($type == 2)
<div style="text-align: center;">付款地址:{{ Config('website.pay_online_url').$order_info->order_id }}</div>
@endif
</div>
<div class="section-3">
<a class="btn btn-success" href="/self_order">查看订单</a>
<a class="btn btn-default" href="/add_offline">继续新增</a>
@if ($type == 1)
<a class="btn btn-success" href="/change/{{ $order_info->order_id }}">审核订单</a>
<a class="btn btn-default" href="/add_order">继续新增</a>
@elseif ($type == 2)
<a class="btn btn-success" href="/self_order">查看订单</a>
<a class="btn btn-default" href="/add_online">继续新增</a>
@else
<a class="btn btn-success" href="/self_order">查看订单</a>
<a class="btn btn-default" href="/add_offline">继续新增</a>
@endif
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment