<template> <div class="content"> <div class="search"> <mobile-input label-width="10px" :reset="resetvalue" input-align="left" name="CUSTOMERNAME" v-model="CUSTOMERNAME" placeholder="请输入关键字" size="small" /> <div style="width: 200px; display: flex;justify-content: space-evenly;align-items: self-start"> <van-button color="#FF574C" type="primary" @click="reset" plain style="width: 70px;height: 34px;display: block" size="small">重置</van-button> <van-button color="#FF574C" type="primary" @click="search" style="width: 70px;height: 34px;display: block" size="small">查询</van-button> </div> </div> <div class="Managementdata"> <scroller-view v-if="nodata" v-calculate-height :pulldown="pulldown" :pullup="pullup" :refresh-data="onrefreshdata" :load-data="onloaddata"> <div v-for="(item, index) in itemDataList" :key="index" class="customer-bottom-list" @click="collection(item)"> <div class="customer-bottom-list-top"> <div> <span style="color: #FF574C">{{ index + 1}}</span> </div> <div>{{ item.customerName }}</div> <div v-if="item.createType == '1'" class="labelData">总行</div> <div v-if="item.createType == '2'" class="labelData">分(支)行</div> <div v-if="item.createType == '3'" class="labelData">自建</div> </div> <div class="customer-bottom-list-bottom"> <span style="margin-left:20px;width:215px;" >单位地址: {{ item.cusAddr }}</span> <span style="margin-left:20px;font-size:14px;">预计完成时间: {{ item.marketEndTime }}</span> </div> </div> </scroller-view> </div> <div @click="addButton" class="add-button">新增</div> </div> </template> <script lang="ts"> import { Component, Vue } from "vue-property-decorator"; import { Search } from 'vant'; import nettyApi from "@/constants/api/ms-netty/netty.api.ts"; import IF from "@/public/factory/InterFaceFactory"; import { NativeUI } from "@/public/ts/NativeUI"; import { Popup } from 'vant'; import applicationApi from "@/constants/api/ms-application/application.api"; import { getText } from "@/stores"; Vue.use(Popup); Vue.use(Search); /** * @Description 个人上门营销(待办) * @Author JiangTao * @Date 2022-01-18 下午 04:06 */ @Component({ name: "ComMarketingView", }) export default class ComMarketingView extends Vue { resetvalue = false; CUSTOMERNAME = ""; itemDataList = []; pageNo = 1; pullup = true; pulldown = true; nodata = true; createType = ''; marketEndTime = ''; mounted() { this.selectContactList(1); } activated() { this.selectContactList(1); } /** * @Description 点击列表事件 * @Author JiangTao * @Date 2022-01-18 下午 07:15 */ collection(item: any) { this.$store.commit("setEmpty"); this.$store.commit("setCusInfo", {}); this.$store.commit("setCusInfo", item); this.$router.push({ path: "/MarketingTask", query: { type: '上门营销', } }); } /** * @Description 查询 * @Author JiangTao * @Date 2022-01-18 下午 04:17 */ search() { this.selectContactList(1); } /** * @Description 重置 * @Author JiangTao * @Date 2022-01-18 下午 05:36 */ reset() { this.resetvalue = true; this.selectContactList(); } /** * @Description 上拉加载 * @Author JiangTao * @Date 2022-01-18 下午 04:04 */ onloaddata() { this.pageNo = Math.ceil(this.itemDataList.length / 10) + 1; return this.selectContactList(this.pageNo); } /** * @Description 下拉刷新 * @Author JiangTao * @Date 2022-01-17 下午 05:14 */ onrefreshdata() { return this.selectContactList(); } /** * @Description 新增 * @Author JiangTao * @Date 2022-01-28 上午 11:24 */ addButton() { this.$router.push({ path: "/PerMarketingAdd" }); } /** * @Description 个人上门营销(待办) * @Author JiangTao * @Date 2022-01-18 下午 03:46 */ selectContactList(pageNo = 1) { this.nodata = true; this.pullup = true; this.pulldown = true; const param = { pageNum: pageNo, pageSize: '10', tc: 'MCEP' }; NativeUI.showWaiting('正在查询...'); return IF.transferDataInter(applicationApi.MarketingList, param).then((res: any) => { console.log(res); NativeUI.closeWaiting(); if (res.code == '1') { if (res.data.records && res.data.records.length > 0) { if (pageNo == 1) { this.itemDataList = res.data.records; } else { this.itemDataList = this.itemDataList.concat(res.data.records); } for (let i = 0; i < this.itemDataList.length; i++) { (this.itemDataList[i] as any).marketType = getText((this.itemDataList[i] as any).marketType, 'marketType'); } } else { if (pageNo == 1) { this.itemDataList = []; } } } else { NativeUI.toast(res.msg); } if (res.data.records && res.data.records.length < 10) { this.pullup = false; } if (this.itemDataList.length == 0) { this.pulldown = false; } }); } } </script> <style scoped> ::v-deep .van-cell__title, ::v-deep .van-field__label { display: flex; align-items: center; } .content { width: 100%; } .search { width: 100%; height: 70px; border: 1px solid #e1e2e3; display: flex; align-items: center; justify-content: center; } ::v-deep .d-form-field { padding-bottom: 0; width: 70%; height: 50px; } ::v-deep .van-field__control { height: 30px; } .customer-bottom-list { border-radius: 10px; background-color: #f8fdff; box-shadow: 0 0 6px #d7d7d7; margin: 0 10px 16px 10px; padding-bottom: 10px; position: relative; } .customer-bottom-list-top > div:nth-child(1) { width: 30px; height: 30px; border: 1px solid #FF574C; border-radius: 15px; display: flex; justify-content: center; align-items: center; } .customer-bottom-list-top > div:nth-child(2) { font-size: 115%; font-weight: bold; font-family: "微软雅黑 Bold", "微软雅黑 Regular", "微软雅黑"; margin-left: 0.8%; } .customer-bottom-list-top { width: 100%; display: flex; justify-content: flex-start; align-items: center; padding-top: 1.5%; margin-left: 1.5%; } .customer-bottom-list-top > div:nth-child(3) { width: auto; grid-column-gap: 4px; align-items: center; margin-left: 1%; } .customer-bottom-list-top > div:nth-child(3) div { color: #ff6e0d; background-color: rgba(255, 247, 204, 1); font-size: 80%; padding-top: 2%; padding-bottom: 1.5%; border-radius: 2px; text-align: center; width: 100%; } .customer-bottom-list-bottom { height: 26px; display: flex; margin-top: 10px; padding-left: 48px; justify-content: flex-start; align-items: center; } .Managementdata { padding: 0 20px; } ::v-deep .screenPopup { width: 75%; margin-left: 25%; display: flex; align-items: center; justify-content: center; padding: 60px 5% 5px 5%; z-index: 99 !important; } .screenPopup > div:nth-child(1) { width: 85%; height: 100%; } ::v-deep .van-overlay { z-index: 90 !important; } .screenbutton { width: 15%; height: 100%; display: flex; flex-direction: column; align-content: center; justify-content: center; } ::v-deep .screenbutton button { margin: 20px auto; } ::v-deep .screenbutton .van-button__content { font-size: 18px; } ::v-deep .van-picker { width: 75%; margin-left: 25%; border-top-left-radius: 15px; } ::v-deep .van-popup--round { background-color: rgba(0, 0, 0, 0); } .searchStyle { display: grid; align-items: center; grid-template-columns: 1fr 1fr; } .searchStyle div { width: 90%; } ::v-deep .scroller { margin-top: 10px; } .add-button { position: absolute; width: 80px; height: 80px; border-radius: 40px; background-color: #ff574c; top: 80%; right: 5%; box-shadow: 0 5px 10px #e7aaa8; display: flex; justify-content: center; align-items: center; color: white; font-size: 20px; } .labelData { width: auto; padding: 2px 5px; margin-left: 10px; font-size: 12px; color: #ff6e0d; background-color: #fff7cc; border-radius: 2px; } </style>