Forráskód Böngészése

创建任务弹窗

hlp 1 éve
szülő
commit
7402359ec8

+ 1 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/components/TaskModal/api.ts

@@ -117,3 +117,4 @@ export const ALL_BUSINESS = "/business-opportunity/getAll"; //商机
 export const ALL_CONTACTS = "/contacts/allContacts"; //联系人
 
 export const ALL_USERS = "/user/getSimpleActiveUserList"; //获取所有人
+export const ALL_ORDERS = "/order/list"//销售订单

+ 11 - 5
fhKeeper/formulahousekeeper/customerBuler-crm/src/components/TaskModal/index.vue

@@ -128,9 +128,9 @@
 
 <script lang="ts" setup>
 import { ref, watch } from 'vue';
-import { PRIORITY, TASK_TYPE, TASK_TYPE_FIELD, defalutModalForm, REPEAT_TYPE, CUSTOMER_FORM_URL, defaultGenerateFormData, ALL_CUSTOM, ALL_CLUE, ALL_BUSINESS, ALL_CONTACTS, ALL_USERS, getTaskType } from "./api";
+import { PRIORITY, TASK_TYPE, TASK_TYPE_FIELD, defalutModalForm, REPEAT_TYPE, CUSTOMER_FORM_URL, defaultGenerateFormData, ALL_CUSTOM, ALL_CLUE, ALL_BUSINESS, ALL_CONTACTS, ALL_ORDERS, ALL_USERS, getTaskType } from "./api";
 import { GenerateForm } from "@zmjs/form-design"
-import { get } from '@/utils/request';
+import { get, post } from '@/utils/request';
 import { Delete, Plus } from "@element-plus/icons-vue"
 import { FormInstance, dayjs } from 'element-plus';
 import { getFromValue } from '@/utils/tools';
@@ -155,10 +155,10 @@ watch(() => props.visible, (val) => {
   }
 })
 const customeData = ref<any>([])
-const clueData = ref<any>([])
 const businessData = ref<any>([])
+const orderData = ref<any>([])
+const clueData = ref<any>([])
 watch(() => props.editForm, (val) => {
-
   let taskType = 0;
   if (val) {
     taskType = getTaskType(val);
@@ -175,6 +175,12 @@ watch(() => props.editForm, (val) => {
       taskTypeValueData.value = data;
     }
   })
+  post(ALL_ORDERS, { pageIndex: -1, pageSize: -1 }).then(({ data }) => {
+    orderData.value = data.record;//销售订单
+    if (taskType == 2) {
+      taskTypeValueData.value = data;
+    }
+  })
   get(ALL_CLUE, {}).then(({ data }) => {
     clueData.value = data;//线索
     if (taskType == 3) {
@@ -270,7 +276,7 @@ function changeTaskType(value: TASK_VALUE_TYPE) {
     case 2:
       taskTypeValueData.value = [];
       setTimeout(() => {
-        taskTypeValueData.value = [{ label: "订单1", value: 1 }, { label: "订单2", value: 2 }]
+        taskTypeValueData.value = orderData.value
       }, 500)
       break;
     case 3:

+ 3 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/ImportModal.vue

@@ -14,9 +14,11 @@
       </div>
     </template>
     <div class="text-lg p-5">
-      <div class="pb-5">1. 点击下载 <a href="###" download class="text-[#79BBFF]">任务导入模板</a></div>
+      <div class="pb-5">1. 点击下载 <a href="" download class="text-[#79BBFF]">任务导入模板</a></div>
       <div>2. 填写excel文件, 任务名称与优先级必填</div>
     </div>
+    <!-- <el-link type="primary" style="margin-left:5px;" :underline="false" href="./upload/任务导入模板.xlsx"
+      :download="'任务导入模板.xlsx'">任务导入模板</el-link> -->
   </el-dialog>
 </template>
 <script lang="ts" setup>

+ 0 - 3
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/index.vue

@@ -194,15 +194,12 @@ function submitForm(data: any, isClose: boolean) {
       taskLogs: []
     }
   }
-  // console.log("提交的数据", getFromValue(params));
-  // return;
   taskLoading.value = "2";
   let url = isEdit.value ? UPDATE_TASK : ADD_TASK
   let msg = isEdit.value ? "修改成功" : "新建成功"
   post(url, getFromValue(params)).then(() => {
     taskLoading.value = "3";
     taskModalVisible.value = isClose;
-
     globalPopup?.showSuccess(msg)
     search();
   }).catch(err => {