|
@@ -250,13 +250,25 @@
|
|
|
<el-dialog :title="assignList.title" :visible.sync="assignList.open" width="1000px" append-to-body>
|
|
|
<customer-assign-list ref="assignList" @close="closeAssignList"></customer-assign-list>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog :title="xy.title" :visible.sync="xy.open" width="1000px" @close="xy.open=false" append-to-body>
|
|
|
+ <div class="xy-content">
|
|
|
+ <div class="xy-img">
|
|
|
+ <img src="@/assets/image/xy_01.jpg"/>
|
|
|
+ <img src="@/assets/image/xy_02.jpg"/>
|
|
|
+ </div>
|
|
|
+ <div class="footer">
|
|
|
+ <el-button @click="submitExport" :disabled="exportDisable">{{exportBtnText}}</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-
|
|
|
+ import store from "@/store";
|
|
|
import { importLineTemplate,getLineCustomerList ,assignToUser,getCustomerDetails,exportCustomer } from "@/api/crm/customer";
|
|
|
-import customerDetails from '../components/lineCustomerDetails.vue';
|
|
|
+import customerDetails from '../components/customerDetails.vue';
|
|
|
import { treeselect } from "@/api/company/companyDept";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
@@ -270,6 +282,16 @@ export default {
|
|
|
components: { assignUser,customerAssignList,addOrEditCustomer,customerDetails,Treeselect,editSource },
|
|
|
data() {
|
|
|
return {
|
|
|
+ companyUser:store.getters.user,
|
|
|
+ exportLoading:null,
|
|
|
+ exportInteval:null,
|
|
|
+ exportTime:60,
|
|
|
+ exportBtnText:"导出",
|
|
|
+ exportDisable:true,
|
|
|
+ xy:{
|
|
|
+ title:"免责协议",
|
|
|
+ open:false,
|
|
|
+ },
|
|
|
visitStatusOptions:[],
|
|
|
isDuplicateOptions:[ {"dictLabel":"不限","dictValue":""},{"dictLabel":"从客户","dictValue":1},{"dictLabel":"非从客户","dictValue":2}],
|
|
|
tagIds:[],
|
|
@@ -366,7 +388,7 @@ export default {
|
|
|
receiveTime: null,
|
|
|
poolTime: null,
|
|
|
companyId: null,
|
|
|
- isLine: null,
|
|
|
+ isLine: 1,
|
|
|
source: null,
|
|
|
tags: null,
|
|
|
isDuplicate:null
|
|
@@ -420,6 +442,7 @@ export default {
|
|
|
this.getDicts("crm_customer_user_status").then((response) => {
|
|
|
this.visitStatusOptions = response.data;
|
|
|
});
|
|
|
+
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
@@ -585,21 +608,53 @@ export default {
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
- const queryParams = this.queryParams;
|
|
|
+ this.exportTime=10;
|
|
|
+ this.xy.open=true;
|
|
|
+ var that=this;
|
|
|
+ this.exportDisable=true;
|
|
|
+ that.exportInteval= setInterval(function(){
|
|
|
+ that.exportBtnText="同意隐私协议("+that.exportTime+")"
|
|
|
+ that.exportTime--;
|
|
|
+ if(that.exportTime<1){
|
|
|
+ that.exportBtnText="同意隐私协议"
|
|
|
+ clearInterval(that.exportInteval)
|
|
|
+ that.exportInteval=null;
|
|
|
+ that.exportDisable=false;
|
|
|
+ }
|
|
|
+ },1000);
|
|
|
+ },
|
|
|
+ submitExport(){
|
|
|
+ var that=this;
|
|
|
+ if(this.tagIds.length>0){
|
|
|
+ this.queryParams.tags=this.tagIds.toString();
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.queryParams.tags=null
|
|
|
+ }
|
|
|
this.$confirm('是否确认导出所有客户数据项?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(function() {
|
|
|
- return exportLineCustomer(queryParams);
|
|
|
+ that.exportLoading = that.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '处理中...',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ });
|
|
|
+ return exportCustomer(that.addDateRange(that.queryParams, that.dateRange));
|
|
|
}).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
+ that.exportLoading.close();
|
|
|
+ that.download(response.msg);
|
|
|
}).catch(function() {});
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
/** 导入按钮操作 */
|
|
|
handleImport() {
|
|
|
this.upload.title = "线索客户导入";
|
|
|
this.upload.open = true;
|
|
|
+
|
|
|
},
|
|
|
/** 下载模板操作 */
|
|
|
importTemplate() {
|
|
@@ -624,19 +679,7 @@ export default {
|
|
|
submitFileForm() {
|
|
|
this.$refs.upload.submit();
|
|
|
},
|
|
|
- /** 导出按钮操作 */
|
|
|
- handleExport() {
|
|
|
- const queryParams = this.queryParams;
|
|
|
- this.$confirm('是否确认导出所有客户数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return exportCustomer(queryParams);
|
|
|
- }).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
- }).catch(function() {});
|
|
|
- },
|
|
|
+
|
|
|
getCustomerName(customerName){
|
|
|
if(customerName==null || customerName==""){
|
|
|
return "";
|
|
@@ -665,4 +708,21 @@ export default {
|
|
|
.el-dialog__wrapper{
|
|
|
z-index: 100000;
|
|
|
}
|
|
|
+ .xy-content{
|
|
|
+
|
|
|
+ }
|
|
|
+ .xy-img{
|
|
|
+ border: 1px solid #dedede;
|
|
|
+ padding: 15px;
|
|
|
+ margin: 15px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+ .footer{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+ }
|
|
|
</style>
|