| | |
| | | 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: { |
| | |
| | | { label: "签约日期", prop: "signTime" }, // 签约日期 |
| | | { label: "合同类型", prop: "serviceContractType" }, // 合同类型 |
| | | { label: "合同状态", prop: "serviceContractStatus" }, // 合同状态 |
| | | { label: "负责人", prop: "memberId" }, // 负责人 |
| | | { label: "负责人", prop: "member_name" }, // 负责人 |
| | | { label: "产品名称", prop: "productName" }, // 产品名称 |
| | | { label: "服务开始日", prop: "startTime" }, // 服务开始日 |
| | | { label: "服务到期日", prop: "endTime" }, // 服务到期日 |
| | |
| | | } |
| | | }, |
| | | // 请求数据 |
| | | 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 |
| | | }) |
| | |
| | | ...item, |
| | | client_name: item.client.name, |
| | | serviceContractStatus: item.serviceContractStatus.name, |
| | | serviceContractType: item.serviceContractType.name |
| | | serviceContractType: item.serviceContractType.name, |
| | | member_name: item.member.username |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | |
| | | }, |
| | | // 搜索 |
| | | 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) { |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "编辑" |
| | | this.editConfig.infomation = { ...row } |
| | | this.editConfig.infomation = { |
| | | ...row, |
| | | contract_number: row.salesDetails.number, |
| | | quotation_number: row.quotation.number |
| | | } |
| | | }, |
| | | // 删除 |
| | | delClick() { |
| | |
| | | ...row.client, |
| | | client_name: row.client.name, |
| | | client_level: row.client.client_level.name, |
| | | client_status: row.client.client_status.name |
| | | client_status: row.client.client_status.name, |
| | | contact_name: row.contact.name |
| | | } |
| | | }, |
| | | // 服务合同详情 |