Browse Source

level的值设为英文;distpicker错误提示

preview
ZhaoTongYao 5 years ago
parent
commit
8397d657f5
  1. 4
      epmet-oper-web/public/index.html
  2. 21
      epmet-oper-web/src/views/modules/customer-manage/customer-info.vue
  3. 52
      epmet-oper-web/src/views/modules/customer-manage/customer-manage.vue

4
epmet-oper-web/public/index.html

@ -29,8 +29,8 @@
<!-- 开发环境 --> <!-- 开发环境 -->
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %> <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
<script>window.SITE_CONFIG['apiURL'] = 'https://epmet-dev.elinkservice.cn/api';</script> <!-- <script>window.SITE_CONFIG['apiURL'] = 'https://epmet-dev.elinkservice.cn/api';</script> -->
<!-- <script>window.SITE_CONFIG['apiURL'] = 'http://192.168.1.130:8080/api';</script> --> <script>window.SITE_CONFIG['apiURL'] = 'http://192.168.1.130:8080/api';</script>
<% } %> <% } %>
<!-- 集成测试环境 --> <!-- 集成测试环境 -->
<% if (process.env.VUE_APP_NODE_ENV === 'prod:sit') { %> <% if (process.env.VUE_APP_NODE_ENV === 'prod:sit') { %>

21
epmet-oper-web/src/views/modules/customer-manage/customer-info.vue

@ -6,14 +6,14 @@
<h2>客户信息</h2> <h2>客户信息</h2>
<el-row v-for="(val, key) in data.customerInfoDTO" :key="key" style="margin:10px;font-size:16px;height:30px;line-height:30px;border-bottom:1px solid grey;" :gutter="20"> <el-row v-for="(val, key) in data.customerInfoDTO" :key="key" style="margin:10px;font-size:16px;height:30px;line-height:30px;border-bottom:1px solid grey;" :gutter="20">
<el-col :span="10">{{key|infoName}}</el-col> <el-col :span="10">{{key|infoName}}</el-col>
<el-col :span="14">{{val}}</el-col> <el-col :span="14">{{val|showInfo}}</el-col>
</el-row> </el-row>
</el-row> </el-row>
<el-row> <el-row>
<h2 v-if="data.rootAgencyDTO!=null">根级组织信息</h2> <h2 v-if="data.rootAgencyDTO!=null">根级组织信息</h2>
<el-row v-for="(val, key) in data.rootAgencyDTO" :key="key" style="margin:10px;font-size:16px;height:30px;line-height:30px;border-bottom:1px solid grey;" :gutter="20"> <el-row v-for="(val, key) in data.rootAgencyDTO" :key="key" style="margin:10px;font-size:16px;height:30px;line-height:30px;border-bottom:1px solid grey;" :gutter="20">
<el-col :span="10">{{key|infoName}}</el-col> <el-col :span="10">{{key|infoName}}</el-col>
<el-col :span="14">{{val}}</el-col> <el-col :span="14">{{val|showInfo}}</el-col>
</el-row> </el-row>
</el-row> </el-row>
<el-row> <el-row>
@ -68,6 +68,23 @@ export default {
'男', '男',
'女' '女'
][key] ][key]
},
showInfo (key) {
if (key === 'province') {
return '省级'
} else if (key === 'city') {
return '市级'
} else if (key === 'district') {
return '区县级'
} else if (key === 'street') {
return '乡(镇、街道)级'
} else if (key === 'community') {
return '社区级'
} else if (key === '') {
return '————'
} else {
return key
}
} }
}, },
watch: { watch: {

52
epmet-oper-web/src/views/modules/customer-manage/customer-manage.vue

@ -33,7 +33,7 @@
</el-form-item> </el-form-item>
<el-form-item prop="organizationLevel" label="组织级别"> <el-form-item prop="organizationLevel" label="组织级别">
<el-select v-model="dataForm2.organizationLevel" key="organizationLevel"> <el-select v-model="dataForm2.organizationLevel" key="organizationLevel">
<el-option v-for="(val, key) in organizationLevels" :key="key" :label="val" :value="val"></el-option> <el-option v-for="(val, key) in organizationLevels" :key="key" :label="key" :value="val"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-button type="primary" @click="submitStepHandle">下一步</el-button> <el-button type="primary" @click="submitStepHandle">下一步</el-button>
@ -51,14 +51,14 @@
</el-form-item> </el-form-item>
<el-form-item prop="level" label="组织级别"> <el-form-item prop="level" label="组织级别">
<el-select v-model="dataForm3.level" key="level"> <el-select v-model="dataForm3.level" key="level">
<el-option v-for="(val, key) in organizationLevels" :key="key" :label="val" :value="val"></el-option> <el-option v-for="(val, key) in organizationLevels" :key="key" :label="key" :value="val"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="district" label="选择地区"> <el-form-item :prop="pcd" label="选择地区" :show-message="pcdError">
<v-distpicker :hideArea="isHideArea" :onlyProvince="isOnlyProvince" @province="onChangeProvince" @city="onChangeCity" @area="onChangeArea"></v-distpicker> <v-distpicker :hideArea="isHideArea" :onlyProvince="isOnlyProvince" @province="onChangeProvince" @city="onChangeCity" @area="onChangeArea"></v-distpicker>
</el-form-item> </el-form-item>
<el-form-item prop="areaCode" label="地区编码"> <el-form-item prop="areaCode" label="地区编码">
<el-input v-model="dataForm3.areaCode" key="areaCode"></el-input> <el-input v-model="dataForm3.areaCode" key="areaCode" disabled></el-input>
</el-form-item> </el-form-item>
<el-button type="primary" @click="submitStepHandle">下一步</el-button> <el-button type="primary" @click="submitStepHandle">下一步</el-button>
</el-form> </el-form>
@ -108,8 +108,16 @@ export default {
getDataListURL: '/oper/crm/customer/getvalidcustomerlist', getDataListURL: '/oper/crm/customer/getvalidcustomerlist',
getDataListIsPage: false getDataListIsPage: false
}, },
pcd: 'district',
pcdError: true,
centerDialogVisible: false, centerDialogVisible: false,
organizationLevels: ['社区级', '乡(镇、街道)级', '区县级', '市级', '省级'], organizationLevels: {
'社区级': 'community',
'乡(镇、街道)级': 'street',
'区县级': 'district',
'市级': 'city',
'省级': 'province'
},
genders: ['未知', '男', '女'], genders: ['未知', '男', '女'],
step: 1, step: 1,
details: [], details: [],
@ -268,14 +276,26 @@ export default {
onChangeProvince (e) { onChangeProvince (e) {
this.dataForm3.areaCode = e.code this.dataForm3.areaCode = e.code
this.dataForm3.province = e.value this.dataForm3.province = e.value
this.dataForm3.city = ''
this.dataForm3.district = ''
if (this.pcd === 'province') {
this.pcdError = false
}
}, },
onChangeCity (e) { onChangeCity (e) {
this.dataForm3.areaCode = e.code this.dataForm3.areaCode = e.code
this.dataForm3.city = e.value this.dataForm3.city = e.value
this.dataForm3.district = ''
if (this.pcd === 'city') {
this.pcdError = false
}
}, },
onChangeArea (e) { onChangeArea (e) {
this.dataForm3.areaCode = e.code this.dataForm3.areaCode = e.code
this.dataForm3.district = e.value this.dataForm3.district = e.value
if (this.pcd === 'district') {
this.pcdError = false
}
} }
}, },
computed: { computed: {
@ -297,10 +317,10 @@ export default {
{ required: true, message: '请输入地区编码' } { required: true, message: '请输入地区编码' }
], ],
province: [ province: [
{ required: true, message: '请选择省份' } { required: true, message: '请选择省份', trigger: 'blur' }
], ],
city: [ city: [
{ required: true, message: '请选择城市' } { required: true, message: '请选择城市', trigger: 'blur' }
], ],
district: [ district: [
{ required: true, message: '请选择区县', trigger: 'blur' } { required: true, message: '请选择区县', trigger: 'blur' }
@ -345,15 +365,29 @@ export default {
} }
}, },
'dataForm3.level': function (nVal) { 'dataForm3.level': function (nVal) {
if (nVal === '省级') { this.pcdError = true
this.dataForm3.areaCode = ''
if (nVal === 'province') {
this.isOnlyProvince = true this.isOnlyProvince = true
} else if (nVal === '市级') { this.pcd = 'province'
} else if (nVal === 'city') {
this.isHideArea = true this.isHideArea = true
this.isOnlyProvince = false this.isOnlyProvince = false
this.pcd = 'city'
} else { } else {
this.pcd = 'district'
this.isHideArea = false this.isHideArea = false
this.isOnlyProvince = false this.isOnlyProvince = false
} }
if (nVal !== '') {
this.$nextTick(() => {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
})
})
}
} }
} }
} }

Loading…
Cancel
Save