diff --git a/src/views/InstallmentApply/AddInstallmentApply.vue b/src/views/InstallmentApply/AddInstallmentApply.vue
index d4c296a8..3c131aba 100644
--- a/src/views/InstallmentApply/AddInstallmentApply.vue
+++ b/src/views/InstallmentApply/AddInstallmentApply.vue
@@ -84,7 +84,7 @@
-
+
@@ -173,7 +173,7 @@
-
+
@@ -642,6 +642,19 @@ export default {
name: 'AddInstallmentApply',
components: { MyRepository, MyMater, MyDetail, MyEmp, MyPackage },
data() {
+ const validatePass12 = (rule, value, callback) => {
+ if (!value) {
+ return callback(new Error('担保人手机号不能为空'))
+ }
+ setTimeout(() => {
+ console.log(String(value).length)
+ if (String(value).length !== 11) {
+ callback(new Error('请输入担保人正确手机号码'))
+ } else {
+ callback()
+ }
+ }, 1000)
+ }
const validatePass = (rule, value, callback) => {
if (this.salePersonId === undefined || this.salePersonId === null || this.salePersonId === '') {
callback(new Error('请选择销售人员'))
@@ -856,7 +869,7 @@ export default {
{ required: true, message: '请输入担保人姓名', trigger: 'blur' }
],
suretyPhone: [
- { required: true, message: '请输入担保人电话', trigger: 'blur' }
+ { required: true, validator: validatePass12, trigger: 'blur' }
],
relationship: [
{ required: true, message: '请选择担保人关系', trigger: 'blur' }
@@ -1485,6 +1498,18 @@ export default {
})
return false
}
+ if (this.personalForm.email !== null && this.personalForm.email !== undefined && this.personalForm.email !== '') {
+ var email2 = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/
+ const flag = email2.test(this.personalForm.email)
+ if (!flag) {
+ this.$notify.error({
+ title: 'wrong',
+ message: '请输入正确的邮箱地址',
+ offset: 100
+ })
+ return false
+ }
+ }
const nowlistdata = this.$refs.editable.getRecords()
if (nowlistdata.length === 0) {
this.$notify.error({
diff --git a/src/views/InstallmentApply/components/MyDialog.vue b/src/views/InstallmentApply/components/MyDialog.vue
index 6e711d71..880a64ac 100644
--- a/src/views/InstallmentApply/components/MyDialog.vue
+++ b/src/views/InstallmentApply/components/MyDialog.vue
@@ -83,7 +83,7 @@
-
+
@@ -172,7 +172,7 @@
-
+
@@ -636,6 +636,19 @@ export default {
callback()
}
}
+ const validatePass12 = (rule, value, callback) => {
+ if (!value) {
+ return callback(new Error('担保人手机号不能为空'))
+ }
+ setTimeout(() => {
+ console.log(String(value).length)
+ if (String(value).length !== 11) {
+ callback(new Error('请输入担保人正确手机号码'))
+ } else {
+ callback()
+ }
+ }, 1000)
+ }
const validatePass6 = (rule, value, callback) => {
if (!value) {
return callback(new Error('手机号不能为空'))
@@ -793,7 +806,7 @@ export default {
{ required: true, message: '请输入担保人姓名', trigger: 'blur' }
],
suretyPhone: [
- { required: true, message: '请输入担保人电话', trigger: 'blur' }
+ { required: true, validator: validatePass12, trigger: 'blur' }
],
relationship: [
{ required: true, message: '请选择担保人关系', trigger: 'blur' }
@@ -1357,6 +1370,18 @@ export default {
}
const parms2 = JSON.stringify(Data2)
this.personalForm.modifyPersonId = this.$store.getters.userId
+ if (this.personalForm.email !== null && this.personalForm.email !== undefined && this.personalForm.email !== '') {
+ var email2 = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/
+ const flag = email2.test(this.personalForm.email)
+ if (!flag) {
+ this.$notify.error({
+ title: 'wrong',
+ message: '请输入正确的邮箱地址',
+ offset: 100
+ })
+ return false
+ }
+ }
const Data = this.personalForm
for (const key in Data) {
if (Data[key] === '' || Data[key] === undefined || Data[key] === null) {
diff --git a/src/views/SaleContract/AddSaleContract.vue b/src/views/SaleContract/AddSaleContract.vue
index df029eef..436fa6a1 100644
--- a/src/views/SaleContract/AddSaleContract.vue
+++ b/src/views/SaleContract/AddSaleContract.vue
@@ -18,7 +18,6 @@
-
@@ -1177,6 +1176,9 @@ export default {
installappley(val) {
console.log('源单数据', val)
const date = new Date()
+ this.personalForm.customerId = val.customerId
+ this.customerId = val.applyPersonName
+ this.personalForm.customerPhone = val.applyCellPhone
this.personalForm.saleType = '2'
this.personalForm.sourceNumber = val.applyNumber
this.personalForm.installmentCount = val.installmentCount
diff --git a/src/views/SaleContract/components/MyDialog.vue b/src/views/SaleContract/components/MyDialog.vue
index fbd01cd5..44284d68 100644
--- a/src/views/SaleContract/components/MyDialog.vue
+++ b/src/views/SaleContract/components/MyDialog.vue
@@ -927,8 +927,38 @@ export default {
}
},
installappley(val) {
+ console.log('源单数据', val)
+ const date = new Date()
+ this.personalForm.customerId = val.customerId
+ this.customerId = val.applyPersonName
+ this.personalForm.customerPhone = val.applyCellPhone
+ this.personalForm.saleType = '2'
this.personalForm.sourceNumber = val.applyNumber
this.personalForm.installmentCount = val.installmentCount
+ this.personalForm.dayOfMonth = val.installmentDays
+ this.personalForm.firstMoney = val.firstMoney
+ this.personalForm.totalMoney = val.totalMoney
+ let byear = 0
+ let bmonth = 0
+ let eyear = 0
+ let emonth = 0
+ if (date.getMonth() + 2 >= 12) {
+ byear = date.getFullYear() + 1
+ bmonth = date.getMonth() - 10
+ } else {
+ byear = date.getFullYear()
+ bmonth = date.getMonth() + 2
+ }
+ if (bmonth + val.installmentCount % 12 >= 12) {
+ eyear = byear + parseInt(val.installmentCount / 12) + 1
+ emonth = bmonth + val.installmentCount % 12 - 12
+ } else {
+ eyear = byear + parseInt(val.installmentCount / 12)
+ emonth = bmonth + val.installmentCount % 12
+ }
+ this.personalForm.installmentBegintime = `${byear}-${bmonth}`
+ this.personalForm.installmentEndtime = `${eyear}-${emonth}`
+ this.personalForm.eachMoney = ((val.totalMoney) / val.installmentCount).toFixed(2)
},
// 更新类型
updatecountry() {
diff --git a/src/views/SaleOrder/SaleOrderList.vue b/src/views/SaleOrder/SaleOrderList.vue
index be192317..d0f5187b 100644
--- a/src/views/SaleOrder/SaleOrderList.vue
+++ b/src/views/SaleOrder/SaleOrderList.vue
@@ -137,10 +137,10 @@
- {{ $t('newupd.qqq') }}
- {{ $t('newupd.www') }}
- {{ $t('newupd.eee') }}
- {{ $t('newupd.rrr') }}
+ {{ $t('newupd.qqq') }}
+ {{ $t('newupd.www') }}
+ {{ $t('newupd.eee') }}
+ {{ $t('newupd.rrr') }}
diff --git a/src/views/SaleReport/saleBillList.vue b/src/views/SaleReport/saleBillList.vue
index 680012d5..e046e19c 100644
--- a/src/views/SaleReport/saleBillList.vue
+++ b/src/views/SaleReport/saleBillList.vue
@@ -222,13 +222,13 @@