|
@@ -18,11 +18,11 @@
|
|
|
:label-col="formItemLayout.labelCol"
|
|
|
:wrapper-col="formItemLayout.wrapperCol"
|
|
|
>
|
|
|
- <a-form-model-item label="客户类型名称" prop="customersTypeName">
|
|
|
+ <a-form-model-item label="客户类型名称" prop="name">
|
|
|
<a-input
|
|
|
- id="customerTypeEdit-customersTypeName"
|
|
|
+ id="customerTypeEdit-name"
|
|
|
:maxLength="30"
|
|
|
- v-model="form.customersTypeName"
|
|
|
+ v-model="form.name"
|
|
|
placeholder="请输入客户类型名称(最多30个字符)"
|
|
|
allowClear />
|
|
|
</a-form-model-item>
|
|
@@ -39,7 +39,7 @@
|
|
|
import { STable } from '@/components'
|
|
|
import { custTypeSave } from '@/api/custType'
|
|
|
export default {
|
|
|
- name: 'customerTypeEditModal',
|
|
|
+ name: 'CustomerTypeEditModal',
|
|
|
components: { STable },
|
|
|
props: {
|
|
|
openModal: { // 弹框显示状态
|
|
@@ -69,18 +69,18 @@ export default {
|
|
|
wrapperCol: { span: 16 }
|
|
|
},
|
|
|
form: {
|
|
|
- customersTypeName: '', // 客户类型名称
|
|
|
+ name: '' // 客户类型名称
|
|
|
},
|
|
|
rules: {
|
|
|
- customersTypeName: [
|
|
|
+ name: [
|
|
|
{ required: true, message: '请输入客户类型名称', trigger: 'blur' }
|
|
|
- ],
|
|
|
+ ]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
// 保存
|
|
|
- handleSave(){
|
|
|
+ handleSave () {
|
|
|
const _this = this
|
|
|
this.$refs.ruleForm.validate(valid => {
|
|
|
if (valid) {
|
|
@@ -97,7 +97,7 @@ export default {
|
|
|
return false
|
|
|
}
|
|
|
})
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
watch: {
|
|
|
// 父页面传过来的弹框状态
|
|
@@ -111,10 +111,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
itemId (newValue, oldValue) {
|
|
|
- if (this.isShow && newValue) { // 编辑
|
|
|
- this.form.customersTypeName = this.nowData && this.nowData.customersTypeName ? this.nowData.customersTypeName : ''
|
|
|
- }else{ // 添加
|
|
|
- this.form.customersTypeName = ''
|
|
|
+ if (this.isShow && newValue) { // 编辑
|
|
|
+ this.form.name = this.nowData && this.nowData.name ? this.nowData.name : ''
|
|
|
+ } else { // 添加
|
|
|
+ this.form.name = ''
|
|
|
}
|
|
|
}
|
|
|
}
|