chenrui 4 年之前
父節點
當前提交
28d623d9e8

+ 13 - 13
src/views/basicData/customerTypeManagement/editModal.vue

@@ -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 = ''
       }
     }
   }

+ 4 - 4
src/views/basicData/customerTypeManagement/list.vue

@@ -6,7 +6,7 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-item label="类型名称">
-              <a-input id="customerTypeList-customersTypeName" v-model.trim="queryParam.customersTypeName" allowClear placeholder="请输入客户类型名称"/>
+              <a-input id="customerTypeList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入客户类型名称"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -51,12 +51,12 @@ export default {
   data () {
     return {
       queryParam: { //  查询条件
-        customersTypeName: '' //  客户类型名称
+        name: '' //  客户类型名称
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '客户类型名称', dataIndex: 'customersTypeName', align: 'center', ellipsis: true },
+        { title: '客户类型名称', dataIndex: 'name', align: 'center', ellipsis: true },
         { title: '创建时间', dataIndex: 'createDate', width: 180, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center' }
       ],
@@ -81,7 +81,7 @@ export default {
   methods: {
     //  重置
     resetSearchForm () {
-      this.queryParam.customersTypeName = ''
+      this.queryParam.name = ''
       this.$refs.table.refresh(true)
     },
     //  新增/编辑