Commit 6f8443cf authored by zhengyi's avatar zhengyi

跟进列表切换数据权限查询与导出接口

parent 97ddd548
......@@ -60,13 +60,22 @@ export function exportCustomerFollowExcel(query) {
})
}
export function getCustomerFollowList(params) {
// 跟进分页列表
export function getCustomerFollowupList(params) {
return request({
url: "/customer/followup/page",
method: "get",
params
})
}
// 数据权限跟进分页列表
export function getDataSpaceCustomerFollowupList(params) {
return request({
url: "/customer/followup/data/space/page",
method: "get",
params
})
}
export function getCustomerFollowDetail(params) {
return request({
......@@ -99,7 +108,7 @@ export function updateCustomerFollowupStatus(data) {
})
}
export function exportCustomerFollow(params) {
export function exportCustomerFollowup(params) {
return request({
url: "/customer/followup/export-excel",
method: "get",
......@@ -107,6 +116,16 @@ export function exportCustomerFollow(params) {
})
}
// 数据权限导出跟进 Excel
export function exportDataSpaceCustomerFollowup(query) {
return request({
url: "/customer/followup/data/space/export-excel",
method: "get",
params: query,
responseType: "blob"
})
}
export function getFollowupNewNumber() {
return request({
url: "/customer/followup/getFollowupNewNumber",
......
......@@ -46,7 +46,7 @@
</el-form-item>
<el-form-item style="padding-left: 20px; width: auto">
<div class="flex-c-c">
<el-button type="primary" icon="el-icon-search" @click="getCustomerFollowList">{{ $t("搜索") }} </el-button>
<el-button type="primary" icon="el-icon-search" @click="getDataSpaceCustomerFollowupList">{{ $t("搜索") }} </el-button>
<el-button type="primary" @click="reset">{{ $t("重置") }} </el-button>
</div>
</el-form-item>
......@@ -121,7 +121,7 @@
</template>
</el-table-column>
</el-table>
<pagination :total="customerFollowTotal" :page.sync="followForm.pageNo" :limit.sync="followForm.pageSize" @pagination="getCustomerFollowList" />
<pagination :total="customerFollowTotal" :page.sync="followForm.pageNo" :limit.sync="followForm.pageSize" @pagination="getDataSpaceCustomerFollowupList" />
</el-card>
<customer-follow ref="customerFollow" @close="customerFollowVisible = false" @handleCustomerFollowAdd="handleCustomerFollowAdd" @refresh="handleQuery" v-if="customerFollowVisible" :customer-id="customerId" :customerService="customerService" :customerNumber="customerNumber" />
<customer-follow-update-status :show.sync="updateStatus" :followup-ids.sync="selectCustomerFollowList" @refresh="handleQuery"></customer-follow-update-status>
......@@ -129,7 +129,7 @@
</template>
<script>
import { getCustomerFollowList, exportCustomerFollow } from "@/api/ecw/customerFollow"
import { getDataSpaceCustomerFollowupList, exportDataSpaceCustomerFollowup } from "@/api/ecw/customerFollow"
import { getDictDatas, DICT_TYPE, getDictDatas2 } from "@/utils/dict"
import CustomerFollow from "@/views/ecw/customer/components/customerFollow"
import UserSelector from "@/components/UserSelector"
......@@ -186,7 +186,7 @@ export default {
watch: {
selectCustomerFollowList(val) {
if (val.length === 0) {
this.getCustomerFollowList()
this.getDataSpaceCustomerFollowupList()
this.$refs.multipleTable.clearSelection()
}
},
......@@ -243,13 +243,13 @@ export default {
this.followForm.pageNo = 1
this.customerFollowTotal = 0
this.customerFollowList = []
this.getCustomerFollowList()
this.getDataSpaceCustomerFollowupList()
},
/** 跟进记录导出按钮操作 */
handleExport() {
// 执行导出
this.$modal.confirm(this.$t("是否确认导出客户跟进记录数据项?")).then(() => {
exportCustomerFollow({
exportDataSpaceCustomerFollowup({
...this.followForm,
...this.formatQuery(),
pageNo: null,
......@@ -259,9 +259,9 @@ export default {
})
})
},
getCustomerFollowList() {
getDataSpaceCustomerFollowupList() {
this.loading = true
getCustomerFollowList({
getDataSpaceCustomerFollowupList({
...this.followForm,
...this.formatQuery()
}).then((r) => {
......@@ -276,7 +276,7 @@ export default {
pageNo: 1,
pageSize: 10
}
this.getCustomerFollowList()
this.getDataSpaceCustomerFollowupList()
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment