From cec4ac45eec874e3ebb4ea46b66a0e5c8c3bb26b Mon Sep 17 00:00:00 2001 From: datang Date: Tue, 7 Mar 2023 16:46:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=BE=93=E5=8D=95=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/crm/business/Detail.vue | 94 +++++++++++++++++++++++++++---- 1 file changed, 82 insertions(+), 12 deletions(-) diff --git a/src/views/crm/business/Detail.vue b/src/views/crm/business/Detail.vue index 38c721b..a58673a 100644 --- a/src/views/crm/business/Detail.vue +++ b/src/views/crm/business/Detail.vue @@ -177,7 +177,7 @@ import { crmBusinessAdvanceAPI, crmBusinessStatusByIdAPI } from '@/api/crm/business' - +import { userListAPI } from '@/api/common' import SlideView from '@/components/SlideView' import CRMDetailHead from '../components/CRMDetailHead' import Activity from '../components/Activity' // 活动 @@ -241,6 +241,9 @@ export default { data() { return { // 展示加载loading + userOptions: [], + value: '', + inputValue: '', loading: false, crmType: 'business', headDetails: [ @@ -397,11 +400,37 @@ export default { }] } }, - mounted() {}, + mounted() { + this.getUserList() + }, methods: { /** * 详情 */ + getUserList() { + this.userLoading = true + let request = userListAPI + let params = {} + if (this.userRequest) { + request = this.userRequest + params = this.userParams || {} + } else { + params = { pageType: 0 } + } + request(params) + .then(res => { + const userList = res.data.list || res.data + console.log(userList) + this.userOptions = userList.map(item => { + return item + }) + console.log(this.userOptions) + this.userLoading = false + }) + .catch(() => { + this.userLoading = false + }) + }, getDetial() { this.firstContactsId = '' this.loading = true @@ -566,21 +595,52 @@ export default { } /** 输单 和 无效 */ if (item.type == 2 || item.type == 3) { - var message = '请填写' + item.name + '原因:' + var message = '请填写' + item.name + '原因:' var title = item.name + '原因' - // this.$prompt(message, title, { - // inputType: 'text', - // confirmButtonText: '确定', - // cancelButtonText: '取消' - // }) const h = this.$createElement + const msgBoxContent = h('div', [ + h('p', message), + h('textarea', { + attrs: { + class: 'el-textarea__inner', + type: 'textarea', + autocomplete: 'off', + rows: 4 + }, + value: this.inputValue + }), + h('p', '审核人:'), + h('el-select', { + ref: 'selectView', + props: { + clearable: true, + filterable: true, + placeholder: '请选择', + value: this.value + }, + on: { + input: val => { + this.value = val + console.log(val) + }, + change: e => { + this.value = e + this.$refs['selectView'].value = e + } + } + }, this.userOptions.map(option => { + return h('el-option', { + props: { + value: option.id, + label: option.username + } + }) + })) + ]) this.$msgbox({ title: title, - message: h('p', message, [ - h('i', { style: 'color: teal' }, 'VNode'), - h('') - ]), + message: msgBoxContent, showCancelButton: true, confirmButtonText: '确定', cancelButtonText: '取消' @@ -652,6 +712,12 @@ export default { console.log('ok') this.$emit('handle', { type: 'save-success' }) this.getDetial() + }, + /** + * 刷新value的值 + */ + updateVal(val) { + this.value = val } } } @@ -870,5 +936,9 @@ export default { .state-handel-item:hover { background-color: #f7f8fa; } + .el-textarea__inner{ + width: max-content; + border: 1px solid #C0C4CC; + } } From 91c3b62ea372bca02be9e8107222686ae721825a Mon Sep 17 00:00:00 2001 From: datang Date: Wed, 8 Mar 2023 09:59:07 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/crm/business/Detail.vue | 16 +++++++++++++--- src/views/crm/customer/Detail.vue | 23 ++++++++++++++++++----- src/views/crm/message/index.vue | 1 - 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/views/crm/business/Detail.vue b/src/views/crm/business/Detail.vue index a58673a..c529dfe 100644 --- a/src/views/crm/business/Detail.vue +++ b/src/views/crm/business/Detail.vue @@ -113,7 +113,7 @@ :record-id="detailData.flow_id" :owner-user-id="detailData.owner_user_id" class="examine-info" - examine-type="crm_contract" + examine-type="crm_business" @on-handle="examineHandle"/> @@ -190,7 +190,7 @@ import RelativeTeam from '../components/RelativeTeam' // 团队成员 import RelativeProduct from '../components/RelativeProduct' // 团队成员 import RelativeFiles from '../components/RelativeFiles' // 相关附件 import RelativePrint from '../components/RelativePrint' // 相关打印 - +import ExamineInfo from '@/components/Examine/ExamineInfo' import CRMAllCreate from '../components/CRMAllCreate' // 新建页面 import DetailMixin from '../mixins/Detail' import { separator } from '@/filters/vueNumeralFilter/filters' @@ -211,6 +211,7 @@ export default { RelativeProduct, RelativeFiles, RelativePrint, + ExamineInfo, CRMAllCreate }, mixins: [DetailMixin], @@ -424,7 +425,6 @@ export default { this.userOptions = userList.map(item => { return item }) - console.log(this.userOptions) this.userLoading = false }) .catch(() => { @@ -694,6 +694,16 @@ export default { .catch(() => {}) } }, + /** + * 审核操作 + */ + examineHandle(data) { + // 1 审核通过 2 审核拒绝 4 已撤回 + if (data.type == 1) { + this.getDetial() + } + this.$emit('handle', { type: 'examine' }) + }, /** * 新建 */ diff --git a/src/views/crm/customer/Detail.vue b/src/views/crm/customer/Detail.vue index 144b58c..d440d4e 100644 --- a/src/views/crm/customer/Detail.vue +++ b/src/views/crm/customer/Detail.vue @@ -32,6 +32,7 @@ @close="hideView">