Просмотр исходного кода

bug修复,开销售单选择客户、新增客户、客户管理-新增客户、销售退货选择客户 新增联系手机字段

chenrui 3 лет назад
Родитель
Сommit
4e82568fcf

+ 1 - 0
src/views/customerManagement/customerInfo/detailModal.vue

@@ -15,6 +15,7 @@
           <a-descriptions-item label="客户名称:">{{ detailData&&detailData.customerName || '--' }}</a-descriptions-item>
           <a-descriptions-item label="联系人:">{{ detailData&&detailData.contactName || '--' }}</a-descriptions-item>
           <a-descriptions-item label="联系电话:">{{ detailData&&detailData.contactTel || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="联系手机:">{{ detailData&&detailData.contactMobile || '--' }}</a-descriptions-item>
           <a-descriptions-item label="客户地址:" :span="3">{{ addressStr }}</a-descriptions-item>
           <a-descriptions-item label="客户传真:">{{ detailData&&detailData.fax || '--' }}</a-descriptions-item>
           <a-descriptions-item label="配送方式:">{{ detailData&&detailData.dispatchTypeDictValue || '--' }}</a-descriptions-item>

+ 13 - 8
src/views/customerManagement/customerInfo/edit.vue

@@ -30,7 +30,12 @@
             </a-col>
             <a-col :span="8">
               <a-form-model-item label="联系电话" prop="contactTel">
-                <a-input id="customerManagementEdit-contactTel" :maxLength="11" v-model.trim="form.contactTel" placeholder="请输入联系电话(最多11个字符)" allowClear />
+                <a-input id="customerManagementEdit-contactTel" :maxLength="15" v-model.trim="form.contactTel" placeholder="请输入联系电话(最多15个字符)" allowClear />
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="8">
+              <a-form-model-item label="联系手机" prop="contactMobile">
+                <a-input id="customerManagementEdit-contactMobile" :maxLength="11" v-model.trim="form.contactMobile" placeholder="请输入联系手机(最多11个字符)" allowClear />
               </a-form-model-item>
             </a-col>
             <a-col :span="8">
@@ -40,8 +45,8 @@
             </a-col>
           </a-row>
           <a-row :gutter="15">
-            <a-col :span="16">
-              <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 4 }" :wrapperCol="{ span: 20 }">
+            <a-col :span="24">
+              <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 3 }" :wrapperCol="{ span: 20 }">
                 <a-row :gutter="15">
                   <!-- 客户地址 -->
                   <a-col span="8">
@@ -68,8 +73,8 @@
                 </a-row>
               </a-form-model-item>
             </a-col>
-            <a-col :span="8">
-              <a-form-model-item label="" prop="customerAddr">
+            <a-col :span="24">
+              <a-form-model-item label="详细地址" prop="customerAddr" :labelCol="{ span: 3 }" :wrapperCol="{ span: 20 }">
                 <a-input id="customerManagementEdit-customerAddr" :maxLength="60" v-model.trim="form.customerAddr" placeholder="请输入详细地址(最多60个字符)" allowClear />
               </a-form-model-item>
             </a-col>
@@ -146,12 +151,13 @@ export default {
       spinning: false,
       formItemLayout: {
         labelCol: { span: 9 },
-        wrapperCol: { span: 15 }
+        wrapperCol: { span: 14 }
       },
       form: {
         id: null,
         customerName: '', // 客户名称
         contactTel: '', //  联系电话
+        contactMobile: '', //  联系手机
         contactName: '', //  联系人
         provinceSn: undefined, //  省
         provinceName: '',
@@ -169,11 +175,10 @@ export default {
       },
       rules: {
         customerName: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
-        contactTel: [{ required: true, message: '请输入联系电话', trigger: 'blur' }, { pattern: /^\d{11}$/, message: '请输入正确的手机号' }],
+        contactMobile: [{ required: false, pattern: /^\d{11}$/, message: '请输入正确的手机号', trigger: 'blur' }],
         provinceSn: [{ required: true, message: '请选择省', trigger: 'change' }],
         citySn: [{ required: true, message: '请选择市', trigger: 'change' }],
         countySn: [{ required: true, message: '请选择区/县', trigger: 'change' }],
-        customerAddr: [{ required: true, message: '请输入详细地址', trigger: 'blur' }],
         priceType: [{ required: true, message: '请选择价格类型', trigger: 'change' }],
         settleStyleSn: [{ required: true, message: '请选择收款方式', trigger: 'change' }]
       },

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

@@ -91,7 +91,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1240, y: tableHeight }"
+        :scroll="{ x: 1400, y: tableHeight }"
         bordered>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -154,8 +154,9 @@ export default {
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'customerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { 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: 'contactName', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '联系电话', dataIndex: 'contactTel', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '联系手机', dataIndex: 'contactMobile', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '最后销售时间', dataIndex: 'lastSaleTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '是否卫星仓', dataIndex: 'satelliteFlagDictValue', width: 110, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '启用禁用', scopedSlots: { customRender: 'enableAction' }, width: 100, align: 'center', fixed: 'right' },

+ 50 - 33
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -32,8 +32,8 @@
           </a-col>
         </a-row>
         <a-row :gutter="15">
-          <a-col :span="16">
-            <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 4 }" :wrapperCol="{ span: 20 }">
+          <a-col :span="24">
+            <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 2 }" :wrapperCol="{ span: 22 }">
               <a-row :gutter="15">
                 <!-- 客户地址 -->
                 <a-col span="8">
@@ -60,8 +60,8 @@
               </a-row>
             </a-form-model-item>
           </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="" prop="shippingAddress">
+          <a-col :span="24">
+            <a-form-model-item label="详细地址" prop="shippingAddress" :labelCol="{ span: 2 }" :wrapperCol="{ span: 22 }">
               <a-input
                 id="chooseCustom-shippingAddress"
                 :maxLength="60"
@@ -86,8 +86,18 @@
             <a-form-model-item label="联系电话" prop="consigneeTel">
               <a-input
                 id="chooseCustom-consigneeTel"
-                :maxLength="11"
+                :maxLength="15"
                 v-model="form.consigneeTel"
+                placeholder="请输入联系电话(最多15个字符)"
+                allowClear />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item label="联系手机" prop="contactMobile">
+              <a-input
+                id="chooseCustom-contactMobile"
+                :maxLength="11"
+                v-model="form.contactMobile"
                 placeholder="请输入联系电话(最多11个字符)"
                 allowClear />
             </a-form-model-item>
@@ -208,8 +218,8 @@ export default {
       title: '选择客户',
       confirmLoading: false,
       formItemLayout: {
-        labelCol: { span: 8 },
-        wrapperCol: { span: 16 }
+        labelCol: { span: 6 },
+        wrapperCol: { span: 18 }
       },
       buyerSnBak: '', // 更改前客户sn备份
       priceTypeBak: '', // 更改前客户价格类型备份
@@ -217,6 +227,7 @@ export default {
         buyerName: '', // 客户名称
         buyerSn: undefined, // 客户sn
         consigneeTel: '', //  联系电话
+        contactMobile: '',
         consigneeName: '', //  联系人
         shippingAddressProvinceSn: undefined, //  省
         shippingAddressProvinceName: '',
@@ -229,7 +240,7 @@ export default {
         dispatchType: undefined, //  配送方式
         satelliteFlag: 0, //  是否卫星仓客户
         priceType: undefined, //  价格类型
-        settleStyleSn: '', //  收款方式
+        settleStyleSn: undefined, //  收款方式
         salesManSn: undefined, //  业务员
         salesManName: '',
         distributionFlag: '0', // 铺货出库
@@ -240,7 +251,7 @@ export default {
         buyerSn: [
           { required: true, message: '请选择客户', trigger: ['change', 'blur'] }
         ],
-        consigneeTel: [{ required: true, message: '请输入联系电话', trigger: 'blur' }, { pattern: /^\d{11}$/, message: '请输入正确的手机号' }],
+        contactMobile: [{ required: false, pattern: /^\d{11}$/, message: '请输入正确的手机号', trigger: 'blur' }],
         shippingAddressProvinceSn: [
           { required: true, message: '请选择省', trigger: 'change' }
         ],
@@ -250,9 +261,6 @@ export default {
         shippingAddressCountySn: [
           { required: true, message: '请选择区/县', trigger: 'change' }
         ],
-        shippingAddress: [
-          { required: true, message: '请输入详细地址', trigger: 'blur' }
-        ],
         priceType: [
           { required: true, message: '请选择价格类型', trigger: ['change', 'blur'] }
         ],
@@ -305,28 +313,33 @@ export default {
     // 客户 change
     custChange (obj) {
       const _this = this
-      const cust = obj.row
-      this.form.buyerSn = cust.customerSn
-      // 编辑
-      if (this.isEdit) {
-        this.$confirm({
-          title: '提示',
-          content: '更换客户后信息需要重新完善,确认要更换吗?',
-          centered: true,
-          onOk () {
-            _this.custId = cust.id
-            _this.form.buyerName = cust.customerName
-            _this.priceTypeDisabled = false
-            _this.getDetail()
-          },
-          onCancel () {
-            _this.form.buyerSn = _this.buyerSnBak
-          }
-        })
+      if (obj && obj.key) {
+        const cust = obj.row
+        this.form.buyerSn = cust.customerSn
+        // 编辑
+        if (this.isEdit) {
+          this.$confirm({
+            title: '提示',
+            content: '更换客户后信息需要重新完善,确认要更换吗?',
+            centered: true,
+            onOk () {
+              _this.custId = cust.id
+              _this.form.buyerName = cust.customerName
+              _this.priceTypeDisabled = false
+              _this.getDetail()
+            },
+            onCancel () {
+              _this.form.buyerSn = _this.buyerSnBak
+            }
+          })
+        } else {
+          _this.custId = cust.id
+          _this.form.buyerName = cust.customerName
+          _this.getDetail()
+        }
       } else {
-        _this.custId = cust.id
-        _this.form.buyerName = cust.customerName
-        _this.getDetail()
+        this.$refs.ruleForm.resetFields()
+        this.$refs.custList.resetForm()
       }
     },
     // 编辑客户信息
@@ -352,6 +365,7 @@ export default {
             buyerName: data.customerName, // 客户名称
             buyerSn: data.customerSn, // 客户sn
             consigneeTel: data.contactTel, //  联系电话
+            contactMobile: data.contactMobile,
             consigneeName: data.contactName, //  联系人
             shippingAddressProvinceSn: data.provinceSn, //  省
             shippingAddressProvinceName: data.provinceName,
@@ -381,6 +395,7 @@ export default {
         customerName: this.form.buyerName,
         customerSn: this.form.buyerSn,
         contactTel: this.form.consigneeTel, //  联系电话
+        contactMobile: this.form.contactMobile,
         contactName: this.form.consigneeName, //  联系人
         provinceSn: this.form.shippingAddressProvinceSn, //  省
         provinceName: this.form.shippingAddressProvinceName,
@@ -409,6 +424,7 @@ export default {
     handleSubmit (e) {
       e.preventDefault()
       const _this = this
+      console.log(_this.form, '------save')
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           // 如果价格类型改变,提示
@@ -455,6 +471,7 @@ export default {
       this.opened = false
       this.$emit('cancel')
       this.$refs.ruleForm.resetFields()
+      this.$refs.custList.resetForm()
     },
     cancelNewCust () {
       this.isNewCust = false

+ 22 - 14
src/views/salesManagement/salesReturn/chooseCustomModal.vue

@@ -32,8 +32,8 @@
           </a-col> -->
         </a-row>
         <a-row :gutter="15">
-          <a-col :span="16">
-            <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 4 }" :wrapperCol="{ span: 20 }">
+          <a-col :span="24">
+            <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 2 }" :wrapperCol="{ span: 22 }">
               <a-row :gutter="15">
                 <!-- 客户地址 -->
                 <a-col span="8">
@@ -60,8 +60,8 @@
               </a-row>
             </a-form-model-item>
           </a-col>
-          <a-col :span="8">
-            <a-form-model-item label="" prop="customerAddr">
+          <a-col :span="24">
+            <a-form-model-item label="详细地址" prop="customerAddr" :labelCol="{ span: 2 }" :wrapperCol="{ span: 22 }">
               <a-input
                 id="chooseCustom-customerAddr"
                 :maxLength="60"
@@ -86,9 +86,19 @@
             <a-form-model-item label="联系电话" prop="consigneeTel">
               <a-input
                 id="chooseCustom-consigneeTel"
-                :maxLength="30"
+                :maxLength="15"
                 v-model="form.consigneeTel"
-                placeholder="请输入联系电话(最多30个字符)"
+                placeholder="请输入联系电话(最多15个字符)"
+                allowClear />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item label="联系手机" prop="contactMobile">
+              <a-input
+                id="chooseCustom-contactMobile"
+                :maxLength="11"
+                v-model="form.contactMobile"
+                placeholder="请输入联系手机(最多11个字符)"
                 allowClear />
             </a-form-model-item>
           </a-col>
@@ -144,14 +154,15 @@ export default {
       title: '选择客户',
       confirmLoading: false,
       formItemLayout: {
-        labelCol: { span: 8 },
-        wrapperCol: { span: 16 }
+        labelCol: { span: 6 },
+        wrapperCol: { span: 18 }
       },
       buyerSnBak: '', // 更改前客户sn备份
       form: {
         buyerName: '', // 客户名称
         buyerSn: undefined, // 客户sn
         consigneeTel: '', //  联系电话
+        contactMobile: '',
         consigneeName: '', //  联系人
         priceType: '', // 价格类型
         provinceSn: undefined, //  省
@@ -167,9 +178,7 @@ export default {
         buyerSn: [
           { required: true, message: '请选择客户', trigger: ['change', 'blur'] }
         ],
-        consigneeTel: [
-          { required: true, message: '请输入联系电话', trigger: 'blur' }
-        ],
+        contactMobile: [{ required: false, pattern: /^\d{11}$/, message: '请输入正确的手机号', trigger: 'blur' }],
         provinceSn: [
           { required: true, message: '请选择省', trigger: 'change' }
         ],
@@ -179,9 +188,6 @@ export default {
         countySn: [
           { required: true, message: '请选择区/县', trigger: 'change' }
         ],
-        customerAddr: [
-          { required: true, message: '请输入详细地址', trigger: 'blur' }
-        ],
         grabFlag: [
           { required: true, message: '请选择是否铺货出库', trigger: 'change' }
         ]
@@ -262,6 +268,7 @@ export default {
             buyerName: data.customerName, // 客户名称
             buyerSn: data.customerSn, // 客户sn
             consigneeTel: data.contactTel, //  联系电话
+            contactMobile: data.contactMobile,
             consigneeName: data.contactName, //  联系人
             provinceSn: data.provinceSn, //  省
             provinceName: data.provinceName,
@@ -286,6 +293,7 @@ export default {
         customerName: this.form.buyerName,
         customerSn: this.form.buyerSn,
         contactTel: this.form.consigneeTel, //  联系电话
+        contactMobile: this.form.contactMobile,
         contactName: this.form.consigneeName, //  联系人
         provinceSn: this.form.provinceSn, //  省
         provinceName: this.form.provinceName,