|
@@ -29,8 +29,8 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="创建时间">
|
|
|
- <el-date-picker v-model="businessOpportunityForm.startTime" type="date" placeholder="请选择" :clearable="false"
|
|
|
- format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
|
|
|
+ <el-date-picker v-model="businessOpportunityForm.startTime" type="date" placeholder="请选择"
|
|
|
+ :clearable="false" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="">
|
|
|
<el-date-picker v-model="businessOpportunityForm.endTime" type="date" placeholder="请选择" :clearable="false"
|
|
@@ -47,14 +47,17 @@
|
|
|
<div class="flex-1 p-5 overflow-auto">
|
|
|
<div class="bg-white w-full h-full p-3 shadow-md rounded-md flex flex-col">
|
|
|
<div class="flex justify-end pb-3">
|
|
|
- <el-button v-permission="['businessAddAnEdit']" type="primary" @click="editNewBusiness(false)">新建商机</el-button>
|
|
|
+ <el-button v-permission="['businessAddAnEdit']" type="primary"
|
|
|
+ @click="editNewBusiness(false)">新建商机</el-button>
|
|
|
<el-button type="primary" @click="showVisible('batchTransferVisible')"
|
|
|
:disabled="batchTableData.length <= 0">批量转移</el-button>
|
|
|
<el-button type="primary" @click="batchDeteleItem()" :disabled="batchTableData.length <= 0">批量删除</el-button>
|
|
|
<el-button type="primary" @click="showVisible('stageSetVisible')">阶段设置</el-button>
|
|
|
<el-button type="primary" @click="showVisible('deteleBusinessVisible')">回收站</el-button>
|
|
|
- <el-button v-permission="['businessImport']" type="primary" @click="showVisible('importVisible')">导入</el-button>
|
|
|
- <el-button v-permission="['businessExport']" type="primary" @click="exportBusinessTableList()" :loading="allLoading.exoprtLoading">导出</el-button>
|
|
|
+ <el-button v-permission="['businessImport']" type="primary"
|
|
|
+ @click="showVisible('importVisible')">导入</el-button>
|
|
|
+ <el-button v-permission="['businessExport']" type="primary" @click="exportBusinessTableList()"
|
|
|
+ :loading="allLoading.exoprtLoading">导出</el-button>
|
|
|
</div>
|
|
|
<div class="flex-1 w-full overflow-hidden">
|
|
|
<el-table ref="businessTableRef" :data="businessTable" border v-loading="allLoading.businessTableLading"
|
|
@@ -70,16 +73,19 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" fixed="right" width="200">
|
|
|
<template #default="scope">
|
|
|
- <el-button link type="primary" size="large" @click="editNewBusiness(scope.row)" v-permission="['businessAddAnEdit']">编辑</el-button>
|
|
|
- <el-button link type="primary" size="large" @click="newTask(scope.row)" v-permission="['tasksAdd']">新建任务</el-button>
|
|
|
- <el-button link type="danger" size="large"
|
|
|
- @click="businessDeteleItem(scope.row.id, scope.row.name)" v-permission="['businessAddAnEdit']">删除</el-button>
|
|
|
+ <el-button link type="primary" size="large" @click="editNewBusiness(scope.row)"
|
|
|
+ v-permission="['businessAddAnEdit']">编辑</el-button>
|
|
|
+ <el-button link type="primary" size="large" @click="newTask(scope.row)"
|
|
|
+ v-permission="['tasksAdd']">新建任务</el-button>
|
|
|
+ <el-button link type="danger" size="large" @click="businessDeteleItem(scope.row.id, scope.row.name)"
|
|
|
+ v-permission="['businessAddAnEdit']">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<div class="flex justify-end pt-3">
|
|
|
- <el-pagination layout="total, prev, pager, next, sizes" :total="businessTotalTable"
|
|
|
+ <el-pagination layout="total, prev, pager, next, sizes" :page-size="businessOpportunityForm.pageFrom"
|
|
|
+ @size-change="handleSizeChange" @current-change="handleCurrentChange" :total="businessTotalTable"
|
|
|
:hide-on-single-page="true" />
|
|
|
</div>
|
|
|
</div>
|
|
@@ -393,6 +399,17 @@ function editProduct(row: any) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+function handleSizeChange(val: number) {
|
|
|
+ businessOpportunityForm.pageIndex = 1
|
|
|
+ businessOpportunityForm.pageFrom = val
|
|
|
+ getBusinessTableList()
|
|
|
+}
|
|
|
+
|
|
|
+function handleCurrentChange(val: number) {
|
|
|
+ businessOpportunityForm.pageIndex = val
|
|
|
+ getBusinessTableList()
|
|
|
+}
|
|
|
+
|
|
|
function showVisible(type: keyof typeof allVisible) { // 显示弹窗
|
|
|
allVisible[type] = true
|
|
|
}
|