|
|
|
@ -164,6 +164,32 @@
|
|
|
|
|
</flexbox>
|
|
|
|
|
</flexbox>
|
|
|
|
|
</div>
|
|
|
|
|
<el-dialog
|
|
|
|
|
:visible.sync="dialogVisible"
|
|
|
|
|
:title="dialogTitle"
|
|
|
|
|
:modal="false"
|
|
|
|
|
width="30%">
|
|
|
|
|
<p>{{ dialogMessage }}:</p>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="commentContent"
|
|
|
|
|
type="textarea"
|
|
|
|
|
rows="4"
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
placeholder="请输入内容"/>
|
|
|
|
|
<p>审核人:</p>
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="selectValue"
|
|
|
|
|
:clearable="true"
|
|
|
|
|
:filterable="true"
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
>
|
|
|
|
|
<el-option v-for="(item) in userOptions" :key="item.id" :value="item.id" :label="item.username"/>
|
|
|
|
|
</el-select>
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="dialogConfirm()">确 定</el-button>
|
|
|
|
|
</span>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
class="firse-button"
|
|
|
|
@ -248,7 +274,13 @@ export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 展示加载loading
|
|
|
|
|
dialogVisible: false,
|
|
|
|
|
dialogTitle: '',
|
|
|
|
|
dialogMessage: '',
|
|
|
|
|
dialogData: {},
|
|
|
|
|
commentContent: '',
|
|
|
|
|
userOptions: [],
|
|
|
|
|
selectValue: '',
|
|
|
|
|
value: '',
|
|
|
|
|
inputValue: '',
|
|
|
|
|
loading: false,
|
|
|
|
@ -599,147 +631,34 @@ export default {
|
|
|
|
|
// 非完结状态下 可推进
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.dialogVisible = true
|
|
|
|
|
this.dialogData = item
|
|
|
|
|
/** 输单 和 无效 */
|
|
|
|
|
if (item.type == 2 || item.type == 3) {
|
|
|
|
|
var message = '请填写' + item.name + '原因:'
|
|
|
|
|
var title = item.name + '原因'
|
|
|
|
|
|
|
|
|
|
const h = this.$createElement
|
|
|
|
|
const msgBoxContent = h('div', [
|
|
|
|
|
h('p', message),
|
|
|
|
|
h('textarea', {
|
|
|
|
|
attrs: {
|
|
|
|
|
class: 'el-textarea__inner',
|
|
|
|
|
autocomplete: 'off',
|
|
|
|
|
rows: 4,
|
|
|
|
|
id: 'commentContent'
|
|
|
|
|
},
|
|
|
|
|
domProps: {
|
|
|
|
|
value: this.commentContent
|
|
|
|
|
},
|
|
|
|
|
on: { input: v => {
|
|
|
|
|
this.commentContent = v.target.value
|
|
|
|
|
} }
|
|
|
|
|
}),
|
|
|
|
|
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: msgBoxContent,
|
|
|
|
|
showCancelButton: true,
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消'
|
|
|
|
|
})
|
|
|
|
|
.then(({ value }) => {
|
|
|
|
|
this.loading = true
|
|
|
|
|
const commentContent = document.getElementById('commentContent').value
|
|
|
|
|
crmBusinessAdvanceAPI({
|
|
|
|
|
check_user_id: this.$refs['selectView'].value,
|
|
|
|
|
business_id: this.id,
|
|
|
|
|
status_id: item.status_id,
|
|
|
|
|
is_end: item.type,
|
|
|
|
|
statusRemark: commentContent
|
|
|
|
|
})
|
|
|
|
|
.then(res => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.$message.success('操作成功')
|
|
|
|
|
this.getDetial()
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {})
|
|
|
|
|
this.dialogTitle = item.name + '原因'
|
|
|
|
|
this.dialogMessage = '请填写' + item.name + '原因:'
|
|
|
|
|
} else {
|
|
|
|
|
var title = item.name
|
|
|
|
|
const h = this.$createElement
|
|
|
|
|
const msgBoxContent = h('div', [
|
|
|
|
|
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.dialogTitle = item.name
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}))
|
|
|
|
|
])
|
|
|
|
|
this.$msgbox({
|
|
|
|
|
title: title,
|
|
|
|
|
message: msgBoxContent,
|
|
|
|
|
showCancelButton: true,
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消'
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.isContract = true
|
|
|
|
|
this.createClick()
|
|
|
|
|
},
|
|
|
|
|
dialogConfirm() {
|
|
|
|
|
this.loading = true
|
|
|
|
|
crmBusinessAdvanceAPI({
|
|
|
|
|
check_user_id: this.$refs['selectView'].value,
|
|
|
|
|
check_user_id: this.selectValue,
|
|
|
|
|
business_id: this.id,
|
|
|
|
|
status_id: item.status_id,
|
|
|
|
|
is_end: item.type
|
|
|
|
|
status_id: this.dialogData.status_id,
|
|
|
|
|
is_end: this.dialogData.type,
|
|
|
|
|
statusRemark: this.commentContent
|
|
|
|
|
})
|
|
|
|
|
.then(res => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.$message.success('操作成功')
|
|
|
|
|
this.dialogVisible = false
|
|
|
|
|
this.getDetial()
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// this.crmType = 'contract'
|
|
|
|
|
// this.action.type = 'save'
|
|
|
|
|
// this.createClick()
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* 审核操作
|
|
|
|
|