| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="合同名称" prop="name"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.name"></el-input> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="选择"></i></div> --> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-edit" title="编辑"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="客户名称" prop="client_name"> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | |
| | | console.log(data) |
| | | let params = { |
| | | id: this.editConfig.title === "新建" ? 0 : data.id, |
| | | name: data.name || "", |
| | | client_id: this.clientId || 0, |
| | | file: "", |
| | | member_id: data.memberId || 0, |
| | |
| | | |
| | | <div class="filter" v-else> |
| | | <div class="filter-card"> |
| | | <CommonSearch |
| | | :show-add="false" |
| | | :amount-view="false" |
| | | placeholder="请输入报价单号" |
| | | @searchClick="onFilterSearch" |
| | | > |
| | | <CommonSearch :show-add="false" :amount-view="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>--> |
| | |
| | | this.search_map = {} |
| | | } else { |
| | | this.search_map = { |
| | | [this.addConfig.id_name]: this.addConfig.client_name |
| | | [this.addConfig.id_name]: this.addConfig.id |
| | | } |
| | | } |
| | | this.getData(this.search_map) |
| | |
| | | showcol: this.showCol, |
| | | tableColumn:this.setColumnVisible(this.showCol) |
| | | } |
| | | this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label); |
| | | this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label) |
| | | this.searchOptions = [] |
| | | for (let i = 0; i < this.tableList.tableColumn.length; i++) { |
| | | const label = this.tableList.tableColumn[i].label |
| | |
| | | } |
| | | }, |
| | | setColumnVisible(showCol){ |
| | | return this.tableColumn.map(ele=>{ |
| | | return this.tableColumn.map((ele) => { |
| | | return { |
| | | ...ele, |
| | | isShowColumn:showCol.includes(ele.label) |
| | |
| | | }) |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val; |
| | | this.tableList.tableColumn = this.setColumnVisible(val); |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setColumnVisible(val) |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText){ |
| | | this.search_map.number = searchText ?? '' |
| | | this.search_map.number = searchText ?? "" |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | |
| | | }) |
| | | }) |
| | | .catch((err) => { |
| | | if (err !== 'cancel') { |
| | | if (err !== "cancel") { |
| | | console.error(err) |
| | | this.$message.warning("删除失败") |
| | | } |
| | |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('client', $event)" |
| | | :disabled="isNameChanceEdit" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('client')"> |
| | | <div v-if="!isNameChanceEdit" class="common-select-btn" @click="selClientClick('client')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | | v-if="editConfig.infomation.client_name && editConfig.infomation.client_name.length > 0" |
| | | v-if=" |
| | | editConfig.infomation.client_name && |
| | | editConfig.infomation.client_name.length > 0 && |
| | | !isNameChanceEdit |
| | | " |
| | | class="common-select-btn" |
| | | @click="clearupClient('client')" |
| | | > |
| | |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('chance', $event)" |
| | | :disabled="isNameChanceEdit" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('chance')"> |
| | | <div v-if="!isNameChanceEdit" class="common-select-btn" @click="selClientClick('chance')"> |
| | | <i class="el-icon-circle-plus-outline"></i> |
| | | </div> |
| | | <div |
| | | v-if="editConfig.infomation.sale_chance_name && editConfig.infomation.sale_chance_name.length > 0" |
| | | v-if=" |
| | | editConfig.infomation.sale_chance_name && |
| | | editConfig.infomation.sale_chance_name.length > 0 && |
| | | !isNameChanceEdit |
| | | " |
| | | class="common-select-btn" |
| | | @click="clearupClient('chance')" |
| | | > |
| | |
| | | title: "新建", |
| | | infomation: {} |
| | | }, |
| | | amountTotal: 0 |
| | | amountTotal: 0, |
| | | isNameChanceEdit: false |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.setTableForm() |
| | | this.getCommonData() |
| | | this.formInfo() |
| | | if (this.editConfig.title === "新建" && this.editConfig.infomation.client_name.length > 0) { |
| | | this.isNameChanceEdit = true |
| | | } |
| | | // else { |
| | | |
| | | // } |
| | | }, |
| | | watch: { |
| | | "editClientManageConfig.visible"(val) { |
| | |
| | | { label: "销售单价", prop: "taxUnitPrice", isProductPrice: true }, |
| | | { label: "价税合计", prop: "priceTax", isProductTotal: true } |
| | | ], |
| | | showCol:["订单编号", "客户名称", "签约日期", "销售负责人", "已收总额", "合计", "应收余额", "已开票金额", "未开票金额", "产品名称", "数量", "销售单价", "价税合计"] |
| | | showCol: [ |
| | | "订单编号", |
| | | "客户名称", |
| | | "签约日期", |
| | | "销售负责人", |
| | | "已收总额", |
| | | "合计", |
| | | "应收余额", |
| | | "已开票金额", |
| | | "未开票金额", |
| | | "产品名称", |
| | | "数量", |
| | | "销售单价", |
| | | "价税合计" |
| | | ] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | showcol: this.showCol, |
| | | tableColumn:this.setColumnVisible(this.showCol) |
| | | } |
| | | this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label); |
| | | this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label) |
| | | this.searchOptions = [] |
| | | for (let i = 0; i < this.tableList.tableColumn.length; i++) { |
| | | const label = this.tableList.tableColumn[i].label |
| | |
| | | } |
| | | }, |
| | | setColumnVisible(showCol){ |
| | | return this.tableColumn.map(ele=>{ |
| | | return this.tableColumn.map((ele) => { |
| | | return { |
| | | ...ele, |
| | | isShowColumn:showCol.includes(ele.label) |
| | |
| | | }) |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val; |
| | | this.tableList.tableColumn = this.setColumnVisible(val); |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setColumnVisible(val) |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getSalesDetailsList({ |
| | | let params = {} |
| | | if (this.addConfig.id) { |
| | | params = { |
| | | saleChanceId: this.addConfig.id, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | } |
| | | } else { |
| | | params = { |
| | | keyword: this.keyword, |
| | | keywordType: this.keywordType, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | | } |
| | | } |
| | | await getSalesDetailsList(params) |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText){ |
| | | this.keyword = searchText ?? '' |
| | | this.keyword = searchText ?? "" |
| | | this.keywordType = "订单编号" |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="机会名称" prop="name"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.name"></el-input> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="选择"></i></div> --> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-edit" title="编辑"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="客户名称" prop="client_name" ref="clientName"> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="机会名称" prop="name"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.name"></el-input> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="选择"></i></div> --> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-edit" title="编辑"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系人姓名" prop="contact_name"> |
| | | <div class="custom-name"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="商机来源" prop="sales_sources_id"> |
| | | <el-form-item label="机会来源" prop="sales_sources_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.sales_sources_id" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="商机类型" prop="sale_type_id"> |
| | | <el-form-item label="机会类型" prop="sale_type_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.sale_type_id" |
| | |
| | | async getData() { |
| | | this.loading = true |
| | | let params = {} |
| | | if (this.addConfig.id) { |
| | | console.log(this.addConfig) |
| | | if (this.addConfig.id && this.addConfig.keywordType === "销售机会") { |
| | | params = { |
| | | saleChanceId: this.addConfig.id, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | } |
| | | } else if (this.addConfig.id && this.addConfig.keywordType === "销售明细单") { |
| | | params = { |
| | | salesDetailsId: this.addConfig.id, |
| | | page: this.pagerOptions.currPage, |