Commit db2f25ac authored by zhengyi's avatar zhengyi

客户-编辑,当客户所属客户经理非当前用户,保存必填校验去掉客户类别,常用提货网点,业务国家,主营类别

parent e4f19dfb
......@@ -382,7 +382,6 @@
<el-switch v-model="form.arrivalConfirm" :active-value="1" :inactive-value="0" />
</el-form-item>
</el-col>
<el-col :span="13">
<el-form-item :label="$t('重货标准')" prop="weightUnit">
<el-switch v-model="showZhong" disabled />
......@@ -615,6 +614,7 @@ import { getDictDatas, DICT_TYPE } from "@/utils/dict"
import upload from "@/components/ImageUpload"
import { createCustomer, getCustomer, getCustomerList, getCustomerPage, memberUserList, updateCustomer, userMemberUserList, getCustomerLines, fillupCustomeInfo, getServiceNetwork, addCompetitor, competitorListAll } from "@/api/ecw/customer"
import { getNodeList } from "@/api/ecw/node"
import user from "@/store/modules/user"
import { getProductTypeList } from "@/api/ecw/productType"
import { getProductList } from "@/api/ecw/product"
import { getTradeCityList } from "@/api/ecw/region"
......@@ -695,7 +695,64 @@ export default {
}
// 掉入公海时间
this.enterOpenSeaTime = this.form.estimateEnterOpenSeaTime || this.form.enterOpenSeaTime || undefined
if (!this.form.customerService || (this.form.customerService !== user.state.id)){
console.log(!this.form.customerService? "当前客户没有客户经理" : "与当前登录用户的客户经理不同")
// 当前客户没有客户经理,或者与当前登录用户的客户经理不同, 可以不校验部分必填字段
// 2024-12-03 客户-编辑,当客户所属客户经理非当前用户,保存必填校验去掉客户类别,常用提货网点,业务国家,主营类别
// 表单校验
this.rules = {
name: [
{
required: true,
message: this.$t("客户名称不能为空"),
trigger: "blur"
}
],
country: [{ required: true, message: this.$t("国家不能为空"), trigger: "blur" }],
level: [
{
required: true,
message: this.$t("客户等级不能为空"),
trigger: "blur"
}
],
createTime: [
{
required: true,
message: this.$t("创建时间不能为空"),
trigger: "blur"
}
],
source: [
{
required: true,
message: this.$t("客户来源不能为空"),
trigger: "blur"
}
],
customerService: [
{
required: this.customerId === "0",
message: this.$t("客户经理不能为空"),
trigger: "blur"
}
],
status: [
{
required: true,
message: this.$t("客户状态不能为空"),
trigger: "blur"
}
],
competitorIds: [
{
required: true,
message: this.$t("请选择主要竞争对手"),
trigger: "change"
}
]
}
}
if (customerId) {
// 获取重泡货路线
getCustomerLines(customerId).then((res) => {
......@@ -708,6 +765,7 @@ export default {
})
}
})
// 判断当前客登录用户是否为当前客户的客户经理
this.getProductListFn([])
} else {
this.getZhongPao()
......
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