|  |  |  | 
|---|
|  |  |  | <div class="quotation"> | 
|---|
|  |  |  | <div v-if="isDetail" class="detail-top"> | 
|---|
|  |  |  | <DetailListCommonBtn :query-class-options="queryClassOptions" /> | 
|---|
|  |  |  | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div v-else class="top"> | 
|---|
|  |  |  | <SearchCommonView | 
|---|
|  |  |  | ref="searchCommonView" | 
|---|
|  |  |  | :label-search="true" | 
|---|
|  |  |  | :query-class-options="queryClassOptions" | 
|---|
|  |  |  | :search-options="searchOptions" | 
|---|
|  |  |  | @searchClick="searchClick" | 
|---|
|  |  |  | @resetClick="resetClick" | 
|---|
|  |  |  | :search-sel="searchSel" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <div class="btn-pager"> | 
|---|
|  |  |  | <PublicFunctionBtnView :submit-approval="true" :operates-list="operatesList" @batchDelete="delClick" /> | 
|---|
|  |  |  | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="filter" v-else> | 
|---|
|  |  |  | <div class="filter-card"> | 
|---|
|  |  |  | <CommonSearch | 
|---|
|  |  |  | :show-add="false" | 
|---|
|  |  |  | :show-download="false" | 
|---|
|  |  |  | :amount-view="false" | 
|---|
|  |  |  | :show-action-btn="false" | 
|---|
|  |  |  | placeholder="请输入报价单号" | 
|---|
|  |  |  | @searchClick="onFilterSearch" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template slot="leftButton"> | 
|---|
|  |  |  | <el-button size="small" type="primary"  @click="addBtnClick">新建</el-button> | 
|---|
|  |  |  | <el-button size="small"  @click="delClick">删除</el-button> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </CommonSearch> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <TableCommonView | 
|---|
|  |  |  | ref="tableListRef" | 
|---|
|  |  |  | :table-list="tableList" | 
|---|
|  |  |  | :select-box="!isDetail" | 
|---|
|  |  |  | @selClientClick="selClientClick" | 
|---|
|  |  |  | @selContactsClick="selContactsClick" | 
|---|
|  |  |  | @selCommonClick="selCommonClick" | 
|---|
|  |  |  | @getSelectArray="getSelectArray" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template slot="tableButton"> | 
|---|
|  |  |  | <el-table-column label="操作" width="90"> | 
|---|
|  |  |  | <template slot-scope="scope"> | 
|---|
|  |  |  | <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button> | 
|---|
|  |  |  | <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> --> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </TableCommonView> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="body"> | 
|---|
|  |  |  | <div class="body-card"> | 
|---|
|  |  |  | <div class="list-view"> | 
|---|
|  |  |  | <TableCommonView | 
|---|
|  |  |  | ref="tableListRef" | 
|---|
|  |  |  | :table-list="tableList" | 
|---|
|  |  |  | :select-box="!isDetail" | 
|---|
|  |  |  | @selClientClick="selClientClick" | 
|---|
|  |  |  | @selContactsClick="selContactsClick" | 
|---|
|  |  |  | @selCommonClick="selCommonClick" | 
|---|
|  |  |  | @getSelectArray="getSelectArray" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template slot="tableButton"> | 
|---|
|  |  |  | <el-table-column label="操作" width="90"> | 
|---|
|  |  |  | <template slot-scope="scope"> | 
|---|
|  |  |  | <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button> | 
|---|
|  |  |  | <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> --> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </TableCommonView> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="btn-pager"> | 
|---|
|  |  |  | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- 新建/编辑 --> | 
|---|
|  |  |  | <AddQuotationDialog v-if="editConfig.visible" :edit-common-config="editConfig" /> | 
|---|
|  |  |  | <!-- 报价单详情 --> | 
|---|
|  |  |  | 
|---|
|  |  |  | // { label: "合计", prop: "total" }, // 合计 | 
|---|
|  |  |  | { label: "产品名称", prop: "productName", isProductName: true }, | 
|---|
|  |  |  | { label: "数量", prop: "productNumber", isProductAmount: true }, | 
|---|
|  |  |  | { label: "价税合计", prop: "priceTax", isProductCommon: true } | 
|---|
|  |  |  | { label: "价税合计", prop: "priceTax", isProductTotal: true } | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.searchOptions = [] | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 搜索 | 
|---|
|  |  |  | searchClick(val, content) { | 
|---|
|  |  |  | console.log(val, content) | 
|---|
|  |  |  | this.search_map = { | 
|---|
|  |  |  | [val.value]: content | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.getData() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | resetClick() { | 
|---|
|  |  |  | this.search_map = {} | 
|---|
|  |  |  | onFilterSearch(searchText){ | 
|---|
|  |  |  | this.search_map.number = searchText ?? '' | 
|---|
|  |  |  | this.pagerOptions.currPage = 1 | 
|---|
|  |  |  | this.getData() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 新建 | 
|---|
|  |  |  | addBtnClick() { | 
|---|
|  |  |  | this.editConfig.visible = true | 
|---|
|  |  |  | this.editConfig.title = "新建" | 
|---|
|  |  |  | this.editConfig.infomation = { ...this.addConfig } | 
|---|
|  |  |  | this.editConfig.infomation = { ...this.addConfig, currency: "人民币" } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 编辑 | 
|---|
|  |  |  | handleClick(row) { | 
|---|
|  |  |  | console.log(row) | 
|---|
|  |  |  | this.editConfig.visible = true | 
|---|
|  |  |  | this.editConfig.title = "编辑" | 
|---|
|  |  |  | this.editConfig.infomation = { ...row } | 
|---|
|  |  |  | this.editConfig.infomation = { ...row, currency: "人民币" } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 删除 | 
|---|
|  |  |  | delClick() { | 
|---|
|  |  |  | 
|---|
|  |  |  | selClientClick(row) { | 
|---|
|  |  |  | console.log(row) | 
|---|
|  |  |  | this.clientDeail.visible = true | 
|---|
|  |  |  | this.clientDeail.infomation = { ...row, client_name: row.name } | 
|---|
|  |  |  | this.clientDeail.infomation = { | 
|---|
|  |  |  | ...row.client, | 
|---|
|  |  |  | client_name: row.name, | 
|---|
|  |  |  | client_level: row.client.client_level.name, | 
|---|
|  |  |  | client_status: row.client.client_status.name | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 联系人详情 | 
|---|
|  |  |  | selContactsClick(row) { | 
|---|
|  |  |  | console.log(row) | 
|---|
|  |  |  | this.contactsDeail.visible = true | 
|---|
|  |  |  | this.contactsDeail.infomation = { ...row } | 
|---|
|  |  |  | this.contactsDeail.infomation = { ...row.contact, Client: row.client } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 机会名称详情 | 
|---|
|  |  |  | selCommonClick(row) { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- Add "scoped" attribute to limit CSS to this component only --> | 
|---|
|  |  |  | <style lang="scss" scoped> | 
|---|
|  |  |  | .quotation { | 
|---|
|  |  |  | .top { | 
|---|
|  |  |  | margin-bottom: 20px; | 
|---|
|  |  |  | .quotation{ | 
|---|
|  |  |  | height: 100%; | 
|---|
|  |  |  | overflow: hidden; | 
|---|
|  |  |  | .filter{ | 
|---|
|  |  |  | height: 80px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | padding: 12px 20px 0 20px; | 
|---|
|  |  |  | &-card{ | 
|---|
|  |  |  | height: 80px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | box-sizing: border-box; | 
|---|
|  |  |  | padding: 10px 20px; | 
|---|
|  |  |  | flex: 1; | 
|---|
|  |  |  | border-radius: 12px; | 
|---|
|  |  |  | background-color: #fff; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .body{ | 
|---|
|  |  |  | box-sizing: border-box; | 
|---|
|  |  |  | padding: 10px 20px; | 
|---|
|  |  |  | border-radius: 12px; | 
|---|
|  |  |  | height: calc(100% - 92px); | 
|---|
|  |  |  | .body-card { | 
|---|
|  |  |  | background-color: #fff; | 
|---|
|  |  |  | border-radius: 12px; | 
|---|
|  |  |  | height: 100%; | 
|---|
|  |  |  | overflow: hidden; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .list-view { | 
|---|
|  |  |  | height: calc(100% - 60px); | 
|---|
|  |  |  | overflow: hidden; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .btn-pager { | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | margin-top: 10px; | 
|---|
|  |  |  | .page { | 
|---|
|  |  |  | margin-left: auto; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .detail-top { | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | .page { | 
|---|
|  |  |  | margin-left: auto; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|