<!--商机管理列表--> <template> <div class="product_container"> <div class="productFun"> <div class="productInput"> 项目名称 <div class="inputBox" style="width: 120px"> <el-input v-model="selectInfo.itemName" placeholder="请输入项目名称" clearable class="product-input" /> </div> 项目预算 <div class="inputBox" style="width: 144px"> <el-input v-model="selectInfo.itemBudget" placeholder="请输入项目预算" clearable class="product-input" /> </div> 预计工期 <div class="inputBox" style="width: 144px"> <!-- <el-input v-model="selectInfo.itemDuration" placeholder="请选择项目日期" clearable class="product-input" /> --> <el-date-picker v-model="selectInfo.itemDuration" type="date" placeholder="请选择日期" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </div> </div> <div class="productBtn"> <el-button type="primary" icon="el-icon-search" class="btnItem" @click="selectData" > 查询 </el-button> <el-button type="primary" icon="el-icon-refresh-right" class="btnItem" @click="reset" > 重置 </el-button> </div> </div> <el-table :data="tableData.rows" :row-class-name="tableRowClassName" :header-cell-style="{ 'text-align': 'center', background: ' #2483b3', color: 'white', }" :row-style="{ 'text-align': 'center' }" style="width: 100%" v-loading="loading" > <el-table-column type="selection" width="55" /> <el-table-column prop="index" label="序号" width="60"/> <el-table-column prop="busOppoId" label="商机编号" /> <el-table-column prop="itemName" label="项目名称" /> <el-table-column prop="itemBudget" label="项目预算" /> <el-table-column prop="itemDuration" label="预计工期" /> <el-table-column prop="itemManager" label="商机负责人" /> <el-table-column prop="phone" label="联系方式" /> <el-table-column prop="status" label="商机状态" /> <el-table-column label="操作"> <template slot-scope="scope"> <el-button type="text" size="small" @click="showInfo(scope.row)"> 详情 </el-button> <el-button type="text" size="small" @click="handleClick(scope.row)"> 商机转订单 </el-button> <!-- <el-button type="text" size="small">编辑</el-button> --> </template> </el-table-column> </el-table> <group-page v-model="isFristPage" :limit="limit" :total="total" :offset="offset" :count="tableData.total" @setOffset="setOffset" @setLimit="setLimit" /> <!-- 新增弹框 --> <!-- <brand-add-dialog :isShowInfo="isShowAdd" @close="closeAdd"></brand-add-dialog> --> <shop-info-dialog :is-show-info="isShowInfo" :data-info="rowInfo" @close="closeInfo" /> <slaes-change-order-dialog :is-show-info="isShowAdd" :bus-oppo-id="busOppoId" @close="closeAdd" /> </div> </template> <script> // 组件 import ShopInfoDialog from "../../components/mycomponent/dialog/salesDialog/shopInfoDialog.vue"; import SlaesChangeOrderDialog from "../../components/mycomponent/dialog/salesDialog/slaesChangeOrderDialog.vue"; import GroupPage from "../../components/mycomponent/groupPage.vue"; // 逻辑 import { listPage } from "../../api/sales/shop"; import { listMixin, elDataDialog } from "../../utils/myUtils/mixins/listPage"; import { tableRowClassName } from "../../utils/myUtils/changeTableTr"; export default { components: { ShopInfoDialog, SlaesChangeOrderDialog, GroupPage, }, mixins: [listMixin, elDataDialog], data() { return { isShowAdd: false, // 显示新增功能 isShowInfo: false, // 显示新增功能 selectInfo: { itemName: "", itemBudget: "", itemDuration: "", }, busOppoId: "", loading: false, }; }, methods: { tableRowClassName: tableRowClassName, closeAdd() { this.isShowAdd = false; this.getListPage() }, handleClick(row) { // console.log(row); this.isShowAdd = true; this.busOppoId = row.busOppoId; }, getListPage(limit = 10, offset = 1) { this.loading = true; listPage(`limit=${limit}&offset=${offset}`, this.selectInfo) .then((res) => { // 得到相关数据 res.rows.forEach((item, index) => { item.index = index + 1 + (offset - 1) * 10; }); this.tableData = res; this.loading = false; }) .catch((err) => { this.loading = false; }); }, reset() { this.selectInfo = { itemName: "", itemBudget: "", itemDuration: "", }; this.getListPage() }, }, }; </script> <style lang="scss" scoped> .product_container { position: relative; width: 100%; min-height: 700px; overflow: auto; height: 823px; .productData { width: 100%; display: flex; justify-content: center; .middle { margin: 0 30px; } } .productFun { margin: 0px 0px 30px; display: flex; justify-content: space-between; .productInput { display: flex; align-items: center; .inputBox { margin: 0 50px 0 10px; } } .productBtn { .btnItem { margin-right: 10px; border-radius: 5px; // height: 32px; // width: 84px; font-size: 16px; } } } .footer { display: flex; justify-content: space-between; color: #6666; margin: 30px 10px; } } </style>