输单原因审核

master_merge
戴余标 2 years ago
parent 293a193b86
commit cec4ac45ee

@ -177,7 +177,7 @@ import {
crmBusinessAdvanceAPI, crmBusinessAdvanceAPI,
crmBusinessStatusByIdAPI crmBusinessStatusByIdAPI
} from '@/api/crm/business' } from '@/api/crm/business'
import { userListAPI } from '@/api/common'
import SlideView from '@/components/SlideView' import SlideView from '@/components/SlideView'
import CRMDetailHead from '../components/CRMDetailHead' import CRMDetailHead from '../components/CRMDetailHead'
import Activity from '../components/Activity' // import Activity from '../components/Activity' //
@ -241,6 +241,9 @@ export default {
data() { data() {
return { return {
// loading // loading
userOptions: [],
value: '',
inputValue: '',
loading: false, loading: false,
crmType: 'business', crmType: 'business',
headDetails: [ headDetails: [
@ -397,11 +400,37 @@ export default {
}] }]
} }
}, },
mounted() {}, mounted() {
this.getUserList()
},
methods: { 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() { getDetial() {
this.firstContactsId = '' this.firstContactsId = ''
this.loading = true this.loading = true
@ -566,21 +595,52 @@ export default {
} }
/** 输单 和 无效 */ /** 输单 和 无效 */
if (item.type == 2 || item.type == 3) { if (item.type == 2 || item.type == 3) {
var message = '请填写' + item.name + '原因' var message = '请填写' + item.name + '原因:'
var title = item.name + '原因' var title = item.name + '原因'
// this.$prompt(message, title, {
// inputType: 'text',
// confirmButtonText: '',
// cancelButtonText: ''
// })
const h = this.$createElement 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({ this.$msgbox({
title: title, title: title,
message: h('p', message, [ message: msgBoxContent,
h('i', { style: 'color: teal' }, 'VNode'),
h('<xh-user-cell :radio="false" :value="baseFrom.adminUsers" @value-change="userChange" />')
]),
showCancelButton: true, showCancelButton: true,
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消' cancelButtonText: '取消'
@ -652,6 +712,12 @@ export default {
console.log('ok') console.log('ok')
this.$emit('handle', { type: 'save-success' }) this.$emit('handle', { type: 'save-success' })
this.getDetial() this.getDetial()
},
/**
* 刷新value的值
*/
updateVal(val) {
this.value = val
} }
} }
} }
@ -870,5 +936,9 @@ export default {
.state-handel-item:hover { .state-handel-item:hover {
background-color: #f7f8fa; background-color: #f7f8fa;
} }
.el-textarea__inner{
width: max-content;
border: 1px solid #C0C4CC;
}
} }
</style> </style>

Loading…
Cancel
Save