813 lines
40 KiB
PHP
813 lines
40 KiB
PHP
<link rel="stylesheet" type="text/css" href="/static/css/font-awesome.min.css?v=1581252500">
|
||
<div class="bs-example bs-example-tabs" data-example-id="togglable-tabs" style="font-size:15px;">
|
||
<ul class="nav nav-tabs" role="tablist">
|
||
<li role="presentation" class="<?= !strlen($params['status']) ? 'active' : '' ?>">
|
||
<a href="javascript:void (0);" data-open="/receiver/customer">全部</a>
|
||
</li>
|
||
<? foreach ($status_arr as $key => $val) { ?>
|
||
<li role="presentation"
|
||
class="<?= strlen($params['status']) && $params['status'] == $key ? 'active' : '' ?>">
|
||
<a href="javascript:void (0);" data-open="/receiver/customer?status=<?= $key ?>">
|
||
<?= $val ?>
|
||
</a>
|
||
</li>
|
||
<? } ?>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="coms-table-wrap mt10">
|
||
<form id="vue-app" class="form-search coms-table-hd clearfix no-border" onsubmit="return false"
|
||
action="/receiver/customer">
|
||
<div class="am-form am-form-horizontal">
|
||
<div class="am-form-group fl">
|
||
<label class="am-para-label w80">客户搜索:</label>
|
||
<div class="am-para-inline w100">
|
||
<select name="search_tp" v-model="params.search_tp">
|
||
<option :value="i" v-for="(v,i) in searchTpAry">{{v}}</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="am-form-group fl">
|
||
<div class="am-para-inline w160">
|
||
<input id="cid" name="cid" type="text" v-model="params.cid"/>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="fl" style="width:1920px">
|
||
<label class="am-para-label w80">客户等级:</label>
|
||
<div class="am-para-inline w100">
|
||
<select name="level" v-model="params.level">
|
||
<option value=''>请选择</option>
|
||
<option :value="v" v-for="(v,i) in show_info.levelAry">{{v}}</option>
|
||
</select>
|
||
</div>
|
||
<!--label class="am-para-label w80">企微:</label>
|
||
<div class="am-para-inline w100">
|
||
<select name="wxqy" v-model="params.wxqy">
|
||
<option value=''>请选择</option>
|
||
<option :value="i" v-for="(v,i) in show_info.wxqyAry">{{v}}</option>
|
||
</select>
|
||
</div-->
|
||
<!--label class="am-para-label w100">是否改派:</label>
|
||
<div class="am-para-inline w100">
|
||
<select name="cs_biz_id" v-model="params.cs_biz_id">
|
||
<option value=''>请选择</option>
|
||
<option :value="i" v-for="(v,i) in show_info.csbizidAry">{{v}}</option>
|
||
</select>
|
||
</div-->
|
||
<label class="am-para-label w80">客户来源:</label>
|
||
<div class="am-form-group am-para-inline w150">
|
||
<select name="of_id" v-model="params.of_id">
|
||
<option value=''>请选择</option>
|
||
<option :value="i" v-for="(v,i) in show_info.cfroms">{{v}}</option>
|
||
</select>
|
||
</div>
|
||
<div class="am-form-group am-para-inline w150">
|
||
<select name="of2_id" v-model="params.of2_id">
|
||
<option value=''>请选择</option>
|
||
<option :value="i" v-for="(v,i) in show_info.cfroms2">{{v}}</option>
|
||
</select>
|
||
</div>
|
||
<label class="am-para-label w60">个微:</label>
|
||
<div class="am-para-inline w100">
|
||
<select name="wxgr" v-model="params.wxgr">
|
||
<option value=''>请选择</option>
|
||
<option :value="i" v-for="(v,i) in show_info.wxgrAry">{{v}}</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<!--div class="am-form-group fl" style="width:1920px">
|
||
<label class="am-para-label w80">品牌归属:</label>
|
||
<div class="am-para-inline w100">
|
||
<select name="c_brand" v-model="params.c_brand">
|
||
<option value=''>请选择</option>
|
||
<option :value="i" v-for="(v,i) in show_info.cbrandAry">{{v}}</option>
|
||
</select>
|
||
</div>
|
||
<label class="am-para-label w100">客户位置:</label>
|
||
<div class="am-para-inline w100">
|
||
<select title="城市" name="city_id" v-model="params.city_id">
|
||
<option value="">选择城市</option>
|
||
<option :value="v.id" v-for="(v,i) in cityAry">{{v.name}}</option>
|
||
</select>
|
||
</div>
|
||
<div class="am-para-inline w100">
|
||
<select title="行政区" name="county_id" v-model="params.county_id">
|
||
<option value="">选择行政区</option>
|
||
<option :value="v.id" v-for="(v,i) in countyAry">{{v.name}}</option>
|
||
</select>
|
||
</div>
|
||
</div-->
|
||
<div class="am-form-group fl" style="width:1920px">
|
||
<!--label class="am-para-label w80">门店类型:</label>
|
||
<div class="am-para-inline w100">
|
||
<select name="biz_type" v-model="params.biz_type">
|
||
<option value="">请选择</option>
|
||
<option :value="v.id" v-for="(v,i) in bizTypeAry">{{v.name}}</option>
|
||
</select>
|
||
</div-->
|
||
<label class="am-para-label w80">车管家:</label>
|
||
<div class="am-para-inline w100">
|
||
<select title="省份" name="province_id_admin" v-model="params.province_id_admin">
|
||
<option value="">省份</option>
|
||
<option :value="v.province_id" v-for="(v,i) in admins.provinceAry">{{v.province_name}}</option>
|
||
</select>
|
||
</div>
|
||
<div class="am-para-inline w100">
|
||
<select title="城市" name="city_id_admin" v-model="params.city_id_admin">
|
||
<option value="">城市</option>
|
||
<option :value="v.id" v-for="(v,i) in admins.cityAry">{{v.name}}</option>
|
||
</select>
|
||
</div>
|
||
<div class="am-para-inline w100">
|
||
<select title="行政区" name="county_id_admin" v-model="params.county_id_admin">
|
||
<option value="">行政区</option>
|
||
<option :value="v.id" v-for="(v,i) in admins.countyAry">{{v.name}}</option>
|
||
</select>
|
||
</div>
|
||
<div class="am-para-inline w180">
|
||
<select name="biz_id_admin" v-model="params.biz_id_admin">
|
||
<option value="">门店</option>
|
||
<template v-for="(v,i) in admins.bizAry">
|
||
<option :value="v.id">{{v.title}}</option>
|
||
</template>
|
||
</select>
|
||
</div>
|
||
<div class="am-para-inline w100">
|
||
<select name="admin_id" v-model="params.admin_id">
|
||
<option value="">车管家</option>
|
||
<template v-for="(v,i) in admins.list">
|
||
<option :value="v.id">{{v.title}}</option>
|
||
</template>
|
||
</select>
|
||
</div>
|
||
<label class="am-para-label w120">客户成功经理:</label>
|
||
<div class="am-para-inline w100">
|
||
<select name="qdjl_id" v-model="params.qdjl_id">
|
||
<option value=''>请选择</option>
|
||
<option :value="v.id" v-for="(v,i) in qdjl_lists">{{v.name}}</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<? foreach ($searchTimeAry as $key => $value) { ?>
|
||
<div id="show-<?= $key ?>" style="display:<?= $params[$key] ? 'block' : 'none' ?>">
|
||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||
<label class="am-para-label w100"><?= $value ?>:</label>
|
||
<div class="am-form-group fl">
|
||
<div class="am-para-inline w300">
|
||
<input id="id-<?= $key ?>" name="<?= $key ?>" type="text" value="<?= $params[$key] ?>"
|
||
placeholder="<?= $value ?>范围" autocomplete="off"/>
|
||
</div>
|
||
<div class="am-para-inline" style="padding-top: 5px;">
|
||
<a class="mr10 id-<?= $key ?>-btn" href="javascript:void (0);" data-date="today">今日</a>
|
||
<a class="mr10 id-<?= $key ?>-btn" href="javascript:void (0);"
|
||
data-date="yesterday">昨日</a>
|
||
<a class="mr10 id-<?= $key ?>-btn" href="javascript:void (0);" data-date="weeks">本周</a>
|
||
<a class="mr10 id-<?= $key ?>-btn" href="javascript:void (0);" data-date="month">本月</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<? } ?>
|
||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||
<div class="am-form-group fl" style="margin-bottom: 0px;">
|
||
<div class="am-form-group fl ml10">
|
||
<input type="button" @click="btnTimes" value="筛选时间" class="am-btn am-btn-success am-btn-sm">
|
||
</div>
|
||
<div class="am-form-group fl ml10">
|
||
<input type="button" @click="btnTags" value="客户画像" class="am-btn am-btn-success am-btn-sm">
|
||
</div>
|
||
<div class="am-form-group fl ml10">
|
||
<input type="button" @click="btnTagsIntention" value="客户意向"
|
||
class="am-btn am-btn-success am-btn-sm">
|
||
</div>
|
||
<div class="am-form-group fl ml10">
|
||
<input type="button" @click="btnTagsDefeat" value="战败标签"
|
||
class="am-btn am-btn-success am-btn-sm">
|
||
</div>
|
||
<div class="am-form-group fl ml10">
|
||
<button type="submit" class="am-btn am-btn-success am-btn-sm w100">搜索</button>
|
||
</div>
|
||
<div class="am-form-group fl ml10">
|
||
<button type="button" class="am-btn am-btn-success am-btn-sm w100" @click="reset">重置</button>
|
||
</div>
|
||
<div class="am-form-group fl ml10" v-if="export_button==1">
|
||
<button type="button" class="am-btn am-btn-success am-btn-sm w100" @click="export_out()"
|
||
title="最多500条">导出(带标签)
|
||
</button>
|
||
<!--button type="button" class="am-btn am-btn-success am-btn-sm w100" @click="export_out(0)">导出(无标签)</button-->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<input name="status" value="<?= $params['status'] ?>" type="hidden">
|
||
<input type="hidden" id="id_tags" name="tags" value="<?= $params['tags'] ?>">
|
||
<input type="hidden" id="id_tagsIntention" name="tagsIntention" value="<?= $params['tagsIntention'] ?>">
|
||
<input type="hidden" id="id_tagsDefeat" name="tagsDefeat" value="<?= $params['tagsDefeat'] ?>">
|
||
</form>
|
||
|
||
<div class="coms-table-bd">
|
||
<div class="am-form-group fr mr10">
|
||
<span>共<?= intval($pager['totle']) ?>个客户</span>
|
||
</div>
|
||
<table class="am-table am-table-bordered">
|
||
<thead>
|
||
<tr>
|
||
<th width="10%">编号</th>
|
||
<th width="10%"><span>客户</span></th>
|
||
<th width="6%"><span>客户等级</span></th>
|
||
<th width="10%"><span>客户来源</span></th>
|
||
<th width="18%"><span>所属门店</span></th>
|
||
<th width="6%"><span>车管家</span></th>
|
||
<th width="6%"><span>个微</span></th>
|
||
<th width="6%"><span>状态</span></th>
|
||
<th width="15%"><span>派单/建档时间</span></th>
|
||
<th width="15%"><span>最后联系时间</span></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<template v-for="(v,i) in lists">
|
||
<tr>
|
||
<td style="vertical-align: middle;">{{v.cid}}</td>
|
||
<td style="vertical-align: middle;"><a href="javascript:void(0);"
|
||
:data-open="'/receiver/customer/get?id='+v.id">{{v.name}}<br>{{v.mobile_sub}}</a>
|
||
</td>
|
||
<td style="vertical-align: middle;">{{v.level}}</td>
|
||
<td style="vertical-align: middle;">{{v.of_title}}</td>
|
||
<td style="vertical-align: middle;">{{v.biz_poi}}<br>{{v.biz_name}}</td>
|
||
<td style="vertical-align: middle;">{{v.admin_name}}</td>
|
||
<td style="vertical-align: middle;">{{v.wxgr_name}}</td>
|
||
<td style="vertical-align: middle;">{{v.status_name}}</td>
|
||
<td style="vertical-align: middle;">{{v.p_time}}</td>
|
||
<td style="vertical-align: middle;">{{v.cont_time}}</td>
|
||
</tr>
|
||
</template>
|
||
</table>
|
||
</div>
|
||
<div class="coms-table-ft clearfix">
|
||
<div class="hander am-form">
|
||
</div>
|
||
<div class="coms-pagination fr mr20">
|
||
<?php page_view($pager) ?>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="times-modal" style="display: none;">
|
||
<div class="modal-body">
|
||
<label class="checkall" style="margin-left: 30px;">
|
||
<input id="times_checkbox" type="checkbox" data-check-target=".order-times"> 全选</label>
|
||
<div style="margin-left: 40px;">
|
||
<?php foreach ($searchTimeAry as $key => $value) { ?>
|
||
<label class="am-checkbox" style="padding-bottom: 8px;">
|
||
<input type="checkbox" class="order-times" <?= $params[$key] ? 'checked' : '' ?>
|
||
value='<?= $key ?>'><?= $value ?></label>
|
||
<? } ?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="tags-modal" style="display: none;">
|
||
<div class="modal-body">
|
||
<template v-for="(v,i) in show_info.tags">
|
||
<tr>
|
||
<td class="table-td" style="width: 80%">
|
||
<table>
|
||
<tr v-if="v.type=='checkbox'">
|
||
<td style="min-width: 80px">{{v.name}}:</td>
|
||
<td>
|
||
<template v-for="(v2,i2) in v.list">
|
||
<input type="checkbox" :value='v2.checked'
|
||
v-model="v2.checked"> {{v2.name}}
|
||
</template>
|
||
</td>
|
||
</tr>
|
||
<tr v-else>
|
||
<td style="min-width: 80px">{{v.name}}:</td>
|
||
<td>
|
||
<template v-for="(v2,i2) in v.list">
|
||
<input type="radio" :value='v2.id'
|
||
v-model="v.value"> {{v2.name}}
|
||
</template>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</template>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="tags-intention-modal" style="display: none;">
|
||
<div class="modal-body">
|
||
<template v-for="(v,i) in show_info.tagsIntention">
|
||
<tr>
|
||
<td class="table-td" style="width: 80%">
|
||
<table>
|
||
<tr v-if="v.type=='checkbox'">
|
||
<td style="min-width: 100px">{{v.name}}:</td>
|
||
<td>
|
||
<template v-for="(v2,i2) in v.list">
|
||
<input type="checkbox" :value='v2.checked'
|
||
v-model="v2.checked"> {{v2.name}}
|
||
</template>
|
||
</td>
|
||
</tr>
|
||
<tr v-else>
|
||
<td style="min-width: 100px">{{v.name}}:</td>
|
||
<td>
|
||
<template v-for="(v2,i2) in v.list">
|
||
<input type="radio" :value='v2.id'
|
||
v-model="v.value"> {{v2.name}}
|
||
</template>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</template>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="tags-defeat-modal" style="display: none;">
|
||
<div class="modal-body">
|
||
<template v-for="(v,i) in show_info.tagsDefeat">
|
||
<tr>
|
||
<td class="table-td" style="width: 80%">
|
||
<table>
|
||
<tr v-if="v.type=='checkbox'">
|
||
<td style="min-width: 100px">{{v.name}}:</td>
|
||
<td>
|
||
<template v-for="(v2,i2) in v.list">
|
||
<input type="checkbox" :value='v2.checked'
|
||
v-model="v2.checked"> {{v2.name}}
|
||
</template>
|
||
</td>
|
||
</tr>
|
||
<tr v-else>
|
||
<td style="min-width: 100px">{{v.name}}:</td>
|
||
<td>
|
||
<template v-for="(v2,i2) in v.list">
|
||
<input type="radio" :value='v2.id'
|
||
v-model="v.value"> {{v2.name}}
|
||
</template>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</template>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<script>
|
||
require(['laydate', 'autocomplete'], function (laydate) {
|
||
<? foreach ($searchTimeAry as $key => $value) { ?>
|
||
laydate.render({
|
||
elem: '#id-<?=$key?>', range: '~'
|
||
});
|
||
$('.id-<?=$key?>-btn').click(function () {
|
||
var type = $(this).data('date'), date = '', nowDate = new Date();
|
||
var beginDate = '', endDate = '';
|
||
switch (type) {
|
||
case 'today':
|
||
beginDate = endDate = nowDate.Format('yyyy-MM-dd');
|
||
break;
|
||
case 'yesterday':
|
||
beginDate = endDate = (new Date(nowDate.getTime() - 86400000)).Format('yyyy-MM-dd');
|
||
break;
|
||
case 'weeks':
|
||
nowDate.setDate(nowDate.getDate() - nowDate.getDay() + 1);
|
||
beginDate = nowDate.getFullYear() + "-" + (nowDate.getMonth() + 1) + "-" + nowDate.getDate();
|
||
nowDate.setDate(nowDate.getDate() + 6);
|
||
endDate = nowDate.getFullYear() + "-" + (nowDate.getMonth() + 1) + "-" + nowDate.getDate();
|
||
break;
|
||
case 'month':
|
||
beginDate = nowDate.getFullYear() + "-" + (nowDate.getMonth() + 1) + "-01";
|
||
var day = new Date(nowDate.getFullYear(), nowDate.getMonth() + 1, 0);
|
||
endDate = nowDate.getFullYear() + "-" + (nowDate.getMonth() + 1) + "-" + day.getDate();
|
||
break;
|
||
}
|
||
date = beginDate + ' ~ ' + endDate;
|
||
$('#id-<?=$key?>').val(date);
|
||
});
|
||
<?}?>
|
||
});
|
||
|
||
var vue_obj;
|
||
$(function () {
|
||
vue_obj = new Vue({
|
||
el: '.coms-table-wrap',
|
||
data: {
|
||
params: {'of_id': '', 'of2_id': ''},
|
||
searchTpAry: [],
|
||
lists: [],
|
||
qdjl_lists: [],
|
||
admins: {
|
||
provinceAry: <?=json_encode($provinces, JSON_UNESCAPED_UNICODE)?>,
|
||
cityAry: [],
|
||
countyAry: [],
|
||
bizAry: [],
|
||
list: []
|
||
},
|
||
show_info: {
|
||
levelAry: [],
|
||
wxqyAry: [],
|
||
wxgrAry: [],
|
||
csbizidAry: [],
|
||
tags: [],
|
||
cfroms: [],
|
||
cfroms2: [],
|
||
tagsIntention: [],
|
||
tagsDefeat: []
|
||
},
|
||
of2Ary: [],
|
||
bizTypeAry: [],
|
||
export_button: 0,
|
||
provinceAry: [],
|
||
cityAry: [],
|
||
countyAry: [],
|
||
},
|
||
mounted: function () {
|
||
var vm = this;
|
||
vm.params = <?=json_encode($params)?>;
|
||
vm.searchTpAry = <?=json_encode($searchTpAry)?>;
|
||
vm.lists = <?=json_encode($lists)?>;
|
||
vm.qdjl_lists = <?=json_encode($qdjl_lists)?>;
|
||
vm.show_info = <?=json_encode($show_info)?>;
|
||
vm.export_button = <?=$export_button?>;
|
||
},
|
||
methods: {
|
||
btnTimes: function () {
|
||
layer.open({
|
||
type: 1,
|
||
area: ['25%'], //宽高
|
||
content: $('#times-modal'),
|
||
title: '选择筛选时间',
|
||
shade: false,
|
||
btn: ['确定', '取消'],
|
||
yes: function (index) {
|
||
layer.close(index);
|
||
$(".order-times").map(function () {
|
||
var id = this.value;
|
||
if (this.checked) {
|
||
$('#show-' + id).show();
|
||
} else {
|
||
$('#id-' + id).val('');
|
||
$('#show-' + id).hide();
|
||
}
|
||
});
|
||
}
|
||
});
|
||
},
|
||
btnTags: function () {
|
||
var vm = this;
|
||
layer.open({
|
||
type: 1,
|
||
area: ['50%'], //宽高
|
||
content: $('#tags-modal'),
|
||
title: '搜索客户画像',
|
||
shade: false,
|
||
btn: ['点击搜索', '重置画像', '取消搜索'],
|
||
yes: function (index) {
|
||
var ids = '';
|
||
vm.show_info.tags.map(function (item1) {
|
||
for (var i in item1.list) {
|
||
var item2 = item1.list[i];
|
||
if (item1.type == 'checkbox') {
|
||
if (item2.checked) {
|
||
ids = ids ? ids + ',' + item2.id : item2.id;
|
||
}
|
||
} else {
|
||
if (item1.value == item2.id) {
|
||
ids = ids ? ids + ',' + item2.id : item2.id;
|
||
}
|
||
}
|
||
}
|
||
});
|
||
if (ids.length < 1) {
|
||
return $.msg.tips('请选择需要搜索的数据!');
|
||
}
|
||
$('#id_tags').val(ids);
|
||
$('#id_tagsIntention').val('');
|
||
$('#id_tagsDefeat').val('');
|
||
$('#vue-app').submit();
|
||
layer.close(index);
|
||
},
|
||
btn2: function () {
|
||
vm.show_info.tags.map(function (item1) {
|
||
for (var i in item1.list) {
|
||
var item2 = item1.list[i];
|
||
if (item1.type == 'checkbox') {
|
||
item2.checked = false;
|
||
} else {
|
||
item1.value = '';
|
||
}
|
||
}
|
||
});
|
||
$('#id_tags').val('');
|
||
return false;
|
||
},
|
||
btn3: function (index) {
|
||
layer.close(index);
|
||
}
|
||
});
|
||
},
|
||
btnTagsIntention: function () {
|
||
var vm = this;
|
||
layer.open({
|
||
type: 1,
|
||
area: ['50%'], //宽高
|
||
content: $('#tags-intention-modal'),
|
||
title: '搜索客户意向',
|
||
shade: false,
|
||
btn: ['点击搜索', '重置意向', '取消搜索'],
|
||
yes: function (index) {
|
||
var ids = '';
|
||
vm.show_info.tagsIntention.map(function (item1) {
|
||
for (var i in item1.list) {
|
||
var item2 = item1.list[i];
|
||
if (item1.type == 'checkbox') {
|
||
if (item2.checked) {
|
||
ids = ids ? ids + ',' + item2.id : item2.id;
|
||
}
|
||
} else {
|
||
if (item1.value == item2.id) {
|
||
ids = ids ? ids + ',' + item2.id : item2.id;
|
||
}
|
||
}
|
||
}
|
||
});
|
||
if (ids.length < 1) {
|
||
return $.msg.tips('请选择需要搜索的数据!');
|
||
}
|
||
$('#id_tagsIntention').val(ids);
|
||
$('#id_tags').val('');
|
||
$('#id_tagsDefeat').val('');
|
||
$('#vue-app').submit();
|
||
layer.close(index);
|
||
},
|
||
btn2: function () {
|
||
vm.show_info.tagsIntention.map(function (item1) {
|
||
for (var i in item1.list) {
|
||
var item2 = item1.list[i];
|
||
if (item1.type == 'checkbox') {
|
||
item2.checked = false;
|
||
} else {
|
||
item1.value = '';
|
||
}
|
||
}
|
||
});
|
||
$('#id_tagsIntention').val('');
|
||
return false;
|
||
},
|
||
btn3: function (index) {
|
||
layer.close(index);
|
||
}
|
||
});
|
||
},
|
||
btnTagsDefeat: function () {
|
||
var vm = this;
|
||
layer.open({
|
||
type: 1,
|
||
area: ['50%'], //宽高
|
||
content: $('#tags-defeat-modal'),
|
||
title: '搜索战败标签',
|
||
shade: false,
|
||
btn: ['点击搜索', '重置战败', '取消搜索'],
|
||
yes: function (index) {
|
||
var ids = '';
|
||
vm.show_info.tagsDefeat.map(function (item1) {
|
||
for (var i in item1.list) {
|
||
var item2 = item1.list[i];
|
||
if (item1.type == 'checkbox') {
|
||
if (item2.checked) {
|
||
ids = ids ? ids + ',' + item2.id : item2.id;
|
||
}
|
||
} else {
|
||
if (item1.value == item2.id) {
|
||
ids = ids ? ids + ',' + item2.id : item2.id;
|
||
}
|
||
}
|
||
}
|
||
});
|
||
if (ids.length < 1) {
|
||
return $.msg.tips('请选择需要搜索的数据!');
|
||
}
|
||
$('#id_tagsDefeat').val(ids);
|
||
$('#id_tags').val('');
|
||
$('#id_tagsIntention').val('');
|
||
$('#vue-app').submit();
|
||
layer.close(index);
|
||
},
|
||
btn2: function () {
|
||
vm.show_info.tagsDefeat.map(function (item1) {
|
||
for (var i in item1.list) {
|
||
var item2 = item1.list[i];
|
||
if (item1.type == 'checkbox') {
|
||
item2.checked = false;
|
||
} else {
|
||
item1.value = '';
|
||
}
|
||
}
|
||
});
|
||
$('#id_tagsDefeat').val('');
|
||
return false;
|
||
},
|
||
btn3: function (index) {
|
||
layer.close(index);
|
||
}
|
||
});
|
||
},
|
||
saveEdit: function () {
|
||
$("form").submit();
|
||
},
|
||
reset: function () {
|
||
var that = this;
|
||
that.params.search_tp = 'mobile';
|
||
that.params.cid = '';
|
||
that.params.province_id_admin = '';
|
||
that.params.city_id_admin = '';
|
||
that.params.county_id_admin = '';
|
||
that.params.of_id = '';
|
||
that.params.of2_id = '';
|
||
$('#id_tags').val('');
|
||
$('#id_tagsIntention').val('');
|
||
$('#id_tagsDefeat').val('');
|
||
$('#cf_time').val('');
|
||
$(".order-times").map(function () {
|
||
var id = this.value;
|
||
this.checked = false;
|
||
$('#id-' + id).val('');
|
||
$('#show-' + id).hide();
|
||
});
|
||
$("#times_checkbox").prop("checked", false);
|
||
},
|
||
export_out: function (tag = 1) {
|
||
var that = this;
|
||
if (that.export_button == 0) {
|
||
layer.msg('无权限导出');
|
||
return false;
|
||
}
|
||
let count = <?=$pager['totle']?>;
|
||
if (count == 0) {
|
||
layer.msg('没有数据可导出');
|
||
return false;
|
||
}
|
||
let href = $.menu.parseUri(window.location.href);
|
||
href = href.replace("customer?", "customer/export?");
|
||
href = href + "&export_tag=" + tag;
|
||
window.location.href = href;
|
||
},
|
||
},
|
||
watch: {
|
||
'params.province_id_admin': function (nv, ov) {
|
||
var that = this;
|
||
if (nv == '') {
|
||
that.admins.cityAry = [];
|
||
that.params.city_id_admin = '';
|
||
} else {
|
||
$.get('common/area', {id: nv, key: 'city', type: 1}, function (response) {
|
||
if (response.code == 1) {
|
||
that.admins.cityAry = response.data;
|
||
if (that.params.city_id_admin > 0) {
|
||
var city_id = '';
|
||
for (var i in that.admins.cityAry) {
|
||
var city = that.admins.cityAry[i];
|
||
if (city.id == that.params.city_id_admin) {
|
||
city_id = city.id;
|
||
break;
|
||
}
|
||
}
|
||
that.params.city_id_admin = city_id;
|
||
}
|
||
}
|
||
});
|
||
}
|
||
},
|
||
'params.city_id_admin': function (nv, ov) {
|
||
var that = this;
|
||
if (nv == '') {
|
||
that.admins.countyAry = [];
|
||
that.params.county_id_admin = '';
|
||
} else {
|
||
$.get('common/area', {id: nv, key: 'county', type: 1}, function (response) {
|
||
if (response.code == 1) {
|
||
that.admins.countyAry = response.data;
|
||
if (that.params.county_id_admin > 0) {
|
||
var county_id = '';
|
||
for (var i in that.admins.countyAry) {
|
||
var county = that.admins.countyAry[i];
|
||
if (county.id == that.params.county_id_admin) {
|
||
county_id = county.id;
|
||
break;
|
||
}
|
||
}
|
||
that.params.county_id_admin = county_id;
|
||
}
|
||
}
|
||
});
|
||
}
|
||
},
|
||
'params.county_id_admin': function (nv, ov) {
|
||
var that = this;
|
||
if (nv == '') {
|
||
that.admins.bizAry = [];
|
||
that.params.biz_id_admin = '';
|
||
} else {
|
||
$.ajax({
|
||
type: 'get',
|
||
url: '/biz/store/store/json_lists',
|
||
dataType: 'json',
|
||
data: {
|
||
province_id: that.params.province_id_admin,
|
||
city_id: that.params.city_id_admin,
|
||
county_id: that.params.county_id_admin,
|
||
status: 1
|
||
},
|
||
success: function (response) {
|
||
if (response.code == 1) {
|
||
that.admins.bizAry = response.data.list;
|
||
if (that.params.biz_id_admin > 0) {
|
||
var biz_id = '';
|
||
for (var i in that.admins.bizAry) {
|
||
if (that.params.biz_id_admin == that.admins.bizAry[i].id) {
|
||
biz_id = that.params.biz_id_admin;
|
||
break;
|
||
}
|
||
}
|
||
that.params.biz_id_admin = biz_id;
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
},
|
||
'params.biz_id_admin': function (nv, ov) {
|
||
var that = this;
|
||
if (nv == '') {
|
||
that.admins.list = [];
|
||
that.params.admin_id = '';
|
||
} else {
|
||
$.ajax({
|
||
type: 'post',
|
||
url: '/app/licheb/member/json_lists',
|
||
dataType: 'json',
|
||
data: {
|
||
biz_id: nv,
|
||
status: 1
|
||
},
|
||
success: function (response) {
|
||
if (response.code == 1) {
|
||
that.admins.list = response.data.list;
|
||
if (that.params.admin_id > 0) {
|
||
var admin_id = '';
|
||
for (var i in that.admins.list) {
|
||
if (that.params.admin_id == that.admins.list[i].id) {
|
||
admin_id = that.params.admin_id;
|
||
break;
|
||
}
|
||
}
|
||
that.params.admin_id = admin_id;
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
},
|
||
'params.of_id': function (nv, ov) {
|
||
var that = this;
|
||
if (nv == '') {
|
||
that.params.of2_id = '';
|
||
that.show_info.cfroms2 = [];
|
||
} else {
|
||
$.post('/receiver/clues/json_map_cfrom', {pid: nv, status: 1}, function (result) {
|
||
that.show_info.cfroms2 = result.data;
|
||
if (that.params.of2_id > 0) {
|
||
var of2_id = '';
|
||
for (var i in that.show_info.cfroms2) {
|
||
if (i == that.params.of2_id) {
|
||
of2_id = i;
|
||
break;
|
||
}
|
||
}
|
||
that.params.of2_id = of2_id;
|
||
}
|
||
});
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
<?php page_script($pager) ?>
|
||
});
|
||
|
||
</script>
|
||
<style type="text/css">
|
||
.table-td {
|
||
width: 20%;
|
||
padding-top: 10px;
|
||
line-height: 28px;
|
||
font-size: 1.4rem;
|
||
}
|
||
</style>
|