| | |
| | | method: "get" |
| | | }) |
| | | } |
| | | |
| | | // 获取服务合同类型 |
| | | export function getServiceContractTypeList() { |
| | | return request({ |
| | | url: "/api/serviceContractType/list", |
| | | method: "get" |
| | | }) |
| | | } |
| | |
| | | import request from "@/common/untils/request.js" |
| | | |
| | | // 服务单列表 |
| | | export function getServiceOrderList() { |
| | | export function getServiceOrderList(data) { |
| | | return request({ |
| | | url: "/api/serviceOrder/list", |
| | | method: "get" |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | // 添加服务单 |
| | |
| | | // 删除服务单 |
| | | export function getDelServiceOrder(data) { |
| | | return request({ |
| | | url: "/api/serviceOrder/delete/" + data.id, |
| | | method: "delete" |
| | | url: "/api/serviceOrder/delete", |
| | | method: "delete", |
| | | data |
| | | }) |
| | | } |
| | | // 更新服务单 |
| | |
| | | // 删除服务合同 |
| | | export function getDelServiceContract(data) { |
| | | return request({ |
| | | url: "/api/serviceContract/delete/" + data.id, |
| | | method: "delete" |
| | | url: "/api/serviceContract/delete", |
| | | method: "delete", |
| | | data |
| | | }) |
| | | } |
| | | // 更新服务合同 |
| | |
| | | // 删除服务回访单 |
| | | export function getDelServiceFollowup(data) { |
| | | return request({ |
| | | url: "/api/serviceFollowup/delete/" + data.id, |
| | | method: "delete" |
| | | url: "/api/serviceFollowup/delete", |
| | | method: "delete", |
| | | data |
| | | }) |
| | | } |
| | | // 更新服务回访单 |
| | |
| | | <div class="search"> |
| | | <el-input placeholder="请输入内容" v-model="searchInput" class="input-with-select" clearable> |
| | | <el-select v-model="searchSelValue" slot="prepend" placeholder="请选择" class="search-sel"> |
| | | <el-option v-for="item in searchOptions" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | <el-option v-for="item in searchOptions" :key="item.value" :label="item.label" :value="item"> </el-option> |
| | | </el-select> |
| | | <!-- <i slot="suffix" class="el-icon-search" style="cursor: pointer" @click="searchClick"></i> --> |
| | | </el-input> |
| | |
| | | default: () => [] |
| | | }, |
| | | searchSel: { |
| | | type: String, |
| | | default: "name" |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | value: "name", |
| | | label: "" |
| | | } |
| | | } |
| | | }, |
| | | searchOptions: { |
| | | type: Array, |
| | |
| | | import { getServiceContractList } from "@/api/serviceManage/serviceContract" |
| | | import { getContractList } from "@/api/sales/contractManage" |
| | | import { getSalesDetailsList } from "@/api/sales/salesDetails" |
| | | import { getQuotationList } from "@/api/sales/quotation" |
| | | import { getServiceOrderList } from "@/api/serviceManage/clientServiceOrder" |
| | | import { Message } from "element-ui" |
| | | |
| | | export default { |
| | |
| | | masterOrderList: [], // 销售总单 |
| | | serviceContractList: [], // 服务合同 |
| | | getContractList: [], // 合同订单 |
| | | salesDetailsList: [] // 销售明细单 |
| | | salesDetailsList: [], // 销售明细单 |
| | | quotationList: [], // 报价单 |
| | | serviceOrderList: [] // 客户服务单 |
| | | }, |
| | | mutations: { |
| | | clientNameList(state, payload) { |
| | |
| | | }, |
| | | salesDetailsList(state, payload) { |
| | | state.salesDetailsList = payload |
| | | }, |
| | | quotationList(state, payload) { |
| | | state.quotationList = payload |
| | | }, |
| | | serviceOrderList(state, payload) { |
| | | state.serviceOrderList = payload |
| | | } |
| | | }, |
| | | actions: { |
| | |
| | | Message.error(res.msg) |
| | | } |
| | | }) |
| | | }, |
| | | geQuotation(context) { |
| | | getQuotationList().then((res) => { |
| | | if (res.code == 200) { |
| | | context.commit("quotationList", res.data.list) |
| | | } else { |
| | | Message.error(res.msg) |
| | | } |
| | | }) |
| | | }, |
| | | geServiceOrder(context) { |
| | | getServiceOrderList().then((res) => { |
| | | if (res.code == 200) { |
| | | context.commit("serviceOrderList", res.data.data) |
| | | } else { |
| | | Message.error(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | <li v-for="(item, i) in basicInfoList" :key="i"> |
| | | <div class="left"> |
| | | <div class="content-title">{{ item.leftStr + ":" }}</div> |
| | | <div class="content-data">{{ item.leftValue }}</div> |
| | | <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> |
| | | </div> |
| | | <div class="right"> |
| | | <div v-if="item.rightStr" class="right"> |
| | | <div class="content-title">{{ item.rightStr }}</div> |
| | | <div class="content-data">{{ item.rightValue }}</div> |
| | | <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | |
| | | <li v-for="(item, i) in contactList" :key="i"> |
| | | <div class="left"> |
| | | <div class="content-title">{{ item.leftStr + ":" }}</div> |
| | | <div class="content-data">{{ item.leftValue }}</div> |
| | | <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> |
| | | </div> |
| | | <div class="right"> |
| | | <div v-if="item.rightStr" class="right"> |
| | | <div class="content-title">{{ item.rightStr }}</div> |
| | | <div class="content-data">{{ item.rightValue }}</div> |
| | | <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | |
| | | <li v-for="(item, i) in dynamicInfoList" :key="i"> |
| | | <div class="left"> |
| | | <div class="content-title">{{ item.leftStr + ":" }}</div> |
| | | <div class="content-data">{{ item.leftValue }}</div> |
| | | <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> |
| | | </div> |
| | | <div class="right"> |
| | | <div v-if="item.rightStr" class="right"> |
| | | <div class="content-title">{{ item.rightStr }}</div> |
| | | <div class="content-data">{{ item.rightValue }}</div> |
| | | <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | |
| | | <li v-for="(item, i) in businessInfoList" :key="i"> |
| | | <div class="left"> |
| | | <div class="content-title">{{ item.leftStr + ":" }}</div> |
| | | <div class="content-data">{{ item.leftValue }}</div> |
| | | <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> |
| | | </div> |
| | | <div class="right"> |
| | | <div v-if="item.rightStr" class="right"> |
| | | <div class="content-title">{{ item.rightStr }}</div> |
| | | <div class="content-data">{{ item.rightValue }}</div> |
| | | <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | |
| | | <li v-for="(item, i) in addressInfoList" :key="i"> |
| | | <div class="left"> |
| | | <div class="content-title">{{ item.leftStr + ":" }}</div> |
| | | <div class="content-data">{{ item.leftValue }}</div> |
| | | <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> |
| | | </div> |
| | | <div class="right"> |
| | | <div v-if="item.rightStr" class="right"> |
| | | <div class="content-title">{{ item.rightStr }}</div> |
| | | <div class="content-data">{{ item.rightValue }}</div> |
| | | <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.search_map = { |
| | | [val]: content |
| | | [val.value]: content |
| | | } |
| | | this.getData() |
| | | }, |
| | |
| | | <li v-for="(item, i) in basicInfoList" :key="i"> |
| | | <div class="left"> |
| | | <div class="content-title">{{ item.leftStr + ":" }}</div> |
| | | <div class="content-data">{{ item.leftValue }}</div> |
| | | <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> |
| | | </div> |
| | | <div class="right"> |
| | | <div v-if="item.rightStr" class="right"> |
| | | <div class="content-title">{{ item.rightStr }}</div> |
| | | <div class="content-data">{{ item.rightValue }}</div> |
| | | <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | |
| | | <li v-for="(item, i) in addressInfoList" :key="i"> |
| | | <div class="left"> |
| | | <div class="content-title">{{ item.leftStr + ":" }}</div> |
| | | <div class="content-data">{{ item.leftValue }}</div> |
| | | <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> |
| | | </div> |
| | | <div class="right"> |
| | | <div v-if="item.rightStr" class="right"> |
| | | <div class="content-title">{{ item.rightStr }}</div> |
| | | <div class="content-data">{{ item.rightValue }}</div> |
| | | <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | |
| | | ref="searchCommonView" |
| | | :query-class-options="queryClassOptions" |
| | | :search-options="searchOptions" |
| | | @searchClick="searchClick" |
| | | @resetClick="resetClick" |
| | | /> |
| | | <div class="btn-pager"> |
| | | <PublicFunctionBtnView :operates-list="operatesList" :allocation="false" @batchDelete="delClick" /> |
| | |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {} |
| | | } |
| | | }, |
| | | search_map: {} |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | async getData() { |
| | | this.loading = true |
| | | await getContactList({ |
| | | keyword: "", |
| | | search_map: this.search_map, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.search_map = { |
| | | [val.value]: content |
| | | } |
| | | this.getData() |
| | | }, |
| | | resetClick() { |
| | | this.search_map = {} |
| | | this.getData() |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | |
| | | ref="searchCommonView" |
| | | :query-class-options="queryClassOptions" |
| | | :search-options="searchOptions" |
| | | :search-sel="searchSel" |
| | | @searchClick="searchClick" |
| | | @resetClick="resetClick" |
| | | /> |
| | | <div class="btn-pager"> |
| | | <PublicFunctionBtnView :statistics="true" :operates-list="operatesList" @batchDelete="delClick" /> |
| | |
| | | visible: false, |
| | | infomation: {} |
| | | }, |
| | | selValueList: [] |
| | | selValueList: [], |
| | | searchSel: { |
| | | value: "topic", |
| | | label: "" |
| | | }, |
| | | search_map: {} |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.searchOptions = [] |
| | | for (let i = 0; i < this.tableList.tableColumn.length; i++) { |
| | | const label = this.tableList.tableColumn[i].label |
| | | this.searchOptions.push({ value: (i + 1).toString(), label: label }) |
| | | const value = this.tableList.tableColumn[i].prop |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getFollowRecordList({ |
| | | keyword: "", |
| | | search_map: this.search_map, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.search_map = { |
| | | [val.value]: content |
| | | } |
| | | this.getData() |
| | | }, |
| | | resetClick() { |
| | | this.search_map = {} |
| | | this.getData() |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | |
| | | }, |
| | | methods: { |
| | | setData(status) { |
| | | if (status === 1) { |
| | | this.options = ["新建", "失败关闭", "升级到客户", "升级到客户和销售机会"] |
| | | this.value = "失败关闭" |
| | | this.value1 = "失败关闭" |
| | | } else if (status === -1) { |
| | | this.options = ["新建", "跟进中", "升级到客户", "升级到客户和销售机会"] |
| | | this.value = "升级到客户" |
| | | this.value1 = "升级到客户" |
| | | } else { |
| | | if (status === 0) { |
| | | this.options = ["跟进中", "失败关闭", "升级到客户", "升级到客户和销售机会"] |
| | | this.value = "跟进中" |
| | | this.value1 = "跟进中" |
| | | } else if (status === 1) { |
| | | this.options = ["失败关闭", "升级到客户", "升级到客户和销售机会"] |
| | | this.value = "失败关闭" |
| | | this.value1 = "失败关闭" |
| | | } else if (status === -1) { |
| | | this.options = ["升级到客户", "升级到客户和销售机会"] |
| | | this.value = "升级到客户" |
| | | this.value1 = "升级到客户" |
| | | } |
| | | }, |
| | | handleClose() { |
| | |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.search_map = { |
| | | [val]: content |
| | | [val.value]: content |
| | | } |
| | | this.getData() |
| | | }, |
| | |
| | | { label: "合计", prop: "tptal" } // 合计 |
| | | ] |
| | | } |
| | | } else if (this.editConfig.title === "报价单") { |
| | | this.tableList = { |
| | | tableInfomation: this.editConfig.tableInfomation, |
| | | tableColumn: [ |
| | | { label: "报价单号", prop: "number", isClick: true }, // 报价单号 |
| | | { label: "销售负责人", prop: "memberId" } // 销售负责人 |
| | | ] |
| | | } |
| | | } else if (this.editConfig.title === "客户服务单") { |
| | | this.tableList = { |
| | | tableInfomation: this.editConfig.tableInfomation, |
| | | tableColumn: [ |
| | | { label: "服务单编号", prop: "serviceNumber", isClick: true }, // 服务单编号 |
| | | { label: "主题", prop: "subject" }, // 主题 |
| | | { label: "服务方式", prop: "serviceType_name" }, // 服务方式 |
| | | { label: "服务人员", prop: "serviceManId" }, // 服务人员 |
| | | { label: "优先级别", prop: "priorityLevelId" }, // 优先级别 |
| | | { label: "处理状态", prop: "status" }, // 处理状态 |
| | | { label: "客户签名", prop: "qianming" } // 客户签名 |
| | | ] |
| | | } |
| | | } |
| | | |
| | | this.commonOptions = [{ id: 1, name: "全部字段" }] |
| | |
| | | this.$emit("selClient", row, "serviceContract") |
| | | } else if (this.editConfig.title === "销售明细单") { |
| | | this.$emit("selClient", row, "contract") |
| | | } else if (this.editConfig.title === "报价单") { |
| | | this.$emit("selClient", row, "quotation") |
| | | } else if (this.editConfig.title === "客户服务单") { |
| | | this.$emit("selClient", row, "customService") |
| | | } |
| | | } |
| | | } |
| | |
| | | class="common-select-sel" |
| | | size="mini" |
| | | > |
| | | <!-- @focus="getFaultTypeList" --> |
| | | <el-option v-for="item in faultTypeOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | :edit-common-config="editSelectClientConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 选择服务合同 --> |
| | | <!-- 选择服务合同 合同订单 --> |
| | | <SelectCommonDialog |
| | | v-if="editSelCommonConfig.editVisible" |
| | | :edit-common-config="editSelCommonConfig" |
| | |
| | | } |
| | | }, |
| | | getCommonData() { |
| | | getAllData() |
| | | .then((res) => { |
| | | this.memberOptions = res.data.member |
| | | this.serviceManOptions = res.data.member |
| | | this.reportSourceOptions = res.data.reportSource |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | getAllData().then((res) => { |
| | | this.memberOptions = res.data.member |
| | | this.serviceManOptions = res.data.member |
| | | this.reportSourceOptions = res.data.reportSource |
| | | }) |
| | | this.getServiceTypeList() |
| | | }, |
| | | // 保存 |
| | | saveClick(formName) { |
| | |
| | | } |
| | | }, |
| | | // 故障类别 |
| | | async getFaultTypeList(e) { |
| | | if (e) { |
| | | await getFaultTypeList() |
| | | .then((res) => { |
| | | console.log(res) |
| | | this.faultTypeOptions = res.data.data |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | } |
| | | async getFaultTypeList() { |
| | | await getFaultTypeList().then((res) => { |
| | | console.log(res) |
| | | this.faultTypeOptions = res.data.data |
| | | }) |
| | | }, |
| | | // 服务方式 |
| | | async getServiceTypeList() { |
| | |
| | | <div class="content-title">{{ item.leftStr + ":" }}</div> |
| | | <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> |
| | | </div> |
| | | <div class="right"> |
| | | <div v-if="item.rightStr" class="right"> |
| | | <div class="content-title">{{ item.rightStr }}</div> |
| | | <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> |
| | | </div> |
| | |
| | | <div class="content-title">{{ item.leftStr + ":" }}</div> |
| | | <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> |
| | | </div> |
| | | <div class="right"> |
| | | <div v-if="item.rightStr" class="right"> |
| | | <div class="content-title">{{ item.rightStr }}</div> |
| | | <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> |
| | | </div> |
| | |
| | | <div class="content-title">{{ item.leftStr + ":" }}</div> |
| | | <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> |
| | | </div> |
| | | <div class="right"> |
| | | <div v-if="item.rightStr" class="right"> |
| | | <div class="content-title">{{ item.rightStr }}</div> |
| | | <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> |
| | | </div> |
| | |
| | | ref="searchCommonView" |
| | | :query-class-options="queryClassOptions" |
| | | :search-options="searchOptions" |
| | | :search-sel="searchSel" |
| | | @searchClick="searchClick" |
| | | @resetClick="resetClick" |
| | | /> |
| | | <div class="btn-pager"> |
| | | <PublicFunctionBtnView :receive="true" :submit-approval="true" :operates-list="operatesList" /> |
| | | <PublicFunctionBtnView |
| | | :receive="true" |
| | | :submit-approval="true" |
| | | :operates-list="operatesList" |
| | | @batchDelete="delClick" |
| | | /> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | |
| | | :select-box="!isDetail" |
| | | @selClientClick="selClientClick" |
| | | @selCommonClick="selCommonClick" |
| | | @getSelectArray="getSelectArray" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="90"> |
| | | <el-table-column label="操作" width="60"> |
| | | <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> |
| | |
| | | clientDeail: { |
| | | visible: false, |
| | | infomation: {} |
| | | } |
| | | }, |
| | | searchSel: { |
| | | value: "serviceNumber", |
| | | label: "服务单编号" |
| | | }, |
| | | selValueList: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.searchOptions = [] |
| | | for (let i = 0; i < this.tableList.tableColumn.length; i++) { |
| | | const label = this.tableList.tableColumn[i].label |
| | | this.searchOptions.push({ value: (i + 1).toString(), label: label }) |
| | | const value = this.tableList.tableColumn[i].prop |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | async getData(keyword, keywordType) { |
| | | this.loading = true |
| | | await getServiceOrderList() |
| | | await getServiceOrderList({ |
| | | keyword: keyword, |
| | | keywordType: keywordType, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | |
| | | tabsClick(tab, event) { |
| | | console.log(tab, event) |
| | | }, |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.getData(content, val.label) |
| | | }, |
| | | resetClick() { |
| | | this.search_map = {} |
| | | this.getData() |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | |
| | | this.editConfig.infomation = { ...row } |
| | | }, |
| | | // 删除 |
| | | delClick(id) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(function () { |
| | | return getDelServiceOrder({ id: id }) |
| | | delClick() { |
| | | if (this.selValueList && this.selValueList.length > 0) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | | } else { |
| | | this.$message.warning("删除失败") |
| | | } |
| | | }) |
| | | .catch(function () {}) |
| | | .then(() => { |
| | | getDelServiceOrder({ ids: this.selValueList }).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | | } else { |
| | | this.$message.warning("删除失败") |
| | | } |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | } else { |
| | | this.$message.warning("请至少选择一条记录") |
| | | } |
| | | }, |
| | | getSelectArray(val) { |
| | | console.log(val) |
| | | this.selValueList = [] |
| | | const list = val.map((item) => { |
| | | return item.id |
| | | }) |
| | | this.selValueList = list |
| | | }, |
| | | // 客户名称详情 |
| | | 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.Client.name, |
| | | client_level: row.Client.client_level.name, |
| | | client_status: row.Client.client_status.name |
| | | } |
| | | }, |
| | | // 客户服务单详情 |
| | | selCommonClick(row) { |
| | |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.client_name" |
| | | :fetch-suggestions="querySearchAsync" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'client') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient" |
| | | @select="handleSelectClient('client', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick"> |
| | | <div class="common-select-btn" @click="selClientClick('client')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient"> |
| | | <div class="common-select-btn" @click="clearupClient('client')"> |
| | | <i class="el-icon-edit-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系人姓名" prop="contactId"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.contactId"></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> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.contact_name" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'contact') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('contact', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('contact')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient('contact')"> |
| | | <i class="el-icon-edit-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售机会" prop="saleChanceId"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.saleChanceId"></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> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.sale_chance_name" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'chance') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('chance', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('chance')"> |
| | | <i class="el-icon-circle-plus-outline"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient('chance')"> |
| | | <i class="el-icon-edit-outline"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="合同订单" prop="contractId"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.contractId"></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> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.contract_number" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'contract') |
| | | } |
| | | " |
| | | value-key="number" |
| | | @select="handleSelectClient('contract', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('contract')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient('contract')"> |
| | | <i class="el-icon-edit-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="报价单" prop="quotationId"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.quotationId"></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> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.quotation_number" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'quotation') |
| | | } |
| | | " |
| | | value-key="number" |
| | | @select="handleSelectClient('quotation', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('quotation')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient('quotation')"> |
| | | <i class="el-icon-edit-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="签约日期" prop="signTime"> |
| | | <el-date-picker v-model="editConfig.infomation.signTime" type="date" placeholder="选择日期"> |
| | | <el-date-picker |
| | | v-model="editConfig.infomation.signTime" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="服务开始日期" prop="startTime"> |
| | | <el-date-picker v-model="editConfig.infomation.startTime" type="date" placeholder="选择日期"> |
| | | <el-date-picker |
| | | v-model="editConfig.infomation.startTime" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="服务到期日" prop="endTime"> |
| | | <el-date-picker v-model="editConfig.infomation.endTime" type="date" placeholder="选择日期"> |
| | | <el-date-picker |
| | | v-model="editConfig.infomation.endTime" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | :edit-common-config="editSelectClientConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 选择联系人 --> |
| | | <SelectContactDialog |
| | | v-if="editSelectContactConfig.editVisible" |
| | | :edit-common-config="editSelectContactConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 选择销售机会 --> |
| | | <SelectChanceDialog |
| | | v-if="editSelectChanceConfig.editVisible" |
| | | :edit-common-config="editSelectChanceConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 合同订单 --> |
| | | <SelectCommonDialog |
| | | v-if="editSelCommonConfig.editVisible" |
| | | :edit-common-config="editSelCommonConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | import { getAllData } from "@/api/client/client" |
| | | import { getAddServiceContract, getUpdateServiceContract } from "@/api/serviceManage/serviceContract" |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog" |
| | | import SelectChanceDialog from "@/views/other/commonDialog/SelectChanceDialog" |
| | | import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" |
| | | export default { |
| | | name: "AddServiceContractDialog", |
| | | props: { |
| | |
| | | } |
| | | } |
| | | }, |
| | | components: { CommonFormTableView, SelectClientDialog }, |
| | | components: { CommonFormTableView, SelectClientDialog, SelectContactDialog, SelectChanceDialog, SelectCommonDialog }, |
| | | computed: { |
| | | searchCommonHeight() { |
| | | return this.$refs.searchCommonView.offsetHeight |
| | | }, |
| | | clientList() { |
| | | return this.$store.state.getClientName.clientList |
| | | }, |
| | | contactNamelist() { |
| | | return this.$store.state.getClientName.contactNamelist |
| | | }, |
| | | saleChancelist() { |
| | | return this.$store.state.getClientName.saleChancelist |
| | | }, |
| | | salesDetailsList() { |
| | | return this.$store.state.getClientName.salesDetailsList |
| | | }, |
| | | quotationList() { |
| | | return this.$store.state.getClientName.quotationList |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | } |
| | | }, |
| | | editSelectContactConfig: { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | editSelectChanceConfig: { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | editSelCommonConfig: { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | clientId: this.editCommonConfig.infomation.clientId, |
| | | contactId: this.editCommonConfig.infomation.contactId, |
| | | saleChanceId: this.editCommonConfig.infomation.saleChanceId, |
| | | contractId: this.editCommonConfig.infomation.salesDetailsId, |
| | | quotationId: this.editCommonConfig.infomation.quotationId |
| | | } |
| | | }, |
| | | created() { |
| | | this.$store.dispatch("geClient") |
| | | this.$store.dispatch("geContact") |
| | | this.$store.dispatch("geChance") |
| | | this.$store.dispatch("geSalesDetails") |
| | | this.$store.dispatch("geQuotation") |
| | | this.setTableForm() |
| | | this.getCommonData() |
| | | }, |
| | |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddServiceContract(params) |
| | | .then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | message: "添加成功", |
| | | type: "success" |
| | | }) |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | getAddServiceContract(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("添加成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } else { |
| | | getUpdateServiceContract(params) |
| | | .then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | message: "编辑成功", |
| | | type: "success" |
| | | }) |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | getUpdateServiceContract(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("编辑成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | console.log("error submit") |
| | |
| | | let data = this.editConfig.infomation |
| | | let params = { |
| | | id: this.editConfig.title === "新建" ? 0 : data.id, |
| | | clientId: parseInt(data.clientId) || 0, |
| | | contactId: data.contactId || 0, |
| | | contractId: data.contractId || 0, |
| | | clientId: this.clientId || 0, |
| | | contactId: this.contactId || 0, |
| | | endTime: data.endTime || "", |
| | | memberId: data.memberId || 0, |
| | | number: data.number || "", |
| | |
| | | total: 0 |
| | | } |
| | | ], |
| | | quotationId: data.quotationId || 0, |
| | | quotationId: this.quotationId || 0, |
| | | remark: data.remark || "", |
| | | saleChanceId: data.saleChanceId || 0, |
| | | saleChanceId: this.saleChanceId || 0, |
| | | salesDetailsId: this.contractId || 0, |
| | | serviceTimes: data.serviceTimes || 0, |
| | | signTime: data.signTime || "", |
| | | startTime: data.startTime || "", |
| | |
| | | } |
| | | return params |
| | | }, |
| | | |
| | | handleClose() { |
| | | this.editConfig.visible = false |
| | | }, |
| | | // 选择客户相关方法 |
| | | querySearchAsync(queryString, cb) { |
| | | var restaurants = this.clientList |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants |
| | | querySearchAsync(queryString, cb, value) { |
| | | var restaurants = [] |
| | | if (value === "client") { |
| | | restaurants = this.clientList |
| | | } else if (value === "contact") { |
| | | restaurants = this.contactNamelist |
| | | } else if (value === "chance") { |
| | | restaurants = this.saleChancelist |
| | | } else if (value === "contract") { |
| | | restaurants = this.salesDetailsList |
| | | } else if (value === "quotation") { |
| | | restaurants = this.quotationList |
| | | } |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString, value)) : restaurants |
| | | cb(results) |
| | | }, |
| | | createStateFilter(queryString) { |
| | | createStateFilter(queryString, value) { |
| | | return (state) => { |
| | | return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | if (value === "contract" || value === "quotation") { |
| | | return state.number.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | } else { |
| | | return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | } |
| | | } |
| | | }, |
| | | handleSelectClient(item) { |
| | | this.editConfig.infomation.client_id = item.id |
| | | handleSelectClient(value, item) { |
| | | console.log(value) |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | } else if (value === "contact") { |
| | | this.contactId = item.id |
| | | } else if (value === "chance") { |
| | | this.saleChanceId = item.id |
| | | } else if (value === "contract") { |
| | | this.contractId = item.id |
| | | } else if (value === "quotation") { |
| | | this.quotationId = item.id |
| | | } |
| | | }, |
| | | selClientClick() { |
| | | this.editSelectClientConfig.editVisible = true |
| | | selClientClick(value) { |
| | | if (value === "client") { |
| | | this.editSelectClientConfig.editVisible = true |
| | | } else if (value === "contact") { |
| | | this.editSelectContactConfig.editVisible = true |
| | | } else if (value === "chance") { |
| | | this.editSelectChanceConfig.editVisible = true |
| | | } else if (value === "contract") { |
| | | this.editSelCommonConfig.title = "销售明细单" |
| | | this.editSelCommonConfig.editVisible = true |
| | | this.editSelCommonConfig.tableInfomation = [...this.salesDetailsList] |
| | | } else if (value === "quotation") { |
| | | this.editSelCommonConfig.title = "报价单" |
| | | this.editSelCommonConfig.editVisible = true |
| | | this.editSelCommonConfig.tableInfomation = [...this.quotationList] |
| | | } |
| | | }, |
| | | selClient(row) { |
| | | console.log(row) |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.editConfig.infomation.client_id = row.id |
| | | selClient(row, value) { |
| | | console.log(value) |
| | | if (value === "contact") { |
| | | this.editConfig.infomation.contact_name = row.name |
| | | this.contactId = row.id |
| | | } else if (value === "client") { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | | } else if (value === "chance") { |
| | | this.editConfig.infomation.sale_chance_name = row.name |
| | | this.saleChanceId = row.id |
| | | } else if (value === "contract") { |
| | | this.editConfig.infomation.contract_number = row.number |
| | | this.contractId = row.id |
| | | } else if (value === "quotation") { |
| | | this.editConfig.infomation.quotation_number = row.number |
| | | this.quotationId = row.id |
| | | } |
| | | }, |
| | | // 清除已选择用户 |
| | | clearupClient() { |
| | | this.editConfig.infomation.client_name = "" |
| | | this.editConfig.infomation.client_id = 0 |
| | | clearupClient(value) { |
| | | if (value === "client") { |
| | | this.editConfig.infomation.client_name = "" |
| | | this.clientId = 0 |
| | | } else if (value === "contact") { |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | | } else if (value === "chance") { |
| | | this.editConfig.infomation.sale_chance_name = "" |
| | | this.saleChanceId = 0 |
| | | } else if (value === "contract") { |
| | | this.editConfig.infomation.contract_number = "" |
| | | this.contractId = 0 |
| | | } else if (value === "quotation") { |
| | | this.editConfig.infomation.quotation_number = "" |
| | | this.quotationId = 0 |
| | | } |
| | | }, |
| | | // 添加附件 |
| | | addAnnexClick() {}, |
| | |
| | | <el-tab-pane label="收款单" name="receipt"></el-tab-pane> |
| | | <el-tab-pane label="客户服务单" name="clientService"> </el-tab-pane> |
| | | <el-tab-pane label="销售发票" name="invoice"></el-tab-pane> |
| | | <el-tab-pane label="销售子单" name="sub"></el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | <div v-if="activeName === 'first'" class="detail"> |
| | |
| | | <li v-for="(item, i) in basicInfoList" :key="i"> |
| | | <div class="left"> |
| | | <div class="content-title">{{ item.leftStr + ":" }}</div> |
| | | <div class="content-data">{{ item.leftValue }}</div> |
| | | <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> |
| | | </div> |
| | | <div class="right"> |
| | | <div v-if="item.rightStr" class="right"> |
| | | <div class="content-title">{{ item.rightStr }}</div> |
| | | <div class="content-data">{{ item.rightValue }}</div> |
| | | <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | |
| | | <li v-for="(item, i) in dynamicInfoList" :key="i"> |
| | | <div class="left"> |
| | | <div class="content-title">{{ item.leftStr + ":" }}</div> |
| | | <div class="content-data">{{ item.leftValue }}</div> |
| | | <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> |
| | | </div> |
| | | <div class="right"> |
| | | <div v-if="item.rightStr" class="right"> |
| | | <div class="content-title">{{ item.rightStr }}</div> |
| | | <div class="content-data">{{ item.rightValue }}</div> |
| | | <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | |
| | | <li> |
| | | <div class="left remark"> |
| | | <div class="content-title">{{ "备注:" }}</div> |
| | | <div class="content-data">{{ "" }}</div> |
| | | <div class="content-data">{{ detailConfig.infomation.remark }}</div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | |
| | | <div v-if="activeName === 'invoice'" class="second"> |
| | | <!-- <FollowupRecords :isDetail="true" /> --> |
| | | </div> |
| | | <div v-if="activeName === 'sub'" class="second"> |
| | | <SubOrder :isDetail="true" /> |
| | | </div> |
| | | </div> |
| | | </el-drawer> |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | import ClientServiceOrder from "@/views/service/clientServiceOrder" |
| | | import SubOrder from "@/views/sales/subOrder" |
| | | import Status from "@/common/const/salesFixedStatus" |
| | | import CommonFormTableView from "@/components/makepager/CommonFormTableView" |
| | | export default { |
| | |
| | | } |
| | | } |
| | | }, |
| | | components: { ClientServiceOrder, SubOrder, CommonFormTableView }, |
| | | components: { ClientServiceOrder, CommonFormTableView }, |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.setData() |
| | | this.setData(this.detailConfig.infomation) |
| | | this.setTableForm() |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | setData() { |
| | | setData(item) { |
| | | this.basicInfoList = [ |
| | | { |
| | | leftStr: "客户名称", |
| | | leftValue: "", |
| | | leftValue: item.client_name, |
| | | rightStr: "服务合同编号", |
| | | rightValue: "" |
| | | rightValue: item.number |
| | | }, |
| | | { |
| | | leftStr: "负责人", |
| | | leftValue: "", |
| | | leftValue: item.memberId, |
| | | rightStr: "联系人姓名", |
| | | rightValue: "" |
| | | rightValue: item.contactId |
| | | }, |
| | | { |
| | | leftStr: "销售机会", |
| | | leftValue: "", |
| | | leftValue: item.SaleChance.name, |
| | | rightStr: "合同订单", |
| | | rightValue: "" |
| | | rightValue: item.salesDetails.number |
| | | }, |
| | | { |
| | | leftStr: "报价单", |
| | | leftValue: "", |
| | | leftValue: item.quotation.number, |
| | | rightStr: "合同类型", |
| | | rightValue: "" |
| | | rightValue: item.serviceContractType |
| | | }, |
| | | { |
| | | leftStr: "合同发起人", |
| | |
| | | }, |
| | | { |
| | | leftStr: "签约日期", |
| | | leftValue: "", |
| | | leftValue: item.signTime, |
| | | rightStr: "服务开始日期", |
| | | rightValue: "" |
| | | rightValue: item.startTime |
| | | }, |
| | | { |
| | | leftStr: "创建人", |
| | | leftValue: "", |
| | | rightStr: "服务到期日", |
| | | rightValue: "" |
| | | rightValue: item.endTime |
| | | }, |
| | | { |
| | | leftStr: "创建时间", |
| | |
| | | leftStr: "审批状态", |
| | | leftValue: "", |
| | | rightStr: "合同状态", |
| | | rightValue: "" |
| | | rightValue: item.serviceContractStatus |
| | | }, |
| | | { |
| | | leftStr: "已服务次数", |
| | | leftValue: "", |
| | | leftValue: item.serviceTimes, |
| | | rightStr: "应服务次数", |
| | | rightValue: "" |
| | | }, |
| | | { |
| | | leftStr: "已收总额", |
| | | leftValue: "", |
| | | leftValue: item.amountReceived, |
| | | rightStr: "应收余额", |
| | | rightValue: "" |
| | | rightValue: item.amountReceivable |
| | | }, |
| | | { |
| | | leftStr: "已开票金额", |
| | | leftValue: "", |
| | | leftValue: item.amountInvoiced, |
| | | rightStr: "未开票金额", |
| | | rightValue: "" |
| | | rightValue: item.amountUnInvoiced |
| | | } |
| | | ] |
| | | }, |
| | |
| | | ref="searchCommonView" |
| | | :query-class-options="queryClassOptions" |
| | | :search-options="searchOptions" |
| | | :search-sel="searchSel" |
| | | @searchClick="searchClick" |
| | | @resetClick="resetClick" |
| | | /> |
| | | <div class="btn-pager"> |
| | | <PublicFunctionBtnView :submit-approval="true" :operates-list="operatesList" /> |
| | | <PublicFunctionBtnView :submit-approval="true" :operates-list="operatesList" @batchDelete="delClick" /> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | |
| | | :select-box="!isDetail" |
| | | @selClientClick="selClientClick" |
| | | @selCommonClick="selCommonClick" |
| | | @getSelectArray="getSelectArray" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="90"> |
| | | <el-table-column label="操作" width="60"> |
| | | <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> |
| | |
| | | clientDeail: { |
| | | visible: false, |
| | | infomation: {} |
| | | } |
| | | }, |
| | | searchSel: { |
| | | value: "number", |
| | | label: "服务合同编号" |
| | | }, |
| | | selValueList: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | tableInfomation: [], |
| | | tableColumn: [ |
| | | { label: "服务合同编号", prop: "number", min: 100, isCommonClick: true }, // 服务合同编号 |
| | | { label: "客户名称", prop: "clientId", min: 120, isClientClick: true }, // 客户名称 |
| | | { label: "客户名称", prop: "client_name", min: 120, isClientClick: true }, // 客户名称 |
| | | { label: "签约日期", prop: "signTime" }, // 签约日期 |
| | | { label: "合同类型", prop: "typeId" }, // 合同类型 |
| | | { label: "合同状态", prop: "serviceContractStatusId" }, // 合同状态 |
| | | { label: "合同类型", prop: "serviceContractType" }, // 合同类型 |
| | | { label: "合同状态", prop: "serviceContractStatus" }, // 合同状态 |
| | | { label: "负责人", prop: "memberId" }, // 负责人 |
| | | { label: "产品名称", prop: "productName" }, // 产品名称 |
| | | { label: "服务开始日", prop: "startTime" }, // 服务开始日 |
| | |
| | | this.searchOptions = [] |
| | | for (let i = 0; i < this.tableList.tableColumn.length; i++) { |
| | | const label = this.tableList.tableColumn[i].label |
| | | this.searchOptions.push({ value: (i + 1).toString(), label: label }) |
| | | const value = this.tableList.tableColumn[i].prop |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | async getData(keyword, keywordType) { |
| | | this.loading = true |
| | | await getServiceContractList({ |
| | | keyword: "", |
| | | keyword: keyword, |
| | | keywordType: keywordType, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | return { |
| | | ...item |
| | | ...item, |
| | | client_name: item.client.name, |
| | | serviceContractStatus: item.serviceContractStatus.name, |
| | | serviceContractType: item.serviceContractType.name |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.getData(content, val.label) |
| | | }, |
| | | resetClick() { |
| | | this.search_map = {} |
| | | this.getData() |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | |
| | | this.editConfig.infomation = { ...row } |
| | | }, |
| | | // 删除 |
| | | delClick(id) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(function () { |
| | | return getDelServiceContract({ id: id }) |
| | | delClick() { |
| | | if (this.selValueList && this.selValueList.length > 0) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | | } else { |
| | | this.$message.warning("删除失败") |
| | | } |
| | | }) |
| | | .catch(function () {}) |
| | | .then(() => { |
| | | getDelServiceContract({ ids: this.selValueList }).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | | } else { |
| | | this.$message.warning("删除失败") |
| | | } |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | } else { |
| | | this.$message.warning("请至少选择一条记录") |
| | | } |
| | | }, |
| | | getSelectArray(val) { |
| | | console.log(val) |
| | | this.selValueList = [] |
| | | const list = val.map((item) => { |
| | | return item.id |
| | | }) |
| | | this.selValueList = list |
| | | }, |
| | | // 客户名称详情 |
| | | 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.client.name, |
| | | client_level: row.client.client_level.name, |
| | | client_status: row.client.client_status.name |
| | | } |
| | | }, |
| | | // 服务合同详情 |
| | | selCommonClick(row) { |
| | |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.client_name" |
| | | :fetch-suggestions="querySearchAsync" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'client') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient" |
| | | @select="handleSelectClient('client', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick"> |
| | | <div class="common-select-btn" @click="selClientClick('client')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient"> |
| | | <div class="common-select-btn" @click="clearupClient('client')"> |
| | | <i class="el-icon-edit-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系人姓名" prop="contactId"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.contactId"></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> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.contact_name" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'contact') |
| | | } |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('contact', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('contact')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient('contact')"> |
| | | <i class="el-icon-edit-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="客户服务单" prop="customServiceForm"> |
| | | <el-form-item label="客户服务单" prop="service_number"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.customServiceForm"></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> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.service_number" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'customService') |
| | | } |
| | | " |
| | | value-key="serviceNumber" |
| | | @select="handleSelectClient('customService', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('customService')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div class="common-select-btn" @click="clearupClient('customService')"> |
| | | <i class="el-icon-edit-outline" title="清除"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | :edit-common-config="editSelectClientConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 选择联系人 --> |
| | | <SelectContactDialog |
| | | v-if="editSelectContactConfig.editVisible" |
| | | :edit-common-config="editSelectContactConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 客户服务订单 --> |
| | | <SelectCommonDialog |
| | | v-if="editSelCommonConfig.editVisible" |
| | | :edit-common-config="editSelCommonConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | import { getAllData } from "@/api/client/client" |
| | | import { getAddServiceFollowup, getUpdateServiceFollowup } from "@/api/serviceManage/serviceFollowup" |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog" |
| | | import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" |
| | | export default { |
| | | name: "AddServiceFollowupDialog", |
| | | props: { |
| | |
| | | } |
| | | } |
| | | }, |
| | | components: { SelectClientDialog }, |
| | | components: { SelectClientDialog, SelectContactDialog, SelectCommonDialog }, |
| | | computed: { |
| | | searchCommonHeight() { |
| | | return this.$refs.searchCommonView.offsetHeight |
| | | }, |
| | | clientList() { |
| | | return this.$store.state.getClientName.clientList |
| | | }, |
| | | contactNamelist() { |
| | | return this.$store.state.getClientName.contactNamelist |
| | | }, |
| | | serviceOrderList() { |
| | | return this.$store.state.getClientName.serviceOrderList |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | } |
| | | }, |
| | | editSelectContactConfig: { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | editSelCommonConfig: { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | clientId: this.editCommonConfig.infomation.clientId, |
| | | contactId: this.editCommonConfig.infomation.contactId, |
| | | serviceId: this.editCommonConfig.infomation.serviceId |
| | | } |
| | | }, |
| | | created() { |
| | | this.$store.dispatch("geClient") |
| | | this.$store.dispatch("geContact") |
| | | this.$store.dispatch("geServiceOrder") |
| | | this.getCommonData() |
| | | }, |
| | | methods: { |
| | |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddServiceFollowup(params) |
| | | .then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | message: "添加成功", |
| | | type: "success" |
| | | }) |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | getAddServiceFollowup(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("添加成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } else { |
| | | getUpdateServiceFollowup(params) |
| | | .then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | message: "编辑成功", |
| | | type: "success" |
| | | }) |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | getUpdateServiceFollowup(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("编辑成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | console.log("error submit") |
| | |
| | | let data = this.editConfig.infomation |
| | | let params = { |
| | | id: this.editConfig.title === "新建" ? 0 : data.id, |
| | | clientId: data.clientId || 0, |
| | | contactId: data.contactId || 0, |
| | | clientId: this.clientId || 0, |
| | | contactId: this.contactId || 0, |
| | | file: data.file || "", |
| | | isVisit: data.isVisit || 0, |
| | | memberId: data.memberId || 0, |
| | |
| | | planId: data.planId || 0, |
| | | remark: data.remark || "", |
| | | satisfaction: data.satisfaction || 0, |
| | | serviceId: data.serviceId || 0, |
| | | serviceId: this.serviceId || 0, |
| | | solveRate: data.solveRate || 0, |
| | | timelyRate: data.timelyRate || 0 |
| | | } |
| | |
| | | this.editConfig.visible = false |
| | | }, |
| | | // 选择客户相关方法 |
| | | querySearchAsync(queryString, cb) { |
| | | var restaurants = this.clientList |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants |
| | | querySearchAsync(queryString, cb, value) { |
| | | var restaurants = [] |
| | | if (value === "client") { |
| | | restaurants = this.clientList |
| | | } else if (value === "contact") { |
| | | restaurants = this.contactNamelist |
| | | } else if (value === "customService") { |
| | | console.log(this.serviceOrderList) |
| | | restaurants = this.serviceOrderList |
| | | } |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString, value)) : restaurants |
| | | cb(results) |
| | | }, |
| | | createStateFilter(queryString) { |
| | | createStateFilter(queryString, value) { |
| | | return (state) => { |
| | | return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | if (value === "customService") { |
| | | return state.serviceNumber.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | } else { |
| | | return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | } |
| | | } |
| | | }, |
| | | handleSelectClient(item) { |
| | | this.editConfig.infomation.client_id = item.id |
| | | handleSelectClient(value, item) { |
| | | console.log(value) |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | } else if (value === "contact") { |
| | | this.contactId = item.id |
| | | } else if (value === "customService") { |
| | | this.serviceId = item.id |
| | | } |
| | | }, |
| | | selClientClick() { |
| | | this.editSelectClientConfig.editVisible = true |
| | | selClientClick(value) { |
| | | if (value === "client") { |
| | | this.editSelectClientConfig.editVisible = true |
| | | } else if (value === "contact") { |
| | | this.editSelectContactConfig.editVisible = true |
| | | } else if (value === "customService") { |
| | | this.editSelCommonConfig.title = "客户服务单" |
| | | this.editSelCommonConfig.editVisible = true |
| | | this.editSelCommonConfig.tableInfomation = [...this.serviceOrderList] |
| | | } |
| | | }, |
| | | selClient(row) { |
| | | console.log(row) |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.editConfig.infomation.client_id = row.id |
| | | selClient(row, value) { |
| | | console.log(value) |
| | | if (value === "contact") { |
| | | this.editConfig.infomation.contact_name = row.name |
| | | this.contactId = row.id |
| | | } else if (value === "client") { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | | } else if (value === "customService") { |
| | | this.editConfig.infomation.service_number = row.serviceNumber |
| | | this.serviceId = row.id |
| | | } |
| | | }, |
| | | // 清除已选择用户 |
| | | clearupClient() { |
| | | this.editConfig.infomation.client_name = "" |
| | | this.editConfig.infomation.client_id = 0 |
| | | clearupClient(value) { |
| | | if (value === "client") { |
| | | this.editConfig.infomation.client_name = "" |
| | | this.clientId = 0 |
| | | } else if (value === "contact") { |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | | } else if (value === "customService") { |
| | | this.editConfig.infomation.service_number = "" |
| | | this.serviceId = 0 |
| | | } |
| | | }, |
| | | // 添加附件 |
| | | addAnnexClick() {}, |
| | |
| | | <li v-for="(item, i) in basicInfoList" :key="i"> |
| | | <div class="left"> |
| | | <div class="content-title">{{ item.leftStr + ":" }}</div> |
| | | <div class="content-data">{{ item.leftValue }}</div> |
| | | <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> |
| | | </div> |
| | | <div class="right"> |
| | | <div v-if="item.rightStr" class="right"> |
| | | <div class="content-title">{{ item.rightStr }}</div> |
| | | <div class="content-data">{{ item.rightValue }}</div> |
| | | <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.setData() |
| | | this.setData(this.detailConfig.infomation) |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | setData() { |
| | | setData(item) { |
| | | this.basicInfoList = [ |
| | | { |
| | | leftStr: "客户名称", |
| | | leftValue: "", |
| | | leftValue: item.client_name, |
| | | rightStr: "回访单编号", |
| | | rightValue: "" |
| | | rightValue: item.number |
| | | }, |
| | | { |
| | | leftStr: "联系人姓名", |
| | | leftValue: "", |
| | | leftValue: item.contact_name, |
| | | rightStr: "客户服务单", |
| | | rightValue: "" |
| | | rightValue: item.ServiceOrder.serviceNumber |
| | | }, |
| | | { |
| | | leftStr: "回访人", |
| | | leftValue: "", |
| | | leftValue: item.isVisit, |
| | | rightStr: "项目计划", |
| | | rightValue: "" |
| | | }, |
| | | { |
| | | leftStr: "满意度", |
| | | leftValue: "", |
| | | leftValue: item.satisfaction, |
| | | rightStr: "及时率", |
| | | rightValue: "" |
| | | rightValue: item.timelyRate |
| | | }, |
| | | { |
| | | leftStr: "解决率", |
| | |
| | | ref="searchCommonView" |
| | | :query-class-options="queryClassOptions" |
| | | :search-options="searchOptions" |
| | | :search-sel="searchSel" |
| | | @searchClick="searchClick" |
| | | @resetClick="resetClick" |
| | | /> |
| | | <div class="btn-pager"> |
| | | <PublicFunctionBtnView :import-button="false" :operates-list="operatesList" /> |
| | | <PublicFunctionBtnView :import-button="false" :operates-list="operatesList" @batchDelete="delClick" /> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | |
| | | @selCommonClick="selCommonClick" |
| | | @selContactsClick="selContactsClick" |
| | | @selServiceOrderClick="selServiceOrderClick" |
| | | @getSelectArray="getSelectArray" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="90"> |
| | | <el-table-column label="操作" width="60"> |
| | | <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> |
| | |
| | | clientServiceDetail: { |
| | | visible: false, |
| | | infomation: {} |
| | | } |
| | | }, |
| | | searchSel: { |
| | | value: "number", |
| | | label: "回访单编号" |
| | | }, |
| | | selValueList: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | tableInfomation: [], |
| | | tableColumn: [ |
| | | { label: "回访单编号", prop: "number", min: 80, isCommonClick: true }, // 回访单编号 |
| | | { label: "客户名称", prop: "clientId", min: 130, isClientClick: true }, // 客户名称 |
| | | { label: "联系人姓名", prop: "contactId", isContactClick: true }, // 联系人姓名 |
| | | { label: "客户服务单", prop: "serviceId", isServiceOrder: true }, // 客户服务单 |
| | | { label: "客户名称", prop: "client_name", min: 130, isClientClick: true }, // 客户名称 |
| | | { label: "联系人姓名", prop: "contact_name", isContactClick: true }, // 联系人姓名 |
| | | { label: "客户服务单", prop: "client_service_order", isServiceOrder: true }, // 客户服务单 |
| | | { label: "回访人", prop: "isVisit" }, // 回访人 |
| | | { label: "满意度", prop: "satisfaction" } // 满意度 |
| | | // { label: "修改时间", prop: "modifyTime" } // 修改时间 |
| | |
| | | this.searchOptions = [] |
| | | for (let i = 0; i < this.tableList.tableColumn.length; i++) { |
| | | const label = this.tableList.tableColumn[i].label |
| | | this.searchOptions.push({ value: (i + 1).toString(), label: label }) |
| | | const value = this.tableList.tableColumn[i].prop |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | async getData(keyword, keywordType) { |
| | | this.loading = true |
| | | await getServiceFollowupList({ |
| | | keyword: "", |
| | | keyword: keyword, |
| | | keywordType: keywordType, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | return { |
| | | ...item |
| | | ...item, |
| | | client_service_order: item.ServiceOrder.serviceNumber, |
| | | client_name: item.client.name, |
| | | contact_name: item.contact.name |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.getData(content, val.label) |
| | | }, |
| | | resetClick() { |
| | | this.search_map = {} |
| | | this.getData() |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | |
| | | this.editConfig.infomation = { ...row } |
| | | }, |
| | | // 删除 |
| | | delClick(id) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(function () { |
| | | return getDelServiceFollowup({ id: id }) |
| | | delClick() { |
| | | if (this.selValueList && this.selValueList.length > 0) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | | } else { |
| | | this.$message.warning("删除失败") |
| | | } |
| | | }) |
| | | .catch(function () {}) |
| | | .then(() => { |
| | | getDelServiceFollowup({ ids: this.selValueList }).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | | } else { |
| | | this.$message.warning("删除失败") |
| | | } |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | } else { |
| | | this.$message.warning("请至少选择一条记录") |
| | | } |
| | | }, |
| | | getSelectArray(val) { |
| | | console.log(val) |
| | | this.selValueList = [] |
| | | const list = val.map((item) => { |
| | | return item.id |
| | | }) |
| | | this.selValueList = list |
| | | }, |
| | | // 客户名称详情 |
| | | 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.client.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) { |
| | |
| | | selServiceOrderClick(row) { |
| | | console.log(row) |
| | | this.clientServiceDetail.visible = true |
| | | this.clientServiceDetail.infomation = { ...row } |
| | | this.clientServiceDetail.infomation = { ...row.ServiceOrder } |
| | | } |
| | | } |
| | | } |