|
|
@@ -89,7 +89,18 @@
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
-
|
|
|
+ <el-row :gutter="10" class="mb8" v-if="designatedCompany">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ @click="checkWithCondition()"
|
|
|
+ >按筛选条件选中
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
<el-table border v-loading="loading" :data="customerList" :row-key="getRowKeys" @selection-change="handleSelectionChange" size="mini" ref="table" height="450">
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
|
|
|
<el-table-column label="ID" align="center" prop="customerId" />
|
|
|
@@ -153,7 +164,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listCustomerAll } from "@/api/crm/customer";
|
|
|
+import { listCustomerAll,listNoPage } from "@/api/crm/customer";
|
|
|
import { getCompanyList } from "@/api/company/company";
|
|
|
import customerDetails from '@/views/crm/components/customerDetails.vue';
|
|
|
import editCustomerSource from '@/views/crm/components/editSource.vue';
|
|
|
@@ -451,6 +462,53 @@ export default {
|
|
|
this.$refs.table.clearSelection();
|
|
|
})
|
|
|
},
|
|
|
+ //按照筛选条件选择客户
|
|
|
+ checkWithCondition(){
|
|
|
+
|
|
|
+ let queryParamNoPage = {};
|
|
|
+ queryParamNoPage = this.queryParams;
|
|
|
+ if(this.receiveTimeRange!=null&&this.receiveTimeRange.length==2){
|
|
|
+ queryParamNoPage.receiveTimeRange=this.receiveTimeRange[0]+"--"+this.receiveTimeRange[1]
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ queryParamNoPage.receiveTimeRange=null;
|
|
|
+ }
|
|
|
+ if(this.ctsTypeArr.length>0){
|
|
|
+ queryParamNoPage.customerType=this.ctsTypeArr.toString();
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ queryParamNoPage.customerType=null
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.sourceArr.length>0){
|
|
|
+ queryParamNoPage.source=this.sourceArr.toString();
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ queryParamNoPage.source=null
|
|
|
+ }
|
|
|
+ if(this.tagIds.length>0){
|
|
|
+ queryParamNoPage.tags=this.tagIds.toString();
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ queryParamNoPage.tags=null
|
|
|
+ }
|
|
|
+ listNoPage(this.addDateRange(queryParamNoPage, this.dateRange)).then(response => {
|
|
|
+ let resList = response.rows;
|
|
|
+ this.ids = [];
|
|
|
+ this.names = [];
|
|
|
+ this.rows = [];
|
|
|
+ if(!!resList){
|
|
|
+ this.ids = resList.map(item => item.customerId);
|
|
|
+ this.names = resList.map(item => item.customerName);
|
|
|
+ this.rows = resList;
|
|
|
+ }
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$emit("success", {ids: this.ids, names: this.names, rows: this.rows})
|
|
|
+ this.shows = false;
|
|
|
+ this.$refs.table.clearSelection();
|
|
|
+ })
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|