搜索公共组件、新建选择客户名称等公共组件、新建弹窗及跟进记录页面批量删除改为单条删除
| | |
| | | import PagerView from "@/components/makepager/pager/PagerView" |
| | | import TableCommonView from "@/components/makepager/TableCommonView" |
| | | import DetailListCommonBtn from "@/components/makepager/DetailListCommonBtn" |
| | | import CommonSearch from "@/components/makepager/CommonSearch.vue"; |
| | | import CommonSearch from "@/components/makepager/CommonSearch.vue" |
| | | |
| | | const components = [SearchCommonView, PublicFunctionBtnView, PagerView, TableCommonView, DetailListCommonBtn, CommonSearch] |
| | | const components = [ |
| | | SearchCommonView, |
| | | PublicFunctionBtnView, |
| | | PagerView, |
| | | TableCommonView, |
| | | DetailListCommonBtn, |
| | | CommonSearch |
| | | ] |
| | | components.forEach((component) => { |
| | | Vue.component(component.name, component) |
| | | }) |
| | |
| | | <div class="search-list"> |
| | | <div class="search-top"> |
| | | <div class="left"> |
| | | <el-button v-if="showAdd" type="primary" size="mini" @click="addBtn">{{ |
| | | addTitle |
| | | }}</el-button> |
| | | <div |
| | | class="download" |
| | | v-if="showDownload" |
| | | @click="downloadClick" |
| | | :style="{ cursor: showDownload ? 'pointer' : 'no-drop' }" |
| | | > |
| | | <img |
| | | src="../../../public/images/download.png" |
| | | style="width: 13px" |
| | | alt="下载" |
| | | /> |
| | | </div> |
| | | <el-button v-if="showAdd" type="primary" size="mini" @click="addBtn"> |
| | | <div style="display: flex"> |
| | | <!-- <img |
| | | v-if="ishumanResource" |
| | | src="../../../assets/DingDing/index.png" |
| | | style="width: 15px; height: 15px; margin-right: 5px; background-color: #ffffff; border-radius: 50%" |
| | | alt="" |
| | | /> --> |
| | | <slot name="buttonIcon" /> |
| | | <p style="margin-top: 1px; line-height: 15px">{{ addTitle }}</p> |
| | | </div> |
| | | </el-button> |
| | | <slot name="leftButton" /> |
| | | <div class="download" @click="downloadClick" :style="{ cursor: showDownload ? 'pointer' : 'no-drop' }"> |
| | | <img src="@/assets/img/xiazai.png" style="width: 13px" /> |
| | | </div> |
| | | </div> |
| | | <div v-if="amountView" class="amount"> |
| | | <div |
| | | v-if="twoTotalAmount" |
| | | class="top_left" |
| | | style="width: 8%; border: 0" |
| | | > |
| | | <div v-if="twoTotalAmount" class="top_left" style="width: 8%; border: 0px"> |
| | | <dl> |
| | | <dd class="font_weight">{{ twoObject.value }}</dd> |
| | | <dd class="top_right_bottom">{{ twoObject.label }}</dd> |
| | |
| | | </dl> |
| | | </div> |
| | | <div class="top_right" style="width: 50%; margin-right: 15px"> |
| | | <dl v-for="item in otherOptions" :key="item.label"> |
| | | <dl v-for="item in otherOptions" :key="item.value"> |
| | | <dd class="font_weight"> |
| | | {{ item.value }} |
| | | </dd> |
| | | <dd class="top_right_bottom"> |
| | | <span |
| | | v-if="item.status" |
| | | class="Badge" |
| | | :class="item.status" |
| | | ></span> |
| | | <span v-if="item.status" class="Badge" :class="item.status"></span> |
| | | <span>{{ item.label }}</span> |
| | | </dd> |
| | | </dl> |
| | |
| | | <div class="search"> |
| | | <template v-if="isSearchForm"> |
| | | <el-input |
| | | :placeholder="placeholder" |
| | | v-model.trim="searchInput" |
| | | class="input-with-select" |
| | | style="width: 410px" |
| | | clearable |
| | | @change="searchClick" |
| | | @clear="clearClick" |
| | | :placeholder="placeholder" |
| | | v-model.trim="searchInput" |
| | | class="input-with-select" |
| | | style="width: 410px" |
| | | clearable |
| | | @change="searchClick" |
| | | @clear="clearClick" |
| | | > |
| | | <i |
| | | slot="suffix" |
| | | class="el-icon-search" |
| | | style="cursor: pointer" |
| | | @click="searchClick" |
| | | ></i> |
| | | <i slot="suffix" class="el-icon-search" style="cursor: pointer" @click="searchClick"></i> |
| | | </el-input> |
| | | </template> |
| | | <div class="search-Btn" v-if="showActionBtn"> |
| | | <div class="search-Btn"> |
| | | <div class="common"> |
| | | <img |
| | | src="../../../public/images/filter.png" |
| | | style="width: 10px" |
| | | alt="筛选" |
| | | /> |
| | | <img src="@/assets/img/shaixuan.png" style="width: 10px" /> |
| | | <span>筛选</span> |
| | | </div> |
| | | <div class="common"> |
| | |
| | | </div> |
| | | </div> |
| | | <div v-if="showSet"> |
| | | <i |
| | | class="el-icon-setting cursor_pointer font_size_30" |
| | | style="color: rgb(128,128,128)" |
| | | @click="inspectionConfigClick" |
| | | ></i> |
| | | </div> |
| | | <div class="right"> |
| | | <slot name="rightButton"></slot> |
| | | <i class="el-icon-setting cursor_pointer font_size_30" style="color: gray" @click="inspectionConfigClick"></i> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | props: { |
| | | showAdd: { |
| | | type: Boolean, |
| | | default: true, |
| | | default: true |
| | | }, |
| | | showDownload: { |
| | | type: Boolean, |
| | | default: false, |
| | | default: false |
| | | }, |
| | | showActionBtn: { |
| | | type: Boolean, |
| | | default: true, |
| | | default: true |
| | | }, |
| | | placeholder: { |
| | | type: String, |
| | | default: "请输入内容", |
| | | default: "请输入内容" |
| | | }, |
| | | addTitle: { |
| | | type: String, |
| | | default: "添加", |
| | | default: "添加" |
| | | }, |
| | | totalObject: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | value: 0, |
| | | label: "全部物料", |
| | | }; |
| | | }, |
| | | label: "全部物料" |
| | | } |
| | | } |
| | | }, |
| | | otherOptions: { |
| | | type: Array, |
| | |
| | | { |
| | | value: 2, |
| | | label: "安全库存", |
| | | status: "success", |
| | | status: "success" |
| | | }, |
| | | { |
| | | value: 12, |
| | | label: "欠料", |
| | | status: "error", |
| | | status: "error" |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: "安全库存", |
| | | status: "success", |
| | | status: "success" |
| | | }, |
| | | { |
| | | value: 12, |
| | | label: "欠料", |
| | | status: "error", |
| | | }, |
| | | ], |
| | | status: "error" |
| | | } |
| | | ] |
| | | }, |
| | | searchSel: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | value: "name", |
| | | label: "", |
| | | }; |
| | | }, |
| | | label: "" |
| | | } |
| | | } |
| | | }, |
| | | twoTotalAmount: { |
| | | type: Boolean, |
| | | default: false, |
| | | default: false |
| | | }, |
| | | twoObject: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | value: 0, |
| | | label: "车间总量", |
| | | }; |
| | | }, |
| | | label: "车间总量" |
| | | } |
| | | } |
| | | }, |
| | | amountView: { |
| | | type: Boolean, |
| | | default: true, |
| | | default: true |
| | | }, |
| | | isSearchForm: { |
| | | type: Boolean, |
| | | default: true, |
| | | default: true |
| | | }, |
| | | showSet: { |
| | | type: Boolean, |
| | | default: false, |
| | | default: false |
| | | }, |
| | | inputName: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | default: "" |
| | | } |
| | | }, |
| | | watch: { |
| | | inputName(val) { |
| | | this.searchInput = val; |
| | | }, |
| | | this.searchInput = val |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | searchInput: "", |
| | | searchSelValue: this.searchSel, |
| | | }; |
| | | searchSelValue: this.searchSel |
| | | } |
| | | }, |
| | | methods: { |
| | | // 搜索 |
| | | searchClick() { |
| | | this.$emit("searchClick", this.searchInput); |
| | | this.$emit("searchClick", this.searchInput) |
| | | }, |
| | | // 清除 |
| | | clearClick() { |
| | | this.$emit("clearClick", 1); |
| | | this.$emit("clearClick", 1) |
| | | }, |
| | | // 添加 |
| | | addBtn() { |
| | | this.$emit("addCommonClick"); |
| | | this.$emit("addCommonClick") |
| | | }, |
| | | // 下载 |
| | | downloadClick() { |
| | | this.$emit("downloadClick"); |
| | | this.$emit("downloadClick") |
| | | }, |
| | | // 模具-检查配置 |
| | | inspectionConfigClick() { |
| | | this.$emit("inspectionConfigClick"); |
| | | }, |
| | | }, |
| | | }; |
| | | this.$emit("inspectionConfigClick") |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | |
| | | .font_weight { |
| | | font-weight: 500; |
| | | font-size: 18px; |
| | | font-family: "DIN Alternate",serif; |
| | | font-family: "DIN Alternate", serif; |
| | | } |
| | | .top_right_bottom { |
| | | font-size: 12px; |
| | |
| | | .font_weight { |
| | | font-weight: 500; |
| | | font-size: 18px; |
| | | font-family: "DIN Alternate",serif; |
| | | font-family: "DIN Alternate", serif; |
| | | } |
| | | .top_right_bottom { |
| | | font-size: 12px; |
| | |
| | | <!-- eslint-disable vue/no-use-v-if-with-v-for --> |
| | | <template> |
| | | <div class="table-view"> |
| | | <el-table |
| | |
| | | :summary-method="getSummaries" |
| | | :span-method="arraySpanMethod" |
| | | @selection-change="handleSelectionChange" |
| | | :header-cell-style="{ background: '#f1f3f8', color: '#000009' , 'font-size': '12px','font-family':'PingFangSC'}" |
| | | :header-cell-style="{ background: '#f1f3f8', color: '#000009', 'font-size': '12px', 'font-family': 'PingFangSC' }" |
| | | size="mini" |
| | | > |
| | | <el-table-column v-if="tableList.selectIndex" type="index" label="序号" width="50"></el-table-column> |
| | | <el-table-column v-if="selectBox" type="selection" width="40"> </el-table-column> |
| | | <el-table-column |
| | | v-for="(item, i) in tableList.tableColumn" |
| | |
| | | <div class="overSpread1" v-show="iscolopen" @click="onMaskClick"></div> |
| | | <div class="styleBtn"> |
| | | <i @click="checkCol()" class="label">...</i> |
| | | <el-checkbox-group |
| | | v-model="showcol" |
| | | v-show="iscolopen" |
| | | class="checkbox-group" |
| | | @change="selectCheckBoxList" |
| | | > |
| | | <el-checkbox v-for="item in tableList.allcol" :label="item" :key="item" |
| | | >{{ item }} |
| | | </el-checkbox> |
| | | <el-checkbox-group v-model="showcol" v-show="iscolopen" class="checkbox-group" @change="selectCheckBoxList"> |
| | | <el-checkbox v-for="item in tableList.allcol" :label="item" :key="item">{{ item }} </el-checkbox> |
| | | </el-checkbox-group> |
| | | </div> |
| | | </div> |
| | |
| | | props: { |
| | | selectBox: { |
| | | type: Boolean, |
| | | default: true |
| | | default: false |
| | | }, |
| | | tableList: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | selectBox: true, |
| | | selectIndex: true, |
| | | tableInfomation: [], // 接口返回数据 |
| | | showcol: [], |
| | | allcol: [], |
| | |
| | | data() { |
| | | return { |
| | | iscolopen: false, |
| | | showcol:[] |
| | | showcol: [] |
| | | } |
| | | }, |
| | | computed: {}, |
| | | watch: { |
| | | 'tableList.showcol':{ |
| | | handler(newVal){ |
| | | this.showcol=newVal |
| | | "tableList.showcol": { |
| | | handler(newVal) { |
| | | this.showcol = newVal |
| | | }, |
| | | immediate:true |
| | | immediate: true |
| | | } |
| | | }, |
| | | methods: { |
| | | onMaskClick() { |
| | | this.iscolopen = false; |
| | | this.iscolopen = false |
| | | }, |
| | | checkCol() { |
| | | this.iscolopen = !this.iscolopen; |
| | | this.iscolopen = !this.iscolopen |
| | | }, |
| | | selectCheckBoxList(val) { |
| | | this.$emit("selTableCol", val); |
| | | this.$emit("selTableCol", val) |
| | | }, |
| | | handleReserve(row) { |
| | | return row._id ? row._id : row.id |
| | |
| | | for (let i = 0; i < this.showSummary.mergeNumber; i++) { |
| | | cell[i] && cell[i].style && (cell[i].style.display = "none") |
| | | } |
| | | if (cell[this.showSummary.mergeNumber]){ |
| | | if (cell[this.showSummary.mergeNumber].classList){ |
| | | if (cell[this.showSummary.mergeNumber]) { |
| | | if (cell[this.showSummary.mergeNumber].classList) { |
| | | cell[this.showSummary.mergeNumber].classList.remove("is-left") |
| | | } |
| | | if (cell[this.showSummary.mergeNumber].colSpan){ |
| | | if (cell[this.showSummary.mergeNumber].colSpan) { |
| | | cell[this.showSummary.mergeNumber].colSpan = this.showSummary.mergeNumber.toString() |
| | | } |
| | | } |
| | |
| | | margin-left: -10px; |
| | | margin-right: -11px; |
| | | li { |
| | | //height: 57px; |
| | | //line-height: 57px; |
| | | height: 57px; |
| | | line-height: 57px; |
| | | .name-view { |
| | | padding-left: 10px; |
| | | border-bottom: 1px solid #ebeef5; |
| | |
| | | } |
| | | } |
| | | .no-product { |
| | | //height: 57px; |
| | | //line-height: 57px; |
| | | } |
| | | li:last-child .name-view{ |
| | | border-bottom: none; |
| | | height: 57px; |
| | | line-height: 57px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | ::v-deep { |
| | | .el-table__footer-wrapper { |
| | |
| | | text-align: center; |
| | | } |
| | | |
| | | ::v-deep{ |
| | | .el-table .cell .el-button--text.el-button--small{ |
| | | ::v-deep { |
| | | .el-table .cell .el-button--text.el-button--small { |
| | | padding: 4px 0; |
| | | } |
| | | } |
| | |
| | | } |
| | | .checkbox-group { |
| | | width: 160px; |
| | | height: 330px; |
| | | height: 300px; |
| | | overflow: auto; |
| | | display: flex; |
| | | flex-direction: column; |
| | |
| | | :model="editConfig.infomation" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="308px" |
| | | label-width="168px" |
| | | size="mini" |
| | | > |
| | | <!-- 信息 --> |
| | |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('client', $event)" |
| | | style="width: 100%" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('client')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | |
| | | </el-col> |
| | | <el-col :span="12" v-if="isUnflod"> |
| | | <el-form-item label="跟进记录编号" prop="number"> |
| | | <el-input v-model="editConfig.infomation.number"></el-input> |
| | | <el-input v-model="editConfig.infomation.number" style="width: 100%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="isUnflod" :span="12"> |
| | |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in clientStatusOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('contact', $event)" |
| | | style="width: 100%" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('contact')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item v-if="isUnflod" label="负责人" prop="member_id"> |
| | | <el-select v-model="editConfig.infomation.member_id" placeholder="请选择" size="mini"> |
| | | <el-select |
| | | v-model="editConfig.infomation.member_id" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | <el-input v-model="editConfig.infomation.topic"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="isUnflod ? 24 : 12"> |
| | | <el-form-item label="跟进记录" prop="record"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2, maxRows: 4 }" |
| | | v-model="editConfig.infomation.record" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系方式" prop="contact_information_id"> |
| | | <!-- <el-input |
| | |
| | | show-word-limit |
| | | oninput="value=value.replace(/[^\d]/g,'')" |
| | | ></el-input> --> |
| | | <el-select v-model="editConfig.infomation.contact_information_id" placeholder="请选择" size="mini"> |
| | | <el-select |
| | | v-model="editConfig.infomation.contact_information_id" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in contactInfoOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('chance', $event)" |
| | | style="width: 100%" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('chance')"> |
| | | <i class="el-icon-circle-plus-outline"></i> |
| | |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('lead', $event)" |
| | | style="width: 100%" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('lead')"> |
| | | <i class="el-icon-circle-plus-outline"></i> |
| | |
| | | type="date" |
| | | placeholder="选择日期" |
| | | :picker-options="pickerOptions" |
| | | style="width: 100%" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | style="width: 100%" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="isUnflod ? 24 : 12"> |
| | | <el-form-item label="跟进记录" prop="record"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2, maxRows: 4 }" |
| | | v-model="editConfig.infomation.record" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogWidth: "80%", |
| | | dialogWidth: "50%", |
| | | editConfig: this.editContactsConfig, |
| | | rules: { |
| | | number: [{ required: true, message: "请输入跟进记录编号", trigger: "blur" }], |
| | |
| | | handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | this.editConfig.infomation.client_name = item.name |
| | | } else if (value === "contact") { |
| | | this.contactId = item.id |
| | | this.editConfig.infomation.contact_name = item.name |
| | | } else if (value === "chance") { |
| | | this.saleChanceId = item.id |
| | | this.editConfig.infomation.sale_chance_name = item.name |
| | | } else { |
| | | this.saleLeadId = item.id |
| | | this.editConfig.infomation.sales_leads_name = item.name |
| | | } |
| | | }, |
| | | selClientClick(value) { |
| | |
| | | <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" |
| | | :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> |
| | | <el-button size="small" type="primary" @click="addBtnClick">新建</el-button> |
| | | <!-- <el-button size="small" @click="delClick">删除</el-button> --> |
| | | </template> |
| | | </CommonSearch> |
| | | </div> |
| | |
| | | <div class="body-card"> |
| | | <div class="list-view"> |
| | | <TableCommonView |
| | | ref="tableListRef" |
| | | v-loading="loading" |
| | | :table-list="tableList" |
| | | :select-box="!isDetail" |
| | | @selContactsClick="selContactsClick" |
| | | @selClientClick="selClientClick" |
| | | @getSelectArray="getSelectArray" |
| | | @selTableCol="selTableCol" |
| | | ref="tableListRef" |
| | | v-loading="loading" |
| | | :table-list="tableList" |
| | | @selContactsClick="selContactsClick" |
| | | @selClientClick="selClientClick" |
| | | @getSelectArray="getSelectArray" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="60" fixed="right"> |
| | | <el-table-column label="操作" width="90" fixed="right"> |
| | | <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> --> |
| | | <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | }, |
| | | search_map: {}, |
| | | tableColumn: [ |
| | | { label: "主题", prop: "topic", min: 120 ,default:true}, // 主题 |
| | | { label: "主题", prop: "topic", min: 120, default: true }, // 主题 |
| | | { label: "客户名称", prop: "client_name", min: 190, isClientClick: true }, // 客户名称 |
| | | { label: "联系人姓名", prop: "contact_name", min: 100, isContactClick: true }, // 联系人姓名 |
| | | { label: "客户状态", prop: "client_status", min: 100 }, // 客户状态 |
| | |
| | | { label: "负责人", prop: "member_name", min: 110 }, // 负责人 |
| | | { label: "跟进记录", prop: "record", min: 130 } // 跟进记录 |
| | | ], |
| | | showCol:['主题','客户名称','联系人姓名','联系人姓名','客户状态','联系方式','联系日期','下次回访日期','负责人','跟进记录'] |
| | | showCol: [ |
| | | "主题", |
| | | "客户名称", |
| | | "联系人姓名", |
| | | "联系人姓名", |
| | | "客户状态", |
| | | "联系方式", |
| | | "联系日期", |
| | | "下次回访日期", |
| | | "负责人", |
| | | "跟进记录" |
| | | ] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | methods: { |
| | | setTable() { |
| | | this.tableList = { |
| | | selectIndex: true, |
| | | tableInfomation: [], |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | | tableColumn:this.setColumnVisible(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 |
| | |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |
| | | setColumnVisible(showCol){ |
| | | return this.tableColumn.map(ele=>{ |
| | | setColumnVisible(showCol) { |
| | | return this.tableColumn.map((ele) => { |
| | | return { |
| | | ...ele, |
| | | isShowColumn:showCol.includes(ele.label) |
| | | 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.name = searchText ?? '' |
| | | onFilterSearch(searchText) { |
| | | this.search_map.name = searchText ?? "" |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | |
| | | this.editConfig.infomation = { ...row, sale_chance_name: "", sales_leads_name: "" } |
| | | }, |
| | | // 删除 |
| | | delClick() { |
| | | if (this.selValueList && this.selValueList.length > 0) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | getDeleteFollowRecord({ ids: this.selValueList }).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | | } else { |
| | | this.$message.warning("删除失败") |
| | | } |
| | | }) |
| | | delClick(id) { |
| | | // if (this.selValueList && this.selValueList.length > 0) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | getDeleteFollowRecord({ ids: [id] }).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | | } else { |
| | | this.$message.warning("删除失败") |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | } else { |
| | | this.$message.warning("请至少选择一条记录") |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | // } else { |
| | | // this.$message.warning("请至少选择一条记录") |
| | | // } |
| | | }, |
| | | getSelectArray(val) { |
| | | console.log(val) |
| | |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped> |
| | | .followup-records{ |
| | | .followup-records { |
| | | height: 100%; |
| | | overflow: hidden; |
| | | .filter{ |
| | | .filter { |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 12px 20px 0 20px; |
| | | &-card{ |
| | | &-card { |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | background-color: #fff; |
| | | } |
| | | } |
| | | .body{ |
| | | .body { |
| | | box-sizing: border-box; |
| | | padding: 10px 20px; |
| | | border-radius: 12px; |
| | |
| | | :table-list="tableList" |
| | | :select-box="false" |
| | | @selClientClick="selNameClick" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | </TableCommonView> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <div class="remark">说明:支持多字段模糊查询,仅显示符合条件的前5条数据</div> |
| | | <!-- <div class="remark">说明:支持多字段模糊查询,仅显示符合条件的前5条数据</div> --> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | |
| | | <script> |
| | | import { getClientList } from "@/api/client/client" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "EditSelClientDialog", |
| | | mixins: [pageMixin], |
| | | props: { |
| | | editCommonConfig: { |
| | | type: Object, |
| | |
| | | loading: false, |
| | | searchOptions: [], |
| | | tableList: {}, |
| | | search_map: {} |
| | | search_map: {}, |
| | | tableColumn: [ |
| | | { label: "客户名称", prop: "name", min: 100, isClientClick: true, default: true }, |
| | | { label: "客户编号", prop: "number" }, |
| | | { label: "客户状态", prop: "client_status" }, |
| | | { label: "销售负责人", prop: "member_name", min: 100 }, |
| | | { label: "法定代表人", prop: "representative", min: 100 }, |
| | | { label: "注册时间", prop: "registration_time" }, |
| | | { label: "经营范围", prop: "business_scope" }, |
| | | { label: "详细地址", prop: "detail_address" }, |
| | | { label: "备注", prop: "remark" } |
| | | ], |
| | | showCol: [ |
| | | "客户名称", |
| | | "客户编号", |
| | | "客户状态", |
| | | "销售负责人", |
| | | "法定代表人", |
| | | "注册时间", |
| | | "经营范围", |
| | | "详细地址", |
| | | "备注" |
| | | ] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | methods: { |
| | | setTable() { |
| | | this.tableList = { |
| | | selectIndex: true, |
| | | tableInfomation: [], |
| | | tableColumn: [ |
| | | { label: "客户名称", prop: "name", min: 100, isClientClick: true }, |
| | | { label: "客户编号", prop: "number" }, |
| | | { label: "客户状态", prop: "client_status" }, |
| | | { label: "销售负责人", prop: "member_name", min: 100 }, |
| | | { label: "法定代表人", prop: "representative", min: 100 }, |
| | | { label: "注册时间", prop: "registration_time" }, |
| | | { label: "经营范围", prop: "business_scope" }, |
| | | { label: "详细地址", prop: "detail_address" }, |
| | | { label: "备注", prop: "remark" } |
| | | ] |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | | tableColumn: this.setColumnVisible(this.showCol) |
| | | } |
| | | 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 |
| | | const value = this.tableList.tableColumn[i].prop |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |
| | | setColumnVisible(showCol) { |
| | | return this.tableColumn.map((ele) => { |
| | | return { |
| | | ...ele, |
| | | isShowColumn: showCol.includes(ele.label) |
| | | } |
| | | }) |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setColumnVisible(val) |
| | | }, |
| | | handleClose() { |
| | | this.editConfig.editVisible = false |
| | |
| | | this.loading = true |
| | | await getClientList({ |
| | | search_map: this.search_map, |
| | | page: 0, |
| | | pageSize: 0 |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | console.log("ssss") |
| | | const list = res.data.list.map((item) => { |
| | | return { |
| | | ...item, |
| | |
| | | member_name: item.member.username |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list.slice(0, 5) || [] |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.count |
| | | } |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | |
| | | float: right; |
| | | } |
| | | } |
| | | .list-view { |
| | | height: 100%; |
| | | background: #c22f2f; |
| | | } |
| | | } |
| | | .sel-name { |
| | | color: $color-primary; |
| | | cursor: pointer; |
| | | } |
| | | .dialog-footer { |
| | | height: 40px; |
| | | line-height: 40px; |
| | | height: 50px; |
| | | line-height: 50px; |
| | | color: red; |
| | | .btn-pager { |
| | | display: flex; |
| | | margin-top: 0px; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | } |
| | | ::v-deep { |
| | | .input-with-select .el-input-group__prepend { |
| | |
| | | <el-button type="primary" size="mini" disabled>快速创建</el-button> --> |
| | | </div> |
| | | </div> |
| | | <TableCommonView ref="tableListRef" :table-list="tableList" :select-box="false" @selCommonClick="selNameClick"> |
| | | <TableCommonView |
| | | ref="tableListRef" |
| | | :table-list="tableList" |
| | | :select-box="false" |
| | | @selCommonClick="selNameClick" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | </TableCommonView> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <div class="remark">说明:支持多字段模糊查询,仅显示符合条件的前5条数据</div> |
| | | <!-- <div class="remark">说明:支持多字段模糊查询,仅显示符合条件的前5条数据</div> --> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | import { getServiceOrderList } from "@/api/serviceManage/clientServiceOrder" |
| | | import { getProductList } from "@/api/common/other" |
| | | import { getSalesReturnList } from "@/api/sales/salesReturn" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "EditSelCommonDialog", |
| | | mixins: [pageMixin], |
| | | props: { |
| | | editCommonConfig: { |
| | | type: Object, |
| | |
| | | search_map: {}, |
| | | searchSel: {}, |
| | | keyword: "", |
| | | keywordType: "" |
| | | keywordType: "", |
| | | tableColumn: [], |
| | | showCol: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | methods: { |
| | | setTable() { |
| | | if (this.editConfig.title === "销售总单") { |
| | | this.tableColumn = [ |
| | | { label: "单据编号", prop: "number", isClick: true, default: true }, // 单据编号 |
| | | { label: "负责人", prop: "member_name" } // 负责人 |
| | | ] |
| | | this.showCol = ["单据编号", "负责人"] |
| | | this.tableList = { |
| | | selectIndex: true, |
| | | tableInfomation: [], |
| | | tableColumn: [ |
| | | { label: "单据编号", prop: "number", isClick: true }, // 单据编号 |
| | | { label: "负责人", prop: "member_name" } // 负责人 |
| | | ] |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | | tableColumn: this.setColumnVisible(this.showCol) |
| | | } |
| | | this.searchSel = { value: "number", label: "单据编号" } |
| | | } else if (this.editConfig.title === "服务合同") { |
| | |
| | | } |
| | | this.searchSel = { value: "number", 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 |
| | | const value = this.tableList.tableColumn[i].prop |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |
| | | setColumnVisible(showCol) { |
| | | return this.tableColumn.map((ele) => { |
| | | return { |
| | | ...ele, |
| | | isShowColumn: showCol.includes(ele.label) |
| | | } |
| | | }) |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setColumnVisible(val) |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | |
| | | async getMasterOrderList() { |
| | | await getMasterOrderList({ |
| | | search_map: this.search_map, |
| | | page: 0, |
| | | pageSize: 0 |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | |
| | | member_name: item.member.username |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list.slice(0, 5) || [] |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.count |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | |
| | | cursor: pointer; |
| | | } |
| | | .dialog-footer { |
| | | height: 40px; |
| | | line-height: 40px; |
| | | height: 50px; |
| | | line-height: 50px; |
| | | color: red; |
| | | .btn-pager { |
| | | display: flex; |
| | | margin-top: 0px; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | } |
| | | ::v-deep { |
| | | .input-with-select .el-input-group__prepend { |
| | |
| | | > |
| | | <div class="bg-view"> |
| | | <div class="query-bg"> |
| | | <!-- <el-input placeholder="请输入内容" v-model="queryInput" size="mini" class="input-with-select"> |
| | | <el-select v-model="select" slot="prepend" placeholder="请选择" disabled> |
| | | <el-option label="全部字段" value="1"></el-option> |
| | | <el-option label="联系人姓名" value="2"></el-option> |
| | | <el-option label="联系人编号" value="3"></el-option> |
| | | <el-option label="客户名称" value="4"></el-option> |
| | | <el-option label="手机" value="5"></el-option> |
| | | </el-select> |
| | | </el-input> |
| | | <div class="btn"> |
| | | <el-button type="primary" size="mini" disabled>设置字段</el-button> |
| | | <el-button type="primary" size="mini" disabled>快速创建</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | size="mini" |
| | | v-loading="loading" |
| | | :header-cell-style="{ background: '#f7f7f7' }" |
| | | > |
| | | <el-table-column label="联系人姓名" prop="name" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <span class="sel-name" @click="selNameClick(scope.row)">{{ scope.row.name }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="联系人编号" prop="number"></el-table-column> |
| | | <el-table-column label="客户名称" prop="client_name"></el-table-column> |
| | | <el-table-column label="手机" prop="phone"></el-table-column> |
| | | <div slot="empty"> |
| | | <el-empty :image-size="100"></el-empty> |
| | | </div> |
| | | </el-table> --> |
| | | <SearchCommonView |
| | | ref="searchCommonView" |
| | | :search-options="searchOptions" |
| | |
| | | :table-list="tableList" |
| | | :select-box="false" |
| | | @selContactsClick="selNameClick" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | </TableCommonView> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <div class="remark">说明:支持多字段模糊查询,仅显示符合条件的前5条数据</div> |
| | | <!-- <div class="remark">说明:支持多字段模糊查询,仅显示符合条件的前5条数据</div> --> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | |
| | | <script> |
| | | import { getContactList } from "@/api/client/contacts" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "EditSelClientDialog", |
| | | mixins: [pageMixin], |
| | | props: { |
| | | editCommonConfig: { |
| | | type: Object, |
| | |
| | | tableList: [], |
| | | searchSelOptions: [], |
| | | loading: false, |
| | | search_map: {} |
| | | search_map: {}, |
| | | tableColumn: [ |
| | | { label: "联系人姓名", prop: "name", isContactClick: true, default: true }, // 联系人姓名 |
| | | { label: "联系人编号", prop: "number" }, // 联系人编号 |
| | | { label: "客户名称", prop: "client_name" }, // 客户名称 |
| | | { label: "手机", prop: "phone" } // 手机号码 |
| | | ], |
| | | showCol: ["联系人姓名", "联系人编号", "客户名称", "手机"] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | methods: { |
| | | setTable() { |
| | | this.tableList = { |
| | | selectIndex: true, |
| | | tableInfomation: [], |
| | | tableColumn: [ |
| | | { label: "联系人姓名", prop: "name", isContactClick: true }, // 联系人姓名 |
| | | { label: "联系人编号", prop: "number" }, // 联系人编号 |
| | | { label: "客户名称", prop: "client_name" }, // 客户名称 |
| | | { label: "手机", prop: "phone" } // 手机号码 |
| | | ] |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | | tableColumn: this.setColumnVisible(this.showCol) |
| | | } |
| | | 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 |
| | | const value = this.tableList.tableColumn[i].prop |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |
| | | setColumnVisible(showCol) { |
| | | return this.tableColumn.map((ele) => { |
| | | return { |
| | | ...ele, |
| | | isShowColumn: showCol.includes(ele.label) |
| | | } |
| | | }) |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setColumnVisible(val) |
| | | }, |
| | | handleClose() { |
| | | this.editConfig.editVisible = false |
| | |
| | | cursor: pointer; |
| | | } |
| | | .dialog-footer { |
| | | height: 40px; |
| | | line-height: 40px; |
| | | height: 50px; |
| | | line-height: 50px; |
| | | color: red; |
| | | .btn-pager { |
| | | display: flex; |
| | | margin-top: 0px; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | } |
| | | ::v-deep { |
| | | .input-with-select .el-input-group__prepend { |
| | |
| | | > |
| | | <div class="bg-view"> |
| | | <div class="query-bg"> |
| | | <el-input placeholder="请输入内容" v-model="queryInput" size="mini" class="input-with-select"> |
| | | <el-select v-model="select" slot="prepend" placeholder="请选择"> |
| | | <el-option label="全部字段" value="1"></el-option> |
| | | <el-option label="客户名称" value="2"></el-option> |
| | | <el-option label="商机状态" value="3"></el-option> |
| | | <el-option label="商机来源" value="4"></el-option> |
| | | </el-select> |
| | | </el-input> |
| | | <div class="btn"> |
| | | <el-button type="primary" size="mini" disabled>设置字段</el-button> |
| | | <el-button type="primary" size="mini" disabled>快速创建</el-button> |
| | | </div> |
| | | <SearchCommonView |
| | | ref="searchCommonView" |
| | | :search-options="searchOptions" |
| | | @searchClick="searchClick" |
| | | @resetClick="resetClick" |
| | | /> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | |
| | | </div> |
| | | </el-table> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <div class="remark">说明:支持多字段模糊查询,仅显示符合条件的前5条数据</div> |
| | | <!-- <div class="remark">说明:支持多字段模糊查询,仅显示符合条件的前5条数据</div> --> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | |
| | | <script> |
| | | import { getSalesLeadsList } from "@/api/client/salesLead" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "EditSelChanceDialog", |
| | | mixins: [pageMixin], |
| | | props: { |
| | | editCommonConfig: { |
| | | type: Object, |
| | |
| | | select: "1", |
| | | tableData: [], |
| | | searchSelOptions: [], |
| | | loading: false |
| | | loading: false, |
| | | searchOptions: [ |
| | | { value: "name", label: "客户名称" }, |
| | | { value: "businessStatus", label: "商机状态" }, |
| | | { value: "sales_sources_id", label: "商机来源" } |
| | | ] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getSalesLeadsList() |
| | | await getSalesLeadsList({ |
| | | search_map: this.search_map, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | |
| | | ...item |
| | | } |
| | | }) |
| | | this.tableData = list.slice(0, 5) || [] |
| | | this.tableData = list || [] |
| | | this.pagerOptions.totalCount = res.data.count |
| | | } else { |
| | | this.tableData = [] |
| | | } |
| | |
| | | this.editConfig.editVisible = false |
| | | console.log(row) |
| | | this.$emit("selClient", row, "lead") |
| | | }, |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.search_map = { |
| | | [val.value]: content |
| | | } |
| | | this.getData() |
| | | }, |
| | | resetClick() { |
| | | this.search_map = {} |
| | | this.getData() |
| | | } |
| | | } |
| | | } |
| | |
| | | cursor: pointer; |
| | | } |
| | | .dialog-footer { |
| | | height: 40px; |
| | | line-height: 40px; |
| | | height: 50px; |
| | | line-height: 50px; |
| | | color: red; |
| | | .btn-pager { |
| | | display: flex; |
| | | margin-top: 0px; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | } |
| | | ::v-deep { |
| | | .input-with-select .el-input-group__prepend { |