Commit a0cb3837 by 朱继来

Merge branch 'zjl_inquiry_order_20210311'

parents d6919bd9 6db8641c
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Http\Error;
use DB;
use App\Http\Model\UserActionLogModel;
class AddressController extends Controller
{
// 添加收货地址
public function add(Request $request)
{
if ($request->isMethod('post')) {
$address_id = $request->input('address_id', 0);
$data = [
'user_id' => $request->input('user_id', 0),
'province' => $request->input('province', ''),
'city' => $request->input('city', ''),
'district' => $request->input('district', ''),
'detail_address' => $request->input('detail_address', ''),
'zipcode' => $request->input('zipcode', ''),
'intl_code' => $request->input('intl_code', ''),
'consignee' => $request->input('consignee', ''),
'mobile' => $request->input('mobile', ''),
'is_default' => $request->input('is_default', ''),
'address_type' => $request->input('address_type', 0),
'operator_id' => $request->user->userId,
];
$valid = $this->_valid($data);
if ($valid['errcode']) return $this->_valid($data);
if ($address_id) {
$data['address_id'] = $address_id;
$url = Config('website.api_domain').'address/update';
$errmsg = '编辑地址';
} else {
$url = Config('website.api_domain').'address/create';
$errmsg = '新增地址';
}
$data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$data['pf'] = 4;
$temp = json_decode(curlApi($url, $data, "POST"), true);
if ($temp['err_code'] != 0) return ['errcode' => Error::E_ADD_FAILED, 'errmsg' => $errmsg.'失败,'.$temp['err_msg']];
return ['errcode' => 0, 'errmsg' => $errmsg.'成功'];
}
}
// 地址
public function getRegion($region_id)
{
$region = DB::connection('member')->table('lie_region')->where('region_id', $region_id)->select('region_name')->first();
return $region ? $region->region_name : '';
}
// 获取地址信息
public function getAddressInfo(Request $request)
{
if ($request->isMethod('post')) {
$address_id = $request->input('address_id');
$info = DB::connection('member')->table('lie_user_address')->where('address_id', $address_id)->first();
if (empty($info)) return ['errcode' => Error::E_NOT_EXISTS, 'errmsg' => '未找到'];
return ['errcode' => 0, 'errmsg' => '', 'data' => $info];
}
}
//验证
private function _valid($data)
{
if (!$data['user_id']) {
return array(
'errcode' => 1,
'errmsg' => '非法操作~',
'field' => ''
);
}
if (!$data['province'] || !$data['city'] || !$data['district']) {
return array(
'errcode' => 1,
'errmsg' => '您还没选择【所在地区】~',
'field' => 'district'
);
}
if (!$data['detail_address']) {
return array(
'errcode' => 1,
'errmsg' => '您还没填写【详细地址】~',
'field' => 'detail_address'
);
}
if ($data['zipcode'] && !is_postcode($data['zipcode'])) {
return array(
'errcode' => 1,
'errmsg' => '您填写的【邮政编码】格式不正确~',
'field' => 'zipcode'
);
}
if (!$data['consignee']) {
return array(
'errcode' => 1,
'errmsg' => '您还没填写【收货人】~',
'field' => 'consignee'
);
}
if (!$data['mobile']) {
return array(
'errcode' => 1,
'errmsg' => '您还没填写【联系电话】~',
'field' => 'link_mobile'
);
}
if ($data['intl_code'] != '0086') {
$mobile = $data['intl_code'].'+'.$data['mobile'];
} else {
$mobile = $data['mobile'];
}
if (!is_mobile($mobile)) {
return array(
'errcode' => 1,
'errmsg' => '您填写的【联系电话】格式不正确~',
'field' => 'link_mobile'
);
}
return array(
'errcode' => 0,
'errmsg' => '验证通过~',
);
}
// Ajax地址列表
public function ajax_list(Request $request)
{
$addressList = array();
$map = array();
if ($request->input('user_id')) {
$map['user_id'] = $request->input('user_id', '');
}
if ($request->input('address_type') !== '') {
$map['address_type'] = $request->input('address_type', '');
}
if ($map['user_id'] && isset($map['address_type'])) {
$addressList = DB::connection('member')->table('lie_user_address')->where($map)->get();
}
if(!empty($addressList) && is_array($addressList)) {
$region = array();
foreach ($addressList as &$val) {
$region = DB::connection('member')
->table('lie_region')
->whereIn('region_id', [$val->province, $val->city, $val->district])
->select('region_id', 'region_name')
->get();
foreach ($region as $v) {
$address[$v->region_id] = $v->region_name;
}
$val->province_txt = $address[$val->province];
$val->city_txt = $address[$val->city];
$val->district_txt = $address[$val->district];
// 检查港台电话code
if ($val->intl_code && $val->intl_code != '0086') $val->mobile = $val->intl_code.'+'.$val->mobile;
}
}
$data['list'] = $addressList;
$data['isaction'] = $request->input('isaction');
return view('ajax_list', $data);
}
//设置默认地址
public function set_default(Request $request)
{
if ($request->isMethod('post')) {
$data['user_id'] = $request->input('user_id');
$data['address_id'] = $request->input('address_id');
$data['operator_id'] = $request->user->userId;
$url = Config('website.api_domain').'address/setdefault';
$data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$data['pf'] = 4;
$temp = json_decode(curlApi($url, $data, "POST"), true);
return ['errcode' => $temp['err_code'], 'errmsg' => $temp['err_msg']];
}
}
// 删除地址
public function delete(Request $request)
{
if ($request->isMethod('post')) {
$data['user_id'] = $request->input('user_id');
$data['address_id'] = $request->input('address_id');
$data['operator_id'] = $request->user->userId;
$url = Config('website.api_domain').'address/delete';
$data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$data['pf'] = 4;
$temp = json_decode(curlApi($url, $data, "POST"), true);
return ['errcode' => $temp['err_code'], 'errmsg' => $temp['err_msg']];
}
}
}
\ No newline at end of file
......@@ -203,6 +203,10 @@ function getOrderSource($order_id, $order_type=1, $order_goods_type=1)
$source = '移动端';
} else if (preg_match('/pf=6/', $order_source->order_source)) {
$source = '小程序';
} else if (preg_match('/pf=8/', $order_source->order_source)) {
$source = '询报价平台';
} else if (preg_match('/pf=9/', $order_source->order_source)) {
$source = '云芯平台';
} else {
$source = '平台';
}
......
......@@ -90,6 +90,7 @@ Route::group(['middleware' => 'web'], function () {
Route::post('/ajax/orderServiceApply', 'OrderController@orderServiceApply');
Route::get('/add_order', 'AddOrderController@addOrder');
Route::get('/add_inquiry_order', 'AddOrderController@addInquiryOrder');
Route::post('/ajax/getUserInfo', 'AddOrderController@getUserInfo');
Route::post('/ajax/selectAddr', 'AddOrderController@selectAddr');
Route::post('/ajax/selectInv', 'AddOrderController@selectInv');
......@@ -103,6 +104,7 @@ Route::group(['middleware' => 'web'], function () {
Route::post('/ajax/getSku', 'AddOrderController@getSku');
Route::post('/ajax/addCart', 'AddOrderController@addCart');
Route::post('/ajax/cartList', 'AddOrderController@cartList');
Route::post('/ajax/getOrderGift', 'AddOrderController@getOrderGift');
Route::post('/ajax/changeNum', 'AddOrderController@changeNum');
Route::post('/ajax/deleteGoods', 'AddOrderController@deleteGoods');
Route::post('/ajax/create', 'AddOrderController@create');
......@@ -148,7 +150,7 @@ Route::group(['middleware' => 'web'], function () {
Route::post('/ajax/batchImportBlackList', 'AddOrderController@batchImportBlackList');
Route::post('/address/add', 'AddressController@add');
//bom单
Route::match(['get', 'post'],'/ajax/bom/{key}', 'BomApiController@Entrance');
......
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Request;
use Excel;
use DB;
class CmsModel extends Model
{
protected $table = 'user_info';
protected $primaryKey = 'userId';
public $timestamps = false;
// 获取用户名称
public function getUserName($userId, $field='name')
{
$user = $this->where(['userId' => $userId])->select($field)->first();
return $user ? $user->$field : '';
}
// 获取用户ID
public function getSaleId($name='')
{
if (!$name) return false;
$name && $map['name'] = $name;
$user = $this->where($map)->select('userId')->first();
return $user ? $user->userId : 0;
}
/*
查询cms系统用户信息
*/
public function getUserInfo($where){
return $this->where($where)->select('userId')->first();
}
/*
批量查询用户姓名
*/
public function getBatchUserName($user_ids){
return $this->whereIn('userId',$user_ids)->select('userId','name','email')->get()->toArray();
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Request;
use Excel;
use DB;
class CmsModel extends Model
{
protected $table = 'user_info';
protected $primaryKey = 'userId';
public $timestamps = false;
// 获取用户名称
public function getUserName($userId, $field='name')
{
$user = $this->where(['userId' => $userId])->select($field)->first();
return $user ? $user->$field : '';
}
// 获取用户ID
public function getSaleId($name='')
{
if (!$name) return false;
$name && $map['name'] = $name;
$user = $this->where($map)->select('userId')->first();
return $user ? $user->userId : 0;
}
/*
查询cms系统用户信息
*/
public function getUserInfo($where){
return $this->where($where)->select('userId')->first();
}
/*
批量查询用户姓名
*/
public function getBatchUserName($user_ids)
{
return $this->whereIn('userId',$user_ids)->select('userId','name','email')->get()->toArray();
}
// 获取后台公司组织
public function getCompany()
{
return $this->from('lie_organization')->where('status', 1)->select('com_name', 'com_currency', 'id')->get()->keyBy('id')->toArray();
}
}
\ No newline at end of file
<?php
namespace App\Model\Frq;
use Illuminate\Database\Eloquent\Model;
class InquiryItemsReportModel extends Model
{
protected $connection = 'frq';
protected $table = 'inquiry_items_report';
protected $primaryKey = 'id';
public $timestamps = false;
// 获取指定销售报价
public function getData($id)
{
if (is_array($id)) return $this->whereIn('id', $id)->get()->toArray();
return $this->where('id', $id)->first();
}
}
\ No newline at end of file
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class InvoiceComUserModel extends Model
{
protected $connection = 'order';
protected $table = 'lie_invoice_com_user';
protected $guarded = ['id'];
protected $primaryKey = 'id';
public $timestamps = true;
const CREATED_AT = 'create_time';
const UPDATED_AT = 'update_time';
public function fromDateTime($value)
{
return strtotime(parent::fromDateTime($value));
}
}
\ No newline at end of file
......@@ -109,6 +109,7 @@ return [
'prefix' => 'lie_',
'strict' => false,
],
'bom' => [
'driver' => 'mysql',
'host' => env('DB_HOST_BOM', ''),
......@@ -121,6 +122,20 @@ return [
'prefix' => 'lie_',
'strict' => false,
],
'frq' => [
'driver' => 'mysql',
'host' => env('DB_HOST_RFQ', ''),
'database' => env('DB_DATABASE_RFQ', ''),
'username' => env('DB_USERNAME_RFQ', ''),
'password' => env('DB_PASSWORD_RFQ', ''),
'port' => env('DB_PORT_RFQ', 3306),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => 'lie_',
'strict' => false,
],
'sqlite' => [
'driver' => 'sqlite',
'database' => database_path('database.sqlite'),
......
......@@ -12,13 +12,27 @@
10 => '交易成功',
],
'order_pay_type' => [
// 订单付款方式
'order_pay_type' => [
1 => '全款',
2 => '预付款',
3 => '账期',
4 => '货到猎芯付款',
],
// 订单来源
'order_source_pf' => [
1 => 'PC端',
2 => '移动端',
3 => '后台',
4 => '京东',
5 => 'ERP',
6 => '小程序',
7 => '开放平台',
8 => '询报价平台',
9 => '云芯平台',
],
// 支付方式
'order_paid_name' => [
1 => '微信支付',
......
layui.define(function(exports){ //提示:模块也可以依赖其它模块,如:layui.define('layer', callback);
//行政区域选择
var obj = {
boxOjb: null,
dataCache: {
provinces: null,
citys: null,
towns: null
},
/*
* 初始化
* @param container <string/Object> 行政区域表单容器
*/
init: function(container, provinceId, cityId, districtId){
var self = this;
if ((typeof container).toLowerCase() == 'string') {
self.boxOjb = $(container);
} else {
self.boxOjb = container;
}
self.getRegionData(function(){
self.makeRegionHtml(1, 1, provinceId || 0);
self.makeRegionHtml(2, provinceId || 2, cityId || 0);
self.makeRegionHtml(3, cityId || 52, districtId || 0);
// self.bind();
});
},
getRegionData: function(callback){
var self = this;
if(self.dataCache.provinces) {
if (typeof callback == 'function') {
callback();
}
return false;
}
$.ajax({
type: 'post',
url: '/region/getAll',
dataType: 'json',
async: false,
success: function(resp){
if (!resp) {
return layer.msg('网络异常,请稍后再试~');
}
if (resp.provinces) self.dataCache.provinces = resp.provinces;
if (resp.citys) self.dataCache.citys = resp.citys;
if (resp.towns) self.dataCache.towns = resp.towns;
if (typeof callback == 'function') {
callback();
}
}
})
},
// bind: function(){
// var self = this, parent_id = 0;
// //省份选择事件
// $(self.boxOjb).find('select.s_province').on('change', function(){
// parent_id = $(this).val();
// self.makeRegionHtml(2, parent_id);
// });
// //城市选择事件
// $(self.boxOjb).find('select.s_city').on('change', function(){
// parent_id = $(this).val();
// self.makeRegionHtml(3, parent_id);
// });
// },
makeRegionHtml: function(level, parentId, selectId){
var optionHtml = [], self = this, _data = null, selectName = '', d_parent_id = 0;
switch (level) {
case 1:
selectName = 's_province';
_data = self.dataCache.provinces;
break;
case 2:
selectName = 's_city';
_data = self.dataCache.citys;
break;
case 3:
selectName = 's_county';
_data = self.dataCache.towns;
break;
}
if (_data) {
var item = null, children = null;
for (var i in _data) {
item = _data[i];
if (item && item.parent_id == parentId) {
children = item.children;
optionHtml.push('<option value="0">请选择</option>');
for (var j in children) {
if (!d_parent_id) {
d_parent_id = children[j].region_id;
}
optionHtml.push('<option value="' + children[j].region_id + '">' + children[j].region_name + '</option>');
}
break;
}
}
}
self.boxOjb.find('select.' + selectName + '').html(optionHtml.join(''));
if (level == 2) {
self.makeRegionHtml(3, d_parent_id);
}
if (selectId) self.boxOjb.find('select.' + selectName + '').val(selectId);
}
};
//输出test接口
exports('region', obj);
});
\ 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>
<link href="/js/layui/css/layui.css" rel="stylesheet">
<link href="/css/admin.css" rel="stylesheet">
<link href="/css/detail.css" rel="stylesheet">
@include('table.css')
<script src="/js/jquery-2.2.1.js"></script>
@include('table.js')
<script src="/js/layui/layui.js"></script>
<script src="/js/region.js"></script>
<script src="/js/web/common.js"></script>
<script src="/js/add_inquiry_order.js?v=<?= time() ?>"></script>
</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" style="margin-top: 10px;">
<div class="ibox float-e-margins">
<div class="ibox-content">
@include('addInquiryOrder.content')
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<style>
.address-section{ border: 1px solid #ccc; }
.address-select, .address-section{ display: none; }
</style>
<div class="layui-row">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">发货方式:</label>
<div class="layui-input-inline">
<select name="zy_delivery_type" class="zy_delivery_type" lay-verify="required">
<option value=""></option>
<option value="1">现货优先发货</option>
<option value="2">拼单发货</option>
</select>
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">销售组织:</label>
<div class="layui-input-inline layui-form" lay-filter="com_id">
<select name="com_id" class="com_id" lay-verify="required" lay-filter="lx_com_id">
<option value="1">猎芯科技</option>
<option value="2">泽茂</option>
<?php
// if ($company)
// foreach ($company as $k=>$v)
// <option value="{{ $k }}" currency="{{ $v['com_currency'] }}">{{ $v['com_name'] }}</option>
// endforeach
// endif
?>
</select>
</div>
<div class="layui-form-mid layui-word-aux">
<span class="currency-section"> 币别:<span class="currency-sign">RMB</span></span>
</div>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">交货地:</label>
<div class="layui-input-inline layui-form" lay-filter="delivery_place">
<select name="delivery_place" class="delivery_place" disabled>
<option value="1">大陆</option>
<option value="2">香港</option>
</select>
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">收货方式:</label>
<div class="layui-input-block">
<input type="radio" class="shipping_type" name="shipping_type" value="1" title="快递上门" lay-filter="shipping_type">
<input type="radio" class="shipping_type" name="shipping_type" value="2" title="自提" lay-filter="shipping_type">
</div>
</div>
</div>
</div>
<div class="layui-row address-select">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item">
<input type="hidden" name="address_id" class="address_id" value="">
<label class="layui-form-label">收货地址:</label>
<div class="layui-input-inline layui-form" lay-filter="user-address">
<select name="address" class="address" lay-verify="required" lay-filter="address-val">
</select>
</div>
<a class="layui-btn add-address">添加地址</a>
</div>
</div>
</div>
<div class="address-section">
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">联系人:</label>
<span class="address-consignee"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">联系电话:</label>
<span class="address-mobile"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">收货地址:</label>
<span class="address-detail"></span>
</div>
</div>
</div>
</div>
<style>
#user-address-pop{ display: none; margin: 20px 0px; }
#user-address-pop input{ width: 200px; }
.link_mobile{ width: 193px !important; }
#add-address-pop{ overflow: visible; }
</style>
<div id="user-address-pop">
<form class="layui-form address-form" id="address-form">
<div class="layui-row">
<div class="form-form-item layui-form" lay-filter="s_region">
<label class="layui-form-label"><i class="text-danger">*</i> 所在地区</label>
<div class="layui-input-inline">
<select name="province" class="s_province province" lay-filter="s_province"></select>
</div>
<div class="layui-input-inline">
<select name="city" class="s_city city" lay-filter="s_city"></select>
</div>
<div class="layui-input-inline">
<select name="district" class="s_county district"></select>
</div>
</div>
</div>
<div class="layui-row" style="margin-bottom: 5px;">
<div class="form-form-item layui-form-text">
<label class="layui-form-label"><i class="text-danger">*</i> 详细地址</label>
<div class="layui-input-inline">
<textarea class="layui-textarea detail_address" name="detail_address" cols="80" autocomplete="off"></textarea>
</div>
</div>
</div>
<div class="layui-row">
<div class="form-form-item">
<label class="layui-form-label">邮政编码</label>
<div class="layui-input-inline">
<input type="text" class="layui-input zipcode" name="zipcode" autocomplete="off">
</div>
</div>
</div>
<div class="layui-row">
<div class="form-form-item">
<label class="layui-form-label"><i class="text-danger">*</i> 收货人</label>
<div class="layui-input-inline">
<input type="text" class="layui-input consignee" name="consignee" autocomplete="off">
</div>
</div>
</div>
<div class="layui-row">
<div class="form-form-item">
<label class="layui-form-label"><i class="text-danger">*</i> 联系电话</label>
<div class="layui-input-inline">
<select name="intl_code" id="intl_code" style="float: left;">
<option value="0086">0086 (中国)</option>
<option value="00852">00852 (香港)</option>
<option value="00853">00853 (澳门)</option>
<option value="00886">00886 (台湾)</option>
</select>
</div>
<div class="layui-input-inline">
<input type="text" class="layui-input link_mobile" name="link_mobile" autocomplete="off">
</div>
</div>
</div>
<div class="layui-row">
<div class="form-form-item">
<label class="layui-form-label"></label>
<div class="layui-input-inline layui-form" lay-filter="is_default">
<input type="checkbox" class="layui-input is_default" name="is_default" title="设为默认地址">
</div>
</div>
</div>
</form>
</div>
\ No newline at end of file
<style type="text/css">
.addInquiryOrder .layui-colla-title{ margin-top: 0px; margin-bottom: 0px; }
.addInquiryOrder .layui-form-item{ margin-bottom: 0px; }
.addInquiryOrder label{ width: 110px; }
.addInquiryOrder span{ line-height: 37px; }
</style>
<input type="hidden" name="user_id" class="user_id" value="">
<input type="hidden" name="inv_com_id" class="inv_com_id" value="">
<div class="layui-collapse addInquiryOrder">
<form class="layui-form layui-box quoteForm" method="post">
<div class="layui-colla-item">
<h2 class="layui-colla-title">客户信息</h2>
<div class="layui-colla-content layui-show">
@include('addInquiryOrder.userInfo')
</div>
</div>
<div class="layui-colla-item address-info">
<h2 class="layui-colla-title">收货信息</h2>
<div class="layui-colla-content layui-show">
@include('addInquiryOrder.addressInfo')
</div>
</div>
<div class="layui-colla-item">
<h2 class="layui-colla-title">商品信息</h2>
<div class="layui-colla-content layui-show">
@include('addInquiryOrder.goodsInfo')
</div>
</div>
<div class="layui-colla-item order-gift-info">
<h2 class="layui-colla-title">赠品信息</h2>
<div class="layui-colla-content layui-show">
@include('addInquiryOrder.giftInfo')
</div>
</div>
<div class="layui-colla-item client-info">
<h2 class="layui-colla-title">终端客户信息</h2>
<div class="layui-colla-content layui-show">
@include('addInquiryOrder.dgkInfo')
</div>
</div>
<div class="layui-colla-item order-info">
<h2 class="layui-colla-title">订单信息</h2>
<div class="layui-colla-content layui-show">
@include('addInquiryOrder.orderInfo')
</div>
</div>
</form>
</div>
<script>
var report_ids = "{{ $report_ids }}";
console.log(report_ids)
</script>
\ No newline at end of file
<style>
.client-info label{ width: 150px; }
</style>
<div class="layui-row">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label"><i class="text-danger">*</i> 终端中文名称:</label>
<div class="layui-input-inline">
<input type="text" class="layui-input customer_cn" name="customer_cn" value="" autocomplete="off">
</div>
</div>
</div>
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label"><i class="text-danger">*</i> 客户类型:</label>
<div class="layui-input-inline">
<select class="customer_type" name="customer_type">
<option value="">请选择</option>
@if (Config('params.end_user_type'))
@foreach (Config('params.end_user_type') as $k => $v)
<option value="{{ $k }}">{{ $v }}</option>
@endforeach
@endif
</select>
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label"><i class="text-danger">*</i> 终端英文名称:</label>
<div class="layui-input-inline">
<input type="text" class="layui-input customer_en" name="customer_en" value="" autocomplete="off">
</div>
<div class="layui-form-mid">
<a href="https://translate.google.cn/" target="_blank">谷歌翻译</a>
</div>
</div>
</div>
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label"><i class="text-danger">*</i> 产品用途:</label>
<div class="layui-input-inline">
<select class="product_use_classone_sn" name="product_use_classone_sn" lay-filter="product_use_classone_sn">
<option value="">请选择</option>
@if (!empty($dgk_info['data']['data']))
@foreach ($dgk_info['data']['data'] as $k=>$v)
<option value="{{$k}}">{{$k}}</option>
@endforeach
@endif
</select>
</div>
<div class="layui-input-inline layui-form" lay-filter="product_use_classtwo_sn">
<select class="product_use_classtwo_sn" name="product_use_classtwo_sn"></select>
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label"><i class="text-danger">*</i> 客户网址:</label>
<div class="layui-input-inline">
<input type="text" class="layui-input customer_website" name="customer_website" value="" autocomplete="off">
</div>
</div>
</div>
</div>
<script>
var dgk_info = eval('('+ '<?php echo json_encode($dgk_info['data']['data']); ?>' +')');
</script>
<div class="layui-row">
<div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
<div class="layui-form-item">
<table class="layui-table gift-table">
<thead>
<tr>
<th width="10%">活动ID</th>
<th width="20%">赠品图片</th>
<th width="20%">赠品名称</th>
<th width="20%">赠品数量</th>
<th width="30%">赠品说明</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
<div class="layui-form-item">
<div class="layui-input-inline" style="width: 235px;">
<input type="text" name="sku_id" lay-verify="" placeholder="请输入SKUID" autocomplete="off" class="layui-input search-sku">
</div>
<a class="btn btn-info get-sku">获取SKU信息</a>
<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" style="margin-right: 10px;">查询联营SKU</a>
<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="1">批量导入物料</a>
<a class="btn btn-info" href="https://img.ichunt.com/doc/excel/template/%E8%81%94%E8%90%A5%E6%89%B9%E9%87%8F%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx">联营物料模板下载</a>
</div>
</div>
</div>
</div>
<!-- SKU信息 -->
<div class="sku-info" style="margin-top: 10px;">
<div class="sku-info-left">
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">SKU型号:</label>
<span class="goods_name"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">制造商:</label>
<span class="brand_name"></span>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">供应商:</label>
<span class="supplier_name"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">库存数量:</label>
<span class="stock"></span>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">起订量:</label>
<span class="moq"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">标准包装量:</label>
<span class="mpq"></span>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">是否能购买:</label>
<span class="status"></span>
</div>
</div>
</div>
</div>
<div class="sku-info-right">
<table class="layui-table ladder_price_table" style="margin: 0px;"></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>
<style>
.carts-info{ display: none; }
</style>
<!-- 商品列表 -->
<div class="carts-info">
<table id="list" lay-filter="list"></table>
<textarea name="remark" id="remark" class="layui-textarea" placeholder="填写订单备注信息"></textarea>
<script type="text/html" id="buyer_id">
@{{# if (d.buyer_id != 0) { }}
@{{ d.buyer_id }}
@{{# } }}
</script>
<script type="text/html" id="list_action">
<a class="btn btn-xs btn-danger" lay-event="del">删除</a>
</script>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">商品总额:</label>
<span class="goods_amount_val"></span>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<input type="hidden" class="user_coupon_id" name="user_coupon_id" value="">
<label class="layui-form-label">选择优惠券:</label>
<div class="layui-input-inline">
<select name="user_coupon" id="user_coupon" class="form-control">
<option value="">请选择</option>
</select>
</div>
</div>
</div>
</div>
<div class="layui-row preferential_price">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">优惠金额:</label>
<span class="preferential_price_val"></span>
</div>
</div>
</div>
<div class="layui-row extend_fee">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">附加费:</label>
<span class="extend_fee_val">0.00</span>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">运费:</label>
<span class="express_fee_val">0.00</span>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">应付金额:</label>
<span class="text-danger order_amount">0.00</span>
</div>
</div>
</div>
<div class="ibox-title" style="text-align: right;">
<a class="btn btn-success submit-order" data-type="1">提交</a>
</div>
<style type="text/css">
.inv-com-section{ display: none; }
.invoice-section-2, .invoice-section-3, .invoice-section-4{ display: none; border: 1px solid #ccc; }
</style>
<div class="layui-row">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
<div class="layui-form-item">
<input type="hidden" name="tax_id" class="tax_id" value="">
<label class="layui-form-label">开票方式:</label>
<div class="layui-input-block">
<input type="radio" class="radio-invoice-type" name="inv_type" value="3" title="增值税专用发票" lay-filter="invoice_type">
<input type="radio" class="radio-invoice-type" name="inv_type" value="4" title="增值税普通发票" lay-filter="invoice_type">
<input type="radio" class="radio-invoice-type" name="inv_type" value="" title="不开发票" lay-filter="invoice_type">
<input type="radio" class="radio-invoice-type" name="inv_type" value="2" title="个人" lay-filter="invoice_type">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs6 layui-col-sm6 layui-col-md6 inv-com-section">
<div class="layui-form-item">
<label class="layui-form-label">发票/公司:</label>
<div class="layui-input-inline">
<input type="text" name="com_name" lay-verify="" placeholder="请输入公司" autocomplete="off" class="layui-input inv_com_name inv-user-info"
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">联系方式:</label>
<div class="layui-input-inline">
<input type="text" name="account" lay-verify="required" placeholder="请输入联系方式" autocomplete="off" class="layui-input account inv-user-info">
</div>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">联系人:</label>
<div class="layui-input-inline">
<input type="text" name="user_name" lay-verify="" placeholder="请输入联系人" autocomplete="off" class="layui-input">
</div>
</div>
</div>
</div>
<!-- 与开票方式联动展示 -->
<!-- 个人 -->
<div class="invoice-section-2" style="margin-top: 10px;">
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item" style="margin-top: 5px;">
<label class="layui-form-label">选择个人发票:</label>
<div class="layui-input-inline layui-form" lay-filter="user-tax">
<select name="user_tax_id" id="user_tax_id" lay-filter="user_tax_id">
</select>
</div>
</div>
</div>
</div>
</div>
<!-- 增值税专用发票展示信息 -->
<div class="invoice-section-3">
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">发票抬头:</label>
<span class="tax_title"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">开户银行:</label>
<span class="com_bank"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">收票人:</label>
<span class="consignee"></span>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">税务登记号:</label>
<span class="tax_no"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">银行卡号:</label>
<span class="com_bank_num"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">发票联系电话:</label>
<span class="consignee_phone"></span>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">公司电话:</label>
<span class="com_tel"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">公司注册地址:</label>
<span class="com_addr"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">收票地址:</label>
<span class="consignee_address"></span>
</div>
</div>
</div>
</div>
<!-- 增值税普通发票展示信息 -->
<div class="invoice-section-4">
<div class="layui-row">
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">发票抬头:</label>
<span class="tax_title_1"></span>
</div>
</div>
<div class="layui-col-xs4 layui-col-sm4 layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">税务登记号:</label>
<span class="tax_no_1"></span>
</div>
</div>
</div>
</div>
\ 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">
<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('addOrder.content')
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<!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('addOrder.content')
</div>
</div>
</div>
</div>
</div>
</div>
</body>
......@@ -140,13 +140,11 @@
<dt>订单来源:</dt>
<dd>
<select id="order_source_pf" name="order_source_pf" class="form-control order_source_pf selectpicker" title="全部" multiple>
<option value="1">PC端</option>
<option value="2">移动端</option>
<option value="3">后台</option>
<option value="4">京东</option>
<option value="5">ERP</option>
<option value="6">小程序</option>
<option value="7">开放平台</option>
@if (Config('params.order_source_pf'))
@foreach (Config('params.order_source_pf') as $k=>$v)
<option value="{{ $k }}">{{ $v }}</option>
@endforeach
@endif
</select>
</dd>
</dl>
......
......@@ -115,12 +115,11 @@
<dt>订单来源:</dt>
<dd>
<select id="order_source_pf" name="order_source_pf" class="form-control order_source_pf selectpicker" title="全部" multiple>
<option value="1">PC端</option>
<option value="2">移动端</option>
<option value="3">后台</option>
<option value="4">京东</option>
<option value="6">小程序</option>
<option value="7">象牙宝</option>
@if (Config('params.order_source_pf'))
@foreach (Config('params.order_source_pf') as $k=>$v)
<option value="{{ $k }}">{{ $v }}</option>
@endforeach
@endif
</select>
</dd>
</dl>
......
......@@ -37,7 +37,9 @@
<div class="section-3">
@if ($type == 1)
<a class="btn btn-success" href="/change/{{ $order_info->order_id }}">审核订单</a>
<a class="btn btn-default" href="/add_order">继续新增</a>
@if (!$is_quiry)
<a class="btn btn-default" href="/add_order">继续新增</a>
@endif
@elseif ($type == 2)
<a class="btn btn-success" href="/self_order">查看订单</a>
<a class="btn btn-default" href="/add_online">继续新增</a>
......
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="/css/style.css" rel="stylesheet">
<style>
.well .form-group {
margin-right: 0px;
margin-left: 0px;
}
</style>
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="/css/style.css" rel="stylesheet">
<style>
.well .form-group {
margin-right: 0px;
margin-left: 0px;
}
</style>
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