Commit d82eeebd authored by Smile's avatar Smile Committed by wux

bug321 编辑客户,已填写竞争对手=其他,无法保存,例如Z24530

parent 1cbec5fb
...@@ -246,7 +246,6 @@ ...@@ -246,7 +246,6 @@
<el-form-item :label="$t('主要竞争对手')" prop="competitorIds"> <el-form-item :label="$t('主要竞争对手')" prop="competitorIds">
<el-select filterable clearable v-model="form.competitorIds" :placeholder="$t('请选择')" @change="changeCompetitor"> <el-select filterable clearable v-model="form.competitorIds" :placeholder="$t('请选择')" @change="changeCompetitor">
<el-option v-for="item in competitorList" :key="item.id" :label="item.name" :value="item.id" /> <el-option v-for="item in competitorList" :key="item.id" :label="item.name" :value="item.id" />
<el-option :label="$t('其他')" :value="0" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -883,7 +882,7 @@ export default { ...@@ -883,7 +882,7 @@ export default {
{ {
required: true, required: true,
message: this.$t("请选择主要竞争对手"), message: this.$t("请选择主要竞争对手"),
trigger: "change" trigger: "blur"
} }
], ],
pickupPoints: [ pickupPoints: [
...@@ -1139,14 +1138,12 @@ export default { ...@@ -1139,14 +1138,12 @@ export default {
this.$modal.msgError(this.$t("至少填写一个联系人信息")) this.$modal.msgError(this.$t("至少填写一个联系人信息"))
return return
} }
if (this.form.competitorIds == 0 && !this.potential) { if (this.form.customerService === this.userId){
this.$modal.msgError(this.$t("请重新选择主要竞争对手")) if (this.form.competitorIds == 0) {
return this.$modal.msgError(this.$t("请重新选择主要竞争对手"))
} return
if (this.form.competitorIds == 0 && !this.potential) { }
return
} }
// 重货标准和泡货标准,未打开就不传,提交前清空一下 // 重货标准和泡货标准,未打开就不传,提交前清空一下
if (!this.showZhong) { if (!this.showZhong) {
this.form.weightUnit = null this.form.weightUnit = null
...@@ -1318,9 +1315,11 @@ export default { ...@@ -1318,9 +1315,11 @@ export default {
pickupPoints: this.stringArrToNumberArr(response.data.pickupPoints), pickupPoints: this.stringArrToNumberArr(response.data.pickupPoints),
productIds: this.stringArrToNumberArr(response.data.productIds), productIds: this.stringArrToNumberArr(response.data.productIds),
busiCountryIds: this.stringArrToNumberArr(response.data.busiCountryIds), busiCountryIds: this.stringArrToNumberArr(response.data.busiCountryIds),
competitorIds: Number(response.data.competitorIds),
productTypes: this.stringArrToNumberArr(response.data.productTypes) productTypes: this.stringArrToNumberArr(response.data.productTypes)
} }
if (response.data.competitorIds){
this.form.competitorIds = Number(response.data.competitorIds)
}
if (!this.form.products) { if (!this.form.products) {
this.form.products = [] this.form.products = []
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment