chenrui 4 år sedan
förälder
incheckning
2e13356920

+ 2 - 0
src/store/modules/user.js

@@ -47,6 +47,7 @@ const user = {
               const users = res.auth_user
               Vue.ls.set('hasError', 0)
               commit('SET_TOKEN', res.access_token)
+              commit('SET_INFO', users)
               commit('SET_NAME', { name: users.userNameCN, welcome: welcome() })
               Vue.ls.set('rolesAccess', { permissionList: users.permCodes }, 7 * 24 * 60 * 60 * 1000)
               commit('SET_AVATAR', res.avatar ? res.avatar : '')
@@ -87,6 +88,7 @@ const user = {
         }).catch((error) => {
           resolve(error)
         }).finally(() => {
+          commit('SET_INFO', {})
           commit('SET_NAME', { name: '', welcome: '' })
           commit('SET_AVATAR', '')
           commit('SET_TOKEN', '')

+ 5 - 5
src/views/customerManagement/customerInfo/detailModal.vue

@@ -16,11 +16,11 @@
         <a-descriptions-item label="联系电话:">{{ detailData.contactTel || '--' }}</a-descriptions-item>
         <a-descriptions-item label="客户地址:" :span="3">{{ addressStr }}</a-descriptions-item>
         <a-descriptions-item label="客户传真:">{{ detailData.fax || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="配送方式:">{{ detailData.dispatchType || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="是否卫星仓客户:">{{ detailData.satelliteFlag || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="价格类型:">{{ detailData.priceType || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="支付方式:">{{ detailData.payType || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="收款方式:">{{ detailData.settleStyleName || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="配送方式:">{{ detailData.dispatchTypeDictValue || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="是否卫星仓客户:">{{ detailData.satelliteFlagDictValue || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="价格类型:">{{ detailData.priceTypeDictValue || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="支付方式:">{{ detailData.payTypeDictValue || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="收款方式:">{{ detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
       </a-descriptions>
       <div class="btn-cont"><a-button id="customer-management-detail-modal-back" @click="isShow = false">返回列表</a-button></div>
     </div>

+ 1 - 2
src/views/customerManagement/customerInfo/edit.vue

@@ -151,7 +151,7 @@ export default {
         customerAddr: '', //  详细地址
         fax: '', //  客户传真
         dispatchType: '', //  配送方式
-        satelliteFlag: undefined, //  是否卫星仓客户
+        satelliteFlag: 0, //  是否卫星仓客户
         customerTypeSn: undefined, //  客户类型
         priceType: '', //  价格类型
         payType: '', //  支付方式
@@ -163,7 +163,6 @@ export default {
         provinceSn: [{ required: true, message: '请选择省', trigger: 'change' }],
         citySn: [{ required: true, message: '请选择市', trigger: 'change' }],
         countySn: [{ required: true, message: '请选择区/县', trigger: 'change' }],
-        customerTypeSn: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
         priceType: [{ required: true, message: '请选择价格类型', trigger: 'change' }],
         payType: [{ required: true, message: '请选择支付方式', trigger: 'change' }],
         settleStyleSn: [{ required: true, message: '请选择收款方式', trigger: 'change' }]

+ 3 - 3
src/views/customerManagement/customerInfo/list.vue

@@ -120,8 +120,8 @@
         <a-button size="small" type="link" @click="handleEdit(record)" id="customerManagementList-edit-btn">编辑</a-button>
         <a-divider type="vertical" style="margin: 0;" />
         <a-button size="small" type="link" @click="handleDetail(record)" id="customerManagementList-detail-btn">详情</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleDel(record)" id="customerManagementList-del-btn">删除</a-button>
+        <a-divider type="vertical" v-if="record.satelliteFlag!=1" style="margin: 0;" />
+        <a-button size="small" type="link" v-if="record.satelliteFlag!=1" @click="handleDel(record)" id="customerManagementList-del-btn">删除</a-button>
       </template>
     </s-table>
     <!-- 客户详情 -->
@@ -161,7 +161,7 @@ export default {
         { title: '联系人', dataIndex: 'contactName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '联系电话', dataIndex: 'contactTel', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '最后销售时间', dataIndex: 'lastSaleTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '是否卫星仓', dataIndex: 'satelliteFlag', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '是否卫星仓', dataIndex: 'satelliteFlagDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象

+ 2 - 3
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -81,7 +81,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1595 }"
+      :scroll="{ x: 1495 }"
       bordered>
       <!-- 采购单号 -->
       <template slot="purchaseBillNo" slot-scope="text, record">
@@ -132,13 +132,12 @@ export default {
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '采购单号', scopedSlots: { customRender: 'purchaseBillNo' }, width: 140, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '供应商', dataIndex: 'custName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'dealerName', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购金额(¥)', dataIndex: 'totalAmount', width: 115, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '业务状态', scopedSlots: { customRender: 'auditStatus' }, width: 100, align: 'center' },
         { title: '财务状态', scopedSlots: { customRender: 'financialStatus' }, width: 100, align: 'center' },
-        { title: '重要提示', dataIndex: 'shDate', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 290, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象

+ 9 - 9
src/views/salesManagement/giftRecord/list.vue

@@ -35,14 +35,14 @@
             <a-col :md="6" :sm="24">
               <a-form-item label="赠送客户">
                 <a-select
-                  id="giftRecordList-customerName"
+                  id="giftRecordList-customerSn"
                   placeholder="请选择"
                   allowClear
-                  v-model="queryParam.customerName"
+                  v-model="queryParam.customerSn"
                   :showSearch="true"
                   option-filter-prop="children"
                   :filter-option="filterOption">
-                  <a-select-option v-for="item in custAllList" :key="item.customerSn" :value="item.customerName">{{ item.customerName }}</a-select-option>
+                  <a-select-option v-for="item in custAllList" :key="item.customerSn" :value="item.customerSn">{{ item.customerName }}</a-select-option>
                 </a-select>
               </a-form-item>
             </a-col>
@@ -66,7 +66,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1360 }"
+      :scroll="{ x: 1380 }"
       bordered>
     </s-table>
   </a-card>
@@ -87,7 +87,7 @@ export default {
         productCode: '', //  产品编码
         productOrigCode: '', //  原厂编码
         salesBillNo: '', //  关联销售单号
-        customerName: undefined //  赠送客户
+        customerSn: undefined //  赠送客户
       },
       disabled: false, //  查询、重置按钮是否可操作
       dateFormat: 'YYYY-MM-DD',
@@ -100,9 +100,9 @@ export default {
         { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '赠送数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '关联销售单号', dataIndex: 'salesBillNo', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '赠送客户', dataIndex: 'customerName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价', dataIndex: 'cost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本小计', dataIndex: 'costSubtotal', width: 100, align: 'center' }
+        { title: '赠送客户', dataIndex: 'customerName', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '成本价(¥)', dataIndex: 'cost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '成本小计(¥)', dataIndex: 'costSubtotal', width: 120, align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -158,7 +158,7 @@ export default {
       this.queryParam.productCode = ''
       this.queryParam.productOrigCode = ''
       this.queryParam.salesBillNo = ''
-      this.queryParam.customerName = undefined
+      this.queryParam.customerSn = undefined
       this.time = []
       this.$refs.table.refresh(true)
     }

+ 150 - 104
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -19,19 +19,23 @@
     >
       <a-row :gutter="15">
         <a-col :span="8">
-          <a-form-model-item label="客户名称" prop="name">
-            <a-input
-              id="chooseCustom-name"
-              :maxLength="30"
-              v-model="form.name"
-              placeholder="请输入客户名称(最多30个字符)"
-              allowClear />
+          <a-form-model-item label="客户名称" prop="customerName">
+            <a-auto-complete
+              id="chooseCustom-customerName"
+              placeholder="请选择客户"
+              allowClear
+              v-model="form.customerName"
+              :filter-option="filterOption"
+              @select="custSelect"
+              @change="custChange">
+              <template slot="dataSource">
+                <a-select-option v-for="item in custAllList" :key="item.id" :title="item.id">{{ item.customerName }}</a-select-option>
+              </template>
+            </a-auto-complete>
           </a-form-model-item>
         </a-col>
         <a-col :span="8">
-          <a-form-model-item>
-            (未搜索到客户时为新增客户)
-          </a-form-model-item>
+          <a-form-model-item>(未搜索到客户时为新增客户)</a-form-model-item>
         </a-col>
       </a-row>
       <a-row :gutter="15">
@@ -40,22 +44,22 @@
             <a-row :gutter="15">
               <!-- 客户地址 -->
               <a-col span="8">
-                <a-form-model-item prop="provinceCode">
-                  <a-select id="chooseCustom-provinceCode" @change="getCityList" v-model="form.provinceCode" placeholder="请选择省">
+                <a-form-model-item prop="provinceSn">
+                  <a-select id="chooseCustom-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
                     <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
               <a-col span="8">
-                <a-form-model-item prop="cityCode">
-                  <a-select id="chooseCustom-cityCode" @change="getAreaList" v-model="form.cityCode" placeholder="请选择市">
+                <a-form-model-item prop="citySn">
+                  <a-select id="chooseCustom-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
                     <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
               <a-col span="8">
-                <a-form-model-item prop="districtCode">
-                  <a-select id="chooseCustom-districtCode" @change="areaCharged" v-model="form.districtCode" placeholder="请选择区/县">
+                <a-form-model-item prop="countySn">
+                  <a-select id="chooseCustom-countySn" @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
                     <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
                   </a-select>
                 </a-form-model-item>
@@ -64,11 +68,11 @@
           </a-form-model-item>
         </a-col>
         <a-col :span="8">
-          <a-form-model-item prop="address">
+          <a-form-model-item label="详细地址" prop="customerAddr">
             <a-input
-              id="chooseCustom-address"
+              id="chooseCustom-customerAddr"
               :maxLength="60"
-              v-model="form.address"
+              v-model="form.customerAddr"
               placeholder="请输入详细地址(最多60个字符)"
               allowClear />
           </a-form-model-item>
@@ -76,22 +80,22 @@
       </a-row>
       <a-row :gutter="15">
         <a-col :span="8">
-          <a-form-model-item label="联系人" prop="contacts">
+          <a-form-model-item label="联系人" prop="contactName">
             <a-input
-              id="chooseCustom-contacts"
+              id="chooseCustom-contactName"
               :maxLength="30"
-              v-model="form.contacts"
+              v-model="form.contactName"
               placeholder="请输入联系人(最多30个字符)"
               allowClear />
           </a-form-model-item>
         </a-col>
         <a-col :span="8">
-          <a-form-model-item label="客户电话" prop="customerPhone">
+          <a-form-model-item label="联系电话" prop="contactTel">
             <a-input
-              id="chooseCustom-customerPhone"
-              :maxLength="11"
-              v-model="form.customerPhone"
-              placeholder="请输入客户电话(最多11个字符)"
+              id="chooseCustom-contactTel"
+              :maxLength="30"
+              v-model="form.contactTel"
+              placeholder="请输入联系电话(最多30个字符)"
               allowClear />
           </a-form-model-item>
         </a-col>
@@ -101,15 +105,17 @@
           <a-form-model-item label="价格类型" prop="priceType">
             <a-row :gutter="15">
               <a-col :span="20">
-                <a-select id="chooseCustom-priceType" v-model="form.priceType" placeholder="请选择价格类型">
-                  <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-                </a-select>
+                <v-select
+                  code="PRICE_TYPE"
+                  :disabled="!isEdit"
+                  id="chooseCustom-priceType"
+                  v-model="form.priceType"
+                  allowClear
+                  placeholder="请选择价格类型" ></v-select>
               </a-col>
               <a-col :span="4">
                 <a-popover>
-                  <template slot="content">
-                    (选择后在当前工单不可修改)
-                  </template>
+                  <template slot="content">(选择后在当前工单不可修改)</template>
                   <a-icon type="question-circle" />
                 </a-popover>
               </a-col>
@@ -118,47 +124,39 @@
         </a-col>
         <a-col :span="8">
           <a-form-model-item label="支付方式" prop="payType">
-            <a-select id="chooseCustom-payType" v-model="form.payType" placeholder="请选择支付方式">
-              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-            </a-select>
+            <v-select code="PAY_TYPE" id="chooseCustom-payType" v-model="form.payType" allowClear placeholder="请选择支付方式" />
           </a-form-model-item>
         </a-col>
         <a-col :span="8">
           <a-form-model-item label="收款方式" prop="payment">
-            <a-select id="chooseCustom-payment" v-model="form.payment" placeholder="请选择收款方式">
-              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-            </a-select>
+            <v-select code="SETTLE_STYLE_NAME" id="chooseCustom-payment" v-model="form.settleStyleSn" allowClear placeholder="请选择收款方式"></v-select>
           </a-form-model-item>
         </a-col>
       </a-row>
       <a-row :gutter="15">
         <a-col :span="8">
-          <a-form-model-item label="配送方式" prop="shipping">
-            <a-select id="chooseCustom-shipping" v-model="form.shippingCode" placeholder="请选择配送方式">
-              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-            </a-select>
+          <a-form-model-item label="配送方式" prop="dispatchType">
+            <v-select code="DISPATCH_TYPE" id="chooseCustom-dispatchType" v-model="form.dispatchType" allowClear placeholder="请选择配送方式"></v-select>
           </a-form-model-item>
         </a-col>
         <a-col :span="8">
-          <a-form-model-item label="业务员" prop="salesman">
-            <a-select id="chooseCustom-salesman" v-model="form.salesman" placeholder="请选择业务员">
-              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+          <a-form-model-item label="业务员" prop="tenantId">
+            <a-select id="chooseCustom-tenantId" v-model="form.tenantId" placeholder="请选择业务员">
+              <a-select-option v-for="item in tenantList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
             </a-select>
           </a-form-model-item>
         </a-col>
         <a-col :span="8">
           <a-form-model-item label="铺货出库" prop="salesman">
-            <a-select id="chooseCustom-salesman" v-model="form.salesman" placeholder="请选择是否铺货出库">
-              <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-            </a-select>
+            <v-select code="FLAG" id="chooseCustom-salesman" v-model="form.salesman" allowClear placeholder="请选择"></v-select>
           </a-form-model-item>
         </a-col>
       </a-row>
       <a-row :gutter="15">
         <a-col :span="8">
-          <a-form-model-item label="备注" prop="remark">
+          <a-form-model-item label="备注" prop="remarks">
             <a-input
-              id="chooseCustom-remark"
+              id="chooseCustom-remarks"
               type="textarea"
               :maxLength="100"
               v-model="form.remarks"
@@ -167,9 +165,7 @@
           </a-form-model-item>
         </a-col>
         <a-col :span="8">
-          <a-form-model-item label="开单人">
-            王明
-          </a-form-model-item>
+          <a-form-model-item label="开单人">{{ $store.state.user.info.userNameCN }}</a-form-model-item>
         </a-col>
       </a-row>
       <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
@@ -182,8 +178,11 @@
 
 <script>
 import { getArea } from '@/api/data'
+import { custAllList, custFindById } from '@/api/customer'
+import { VSelect } from '@/components'
 export default {
   name: 'ChooseCustomModal',
+  components: { VSelect },
   props: {
     show: [Boolean]
   },
@@ -196,42 +195,44 @@ export default {
         wrapperCol: { span: 16 }
       },
       form: {
-        name: '', // 客户名称
-        provinceCode: undefined, //  省
+        customerName: '', // 客户名称
+        contactTel: '', //  联系电话
+        contactName: '', //  联系人
+        provinceSn: undefined, //  省
         provinceName: '',
-        cityCode: undefined, // 市
+        citySn: undefined, // 市
         cityName: '',
-        districtCode: undefined, // 区
-        districtName: '',
-        address: '', //  详细地址
-        contactName: '', //  联系人
-        contactPhone: '', //  联系电话
-        remarks: '', //  备注
-        priceType: undefined, //  价格类型
-        payType: undefined, // 支付方式
-        payment: undefined // 收款方式
+        countySn: undefined, // 区
+        countyName: '',
+        customerAddr: '', //  详细地址
+        fax: '', //  客户传真
+        dispatchType: '', //  配送方式
+        satelliteFlag: 0, //  是否卫星仓客户
+        customerTypeSn: undefined, //  客户类型
+        priceType: '', //  价格类型
+        payType: '', //  支付方式
+        settleStyleSn: '', //  收款方式
+        tenantId: undefined, //  业务员
+        remarks: '' //  备注
       },
       rules: {
-        name: [
-          { required: true, message: '请输入客户名称', trigger: 'blur' }
+        customerName: [
+          { required: true, message: '请输入客户名称', trigger: ['change', 'blur'] }
         ],
-        provinceCode: [
+        contactTel: [
+          { required: true, message: '请输入联系电话', trigger: 'blur' }
+        ],
+        provinceSn: [
           { required: true, message: '请选择省', trigger: 'change' }
         ],
-        cityCode: [
+        citySn: [
           { required: true, message: '请选择市', trigger: 'change' }
         ],
-        districtCode: [
+        countySn: [
           { required: true, message: '请选择区/县', trigger: 'change' }
         ],
-        address: [
-          { required: true, message: '请输入详细地址', trigger: 'blur' }
-        ],
-        contactName: [
-          { required: true, message: '请输入联系人', trigger: 'blur' }
-        ],
         contactPhone: [
-          { required: true, message: '请输入联系电话', trigger: 'blur' }
+          { required: true, message: '请输入联系电话', trigger: 'blur' }
         ],
         priceType: [
           { required: true, message: '请选择价格类型', trigger: 'change' }
@@ -239,63 +240,102 @@ export default {
         payType: [
           { required: true, message: '请选择支付方式', trigger: 'change' }
         ],
-        payment: [
+        settleStyleSn: [
           { required: true, message: '请选择收款方式', trigger: 'change' }
         ]
       },
+      custAllList: [], //  客户 下拉数据
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
-      addrDistrictList: [] //  区下拉
+      addrDistrictList: [], //  区下拉
+      tenantList: [], // 业务员 下拉
+      custId: undefined, // 客户id
+      isEdit: true //  是否可编辑
     }
   },
   methods: {
+    // 客户 select
+    custSelect (id) {
+      this.custId = id
+      this.isEdit = false
+      this.getDetail()
+    },
+    // 客户 change
+    custChange (val) {
+      this.custId = undefined
+      this.isEdit = true
+    },
+    //  获取详情
+    getDetail () {
+      custFindById({ id: this.custId }).then(res => {
+        if (res.status == 200) {
+          if (res.data.provinceSn) { this.getArea('city', res.data.provinceSn) }
+          if (res.data.citySn) { this.getArea('district', res.data.citySn) }
+          this.form = Object.assign(this.form, res.data)
+        } else {
+          this.$refs.ruleForm.resetFields()
+        }
+      })
+    },
     //  保存
     handleSubmit (e) {
       e.preventDefault()
       const _this = this
-      this.$emit('ok', { id: 1000, customName: '车领主常青二路店' })
-      this.cancel()
-      // this.$refs.ruleForm.validate(valid => {
-      //   if (valid) {
-      //     const form = values.form
-      //     form.desc = _this.form.desc
-      //     form.id = this.isEdit ? this.$route.params.id : null
-      //     console.log(form,'-----提交信息')
-      //     // goodsSave(form).then(res => {
-      //     //   if (res.status == 200) {
-      //     //     _this.$message.success(res.message)
-      //     //   }
-      //     // })
-      //   } else {
-      //     console.log('error submit!!')
-      //     return false
-      //   }
-      // })
+      // this.$emit('ok', { id: 1000, customName: '车领主常青二路店' })
+      // this.cancel()
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          console.log('-------------提交信息', _this.form)
+          //     const form = values.form
+          //     form.desc = _this.form.desc
+          //     form.id = this.isEdit ? this.$route.params.id : null
+          //     console.log(form,'-----提交信息')
+          //     // goodsSave(form).then(res => {
+          //     //   if (res.status == 200) {
+          //     //     _this.$message.success(res.message)
+          //     //   }
+          //     // })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
     },
     cancel () {
       this.opened = false
       this.$refs.ruleForm.resetFields()
       this.$emit('cancel')
     },
+    // 客户无分页列表数据
+    getCustAllList () {
+      const _this = this
+      custAllList().then(res => {
+        if (res.status == 200) {
+          _this.custAllList = res.data || []
+        } else {
+          _this.custAllList = []
+        }
+      })
+    },
     // 获取城市列表
     getCityList (val) {
       this.addrCityList = []
       this.addrDistrictList = []
-      this.form.cityCode = undefined
-      this.form.districtCode = undefined
-      this.form.address = ''
+      this.form.citySn = undefined
+      this.form.countySn = undefined
+      this.form.customerAddr = ''
       this.getArea('city', val)
     },
     // 获取区县列表
     getAreaList (val) {
       this.addrDistrictList = []
-      this.form.districtCode = undefined
-      this.form.address = ''
+      this.form.countySn = undefined
+      this.form.customerAddr = ''
       this.getArea('district', val)
     },
     // 区县变更
     areaCharged (val) {
-      this.form.address = ''
+      this.form.customerAddr = ''
     },
     //  省/市/区
     getArea (type, sn) {
@@ -324,6 +364,11 @@ export default {
           }
         }
       })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
     }
   },
   watch: {
@@ -331,6 +376,7 @@ export default {
       this.opened = newValue
       if (newValue) {
         this.getArea('province')
+        this.getCustAllList()
       }
     }
   }