Selaa lähdekoodia

客户信息:分配功能加必填

lxf 1 vuosi sitten
vanhempi
commit
e37aa12057
2 muutettua tiedostoa jossa 5 lisäystä ja 38 poistoa
  1. 5 2
      src/views/customer/file/index.vue
  2. 0 36
      src/views/customer/highseas/index.vue

+ 5 - 2
src/views/customer/file/index.vue

@@ -279,8 +279,8 @@
       </template>
     </el-dialog>
 
-    <el-dialog title="分配" v-model="openAllocation" width="300">
-      <byForm :formConfig="formConfigAllocation" :formOption="formOption" v-model="formAllocation.data" ref="allocation"> </byForm>
+    <el-dialog title="分配" v-if="openAllocation" v-model="openAllocation" width="300">
+      <byForm :formConfig="formConfigAllocation" :formOption="formOption" v-model="formAllocation.data" :rules="rulesAllocation" ref="allocation"> </byForm>
       <template #footer>
         <el-button @click="openAllocation = false" size="large">取 消</el-button>
         <el-button type="primary" @click="submitAllocation()" size="large">确 定</el-button>
@@ -694,6 +694,9 @@ const formConfigAllocation = computed(() => {
     },
   ];
 });
+let rulesAllocation = ref({
+  userId: [{ required: true, message: "请选择业务员", trigger: "change" }],
+});
 const formConfigAFollow = computed(() => {
   return [
     {

+ 0 - 36
src/views/customer/highseas/index.vue

@@ -279,14 +279,6 @@
       </template>
     </el-dialog>
 
-    <el-dialog title="分配" v-model="openAllocation" width="300">
-      <byForm :formConfig="formConfigAllocation" :formOption="formOption" v-model="formAllocation.data" ref="allocation"> </byForm>
-      <template #footer>
-        <el-button @click="openAllocation = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitAllocation()" size="large">确 定</el-button>
-      </template>
-    </el-dialog>
-
     <el-dialog title="添加跟进记录" v-if="openFollow" v-model="openFollow" width="500" destroy-on-close>
       <byForm :formConfig="formConfigAFollow" :formOption="formOption" v-model="formFollow.data" :rules="rulesFollow" ref="follow">
         <template #fileSlot>
@@ -358,7 +350,6 @@ const loading = ref(false);
 const loadingOperation = ref(false);
 const submitLoading = ref(false);
 const openPerson = ref(false);
-const openAllocation = ref(false);
 const customerTag = ref([]);
 const customerSource = ref([]);
 const customerStatus = ref([]);
@@ -571,9 +562,6 @@ let formData = reactive({
 let formPerson = reactive({
   data: {},
 });
-let formAllocation = reactive({
-  data: {},
-});
 let formFollow = reactive({
   data: {},
 });
@@ -657,18 +645,6 @@ let rules = ref({
   source: [{ required: true, message: "请选择客户来源", trigger: "change" }],
   status: [{ required: true, message: "请选择类型", trigger: "change" }],
 });
-const formConfigAllocation = computed(() => {
-  return [
-    {
-      type: "select",
-      label: "业务员",
-      prop: "userId",
-      itemWidth: 100,
-      data: userList.value,
-      clearable: true,
-    },
-  ];
-});
 const formConfigAFollow = computed(() => {
   return [
     {
@@ -789,18 +765,6 @@ const clickAddPerson = () => {
     ];
   }
 };
-const submitAllocation = () => {
-  allocation.value.handleSubmit(() => {
-    proxy.post("/customer/CustomerAllocation", formAllocation.data).then(() => {
-      ElMessage({
-        message: "分配成功",
-        type: "success",
-      });
-      openAllocation.value = false;
-      getList();
-    });
-  });
-};
 const submitFollow = () => {
   follow.value.handleSubmit(() => {
     if (fileList.value && fileList.value.length > 0) {