|
@@ -18,14 +18,14 @@ |
|
|
<vxe-form :data="formData" ref="formRef" :rules="formRules" title-colon :span="24"> |
|
|
<vxe-form :data="formData" ref="formRef" :rules="formRules" title-colon :span="24"> |
|
|
<vxe-form-item title="回访类型" field="name"> |
|
|
<vxe-form-item title="回访类型" field="name"> |
|
|
<template #default="{ data }"> |
|
|
<template #default="{ data }"> |
|
|
<vxe-input v-model="data.name" placeholder="请输入回访类型"></vxe-input> |
|
|
|
|
|
|
|
|
<vxe-input v-model="data.name" placeholder="请输入回访类型" maxlength="10"></vxe-input> |
|
|
</template> |
|
|
</template> |
|
|
</vxe-form-item> |
|
|
</vxe-form-item> |
|
|
</vxe-form> |
|
|
</vxe-form> |
|
|
<template #footer> |
|
|
<template #footer> |
|
|
<div class="btn-footer"> |
|
|
<div class="btn-footer"> |
|
|
<vxe-button style="margin-right: 10px" @click="onCancel">取消</vxe-button> |
|
|
<vxe-button style="margin-right: 10px" @click="onCancel">取消</vxe-button> |
|
|
<vxe-button status="primary" @click="onSubmit">保存</vxe-button> |
|
|
|
|
|
|
|
|
<vxe-button status="primary" @click="onSubmit" :loading="isLoading">保存</vxe-button> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</vxe-modal> |
|
|
</vxe-modal> |
|
@@ -110,6 +110,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
visible: false, |
|
|
visible: false, |
|
|
dialogTitle: "新增回访类型", |
|
|
dialogTitle: "新增回访类型", |
|
|
|
|
|
isLoading: false, |
|
|
formData: { |
|
|
formData: { |
|
|
id: undefined, |
|
|
id: undefined, |
|
|
name: null, |
|
|
name: null, |
|
@@ -164,13 +165,16 @@ export default { |
|
|
if (isValid) { |
|
|
if (isValid) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
this.isLoading = true; |
|
|
const [err, res] = await to(updateCallbackCategoryApi(this.formData)); |
|
|
const [err, res] = await to(updateCallbackCategoryApi(this.formData)); |
|
|
if (!err) { |
|
|
if (!err) { |
|
|
this.$message.success("操作成功"); |
|
|
this.$message.success("操作成功"); |
|
|
|
|
|
await this.resetForm(); |
|
|
this.visible = false; |
|
|
this.visible = false; |
|
|
await this.$nextTick(); |
|
|
await this.$nextTick(); |
|
|
this.$refs.gridRef.commitProxy("query"); |
|
|
this.$refs.gridRef.commitProxy("query"); |
|
|
} |
|
|
} |
|
|
|
|
|
this.isLoading = false; |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
async resetForm() { |
|
|
async resetForm() { |
|
|