|
|
|
|
@ -325,7 +325,7 @@ import {getparameter} from '@/api/system/dictionary'
|
|
|
|
|
import {save, getInfo} from '@/api/customer'
|
|
|
|
|
import {save as orderSave} from '@/api/order'
|
|
|
|
|
import {getList as productList} from "@/api/product";
|
|
|
|
|
import {getBirth,getSex} from '@/utils'
|
|
|
|
|
import {getBirth,getSex,getAgeByIdcard} from '@/utils'
|
|
|
|
|
import moment from "moment";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
@ -560,6 +560,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
customerIdcard:'',
|
|
|
|
|
form1: {
|
|
|
|
|
product_id: '',
|
|
|
|
|
product_type_id:'',
|
|
|
|
|
@ -722,6 +723,7 @@ export default {
|
|
|
|
|
this.$successMessage(this.type, '客户')
|
|
|
|
|
this.flag = 2
|
|
|
|
|
this.form1.customer_id = res.id
|
|
|
|
|
this.customerIdcard = res.idcard
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
@ -729,6 +731,15 @@ export default {
|
|
|
|
|
//订单
|
|
|
|
|
productPick(e){
|
|
|
|
|
this.pickedProduct = e
|
|
|
|
|
//判断年龄
|
|
|
|
|
let age = getAgeByIdcard(this.customerIdcard)
|
|
|
|
|
if(age > 50 || age < 18){
|
|
|
|
|
this.$message({
|
|
|
|
|
type:'warning',
|
|
|
|
|
message:'该客户不在产品服务年龄范围内',
|
|
|
|
|
duration:2000
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
this.form1.product_id = e.id
|
|
|
|
|
this.form1.product_type_id = e.product_type_id
|
|
|
|
|
|
|
|
|
|
|