Przeglądaj źródła

销售线索导出

qymljy 2 lat temu
rodzic
commit
a302e95d27

+ 1 - 0
src/HDrpManagement/contractManage/components/addContract.vue

@@ -1182,6 +1182,7 @@ export default {
       console.log(this.payTypeData,'处理后数据')
       console.log(this.payTypeData,'处理后数据')
     },
     },
     discountrateChange(){
     discountrateChange(){
+
       this.form.discountrate = Math.round(this.form.discountrate * 100)/100
       this.form.discountrate = Math.round(this.form.discountrate * 100)/100
     },
     },
     orderratioChange(){
     orderratioChange(){

+ 14 - 4
src/SManagement/orderclue/index.vue

@@ -10,13 +10,16 @@
       tableName="orderclueList"
       tableName="orderclueList"
       idName="sat_orderclueid"
       idName="sat_orderclueid"
       :autoQuery="false"
       :autoQuery="false"
+      :isExport="false"
       :specialKey="[{key:'leader',value:'name'}]"
       :specialKey="[{key:'leader',value:'name'}]"
       :apiId="{query:20221101094502,del:''}"
       :apiId="{query:20221101094502,del:''}"
       :options="options"
       :options="options"
       :detailPath="{path:'/orderclue_detail',param:{tabIndex:tabIndex}}"
       :detailPath="{path:'/orderclue_detail',param:{tabIndex:tabIndex}}"
       @checkboxCallBack="checkboxCallBack"
       @checkboxCallBack="checkboxCallBack"
+      @listData="reList"
     >
     >
-      <div slot="titleRight" >
+      <div slot="titleRight">
+        <exportFile :param="param" :columns="tablecols" fileName="销售线索"></exportFile>
         <changeSite class="inline-16" v-if="tool.checkAuth($route.name,'changeSite')" :selectList="selectList" @onSuccess="$refs.list.listData($refs.list.param.content.pageNumber = 1)"></changeSite>
         <changeSite class="inline-16" v-if="tool.checkAuth($route.name,'changeSite')" :selectList="selectList" @onSuccess="$refs.list.listData($refs.list.param.content.pageNumber = 1)"></changeSite>
       </div>
       </div>
     <template #custom>
     <template #custom>
@@ -108,9 +111,11 @@
 
 
 <script>
 <script>
 import changeSite from '@/HManagement/clueManage/clue_private/modules/changeSite.vue'
 import changeSite from '@/HManagement/clueManage/clue_private/modules/changeSite.vue'
+import exportFile from '@/components/export_file/index3'
 export default {
 export default {
   components:{
   components:{
-    changeSite
+    changeSite,
+    exportFile
   },
   },
   data () {
   data () {
     return {
     return {
@@ -127,7 +132,9 @@ export default {
       tradefields:[],
       tradefields:[],
       selectList:[],
       selectList:[],
       tagData:[],
       tagData:[],
-      tag:''
+      tag:'',
+      param:{},
+      tablecols:[]
     }
     }
   },
   },
   provide() {
   provide() {
@@ -150,9 +157,12 @@ export default {
     const res3 = await this.$store.dispatch('optiontypeselect','tradefield')
     const res3 = await this.$store.dispatch('optiontypeselect','tradefield')
     this.tradefields = res3.data
     this.tradefields = res3.data
     console.log(this.statusList);
     console.log(this.statusList);
-
+    this.tablecols = this.tool.tabelCol(this.$route.name).orderclueList.tablecols
   },
   },
   methods:{
   methods:{
+    reList(){
+      this.param = this.$refs.list.param
+    },
     async getTeamList () {
     async getTeamList () {
       let res = await this.$api.requested({
       let res = await this.$api.requested({
         /*"classname": "sale.team.team",
         /*"classname": "sale.team.team",

+ 1 - 1
src/components/export_excel/index.vue

@@ -73,4 +73,4 @@ export default {
 
 
 </script>
 </script>
 <style>
 <style>
-</style>
+</style>

+ 0 - 2
src/components/export_file/index2.vue

@@ -12,7 +12,6 @@ export default {
   },
   },
   methods:{
   methods:{
     async exportData(){
     async exportData(){
-      console.log(this.param,'param22')
       this.param.content.isExport = 1
       this.param.content.isExport = 1
       /*导出数据*/
       /*导出数据*/
       const res = await this.$api.requested(this.param)
       const res = await this.$api.requested(this.param)
@@ -20,7 +19,6 @@ export default {
       this.param.content.isExport = 0
       this.param.content.isExport = 0
     },
     },
     downFile(url, fileName) {
     downFile(url, fileName) {
-      console.log(url,'url')
       const x = new XMLHttpRequest()
       const x = new XMLHttpRequest()
       x.open('GET', url, true)
       x.open('GET', url, true)
       x.responseType = 'blob'
       x.responseType = 'blob'

+ 40 - 0
src/components/export_file/index3.vue

@@ -0,0 +1,40 @@
+<template>
+  <el-button type="primary" size="small" @click="exportData" plain>导 出</el-button>
+</template>
+
+<script>
+export default {
+  props:['param','type','columns','columnsIndex','fileName','dataid'],
+  data(){
+    return{
+      columnsData:[]
+    }
+  },
+  methods:{
+    async exportData(){
+      this.param.content.isExport = 1
+      this.param.content.isAll = 1
+      /*导出数据*/
+      const res = await this.$api.requested(this.param)
+      this.downFile(res.data[0].url,this.fileName)
+      this.param.content.isExport = 0
+      this.param.content.isAll = 0
+    },
+    downFile(url, fileName) {
+      const x = new XMLHttpRequest()
+      x.open('GET', url, true)
+      x.responseType = 'blob'
+      x.onload = function() {
+        const url = window.URL.createObjectURL(x.response)
+        const a = document.createElement('a')
+        a.href = url
+        a.download = fileName
+        a.click()
+      }
+      x.send()
+    }
+  }
+}
+</script>
+<style>
+</style>

+ 1 - 1
src/components/socketMessage/index.vue

@@ -7,7 +7,7 @@
     <div class="message-item" v-for="item in list" :key="item.index">
     <div class="message-item" v-for="item in list" :key="item.index">
       <p class="text" style="margin-bottom:10px;font-weight: 400;">[{{item.type}}消息]&nbsp;{{item.title}}</p>
       <p class="text" style="margin-bottom:10px;font-weight: 400;">[{{item.type}}消息]&nbsp;{{item.title}}</p>
       <div style="height:170px;overflow-y: scroll;">{{ item.text }}</div>
       <div style="height:170px;overflow-y: scroll;">{{ item.text }}</div>
-      
+
     </div>
     </div>
     <p class="unread-panel">共有{{total}}条未读消息</p>
     <p class="unread-panel">共有{{total}}条未读消息</p>
   </div>
   </div>