-
+
+
-
+
+
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/application/extra/site.php b/application/extra/site.php
deleted file mode 100755
index 7df4673..0000000
--- a/application/extra/site.php
+++ /dev/null
@@ -1,46 +0,0 @@
- '神帝',
- 'beian' => '2',
- 'cdnurl' => '',
- 'version' => '1.0.2',
- 'timezone' => 'Asia/Shanghai',
- 'forbiddenip' => '',
- 'languages' =>
- array (
- 'backend' => 'zh-cn',
- 'frontend' => 'zh-cn',
- ),
- 'fixedpage' => 'dashboard',
- 'categorytype' =>
- array (
- 'default' => 'Default',
- 'page' => 'Page',
- 'article' => 'Article',
- 'test' => 'Test',
- ),
- 'configgroup' =>
- array (
- 'basic' => 'Basic',
- 'email' => 'Email',
- 'dictionary' => 'Dictionary',
- 'user' => 'User',
- 'example' => 'Example',
- ),
- 'mail_type' => '1',
- 'mail_smtp_host' => 'smtp.qq.com',
- 'mail_smtp_port' => '465',
- 'mail_smtp_user' => '',
- 'mail_smtp_pass' => '',
- 'mail_verify_type' => '2',
- 'mail_from' => '',
- 'attachmentcategory' =>
- array (
- 'category1' => 'Category1',
- 'category2' => 'Category2',
- 'custom' => 'Custom',
- ),
- 'ip_check' => '0',
- 'allowip' => '',
-);
diff --git a/application/services/OrderDispatchService.php b/application/services/OrderDispatchService.php
index 300c2d4..ecac62f 100644
--- a/application/services/OrderDispatchService.php
+++ b/application/services/OrderDispatchService.php
@@ -402,6 +402,7 @@ class OrderDispatchService extends BaseService
$order->is_material_used = $params['is_material_used'];
if ($order->is_material_used == 1) {
// 材料成本
+ $orderDispatch->material_cost = $params['material_cost'];
$order->material_cost = $params['material_cost'];
// 材料凭证图片组
$order->material_images = $this->removeStrCdnUrl($params['material_images']);
diff --git a/public/assets/css/create-order.css b/public/assets/css/create-order.css
new file mode 100644
index 0000000..df7b9d2
--- /dev/null
+++ b/public/assets/css/create-order.css
@@ -0,0 +1,226 @@
+.body-hidden {
+ visibility: hidden;
+ opacity: 0;
+}
+
+.body-shown {
+ visibility: visible;
+ opacity: 1;
+ transition: opacity 0.3s ease;
+}
+
+.flex-c {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+.flex-r {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+}
+
+.flex-l {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+}
+
+.flex-sb {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+.full-height {
+ width: 100vw;
+ height: 768px;
+ background: #f1f4f6;
+}
+
+.line {
+ width: 100%;
+ height: 40px;
+ margin-bottom: 10px;
+}
+.line .item {
+ width: 280px;
+ height: 40px;
+}
+
+.title {
+ width: 100px;
+ height: 40px;
+ font-weight: 500;
+ font-size: 14px;
+ color: rgba(0,0,0,0.9);
+}
+.title .required {
+ color: #E6521F;
+}
+
+.item .value {
+ width: 180px;
+ height: 40px;
+}
+.line>.value {
+ width: 494px !important;
+ height: 40px;
+ padding: 0 !important;
+}
+
+.value .form-input {
+ height: 34px !important;
+ color: rgba(0,0,0,0.9) !important;
+ border: 1px solid rgba(0,0,0,0.15) !important;
+ border-radius: 4px !important;
+}
+
+.value>.city-picker-span {
+ height: 34px !important;
+ border: 1px solid rgba(0,0,0,0.15) !important;
+ border-radius: 4px !important;
+ padding: 0 12px !important;
+}
+
+.value>.city-picker-span > .title > span {
+ color: rgba(0,0,0,0.9) !important;
+ font-weight: 400 !important;
+}
+
+.item .value>.bootstrap-select>.btn {
+ height: 34px !important;
+ border-radius: 4px !important;
+ border: 1px solid rgba(0,0,0,0.15) !important;
+ box-sizing: border-box !important;
+ background-color: #FFFFFF !important;
+ color: rgba(0,0,0,0.9) !important;
+}
+.item .value>.bootstrap-select>.btn .filter-option {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+}
+
+.item .value > .zd-input--suffix {
+ height: 40px !important;
+ line-height: 40px !important;
+}
+.zd-cascader-wrap>.zd-input>.zd-input__inner {
+ height: 34px !important;
+ color: rgba(0,0,0,0.9) !important;
+ border: 1px solid rgba(0,0,0,0.15) !important;
+ padding: 0 12px !important;
+}
+.line .select-address {
+ width: 100px;
+ height: 60px;
+}
+.select-address .title {
+ width: 100px;
+ height: 30px;
+}
+.select-address .select-ctr {
+ width: 100px;
+ height: 30px;
+}
+
+.multi-line {
+ height: 60px;
+}
+.form-textarea {
+ width: 494px !important;
+ height: 60px !important;
+ color: rgba(0,0,0,0.9) !important;
+ border: 1px solid rgba(0,0,0,0.15) !important;
+ border-radius: 4px !important;
+ resize: none;
+}
+#area_map {
+ width: 64px;
+ height: 26px;
+ border-radius: 4px;
+}
+.bt-40 {
+ margin-bottom: 40px !important;
+}
+
+.radio > label, .checkbox > label {
+ margin-right: 40px;
+}
+input[type="radio"] {
+ transform: scale(1.2);
+}
+
+.radio > label > input, .checkbox > label > input {
+ margin: 4px 0 0;
+}
+
+.faupload-preview {
+ padding-bottom: 20px;
+}
+.value .input-group {
+ height: 40px;
+}
+
+.right {
+ padding: 20px 30px;
+ box-sizing: border-box;
+}
+
+.smart-text,.smart-text-item,.smart-text-line {
+ width: 326px !important;
+ height: 140px !important;
+}
+.smart-btn {
+ width: 94px;
+ height: 38px;
+ background: #444c69;
+ border-radius: 4px;
+ font-weight: 400;
+ font-size: 14px;
+ color: #FFFFFF;
+ cursor: pointer;
+ user-select: none;
+}
+.smart-btn>.img {
+ width: 16px;
+ height: 16px;
+ margin-right: 2px;
+}
+.smart-btn:hover {
+ background: #3d445f;
+}
+.smart-btn:active {
+ background: #3a425b;
+}
+
+.submit-ctr {
+ width: 270px;
+ height: 80px;
+ position: absolute;
+ right: 30px;
+ bottom: 44px;
+}
+.submit-ctr> .submit {
+ width: 108px;
+ height: 46px;
+ box-shadow: 0px 8px 32px 0px rgba(0,0,0,0.16);
+ border-radius: 4px;
+ font-weight: 400;
+ font-size: 16px;
+}
+
+.submit-ctr> .submit-continue {
+ width: 140px;
+ height: 46px;
+ box-shadow: 0px 8px 32px 0px rgba(0,0,0,0.16);
+ border-radius: 4px;
+ font-weight: 400;
+ font-size: 16px;
+}
+
+.images-input {
+ width: 180px;
+ padding: 0 12px;
+}
diff --git a/public/assets/img/automation.png b/public/assets/img/automation.png
new file mode 100644
index 0000000..943f600
Binary files /dev/null and b/public/assets/img/automation.png differ
diff --git a/public/assets/js/addons.js b/public/assets/js/addons.js
index 6299f6b..0f3bdcb 100755
--- a/public/assets/js/addons.js
+++ b/public/assets/js/addons.js
@@ -1,7 +1,6 @@
define([], function () {
require([], function () {
//绑定data-toggle=addresspicker属性点击事件
-
$(document).on('click', "[data-toggle='addresspicker']", function () {
var that = this;
var callback = $(that).data('callback');
diff --git a/public/assets/js/backend/order.js b/public/assets/js/backend/order.js
index 0122db0..09f62b5 100644
--- a/public/assets/js/backend/order.js
+++ b/public/assets/js/backend/order.js
@@ -4,6 +4,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
$('[name^="row["]').val('');
$("#c-city").citypicker('reset');
$("#item_id").val('');
+ $('.zd-cascader-menu').find('li.in-active-path').removeClass('in-active-path');
+ $('.zd-cascader-panel').find('.is-selected-icon').remove();
$("#item_id_value").val('');
$(".selectpicker").val('').selectpicker('refresh');
}
@@ -26,23 +28,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
// 拼装文本
function assembleOrderMessage(data) {
- const message = `
-【订单详情】
-录单员: ${data.user.nickname}
-订单编号: ${data.order_no}
+ const message = `订单编号: ${data.order_no}
服务名称: ${data.item_title}
-客户姓名: ${data.customer}
+客户昵称: ${data.customer}
客户电话: ${data.tel}
-上门时间: ${data.plan_time}
-优惠码: ${data.coupon?.description||'无'}
-订单状态: ${data.status_text}
-详细地址: ${data.address}
-订单详情: ${data.detail}
+客户地址: ${data.address}
+收款金额: ${data.receive_type === 1 ? '已收定金 ' + data.online_amount : '已收全款 ' + data.online_amount}
+优惠活动: ${data.coupon?.description || '无'}
+订单详情: ${data.detail || '无'}
订单备注: ${data.remark}
-派单方式: ${data.dispatch_type === 1 ? '手动派单' : '自动派单'}
-收款方式: ${data.receive_type === 1 ? '已收定金' : '已收全款'}
-
-请查收以上订单信息。`;
+预约时间: ${data.plan_time || '无'}
+`;
return message;
}
@@ -74,9 +70,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
fixedRightNumber: 1,
fixedNumber: 3,
fixedColumns: true,
- renderDefault:true,
- searchFormVisible:true,
- search:false,
+ renderDefault: true,
+ searchFormVisible: true,
+ search: false,
columns: [
[
{checkbox: true},
@@ -84,7 +80,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
{
field: 'status',
title: __('Status'),
- fixed:true,
+ fixed: true,
searchList: {
"0": __('Status 0'),
"10": __('Status 10'),
@@ -99,10 +95,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
/*"-20": __('Status -20'),
"-30": __('Status -30')*/
},
- defaultValue:10,
+ defaultValue: 10,
formatter: Table.api.formatter.status,
- custom:{
- "10":"my_dispatch"
+ custom: {
+ "10": "my_dispatch"
}
},
{
@@ -121,7 +117,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
{field: 'order_no', title: __('Order_no'), operate: 'LIKE'},
{field: 'customer', title: __('Customer'), operate: 'LIKE'},
{field: 'tel', title: __('Tel'), operate: 'LIKE'},
- {field: 'area.merge_name', title: __('Area_id'),searchable:false},
+ {field: 'area.merge_name', title: __('Area_id'), searchable: false},
{
field: 'address',
title: __('Address'),
@@ -203,7 +199,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
extend: 'data-toggle="tooltip" data-container="body"',
classname: 'btn btn-xs btn-info btn-editone',
visible: function (row) {
- if (row.status != 60 && row.status != 70) {
+ if (row.status != 60 && row.status != 70) {
return true;
}
return false;
@@ -275,7 +271,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
}
return false;
},
- callback:function (){
+ callback: function () {
table.bootstrapTable('refresh');
}
},
@@ -336,17 +332,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
},
},
{
- name:"error",
- text:"订单报错",
- title:"订单报错",
+ name: "error",
+ text: "订单报错",
+ title: "订单报错",
extend: 'data-toggle="tooltip" data-container="body"',
classname: 'btn btn-dialog',
icon: 'fa fa-bolt',
url: 'order/addAbnormal',
- refresh:true,
+ refresh: true,
dropdown: "更多",
visible: function (row) {
- if (row.status != 60 && row.status != 70) {
+ if (row.status != 60 && row.status != 70) {
return true;
}
return false;
@@ -413,71 +409,91 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
});
const timer = setInterval(function () {
table.bootstrapTable('refresh', {});
- },1000 * 120);
+ }, 1000 * 120);
},
add: function () {
$("#mybuttom").on("click", function () {
const res = $("form[role=form]").isValid();
- if (res){
- Form.api.submit($("form[role=form]"));
- // Toastr.success('录入成功');
+ if ($('#lng').val() && $('#lng').val() !== ''){
+ if (res) {
+ Form.api.submit($("form[role=form]"),function (data){
+ copyToClipboard(assembleOrderMessage(data));
+ });
+
+ }
+ }else{
+ Toastr.success('请选择有效地址');
}
+
return false;
});
+
$("#mysubmit").on("click", function () {
const res = $("form[role=form]").isValid();
- if (res){
- Form.api.submit($("form[role=form]"));
- clearInfo();
- // Toastr.success('录入成功');
+
+ if ($('#lng').val() && $('#lng').val() !== ''){
+ if (res) {
+ Form.api.submit($("form[role=form]"), function (data, ret) {
+ clearInfo();
+ copyToClipboard(assembleOrderMessage(data));
+ return false;
+ });
+ }
+ }else{
+ Toastr.success('请选择有效地址');
}
return false;
});
- Form.api.bindevent($("form[role=form]"));
- $("#smart").on("click", function () {
- $.ajax({
- url: "order/smart", // 你的 API 地址
- type: "GET",
- dataType: "json",
- data: {
- str: $('#smart_text').val()
- },
- success: function (data) {
- if (data.code === 1) {
- data = data.data;
- if (data.mobile !== '') {
- $('#c-tel').val(data.mobile);
- }
- if (data.name !== '') {
- $('#c-customer').val(data.name);
- }
- if (data.item.id !== 0) {
- $('#item_id_value').val(data.item.id);
- $('#item_id').val(data.item.item);
- }
- if (data.idn) {
- $('#c-source-id').val(data.idn);
- }
- let citypicker = $('#c-city');
- // $city.citypicker({
- // province: data.province,
- // city: data.city,
- // district: data.region
- // });
- citypicker.val(data.province + '/' + data.city + '/' + data.region);
- citypicker = citypicker.data("citypicker");
- citypicker.refresh();
- var code = citypicker.getCode("district") || citypicker.getCode("city") || citypicker.getCode("province");
- $("#area_id").val(code);
- $("#area_name").val(citypicker.getVal());
- }
- },
- error: function () {
- console.error("请求失败");
- }
- });
+ $("#smart").on("click", function () {
+ Fast.api.ajax({
+ url: "order/smart", // 你的 API 地址
+ type: "post",
+ contentType: 'application/json',
+ dataType: "json",
+ data: JSON.stringify({
+ str: $('#smart_text').val()
+ })
+ }, function (data) {
+ if (data.mobile !== '') {
+ $('#c-tel').val(data.mobile);
+ }
+ if (data.name !== '') {
+ $('#c-customer').val(data.name);
+ }
+ if (data.item.id !== 0) {
+ $('#item_id_value').val(data.item.id);
+ $('#item_id').val(data.item.item);
+ }
+ if (data.idn) {
+ $('#c-source-id').val(data.idn);
+ }
+ // $city.citypicker({
+ // province: data.province,
+ // city: data.city,
+ // district: data.region
+ // });
+ if (data.area_id) {
+ $("#area_id").val(data.area_id);
+ }
+ if (data.lat) {
+ $("#lat").val(data.lat);
+ }
+ if (data.lng) {
+ $("#lng").val(data.lng);
+ }
+ if (data.area_id) {
+ $("#area_id").val(data.area_id);
+ }
+ if (data.addr && data.addr !== '') {
+ $("#c-address").val(data.addr);
+ $("#area_name").val(data.addr);
+ }
+ Toastr.info('识别成功');
+ return false;
+ });
});
+ Controller.api.bindevent();
Controller.api.map();
},
edit: function () {
@@ -519,11 +535,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
$('#c-bank_account').closest('.form-group').hide();
}
}
+
// 初始化时执行一次
toggleInvoiceFields();
// 监听 select 改变
- $('#c-source').on('change',function () {
+ $('#c-source').on('change', function () {
toggleInvoiceFields();
});
Form.api.bindevent($("form[role=form]"));
@@ -532,7 +549,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
},
- map:function () {
+ map: function () {
$("#c-city").on("cp:updated", function () {
var citypicker = $(this).data("citypicker");
var code = citypicker.getCode("district") || citypicker.getCode("city") || citypicker.getCode("province");
@@ -540,16 +557,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
$("#area_id").val(code);
$("#area_name").val(citypicker.getVal());
});
- // $("#area_map").data("callback", function (res) {
- // Form.api.target($('#c-address'));
- // });
$(document).on('click', "#area_map", function (e) {
- const data = $("#c-city").val();
- if (!data){
- Toastr.error('请先选择区域');
- return false;
- }
-
var that = this;
var callback = $(that).data('callback');
var input_id = $(that).data("input-id") ? $(that).data("input-id") : "";
@@ -558,24 +566,24 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
var zoom_id = $(that).data("zoom-id") ? $(that).data("zoom-id") : "";
var lat = lat_id ? $("#" + lat_id).val() : '';
var lng = lng_id ? $("#" + lng_id).val() : '';
- var city_code = $("#c-city").val();
+ var city_code = $("#area_id").val();
var zoom = zoom_id ? $("#" + zoom_id).val() : '';
- var url = "/addons/address/index/select?a=1";
+ var url = "/addons/address/index/select?";
url += (lat && lng) ? 'lat=' + lat + '&lng=' + lng +
(input_id ? "&address=" + $("#" + input_id).val() : "")
- +(zoom ? "&zoom=" + zoom : "") : ''
+ + (zoom ? "&zoom=" + zoom : "") : ''
;
- if (city_code){
+ if (city_code) {
url += city_code ? "&city_code=" + city_code : "";
}
// console.log(url);
Fast.api.open(url, '位置选择', {
- callback: function (res) {
+ callback: function (res, data) {
input_id && $("#" + input_id).val(res.address).trigger("change");
lat_id && $("#" + lat_id).val(res.lat).trigger("change");
lng_id && $("#" + lng_id).val(res.lng).trigger("change");
zoom_id && $("#" + zoom_id).val(res.zoom).trigger("change");
-
+ $('#area_id').val(res.city_code);
try {
//执行回调函数
if (typeof callback === 'function') {
@@ -588,9 +596,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
});
});
-
var _data = items;
-
$('#item_id').zdCascader({
data: _data,
onChange: function ($this, data, allPathData) {
@@ -599,6 +605,162 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
}
});
$('#item_id').val($('#item_id').data('value')).focus();
+
+ const mainSelect = document.getElementById('receive_type');
+ const otherSelect = document.getElementById('coupon');
+
+ function toggleOtherSelect() {
+ if (mainSelect.value === '2') {
+ otherSelect.style.display = 'none';
+ } else {
+ otherSelect.style.display = '';
+ }
+ }
+
+ mainSelect.addEventListener('change', toggleOtherSelect);
+ toggleOtherSelect();
+
+ $('input[name="row[set_time]"]').on('change', toggleTime);
+
+ function toggleTime() {
+ var val = $('input[name="row[set_time]"]:checked').val();
+ if (val == 1) {
+ $('#set-time').show();
+ } else {
+ $('#set-time').hide();
+ }
+ }
+
+ toggleTime();
+
+ const amapKey = 'c299da50c080dfccf9b1d00560ff9639';
+
+ let isComposing = false;
+ let addressSelected = false;
+ let selectedIndex = -1;
+ $('#c-address')
+ .on('compositionstart', () => {
+ isComposing = true;
+ })
+ .on('compositionend', () => {
+ isComposing = false;
+ // 不执行 handleInput,由 input 触发
+ })
+ .on('input', debounce(function (e) {
+ if (!isComposing) handleInput(e);
+ }, 300))
+ .on('blur', function () {
+ // 如果还没有选择地址,且列表中有内容,则默认选择第一个
+
+ // 如果还没有选择地址,且列表中有内容,则默认选择第一个
+ if (!addressSelected && $('#suggestionList li').length > 0) {
+ $('#suggestionList li').first().trigger('mousedown');
+ }
+
+ $('#suggestionList').hide();
+ })
+ .on('focus', function () {
+ // 如果还没有选择地址,且列表中有内容,则默认选择第一个
+ $('#suggestionList').show();
+ })
+ .on('keydown', function (e) {
+ const $items = $('#suggestionList li');
+ const len = $items.length;
+
+ if (!len) return;
+
+ if (e.key === 'ArrowDown') {
+ e.preventDefault();
+ selectedIndex = (selectedIndex + 1) % len;
+ updateActiveItem($items);
+ } else if (e.key === 'ArrowUp') {
+ e.preventDefault();
+ selectedIndex = (selectedIndex - 1 + len) % len;
+ updateActiveItem($items);
+ } else if (e.key === 'Enter') {
+ if (selectedIndex >= 0 && selectedIndex < len) {
+ e.preventDefault();
+ $items.eq(selectedIndex).trigger('mousedown');
+ }
+ }
+ });
+ function updateActiveItem($items) {
+ $items.removeClass('active');
+ if (selectedIndex >= 0) {
+ const $active = $items.eq(selectedIndex);
+ $active.addClass('active');
+
+ // 自动滚动使其可见
+ const container = $('#suggestionList')[0];
+ const item = $active[0];
+
+ if (item && container) {
+ const itemTop = item.offsetTop;
+ const itemBottom = itemTop + item.offsetHeight;
+ const containerTop = container.scrollTop;
+ const containerBottom = containerTop + container.clientHeight;
+
+ if (itemTop < containerTop) {
+ container.scrollTop = itemTop;
+ } else if (itemBottom > containerBottom) {
+ container.scrollTop = itemBottom - container.clientHeight;
+ }
+ }
+ }
+ }
+
+
+ function handleInput(e) {
+ selectedIndex = -1;
+ addressSelected = false;
+ const keyword = $(e.target).val();
+ if (!keyword.trim() || /^[\s\p{P}]+$/u.test(keyword)) return;
+ if (!keyword) return $('#c-address').empty();
+
+ $.getJSON('https://restapi.amap.com/v3/assistant/inputtips', {
+ key: amapKey,
+ keywords: keyword,
+ datatype: 'all',
+ city: '全国',
+ }, function (res) {
+ if (res.tips) {
+ let html = '';
+ res.tips.forEach(tip => {
+ if (tip.location) {
+ html += `
+ ${tip.district} ${tip.name}
+ `;
+ }
+ });
+ $('#suggestionList').html(html).show();
+ }
+ });
+ }
+
+ function debounce(fn, delay = 300) {
+ let timer = null;
+ return function (...args) {
+ clearTimeout(timer);
+ timer = setTimeout(() => {
+ fn.apply(this, args);
+ }, delay);
+ };
+ }
+
+
+ $('#suggestionList').on('mousedown', 'li', function (e) {
+ const name = $(this).data('name');
+ const location = $(this).data('location'); // "经度,纬度"
+ const [lng, lat] = location.split(',');
+ console.log('click');
+ // $('#c-address').val(name);
+ $('#lng').val(lng);
+ $('#lat').val(lat);
+ // 隐藏提示列表
+ $('#suggestionList').hide();
+ selectedIndex = -1;
+ addressSelected = true;
+ });
}
}
};
diff --git a/public/assets/js/cascader.js b/public/assets/js/cascader.js
index 3b82dc2..6f3d6e5 100644
--- a/public/assets/js/cascader.js
+++ b/public/assets/js/cascader.js
@@ -132,6 +132,10 @@
this.search(this.$el.val());
}, this));
}
+ ZdCascader.prototype.clear_path_class = function () {
+ this.$dropdownWrap.find('li.' + this.CLASS.checkClass.nodeAnchor).removeClass(this.CLASS
+ .checkClass.nodeAnchor);
+ }
ZdCascader.prototype._wrapClick = function () {
event.stopPropagation();
this.$el.focus();
@@ -307,7 +311,8 @@
this.reload(null, true)
return
};
- var keywords = keyword.replace(' ','').replace('/','').split('')
+ var keywords = [keyword];
+ // console.log(keywords);
var data = this.labelList.filter(function(item) {
item.num = 0
keywords.forEach(function(key) {
@@ -317,8 +322,7 @@
return item.num>(keywords.length==1?0:1)
}).sort(function(a, b) {
return b.num - a.num
- }).slice(0, 10)
- console.log(data);
+ }).slice(0, 15)
this.reload(data, true)
}
//关键词筛选数据(暂不用)