|
|
|
@ -7,7 +7,7 @@ |
|
|
|
|
<div class="per_title" v-preventReClick @click="goback()"> |
|
|
|
|
<i class="el-icon-arrow-left"></i> |
|
|
|
|
<span class="per_back">返回</span> |
|
|
|
|
<span class="per_school" v-text="customerId != '' ? '编辑客户信息' : '新增客户信息'"></span> |
|
|
|
|
<span class="per_school" v-text="customerId ? '编辑客户信息' : '新增客户信息'"></span> |
|
|
|
|
</div> |
|
|
|
|
<el-button type="primary" size="small" round class="mag" v-preventReClick @click="saveAdd('form')">确定</el-button> |
|
|
|
|
</div> |
|
|
|
@ -21,39 +21,36 @@ |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
<el-form :model="form" :rules="rules" ref="form" label-width="120px" class="flex-start-around"> |
|
|
|
|
<el-form :model="form" :rules="rules" ref="form" label-width="120px" class="flex-start-around" :disabled="isDetail"> |
|
|
|
|
<el-col :span="6" style="margin-right: 60px;"> |
|
|
|
|
<el-form-item label="国家"> |
|
|
|
|
<el-form-item prop="countries" label="国家"> |
|
|
|
|
<el-select v-model="form.countries" clearable placeholder="请选择国家"> |
|
|
|
|
<el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.name"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item prop="schoolId" label="客户名称"> |
|
|
|
|
<el-select v-model="form.schoolId" filterable clearable placeholder="请选择学校" |
|
|
|
|
@change="SchoolChange" @clear="clearSchool()"> |
|
|
|
|
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option> |
|
|
|
|
<el-form-item prop="provinceId" label="省份"> |
|
|
|
|
<el-select v-model="form.provinceId" placeholder="" disabled> |
|
|
|
|
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="省份"> |
|
|
|
|
<el-select v-model="form.provinces" placeholder="" disabled> |
|
|
|
|
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-form-item label="到期时间"> |
|
|
|
|
<el-date-picker type="date" disabled v-model="form.expireDate" style="width: 100%;" value-format="yyyy-MM-dd"></el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item prop="adminName" label="联系人姓名"> |
|
|
|
|
<el-input placeholder="请输入联系人姓名" v-model="form.adminName"></el-input> |
|
|
|
|
<el-form-item prop="industryClassId" label="行业类型"> |
|
|
|
|
<el-select v-model="form.industryClassId" clearable placeholder="请选择行业类型" @change="changIndustry" @clear="clearIndustry()"> |
|
|
|
|
<el-option v-for="(item,index) in IndustryClassList" :key="index" :label="item.industryClassName" :value="item.industryClassId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item prop="adminName" label="账号"> |
|
|
|
|
<el-input placeholder="请输入账号" v-model="form.adminName"></el-input> |
|
|
|
|
<el-form-item prop="name" label="联系人姓名"> |
|
|
|
|
<el-input placeholder="请输入联系人姓名" v-model="form.name"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item prop="IndustryClass" label="行业类"> |
|
|
|
|
<el-select v-model="form.IndustryClass" clearable placeholder="请选择行业类" @change="changIndustry" @clear="clearIndustry()"> |
|
|
|
|
<el-option v-for="(item,index) in IndustryClassList" :key="index" :label="item.industryClassName" :value="item.industryClassId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-form-item prop="account" label="账号"> |
|
|
|
|
<el-input placeholder="请输入账号" v-model="form.account"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item prop="email" label="邮箱"> |
|
|
|
@ -62,40 +59,36 @@ |
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
<el-col :span="6" style="margin-left: 60px;"> |
|
|
|
|
<el-form-item label="客户类型"> |
|
|
|
|
<el-select v-model="form.customerType" disabled placeholder=""> |
|
|
|
|
<el-form-item prop="customerType" label="客户类型"> |
|
|
|
|
<el-select v-model="form.customerType" placeholder="请选择客户类型"> |
|
|
|
|
<el-option v-for="(item,index) in customerTypeList" :key="index" :label="item.name" :value="item.value"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="学校类型"> |
|
|
|
|
<el-select v-model="form.level" placeholder="" disabled> |
|
|
|
|
<el-option v-for="(item,index) in levelList" :key="index" :label="item.name" :value="item.value"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="城市"> |
|
|
|
|
<el-select v-model="form.city" placeholder="" disabled> |
|
|
|
|
<el-form-item prop="cityId" label="城市"> |
|
|
|
|
<el-select v-model="form.cityId" placeholder="" disabled> |
|
|
|
|
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="手机号"> |
|
|
|
|
<el-input placeholder="请输入联系人手机号" v-model="form.adminPhone" maxlength="11"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="职务"> |
|
|
|
|
<el-input placeholder="请输入职务名称" v-model="form.adminPhone" maxlength="11"></el-input> |
|
|
|
|
<el-form-item prop="customerId" label="客户名称"> |
|
|
|
|
<el-select v-model="form.customerId" filterable clearable placeholder="请选择学校" @change="SchoolChange" @clear="clearSchool()"> |
|
|
|
|
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item prop="industry" label="行业"> |
|
|
|
|
<el-select v-model="form.industry" clearable placeholder="请选择行业" :disabled="form.IndustryClass ? false : true"> |
|
|
|
|
<el-form-item prop="industryId" label="行业"> |
|
|
|
|
<el-select v-model="form.industryId" clearable placeholder="请选择行业" :disabled="form.industryClassId ? false : true"> |
|
|
|
|
<el-option v-for="(item,index) in industryList" :key="index" :label="item.industryName" :value="item.industryId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="到期时间"> |
|
|
|
|
<el-date-picker type="date" disabled v-model="form.stopTime" style="width: 100%;" value-format="yyyy-MM-dd"></el-date-picker> |
|
|
|
|
<el-form-item label="手机号"> |
|
|
|
|
<el-input placeholder="请输入联系人手机号" v-model="form.phone" maxlength="11"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="职务"> |
|
|
|
|
<el-input placeholder="请输入职务名称" v-model="form.position" maxlength="11"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-form> |
|
|
|
@ -114,18 +107,47 @@ |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="courseName" label="课程名称" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="usePeriod" label="使用期限(年)" align="center"> |
|
|
|
|
<el-table-column prop="usePeriod" label="使用期限" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="usePeriod" label="起止日期" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="usePeriod" label="剩余期限(天)" align="center"> |
|
|
|
|
<el-table-column prop="usePeriod" label="剩余期限" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="marketPrice" label="市场价(万)" align="center"> |
|
|
|
|
<el-table-column label="端口地址" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button @click="configure(scope.row)">配置</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="transactionPrice" label="成交价(万)" align="center"> |
|
|
|
|
<el-table-column label="状态" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-switch |
|
|
|
|
v-model="scope.row.isDeliverGoods" |
|
|
|
|
:active-value="1" |
|
|
|
|
:inactive-value="0" |
|
|
|
|
active-text="启用" |
|
|
|
|
inactive-text="禁用" |
|
|
|
|
disabled> |
|
|
|
|
</el-switch> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="discount" label="折扣率(%)" align="center"> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="mgb20" v-show="customerId"> |
|
|
|
|
<div class="flex-center mgb20 user_header"> |
|
|
|
|
<p class="addhr_tag"></p> |
|
|
|
|
<span>数据平台权限</span> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
<el-table :data="coursePermissionss" class="orderTable" stripe header-align="center"> |
|
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="courseName" label="产品名称" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="usePeriod" label="使用期限" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="usePeriod" label="起止日期" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="usePeriod" label="剩余期限" align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="usePeriod" label="账号数" align="center"></el-table-column> |
|
|
|
|
<el-table-column label="端口地址" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button @click="configure(scope.row)">配置</el-button> |
|
|
|
@ -156,19 +178,21 @@ |
|
|
|
|
<el-table :data="contractInformations" class="table" stripe header-align="center"> |
|
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="contractInformationNumber" label="合同编号" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="contractInformationName" label="合同名称" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="contractInformationNumber" label="合同编号" align="center"> |
|
|
|
|
<el-table-column prop="contractInformationName" label="合同期限" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="contractInformationSum" label="合同金额" align="center"> |
|
|
|
|
<el-table-column prop="contractInformationLink" label="产品内容" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="contractInformationLink" label="合同文件" align="center"> |
|
|
|
|
<el-table-column prop="contractInformationSum" label="合同金额" align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<!-- <el-table-column prop="payamount" label="操作" align="center"> |
|
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
|
<template> |
|
|
|
|
<el-button type="text">配置</el-button> |
|
|
|
|
<el-button type="text">查看</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
@ -230,38 +254,55 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
export default { |
|
|
|
|
name: 'baseform', |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
customerId : this.$route.query.id, |
|
|
|
|
isDetail : Boolean(this.$route.query.show), |
|
|
|
|
customerData: [], |
|
|
|
|
form: { |
|
|
|
|
schoolId: '', |
|
|
|
|
customerId: '', |
|
|
|
|
customerName: '', |
|
|
|
|
countries: '中国', |
|
|
|
|
IndustryClass: '', |
|
|
|
|
industry: '', |
|
|
|
|
provinces: '', |
|
|
|
|
adminName: '', |
|
|
|
|
adminPhone: '', |
|
|
|
|
city: '', |
|
|
|
|
industryClassId: '', |
|
|
|
|
industryId: '', |
|
|
|
|
provinceId: '', |
|
|
|
|
account: '', |
|
|
|
|
name: '', |
|
|
|
|
phone: '', |
|
|
|
|
position: '', |
|
|
|
|
cityId: '', |
|
|
|
|
customerType: '', |
|
|
|
|
stopTime: '', |
|
|
|
|
expireDate: '', |
|
|
|
|
email: '', |
|
|
|
|
level: '' |
|
|
|
|
}, |
|
|
|
|
rules: { |
|
|
|
|
adminName: [ |
|
|
|
|
{ required: true, message: '请输入管理员姓名', trigger: 'blur' } |
|
|
|
|
countries: [ |
|
|
|
|
{ required: true, message: '请输入国家', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
provinceId: [ |
|
|
|
|
{ required: true, message: '请输入省份', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
adminPhone: [ |
|
|
|
|
{ required: true, message: '请输入管理员手机号', trigger: 'blur' }, |
|
|
|
|
cityId: [ |
|
|
|
|
{ required: true, message: '请输入城市', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
customerType: [ |
|
|
|
|
{ required: true, message: '请选择客户类型', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
name: [ |
|
|
|
|
{ required: true, message: '请输入联系人姓名', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
account: [ |
|
|
|
|
{ required: true, message: '请输入账号', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
phone: [ |
|
|
|
|
{ required: true, message: '请输入手机号', trigger: 'blur' }, |
|
|
|
|
{ |
|
|
|
|
pattern: /^1[3456789]\d{9}$/, |
|
|
|
|
message: '请输入正确的手机号', |
|
|
|
|
trigger: 'blur' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
schoolId: [ |
|
|
|
|
customerId: [ |
|
|
|
|
{ required: true, message: '请选择客户名称', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
email: [ |
|
|
|
@ -272,11 +313,11 @@ export default { |
|
|
|
|
trigger: 'blur' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
industry: [ |
|
|
|
|
industryId: [ |
|
|
|
|
{ required: true, message: '请选择行业', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
IndustryClass: [ |
|
|
|
|
{ required: true, message: '请选择行业类', trigger: 'change' } |
|
|
|
|
industryClassId: [ |
|
|
|
|
{ required: true, message: '请选择行业类型', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
customerTypeList: [{ |
|
|
|
@ -296,30 +337,9 @@ export default { |
|
|
|
|
}], |
|
|
|
|
provinceList: this.$store.state.provinceList, |
|
|
|
|
cityList: [], |
|
|
|
|
levelList: [{ |
|
|
|
|
name: '本科', |
|
|
|
|
value: 1 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '大专', |
|
|
|
|
value: 2 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '高职', |
|
|
|
|
value: 3 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '中专', |
|
|
|
|
value: 4 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '其他', |
|
|
|
|
value: 5 |
|
|
|
|
}], |
|
|
|
|
IndustryClassList: [], |
|
|
|
|
industryList: [], |
|
|
|
|
schoolList: [], |
|
|
|
|
customerId : this.$store.state.customerId, |
|
|
|
|
contractInformations: [], |
|
|
|
|
coursePermissionss: [], |
|
|
|
|
ipVisible: false, |
|
|
|
@ -351,31 +371,31 @@ export default { |
|
|
|
|
mounted() { |
|
|
|
|
this.getIndustryClass() |
|
|
|
|
if(this.customerId){ |
|
|
|
|
let data = { |
|
|
|
|
this.$get(this.api.queryCustomerDetails,{ |
|
|
|
|
customerId: this.customerId |
|
|
|
|
} |
|
|
|
|
this.$get(this.api.queryCustomerDetails,data).then((res) => { |
|
|
|
|
this.form = { |
|
|
|
|
schoolId: res.message[0].customers[0].schoolId, |
|
|
|
|
countries: res.message[0].customers[0].countries, |
|
|
|
|
IndustryClass: res.message[0].customers[0].industryClassId, |
|
|
|
|
industry: res.message[0].customers[0].industryId, |
|
|
|
|
provinces: res.message[0].customers[0].provinceId, |
|
|
|
|
adminName: res.message[0].customers[0].adminName, |
|
|
|
|
adminPhone: res.message[0].customers[0].adminPhone, |
|
|
|
|
city: res.message[0].customers[0].cityId, |
|
|
|
|
level: res.message[0].customers[0].level, |
|
|
|
|
customerType: res.message[0].customers[0].customerType, |
|
|
|
|
stopTime: res.message[0].customers[0].stopTime, |
|
|
|
|
email: res.message[0].customers[0].email, |
|
|
|
|
} |
|
|
|
|
this.contractInformations = res.message[0].contractInformations |
|
|
|
|
this.coursePermissionss = res.message[0].coursePermissionss |
|
|
|
|
this.getCityData() |
|
|
|
|
this.changIndustryData() |
|
|
|
|
this.getSchoolData() |
|
|
|
|
}).catch((res) => { |
|
|
|
|
}) |
|
|
|
|
}).then((res) => { |
|
|
|
|
let customer = res.result.customer |
|
|
|
|
this.form = { |
|
|
|
|
customerId: Number(this.customerId), |
|
|
|
|
countries: customer.countries, |
|
|
|
|
industryClassId: customer.industryClassId, |
|
|
|
|
industryId: customer.industryId, |
|
|
|
|
provinceId: customer.provinceId, |
|
|
|
|
account: customer.account, |
|
|
|
|
phone: customer.phone, |
|
|
|
|
cityId: customer.cityId, |
|
|
|
|
customerType: customer.customerType, |
|
|
|
|
expireDate: customer.expireDate, |
|
|
|
|
email: customer.email, |
|
|
|
|
name: customer.name, |
|
|
|
|
position: customer.position, |
|
|
|
|
} |
|
|
|
|
this.contractInformations = res.result.contractInformations |
|
|
|
|
this.coursePermissionss = res.result.coursePermissionss |
|
|
|
|
this.getCityData() |
|
|
|
|
this.changIndustryData() |
|
|
|
|
this.getSchoolData() |
|
|
|
|
}).catch((res) => {}) |
|
|
|
|
}else{ |
|
|
|
|
this.getSchoolData() |
|
|
|
|
} |
|
|
|
@ -384,7 +404,7 @@ export default { |
|
|
|
|
// 获取城市 |
|
|
|
|
getCityData(){ |
|
|
|
|
let data = { |
|
|
|
|
provinceId: this.form.provinces |
|
|
|
|
provinceId: this.form.provinceId |
|
|
|
|
} |
|
|
|
|
this.$get(this.api.queryCity,data).then(res => { |
|
|
|
|
this.cityList = res.message |
|
|
|
@ -392,9 +412,8 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 清除学校 |
|
|
|
|
clearSchool(){ |
|
|
|
|
this.form.provinces = '', |
|
|
|
|
this.form.city = '', |
|
|
|
|
this.form.level = '', |
|
|
|
|
this.form.provinceId = '', |
|
|
|
|
this.form.cityId = '', |
|
|
|
|
this.form.customerName = '' |
|
|
|
|
}, |
|
|
|
|
// 获取学校/客户名称 |
|
|
|
@ -412,28 +431,23 @@ export default { |
|
|
|
|
SchoolChange(val){ |
|
|
|
|
this.clearSchool() |
|
|
|
|
if(val){ |
|
|
|
|
let obj = {}; |
|
|
|
|
let obj = {} |
|
|
|
|
obj = this.schoolList.find((item)=>{ |
|
|
|
|
return item.schoolId === val; |
|
|
|
|
return item.schoolId === val |
|
|
|
|
}); |
|
|
|
|
this.form.customerName = obj.schoolName |
|
|
|
|
this.form.level = obj.level |
|
|
|
|
this.form.provinces = obj.provinceId |
|
|
|
|
this.form.provinceId = obj.provinceId |
|
|
|
|
this.getCityData() |
|
|
|
|
this.form.city = obj.cityId |
|
|
|
|
this.form.cityId = obj.cityId |
|
|
|
|
|
|
|
|
|
let data = { |
|
|
|
|
schoolId: this.form.schoolId |
|
|
|
|
} |
|
|
|
|
this.$get(this.api.queryCustomerIsExists,data).then(res => { |
|
|
|
|
if(res.message.length != 0){ |
|
|
|
|
this.$message.warning('该客户已存在'); |
|
|
|
|
this.NoAdd = false |
|
|
|
|
}else{ |
|
|
|
|
this.NoAdd = true |
|
|
|
|
} |
|
|
|
|
this.$get(this.api.queryCustomerIsExists,{ |
|
|
|
|
schoolId: this.form.customerId |
|
|
|
|
}).then(res => { |
|
|
|
|
this.NoAdd = true |
|
|
|
|
}).catch(res => { |
|
|
|
|
}); |
|
|
|
|
this.$message.warning('该客户已存在') |
|
|
|
|
this.NoAdd = false |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 获取行业类 |
|
|
|
@ -444,7 +458,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 清除行业类 |
|
|
|
|
clearIndustry(){ |
|
|
|
|
this.form.industry = '' |
|
|
|
|
this.form.industryId = '' |
|
|
|
|
}, |
|
|
|
|
// 获取行业 |
|
|
|
|
changIndustry(){ |
|
|
|
@ -453,7 +467,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
changIndustryData(){ |
|
|
|
|
let data = { |
|
|
|
|
industryClassId: this.form.IndustryClass |
|
|
|
|
industryClassId: this.form.industryClassId |
|
|
|
|
} |
|
|
|
|
this.$get(this.api.queryCustomerIndustry,data).then(res => { |
|
|
|
|
this.industryList = res.message |
|
|
|
@ -465,44 +479,42 @@ export default { |
|
|
|
|
if(this.NoAdd){ |
|
|
|
|
let obj = {}; |
|
|
|
|
obj = this.schoolList.find((item)=>{ |
|
|
|
|
return item.schoolId === this.form.schoolId; |
|
|
|
|
return item.schoolId == this.form.customerId; |
|
|
|
|
}); |
|
|
|
|
this.form.customerName = obj.schoolName |
|
|
|
|
this.form.level = obj.level |
|
|
|
|
this.form.provinces = obj.provinceId |
|
|
|
|
this.form.provinceId = obj.provinceId |
|
|
|
|
this.getCityData() |
|
|
|
|
this.form.city = obj.cityId |
|
|
|
|
this.form.cityId = obj.cityId |
|
|
|
|
let data = { |
|
|
|
|
customerName: this.form.customerName, |
|
|
|
|
schoolId: this.form.schoolId, |
|
|
|
|
customerId: this.form.customerId, |
|
|
|
|
schoolId: this.form.customerId, |
|
|
|
|
countries: this.form.countries, |
|
|
|
|
industryClassId: this.form.IndustryClass, |
|
|
|
|
industryId: this.form.industry, |
|
|
|
|
provinceId: this.form.provinces, |
|
|
|
|
adminName: this.form.adminName, |
|
|
|
|
adminPhone: this.form.adminPhone, |
|
|
|
|
cityId: this.form.city, |
|
|
|
|
level: this.form.level, |
|
|
|
|
industryClassId: this.form.industryClassId, |
|
|
|
|
industryId: this.form.industryId, |
|
|
|
|
provinceId: this.form.provinceId, |
|
|
|
|
account: this.form.account, |
|
|
|
|
phone: this.form.phone, |
|
|
|
|
cityId: this.form.cityId, |
|
|
|
|
customerType: this.form.customerType, |
|
|
|
|
stopTime: this.form.stopTime, |
|
|
|
|
expireDate: this.form.expireDate, |
|
|
|
|
email: this.form.email, |
|
|
|
|
customerId: this.customerId |
|
|
|
|
name: this.form.name, |
|
|
|
|
position: this.form.position |
|
|
|
|
} |
|
|
|
|
if(this.customerId){ |
|
|
|
|
this.$post(this.api.updateCustomer,data).then((res) => { |
|
|
|
|
this.$message.success('编辑成功'); |
|
|
|
|
this.goback() |
|
|
|
|
}).catch((res) => { |
|
|
|
|
}) |
|
|
|
|
this.$message.success('编辑成功') |
|
|
|
|
this.goback() |
|
|
|
|
}).catch((res) => {}) |
|
|
|
|
}else{ |
|
|
|
|
this.$post(this.api.addCustomer,data).then((res) => { |
|
|
|
|
this.$message.success('添加成功'); |
|
|
|
|
this.goback() |
|
|
|
|
}).catch((res) => { |
|
|
|
|
}) |
|
|
|
|
this.$message.success('添加成功') |
|
|
|
|
this.goback() |
|
|
|
|
}).catch((res) => {}) |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
this.$message.warning('该客户已存在'); |
|
|
|
|
this.$message.warning('该客户已存在') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -520,15 +532,15 @@ export default { |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
|
.addhr_tag{ |
|
|
|
|
background-color: #666; |
|
|
|
|
width: 6px; |
|
|
|
|
height: 17px; |
|
|
|
|
margin-right: 5px; |
|
|
|
|
} |
|
|
|
|
.radio_icon{ |
|
|
|
|
font-size: 26px; |
|
|
|
|
color: #9278FF; |
|
|
|
|
} |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.addhr_tag{ |
|
|
|
|
background-color: #666; |
|
|
|
|
width: 6px; |
|
|
|
|
height: 17px; |
|
|
|
|
margin-right: 5px; |
|
|
|
|
} |
|
|
|
|
.radio_icon{ |
|
|
|
|
font-size: 26px; |
|
|
|
|
color: #9278FF; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|