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

Loading…
Cancel
Save