|
|
@@ -134,7 +134,7 @@
|
|
|
<van-popup v-model="showPicker1" position="bottom">
|
|
|
<van-picker
|
|
|
show-toolbar
|
|
|
- value-key="dictLabel"
|
|
|
+ value-key="remark"
|
|
|
:columns="customerClassifyOption"
|
|
|
@confirm="onConfirm1"
|
|
|
@cancel="showPicker1 = false" />
|
|
|
@@ -252,7 +252,7 @@ export default {
|
|
|
let item = this.customerClassifyOption.find(
|
|
|
(val) => val.dictValue == this.infoData.customerClassify
|
|
|
);
|
|
|
- this.customerClassifyValue = item.dictLabel || '';
|
|
|
+ this.customerClassifyValue = item.remark || '';
|
|
|
this.customerClassify = item.dictValue;
|
|
|
this.getCustomerSubClassify(this.customerClassify);
|
|
|
},
|
|
|
@@ -281,7 +281,8 @@ export default {
|
|
|
}
|
|
|
this.getCustomerClassify();
|
|
|
// 当前客资归属人不是当前登录人
|
|
|
- if (this.infoData.sendUserId != localStorage.getItem('userId')) {
|
|
|
+ let deptIds = JSON.parse(localStorage.getItem('deptIds'));
|
|
|
+ if (deptIds.indexOf(this.infoData.deptId) == -1) {
|
|
|
this.$dialog
|
|
|
.confirm({
|
|
|
title: '提示',
|
|
|
@@ -386,13 +387,26 @@ export default {
|
|
|
},
|
|
|
isRequiredFlag(optionList) {
|
|
|
// console.log(optionList);
|
|
|
- // 必填类型
|
|
|
for (let i = 0; i < optionList.length; i++) {
|
|
|
- if (optionList[i].answerType == 'wb' && optionList[i].isMust == 0) {
|
|
|
+ if (
|
|
|
+ (optionList[i].answerType == 'wb' || optionList[i].answerType == 'wb') &&
|
|
|
+ optionList[i].isMust == 0
|
|
|
+ ) {
|
|
|
if (!optionList[i].answerValue) {
|
|
|
+ // 必填类型
|
|
|
this.requiredFlag = false;
|
|
|
this.requiredMessage = optionList[i].remark;
|
|
|
return;
|
|
|
+ } else {
|
|
|
+ // 条件校验
|
|
|
+ if (optionList[i].minTextLength) {
|
|
|
+ // 输入内容长度校验
|
|
|
+ if (optionList[i].answerValue.length < optionList[i].minTextLength) {
|
|
|
+ this.requiredFlag = false;
|
|
|
+ this.requiredMessage = optionList[i].remark;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -408,7 +422,7 @@ export default {
|
|
|
this.showView = true;
|
|
|
},
|
|
|
onConfirm1(value) {
|
|
|
- this.customerClassifyValue = value.dictLabel;
|
|
|
+ this.customerClassifyValue = value.remark;
|
|
|
this.customerClassify = value.dictValue;
|
|
|
this.showPicker1 = false;
|
|
|
this.getCustomerSubClassify(this.customerClassify);
|