Commit 6f8443cf authored by zhengyi's avatar zhengyi

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

parent 97ddd548
...@@ -60,13 +60,22 @@ export function exportCustomerFollowExcel(query) { ...@@ -60,13 +60,22 @@ export function exportCustomerFollowExcel(query) {
}) })
} }
export function getCustomerFollowList(params) { // 跟进分页列表
export function getCustomerFollowupList(params) {
return request({ return request({
url: "/customer/followup/page", url: "/customer/followup/page",
method: "get", method: "get",
params params
}) })
} }
// 数据权限跟进分页列表
export function getDataSpaceCustomerFollowupList(params) {
return request({
url: "/customer/followup/data/space/page",
method: "get",
params
})
}
export function getCustomerFollowDetail(params) { export function getCustomerFollowDetail(params) {
return request({ return request({
...@@ -99,7 +108,7 @@ export function updateCustomerFollowupStatus(data) { ...@@ -99,7 +108,7 @@ export function updateCustomerFollowupStatus(data) {
}) })
} }
export function exportCustomerFollow(params) { export function exportCustomerFollowup(params) {
return request({ return request({
url: "/customer/followup/export-excel", url: "/customer/followup/export-excel",
method: "get", method: "get",
...@@ -107,6 +116,16 @@ export function exportCustomerFollow(params) { ...@@ -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() { export function getFollowupNewNumber() {
return request({ return request({
url: "/customer/followup/getFollowupNewNumber", url: "/customer/followup/getFollowupNewNumber",
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</el-form-item> </el-form-item>
<el-form-item style="padding-left: 20px; width: auto"> <el-form-item style="padding-left: 20px; width: auto">
<div class="flex-c-c"> <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> <el-button type="primary" @click="reset">{{ $t("重置") }} </el-button>
</div> </div>
</el-form-item> </el-form-item>
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </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> </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 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> <customer-follow-update-status :show.sync="updateStatus" :followup-ids.sync="selectCustomerFollowList" @refresh="handleQuery"></customer-follow-update-status>
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
</template> </template>
<script> <script>
import { getCustomerFollowList, exportCustomerFollow } from "@/api/ecw/customerFollow" import { getDataSpaceCustomerFollowupList, exportDataSpaceCustomerFollowup } from "@/api/ecw/customerFollow"
import { getDictDatas, DICT_TYPE, getDictDatas2 } from "@/utils/dict" import { getDictDatas, DICT_TYPE, getDictDatas2 } from "@/utils/dict"
import CustomerFollow from "@/views/ecw/customer/components/customerFollow" import CustomerFollow from "@/views/ecw/customer/components/customerFollow"
import UserSelector from "@/components/UserSelector" import UserSelector from "@/components/UserSelector"
...@@ -186,7 +186,7 @@ export default { ...@@ -186,7 +186,7 @@ export default {
watch: { watch: {
selectCustomerFollowList(val) { selectCustomerFollowList(val) {
if (val.length === 0) { if (val.length === 0) {
this.getCustomerFollowList() this.getDataSpaceCustomerFollowupList()
this.$refs.multipleTable.clearSelection() this.$refs.multipleTable.clearSelection()
} }
}, },
...@@ -243,13 +243,13 @@ export default { ...@@ -243,13 +243,13 @@ export default {
this.followForm.pageNo = 1 this.followForm.pageNo = 1
this.customerFollowTotal = 0 this.customerFollowTotal = 0
this.customerFollowList = [] this.customerFollowList = []
this.getCustomerFollowList() this.getDataSpaceCustomerFollowupList()
}, },
/** 跟进记录导出按钮操作 */ /** 跟进记录导出按钮操作 */
handleExport() { handleExport() {
// 执行导出 // 执行导出
this.$modal.confirm(this.$t("是否确认导出客户跟进记录数据项?")).then(() => { this.$modal.confirm(this.$t("是否确认导出客户跟进记录数据项?")).then(() => {
exportCustomerFollow({ exportDataSpaceCustomerFollowup({
...this.followForm, ...this.followForm,
...this.formatQuery(), ...this.formatQuery(),
pageNo: null, pageNo: null,
...@@ -259,9 +259,9 @@ export default { ...@@ -259,9 +259,9 @@ export default {
}) })
}) })
}, },
getCustomerFollowList() { getDataSpaceCustomerFollowupList() {
this.loading = true this.loading = true
getCustomerFollowList({ getDataSpaceCustomerFollowupList({
...this.followForm, ...this.followForm,
...this.formatQuery() ...this.formatQuery()
}).then((r) => { }).then((r) => {
...@@ -276,7 +276,7 @@ export default { ...@@ -276,7 +276,7 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 10 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