|
@@ -32,8 +32,8 @@
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
<a-row :gutter="15">
|
|
<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-row :gutter="15">
|
|
<!-- 客户地址 -->
|
|
<!-- 客户地址 -->
|
|
<a-col span="8">
|
|
<a-col span="8">
|
|
@@ -60,8 +60,8 @@
|
|
</a-row>
|
|
</a-row>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</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
|
|
<a-input
|
|
id="chooseCustom-shippingAddress"
|
|
id="chooseCustom-shippingAddress"
|
|
:maxLength="60"
|
|
:maxLength="60"
|
|
@@ -86,8 +86,18 @@
|
|
<a-form-model-item label="联系电话" prop="consigneeTel">
|
|
<a-form-model-item label="联系电话" prop="consigneeTel">
|
|
<a-input
|
|
<a-input
|
|
id="chooseCustom-consigneeTel"
|
|
id="chooseCustom-consigneeTel"
|
|
- :maxLength="11"
|
|
|
|
|
|
+ :maxLength="15"
|
|
v-model="form.consigneeTel"
|
|
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个字符)"
|
|
placeholder="请输入联系电话(最多11个字符)"
|
|
allowClear />
|
|
allowClear />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
@@ -208,8 +218,8 @@ export default {
|
|
title: '选择客户',
|
|
title: '选择客户',
|
|
confirmLoading: false,
|
|
confirmLoading: false,
|
|
formItemLayout: {
|
|
formItemLayout: {
|
|
- labelCol: { span: 8 },
|
|
|
|
- wrapperCol: { span: 16 }
|
|
|
|
|
|
+ labelCol: { span: 6 },
|
|
|
|
+ wrapperCol: { span: 18 }
|
|
},
|
|
},
|
|
buyerSnBak: '', // 更改前客户sn备份
|
|
buyerSnBak: '', // 更改前客户sn备份
|
|
priceTypeBak: '', // 更改前客户价格类型备份
|
|
priceTypeBak: '', // 更改前客户价格类型备份
|
|
@@ -217,6 +227,7 @@ export default {
|
|
buyerName: '', // 客户名称
|
|
buyerName: '', // 客户名称
|
|
buyerSn: undefined, // 客户sn
|
|
buyerSn: undefined, // 客户sn
|
|
consigneeTel: '', // 联系电话
|
|
consigneeTel: '', // 联系电话
|
|
|
|
+ contactMobile: '',
|
|
consigneeName: '', // 联系人
|
|
consigneeName: '', // 联系人
|
|
shippingAddressProvinceSn: undefined, // 省
|
|
shippingAddressProvinceSn: undefined, // 省
|
|
shippingAddressProvinceName: '',
|
|
shippingAddressProvinceName: '',
|
|
@@ -229,7 +240,7 @@ export default {
|
|
dispatchType: undefined, // 配送方式
|
|
dispatchType: undefined, // 配送方式
|
|
satelliteFlag: 0, // 是否卫星仓客户
|
|
satelliteFlag: 0, // 是否卫星仓客户
|
|
priceType: undefined, // 价格类型
|
|
priceType: undefined, // 价格类型
|
|
- settleStyleSn: '', // 收款方式
|
|
|
|
|
|
+ settleStyleSn: undefined, // 收款方式
|
|
salesManSn: undefined, // 业务员
|
|
salesManSn: undefined, // 业务员
|
|
salesManName: '',
|
|
salesManName: '',
|
|
distributionFlag: '0', // 铺货出库
|
|
distributionFlag: '0', // 铺货出库
|
|
@@ -240,7 +251,7 @@ export default {
|
|
buyerSn: [
|
|
buyerSn: [
|
|
{ required: true, message: '请选择客户', trigger: ['change', 'blur'] }
|
|
{ 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: [
|
|
shippingAddressProvinceSn: [
|
|
{ required: true, message: '请选择省', trigger: 'change' }
|
|
{ required: true, message: '请选择省', trigger: 'change' }
|
|
],
|
|
],
|
|
@@ -250,9 +261,6 @@ export default {
|
|
shippingAddressCountySn: [
|
|
shippingAddressCountySn: [
|
|
{ required: true, message: '请选择区/县', trigger: 'change' }
|
|
{ required: true, message: '请选择区/县', trigger: 'change' }
|
|
],
|
|
],
|
|
- shippingAddress: [
|
|
|
|
- { required: true, message: '请输入详细地址', trigger: 'blur' }
|
|
|
|
- ],
|
|
|
|
priceType: [
|
|
priceType: [
|
|
{ required: true, message: '请选择价格类型', trigger: ['change', 'blur'] }
|
|
{ required: true, message: '请选择价格类型', trigger: ['change', 'blur'] }
|
|
],
|
|
],
|
|
@@ -305,28 +313,33 @@ export default {
|
|
// 客户 change
|
|
// 客户 change
|
|
custChange (obj) {
|
|
custChange (obj) {
|
|
const _this = this
|
|
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 {
|
|
} 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, // 客户名称
|
|
buyerName: data.customerName, // 客户名称
|
|
buyerSn: data.customerSn, // 客户sn
|
|
buyerSn: data.customerSn, // 客户sn
|
|
consigneeTel: data.contactTel, // 联系电话
|
|
consigneeTel: data.contactTel, // 联系电话
|
|
|
|
+ contactMobile: data.contactMobile,
|
|
consigneeName: data.contactName, // 联系人
|
|
consigneeName: data.contactName, // 联系人
|
|
shippingAddressProvinceSn: data.provinceSn, // 省
|
|
shippingAddressProvinceSn: data.provinceSn, // 省
|
|
shippingAddressProvinceName: data.provinceName,
|
|
shippingAddressProvinceName: data.provinceName,
|
|
@@ -381,6 +395,7 @@ export default {
|
|
customerName: this.form.buyerName,
|
|
customerName: this.form.buyerName,
|
|
customerSn: this.form.buyerSn,
|
|
customerSn: this.form.buyerSn,
|
|
contactTel: this.form.consigneeTel, // 联系电话
|
|
contactTel: this.form.consigneeTel, // 联系电话
|
|
|
|
+ contactMobile: this.form.contactMobile,
|
|
contactName: this.form.consigneeName, // 联系人
|
|
contactName: this.form.consigneeName, // 联系人
|
|
provinceSn: this.form.shippingAddressProvinceSn, // 省
|
|
provinceSn: this.form.shippingAddressProvinceSn, // 省
|
|
provinceName: this.form.shippingAddressProvinceName,
|
|
provinceName: this.form.shippingAddressProvinceName,
|
|
@@ -409,6 +424,7 @@ export default {
|
|
handleSubmit (e) {
|
|
handleSubmit (e) {
|
|
e.preventDefault()
|
|
e.preventDefault()
|
|
const _this = this
|
|
const _this = this
|
|
|
|
+ console.log(_this.form, '------save')
|
|
this.$refs.ruleForm.validate(valid => {
|
|
this.$refs.ruleForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
// 如果价格类型改变,提示
|
|
// 如果价格类型改变,提示
|
|
@@ -455,6 +471,7 @@ export default {
|
|
this.opened = false
|
|
this.opened = false
|
|
this.$emit('cancel')
|
|
this.$emit('cancel')
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
|
|
+ this.$refs.custList.resetForm()
|
|
},
|
|
},
|
|
cancelNewCust () {
|
|
cancelNewCust () {
|
|
this.isNewCust = false
|
|
this.isNewCust = false
|