gqx 2 vuotta sitten
vanhempi
commit
952c5aa8ac

+ 368 - 0
src/views/markets/modules/agreementUnit/agreementUnitForm.vue

@@ -0,0 +1,368 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="客户全称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerName">
+              <a-input v-model="model.customerName" placeholder="请输入客户全称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户简称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerShortName">
+              <a-input v-model="model.customerShortName" placeholder="请输入客户简称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="系统类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="systemType">
+<!--              <a-input v-model="model.systemType" placeholder="请输入系统类型"  ></a-input>-->
+              <a-select
+                      v-model="model.systemType"
+                      placeholder="请选择系统类型"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in systemTypeList" :key="index">{{ item.itemText }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerNo">
+              <a-input v-model="model.customerNo" placeholder="请输入客户编号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="主联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contactsName">
+              <a-input v-model="model.contactsName" placeholder="请输入主联系人"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerType">
+<!--              <a-input v-model="model.customerType" placeholder="请输入客户类型"  ></a-input>-->
+              <a-select
+                      v-model="model.customerType"
+                      placeholder="请选择客户类型"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in customerTypeList" :key="index">{{ item.itemText }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="销售人员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sellerId">
+<!--              <a-input v-model="model.sellerId" placeholder="请输入销售人员"  ></a-input>-->
+              <a-select
+                      v-model="model.sellerId"
+                      placeholder="请选择销售人员"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in saleList" :key="index">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
+              <a-input v-model="model.phone" placeholder="请输入手机号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
+<!--              <a-input v-model="model.status" placeholder="请输入客户状态"  ></a-input>-->
+              <a-select
+                      v-model="model.status"
+                      placeholder="请选择客户状态"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in customerStatusList" :key="index">{{ item.itemText }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="地区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="region">
+              <a-input v-model="model.region" placeholder="请输入地区"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="邮编" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="postalCode">
+              <a-input v-model="model.postalCode" placeholder="请输入邮编"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
+              <a-input v-model="model.address" placeholder="请输入地址"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="公司电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyPhone">
+              <a-input v-model="model.companyPhone" placeholder="请输入公司电话"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="传真" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fax">
+              <a-input v-model="model.fax" placeholder="请输入传真"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户来源" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerSource">
+<!--              <a-input v-model="model.customerSource" placeholder="请输入客户来源"  ></a-input>-->
+              <a-select
+                      v-model="model.customerSource"
+                      placeholder="请选择客户来源"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in customerSourceList" :key="index">{{ item.itemText }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="主页" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="homepage">
+              <a-input v-model="model.homepage" placeholder="请输入主页"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="Email" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="email">
+              <a-input v-model="model.email" placeholder="请输入Email"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="客户行业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerIndustry">
+<!--              <a-input v-model="model.customerIndustry" placeholder="请输入客户行业"  ></a-input>-->
+              <a-select
+                      v-model="model.customerIndustry"
+                      placeholder="请选择客户行业"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in customerIndustryList" :key="index">{{ item.itemText }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'BusAgreementUnitForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+            customerName: [
+              { required: true, message: '请输入客户全称!'},
+           ],
+            customerShortName: [
+                { required: true, message: '请输入客户简称!'},
+            ],
+            systemType: [
+                { required: true, message: '请选择系统类型!'},
+            ],
+            customerNo: [
+                { required: true, message: '请输入客户编号!'},
+            ],
+            contactsName: [
+                { required: true, message: '请输入主联系人!'},
+            ],
+            customerType: [
+                { required: true, message: '请选择客户类型!'},
+            ],
+            phone: [
+                { required: true, message: '请输入手机号!'},
+            ],
+            status: [
+                { required: true, message: '请选择状态!'},
+            ],
+            customerSource: [
+                { required: true, message: '请选择客户来源!'},
+            ],
+            customerIndustry: [
+                { required: true, message: '请选择客户行业!'},
+            ],
+           hotelId: [
+              { required: true, message: '请输入关联酒店!'},
+           ],
+        },
+        url: {
+          add: "/business/busMarketAgreementUnit/add",
+          edit: "/business/busMarketAgreementUnit/edit",
+          queryById: "/business/busMarketAgreementUnit/queryById",
+          query_saleList: "/business/busSalesPerson/queryList",
+        },
+        saleList:[],
+        systemTypeList:[],
+        customerTypeList:[],
+        customerStatusList:[],
+        customerSourceList:[],
+        customerIndustryList:[]
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+      getAction(this.url.query_saleList,{}).then((res)=>{
+        if(res.success){
+          this.saleList = res.result
+        }else{
+
+        }
+      })
+      this.getDictConfig();
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+              var info = JSON.parse(localStorage.getItem("storeInfo"));
+              this.model.hotelId = info.id;
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+
+        })
+      },
+      getDictConfig(){
+        var that = this;
+        //系统类型
+        var param = {
+          dictName:'协议系统类型设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.systemTypeList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+
+        //客户类型
+        var param = {
+          dictName:'协议客户类型设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.customerTypeList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+
+        //客户状态
+        var param = {
+          dictName:'协议客户状态设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.customerStatusList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+
+        //客户来源
+        var param = {
+          dictName:'客人来源设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.customerSourceList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+
+        //客户行业
+        var param = {
+          dictName:'协议客户行业设置'
+        }
+        // var values = JSON.parse(JSON.stringify(param))
+        that.confirmLoading = true;
+        getAction('/business/busDictItem/queryList',param).then((res)=>{
+          console.log(res)
+          if(res.success){
+            if (res.code == 200 && res.result) {
+              this.customerIndustryList = res.result;
+            }
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+      }
+    }
+  }
+</script>

+ 0 - 316
src/views/markets/modules/agreementunit/BusAgreementUnitForm.vue

@@ -1,316 +0,0 @@
-<template>
-  <a-spin :spinning="confirmLoading">
-    <j-form-container :disabled="formDisabled">
-      <a-form-model
-        ref="form"
-        :model="model"
-        :rules="validatorRules"
-        slot="detail"
-      >
-        <a-row>
-          <a-col :span="24">
-            <a-form-model-item
-              label="客户全称"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="name"
-            >
-              <a-input
-                v-model="model.name"
-                placeholder="请输入客户全称"
-              ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item
-              label="手机号"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="mobile"
-            >
-              <a-input
-                v-model="model.mobile"
-                placeholder="请输入手机号"
-              ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item
-              label="系统类型"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="systemType"
-            >
-              <a-select
-                v-model="model.systemType"
-                style="width: 100%"
-                placeholder="客户类型"
-                :allowClear="true"
-              >
-                <a-select-option
-                  :value="item.id"
-                  v-for="(item, index) in systemTypeList"
-                  :key="item.id"
-                >
-                  {{ item.itemText }}
-                </a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item
-              label="主联系人"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="contactName"
-            >
-              <a-input
-                v-model="model.contactName"
-                placeholder="请输入主联系人"
-              ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item
-              label="客户类型"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="customerType"
-            >
-              <a-select
-                v-model="model.customerType"
-                style="width: 100%"
-                placeholder="客户类型"
-                :allowClear="true"
-              >
-                <a-select-option
-                  :value="item.id"
-                  v-for="(item, index) in customerSourceList"
-                  :key="item.id"
-                >
-                  {{ item.itemText }}
-                </a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item
-              label="销售员"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="staffId"
-            >
-              <a-select placeholder="销售员工" v-model="model.staffId">
-                <a-select-option
-                  :value="item.id"
-                  v-for="item in warranterList"
-                  :key="item.id"
-                >
-                  {{ item.name }}
-                </a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item
-              label="地址"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="address"
-            >
-              <a-input
-                v-model="model.address"
-                placeholder="请输入地址"
-              ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item
-              label="客户来源"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="customerSource"
-            >
-              <a-select placeholder="订单来源" v-model="model.customerSource">
-                <a-select-option
-                  :value="item.id"
-                  v-for="(item, index) in customerSourceList2"
-                  :key="item.id"
-                >
-                  {{ item.itemText }}
-                </a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item
-              label="客户行业"
-              :labelCol="labelCol"
-              :wrapperCol="wrapperCol"
-              prop="customerTrade"
-            >
-              <a-select
-                v-model="model.customerTrade"
-                style="width: 100%"
-                placeholder="客户类型"
-                :allowClear="true"
-              >
-                <a-select-option
-                  :value="item.id"
-                  v-for="(item, index) in customerTradeList"
-                  :key="item.id"
-                >
-                  {{ item.itemText }}
-                </a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </j-form-container>
-  </a-spin>
-</template>
-
-<script>
-import { httpAction, getAction } from "@/api/manage";
-import { validateDuplicateValue } from "@/utils/util";
-
-export default {
-  name: "BusAgreementUnitForm",
-  components: {},
-  props: {
-    //表单禁用
-    disabled: {
-      type: Boolean,
-      default: false,
-      required: false,
-    },
-  },
-  data() {
-    return {
-      model: {},
-      labelCol: {
-        xs: { span: 24 },
-        sm: { span: 5 },
-      },
-      wrapperCol: {
-        xs: { span: 24 },
-        sm: { span: 16 },
-      },
-      confirmLoading: false,
-      validatorRules: {
-        name: [{ required: true, message: "请输入客户全称!" }],
-        mobile: [{ required: true, message: "请输入手机号!" }],
-        systemType: [{ required: true, message: "请输入系统类型字典id!" }],
-        contactName: [{ required: true, message: "请输入主联系人!" }],
-        customerSource: [{ required: true, message: "请输入客户来源!" }],
-        customerTrade: [{ required: true, message: "请输入客户行业!" }],
-        status: [{ required: true, message: "请输入状态!" }],
-      },
-      url: {
-        add: "/business/busAgreementUnit/add",
-        edit: "/business/busAgreementUnit/edit",
-        queryById: "/business/busAgreementUnit/queryById",
-      },
-      customerSourceList: [],
-      systemTypeList: [],
-      customerTradeList: [],
-      customerSourceList2: [],
-      warranterList: [],
-    };
-  },
-  computed: {
-    formDisabled() {
-      return this.disabled;
-    },
-  },
-  created() {
-    var _info = JSON.parse(localStorage.getItem("storeInfo"));
-    if (_info) {
-      this.model.hotelId = _info.id;
-    }
-    getAction("/business/busDictItem/list", {
-      hotelId: _info.id,
-      dictId: "1639538553774624769",
-    }).then((res) => {
-      if (res.success) {
-        this.customerSourceList = res.result.records;
-      }
-    });
-    getAction("/business/busDictItem/list", {
-      hotelId: _info.id,
-      dictId: "1639538438666145794",
-    }).then((res) => {
-      if (res.success) {
-        this.systemTypeList = res.result.records;
-      }
-    });
-    getAction("/business/busDictItem/list", {
-      hotelId: _info.id,
-      dictId: "1639538788483682305",
-    }).then((res) => {
-      if (res.success) {
-        this.customerTradeList = res.result.records;
-      }
-    });
-    getAction("/business/busDictItem/list", {
-      hotelId: _info.id,
-      dictId: "1639538915239743490",
-    }).then((res) => {
-      if (res.success) {
-        this.customerSourceList2 = res.result.records;
-      }
-    });
-    getAction("/business/busSalesPerson/list", {
-      hotelId: _info.id,
-      pageNo: 1,
-      pageSize: 100,
-    }).then((res) => {
-      if (res.success) {
-        this.warranterList = res.result.records;
-      }
-    });
-    //备份model原始值
-    this.modelDefault = JSON.parse(JSON.stringify(this.model));
-  },
-  methods: {
-    add() {
-      this.edit(this.modelDefault);
-    },
-    edit(record) {
-      this.model = Object.assign({}, record);
-      this.visible = true;
-    },
-    submitForm() {
-      const that = this;
-      // 触发表单验证
-      this.$refs.form.validate((valid) => {
-        if (valid) {
-          that.confirmLoading = true;
-          let httpurl = "";
-          let method = "";
-          if (!this.model.id) {
-            httpurl += this.url.add;
-            method = "post";
-          } else {
-            httpurl += this.url.edit;
-            method = "put";
-          }
-          httpAction(httpurl, this.model, method)
-            .then((res) => {
-              if (res.success) {
-                that.$message.success(res.message);
-                that.$emit("ok");
-              } else {
-                that.$message.warning(res.message);
-              }
-            })
-            .finally(() => {
-              that.confirmLoading = false;
-            });
-        }
-      });
-    },
-  },
-};
-</script>

+ 0 - 84
src/views/markets/modules/agreementunit/BusAgreementUnitModal.Style#Drawer.vue

@@ -1,84 +0,0 @@
-<template>
-  <a-drawer
-    :title="title"
-    :width="width"
-    placement="right"
-    :closable="false"
-    @close="close"
-    destroyOnClose
-    :visible="visible">
-    <bus-agreement-unit-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></bus-agreement-unit-form>
-    <div class="drawer-footer">
-      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
-      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
-    </div>
-  </a-drawer>
-</template>
-
-<script>
-
-  import BusAgreementUnitForm from './BusAgreementUnitForm'
-
-  export default {
-    name: 'BusAgreementUnitModal',
-    components: {
-      BusAgreementUnitForm
-    },
-    data () {
-      return {
-        title:"操作",
-        width:800,
-        visible: false,
-        disableSubmit: false
-      }
-    },
-    methods: {
-      add () {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.add();
-        })
-      },
-      edit (record) {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.edit(record);
-        });
-      },
-      close () {
-        this.$emit('close');
-        this.visible = false;
-      },
-      submitCallback(){
-        this.$emit('ok');
-        this.visible = false;
-      },
-      handleOk () {
-        this.$refs.realForm.submitForm();
-      },
-      handleCancel () {
-        this.close()
-      }
-    }
-  }
-</script>
-
-<style lang="less" scoped>
-/** Button按钮间距 */
-  .ant-btn {
-    margin-left: 30px;
-    margin-bottom: 30px;
-    float: right;
-  }
-  .drawer-footer{
-    position: absolute;
-    bottom: -8px;
-    width: 100%;
-    border-top: 1px solid #e8e8e8;
-    padding: 10px 16px;
-    text-align: right;
-    left: 0;
-    background: #fff;
-    border-radius: 0 0 2px 2px;
-  }
-</style>

+ 0 - 60
src/views/markets/modules/agreementunit/BusAgreementUnitModal.vue

@@ -1,60 +0,0 @@
-<template>
-  <j-modal
-    :title="title"
-    :width="width"
-    :visible="visible"
-    switchFullscreen
-    @ok="handleOk"
-    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
-    @cancel="handleCancel"
-    cancelText="关闭">
-    <bus-agreement-unit-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-agreement-unit-form>
-  </j-modal>
-</template>
-
-<script>
-
-  import BusAgreementUnitForm from './BusAgreementUnitForm'
-  export default {
-    name: 'BusAgreementUnitModal',
-    components: {
-      BusAgreementUnitForm
-    },
-    data () {
-      return {
-        title:'',
-        width:800,
-        visible: false,
-        disableSubmit: false
-      }
-    },
-    methods: {
-      add () {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.add();
-        })
-      },
-      edit (record) {
-        this.visible=true
-        this.$nextTick(()=>{
-          this.$refs.realForm.edit(record);
-        })
-      },
-      close () {
-        this.$emit('close');
-        this.visible = false;
-      },
-      handleOk () {
-        this.$refs.realForm.submitForm();
-      },
-      submitCallback(){
-        this.$emit('ok');
-        this.visible = false;
-      },
-      handleCancel () {
-        this.close()
-      }
-    }
-  }
-</script>