|
@@ -62,8 +62,8 @@
|
|
|
{{ vantFormVal.contactsIdName }}
|
|
|
</template>
|
|
|
</van-field>
|
|
|
- <van-field v-model="vantFormVal.executorId" name="executorId" label="执行人" placeholder="请选择" is-link readonly class="resetStyles" :disabled="!vantFormVal.priority && vantFormVal.priority != 0"
|
|
|
- @click="showSelectionBox('executorId', allContactsList)">
|
|
|
+ <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">
|
|
|
<TranslationComponent :openId="vantFormVal.executorIdName" />
|
|
|
</template>
|
|
@@ -165,7 +165,11 @@
|
|
|
<div>
|
|
|
<!-- 下拉框选择 -->
|
|
|
<van-popup v-model:show="showSelectionFlag" destroy-on-close position="bottom" :style="{ height: '80%' }">
|
|
|
- <PullDownSelector :options="showSelectionArray" :doYouNeedTranslation="false" @change="selectChange" :multiple-choice="selectMultipleChoice" />
|
|
|
+ <PullDownSelector :options="showSelectionArray" :doYouNeedTranslation="false" @change="selectChange" />
|
|
|
+ </van-popup>
|
|
|
+
|
|
|
+ <van-popup v-model:show="showSelectionToFlag" destroy-on-close position="bottom" :style="{ height: '80%' }">
|
|
|
+ <PullDownSelector :value="showSelectionToValue" @change="selectChange" :multiple-choice="true" />
|
|
|
</van-popup>
|
|
|
|
|
|
<!-- 选择日期 -->
|
|
@@ -216,7 +220,8 @@ const showDatePicker = ref(false)
|
|
|
const showDatePickerVal = ref(dayjs().format("YYYY-MM-DD").split("-"))
|
|
|
const showDatePickerFiled = ref('')
|
|
|
const customeDate = ref([])
|
|
|
-const selectMultipleChoice = ref(false)
|
|
|
+const showSelectionToFlag = ref(false)
|
|
|
+const showSelectionToValue = ref([])
|
|
|
const taskTypeFiled = ['customId', 'businessOpportunityId', 'orderId', 'clueId']
|
|
|
|
|
|
const contactDisabled = computed(() => {
|
|
@@ -293,6 +298,12 @@ function selectChange(value, label) {
|
|
|
showSelectionFlag.value = false
|
|
|
}
|
|
|
|
|
|
+function showSelectionToBox(filed) {
|
|
|
+ showSelectionFiled.value = filed
|
|
|
+ showSelectionToValue.value = vantFormVal.value[filed] || []
|
|
|
+ showSelectionToFlag.value = true
|
|
|
+}
|
|
|
+
|
|
|
function showSelectionBox(filed, list = [], event) {
|
|
|
if (taskTypeFiled.includes(filed)) {
|
|
|
const fileds = taskTypeFiled.filter(item => item !== filed)
|
|
@@ -303,7 +314,6 @@ function showSelectionBox(filed, list = [], event) {
|
|
|
vantFormVal.value.contactsId = ''
|
|
|
vantFormVal.value[`contactsIdName`] = ''
|
|
|
}
|
|
|
- selectMultipleChoice.value = filed == 'executorId' ? true : false
|
|
|
showSelectionFiled.value = filed
|
|
|
showSelectionArray.value = filed == 'executorId' ? [] : list
|
|
|
showSelectionFlag.value = true
|
|
@@ -348,7 +358,7 @@ function getContactData(filed, value) {
|
|
|
value: item.id,
|
|
|
}
|
|
|
})
|
|
|
- if (!allContactsList.value.length) {
|
|
|
+ if (!list.length) {
|
|
|
list = [{}]
|
|
|
}
|
|
|
allContactsList.value = list
|
|
@@ -432,7 +442,9 @@ function initializeData() {
|
|
|
if((taskType || taskType == 0) && taskType != 3) {
|
|
|
const filed = taskType == 0 ? 'customId' : taskType == 1 ? 'businessOpportunityId' : taskType == 2 ? 'orderId' : 'clueId'
|
|
|
const value = taskType == 0 ? customId : taskType == 1 ? businessOpportunityId : taskType == 2 ? orderId : clueId
|
|
|
- getContactData(filed, value)
|
|
|
+ if(value) {
|
|
|
+ getContactData(filed, value)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|