Commit 898eda37 by 朱继来

回滚

parent 99cb6cda
......@@ -78,7 +78,6 @@ Class AddOrderController extends Controller
$url = Config('website.api_domain').'cart/getDJKConfg';
$info['api_dgk_url'] = ($url.'?k1='.$data['k1']."&".'k2='.$data['k2']);
$info['company'] = (new CmsModel())->getCompany(); // 获取公司组织
return view('addOrder', $info);
}
......@@ -553,8 +552,6 @@ Class AddOrderController extends Controller
$data['cart_id'] = implode(',', $request->input('cart_ids'));
$data['type'] = $request->input('type');
$data['remark'] = $request->input('remark');
$data['com_id'] = $request->input('com_id', 0);
$data['com_name'] = $request->input('com_name', '');
if ($data['type'] == 3) { // 自营线下订单
$data['address_name'] = $request->input('address_name');
......
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Request;
use Excel;
use DB;
class CmsModel extends Model
{
protected $table = 'user_info';
protected $primaryKey = 'userId';
public $timestamps = false;
// 获取用户名称
public function getUserName($userId, $field='name')
{
$user = $this->where(['userId' => $userId])->select($field)->first();
return $user ? $user->$field : '';
}
// 获取用户ID
public function getSaleId($name='')
{
if (!$name) return false;
$name && $map['name'] = $name;
$user = $this->where($map)->select('userId')->first();
return $user ? $user->userId : 0;
}
/*
查询cms系统用户信息
*/
public function getUserInfo($where){
return $this->where($where)->select('userId')->first();
}
/*
批量查询用户姓名
*/
public function getBatchUserName($user_ids)
{
return $this->whereIn('userId',$user_ids)->select('userId','name','email')->get()->toArray();
}
// 获取后台公司组织
public function getCompany()
{
return $this->from('lie_organization')->where('status', 1)->select('com_name', 'com_currency', 'id')->get()->keyBy('id')->toArray();
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Request;
use Excel;
use DB;
class CmsModel extends Model
{
protected $table = 'user_info';
protected $primaryKey = 'userId';
public $timestamps = false;
// 获取用户名称
public function getUserName($userId, $field='name')
{
$user = $this->where(['userId' => $userId])->select($field)->first();
return $user ? $user->$field : '';
}
// 获取用户ID
public function getSaleId($name='')
{
if (!$name) return false;
$name && $map['name'] = $name;
$user = $this->where($map)->select('userId')->first();
return $user ? $user->userId : 0;
}
/*
查询cms系统用户信息
*/
public function getUserInfo($where){
return $this->where($where)->select('userId')->first();
}
/*
批量查询用户姓名
*/
public function getBatchUserName($user_ids){
return $this->whereIn('userId',$user_ids)->select('userId','name','email')->get()->toArray();
}
}
\ No newline at end of file
......@@ -427,8 +427,7 @@
}
// if (goods_type == 1) { // 联营需要选择交货地
// delivery_place = $('input[name=delivery_place]:checked').val();
delivery_place = $('.delivery_place').val();
delivery_place = $('input[name=delivery_place]:checked').val();
if (delivery_place == null) {
layer.msg('请选择交货地');
......@@ -482,44 +481,14 @@
})
})
// 选择销售组织
$('.com_id').change(function() {
var val = $(this).val();
if (!val) return false;
var currency = $(this).find("option:selected").data('currency');
var currency_sign = '';
var delivery_place = 0;
if (currency == 1) {
currency_sign = 'RMB';
delivery_place = 1;
} else {
currency_sign = 'USD';
delivery_place = 2;
}
// $('input[name=delivery_place][value='+delivery_place+']').attr('checked', true);
// $('input[name=delivery_place][value='+delivery_place+']').trigger('click');
$('.delivery_place').val(delivery_place);
$('.currency-sign').text(currency_sign);
$('.currency-section').show();
// 切换交货地
$('.delivery_place').click(function() {
var user_id = $('.user_id').val();
var delivery_place = $(this).val();
loading.lists(user_id, goods_type, is_online, delivery_place); // 加载购物车列表
})
// 切换交货地
// $('.delivery_place').click(function() {
// var user_id = $('.user_id').val();
// var delivery_place = $(this).val();
// loading.lists(user_id, goods_type, is_online, delivery_place); // 加载购物车列表
// })
// 调整商品数量
$('.shop-table').delegate('.goods_num', 'blur', function() {
var self = $(this);
......@@ -849,17 +818,6 @@
datax.customer_website = customer_website;
}
var com_id = $('.com_id').val(); // 公司ID
var com_name = $('.com_id').find("option:selected").text(); // 公司名称
if (!com_id) {
layer.msg('请选择销售组织');
return false;
}
datax.com_id = com_id;
datax.com_name = com_name;
datax.tax_id = tax_id;
datax.user_coupon_id = user_coupon_id;
datax.zy_delivery_type = zy_delivery_type;
......
......@@ -241,40 +241,15 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<span><i class="text-danger">*</i> 销售组织:</span>
<select name="com_id" class="com_id">
<option value="">请选择</option>
@if ($company)
@foreach ($company as $k=>$v)
<option value="{{ $k }}" data-currency="{{ $v['com_currency'] }}">{{ $v['com_name'] }}</option>
@endforeach
@endif
</select>
<span class="currency-section hide"> 币别:<span class="currency-sign"></span></span>
</div>
<div class="form-group">
<span>交货地址:</span>
<select name="delivery_place" class="delivery_place" disabled>
<option value="1">大陆</option>
<option value="2">香港</option>
</select>
</div>
</div>
<!-- <div class="col-sm-6">
<div class="form-group">
<span>交货地址:</span>
<label class="radio-inline">
<input type="radio" name="delivery_place" class="delivery_place" value="1" checked="checked" disabled="disabled"> 大陆
<input type="radio" name="delivery_place" class="delivery_place" value="1" checked="checked"> 大陆
</label>
<label class="radio-inline">
<input type="radio" name="delivery_place" class="delivery_place" value="2" disabled="disabled"> 香港
<input type="radio" name="delivery_place" class="delivery_place" value="2"> 香港
</label>
</div>
</div> -->
</div>
</div>
</div>
......
......@@ -136,7 +136,7 @@
<!-- 目前仅支持联营商品退款 -->
<?php $goods_count = 0; ?>
@foreach ($order_items_info as $k => $v)
@if ($v['order_goods_type'] == 1 && $v['status'] == 1)
@if ($v['order_goods_type'] == 1)
<?php $goods_count++; ?>
<tr>
<input type="hidden" name="service_item[{{ $v['rec_id'] }}][rec_id]" value="{{ $v['rec_id'] }}">
......
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