|
|
|
|
@ -120,7 +120,7 @@
|
|
|
|
|
<el-table-column label="流程状态" align="center" prop="flowStatus" v-if="columns[22].visible" />
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" v-if="columns[23].visible" />
|
|
|
|
|
<!-- <el-table-column label="附件ID" align="center" prop="ossId" v-if="columns[24].visible" /> -->
|
|
|
|
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
|
|
|
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="160">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-tooltip
|
|
|
|
|
content="修改"
|
|
|
|
|
@ -132,6 +132,19 @@
|
|
|
|
|
<el-tooltip content="查看详情" placement="top" v-if="scope.row.flowStatus !== 'draft' && scope.row.flowStatus">
|
|
|
|
|
<el-button link type="info" icon="DocumentChecked" @click="handleView(scope.row)"></el-button>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip
|
|
|
|
|
content="填写反馈"
|
|
|
|
|
placement="top"
|
|
|
|
|
v-if="scope.row.tripStatus === '3' && (scope.row.tripType === '2' || scope.row.tripType === '3')"
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
link
|
|
|
|
|
type="success"
|
|
|
|
|
icon="ChatDotRound"
|
|
|
|
|
@click="handleFeedback(scope.row)"
|
|
|
|
|
v-hasPermi="['oa/crm:businessTripApply:edit']"
|
|
|
|
|
></el-button>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip content="删除" placement="top">
|
|
|
|
|
<el-button
|
|
|
|
|
link
|
|
|
|
|
@ -147,11 +160,33 @@
|
|
|
|
|
|
|
|
|
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
<!-- 出差反馈对话框 -->
|
|
|
|
|
<el-dialog v-model="feedbackDialogVisible" title="填写出差反馈" width="600px" append-to-body>
|
|
|
|
|
<el-form ref="feedbackFormRef" :model="feedbackForm" :rules="feedbackRules" label-width="120px">
|
|
|
|
|
<el-form-item label="申请单号">
|
|
|
|
|
<el-input v-model="feedbackForm.applyCode" disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="出差类型">
|
|
|
|
|
<dict-tag :options="trip_type" :value="feedbackForm.tripType" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="交流过程简述" prop="exchangeProcess" v-if="feedbackForm.tripType === '2'">
|
|
|
|
|
<el-input v-model="feedbackForm.exchangeProcess" type="textarea" placeholder="如与某某客户某某负责人交谈,参观XX等" :rows="4" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="结果反馈" prop="feedback">
|
|
|
|
|
<el-input v-model="feedbackForm.feedback" type="textarea" placeholder="达成某种共识或初步合作意向或会议成果" :rows="4" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<el-button @click="feedbackDialogVisible = false">取消</el-button>
|
|
|
|
|
<el-button type="primary" @click="submitFeedback" :loading="feedbackLoading">提交</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup name="BusinessTripApply" lang="ts">
|
|
|
|
|
import { listBusinessTripApply, delBusinessTripApply } from '@/api/oa/crm/businessTripApply';
|
|
|
|
|
import { listBusinessTripApply, delBusinessTripApply, updateBusinessTripApply } from '@/api/oa/crm/businessTripApply';
|
|
|
|
|
import { BusinessTripApplyVO, BusinessTripApplyQuery } from '@/api/oa/crm/businessTripApply/types';
|
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
@ -305,4 +340,67 @@ onMounted(() => {
|
|
|
|
|
onActivated(() => {
|
|
|
|
|
getList();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// ============ 出差反馈相关 ============
|
|
|
|
|
const feedbackDialogVisible = ref(false);
|
|
|
|
|
const feedbackLoading = ref(false);
|
|
|
|
|
const feedbackFormRef = ref<ElFormInstance>();
|
|
|
|
|
const feedbackForm = ref<{
|
|
|
|
|
tripId?: number | string;
|
|
|
|
|
applyCode?: string;
|
|
|
|
|
tripType?: string;
|
|
|
|
|
applicantId?: number | string;
|
|
|
|
|
tripLocation?: string;
|
|
|
|
|
startTime?: string;
|
|
|
|
|
endTime?: string;
|
|
|
|
|
durationDays?: number;
|
|
|
|
|
exchangeProcess?: string;
|
|
|
|
|
feedback?: string;
|
|
|
|
|
}>({});
|
|
|
|
|
const feedbackRules = {
|
|
|
|
|
feedback: [{ required: true, message: '请填写结果反馈', trigger: 'blur' }]
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 填写反馈按钮操作 */
|
|
|
|
|
const handleFeedback = (row: BusinessTripApplyVO) => {
|
|
|
|
|
feedbackForm.value = {
|
|
|
|
|
tripId: row.tripId,
|
|
|
|
|
applyCode: row.applyCode,
|
|
|
|
|
tripType: row.tripType,
|
|
|
|
|
applicantId: row.applicantId,
|
|
|
|
|
tripLocation: row.tripLocation,
|
|
|
|
|
startTime: row.startTime,
|
|
|
|
|
endTime: row.endTime,
|
|
|
|
|
durationDays: row.durationDays,
|
|
|
|
|
exchangeProcess: row.exchangeProcess || '',
|
|
|
|
|
feedback: row.feedback || ''
|
|
|
|
|
};
|
|
|
|
|
feedbackDialogVisible.value = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 提交反馈 */
|
|
|
|
|
const submitFeedback = async () => {
|
|
|
|
|
await feedbackFormRef.value?.validate();
|
|
|
|
|
feedbackLoading.value = true;
|
|
|
|
|
try {
|
|
|
|
|
await updateBusinessTripApply({
|
|
|
|
|
tripId: String(feedbackForm.value.tripId),
|
|
|
|
|
tripType: feedbackForm.value.tripType,
|
|
|
|
|
applicantId: feedbackForm.value.applicantId,
|
|
|
|
|
tripLocation: feedbackForm.value.tripLocation,
|
|
|
|
|
startTime: feedbackForm.value.startTime,
|
|
|
|
|
endTime: feedbackForm.value.endTime,
|
|
|
|
|
durationDays: feedbackForm.value.durationDays,
|
|
|
|
|
exchangeProcess: feedbackForm.value.exchangeProcess,
|
|
|
|
|
feedback: feedbackForm.value.feedback
|
|
|
|
|
});
|
|
|
|
|
proxy?.$modal.msgSuccess('反馈提交成功');
|
|
|
|
|
feedbackDialogVisible.value = false;
|
|
|
|
|
await getList();
|
|
|
|
|
} catch (e) {
|
|
|
|
|
console.error(e);
|
|
|
|
|
} finally {
|
|
|
|
|
feedbackLoading.value = false;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|