Commit 4dadc7cd by 朱继来

Merge branch 'zjl_inner_account_20190221'

parents b6eaabfa 0ba9436b
...@@ -55,7 +55,6 @@ Class AddOrderController extends Controller ...@@ -55,7 +55,6 @@ Class AddOrderController extends Controller
$info = $this->getPageInfo($request); $info = $this->getPageInfo($request);
$info['title'] = '新增联营订单'; $info['title'] = '新增联营订单';
$info['sale_id'] = $request->user->userId; $info['sale_id'] = $request->user->userId;
return view('addOrder', $info); return view('addOrder', $info);
...@@ -67,12 +66,22 @@ Class AddOrderController extends Controller ...@@ -67,12 +66,22 @@ Class AddOrderController extends Controller
$info = $this->getPageInfo($request); $info = $this->getPageInfo($request);
$info['title'] = '新增自营线上订单'; $info['title'] = '新增自营线上订单';
$info['sale_id'] = $request->user->userId; $info['sale_id'] = $request->user->userId;
return view('addOnline', $info); return view('addOnline', $info);
} }
// 新增自营其他业务订单
public function addOtherOrder(Request $request)
{
$info = $this->getPageInfo($request);
$info['title'] = '新增自营其他业务订单';
$info['sale_id'] = $request->user->userId;
return view('addOtherOrder', $info);
}
// 获取用户信息 // 获取用户信息
public function getUserInfo(Request $request) public function getUserInfo(Request $request)
{ {
...@@ -372,7 +381,14 @@ Class AddOrderController extends Controller ...@@ -372,7 +381,14 @@ Class AddOrderController extends Controller
$data['address_id'] = $request->input('address_id', 0); $data['address_id'] = $request->input('address_id', 0);
$data['cart_id'] = $request->input('cart_ids', ''); $data['cart_id'] = $request->input('cart_ids', '');
$data['user_coupon_id'] = $request->input('user_coupon_id', 0); $data['user_coupon_id'] = $request->input('user_coupon_id', 0);
$data['type'] = !$is_online ? 3 : $request->input('goods_type'); if ($is_online == 0) {
$data['type'] = 3; // 自营线下
} else if ($is_online == 2) {
$data['type'] = 4; // 自营其他业务
$data['business_type'] = $request->input('business_type', 0); // 业务类型
} else {
$data['type'] = $request->input('goods_type');
}
$data['k1'] = time(); $data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi'); $data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
...@@ -452,6 +468,10 @@ Class AddOrderController extends Controller ...@@ -452,6 +468,10 @@ Class AddOrderController extends Controller
} else { // 联营、自营线上订单 } else { // 联营、自营线上订单
$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');
if ($data['type'] == 4) {
$data['business_type'] = $request->input('business_type');
}
} }
$data['sale_type'] = $request->input('sale_type', ''); // 自营线上选择销售类型 $data['sale_type'] = $request->input('sale_type', ''); // 自营线上选择销售类型
...@@ -479,12 +499,11 @@ Class AddOrderController extends Controller ...@@ -479,12 +499,11 @@ Class AddOrderController extends Controller
$order_id = $request->input('order_id'); $order_id = $request->input('order_id');
$type = $request->input('type'); $type = $request->input('type');
if ($type == 1) { switch ($type) {
$title = '新增联营订单'; case 1: $title = '新增联营订单'; break;
} else if ($type == 2) { case 2: $title = '新增自营线上订单'; break;
$title = '新增自营线上订单'; case 3: $title = '新增自营线下订单'; break;
} else { case 4: $title = '新增自营其他业务订单'; break;
$title = '新增自营线下订单';
} }
$info['title'] = $title; $info['title'] = $title;
......
...@@ -409,6 +409,7 @@ Class OrderController extends Controller ...@@ -409,6 +409,7 @@ Class OrderController extends Controller
$map['order_invoice_status']= $request->input('order_invoice_status', ''); $map['order_invoice_status']= $request->input('order_invoice_status', '');
$map['is_new'] = $request->input('is_new', ''); $map['is_new'] = $request->input('is_new', '');
$map['is_new_order'] = $request->input('is_new_order', ''); $map['is_new_order'] = $request->input('is_new_order', '');
$map['business_type'] = $request->input('business_type', '');
// 订单查看权限---交易员、客服、测试 // 订单查看权限---交易员、客服、测试
if (in_array($info['role'], [3, 4])) { if (in_array($info['role'], [3, 4])) {
......
...@@ -104,6 +104,8 @@ Route::group(['middleware' => 'web'], function () { ...@@ -104,6 +104,8 @@ Route::group(['middleware' => 'web'], function () {
Route::post('/ajax/checkStock', 'AddOrderController@checkStock'); Route::post('/ajax/checkStock', 'AddOrderController@checkStock');
Route::post('/ajax/batchGoodsImport', 'AddOrderController@batchGoodsImport'); Route::post('/ajax/batchGoodsImport', 'AddOrderController@batchGoodsImport');
Route::get('/add_other_order', 'AddOrderController@addOtherOrder');
Route::match(['get', 'post'],'/web/{key}', 'WebController@info'); Route::match(['get', 'post'],'/web/{key}', 'WebController@info');
Route::match(['get', 'post'],'/api/{key}', 'ApiController@Entrance'); Route::match(['get', 'post'],'/api/{key}', 'ApiController@Entrance');
......
...@@ -46,6 +46,7 @@ class OrderModel extends Model ...@@ -46,6 +46,7 @@ class OrderModel extends Model
$map['order_goods_type'] = $request->input('order_goods_type', ''); $map['order_goods_type'] = $request->input('order_goods_type', '');
$map['is_new'] = $request->input('is_new', ''); $map['is_new'] = $request->input('is_new', '');
$map['is_new_order'] = $request->input('is_new_order', ''); $map['is_new_order'] = $request->input('is_new_order', '');
$map['business_type'] = $request->input('business_type', '');
} }
/* 临时添加 所有人只能查看线上订单 */ /* 临时添加 所有人只能查看线上订单 */
...@@ -230,9 +231,15 @@ class OrderModel extends Model ...@@ -230,9 +231,15 @@ class OrderModel extends Model
$query->where('oe.is_new', '=', $map['is_new_order']); $query->where('oe.is_new', '=', $map['is_new_order']);
} }
}) })
->where(function ($query) use ($map) {
// 自营其他业务类型
if ($map['business_type'] != '') {
$query->where('oe.order_type', '=', 3)->whereIn('oe.business_type', explode(',', $map['business_type']));
}
})
->where('it.status', '<>', -1) ->where('it.status', '<>', -1)
->where('o.order_goods_type', '=', $map['order_goods_type']) ->where('o.order_goods_type', '=', $map['order_goods_type'])
->select('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.single_pre_price', 'it.brand_name', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_type', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'i.tax_title', 'i.company_address', 'i.company_phone', 'i.tax_no', 'i.bank_name', 'i.bank_account', 'a.consignee', 'a.address', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'u.is_new', 'c.com_name', 'oe.send_remark', 'oe.is_new as is_new_order') ->select('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.single_pre_price', 'it.brand_name', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_type', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'i.tax_title', 'i.company_address', 'i.company_phone', 'i.tax_no', 'i.bank_name', 'i.bank_account', 'a.consignee', 'a.address', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'u.is_new', 'c.com_name', 'oe.send_remark', 'oe.is_new as is_new_order', 'oe.business_type')
->groupBy('it.rec_id') ->groupBy('it.rec_id')
->orderBy('o.create_time', 'DESC') ->orderBy('o.create_time', 'DESC')
->get() ->get()
...@@ -252,7 +259,7 @@ class OrderModel extends Model ...@@ -252,7 +259,7 @@ class OrderModel extends Model
if ($map['order_goods_type'] == 1) { if ($map['order_goods_type'] == 1) {
$headerCell = ['订单ID', '订单编号', '会员账号', '是否为新订单', '收货人', '下单日期', '下单时间', '客户名称', '平台来源', '商品型号', '制造商', '供应商', '数量', '单价', '均摊后单价', '商品小计', '币种', $sale_name, '商品总额', '运费', '附加费', '优惠券', '订单总额', '订单类型', '订单状态', '发货状态', '收货地址', '发票类型', '发票状态', '发票抬头', '公司注册地址', '公司电话', 'adtags来源', '新用户来源', '取消原因', '推送备注']; $headerCell = ['订单ID', '订单编号', '会员账号', '是否为新订单', '收货人', '下单日期', '下单时间', '客户名称', '平台来源', '商品型号', '制造商', '供应商', '数量', '单价', '均摊后单价', '商品小计', '币种', $sale_name, '商品总额', '运费', '附加费', '优惠券', '订单总额', '订单类型', '订单状态', '发货状态', '收货地址', '发票类型', '发票状态', '发票抬头', '公司注册地址', '公司电话', 'adtags来源', '新用户来源', '取消原因', '推送备注'];
} else { } else {
$headerCell = ['订单ID', '订单编号', '会员账号', '收货人', '下单日期', '下单时间', '客户名称', '平台来源', '商品型号', '制造商', '供应商', '数量', '单价', '均摊后单价', '商品小计', '币种', $sale_name, '商品总额', '运费', '附加费', '优惠券', '订单总额', '订单类型', '订单状态', '发货状态', '收货地址', '发票类型', '发票状态', '发票抬头', '公司注册地址', '公司电话', 'adtags来源', '新用户来源', '取消原因', '推送备注']; $headerCell = ['订单ID', '订单编号', '业务类型', '会员账号', '收货人', '下单日期', '下单时间', '客户名称', '平台来源', '商品型号', '制造商', '供应商', '数量', '单价', '均摊后单价', '商品小计', '币种', $sale_name, '商品总额', '运费', '附加费', '优惠券', '订单总额', '订单类型', '订单状态', '发货状态', '收货地址', '发票类型', '发票状态', '发票抬头', '公司注册地址', '公司电话', 'adtags来源', '新用户来源', '取消原因', '推送备注'];
} }
array_unshift($cellData, $headerCell); array_unshift($cellData, $headerCell);
...@@ -335,6 +342,7 @@ class OrderModel extends Model ...@@ -335,6 +342,7 @@ class OrderModel extends Model
$tmp[$i]['order_id'] = $order[$i]['order_id']; $tmp[$i]['order_id'] = $order[$i]['order_id'];
$tmp[$i]['order_sn'] = "\t".$order[$i]['order_sn']."\t"; $tmp[$i]['order_sn'] = "\t".$order[$i]['order_sn']."\t";
$tmp[$i]['business_type'] = Config('params.business_type')[$order[$i]['business_type']]; // 自营其他业务类型
$tmp[$i]['user_account'] = $order[$i]['mobile'] ? $order[$i]['mobile'] : $order[$i]['email']; $tmp[$i]['user_account'] = $order[$i]['mobile'] ? $order[$i]['mobile'] : $order[$i]['email'];
// $tmp[$i]['is_new'] = $order[$i]['is_new'] == 1 ? '是' : '否'; // 是否为新用户 // $tmp[$i]['is_new'] = $order[$i]['is_new'] == 1 ? '是' : '否'; // 是否为新用户
......
...@@ -58,4 +58,10 @@ ...@@ -58,4 +58,10 @@
2 => 'brand_name', 2 => 'brand_name',
3 => 'num', 3 => 'num',
], ],
// 特殊业务类型
'business_type' => [
1 => '样品销售',
2 => '仓库损耗',
],
]; ];
\ No newline at end of file
...@@ -16,7 +16,18 @@ ...@@ -16,7 +16,18 @@
this.lists(internal_uid, 2, 0); this.lists(internal_uid, 2, 0);
}, },
bind: function(goods_type, is_online, internal_uid='') { //goods_type:1-联营,2-自营 is_online:是否线上订单 businessType: function() { // 自营其他业务订单
this.bind(2, 2);
},
/**
* goods_type: is_online:是否线上订单
* @param {[type]} goods_type [1-联营,2-自营]
* @param {Boolean} is_online [0-自营线下,1-联营/自营线上,2-自营其他业务]
* @param {String} internal_uid [自营内部采购账号ID]
* @return {[type]} [description]
*/
bind: function(goods_type, is_online, internal_uid='') {
var loading = this; var loading = this;
// 获取用户信息 // 获取用户信息
...@@ -25,6 +36,13 @@ ...@@ -25,6 +36,13 @@
if (!mobile) return false; if (!mobile) return false;
// 自营其他订单类型---仓库损耗
if (mobile == '15022222222') {
$('#business_type').val(2);
} else {
$('#business_type').val(1);
}
$.ajax({ $.ajax({
url: '/ajax/getUserInfo', url: '/ajax/getUserInfo',
type: 'post', type: 'post',
...@@ -113,7 +131,7 @@ ...@@ -113,7 +131,7 @@
$('.address-detail').text(data.province_val + data.city_val + data.district_val + data.detail_address); $('.address-detail').text(data.province_val + data.city_val + data.district_val + data.detail_address);
if (cart_ids.length > 0) { if (cart_ids.length > 0) {
loading.confirm(user_id, address_id, cart_ids, user_coupon_id, goods_type); // 确认订单信息 loading.confirm(user_id, address_id, cart_ids, user_coupon_id, goods_type, is_online); // 确认订单信息
} }
} }
} }
...@@ -123,7 +141,7 @@ ...@@ -123,7 +141,7 @@
$('.address_id').val(''); $('.address_id').val('');
if (cart_ids.length > 0) { if (cart_ids.length > 0) {
loading.confirm(user_id, address_id, cart_ids, user_coupon_id, goods_type); // 确认订单信息 loading.confirm(user_id, address_id, cart_ids, user_coupon_id, goods_type, is_online); // 确认订单信息
} }
} }
}) })
...@@ -326,8 +344,11 @@ ...@@ -326,8 +344,11 @@
var delivery_place = 1; // 1.大陆,2.香港 自营默认是大陆 var delivery_place = 1; // 1.大陆,2.香港 自营默认是大陆
var user_id = 0; var user_id = 0;
if (is_online) { // 线上订单 if (internal_uid) {
user_id = internal_uid;
} else {
user_id = $('.user_id').val(); user_id = $('.user_id').val();
}
if (!user_id) { if (!user_id) {
layer.msg('请先选择用户'); layer.msg('请先选择用户');
...@@ -367,9 +388,6 @@ ...@@ -367,9 +388,6 @@
return false; return false;
} }
} }
}
user_id = internal_uid ? internal_uid : user_id;
var datax = { var datax = {
uid: user_id, uid: user_id,
...@@ -410,12 +428,12 @@ ...@@ -410,12 +428,12 @@
var user_id = 0; var user_id = 0;
var delivery_place = 1; // 1.大陆,2.香港 自营默认是大陆 var delivery_place = 1; // 1.大陆,2.香港 自营默认是大陆
if (is_online) { if (internal_uid) {
user_id = internal_uid;
} else {
user_id = $('.user_id').val(); user_id = $('.user_id').val();
} }
user_id = internal_uid ? internal_uid : user_id;
if (num < min_buy) { if (num < min_buy) {
num = min_buy; num = min_buy;
layer.msg('购买数量低于最小起订量,默认调整为最小起订量'); layer.msg('购买数量低于最小起订量,默认调整为最小起订量');
...@@ -450,12 +468,12 @@ ...@@ -450,12 +468,12 @@
var user_id = 0; var user_id = 0;
var delivery_place = 1; // 1.大陆,2.香港 自营默认是大陆 var delivery_place = 1; // 1.大陆,2.香港 自营默认是大陆
if (is_online) { if (internal_uid) {
user_id = internal_uid;
} else {
user_id = $('.user_id').val(); user_id = $('.user_id').val();
} }
user_id = internal_uid ? internal_uid : user_id;
if (goods_type == 1) { // 联营需要选择交货地 if (goods_type == 1) { // 联营需要选择交货地
delivery_place = $('input[name=delivery_place]:checked').val(); delivery_place = $('input[name=delivery_place]:checked').val();
} }
...@@ -502,7 +520,7 @@ ...@@ -502,7 +520,7 @@
$('.user_coupon_id').val(''); $('.user_coupon_id').val('');
} }
loading.confirm(user_id, address_id, cart_ids, coupon_id, goods_type); // 确认订单信息 loading.confirm(user_id, address_id, cart_ids, coupon_id, goods_type, is_online); // 确认订单信息
}) })
// 切换销售类型 // 切换销售类型
...@@ -594,17 +612,17 @@ ...@@ -594,17 +612,17 @@
// 提交订单 // 提交订单
$('.submit-order').click(function() { $('.submit-order').click(function() {
var address_id = $('input[name=address_id]').val(); var address_id = $('input[name=address_id]').val();
var type = $(this).data('type'); var type = $(this).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(); // 订单备注
if (is_online) { if (internal_uid) {
user_id = internal_uid;
} else {
user_id = $('.user_id').val(); user_id = $('.user_id').val();
} }
user_id = internal_uid ? internal_uid : user_id;
$('.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);
...@@ -634,20 +652,23 @@ ...@@ -634,20 +652,23 @@
return false; return false;
} }
if (type == 4) { // 自营其他业务
var business_type = $('#business_type').val();
datax.business_type = business_type;
} else {
if ((inv_type && !tax_id) || (!tax_id && goods_type == 2)) { if ((inv_type && !tax_id) || (!tax_id && goods_type == 2)) {
layer.msg('请选择发票信息'); layer.msg('请选择发票信息');
return false; return false;
} }
}
datax.tax_id = tax_id; datax.tax_id = tax_id;
datax.user_coupon_id = user_coupon_id; datax.user_coupon_id = user_coupon_id;
} }
// 自营线上 // 自营线上
if (type == 2) { 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() {
...@@ -846,11 +867,18 @@ ...@@ -846,11 +867,18 @@
// 确认订单信息 // 确认订单信息
confirm: function(user_id, address_id, cart_ids, user_coupon_id, goods_type, is_online=1) { confirm: function(user_id, address_id, cart_ids, user_coupon_id, goods_type, is_online=1) {
var self = this; var self = this;
var business_type = $('#business_type'); // 自营其他业务
if (business_type.length > 0) {
business_type = business_type.val();
} else {
business_type = 0;
}
$.ajax({ $.ajax({
type: 'post', type: 'post',
url: '/ajax/confirm', url: '/ajax/confirm',
data: {uid: user_id, address_id: address_id, cart_ids: cart_ids, user_coupon_id: user_coupon_id, goods_type: goods_type, is_online: is_online}, data: {uid: user_id, address_id: address_id, cart_ids: cart_ids, user_coupon_id: user_coupon_id, goods_type: goods_type, is_online: is_online, business_type: business_type},
dataType: "json", dataType: "json",
success: function(resp){console.log(resp); success: function(resp){console.log(resp);
if (resp.errcode == 0) { if (resp.errcode == 0) {
...@@ -862,8 +890,9 @@ ...@@ -862,8 +890,9 @@
$('.goods_amount_val').empty().text(data.goods_total_format); // 商品总额 $('.goods_amount_val').empty().text(data.goods_total_format); // 商品总额
$('.order_amount').empty().text(data.order_amount_format); // 订单总额 $('.order_amount').empty().text(data.order_amount_format); // 订单总额
// 若优惠券ID存在,则不用再推荐 // 联营和自营线上
if (!user_coupon_id) { if (is_online != 2) {
if (!user_coupon_id) { // 若优惠券ID不存在,则推荐
$('.preferential_price').hide(); $('.preferential_price').hide();
$('.preferential_price_val').empty(); $('.preferential_price_val').empty();
...@@ -872,13 +901,14 @@ ...@@ -872,13 +901,14 @@
$('.preferential_price').show(); $('.preferential_price').show();
$('.preferential_price_val').empty().text(data.preferential_price_format); $('.preferential_price_val').empty().text(data.preferential_price_format);
} }
}
if (data.extend_fee) { if (data.extend_fee) {
$('.extend_fee').show(); $('.extend_fee').show();
$('.extend_fee_val').empty().text(data.extend_fee_format); // 附加费 $('.extend_fee_val').empty().text(data.extend_fee_format); // 附加费
} }
if (goods_type == 2) { if (goods_type == 2 && business_type != 2) { // 自营仓库损耗不需要运费
$('.express_fee_val').empty().text(data.finally_shipping_price_format); // 运费 $('.express_fee_val').empty().text(data.finally_shipping_price_format); // 运费
} }
} else { } else {
......
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
is_new = $('#is_new').val() ? $('#is_new').val() : ''; is_new = $('#is_new').val() ? $('#is_new').val() : '';
order_payment_mode = $('#order_payment_mode').val() ? $('#order_payment_mode').val() : '', order_payment_mode = $('#order_payment_mode').val() ? $('#order_payment_mode').val() : '',
is_new_order = $('#is_new_order').val() ? $('#is_new_order').val() : ''; is_new_order = $('#is_new_order').val() ? $('#is_new_order').val() : '';
business_type = $('#business_type').val() ? $('#business_type').val() : '';
if (url == '/export') { if (url == '/export') {
if (type == 1) { // 联营 if (type == 1) { // 联营
...@@ -103,12 +104,12 @@ ...@@ -103,12 +104,12 @@
} }
} else { // 自营 } else { // 自营
if (test_order.length) { if (test_order.length) {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new && !test_order.is(':checked')) { if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new && !business_type && !test_order.is(':checked')) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
} else { } else {
if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new) { if (!order_contain && !time_start && !time_end && !order_payment_mode && !order_status && !sale_type && !order_invoice_status && !order_source_pf && !order_source_adtag && !order_source_ptag && !is_new && !business_type) {
layer.msg('请选择筛选条件,再导出!'); layer.msg('请选择筛选条件,再导出!');
return false; return false;
} }
...@@ -192,6 +193,10 @@ ...@@ -192,6 +193,10 @@
listUrl += '&order_payment_mode=' + order_payment_mode; listUrl += '&order_payment_mode=' + order_payment_mode;
} }
if (business_type) {
listUrl += '&business_type=' + business_type;
}
if (test_order.is(':checked')) { if (test_order.is(':checked')) {
listUrl += '&test_order=' + 1; listUrl += '&test_order=' + 1;
} }
...@@ -363,6 +368,7 @@ ...@@ -363,6 +368,7 @@
is_new : $('#is_new').val() ? $('#is_new').val() : '', is_new : $('#is_new').val() ? $('#is_new').val() : '',
order_payment_mode : $('#order_payment_mode').val() ? $('#order_payment_mode').val() : '', order_payment_mode : $('#order_payment_mode').val() ? $('#order_payment_mode').val() : '',
is_new_order : $('#is_new_order').val() ? $('#is_new_order').val() : '', is_new_order : $('#is_new_order').val() ? $('#is_new_order').val() : '',
business_type : $('#business_type').val() ? $('#business_type').val() : '',
pid : pid, pid : pid,
}; };
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<h3>商品信息</h3> <h3>商品信息</h3>
</div> </div>
<div class="ibox-content"> <div class="ibox-content create-order">
<div class="row"> <div class="row">
<style> <style>
.search-sku{width: 240px !important;} .search-sku{width: 240px !important;}
......
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
<h3>商品信息</h3> <h3>商品信息</h3>
</div> </div>
<div class="ibox-content"> <div class="ibox-content create-order">
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<input type="text" class="search-sku" name="sku_id" value="" placeholder="请输入SKUID"> <input type="text" class="search-sku" name="sku_id" value="" placeholder="请输入SKUID">
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
<h3>商品信息</h3> <h3>商品信息</h3>
</div> </div>
<div class="ibox-content"> <div class="ibox-content create-order">
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<input type="text" class="search-sku" name="sku_id" value="" placeholder="请输入SKUID"> <input type="text" class="search-sku" name="sku_id" value="" placeholder="请输入SKUID">
......
<!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">
<div id="wrapper">
<!-- layouts.navigation -->
@include('layouts.navigation')
<div id="page-wrapper" class="gray-bg">
<div class="row">
<div class="wrapper">
@include('layouts.header')
<div class="page-content">
<div class="ibox float-e-margins">
@include('addOtherOrder.content')
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<form>
<div class="ibox-title" style="border-top:0;">
<h3>客户信息</h3>
</div>
<div class="ibox-content create-order">
<div class="row" style="margin-bottom: 30px;">
<div class="col-sm-12">
<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" style="margin-right: 10px;">新增用户账号</a>
<a href="{{Config('website.check-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>自营订单没有审核流程,所以一定要完善发票资料。</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 create-order">
<div class="row">
<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 class="batch-btn">
<a class="btn btn-success goods_import" data-type="2">批量导入物料</a>
<a class="btn btn-info" href="http://img.ichunt.com/doc/excel/template/%E8%87%AA%E8%90%A5%E8%AE%A2%E5%8D%95%E6%89%B9%E9%87%8F%E6%B7%BB%E5%8A%A0%E6%A8%A1%E6%9D%BF.xlsx">自营物料模板下载</a>
</div>
</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-responsive">
<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="">
<input type="hidden" name="goods_type" class="goods_type" value="">
<div class="clear"></div>
<a class="btn btn-success add-to-lists">添加至商品列表</a>
</div>
<!-- 商品列表 -->
<div class="shop-lists table-responsive">
<table class="table table-bordered table-hover shop-table">
<thead>
<tr>
<th width="5%">序号</th>
<th width="15%">SKUID</th>
<th width="20%">商品名称</th>
<th width="10%">制造商</th>
<th width="5%">倍数</th>
<th width="10%">采购数量</th>
<th width="10%">采购单价</th>
<th width="10%">小计</th>
<th width="6%">货期</th>
<th width="10%">供应商</th>
<th width="5%">操作</th>
</tr>
</thead>
<tbody></tbody>
</table>
<textarea name="remark" id="remark" class="form-control" placeholder="填写订单备注信息"></textarea>
</div>
</div>
<div class="order-info">
<div class="ibox-title">
<h3>订单信息</h3>
</div>
<div class="ibox-content">
<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 style="margin-top: 5px;">选择优惠券:</span></p>
<p class="con-val">
<select name="user_coupon" id="user_coupon">
<option value="">请选择</option>
</select>
</p>
</div>
<div class="row preferential_price">
<p class="con-title"><span>优惠金额:</span></p>
<p class="con-val preferential_price_val">0.00</p>
</div> -->
<div class="row extend_fee">
<p class="con-title"><span>附加费:</span></p>
<p class="con-val extend_fee_val">0.00</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">
<div class="row">
<div class="col-md-8">
<span><i class="error">*</i>业务类型:</span>
<select name="business_type" id="business_type">
@if (Config('params.business_type'))
@foreach (Config('params.business_type') as $k=>$v)
<option value="{{$k}}">{{$v}}</option>
@endforeach
@endif
</select>
</div>
<div class="col-md-4" style="text-align: right;">
<a class="btn btn-success submit-order" data-type="4">提交</a>
</div>
</div>
</div>
</form>
<script>
var sale_id = "{{$sale_id}}";
var URL_api = "{{Config('website.api_domain')}}";
$.lie.add_order.businessType();
</script>
\ No newline at end of file
...@@ -31,6 +31,10 @@ ...@@ -31,6 +31,10 @@
<th>订单类型</th> <th>订单类型</th>
@endif @endif
@if ($order_temp_info['business_type'])
<th>业务类型</th>
@endif
@if ($order_info['order_pay_type'] == 2) @if ($order_info['order_pay_type'] == 2)
<th>预付款</th> <th>预付款</th>
<th>尾款</th> <th>尾款</th>
...@@ -48,6 +52,10 @@ ...@@ -48,6 +52,10 @@
<td>{{ $order_info['sale_type'] == 1 ? '现卖' : '预售' }}</td> <td>{{ $order_info['sale_type'] == 1 ? '现卖' : '预售' }}</td>
@endif @endif
@if ($order_temp_info['business_type'])
<td>{{ Config('params.business_type')[$order_temp_info['business_type']] }}</td>
@endif
@if ($order_info['order_pay_type'] == 2) @if ($order_info['order_pay_type'] == 2)
<td>{{$currency.$order_info['advance_amount']}}</td> <td>{{$currency.$order_info['advance_amount']}}</td>
...@@ -511,7 +519,7 @@ ...@@ -511,7 +519,7 @@
<table> <table>
<tr> <tr>
<td>商品总额:</td> <td>商品总额:</td>
<td>{{$currency}}<span id="order-total" class="amount">{{$order_price_info['goods_price'] ? $order_price_info['goods_price'] : $order_info['order_amount']}}</span></td> <td>{{$currency}}<span id="order-total" class="amount">{{$order_price_info['goods_price']}}</span></td>
</tr> </tr>
@if (isset($order_price_info['ext_price'])) @if (isset($order_price_info['ext_price']))
...@@ -536,7 +544,7 @@ ...@@ -536,7 +544,7 @@
<tr> <tr>
<td>优惠金额:</td> <td>优惠金额:</td>
<td class="edit-parent-td"> <td class="edit-parent-td">
{{$currency}}<span id="other_money">{{$order_price_info['discount_amount']}}</span> <span id="other_money">{{$order_price_info['discount_amount']}}</span>
</td> </td>
</tr> </tr>
@endif @endif
...@@ -551,13 +559,22 @@ ...@@ -551,13 +559,22 @@
@endif @endif
<tr> <tr>
<td>{{ isset($order_temp_info) && $order_temp_info['order_type'] == 3 ? '(自营内部采购下单享95折优惠)' : '' }}订单总额:</td> <td>{{ isset($order_temp_info) && $order_temp_info['order_type'] == 3 && !$order_temp_info['business_type'] ? '(自营内部采购下单享95折优惠)' : '' }}订单总额:</td>
<td> <td>
<span style="color:red;font-size:20px">{{$currency}} <span style="color:red;font-size:20px">{{$currency}}
<span class="amount">{{$order_info['order_amount']}}</span> <span class="amount">{{$order_info['order_amount']}}</span>
</span> </span>
</td> </td>
</tr> </tr>
@if (isset($order_price_info['pay_preferential']) && $order_price_info['pay_preferential'] != 0)
<tr>
<td>支付优惠:</td>
<td class="edit-parent-td">
<span id="other_money">{{$order_price_info['pay_preferential']}}</span>
</td>
</tr>
@endif
</table> </table>
</div> </div>
......
...@@ -138,6 +138,19 @@ ...@@ -138,6 +138,19 @@
</dd> </dd>
</dl> --> </dl> -->
<dl>
<dt>业务类型:</dt>
<dd>
<select id="business_type" name="business_type" class="form-control business_type selectpicker" title="全部" multiple>
@if (Config('params.business_type'))
@foreach (Config('params.business_type') as $k=>$v)
<option value="{{$k}}">{{$v}}</option>
@endforeach
@endif
</select>
</dd>
</dl>
@if (in_array('self_check_test_order', $userPerms)) @if (in_array('self_check_test_order', $userPerms))
<dl> <dl>
<dt></dt> <dt></dt>
...@@ -354,6 +367,7 @@ ...@@ -354,6 +367,7 @@
var order_status = "{{$condition['order_status']}}"; var order_status = "{{$condition['order_status']}}";
var sale_type = "{{$condition['sale_type']}}"; var sale_type = "{{$condition['sale_type']}}";
var order_payment_mode = "{{$condition['order_payment_mode']}}"; var order_payment_mode = "{{$condition['order_payment_mode']}}";
var business_type = "{{$condition['business_type']}}";
var order_source_pf = "{{$condition['order_source_pf']}}"; var order_source_pf = "{{$condition['order_source_pf']}}";
var order_invoice_status = "{{$condition['order_invoice_status']}}"; var order_invoice_status = "{{$condition['order_invoice_status']}}";
var order_send = "{{$condition['order_send']}}"; var order_send = "{{$condition['order_send']}}";
...@@ -365,7 +379,7 @@ ...@@ -365,7 +379,7 @@
$('input[name=test_order]').attr('checked', true); $('input[name=test_order]').attr('checked', true);
} }
$(".order_status, .order_payment_mode, .order_source_pf").selectpicker({ $(".order_status, .order_payment_mode, .order_source_pf, .business_type").selectpicker({
actionsBox:true, //在下拉选项添加选中所有和取消选中的按钮 actionsBox:true, //在下拉选项添加选中所有和取消选中的按钮
countSelectedText:"已选中{0}项", countSelectedText:"已选中{0}项",
selectedTextFormat:"count > 5", selectedTextFormat:"count > 5",
...@@ -381,6 +395,7 @@ ...@@ -381,6 +395,7 @@
$('#order_send').selectpicker('val', order_send); $('#order_send').selectpicker('val', order_send);
$('.order_pay_type').selectpicker('val', order_pay_type.split(',')).trigger("change"); $('.order_pay_type').selectpicker('val', order_pay_type.split(',')).trigger("change");
$('.is_new').selectpicker('val', is_new.split(',')).trigger("change"); $('.is_new').selectpicker('val', is_new.split(',')).trigger("change");
$('.business_type').selectpicker('val', business_type.split(',')).trigger("change");
$.lie.order.index(); $.lie.order.index();
</script> </script>
\ No newline at end of file
...@@ -41,9 +41,12 @@ ...@@ -41,9 +41,12 @@
@elseif ($type == 2) @elseif ($type == 2)
<a class="btn btn-success" href="/self_order">查看订单</a> <a class="btn btn-success" href="/self_order">查看订单</a>
<a class="btn btn-default" href="/add_online">继续新增</a> <a class="btn btn-default" href="/add_online">继续新增</a>
@else @elseif ($type == 3)
<a class="btn btn-success" href="/self_order">查看订单</a> <a class="btn btn-success" href="/self_order">查看订单</a>
<a class="btn btn-default" href="/add_offline">继续新增</a> <a class="btn btn-default" href="/add_offline">继续新增</a>
@else
<a class="btn btn-success" href="/self_order">查看订单</a>
<a class="btn btn-default" href="/add_other_order">继续新增</a>
@endif @endif
</div> </div>
</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