|
@@ -5,7 +5,12 @@
|
|
|
</div>
|
|
|
<y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="getPage">
|
|
|
<template slot="left">
|
|
|
- <MoreSearchBar business="PERSONAL_BUSINESS" :nodes="personalNodes" :handlerName="false" @fliterSearch="fliterSearch" @resetParams="resetParams" :listQuery="listQuery"></MoreSearchBar>
|
|
|
+ <MoreSearchBar business="PERSONAL_BUSINESS" :nodes="personalNodes" :handlerName="false" @fliterSearch="fliterSearch" @resetParams="resetParams" :listQuery="listQuery">
|
|
|
+ <template v-slot:otherButton>
|
|
|
+ <PermissionButton menu-code="_views_personal_batch_allot" class-name="filter-item" type="danger" icon="el-icon-paperclip"
|
|
|
+ :page-jump="false" round @click="openBatchAllotDialog()"/>
|
|
|
+ </template>
|
|
|
+ </MoreSearchBar>
|
|
|
</template>
|
|
|
<parentTable ref="table" v-loading="listLoading" :data="pageData.records" slot="table" style="width: 100%;">
|
|
|
<el-table-column label="坐落" align="center" width="200">
|
|
@@ -116,6 +121,74 @@
|
|
|
</el-table-column>
|
|
|
</parentTable>
|
|
|
</y-page-list-layout>
|
|
|
+ <el-dialog :visible.sync="batchAllotDialogVisible" width="90%"center custom-class="doWarehouseClass" @closed="getPage">
|
|
|
+ <div style="padding: 17px;">
|
|
|
+ <el-divider content-position="left">
|
|
|
+ <el-tooltip class="item" effect="dark" content="批量勾选订单后,点击外业人员即可完成分单。" placement="top-start">
|
|
|
+ <span>外业人员<i class="el-icon-question"></i></span>
|
|
|
+ </el-tooltip>
|
|
|
+ </el-divider>
|
|
|
+ <el-button style="float: left;" type="info" plain v-for="(user,index) in outwardUsers" :key="index" @click="batchAllot(user)">{{ user.name }}</el-button>
|
|
|
+ </div>
|
|
|
+ <y-page-list-layout :page-list="allotOrderData" :page-para="allotOrderQuery" >
|
|
|
+ <template slot="left"></template>
|
|
|
+ <parentTable ref="table" :clickRowToPick="true" :data="allotOrderData.records" slot="table"
|
|
|
+ style="width: 100%;" :selectionChange="handleSelectionChange" :isBoard=480 >
|
|
|
+ <el-table-column align="center" type="selection" claimOrders width="100" border="true">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="坐落" align="center" width="200">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.location }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="项目编号" align="center" >
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.orderId }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="客户名称" align="center" >
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.clientName==null?'-': row.clientName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="业务来源" align="center" >
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.clientSubName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="联系人" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.contactName}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="联系人电话" align="center" >
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.contactTel }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="委托人1" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.bailorA? row.bailorA: '-' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="委托人2" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.bailorB? row.bailorB: '-' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="客户经理" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.clientManager==null?'-': row.clientManager }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="中介" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.agent==null?'-': row.agent }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </parentTable>
|
|
|
+ </y-page-list-layout>
|
|
|
+ </el-dialog>
|
|
|
<TransferDialog :transferDialogVisible="visible" @parentFalse="parentFalse()" @getPage="getPage()" :recordId="recordId"></TransferDialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -152,7 +225,16 @@ export default {
|
|
|
},
|
|
|
personalNodes:[],
|
|
|
visible:false,
|
|
|
- recordId:null
|
|
|
+ recordId:null,
|
|
|
+ batchAllotDialogVisible:false,
|
|
|
+ allotOrderQuery: {
|
|
|
+ page: 1,
|
|
|
+ size: 10,
|
|
|
+ descs: 'id',
|
|
|
+ },
|
|
|
+ allotOrderData: { records: [] },
|
|
|
+ outwardUsers:[],
|
|
|
+ batchOrders:[]
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -223,11 +305,72 @@ export default {
|
|
|
transfer(recordId){
|
|
|
this.visible = true;
|
|
|
this.recordId = recordId;
|
|
|
+ },
|
|
|
+ openBatchAllotDialog(){
|
|
|
+ this.batchAllotDialogVisible = true;
|
|
|
+ this.getAllotOrderList();
|
|
|
+ this.getOutWardUsers();
|
|
|
+ },
|
|
|
+ getOutWardUsers(){
|
|
|
+ this.$api.user.postUser("个贷外业岗").then(res=>{
|
|
|
+ if (res.code === 200){
|
|
|
+ this.outwardUsers = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleSelectionChange(val){
|
|
|
+ let pickeds = [];
|
|
|
+ for (let i in val) {
|
|
|
+ let picked = new Object();
|
|
|
+ picked.id = val[i].id;
|
|
|
+ picked.currentNodeId = val[i].currentNodeId;
|
|
|
+ picked.orderId = val[i].orderId;
|
|
|
+ picked.nodeId = val[i].nodeId;
|
|
|
+ pickeds.push(picked);
|
|
|
+ }
|
|
|
+ this.batchOrders = pickeds;
|
|
|
+ },
|
|
|
+ getAllotOrderList(){
|
|
|
+ this.$api.personal.waitingAllotOrder().then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.allotOrderData = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ batchAllot(user){
|
|
|
+ if (!user ||this.batchOrders.length === 0){
|
|
|
+ this.$message.error('请先勾选订单后再指定外业人员');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$confirm('确定将所选订单分配给【'+user.name+'】?').then(() => {
|
|
|
+ let param = new Object();
|
|
|
+ param.id = user.id;
|
|
|
+ param.orders = this.batchOrders
|
|
|
+ this.$api.personal.batchAllotOrder(param).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$notify({
|
|
|
+ title: '提示',
|
|
|
+ message: '分单成功!',
|
|
|
+ type: 'success',
|
|
|
+ duration: 1000
|
|
|
+ });
|
|
|
+
|
|
|
+ this.batchOrders = [];
|
|
|
+ this.getAllotOrderList();
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message.error('取消分单');
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-
|
|
|
+/deep/.doWarehouseClass {
|
|
|
+ border-radius: 10px;
|
|
|
+}
|
|
|
</style>
|