pagereceivecenter.vue 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100
  1. <script>
  2. import filterQuery from "../order/components/orderCenter/filterQuery.vue";
  3. import commissionFilterQuery from "../order/components/commission/filterQuery.vue";
  4. import dayjs from "dayjs";
  5. // status 状态 1 发单(刚发出来) 2 接单(处理中) 3 收单(入库了) 4 未收(没有收到)
  6. export default {
  7. components: {
  8. filterQuery,
  9. commissionFilterQuery,
  10. },
  11. data() {
  12. return {
  13. orderList: [],
  14. page: {
  15. pageSize: 10,
  16. pageNum: 1,
  17. total: 0
  18. },
  19. tagModalVisible: false,
  20. tagList: [],
  21. currentTags: [],
  22. currentOrder: {},
  23. followUpModelShow: false,
  24. followUpNotes: '',
  25. countdown: 300,
  26. countdownIntervals: null,
  27. //筛选条件
  28. filterList: [
  29. { name: '全部列表', type: 1 },
  30. { name: '我的接发单', type: 2 },
  31. { name: '我的分成', type: 3 }
  32. ],
  33. statisticsSendStatus: [],//中间统计数据
  34. activeType: 1,//当前选择的筛选类型,顶部tab的类型
  35. activeStatus: '',//当前选择的状态,统计数据的类型
  36. currentFollowUp: [],//当前订单的跟进记录
  37. showMoreFollowUp: false,
  38. // 查询参数
  39. queryParams: {
  40. sendDateStart: '',
  41. sendDateEnd: '',
  42. type: '1',
  43. item: undefined,
  44. phone: undefined,
  45. deptId: undefined,
  46. state: undefined,
  47. status: undefined,
  48. allTagList: [],
  49. identification: undefined,
  50. createBy: undefined,
  51. pageNum: 1,
  52. pageSize: 10,
  53. },
  54. // 字典数据
  55. dicts: {
  56. crmFormStatusDict: [],
  57. crmFormCategoryDict: [],
  58. crmFormStateDict: [],
  59. crmFormTacticDict: [],
  60. },
  61. mapHeight: "0px",
  62. // 我的分成的查询参数
  63. commissionQueryParams: {
  64. receiptDateEnd: dayjs().format("YYYY-MM-DD"),
  65. receiptDateStart: dayjs().startOf('month').format("YYYY-MM-DD"),
  66. item: undefined,
  67. phone: undefined,
  68. receiptUserId: undefined,
  69. pageNum: 1,
  70. pageSize: 10,
  71. },
  72. }
  73. },
  74. computed: {
  75. // 根据当前选择的类型返回对应的查询参数
  76. currentQueryParams() {
  77. return this.activeType === 3 ? this.commissionQueryParams : this.queryParams;
  78. },
  79. },
  80. onLoad() {
  81. // 初始化字典数据
  82. this.$getDicts('crm_form_status').then(res => {
  83. this.dicts.crmFormStatusDict = res;
  84. });
  85. this.$getDicts('crm_form_category').then(res => {
  86. this.dicts.crmFormCategoryDict = res;
  87. });
  88. this.$getDicts('crm_form_state').then(res => {
  89. this.dicts.crmFormStateDict = res;
  90. });
  91. this.$getDicts('crm_form_tactic').then(res => {
  92. this.dicts.crmFormTacticDict = res;
  93. });
  94. // 设置 mapHeight
  95. uni.getSystemInfo({
  96. success: (e) => {
  97. const {
  98. windowHeight
  99. } = e;
  100. this.mapHeight = (windowHeight - 70) + 'px';
  101. }
  102. });
  103. //初始调用
  104. this.getOrderList();
  105. this.getStatisticsSendStatus();
  106. this.countdownInterval()
  107. },
  108. onUnload() {
  109. clearInterval(this.countdownInterval);
  110. },
  111. // 下拉刷新
  112. async onPullDownRefresh() {
  113. try {
  114. // 重置页码和列表
  115. this.page.pageNum = 1;
  116. this.queryParams.pageNum = 1;
  117. this.commissionQueryParams.pageNum = 1;
  118. this.orderList = [];
  119. // 重新获取数据
  120. await this.getOrderList();
  121. // 重新获取统计数据
  122. await this.getStatisticsSendStatus();
  123. } catch (error) {
  124. console.error('下拉刷新失败:', error);
  125. } finally {
  126. // 停止下拉刷新动画
  127. uni.stopPullDownRefresh();
  128. }
  129. },
  130. // 滑动到底部加载更多
  131. onReachBottom() {
  132. if (this.orderList.length >= this.page.total) {
  133. //到底了,没有更多
  134. return;
  135. }
  136. const params = this.activeType === 3 ? this.commissionQueryParams : this.queryParams;
  137. params.pageNum++;
  138. this.page.pageNum++;
  139. this.getOrderList();
  140. },
  141. watch: {
  142. countdown: {
  143. handler(newVal, oldVal) {
  144. if (newVal <= 0) {
  145. this.orderList.forEach(order => {
  146. if (order.status == 1) {
  147. this.handleBtnClick('isBusy', order)
  148. }
  149. })
  150. clearInterval(this.countdownInterval);
  151. }
  152. },
  153. immediate: true
  154. }
  155. },
  156. methods: {
  157. countdownInterval() {
  158. this.countdownInterval = setInterval(() => {
  159. this.countdown--
  160. }, 1000);
  161. },
  162. //获取列表数据
  163. async getOrderList() {
  164. try {
  165. let result;
  166. // 如果是"我的分成",调用分成接口
  167. if (this.activeType === 3) {
  168. result = await uni.$u.api.selectCommissionList({
  169. pageSize: this.commissionQueryParams.pageSize,
  170. pageNum: this.commissionQueryParams.pageNum,
  171. }, {
  172. ...this.commissionQueryParams
  173. });
  174. console.log('分成列表', result);
  175. } else {
  176. // 否则调用订单列表接口
  177. // 合并查询参数和筛选参数
  178. const params = {
  179. ...this.queryParams,
  180. type: this.activeType,
  181. status: this.activeStatus || this.queryParams.status,
  182. };
  183. // 移除分页参数,因为已经在第一个参数中传递
  184. delete params.pageNum;
  185. delete params.pageSize;
  186. result = await uni.$u.api.selectClueOrderFormList({
  187. pageSize: this.queryParams.pageSize,
  188. pageNum: this.queryParams.pageNum,
  189. }, params);
  190. console.log('接单列表', result);
  191. // 把数组按照status的大小排序,从小到大
  192. result.rows.sort((a, b) => {
  193. return a.status - b.status;
  194. // return b.status - a.status;
  195. })
  196. }
  197. // 获取当前使用的查询参数
  198. const params = this.activeType === 3 ? this.commissionQueryParams : this.queryParams;
  199. // 如果是第一页(下拉刷新或初始加载),直接替换列表
  200. if (params.pageNum === 1) {
  201. this.orderList = result.rows;
  202. } else {
  203. // 否则追加数据(上拉加载更多)
  204. this.orderList.push(...result.rows);
  205. }
  206. this.page.total = result.total;
  207. this.page.pageNum = params.pageNum;
  208. this.page.pageSize = params.pageSize;
  209. } catch (error) {
  210. console.error('列表接口调用失败:', error);
  211. // 添加用户友好的错误提示
  212. const errorMsg = this.activeType === 3 ? '获取分成列表失败,请稍后重试' : '获取订单列表失败,请稍后重试';
  213. uni.$u.toast(errorMsg);
  214. }
  215. },
  216. //获取统计数据
  217. async getStatisticsSendStatus() {
  218. // 如果是"我的分成",不需要统计数据
  219. if (this.activeType === 3) {
  220. this.statisticsSendStatus = [];
  221. return;
  222. }
  223. const { data } = await uni.$u.api.statisticsSendStatus({ type: this.activeType });
  224. // console.log('统计数据是', data)
  225. this.statisticsSendStatus = data;
  226. },
  227. // 处理按钮点击事件
  228. async handleBtnClick(btnType, order) {
  229. if (btnType == 'acceptOrder') {
  230. //去接单
  231. console.log('去接单', order)
  232. //打开模态窗二次确认,确认后跳转接单form
  233. uni.showModal({
  234. title: '确认接单',
  235. content: `是否确认接单订单:${order.item}?`,
  236. success: async (res) => {
  237. if (res.confirm) {
  238. await uni.$u.api.oderForm({
  239. status: "2",
  240. id: order.id,
  241. });
  242. uni.navigateTo({
  243. url: `/pages/orderDetailRefactored/index?orderId=${order.id}&item=${order.item}&type=${this.type}&clueId=${order.clueId}`,
  244. })
  245. } else if (res.cancel) {
  246. // 用户点击了取消,不执行任何操作
  247. uni.$u.toast('已取消接单');
  248. }
  249. }
  250. })
  251. } else if (btnType == 'isBusy') {
  252. //在忙
  253. console.log('在忙', order)
  254. //当前订单移动到末尾
  255. this.orderList.push(this.orderList.splice(this.orderList.indexOf(order), 1)[0]);
  256. } else if (btnType == 'willFollow') {
  257. //待跟进
  258. console.log('待跟进', order)
  259. //打开模态窗
  260. this.followUpModelShow = true;
  261. this.currentOrder = order
  262. } else if (btnType == 'tag') {
  263. //打标签
  264. console.log('打标签', order)
  265. //打开模态窗
  266. this.tagModalVisible = true;
  267. this.getAllTags();
  268. this.currentTags = order.tags.map(tag => tag.id);
  269. this.currentOrder = order
  270. } else if (btnType == 'share') {
  271. //一键分享
  272. console.log('一键分享', order)
  273. } else if (btnType == 'oneFollow') {
  274. //待跟进
  275. console.log('待跟进', order)
  276. this.followUpModelShow = true;
  277. this.currentOrder = order
  278. }
  279. },
  280. // 格式化金额
  281. formatAmount(amount) {
  282. if (!amount) return '-';
  283. return parseFloat(amount).toLocaleString();
  284. },
  285. // 格式化金额
  286. formatAmount(amount) {
  287. if (!amount) return '-';
  288. return parseFloat(amount).toLocaleString();
  289. },
  290. // 跳转订单详情
  291. toOrderDetail(order) {
  292. //点卡片看详情
  293. // if (order.status == '1' || order.status == '2') {
  294. uni.navigateTo({
  295. url: `/pages/orderDetailRefactored/index?orderId=${order.id}&item=${order.item}&type=${this.type}&clueId=${order.clueId}`,
  296. })
  297. // } else {
  298. // uni.$u.toast('当前订单无法查看详情');
  299. // return;
  300. // }
  301. },
  302. //获取全部标签
  303. async getAllTags() {
  304. const res = await uni.$u.api.getClueTagGroupVoList({ tagGroupApplication: '2' })
  305. console.log('全部标签', res.data[0].clueTagDataList)
  306. this.tagList = res.data[0].clueTagDataList;
  307. },
  308. cancelTag() {
  309. this.tagModalVisible = false;
  310. },
  311. async confirmTag() {
  312. console.log('确认打标签', this.currentTags)
  313. // 这里可以添加打标签的逻辑
  314. const allTags = this.currentTags.map(tag => tag).join(',');
  315. console.log('allTags', allTags)
  316. await uni.$u.api.updateTags({
  317. id: this.currentOrder.id,
  318. allTags: allTags,
  319. })
  320. this.tagModalVisible = false;
  321. uni.$u.toast('标签更新成功');
  322. //更新当前订单的标签
  323. this.currentOrder.tags = this.tagList.filter(tag => this.currentTags.includes(tag.id));
  324. },
  325. // 确认跟进细节按钮点击事件
  326. async confirmFollowUp() {
  327. console.log('确认跟进细节:', this.followUpNotes);
  328. this.followUpModelShow = false;
  329. // 可以在这里添加提交跟进细节的逻辑
  330. // 未收的时候,提交一个跟进记录 待跟进_内容
  331. const res = await uni.$u.api.addOrderFollow({
  332. orderId: this.currentOrder.id,
  333. content: `待跟进_${this.followUpNotes}`,
  334. })
  335. if (res.code == 200) {
  336. uni.$u.toast('提交待跟进记录成功');
  337. }
  338. this.followUpNotes = '';
  339. },
  340. // 切换筛选条件
  341. async changeFilter(param) {
  342. this.activeType = param.type;
  343. // 切换筛选条件时,重置状态筛选
  344. this.activeStatus = '';
  345. this.queryParams.status = undefined;
  346. this.page.pageNum = 1;
  347. this.queryParams.pageNum = 1;
  348. this.commissionQueryParams.pageNum = 1;
  349. this.orderList = [];
  350. this.getOrderList();
  351. this.getStatisticsSendStatus()
  352. },
  353. // 处理关键词搜索
  354. handleKeyword() {
  355. const params = this.activeType === 3 ? this.commissionQueryParams : this.queryParams;
  356. params.pageNum = 1;
  357. this.page.pageNum = 1;
  358. this.orderList = [];
  359. this.getOrderList();
  360. },
  361. // 处理关键词清空
  362. handleKeywordClear() {
  363. const params = this.activeType === 3 ? this.commissionQueryParams : this.queryParams;
  364. params.phone = "";
  365. params.pageNum = 1;
  366. this.page.pageNum = 1;
  367. this.orderList = [];
  368. this.getOrderList();
  369. },
  370. // 显示筛选弹窗
  371. handleshowFilter() {
  372. const refName = this.activeType === 3 ? 'commissionFilter' : 'filter';
  373. this.$refs[refName].show();
  374. },
  375. // 处理筛选查询
  376. handleFilterQuery() {
  377. const params = this.activeType === 3 ? this.commissionQueryParams : this.queryParams;
  378. params.pageNum = 1;
  379. this.page.pageNum = 1;
  380. this.orderList = [];
  381. this.getOrderList();
  382. },
  383. //切换统计数据的类型
  384. changeStatus(param) {
  385. if (param == this.activeStatus) {
  386. //如果当前点击的状态和当前选中的状态相同,则取消选中
  387. this.activeStatus = '';
  388. this.queryParams.status = undefined;
  389. this.queryParams.pageNum = 1;
  390. this.page.pageNum = 1;
  391. this.orderList = [];
  392. this.getOrderList();
  393. } else {
  394. //如果当前点击的状态和当前选中的状态不同,则切换选中状态
  395. this.activeStatus = param;
  396. this.queryParams.status = param;
  397. this.queryParams.pageNum = 1;
  398. this.page.pageNum = 1;
  399. this.orderList = [];
  400. this.getOrderList();
  401. }
  402. },
  403. //点击查看更多的跟进
  404. async handleShowMoreFollowUp() {
  405. //当前的order是
  406. console.log()
  407. const { data } = await uni.$u.api.getDuplicateOrderFollowListByClueId({
  408. clueId: this.currentOrder.clueId
  409. });
  410. console.log('这里是跟进', data)
  411. const allData = []
  412. for (const key in data) {
  413. allData.push(...data[key])
  414. }
  415. const filterData = allData.filter(item => {
  416. console.log('过滤', item)
  417. //过滤出来tem.content不包括联系师傅、师傅拍图技巧、到达客户面对面、未收评分、待跟进_
  418. return item.content.indexOf('联系师傅') == -1 && item.content.indexOf('师傅拍图技巧') == -1 && item.content.indexOf('到达客户面对面') == -1 && item.content.indexOf('未收评分') == -1 && item.content.indexOf('待跟进_') == -1
  419. })
  420. console.log('筛选后的跟进', filterData)
  421. this.currentFollowUp = filterData || [];
  422. this.showMoreFollowUp = true
  423. }
  424. }
  425. }
  426. </script>
  427. <template>
  428. <view class="container">
  429. <u-navbar title="接单中心" :autoBack="true" :placeholder="true" v-hideNav></u-navbar>
  430. <!-- 筛选条件 -->
  431. <u-tabs :list="filterList" @click="changeFilter"></u-tabs>
  432. <!-- 查询参数区域 -->
  433. <view class="queryParams_wrap">
  434. <view class="search">
  435. <u--input clearable prefixIcon="search" v-model="currentQueryParams.phone" shape="circle" @blur="handleKeyword"
  436. @clear="handleKeywordClear" placeholder="请输入电话"></u--input>
  437. </view>
  438. <view class="query">
  439. <view style="margin-right: 10rpx;" @click="handleshowFilter">筛选</view>
  440. <u-icon name="arrow-down-fill" color="#aaa" size="10"></u-icon>
  441. </view>
  442. </view>
  443. <!-- 统计数据 -->
  444. <view v-if="activeType !== 3" class="send_status_wrap">
  445. <scroll-view scroll-x>
  446. <view class="statisticsContainer">
  447. <view v-for="item in statisticsSendStatus" :key="item.status" @click="changeStatus(item.status)"
  448. class="statisticsItem" :class="{ 'activeStatusClass': item.status == activeStatus }">
  449. <view>{{ item.statusName }}</view>
  450. <view>({{ item.count || 0 }})</view>
  451. </view>
  452. </view>
  453. </scroll-view>
  454. </view>
  455. <!-- 订单列表容器 -->
  456. <view class="order_list_wrap">
  457. <transition-group name="order-move" tag="div">
  458. <!-- 我的分成 - 使用专门的分成卡片 -->
  459. <view class="commission_item" v-for="item in orderList" :key="activeType === 3 ? item.id : (item.receiptId + item.id)" v-if="activeType === 3">
  460. <view class="commission_top">
  461. <view class="top_left">{{ item.receiptItem || '-' }}</view>
  462. <view class="top_right">
  463. <text class="account_type">{{ item.accountType === '1' ? '前端' : '后端' }}</text>
  464. </view>
  465. </view>
  466. <view class="commission_info">
  467. <view class="info_row">
  468. <view class="info_item">
  469. <text class="label">电话: </text>
  470. <text class="value">{{ item.phone || '-' }}</text>
  471. </view>
  472. </view>
  473. <view class="info_row">
  474. <view class="info_item">
  475. <text class="label">收单时间: </text>
  476. <text class="value">{{ item.receiptDate || '-' }}</text>
  477. </view>
  478. </view>
  479. <view class="info_row">
  480. <view class="info_item">
  481. <text class="label">收单人: </text>
  482. <text class="value">{{ item.receiptNickName || '-' }}</text>
  483. </view>
  484. <view class="info_item">
  485. <text class="label">公司: </text>
  486. <text class="value">{{ item.orgName || '-' }}</text>
  487. </view>
  488. </view>
  489. <view class="info_row">
  490. <view class="info_item">
  491. <text class="label">分成所属人: </text>
  492. <text class="value">{{ item.userName || '-' }}</text>
  493. </view>
  494. <view class="info_item">
  495. <text class="label">分成比例: </text>
  496. <text class="value">{{ item.commissionRate || '-' }}%</text>
  497. </view>
  498. </view>
  499. </view>
  500. <view class="commission_amount">
  501. <view class="amount_item">
  502. <view class="amount_label">业绩</view>
  503. <view class="amount_value primary">{{ formatAmount(item.commissionAmount) }}</view>
  504. </view>
  505. <view class="amount_item">
  506. <view class="amount_label">毛业绩</view>
  507. <view class="amount_value">{{ formatAmount(item.grossAmount) }}</view>
  508. </view>
  509. </view>
  510. </view>
  511. <!-- 全部列表和我的接发单 - 使用订单卡片 -->
  512. <view class="orderCard" v-for="item in orderList"
  513. :key="activeType === 3 ? item.id : (item.receiptId + item.id)"
  514. v-if="activeType !== 3"
  515. @click.stop="toOrderDetail(item)">
  516. <view class="bandAndPrice">
  517. <view class="bandName">{{ item.itemBrand || '暂无品牌' }}</view>
  518. <view class="price">¥{{ item.priceRange || '?' }}</view>
  519. </view>
  520. <view class="mainLind">
  521. <view class="itemName">{{ item.item || '暂无项目' }}</view>
  522. <view class="mainLindInfo">
  523. <view class="infoItem">
  524. <view class="infoItemTitle">发单人:</view>
  525. <view>{{ item.createNickName || '未知' }}</view>
  526. </view>
  527. <view class="infoItem">
  528. <view class="infoItemTitle">机构:</view>
  529. <view>{{ item.orgName || '暂无机构' }}</view>
  530. </view>
  531. <view class="infoItem">
  532. <view class="infoItemTitle">电话:</view>
  533. <view>{{ item.phone || '暂无电话' }}</view>
  534. </view>
  535. <view class="infoItem">
  536. <view class="infoItemTitle">接单人:</view>
  537. <view>{{ item.identificationName || '暂无所属人' }}</view>
  538. </view>
  539. <view class="infoItem">
  540. <view class="infoItemTitle">运营人:</view>
  541. <view>{{ item.clueOperationName || '暂无运营人' }}</view>
  542. </view>
  543. <view class="infoItem">
  544. <view class="infoItemTitle">发单日期:</view>
  545. <view>{{ item.sendDate || '暂无时间' }}</view>
  546. </view>
  547. </view>
  548. </view>
  549. <view class="tags">
  550. <view class="tag" v-for="(tag, index) in item.tags" :key="index"
  551. :style="{ backgroundColor: tag.color, opacity: 0.8 }">
  552. {{ tag.name }}
  553. </view>
  554. </view>
  555. <view class="Btns">
  556. <!-- status 状态 1 发单(刚发出来) 2 接单(处理中) 3 收单(入库了) 4 未收(没有收到) -->
  557. <view class="btnGroup" v-if="item && (item.status == '1')">
  558. <view class="card-button" @click.stop="handleBtnClick('acceptOrder', item)">立即接单</view>
  559. <view class="card-button isBusy" @click.stop="handleBtnClick('isBusy', item)">
  560. <view>在忙</view>
  561. <view v-if="countdown > 0">({{ countdown }} s)</view>
  562. </view>
  563. </view>
  564. <view class="btnGroup" v-if="item && (item.status == '2')">
  565. <view class="card-button willFollow" @click.stop="handleBtnClick('willFollow', item)">
  566. 待跟进
  567. </view>
  568. <view class="card-button isBusy" @click.stop="handleBtnClick('tag', item)">打标签</view>
  569. </view>
  570. <view class="btnGroup" v-if="item && (item.status == '4')">
  571. <view class="card-button oneFollow" @click.stop="handleBtnClick('oneFollow', item)">待跟进</view>
  572. </view>
  573. </view>
  574. </view>
  575. </transition-group>
  576. <view class="hasMore">
  577. {{ orderList.length >= page.total ? '没有更多了~' : '向下滑动加载更多~' }}
  578. </view>
  579. </view>
  580. <!-- 打标签模态窗 -->
  581. <u-modal showCancelButton :show="tagModalVisible" title="选择标签" @confirm="confirmTag" @cancel="cancelTag">
  582. <view class="slot-content">
  583. <u-checkbox-group class="tagCheckboxGroup" v-model="currentTags" placement="column">
  584. <u-checkbox :customStyle="{ marginBottom: '8px' }" v-for="(item, index) in tagList" :key="item.id"
  585. :label="item.name" :name="item.id">
  586. </u-checkbox>
  587. </u-checkbox-group>
  588. </view>
  589. </u-modal>
  590. <u-modal showCancelButton :show="followUpModelShow" :title="'填写跟进细节'" @confirm="confirmFollowUp"
  591. @cancel="followUpModelShow = false">
  592. <view class="modal-content">
  593. <u--textarea v-model="followUpNotes" placeholder="请输入情况" confirm-type="done"
  594. style="width: 400rpx;margin-bottom: 10rpx; "></u--textarea>
  595. <u-button type="primary" @click="handleShowMoreFollowUp">点击查看更多跟进</u-button>
  596. </view>
  597. </u-modal>
  598. <!-- 更多跟进 -->
  599. <u-modal :show="showMoreFollowUp" title="详细跟进记录" @confirm="showMoreFollowUp = false">
  600. <!-- <view class="followUpBox"> -->
  601. <scroll-view class="followUpBox" scroll-y>
  602. <view v-for="value in currentFollowUp" :key="value.id" class="followUpItem">
  603. <view class="followUpInfo">
  604. <view class="followUpNickname">
  605. 账号:{{ value.createNickname }}
  606. </view>
  607. <view class="followUpOrgName">{{ value.orgName }}</view>
  608. </view>
  609. <view class="followUpContent">{{ value.content }}</view>
  610. </view>
  611. </scroll-view>
  612. <!-- </view> -->
  613. </u-modal>
  614. <!-- 筛选组件 - 订单列表 -->
  615. <filter-query v-if="activeType !== 3" ref="filter" v-model="queryParams" @getList="handleFilterQuery" :mapHeight="mapHeight"
  616. :dicts="dicts"></filter-query>
  617. <!-- 筛选组件 - 我的分成 -->
  618. <commission-filter-query v-if="activeType === 3" ref="commissionFilter" v-model="commissionQueryParams" @getList="handleFilterQuery" :mapHeight="mapHeight"></commission-filter-query>
  619. </view>
  620. </template>
  621. <style scoped lang="scss">
  622. .container {
  623. box-sizing: border-box;
  624. min-height: 100vh;
  625. background-color: #f5f5f5;
  626. }
  627. .hasMore {
  628. text-align: center;
  629. padding: 20rpx 0;
  630. font-size: 24rpx;
  631. color: #999;
  632. }
  633. .queryParams_wrap {
  634. display: flex;
  635. background: #fff;
  636. padding: 14px 0;
  637. border-bottom: 1px solid #f0f0f0;
  638. .query,
  639. .search {
  640. display: flex;
  641. align-items: center;
  642. justify-content: center;
  643. font-size: 16px;
  644. font-weight: 700;
  645. color: #202020;
  646. }
  647. .query {
  648. flex: 1;
  649. cursor: pointer;
  650. }
  651. .search {
  652. flex: 2;
  653. padding-left: 20px;
  654. padding-right: 10px;
  655. }
  656. }
  657. .send_status_wrap {
  658. width: 690rpx;
  659. padding: 0 30rpx;
  660. margin-top: 20rpx;
  661. display: flex;
  662. .statisticsContainer {
  663. display: flex;
  664. align-items: center;
  665. flex-wrap: nowrap;
  666. white-space: nowrap;
  667. }
  668. }
  669. .order_list_wrap {
  670. padding: 10px 0;
  671. }
  672. /* 分成卡片样式 */
  673. .commission_item {
  674. background: #fff;
  675. border-radius: 20rpx;
  676. padding: 20rpx;
  677. margin: 20rpx 20rpx;
  678. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
  679. .commission_top {
  680. display: flex;
  681. justify-content: space-between;
  682. margin-bottom: 15rpx;
  683. .top_left {
  684. font-size: 36rpx;
  685. font-weight: bold;
  686. color: #202020;
  687. }
  688. .top_right {
  689. .account_type {
  690. background: #108cff;
  691. color: #fff;
  692. padding: 8rpx 16rpx;
  693. border-radius: 20rpx;
  694. font-size: 24rpx;
  695. }
  696. }
  697. }
  698. .commission_info {
  699. margin-bottom: 15rpx;
  700. .info_row {
  701. display: flex;
  702. margin-bottom: 16rpx;
  703. &:last-child {
  704. margin-bottom: 0;
  705. }
  706. .info_item {
  707. flex: 1;
  708. display: flex;
  709. align-items: center;
  710. font-size: 28rpx;
  711. .label {
  712. color: #9b9aa2;
  713. margin-right: 16rpx;
  714. min-width: 120rpx;
  715. }
  716. .value {
  717. color: #202020;
  718. }
  719. }
  720. }
  721. }
  722. .commission_amount {
  723. display: flex;
  724. justify-content: space-around;
  725. padding: 30rpx 0;
  726. border-top: 1rpx solid #f0f0f0;
  727. background: #f8f9fb;
  728. border-radius: 20rpx;
  729. .amount_item {
  730. text-align: center;
  731. .amount_label {
  732. font-size: 24rpx;
  733. color: #9b9aa2;
  734. margin-bottom: 10rpx;
  735. }
  736. .amount_value {
  737. font-size: 32rpx;
  738. font-weight: bold;
  739. color: #202020;
  740. &.primary {
  741. color: #108cff;
  742. }
  743. }
  744. }
  745. }
  746. }
  747. /* 订单卡片主容器 */
  748. .orderCard {
  749. box-sizing: border-box;
  750. width: 95%;
  751. background-color: #fff;
  752. margin: 20rpx auto;
  753. border-radius: 20rpx;
  754. padding: 20rpx;
  755. }
  756. /* 品牌和价格区域 */
  757. .orderCard .bandAndPrice {
  758. display: flex;
  759. justify-content: space-between;
  760. align-items: center;
  761. }
  762. /* 品牌名称 */
  763. .orderCard .bandAndPrice .bandName {
  764. font-size: 20rpx;
  765. font-weight: 700;
  766. border: 2px solid #2563EB;
  767. padding: 6rpx 12rpx;
  768. border-radius: 15rpx;
  769. background-color: #EFF6FF;
  770. color: #2563EB;
  771. }
  772. /* 价格 */
  773. .orderCard .bandAndPrice .price {
  774. font-size: 30rpx;
  775. font-weight: 700;
  776. }
  777. /* 主要内容行 */
  778. .orderCard .mainLind {
  779. margin-top: 10rpx;
  780. display: flex;
  781. justify-content: space-between;
  782. align-items: center;
  783. gap: 20rpx;
  784. flex-direction: column;
  785. }
  786. /* 主要内容行信息容器 */
  787. .orderCard .mainLind .mainLindInfo {
  788. display: grid;
  789. grid-template-columns: 1fr 1fr;
  790. flex-direction: column;
  791. gap: 10rpx;
  792. font-size: 24rpx;
  793. color: #6b7280;
  794. text-wrap: nowrap;
  795. width: 100%;
  796. .infoItem {
  797. display: flex;
  798. .infoItemTitle {
  799. font-weight: 700;
  800. }
  801. }
  802. }
  803. /* 商品名称 */
  804. .orderCard .mainLind .itemName {
  805. font-size: 30rpx;
  806. font-weight: 700;
  807. color: #374751;
  808. width: 100%;
  809. text-align: left;
  810. }
  811. /* 标签区域 */
  812. .orderCard .tags {
  813. display: flex;
  814. gap: 10rpx;
  815. }
  816. /* 单个标签 */
  817. .orderCard .tags .tag {
  818. font-size: 20rpx;
  819. font-weight: 700;
  820. padding: 6rpx 12rpx;
  821. border-radius: 15rpx;
  822. background-color: #EFF6FF;
  823. color: #fff;
  824. }
  825. /* 按钮区域 */
  826. .orderCard .Btns {
  827. margin-top: 10rpx;
  828. }
  829. /* 按钮组 */
  830. .orderCard .Btns .btnGroup {
  831. display: flex;
  832. justify-content: space-between;
  833. align-items: center;
  834. gap: 20rpx;
  835. }
  836. /* 卡片按钮基础样式 */
  837. .orderCard .Btns .btnGroup .card-button {
  838. font-size: 24rpx;
  839. font-weight: 700;
  840. border: 2rpx solid #2563EB;
  841. padding: 6rpx 12rpx;
  842. border-radius: 15rpx;
  843. background-color: #2563EB;
  844. color: #fff;
  845. width: 45%;
  846. text-align: center;
  847. cursor: pointer;
  848. height: 60rpx;
  849. line-height: 60rpx;
  850. display: flex;
  851. justify-content: center;
  852. align-items: center;
  853. }
  854. /* 忙碌状态按钮 */
  855. .orderCard .Btns .btnGroup .card-button.isBusy {
  856. background-color: #fff;
  857. color: #6B7280;
  858. border-color: #6B7280;
  859. }
  860. /* 待跟进状态按钮 */
  861. .orderCard .Btns .btnGroup .card-button.willFollow {
  862. background-color: #EFF6FF;
  863. color: #2563EB;
  864. }
  865. /* 单独跟进按钮 */
  866. .orderCard .Btns .btnGroup .card-button.oneFollow {
  867. width: 100%;
  868. background-color: #EFF6FF;
  869. color: #2563EB;
  870. }
  871. .followUpScroll {
  872. height: 600rpx;
  873. }
  874. /* 订单移动动画 */
  875. .order-move-enter-active,
  876. .order-move-leave-active {
  877. transition: all 0.5s ease;
  878. }
  879. .order-move-enter-from,
  880. .order-move-leave-to {
  881. opacity: 0;
  882. transform: translateY(30px);
  883. }
  884. .order-move-move {
  885. transition: transform 0.5s ease;
  886. }
  887. .cancelBtn {
  888. margin-top: 20rpx;
  889. }
  890. .tagCheckboxGroup {
  891. display: grid;
  892. grid-template-columns: repeat(2, 1fr);
  893. }
  894. .statisticsItem {
  895. font-size: 30rpx;
  896. display: inline-flex;
  897. align-items: center;
  898. background: #fff;
  899. margin-right: 30rpx;
  900. padding: 8rpx 16rpx;
  901. white-space: nowrap;
  902. border-radius: 6rpx;
  903. color: #333;
  904. &.activeStatusClass {
  905. color: #fff;
  906. background: #4c8afe;
  907. }
  908. }
  909. .activeStatusClass {
  910. background-color: #2563EB;
  911. color: #fff;
  912. }
  913. ::v-deep .u-tabs__wrapper__nav__line {
  914. top: 7px;
  915. }
  916. .followUpItem {
  917. background-color: #F7FBFE;
  918. width: 540rpx;
  919. margin: 20rpx;
  920. padding: 20rpx;
  921. box-sizing: border-box;
  922. .followUpInfo {
  923. display: flex;
  924. justify-content: space-between;
  925. align-items: center;
  926. gap: 10rpx;
  927. margin-bottom: 10rpx;
  928. }
  929. .followUpNickname {
  930. font-size: 24rpx;
  931. font-weight: 700;
  932. color: #2563EB;
  933. }
  934. .followUpOrgName {
  935. font-size: 24rpx;
  936. font-weight: 700;
  937. color: #6B7280;
  938. }
  939. .followUpContent {
  940. font-size: 24rpx;
  941. font-weight: 700;
  942. color: #374751;
  943. }
  944. }
  945. .followUpBox {
  946. height: 600rpx;
  947. }
  948. .u-tabs{
  949. background-color: #fff;
  950. }
  951. ::v-deep .u-navbar {
  952. flex-shrink: 0;
  953. }
  954. </style>