filterQuery.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861
  1. <template>
  2. <view>
  3. <up-popup :show="showFilter" mode="bottom" closeable @close="handleClose" @open="handleOpen">
  4. <scroll-view scroll-y :style="{ height: mapHeight }" @touchmove.stop="() => { }">
  5. <view class="filterQuery" :style="{ height: mapHeight }">
  6. <view class="query_wrap">
  7. <view class="title">
  8. 线索创建时间
  9. </view>
  10. <view class="dept_wrap form_input_pointer_events" @click="handleShowJtimePickerPopup">
  11. <up-input v-model="createTimeTxt" disabled style='pointer-events: none !important'
  12. disabledColor="#ffffff" placeholder="点击选择" border="none">
  13. </up-input>
  14. <up-icon slot="right" name="arrow-right"></up-icon>
  15. </view>
  16. <view class="title">
  17. 归属机构
  18. </view>
  19. <view class="dept_wrap form_input_pointer_events" @click="handleShowclueDept">
  20. <up-input v-model="valueModel.deptName" disabled style='pointer-events: none !important'
  21. disabledColor="#ffffff" placeholder="点击选择" border="none">
  22. </up-input>
  23. <up-icon slot="right" name="arrow-right"></up-icon>
  24. </view>
  25. <view class="title">
  26. 来源
  27. </view>
  28. <view class="dept_wrap form_input_pointer_events" @click="handleShowclueAppName">
  29. <up-input v-model="valueModel.appNameLabel" disabled style='pointer-events: none !important'
  30. disabledColor="#ffffff" placeholder="点击选择" border="none">
  31. </up-input>
  32. <up-icon slot="right" name="arrow-right"></up-icon>
  33. </view>
  34. <view class="title">
  35. 是否撞单
  36. </view>
  37. <view class="dept_wrap form_input_pointer_events">
  38. <ld-select :list="repetitionDict" label-key="dictLabel" value-key="dictValue"
  39. placeholder="请选择" v-model="valueModel.isRepetitionOperationName" :border="false"></ld-select>
  40. <up-icon slot="right" name="arrow-right"></up-icon>
  41. </view>
  42. <!-- <view class="title">
  43. 是否微信撞单
  44. </view>
  45. <view class="dept_wrap form_input_pointer_events">
  46. <ld-select :list="repetitionDict" label-key="dictLabel" value-key="dictValue"
  47. placeholder="请选择" v-model="valueModel.isRepetitionOperWeixinName" :border="false"></ld-select>
  48. <up-icon slot="right" name="arrow-right"></up-icon>
  49. </view> -->
  50. <view class="title">
  51. 是否有视频ID
  52. </view>
  53. <view class="dept_wrap form_input_pointer_events">
  54. <ld-select :list="repetitionDict" label-key="dictLabel" value-key="dictValue"
  55. placeholder="请选择" v-model="valueModel.isVideoIdIsNull" :border="false"></ld-select>
  56. <up-icon slot="right" name="arrow-right"></up-icon>
  57. </view>
  58. <view class="title">
  59. 归属人
  60. </view>
  61. <view class="person_wrap">
  62. <view class="person_item" v-for="(item, index) in clueOwners.userInfos" :key="item.userId">
  63. <view class="person_top">
  64. <up-avatar :src="$avatar(item.avatar)" size="40px"></up-avatar>
  65. </view>
  66. <view class="person_bottom">
  67. {{ item.nickName }}
  68. </view>
  69. </view>
  70. <view class="person_item more_item" @click="handleShowclueOwner">
  71. <view class="person_top">
  72. <image src="/static/case/icon-more.png" mode="" class="more"></image>
  73. </view>
  74. <view class="person_bottom">
  75. 更多
  76. </view>
  77. </view>
  78. </view>
  79. <view class="title">
  80. 运营人
  81. </view>
  82. <view class="person_wrap">
  83. <view class="person_item" v-for="(item, index) in clueOperations.userInfos"
  84. :key="item.userId">
  85. <view class="person_top">
  86. <up-avatar :src="$avatar(item.avatar)" size="40px"></up-avatar>
  87. </view>
  88. <view class="person_bottom">
  89. {{ item.nickName }}
  90. </view>
  91. </view>
  92. <view class="person_item more_item" @click="handleShowclueOperation">
  93. <view class="person_top">
  94. <image src="/static/case/icon-more.png" mode="" class="more"></image>
  95. </view>
  96. <view class="person_bottom">
  97. 更多
  98. </view>
  99. </view>
  100. </view>
  101. <view class="title">
  102. 线索阶段
  103. </view>
  104. <view class="option_list">
  105. <up-tag :text="item.dictLabel" plain :color="item.isCheck ? '#bd0017' : '#aaa'"
  106. :borderColor="item.isCheck ? '#bd0017' : '#aaa'" class="option_item"
  107. v-for="(item, index) in clueStateDicts" :key="index"
  108. @click="handleClickTag(item, 'clueStateList')"></up-tag>
  109. </view>
  110. <!-- <view class="title">
  111. 线索标签
  112. </view>
  113. <view class="option_list">
  114. <ld-select :list="clueTagGroupVoList" label-key="name" value-key="id" placeholder="请选择线索标签"
  115. v-model="valueModel.allTagList" multiple clearable></ld-select>
  116. </view> -->
  117. <view class="title">
  118. 手机号码或微信
  119. </view>
  120. <view class="search_input">
  121. <up-input clearable prefixIcon="search" v-model="valueModel.telephone"
  122. placeholder="请输入手机号码或微信"></up-input>
  123. </view>
  124. <view class="title">
  125. 姓名
  126. </view>
  127. <view class="search_input">
  128. <up-input clearable prefixIcon="search" v-model="valueModel.name" placeholder="请输入姓名"></up-input>
  129. </view>
  130. <view class="title">
  131. 广告主名称
  132. </view>
  133. <view class="search_input">
  134. <up-input clearable prefixIcon="search" v-model="valueModel.advName"
  135. placeholder="请输入广告主名称"></up-input>
  136. </view>
  137. <view class="title">
  138. 广告名称
  139. </view>
  140. <view class="search_input">
  141. <up-input clearable prefixIcon="search" v-model="valueModel.promotionName"
  142. placeholder="请输入广告名称"></up-input>
  143. </view>
  144. <view class="title">
  145. 广告主ID
  146. </view>
  147. <view class="search_input">
  148. <up-input clearable prefixIcon="search" v-model="valueModel.advId"
  149. placeholder="请输入广告主ID"></up-input>
  150. </view>
  151. <view class="title">
  152. 广告ID
  153. </view>
  154. <view class="search_input">
  155. <up-input clearable prefixIcon="search" v-model="valueModel.promotionId"
  156. placeholder="请输入广告ID"></up-input>
  157. </view>
  158. <view class="title">
  159. 标题ID
  160. </view>
  161. <view class="search_input">
  162. <up-input clearable prefixIcon="search" v-model="valueModel.titleId"
  163. placeholder="请输入标题ID"></up-input>
  164. </view>
  165. <view class="title">
  166. 视频ID
  167. </view>
  168. <view class="search_input">
  169. <up-input clearable prefixIcon="search" v-model="valueModel.videoId"
  170. placeholder="请输入视频ID"></up-input>
  171. </view>
  172. <view class="title">
  173. 自动定位城市
  174. </view>
  175. <view class="pick_regions_wrap form_input_pointer_events">
  176. <pick-regions :defaultRegion="defaultRegion" @getRegion="handleGetRegion1">
  177. <view class="province">
  178. <template v-if="valueModel.autoProvince">
  179. <up-input
  180. :value="valueModel.autoProvince + '/' + valueModel.autoCity + '/' + valueModel.autoArea"
  181. placeholder="点击选择" readonly suffixIcon="arrow-right"
  182. suffixIconStyle="color : #c0c4cc"></up-input>
  183. </template>
  184. <template v-else>
  185. <up-input placeholder="点击选择" readonly suffixIcon="arrow-right"
  186. suffixIconStyle="color : #c0c4cc"></up-input>
  187. </template>
  188. </view>
  189. </pick-regions>
  190. </view>
  191. <view class="title">
  192. 手动填写地域
  193. </view>
  194. <view class="pick_regions_wrap form_input_pointer_events">
  195. <pick-regions :defaultRegion="defaultRegion" @getRegion="handleGetRegion2">
  196. <view class="province">
  197. <template v-if="valueModel.manualProvince">
  198. <up-input
  199. :value="valueModel.manualProvince + '/' + valueModel.manualCity + '/' + valueModel.manualArea"
  200. placeholder="点击选择" readonly suffixIcon="arrow-right"
  201. suffixIconStyle="color : #c0c4cc"></up-input>
  202. </template>
  203. <template v-else>
  204. <up-input placeholder="点击选择" readonly suffixIcon="arrow-right"
  205. suffixIconStyle="color : #c0c4cc"></up-input>
  206. </template>
  207. </view>
  208. </pick-regions>
  209. </view>
  210. <view class="title">
  211. 跟进状态
  212. </view>
  213. <view class="option_list">
  214. <up-tag :text="item.dictLabel" plain :color="item.isCheck ? '#bd0017' : '#aaa'"
  215. :borderColor="item.isCheck ? '#bd0017' : '#aaa'" class="option_item"
  216. v-for="(item, index) in followStatusDicts" :key="index"
  217. @click="handleClickTag(item, 'handleStateList')"></up-tag>
  218. </view>
  219. <view class="title">
  220. 通话状态
  221. </view>
  222. <view class="option_list">
  223. <up-tag :text="item.dictLabel" plain :color="item.isCheck ? '#bd0017' : '#aaa'"
  224. :borderColor="item.isCheck ? '#bd0017' : '#aaa'" class="option_item"
  225. v-for="(item, index) in callStatusDicts" :key="index"
  226. @click="handleClickTag(item, 'followStatusList')"></up-tag>
  227. </view>
  228. <view class="title">
  229. 入池方式
  230. </view>
  231. <view class="option_list">
  232. <up-tag :text="item.dictLabel" plain :color="item.isCheck ? '#bd0017' : '#aaa'"
  233. :borderColor="item.isCheck ? '#bd0017' : '#aaa'" class="option_item"
  234. v-for="(item, index) in clueEntranceTypeDicts" :key="index"
  235. @click="handleClickTag(item, 'clueEntranceType')"></up-tag>
  236. </view>
  237. <view class="title">
  238. 业务类别
  239. </view>
  240. <view class="dept_wrap form_input_pointer_events">
  241. <ld-select :list="dicts.crmClueBiz" label-key="dictLabel" value-key="dictValue"
  242. placeholder="请选择业务类别" v-model="valueModel.clueBizType" :border="false" clearable></ld-select>
  243. <up-icon slot="right" name="arrow-right"></up-icon>
  244. </view>
  245. <view class="title">
  246. 物品类别
  247. </view>
  248. <view class="dept_wrap form_input_pointer_events">
  249. <ld-select :list="dicts.crmClueObj" label-key="dictLabel" value-key="dictValue"
  250. placeholder="请选择物品类别" v-model="valueModel.clueObjType" :border="false" clearable></ld-select>
  251. <up-icon slot="right" name="arrow-right"></up-icon>
  252. </view>
  253. <view class="title">
  254. 线索类别
  255. </view>
  256. <view class="dept_wrap form_input_pointer_events">
  257. <ld-select :list="dicts.crmClueType" label-key="dictLabel" value-key="dictValue"
  258. placeholder="请选择线索类别" v-model="valueModel.clueAdType" :border="false" clearable></ld-select>
  259. <up-icon slot="right" name="arrow-right"></up-icon>
  260. </view>
  261. </view>
  262. <up-tabbar :fixed="true" inactiveColor="#ffffff" class="case_tabbar" :placeholder="true"
  263. :safeAreaInsetBottom="true">
  264. <up-tabbar-item text="重置" :customStyle="{ backgroundColor: '#fff' }"
  265. class="uTabbarItem close_btn" @click="handleReset"></up-tabbar-item>
  266. <up-tabbar-item text="确定" :customStyle="{ backgroundColor: '#4c8afe' }" class="uTabbarItem"
  267. @click="handleEnter"></up-tabbar-item>
  268. </up-tabbar>
  269. <ba-tree-picker :selectParent="false" v-if="clueOwnerListData.length > 0" ref="clueOwner"
  270. :multiple="false" border title="归属人" :localdata="clueOwnerListData" valueKey="id"
  271. textKey="label" childrenKey="children" :selectedValues="valueModel.clueOwnerId"
  272. @select-change="clueOwnerSeletchang" />
  273. <ba-tree-picker :selectParent="false" v-if="clueOperationListData.length > 0" ref="clueOperation"
  274. :multiple="false" border title="运营人" :localdata="clueOperationListData" valueKey="id"
  275. textKey="label" childrenKey="children" :selectedValues="valueModel.clueOperationId"
  276. @select-change="clueOperationSeletchang" />
  277. <ba-tree-picker :selectParent="true" v-if="deptList.length > 0" ref="dept" :multiple='false'
  278. @select-change="deptSeletchang" border title="归属机构" :localdata="deptList" valueKey="deptId"
  279. textKey="deptName" childrenKey="children" :selectedValues="valueModel.deptIds"
  280. :personNames="valueModel.deptName" />
  281. <ba-tree-picker :selectParent="true" v-if="dictCascadeData.length > 0" ref="appName"
  282. :multiple='false' @select-change="appNameSeletchang" border title="来源"
  283. :localdata="dictCascadeData" valueKey="id" textKey="name" childrenKey="children"
  284. :selectedValues="valueModel.appNames" :personNames="valueModel.appNameLabel" />
  285. <jtimePickerPopup :isShowShortTimeList="true" shortTimeTitle="快捷时间" :shortTimeList="shortTimeList"
  286. :isShowSeletTimeTitle="true" seletTimeTitle="时间选择" cancelText="取消" confirmText="确认"
  287. :endSelectMonth="-1" :endSelectDay="-1" beginTimePlaceHolder='开始时间' endTimePlaceHolder="结束时间"
  288. :isDateTypeRange="true" :isShowSelectedTimeEcho="true" @confirm="getSelectTime"
  289. ref="jtimePickerPopup" :defaultSelect="1">
  290. </jtimePickerPopup>
  291. </view>
  292. </scroll-view>
  293. </up-popup>
  294. </view>
  295. </template>
  296. <script>
  297. import {
  298. filterCustomerManager,
  299. handleTree
  300. } from '@/utils/util';
  301. import jtimePickerPopup from '@/uni_modules/jtime-picker-popup/components/JTimePicker/JTimePicker.vue';
  302. export default {
  303. components: {
  304. jtimePickerPopup
  305. },
  306. props: {
  307. // Vue3 v-model 使用 modelValue;兼容旧写法 value
  308. modelValue: {
  309. type: Object,
  310. default: () => ({}),
  311. },
  312. value: {
  313. type: Object,
  314. default: undefined,
  315. },
  316. mapHeight: {
  317. type: String,
  318. },
  319. dicts: {
  320. type: Object
  321. },
  322. },
  323. emits: ["getList", "update:modelValue"],
  324. computed: {
  325. // Vue3 v-model 绑定的是 modelValue,确保修改同步回父组件
  326. valueModel() {
  327. return this.modelValue != null ? this.modelValue : this.value || {};
  328. },
  329. clueStateDicts() {
  330. const list = (this.valueModel && this.valueModel.clueStateList) || [];
  331. (this.dicts && this.dicts.caseStatusDicts || []).forEach(v => {
  332. const item = list.find(s => s == v.dictValue);
  333. v.isCheck = item ? true : false;
  334. });
  335. return (this.dicts && this.dicts.caseStatusDicts) || [];
  336. },
  337. followStatusDicts() {
  338. const list = (this.valueModel && this.valueModel.handleStateList) || [];
  339. (this.dicts && this.dicts.crmFollowStatus || []).forEach(v => {
  340. const item = list.find(s => s == v.dictValue);
  341. v.isCheck = item ? true : false;
  342. });
  343. return (this.dicts && this.dicts.crmFollowStatus) || [];
  344. },
  345. callStatusDicts() {
  346. const list = (this.valueModel && this.valueModel.followStatusList) || [];
  347. (this.dicts && this.dicts.crmCallStatus || []).forEach(v => {
  348. const item = list.find(s => s == v.dictValue);
  349. v.isCheck = item ? true : false;
  350. });
  351. return (this.dicts && this.dicts.crmCallStatus) || [];
  352. },
  353. clueEntranceTypeDicts() {
  354. const list = (this.valueModel && this.valueModel.clueEntranceType) || [];
  355. (this.dicts && this.dicts.clueEntranceType || []).forEach(v => {
  356. const item = list.find(s => s == v.dictValue);
  357. v.isCheck = item ? true : false;
  358. });
  359. return (this.dicts && this.dicts.clueEntranceType) || [];
  360. },
  361. },
  362. data() {
  363. return {
  364. repetitionDict: [{
  365. dictLabel: '是',
  366. dictValue: '1'
  367. },
  368. {
  369. dictLabel: '否',
  370. dictValue: '2'
  371. },
  372. {
  373. dictLabel: '查所有',
  374. dictValue: ''
  375. },
  376. ],
  377. showFilter: false,
  378. dictCascadeData: [],
  379. clueOwnerListData: [], // 人员列表
  380. clueOperationListData: [], // 人员列表
  381. deptList: [],
  382. dateRange: [], // 日期范围
  383. shortTimeList: [{
  384. unit: 'day',
  385. key: '全部',
  386. value: 0
  387. },
  388. {
  389. unit: 'day',
  390. key: '今天',
  391. value: 1
  392. },
  393. {
  394. unit: 'day',
  395. key: '昨天',
  396. value: -1
  397. },
  398. {
  399. unit: 'day',
  400. key: '近3天',
  401. value: 3
  402. },
  403. {
  404. unit: 'day',
  405. key: '近7天',
  406. value: 7
  407. },
  408. {
  409. unit: 'day',
  410. key: '近15天',
  411. value: 15
  412. },
  413. {
  414. unit: 'month',
  415. key: '本月',
  416. value: 1
  417. },
  418. {
  419. unit: 'month',
  420. key: '上月',
  421. value: -1
  422. },
  423. ],
  424. createTimeTxt: null,
  425. clueOwners: {
  426. ids: [],
  427. names: [],
  428. userInfos: [],
  429. },
  430. clueOperations: {
  431. ids: [],
  432. names: [],
  433. userInfos: [],
  434. },
  435. clueTagGroupVoList: [],
  436. defaultRegion: ['广东省', '广州市', '番禺区'],
  437. sortParams: [{
  438. value: 1,
  439. text: '企业名称'
  440. }, {
  441. value: 2,
  442. text: '项目名称'
  443. }, {
  444. value: 3,
  445. text: '项目状态'
  446. }, {
  447. value: 4,
  448. text: '项目等级'
  449. }, {
  450. value: 5,
  451. text: '省市区'
  452. }, {
  453. value: 6,
  454. text: '委托日期'
  455. }, {
  456. value: 7,
  457. text: '创建日期'
  458. }, {
  459. value: 8,
  460. text: '跟进时间'
  461. }]
  462. }
  463. },
  464. mounted() {
  465. this.handleInitTag();
  466. },
  467. methods: {
  468. handleOpen() {
  469. if (this.createTimeTxt === null && this.$refs.jtimePickerPopup) {
  470. this.$refs.jtimePickerPopup.handleInit();
  471. }
  472. },
  473. handleShowclueAppName() {
  474. this.$refs.appName._show();
  475. },
  476. getSelectTime(timeValue) {
  477. // 时间选择器返回 YYYY/MM/DD,接口需要 YYYY-MM-DD;选“全部”时 beginTime/endTime 为空
  478. const start = (timeValue.beginTime || '').replace(/\//g, '-');
  479. const end = (timeValue.endTime || '').replace(/\//g, '-');
  480. this.valueModel.createTimeStart = start || '';
  481. this.valueModel.createTimeEnd = end || '';
  482. if (start && end) {
  483. this.createTimeTxt = start + "至" + end;
  484. } else {
  485. this.createTimeTxt = "";
  486. }
  487. },
  488. deptSeletchang(ids, names) {
  489. this.valueModel.deptIds = ids;
  490. this.valueModel.deptName = names[0];
  491. },
  492. handleShowJtimePickerPopup() {
  493. this.$refs.jtimePickerPopup.pickerShow();
  494. },
  495. handleShowclueDept() {
  496. this.$refs.dept._show();
  497. },
  498. // 自动定位城市
  499. handleGetRegion1(region) {
  500. const {
  501. 0: provinceData,
  502. 1: cityData,
  503. 2: areaData
  504. } = region;
  505. this.valueModel.autoProvince = provinceData.name;
  506. this.valueModel.autoCity = cityData.name;
  507. this.valueModel.autoArea = areaData.name;
  508. },
  509. // 手动填写地域
  510. handleGetRegion2(region) {
  511. const {
  512. 0: provinceData,
  513. 1: cityData,
  514. 2: areaData
  515. } = region;
  516. this.valueModel.manualProvince = provinceData.name;
  517. this.valueModel.manualCity = cityData.name;
  518. this.valueModel.manualArea = areaData.name;
  519. },
  520. appNameSeletchang(ids, names) {
  521. this.valueModel.appNames = ids;
  522. this.valueModel.appNameLabel = names[0];
  523. },
  524. clueOperationSeletchang(ids, names) {
  525. this.clueOperations.ids = ids;
  526. this.clueOperations.names = ids;
  527. this.valueModel.clueOperationId = ids[0];
  528. if (ids.length > 0) {
  529. // 暂时只做单向
  530. uni.$u.api.getUserByUserIds({
  531. userIds: ids.join(",")
  532. }).then(res => {
  533. const {
  534. data
  535. } = res;
  536. this.clueOperations.userInfos = data;
  537. })
  538. } else {
  539. this.clueOperations.userInfos = [];
  540. }
  541. },
  542. clueOwnerSeletchang(ids, names) {
  543. this.clueOwners.ids = ids;
  544. this.clueOwners.names = ids;
  545. this.valueModel.clueOwnerId = ids[0];
  546. if (ids.length > 0) {
  547. // 暂时只做单向
  548. uni.$u.api.getUserByUserIds({
  549. userIds: ids.join(",")
  550. }).then(res => {
  551. const {
  552. data
  553. } = res;
  554. this.clueOwners.userInfos = data;
  555. })
  556. } else {
  557. this.clueOwners.userInfos = [];
  558. }
  559. },
  560. handleShowclueOperation() {
  561. this.$refs.clueOperation._show();
  562. },
  563. handleShowclueOwner() {
  564. this.$refs.clueOwner._show();
  565. },
  566. handleInitTag() {
  567. uni.$u.api.selectAllDeptList({
  568. isDept: 2
  569. }).then(({
  570. data
  571. }) => {
  572. this.deptList = handleTree(data, 'deptId');
  573. });
  574. // 获取人员
  575. uni.$u.api.getDeptOwner({ excludeDeptIds: [100, 369, 378, 356] }).then(res => {
  576. this.clueOwnerListData = filterCustomerManager(res.data);
  577. });
  578. // 获取人员
  579. uni.$u.api.getDeptCustomerByOrg({ deptId: 369 }).then(res => {
  580. this.clueOperationListData = filterCustomerManager(res.data);
  581. });
  582. // 获取所有线索标签
  583. uni.$u.api.getClueTagGroupVoList({ tagGroupApplication: '1' }).then(({
  584. data
  585. }) => {
  586. this.clueTagGroupVoList = data.reduce((acc, cur) => {
  587. return acc.concat(cur.clueTagDataList);
  588. }, []);
  589. });
  590. // 来源
  591. uni.$u.api.getDictCascadeData().then(({
  592. data
  593. }) => {
  594. this.dictCascadeData = handleTree(data, 'id');
  595. });
  596. },
  597. handleClose() {
  598. this.showFilter = false;
  599. },
  600. handleClickTag(item, attr) {
  601. if (item.isCheck) {
  602. const index = this.valueModel[attr].findIndex(v => v == item.dictValue);
  603. this.valueModel[attr].splice(index, 1);
  604. } else {
  605. this.valueModel[attr].push(item.dictValue);
  606. }
  607. },
  608. handleReset() {
  609. const v = this.valueModel;
  610. v.clueStateList = [];
  611. v.followStatusList = [];
  612. v.handleStateList = [];
  613. v.clueEntranceType = [];
  614. v.clueBizType = undefined;
  615. v.clueObjType = undefined;
  616. v.clueAdType = undefined;
  617. v.manualProvince = undefined;
  618. v.manualCity = undefined;
  619. v.manualArea = undefined;
  620. v.autoProvince = undefined;
  621. v.autoCity = undefined;
  622. v.autoArea = undefined;
  623. v.clueOperationId = undefined;
  624. v.clueOwnerId = undefined;
  625. v.allTagList = [];
  626. v.telephone = undefined;
  627. v.deptId = undefined;
  628. v.deptName = undefined;
  629. v.appNames = [];
  630. v.appNameLabel = undefined;
  631. v.isRepetitionOperWeixinName = '';
  632. v.isRepetitionOperationName = '';
  633. v.isVideoIdIsNull = '';
  634. v.advName = "";
  635. v.promotionName = "";
  636. v.advId = "";
  637. v.promotionId = "";
  638. v.titleId = "";
  639. v.videoId = "";
  640. // 线索创建时间选“全部”时清空,避免仍带时间参数
  641. v.createTimeStart = "";
  642. v.createTimeEnd = "";
  643. this.createTimeTxt = "";
  644. this.clueOwners = {
  645. ids: [],
  646. names: [],
  647. userInfos: [],
  648. };
  649. this.clueOperations = {
  650. ids: [],
  651. names: [],
  652. userInfos: [],
  653. };
  654. },
  655. handleEnter() {
  656. const v = this.valueModel;
  657. if (v.titleId && isNaN(v.titleId)) {
  658. this.$u.toast("标题ID必须为纯数值");
  659. return;
  660. }
  661. if (v.videoId && isNaN(v.videoId)) {
  662. this.$u.toast("视频ID必须为纯数值");
  663. return;
  664. }
  665. if (v.promotionId && isNaN(v.promotionId)) {
  666. this.$u.toast("广告ID必须为纯数值");
  667. return;
  668. }
  669. if (v.advId && isNaN(v.advId)) {
  670. this.$u.toast("广告主ID必须为纯数值");
  671. return;
  672. }
  673. this.$emit("update:modelValue", v);
  674. this.$emit("getList");
  675. this.showFilter = false;
  676. },
  677. handleChangeSort(sort) {
  678. this.valueModel.sort = sort;
  679. },
  680. handleChangeSortField(val) {
  681. this.valueModel.sortField = val;
  682. },
  683. show() {
  684. this.showFilter = true;
  685. }
  686. },
  687. }
  688. </script>
  689. <style lang="scss" scoped>
  690. .filterQuery {
  691. padding: 20px;
  692. box-sizing: border-box;
  693. overflow: scroll;
  694. padding-top: 40px;
  695. .dept_wrap {
  696. border: 2px solid #ddd;
  697. display: flex;
  698. padding: 10rpx 20rpx;
  699. border-radius: 6rpx;
  700. margin-bottom: 20rpx;
  701. }
  702. .pick_regions_wrap {}
  703. .person_wrap {
  704. display: flex;
  705. flex-wrap: wrap;
  706. align-items: center;
  707. margin-bottom: 15px;
  708. .person_item {
  709. width: 10%;
  710. display: flex;
  711. flex-direction: column;
  712. align-items: center;
  713. margin-bottom: 10px;
  714. .person_top {
  715. width: 40px;
  716. height: 40px;
  717. display: flex;
  718. align-items: center;
  719. justify-content: center;
  720. }
  721. .person_bottom {
  722. margin-top: 5px;
  723. font-size: 12px;
  724. color: #202020;
  725. }
  726. }
  727. .more_item {
  728. .more {
  729. width: 28px;
  730. height: 28px;
  731. }
  732. .person_bottom {
  733. color: #4c8afe;
  734. font-size: 12px;
  735. margin-top: 0px;
  736. }
  737. }
  738. }
  739. .search_input {
  740. border: 1px solid #ddd;
  741. border-radius: 4px;
  742. overflow: hidden;
  743. margin-bottom: 15px;
  744. }
  745. .query_wrap {
  746. .title {
  747. font-size: 18px;
  748. color: #202020;
  749. margin-bottom: 10px;
  750. }
  751. .option_list {
  752. display: flex;
  753. flex-wrap: wrap;
  754. margin-bottom: 15px;
  755. .option_item {
  756. width: calc(33.33% - 10px);
  757. margin-right: 10px;
  758. margin-bottom: 10px;
  759. ::v-deep .u-tag__text {
  760. margin: auto;
  761. font-size: 14px;
  762. }
  763. &:nth-child(6n) {
  764. margin-right: 0px;
  765. }
  766. }
  767. }
  768. .follow_option_list {
  769. .option_item {
  770. ::v-deep .u-tag__text {
  771. font-size: 12px;
  772. }
  773. }
  774. }
  775. }
  776. }
  777. .case_tabbar {
  778. .uTabbarItem {
  779. ::v-deep .u-tabbar-item__text {
  780. font-size: 18px;
  781. }
  782. }
  783. .close_btn {
  784. ::v-deep .u-tabbar-item__text {
  785. font-size: 18px;
  786. color: #606060 !important;
  787. }
  788. }
  789. }
  790. </style>