| | |
| | | /* //对响应数据做些事 */ |
| | | if (res.data.code === 200) { |
| | | return res.data ? res.data : {} |
| | | } else if (res.data.code === 700001) { |
| | | } else if (res.data.code === 700001 || res.data.code === 700005) { |
| | | console.log("客户名称重复") |
| | | return res |
| | | } else { |
| | |
| | | keywordType: "客户名称", |
| | | keyword: this.detailConfig.infomation.name, |
| | | id: this.detailConfig.infomation.id, |
| | | common_name: this.detailConfig.infomation.name, |
| | | client_name: this.detailConfig.infomation.name, |
| | | contact_name: this.detailConfig.infomation.contact_name, |
| | | client_status_id: this.detailConfig.infomation.client_status_id, |
| | |
| | | created() { |
| | | this.setData(this.detailConfig.infomation) |
| | | this.addConfig = { |
| | | id_name: "contact_id", |
| | | id_name: "contact_name", |
| | | id: this.detailConfig.infomation.id, |
| | | common_name: this.detailConfig.infomation.name, |
| | | client_name: this.detailConfig.infomation.client_name, |
| | | contact_name: this.detailConfig.infomation.name, |
| | | client_status_id: this.detailConfig.infomation.Client.client_status_id, |
| | |
| | | if (!this.isDetail) { |
| | | this.search_map = {} |
| | | } else { |
| | | let content = "" |
| | | if (this.addConfig.keywordType === "销售机会") { |
| | | content = this.addConfig.id |
| | | } else { |
| | | content = this.addConfig.common_name |
| | | } |
| | | this.search_map = { |
| | | [this.addConfig.id_name]: this.addConfig.client_name |
| | | [this.addConfig.id_name]: content |
| | | } |
| | | } |
| | | this.getData(this.search_map) |
| | |
| | | this.addConfig = { |
| | | id_name: "sales_leads_id", |
| | | id: this.detailConfig.infomation.id, |
| | | common_name: this.detailConfig.infomation.id, |
| | | sales_leads_name: this.detailConfig.infomation.name, |
| | | sales_leads_id: this.detailConfig.infomation.id |
| | | } |
| | |
| | | isBasicExpand: true, // 基本信息 |
| | | basicInfoList: [], |
| | | isAnnexExpand: true, // 附件信息 |
| | | addCommonConfig: { |
| | | master_order_number: this.masterOrderDetail.infomation.number, |
| | | masterOrderId: this.masterOrderDetail.infomation.id |
| | | } |
| | | addCommonConfig: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.setData(this.detailConfig.infomation) |
| | | this.addCommonConfig = { |
| | | id_name: "master_order_number", |
| | | id: this.detailConfig.infomation.id, |
| | | common_name: this.detailConfig.infomation.number, |
| | | master_order_number: this.masterOrderDetail.infomation.number, |
| | | masterOrderId: this.masterOrderDetail.infomation.id |
| | | } |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | |
| | | <!-- <FollowupRecords :isDetail="true" /> --> |
| | | </div> |
| | | <div v-if="activeName === 'detail'" class="second"> |
| | | <SalesDetails :isDetail="true" /> |
| | | <SalesDetails :isDetail="true" :add-config="addConfig" /> |
| | | </div> |
| | | <div v-if="activeName === 'serviceContract'" class="second"> |
| | | <ServiceContract :isDetail="true" /> |
| | | <ServiceContract :isDetail="true" :add-config="addConfig" /> |
| | | </div> |
| | | </div> |
| | | </el-drawer> |
| | |
| | | sumProp: ["other1", "other2", "other3", "other4"], |
| | | mergeNumber: 3 |
| | | }, |
| | | productTableList: {} |
| | | productTableList: {}, |
| | | addConfig: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.setData(this.detailConfig.infomation) |
| | | this.addConfig = { |
| | | id_name: "quotation_number", |
| | | keywordType: "报价单", |
| | | keyword: this.detailConfig.infomation.number, |
| | | id: this.detailConfig.infomation.id, |
| | | common_name: this.detailConfig.infomation.name, |
| | | client_name: this.detailConfig.infomation.client.name, |
| | | contact_name: this.detailConfig.infomation.contact_name, |
| | | client_id: this.detailConfig.infomation.client_id, |
| | | contact_id: this.detailConfig.infomation.contact_id |
| | | } |
| | | this.setTableForm() |
| | | }, |
| | | mounted() {}, |
| | |
| | | isDetail: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | addConfig: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | mixins: [pageMixin], |
| | |
| | | <!-- <FollowupRecords :isDetail="true" /> --> |
| | | </div> |
| | | <div v-if="activeName === 'return'" class="second"> |
| | | <SalesReturn :isDetail="true" /> |
| | | <SalesReturn :isDetail="true" :add-config="addConfig" /> |
| | | </div> |
| | | <div v-if="activeName === 'serviceContract'" class="second"> |
| | | <ServiceContract :isDetail="true" /> |
| | | <ServiceContract :isDetail="true" :add-config="addConfig" /> |
| | | </div> |
| | | <div v-if="activeName === 'refundForm'" class="second"> |
| | | <RefundForm :isDetail="true" /> |
| | | <RefundForm :isDetail="true" :add-config="addConfig" /> |
| | | </div> |
| | | </div> |
| | | </el-drawer> |
| | |
| | | sumProp: ["other1", "other2", "other3", "other4"], |
| | | mergeNumber: 3 |
| | | }, |
| | | productTableList: {} |
| | | productTableList: {}, |
| | | addConfig: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.setData(this.detailConfig.infomation) |
| | | this.addConfig = { |
| | | id_name: "sale_detail_name", |
| | | keywordType: "销售明细单", |
| | | keyword: this.detailConfig.infomation.number, |
| | | id: this.detailConfig.infomation.id, |
| | | common_name: this.detailConfig.infomation.name, |
| | | client_name: this.detailConfig.infomation.client.name, |
| | | contact_name: this.detailConfig.infomation.contact_name, |
| | | client_id: this.detailConfig.infomation.client_id, |
| | | contact_id: this.detailConfig.infomation.contact_id |
| | | } |
| | | this.setTableForm() |
| | | }, |
| | | mounted() {}, |
| | |
| | | </div> --> |
| | | </div> |
| | | <div v-if="activeName === 'second'" class="second"> |
| | | <FollowupRecords :isDetail="true" /> |
| | | <FollowupRecords :isDetail="true" :add-config="addConfig" /> |
| | | </div> |
| | | <div v-if="activeName === 'collectionForecast'" class="second"> |
| | | <!-- <SalesOpportunity :isDetail="true" /> --> |
| | | </div> |
| | | <div v-if="activeName === 'quotation'" class="second"> |
| | | <Quotation :isDetail="true" /> |
| | | <Quotation :isDetail="true" :add-config="addConfig" /> |
| | | </div> |
| | | <div v-if="activeName === 'detail'" class="second"> |
| | | <SalesDetails :isDetail="true" /> |
| | | <SalesDetails :isDetail="true" :add-config="addConfig" /> |
| | | </div> |
| | | <div v-if="activeName === 'serviceContract'" class="second"> |
| | | <ServiceContract :isDetail="true" /> |
| | | <ServiceContract :isDetail="true" :add-config="addConfig" /> |
| | | </div> |
| | | </div> |
| | | <!-- 推进 --> |
| | |
| | | active: "", |
| | | allOptions: [], |
| | | options: [] |
| | | } |
| | | }, |
| | | addConfig: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.setData(this.detailConfig.infomation) |
| | | this.addConfig = { |
| | | id_name: "sale_chance_id", |
| | | keywordType: "销售机会", |
| | | keyword: this.detailConfig.infomation.name, |
| | | id: this.detailConfig.infomation.id, |
| | | common_name: this.detailConfig.infomation.name, |
| | | client_name: this.detailConfig.infomation.client.name, |
| | | contact_name: this.detailConfig.infomation.contact_name, |
| | | client_id: this.detailConfig.infomation.client_id, |
| | | contact_id: this.detailConfig.infomation.contact_id, |
| | | sale_chance_name: this.detailConfig.infomation.name, |
| | | sale_chance_id: this.detailConfig.infomation.id |
| | | } |
| | | this.getSaleStageList() |
| | | this.setData(this.detailConfig.infomation) |
| | | }, |
| | |
| | | @getSelectArray="getSelectArray" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="120"> |
| | | <el-table-column label="操作" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button> |
| | | <el-button type="text" size="small">跟进</el-button> |
| | | <el-button @click="followupClick(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> |
| | |
| | | <DetailClientManage v-if="clientDeail.visible" :client-manage-detail="clientDeail" /> |
| | | <!-- 联系人详情 --> |
| | | <DetailContacts v-if="contactsDeail.visible" :contacts-detail="contactsDeail" /> |
| | | <!-- 新建/编辑跟进记录 --> |
| | | <AddFollowupRecordsDialog v-if="editFollowupConfig.visible" :edit-contacts-config="editFollowupConfig" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { getSaleChanceList, getDelSaleChance } from "@/api/sales/salesOpportunity" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import DetailOpportunity from "@/views/sales/salesOpportunity/DetailOpportunity" |
| | | import AddFollowupRecordsDialog from "@/views/client/followupRecords/AddFollowupRecordsDialog" |
| | | |
| | | export default { |
| | | name: "SalesOpportunity", |
| | |
| | | AddSalesOpportunityDialog, |
| | | DetailOpportunity, |
| | | DetailContacts: () => import("@/views/client/contacts/DetailContacts"), |
| | | DetailClientManage: () => import("@/views/client/client/DetailClientManage") |
| | | DetailClientManage: () => import("@/views/client/client/DetailClientManage"), |
| | | AddFollowupRecordsDialog |
| | | }, |
| | | computed: {}, |
| | | data() { |
| | |
| | | infomation: {} |
| | | }, |
| | | search_map: {}, |
| | | selValueList: [] |
| | | selValueList: [], |
| | | editFollowupConfig: { |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {} |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | selContactsClick(row) { |
| | | console.log(row) |
| | | this.contactsDeail.visible = true |
| | | this.contactsDeail.infomation = { ...row.contact } |
| | | this.contactsDeail.infomation = { ...row.contact, sale_chance_name: row.name, sale_chance_id: row.id } |
| | | }, |
| | | // 机会名称详情 |
| | | selCommonClick(row) { |
| | | console.log(row) |
| | | this.opportunityDeail.visible = true |
| | | this.opportunityDeail.infomation = { ...row } |
| | | }, |
| | | // 跟进 |
| | | followupClick(row) { |
| | | console.log(row) |
| | | this.editFollowupConfig.visible = true |
| | | this.editFollowupConfig.title = "新建" |
| | | this.editFollowupConfig.infomation = { |
| | | ...row, |
| | | number: "", |
| | | sale_chance_name: row.name, |
| | | sale_chance_id: row.id |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | <div v-if="activeName === 'refundForm'" class="second"> |
| | | <RefundForm :isDetail="true" /> |
| | | <RefundForm :isDetail="true" :add-config="addConfig" /> |
| | | </div> |
| | | </div> |
| | | </el-drawer> |
| | |
| | | sumProp: ["other1", "other2", "other3", "other4"], |
| | | mergeNumber: 3 |
| | | }, |
| | | productTableList: {} |
| | | productTableList: {}, |
| | | addConfig: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.setData(this.detailConfig.infomation) |
| | | this.addConfig = { |
| | | keywordType: "销售退货单", |
| | | keyword: this.detailConfig.infomation.number, |
| | | id: this.detailConfig.infomation.id, |
| | | client_name: this.detailConfig.infomation.client.name, |
| | | contact_name: this.detailConfig.infomation.contact_name, |
| | | client_id: this.detailConfig.infomation.client_id, |
| | | contact_id: this.detailConfig.infomation.contact_id |
| | | } |
| | | this.setTableForm() |
| | | }, |
| | | mounted() {}, |
| | |
| | | isDetail: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | addConfig: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | mixins: [pageMixin], |
| | |
| | | </div> |
| | | </div> |
| | | <div v-if="activeName === 'detail'" class="second"> |
| | | <SalesDetails :isDetail="true" /> |
| | | <SalesDetails :isDetail="true" :add-config="addConfig" /> |
| | | </div> |
| | | </div> |
| | | </el-drawer> |
| | |
| | | sumProp: ["other1", "other2", "other3", "other4"], |
| | | mergeNumber: 3 |
| | | }, |
| | | productTableList: {} |
| | | productTableList: {}, |
| | | addConfig: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.setData(this.detailConfig.infomation) |
| | | this.addConfig = { |
| | | keywordType: "销售子单", |
| | | keyword: this.detailConfig.infomation.number, |
| | | id: this.detailConfig.infomation.id, |
| | | client_name: this.detailConfig.infomation.client.name, |
| | | contact_name: this.detailConfig.infomation.contact_name, |
| | | client_id: this.detailConfig.infomation.client_id, |
| | | contact_id: this.detailConfig.infomation.contact_id |
| | | } |
| | | this.setTableForm() |
| | | }, |
| | | mounted() {}, |
| | |
| | | this.search_map = {} |
| | | } else { |
| | | this.search_map = { |
| | | [this.addConfig.id_name]: this.addConfig.client_name |
| | | [this.addConfig.id_name]: this.addConfig.common_name |
| | | } |
| | | } |
| | | this.getData(this.search_map) |
| | |
| | | .el-table .el-table__cell { |
| | | padding: 0; |
| | | } |
| | | .el-table__header tr, |
| | | .el-table__header th { |
| | | height: 48px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | contactId: this.editCommonConfig.infomation.contactId, |
| | | serviceContractId: this.editCommonConfig.infomation.serviceContractId, |
| | | SalesDetailsId: this.editCommonConfig.infomation.SalesDetailsId, |
| | | productNameId: this.editCommonConfig.infomation.productId, |
| | | productName: this.editCommonConfig.infomation.productName, |
| | | saleChanceId: this.editCommonConfig.infomation.saleChanceId |
| | | } |
| | | }, |
| | |
| | | SalesDetailsId: this.SalesDetailsId || 0, |
| | | priorityLevelId: data.priorityLevelId || 0, |
| | | problemDesc: data.problemDesc || "", |
| | | productId: this.productNameId, |
| | | productName: this.productName, |
| | | productTypeName: "", |
| | | realTime: data.realTime || "", |
| | | remark: data.remark || "", |
| | | saleChanceId: this.saleChanceId || 0, |
| | |
| | | } else if (value === "contract") { |
| | | restaurants = this.salesDetailsList |
| | | } else if (value === "productName") { |
| | | console.log(this.productList) |
| | | restaurants = this.productList |
| | | } else if (value === "contact") { |
| | | restaurants = this.contactNamelist |
| | |
| | | } else if (value === "contract") { |
| | | this.SalesDetailsId = item.id |
| | | } else if (value === "productName") { |
| | | this.productNameId = item.Number |
| | | this.productName = item.Name |
| | | } else if (value === "contact") { |
| | | this.contactId = item.id |
| | | } else if (value === "chance") { |
| | |
| | | this.SalesDetailsId = row.id |
| | | } else if (value === "productName") { |
| | | this.editConfig.infomation.product_name = row.Name |
| | | this.productNameId = row.Number |
| | | this.productName = row.Name |
| | | } else if (value === "chance") { |
| | | this.editConfig.infomation.sale_chance_name = row.name |
| | | this.saleChanceId = row.id |
| | |
| | | this.SalesDetailsId = 0 |
| | | } else if (value === "productName") { |
| | | this.editConfig.infomation.product_name = "" |
| | | this.productNameId = 0 |
| | | this.productName = "" |
| | | } else if (value === "contact") { |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | |
| | | leftStr: "产品类别", |
| | | leftValue: "", |
| | | rightStr: "产品名称", |
| | | rightValue: data.Product.name |
| | | rightValue: data.productName |
| | | }, |
| | | { |
| | | leftStr: "服务方式", |
| | |
| | | isDetail: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | addConfig: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | mixins: [pageMixin], |
| | |
| | | value: "serviceNumber", |
| | | label: "服务单编号" |
| | | }, |
| | | selValueList: [] |
| | | selValueList: [], |
| | | keyword: "", |
| | | keywordType: "" |
| | | } |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | if (!this.isDetail) { |
| | | this.keyword = "" |
| | | this.keywordType = "" |
| | | } else { |
| | | this.keyword = this.addConfig.keyword |
| | | this.keywordType = this.addConfig.keywordType |
| | | } |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | |
| | | } |
| | | }, |
| | | // 请求数据 |
| | | async getData(keyword, keywordType) { |
| | | async getData() { |
| | | this.loading = true |
| | | await getServiceOrderList({ |
| | | keyword: keyword, |
| | | keywordType: keywordType, |
| | | keyword: this.keyword, |
| | | keywordType: this.keywordType, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize, |
| | | salesDetailsId: 0, |
| | |
| | | }, |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.getData(content, val.label) |
| | | this.keyword = content |
| | | this.keywordType = val.label |
| | | this.getData() |
| | | }, |
| | | resetClick() { |
| | | this.search_map = {} |
| | | this.keyword = "" |
| | | this.keywordType = "" |
| | | this.getData() |
| | | }, |
| | | // 新建 |
| | |
| | | <!-- <FollowupRecords :isDetail="true" /> --> |
| | | </div> |
| | | <div v-if="activeName === 'clientService'" class="second"> |
| | | <ClientServiceOrder :isDetail="true" /> |
| | | <ClientServiceOrder :isDetail="true" :add-config="addConfig" /> |
| | | </div> |
| | | <div v-if="activeName === 'invoice'" class="second"> |
| | | <!-- <FollowupRecords :isDetail="true" /> --> |
| | |
| | | sumProp: ["other1", "other2", "other3", "other4"], |
| | | mergeNumber: 3 |
| | | }, |
| | | productTableList: {} |
| | | productTableList: {}, |
| | | addConfig: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.setData(this.detailConfig.infomation) |
| | | this.addConfig = { |
| | | keywordType: "服务合同", |
| | | keyword: this.detailConfig.infomation.number, |
| | | id: this.detailConfig.infomation.id, |
| | | client_name: this.detailConfig.infomation.client.name, |
| | | contact_name: this.detailConfig.infomation.contact_name, |
| | | client_id: this.detailConfig.infomation.client_id, |
| | | contact_id: this.detailConfig.infomation.contact_id |
| | | } |
| | | this.setTableForm() |
| | | }, |
| | | mounted() {}, |
| | |
| | | isDetail: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | addConfig: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | mixins: [pageMixin], |
| | |
| | | value: "number", |
| | | label: "服务合同编号" |
| | | }, |
| | | selValueList: [] |
| | | selValueList: [], |
| | | keyword: "", |
| | | keywordType: "" |
| | | } |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | if (!this.isDetail) { |
| | | this.keyword = "" |
| | | this.keywordType = "" |
| | | } else { |
| | | this.keyword = this.addConfig.keyword |
| | | this.keywordType = this.addConfig.keywordType |
| | | } |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | |
| | | } |
| | | }, |
| | | // 请求数据 |
| | | async getData(keyword, keywordType) { |
| | | async getData() { |
| | | this.loading = true |
| | | await getServiceContractList({ |
| | | keyword: keyword, |
| | | keywordType: keywordType, |
| | | keyword: this.keyword, |
| | | keywordType: this.keywordType, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | |
| | | }, |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.getData(content, val.label) |
| | | this.keyword = content |
| | | this.keywordType = val.label |
| | | this.getData() |
| | | }, |
| | | resetClick() { |
| | | this.search_map = {} |
| | | this.keyword = "" |
| | | this.keywordType = "" |
| | | this.getData() |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "新建" |
| | | this.editConfig.infomation = {} |
| | | this.editConfig.infomation = { ...this.addConfig } |
| | | }, |
| | | // 编辑 |
| | | handleClick(row) { |