Browse Source

Merge remote-tracking branch 'origin/master'

master
dimengzhe 2 years ago
parent
commit
d1493ef5bd
  1. 194
      anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehudangan/kehudanganAdd.vue
  2. 1
      anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/relation/cheliangtaizhangChu.vue

194
anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehudangan/kehudanganAdd.vue

@ -23,7 +23,7 @@
</el-col>
<el-col :span="8">
<el-form-item prop="name">
<el-input v-model="temp.name" placeholder="请输入客户名称" style="width:50%" class="addinputw" clearable/>
<el-input v-model="temp.name" :disabled="Status == 'edit'" placeholder="请输入客户名称" style="width:50%" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
@ -45,7 +45,7 @@
</el-col>
<el-col :span="8">
<el-form-item prop="mobile">
<el-input v-model="temp.mobile" maxlength="20" placeholder="请输入联系电话" style="width:50%" class="addinputw" clearable/>
<el-input v-model="temp.mobile" :disabled="Status == 'edit'" maxlength="20" placeholder="请输入联系电话" style="width:50%" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
@ -154,9 +154,7 @@
</el-col>
<el-col :span="8">
<el-form-item>
<!-- <el-date-picker v-model="temp.endDate" style="width:50%" type="date" format="yyyy-MM-dd" class="addinputw" value-format="yyyy-MM-dd" placeholder="请选择"/>-->
<el-date-picker v-model="temp.birthday" style="width:50%" type="date" format="yyyy-MM-dd"
class="addinputw" value-format="yyyy-MM-dd" placeholder="请选择"/>
<el-date-picker v-model="temp.birthday" style="width:50%" type="date" format="yyyy-MM-dd" class="addinputw" value-format="yyyy-MM-dd" placeholder="请选择"/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
@ -179,9 +177,6 @@
</el-col>
<el-col :span="8">
<el-form-item>
<!-- <el-select v-model="temp.certificateType" class="addinputw" placeholder="请选择证件类型" @change="getZhengJian">
<el-option v-for="(item, index) in cateType" :key="index.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select> -->
<el-input v-model="temp.certificateType" style="width:50%" maxlength="20" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
@ -192,9 +187,7 @@
</el-col>
<el-col :span="8">
<el-form-item prop="idnumber">
<el-input v-model="temp.idnumber" style="width:50%" maxlength="18" placeholder="请输入证件号码"
class="addinputw" clearable
@keyup.native="temp.idnumber = oninput(temp.idnumber)"/>
<el-input v-model="temp.idnumber" style="width:50%" maxlength="18" placeholder="请输入证件号码" class="addinputw" clearable @keyup.native="temp.idnumber = oninput(temp.idnumber)"/>
</el-form-item>
</el-col>
</el-row>
@ -216,8 +209,7 @@
</el-col>
<el-col :span="8">
<el-form-item prop="e_mail">
<el-input v-model="temp.e_mail" maxlength="20" style="width:50%" placeholder="请输入电子邮箱"
class="addinputw" clearable/>
<el-input v-model="temp.e_mail" maxlength="20" style="width:50%" placeholder="请输入电子邮箱" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
@ -340,8 +332,7 @@
</el-checkbox>
</el-checkbox-group><!-- -->
<div class="mw">
<el-input v-model="templooke.purchase_num" :disabled="templooke.purchase_time == '0'"
maxlength="10" class="addinputwduan" clearable/>
<el-input v-model="templooke.purchase_num" :disabled="templooke.purchase_time == '0'" maxlength="10" class="addinputwduan" clearable/>
</div>
</div>
@ -415,19 +406,17 @@
</template>
<script>
import {getPcCustomerInfoBySid, savePcCustomerInfo, updatePcCustomerInfo,} from '@/api/jichuxinxi/crmcustomer'
import {getCity, getCounty, getProvince} from '@/api/portal/areaPicker' //
import {typeValues} from '@/api/dictcommons/shujuzidian'
import {loginDetails} from '@/api/dictcommons/basemanufacturer'
import {getStorage} from '@/utils/auth'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import {getPcBusinessInfoBySid} from '@/api/jichuxinxi/crmbusiness'
import { getPcCustomerInfoBySid, savePcCustomerInfo, updatePcCustomerInfo } from '@/api/jichuxinxi/crmcustomer'
import { getCity, getCounty, getProvince } from '@/api/portal/areaPicker' //
import { typeValues } from '@/api/dictcommons/shujuzidian'
import { loginDetails } from '@/api/dictcommons/basemanufacturer'
import { getStorage } from '@/utils/auth'
import { getPcBusinessInfoBySid } from '@/api/jichuxinxi/crmbusiness'
import Upload from '@/components/uploadFile/ManyImageUpload.vue' //
export default {
name: 'KehudanganAdd',
components: {Pagination, pageye, Upload},
components: { Upload },
data() {
var checkSubmit = (rule, value, callback) => {
const Submit =
@ -445,18 +434,18 @@ export default {
// callback(new Error(''))
}
var validatePass2 = (rule, value, callback) => {
const WeiXin = /^[a-zA-Z][a-zA-Z\d_-]{5,19}$/;
const phone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
const WeiXin = /^[a-zA-Z][a-zA-Z\d_-]{5,19}$/
const phone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
if (value) {
//
if (!WeiXin.test(value) && !phone.test(value)) {
callback(new Error("请输入正确的微信号码"));
callback(new Error('请输入正确的微信号码'))
}
callback();
callback()
} else {
callback();
callback()
}
};
}
var identitycard = (rules, value, callback) => {
const card =
/[^0-9.]/
@ -492,10 +481,11 @@ export default {
//
pickerOptions: {
disabledDate(time) {
let oneDay = 60 * 60 * 24 * 1000;
return time.getTime() < Date.now() - oneDay;
},
let oneDay = 60 * 60 * 24 * 1000
return time.getTime() < Date.now() - oneDay
}
},
Status: '',
editState: false,
isOnRemind: '是',
// ---
@ -542,16 +532,13 @@ export default {
{
dictValue: '续购',
divtkey: 1
},
}
],
Customeryou: '',
checkin: '', //
kehusid: '',
YongHuid: [],
stateId: 0,
FormLoading: false,
listLoading: false,
tempdaat: {},
crmVisitAppendixDtoList: [],
temp: {
crmBusinessDto: {},
@ -563,22 +550,7 @@ export default {
orgSid: ''
}, //
templooke: {},
tempmore: {},
textMap: {
update: '修改',
create: '创建',
},
dialogFormVisible: false,
client: '',
clientphone: '',
sids: [],
listQuery: {
current: 1,
size: 20,
params: {
distributorName: ''
}
},
clientSid: '',
rules: {
name: [
@ -598,16 +570,16 @@ export default {
mobile: [
{
required: true,
validator: checkSubmit,
trigger: 'blur',
},
message: '请填写联系电话',
trigger: 'blur'
}
],
weixin: [
{
required: true,
validator: validatePass2,
trigger: 'blur',
},
trigger: 'blur'
}
],
// idnumber: [
// {
@ -620,16 +592,16 @@ export default {
{
required: true,
validator: validateE_mail,
trigger: 'blur',
},
trigger: 'blur'
}
],
emergencyMobile: [
{
required: true,
validator: checkSubmit,
trigger: 'blur',
},
],
trigger: 'blur'
}
]
}
}
},
@ -638,8 +610,8 @@ export default {
},
methods: {
oninput(val, limit = 0) {
val = val.replace(/[^\d.]/g, '') //
val = val.replace(/^00/, '0.') //0
val = val.replace(/[^\d.]/g, '') //
val = val.replace(/^00/, '0.') // 0
// val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); //
// /^0\d+/.test(val) ? val = val.slice(1) : '' //0
// const str = '^(\\d+)\\.(\\d{' + limit + '}).*$'
@ -670,6 +642,9 @@ export default {
if (response.code === '200') {
// this.$refs['dataForm'].clearValidate()
this.temp = response.data
if (this.temp.name !== '') {
this.Status = 'edit'
}
if (this.temp.birthday == 'NaN-NaN-NaN NaN:NaN:NaN'){
this.temp.birthday = ''
}
@ -719,6 +694,7 @@ export default {
this.temp.visitWayKey = customerTypeList.visitWayKey
this.$refs['dataForm'].clearValidate()
this.stateId = '0'
this.Status = 'add'
if (this.temp.customerType !== '') {
if (this.temp.customerType === '个人') {
this.temp.certificateType = '身份证'
@ -892,6 +868,7 @@ export default {
this.isOnRemind = '是'
this.editState = false
this.activeNames = ['1']
this.Status = ''
this.$emit('handleReturn')
},
//
@ -955,7 +932,7 @@ export default {
type: 'customerType',
name: e.dictValue,
value: e.dictKey,
sid: e.sid,
sid: e.sid
}
}
})
@ -969,36 +946,43 @@ export default {
return
}
if (this.stateId === '0') {
this.temp.dto1 = this.templooke // this.templooke
this.temp.userSid = this.YongHuid.sid
this.temp.staffSid = this.YongHuid.staffSid
this.temp.orgSid = this.YongHuid.organizationSid
this.temp.crmBusinessDto = this.templooke
this.getUrl()
this.temp.crmVisitAppendixDtoList = this.crmVisitAppendixDtoList
savePcCustomerInfo(this.temp).then((response) => {
this.FormLoading = false
if (response.code === '200') {
// this.clientSid = response.data
this.$notify({
title: '提示',
message: '添加成功',
type: 'success',
duration: 2000
})
this.templooke = {}
this.activeNames = ['1']
this.list1 = []
this.$emit('handleReturn')
} else if (response.code === '511' || response.code === '513') {
const tip = '客户名称、联系电话一经保存,无法修改,是否继续保存'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.temp.dto1 = this.templooke // this.templooke
this.temp.userSid = this.YongHuid.sid
this.temp.staffSid = this.YongHuid.staffSid
this.temp.orgSid = this.YongHuid.organizationSid
this.temp.crmBusinessDto = this.templooke
this.getUrl()
this.temp.crmVisitAppendixDtoList = this.crmVisitAppendixDtoList
savePcCustomerInfo(this.temp).then((response) => {
this.FormLoading = false
this.dialogFormVisible = true
this.stateId = response.data
} else {
alert(200)
}
}).catch(function(reson, data) {
if (response.code === '200') {
// this.clientSid = response.data
this.$notify({
title: '提示',
message: '添加成功',
type: 'success',
duration: 2000
})
this.templooke = {}
this.activeNames = ['1']
this.list1 = []
this.$emit('handleReturn')
} else if (response.code === '511' || response.code === '513') {
this.FormLoading = false
this.dialogFormVisible = true
this.stateId = response.data
} else {
alert(200)
}
}).catch(function(reson, data) {
})
})
} else {
this.temp.crmBusinessDto = this.templooke // this.templooke
@ -1013,7 +997,7 @@ export default {
title: '提示',
message: '修改成功',
type: 'success',
duration: 2000,
duration: 2000
})
this.templooke = {}
this.activeNames = ['1']
@ -1023,7 +1007,7 @@ export default {
title: '提示',
message: '修改失败',
type: 'error',
duration: 2000,
duration: 2000
})
}
})
@ -1040,7 +1024,7 @@ export default {
title: '提示',
message: '用户名手机号重复',
type: 'error',
duration: 2000,
duration: 2000
})
this.dialogFormVisible = false
return
@ -1072,11 +1056,11 @@ export default {
getZhengJian(value) {
let bb = null
this.cateType.forEach((e) => {
if (e.dictKey == value) {
if (e.dictKey === value) {
bb = {
type: 'documenttype',
name: e.dictValue,
vaule: e.dictKey,
vaule: e.dictKey
}
}
})
@ -1108,7 +1092,7 @@ export default {
getFenLei(value) {
let bb = null
this.merClass.forEach((e) => {
if (e.dictKey == value) {
if (e.dictKey === value) {
bb = {
type: 'customerClass',
name: e.dictValue,
@ -1123,7 +1107,7 @@ export default {
getKeHuLaiYUan(value) {
let bb = null
this.sourceLisst.forEach((e) => {
if (e.dictKey == value) {
if (e.dictKey === value) {
bb = {
type: 'customerSource',
name: e.dictValue,
@ -1138,7 +1122,7 @@ export default {
getJiBie(value) {
let bb = null
this.induslevel.forEach((e) => {
if (e.dictKey == value) {
if (e.dictKey === value) {
bb = {
type: 'customerLevel',
name: e.dictValue,
@ -1153,7 +1137,7 @@ export default {
getLaiFang(value) {
let bb = null
this.industway.forEach((e) => {
if (e.dictKey == value) {
if (e.dictKey === value) {
bb = {
type: 'visitWay',
name: e.dictValue,
@ -1168,7 +1152,7 @@ export default {
getHangYe(value) {
let bb = null
this.industry_type.forEach((e) => {
if (e.dictKey == value) {
if (e.dictKey === value) {
bb = {
type: 'industrytype',
name: e.dictValue,
@ -1183,7 +1167,7 @@ export default {
getHuoWuLeiXing(value) {
let bb = null
this.signmentT.forEach((e) => {
if (e.dictKey == value) {
if (e.dictKey === value) {
bb = {
type: 'consignmentType',
name: e.dictValue,
@ -1198,7 +1182,7 @@ export default {
getHuoWu(value) {
let bb = null
this.consign.forEach((e) => {
if (e.dictKey == value) {
if (e.dictKey === value) {
bb = {
type: 'consignment',
name: e.dictValue,

1
anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/relation/cheliangtaizhangChu.vue

@ -464,6 +464,7 @@ export default {
this.temp.price = resp.data.singleFinalPrice
this.temp.concatNo = resp.data.contractNo
this.temp.customerName = resp.data.customerName
this.temp.customerNo = resp.data.customerNo
this.temp.customerSid = resp.data.customerSid
this.temp.mobile = resp.data.mobile
this.temp.giftsDescription = resp.data.totaldiscount

Loading…
Cancel
Save