소스 검색

提交相关代码

Lijy 10 달 전
부모
커밋
f3c619d350

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

@@ -23,9 +23,9 @@ export const defalutModalForm = {
 };
 export const PRIORITY = [
   //优先级
-  { label: "高", value: 0 },
+  { label: "高", value: 2 },
   { label: "中", value: 1 },
-  { label: "低", value: 2 },
+  { label: "低", value: 0 },
 ];
 
 export const TASK_TYPE = [

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

@@ -62,12 +62,12 @@
           </el-form-item>
           <template v-if="[0, 1, 2, 3].includes(form.repeatType)">
             <el-form-item label="每:" v-if="form.repeatType == 3">
-              <el-input-number v-model="form.repeatDesignSameday" controls-position="right" :min="1" />天
+              <el-input-number v-model="form.repeatDesignSameday" :step="1" :precision="0" controls-position="right" :min="1" />天
             </el-form-item>
             <el-form-item label="结束:">
               <el-radio-group v-model="form.endType" @change="changeEndType">
                 <el-radio :label="1" class="w-full">永不</el-radio>
-                <el-radio :label="2" class="w-full mb-3"><el-input-number v-model="form.repeatEndCount" :min="1"
+                <el-radio :label="2" class="w-full mb-3"><el-input-number v-model="form.repeatEndCount" :precision="0" :step="1" :min="1"
                     controls-position="right" :disabled="form.endType != 2" />
                   次以后
                 </el-radio>
@@ -84,7 +84,7 @@
             <el-form-item v-for="(v, i) in customeDate" class="flex justify-between items-center customeDate">
               <div>
                 第{{ i + 1 }}次重复在
-                <el-input-number :model-value="Number(v)" controls-position="right" @change="changeDate(i, $event)"
+                <el-input-number :model-value="Number(v)" :step="1" :precision="0" controls-position="right" @change="changeDate(i, $event)"
                   :min="1" />
                 天后
               </div>
@@ -244,7 +244,11 @@ function submitForm(formEl: FormInstance | undefined, isClose: boolean) {
     if (!valid) {
       return false as any
     }
-    const repeatDesignDay = customeDate.value.join(",")
+    let numList = []
+    if(customeDate.value) {
+      numList = customeDate.value.filter((item: any) => item)
+    }
+    const repeatDesignDay = numList.join(",")
     generateFormRef.value?.getData().then((res: any) => {
       console.log(`{
         ...form.value,
@@ -364,7 +368,6 @@ function addCustomeDateItem() {
   customeDate.value.push(undefined)
 }
 
-
 </script>
 
 <style lang="scss">

+ 6 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/index.vue

@@ -297,7 +297,7 @@ function editNewBusiness(item: any) {
   allLoading.generateFormLading = true
   if (item) {
     editProduct(item)
-    businessTemplateValue.value = item
+    businessTemplateValue.value = editBusinessData(item)
     allText.newBusinessisibleText = '编辑商机'
   }
   if (!item) {
@@ -415,6 +415,11 @@ function editProduct(row: any) {
   })
 }
 
+function editBusinessData(item: any) {
+  const { name, expectedTransactionDate, amountOfMoney = 0, customerId, contactsId, creatorId, stageId, id, inchargerId, remark } = item
+  return { name, expectedTransactionDate, amountOfMoney, customerId, contactsId, creatorId, stageId, id, inchargerId, remark }
+}
+
 function handleSizeChange(val: number) {
   businessOpportunityForm.pageIndex = 1
   businessOpportunityForm.pageFrom = val

+ 12 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/component/products.vue

@@ -15,7 +15,7 @@
                 </el-table-column>
                 <el-table-column prop="productName" label="产品名称" width="200">
                     <template #default="scope">
-                        <el-button link type="primary" size="large">{{
+                        <el-button link type="primary" size="large" @click="toPath(scope.row)">{{
                             scope.row.productName
                         }}</el-button>
                     </template>
@@ -54,11 +54,13 @@
 import { ref, reactive, onMounted, onUnmounted, defineExpose, inject, watchEffect } from 'vue'
 import { GETGENERATEFOEM, GETTABLELISTPRODUCT, URL_OEDERUPDATE } from '../api';
 import { get, post } from '@/utils/request';
+import { useRouter } from "vue-router";
 import RelatedProducts from '@/components/relatedProducts/relatedProducts.vue'
 import { all } from 'axios';
 import { formatDate } from '@/utils/times';
 import { getTemplateKey } from '@/utils/tools';
 
+const router = useRouter()
 const globalPopup = inject<GlobalPopup>('globalPopup')
 const emits = defineEmits(['refreshData']);
 const props = defineProps<{
@@ -83,6 +85,15 @@ const orderTemplate = ref({
     config: {}
 })
 
+function toPath(item: any) {
+    router.push({
+        path: `/tasks`,
+        query: {
+            id: item.id
+        }
+    })
+}
+
 function saveOrder() {
     let productTableListData = relatedProductsRef?.value?.returnData()
     const items: any = infoValue.value