|
@@ -62,8 +62,8 @@
|
|
{{ vantFormVal.contactsIdName }}
|
|
{{ vantFormVal.contactsIdName }}
|
|
</template>
|
|
</template>
|
|
</van-field>
|
|
</van-field>
|
|
- <van-field v-model="vantFormVal.executorId" name="executorId" label="执行人" placeholder="请选择" is-link readonly class="resetStyles"
|
|
|
|
- @click="showSelectionToBox('executorId')">
|
|
|
|
|
|
+ <van-field v-model="vantFormVal.executorId" name="executorId" label="执行人" placeholder="请选择" is-link readonly
|
|
|
|
+ class="resetStyles" @click="showSelectionToBox('executorId')">
|
|
<template #input v-if="vantFormVal.executorIdName && vantFormVal.executorIdName.length > 0">
|
|
<template #input v-if="vantFormVal.executorIdName && vantFormVal.executorIdName.length > 0">
|
|
<TranslationComponent :openId="vantFormVal.executorIdName" />
|
|
<TranslationComponent :openId="vantFormVal.executorIdName" />
|
|
</template>
|
|
</template>
|
|
@@ -119,7 +119,8 @@
|
|
<template v-if="[4, '4'].includes(vantFormVal.repeatType)">
|
|
<template v-if="[4, '4'].includes(vantFormVal.repeatType)">
|
|
<div class="flex items-center justify-between px-8 pt-3">
|
|
<div class="flex items-center justify-between px-8 pt-3">
|
|
<div>自定义日期</div>
|
|
<div>自定义日期</div>
|
|
- <div><van-icon name="add-o" class="ml-2 themeTextColor" size="1.3rem" @click="addCustomeDateItem()" /></div>
|
|
|
|
|
|
+ <div><van-icon name="add-o" class="ml-2 themeTextColor" size="1.3rem" @click="addCustomeDateItem()" />
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<van-cell-group inset class="additionalCoAuthorship">
|
|
<van-cell-group inset class="additionalCoAuthorship">
|
|
<template v-for="(item, index) in customeDate">
|
|
<template v-for="(item, index) in customeDate">
|
|
@@ -129,7 +130,8 @@
|
|
<van-stepper v-model="item.value" :min="0" button-size="1.2rem" theme="round" integer
|
|
<van-stepper v-model="item.value" :min="0" button-size="1.2rem" theme="round" integer
|
|
class="mr-2" />
|
|
class="mr-2" />
|
|
之后
|
|
之后
|
|
- <van-icon name="delete-o" class="ml-2 text-[red]" size="1.3rem" @click="deleteCustomeDateItem(index)" />
|
|
|
|
|
|
+ <van-icon name="delete-o" class="ml-2 text-[red]" size="1.3rem"
|
|
|
|
+ @click="deleteCustomeDateItem(index)" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</van-cell>
|
|
</van-cell>
|
|
@@ -191,7 +193,9 @@ import dayjs from 'dayjs';
|
|
import PullDownSelector from '@components/common/pullDownSelector.vue'
|
|
import PullDownSelector from '@components/common/pullDownSelector.vue'
|
|
import CustomerForm from '@components/common/formForm/formView.vue'
|
|
import CustomerForm from '@components/common/formForm/formView.vue'
|
|
import TranslationComponent from '@components/common/translationComponent.vue';
|
|
import TranslationComponent from '@components/common/translationComponent.vue';
|
|
|
|
+import useRouterStore from "@store/useRouterStore.js";
|
|
|
|
|
|
|
|
+const router = useRouterStore()
|
|
const { toastText, toastSuccess, toastFail, toastLoading } = useToast()
|
|
const { toastText, toastSuccess, toastFail, toastLoading } = useToast()
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
formJson: { required: true },
|
|
formJson: { required: true },
|
|
@@ -229,13 +233,13 @@ const contactDisabled = computed(() => {
|
|
if (!taskType && taskType != 0) {
|
|
if (!taskType && taskType != 0) {
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
- if(taskType == 0 && !vantFormVal.value.customId) {
|
|
|
|
|
|
+ if (taskType == 0 && !vantFormVal.value.customId) {
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
- if(taskType == 1 && !vantFormVal.value.businessOpportunityId) {
|
|
|
|
|
|
+ if (taskType == 1 && !vantFormVal.value.businessOpportunityId) {
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
- if(taskType == 2 && !vantFormVal.value.orderId) {
|
|
|
|
|
|
+ if (taskType == 2 && !vantFormVal.value.orderId) {
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
return false
|
|
@@ -256,7 +260,11 @@ function onSubmit() {
|
|
requests.post(TASK_ADD_EDIT, { ...formValue }).then(() => {
|
|
requests.post(TASK_ADD_EDIT, { ...formValue }).then(() => {
|
|
toastSuccess('保存成功')
|
|
toastSuccess('保存成功')
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- history.back();
|
|
|
|
|
|
+ router.navigateBack({
|
|
|
|
+ success: () => {
|
|
|
|
+ router.eventEmit('moduleListRefreshData', {})
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}, 2000)
|
|
}, 2000)
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
|
|
|
|
@@ -284,7 +292,7 @@ function selectChange(value, label) {
|
|
getContactData(showSelectionFiled.value, value)
|
|
getContactData(showSelectionFiled.value, value)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(showSelectionFiled.value == 'repeatType') {
|
|
|
|
|
|
+ if (showSelectionFiled.value == 'repeatType') {
|
|
vantFormVal.value = {
|
|
vantFormVal.value = {
|
|
...vantFormVal.value,
|
|
...vantFormVal.value,
|
|
endType: 0,
|
|
endType: 0,
|
|
@@ -402,7 +410,7 @@ function getAllListData() {
|
|
|
|
|
|
function initializeData() {
|
|
function initializeData() {
|
|
const row = props.formValue
|
|
const row = props.formValue
|
|
- if(!row.id) {
|
|
|
|
|
|
+ if (!row.id) {
|
|
vantFormVal.value = {
|
|
vantFormVal.value = {
|
|
taskType: 0,
|
|
taskType: 0,
|
|
taskTypeName: '客户',
|
|
taskTypeName: '客户',
|
|
@@ -417,7 +425,7 @@ function initializeData() {
|
|
}
|
|
}
|
|
|
|
|
|
const { id, taskName, priority, taskType, customId, customName, businessOpportunityId, businessOpportunityName, orderId, orderName, clueId, clueNme, contactsId, contactsName
|
|
const { id, taskName, priority, taskType, customId, customName, businessOpportunityId, businessOpportunityName, orderId, orderName, clueId, clueNme, contactsId, contactsName
|
|
- , taskExecutors, isRepeat, repeatType, repeatDesignSameday, endType, repeatEndCount, repeatEndDate, repeatDesignDay, executorId, startDate, endDate } = row
|
|
|
|
|
|
+ , taskExecutors, isRepeat, repeatType, repeatDesignSameday, endType, repeatEndCount, repeatEndDate, repeatDesignDay, executorId, startDate, endDate } = row
|
|
vantFormVal.value = {
|
|
vantFormVal.value = {
|
|
id, taskName, priority, taskType, customId, businessOpportunityId, orderId, clueId, contactsId, executorId, repeatType, repeatDesignSameday, endType, repeatEndCount, repeatEndDate, startDate, endDate,
|
|
id, taskName, priority, taskType, customId, businessOpportunityId, orderId, clueId, contactsId, executorId, repeatType, repeatDesignSameday, endType, repeatEndCount, repeatEndDate, startDate, endDate,
|
|
isRepeat: isRepeat == 1 ? true : false,
|
|
isRepeat: isRepeat == 1 ? true : false,
|
|
@@ -439,10 +447,10 @@ function initializeData() {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
formVal.value = props.formValue
|
|
formVal.value = props.formValue
|
|
- if((taskType || taskType == 0) && taskType != 3) {
|
|
|
|
|
|
+ if ((taskType || taskType == 0) && taskType != 3) {
|
|
const filed = taskType == 0 ? 'customId' : taskType == 1 ? 'businessOpportunityId' : taskType == 2 ? 'orderId' : 'clueId'
|
|
const filed = taskType == 0 ? 'customId' : taskType == 1 ? 'businessOpportunityId' : taskType == 2 ? 'orderId' : 'clueId'
|
|
const value = taskType == 0 ? customId : taskType == 1 ? businessOpportunityId : taskType == 2 ? orderId : clueId
|
|
const value = taskType == 0 ? customId : taskType == 1 ? businessOpportunityId : taskType == 2 ? orderId : clueId
|
|
- if(value) {
|
|
|
|
|
|
+ if (value) {
|
|
getContactData(filed, value)
|
|
getContactData(filed, value)
|
|
}
|
|
}
|
|
}
|
|
}
|