mirror of
https://github.com/shawncai/ERP.git
synced 2024-12-28 19:11:00 +08:00
Merge branch 'master' of https://github.com/shawncai/ERP
This commit is contained in:
commit
f79951e394
6 changed files with 97 additions and 13 deletions
|
@ -84,7 +84,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="$t('InstallmentApply.email')" prop="email" style="width: 100%;">
|
||||
<el-form-item :label="$t('InstallmentApply.email')" style="width: 100%;">
|
||||
<el-input v-model="personalForm.email" style="margin-left: 18px;width: 200px" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -173,7 +173,7 @@
|
|||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="$t('InstallmentApply.installmentDays')" prop="installmentDays" style="width: 100%;">
|
||||
<el-input-number v-model="personalForm.installmentDays" :controls="false" style="margin-left: 18px;width: 200px" clearable/>
|
||||
<el-input-number v-model="personalForm.installmentDays" :min="1.00" :max="28.00" :controls="false" style="margin-left: 18px;width: 200px" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
@ -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({
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('InstallmentApply.email')" prop="email" style="width: 100%;">
|
||||
<el-form-item :label="$t('InstallmentApply.email')" style="width: 100%;">
|
||||
<el-input v-model="personalForm.email" style="margin-left: 18px;width: 200px" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -172,7 +172,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="$t('InstallmentApply.installmentDays')" prop="installmentDays" style="width: 100%;">
|
||||
<el-input-number v-model="personalForm.installmentDays" :controls="false" style="margin-left: 18px;width: 200px" clearable/>
|
||||
<el-input-number v-model="personalForm.installmentDays" :min="1.00" :max="28.00" :controls="false" style="margin-left: 18px;width: 200px" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
@ -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) {
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
<el-option :label="$t('prompt.xsjh')" value="1" />
|
||||
<el-option :label="$t('prompt.fqsq')" value="2" />
|
||||
<el-option :label="$t('prompt.wly')" value="3" />
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -137,10 +137,10 @@
|
|||
<el-button v-show="isReview(scope.row)" :title="$t('updates.spi')" type="warning" size="mini" icon="el-icon-view" circle @click="handleReview(scope.row)"/>
|
||||
<el-button v-permission2="['54-57-2', scope.row.createPersonId]" v-show="scope.row.judgeStat === 0" :title="$t('updates.sc')" size="mini" type="danger" icon="el-icon-delete" circle @click="handleDelete(scope.row)"/>
|
||||
<el-button :title="$t('updates.jc')" size="mini" type="primary" icon="el-icon-sort" circle @click="handleReceipt(scope.row)"/>
|
||||
<el-button v-permission="['54-57-22']" v-show="scope.row.judgeStat === 2" type="primary" style="width: 107px" @click="handleMyReceipt1(scope.row)"><span style="margin-left: -15px;">{{ $t('newupd.qqq') }}</span></el-button>
|
||||
<el-button v-permission="['54-57-23']" v-show="scope.row.judgeStat === 2" type="primary" style="width: 107px" @click="handleMyReceipt2(scope.row)"><span style="margin-left: -15px;">{{ $t('newupd.www') }}</span></el-button>
|
||||
<el-button v-permission="['54-57-24']" v-show="scope.row.judgeStat === 2" type="primary" style="width: 107px" @click="handleMyReceipt3(scope.row)"><span style="margin-left: -15px;">{{ $t('newupd.eee') }}</span></el-button>
|
||||
<el-button v-permission="['54-57-25']" v-show="scope.row.judgeStat === 2" type="primary" style="width: 97px" @click="handleMyReceipt4(scope.row)"><span style="margin-left: -15px;">{{ $t('newupd.rrr') }}</span></el-button>
|
||||
<el-button v-permission="['54-57-22']" v-show="scope.row.judgeStat === 2&&scope.row.flag===1" type="primary" style="width: 107px" @click="handleMyReceipt1(scope.row)"><span style="margin-left: -15px;">{{ $t('newupd.qqq') }}</span></el-button>
|
||||
<el-button v-permission="['54-57-23']" v-show="scope.row.judgeStat === 2&&scope.row.flag!==3" type="primary" style="width: 107px" @click="handleMyReceipt2(scope.row)"><span style="margin-left: -15px;">{{ $t('newupd.www') }}</span></el-button>
|
||||
<el-button v-permission="['54-57-24']" v-show="scope.row.judgeStat === 2&&scope.row.flag!==3" type="primary" style="width: 107px" @click="handleMyReceipt3(scope.row)"><span style="margin-left: -15px;">{{ $t('newupd.eee') }}</span></el-button>
|
||||
<el-button v-permission="['54-57-25']" v-show="scope.row.judgeStat === 2&&scope.row.flag!==3" type="primary" style="width: 97px" @click="handleMyReceipt4(scope.row)"><span style="margin-left: -15px;">{{ $t('newupd.rrr') }}</span></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
@ -222,13 +222,13 @@
|
|||
|
||||
<script>
|
||||
import { searchEmpCategory2 } from '@/api/Product'
|
||||
import { getregionlistbyreid } from '@/api/public'
|
||||
import { saleBillList, saleBillListDetail } from '@/api/count'
|
||||
import waves from '@/directive/waves' // Waves directive
|
||||
import Pagination from '@/components/Pagination'
|
||||
import permission from '@/directive/permission/index.js' // 权限判断指令
|
||||
import permission2 from '@/directive/permission2/index.js' // 权限判断指令
|
||||
import checkPermission from '@/utils/permission' // 权限判断函数
|
||||
import { regionlist } from '@/api/public'
|
||||
import MyEmp from './components/MyEmp'
|
||||
import DetailList from './components/DetailList'
|
||||
import MyDialog from './components/MyDialog'
|
||||
|
@ -463,7 +463,9 @@ export default {
|
|||
}))
|
||||
},
|
||||
gettype() {
|
||||
regionlist().then(res => {
|
||||
const param = {}
|
||||
param.regionIds = this.$store.getters.regionId
|
||||
getregionlistbyreid(param).then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
this.regions = this.tranKTree(res.data.data.content)
|
||||
// this.getarrs()
|
||||
|
|
Loading…
Reference in a new issue