s
This commit is contained in:
parent
4442cd01b3
commit
e50a2ae9ed
@ -71,7 +71,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex mt-4 justify-end">
|
<div class="flex justify-end mt-4">
|
||||||
<pagination v-model="pager" @change="getLists" />
|
<pagination v-model="pager" @change="getLists" />
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -165,6 +165,9 @@ const queryParams = reactive({
|
|||||||
});
|
});
|
||||||
const statusFn = (status: number) => {
|
const statusFn = (status: number) => {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
|
case -1:{
|
||||||
|
return { tit: "待审核", color: "black" };
|
||||||
|
}
|
||||||
case 0:
|
case 0:
|
||||||
return { tit: "待上传", color: "rgb(238, 190, 119)" };
|
return { tit: "待上传", color: "rgb(238, 190, 119)" };
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -1,291 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="edit-popup">
|
|
||||||
<popup
|
|
||||||
ref="popupRef"
|
|
||||||
:title="popupTitle"
|
|
||||||
:async="true"
|
|
||||||
width="800px"
|
|
||||||
@confirm="handleSubmit"
|
|
||||||
@close="handleClose"
|
|
||||||
:button="mode == 'edit'"
|
|
||||||
:clickModalClose="mode == 'details'"
|
|
||||||
>
|
|
||||||
<el-form
|
|
||||||
ref="formRef"
|
|
||||||
:model="formData"
|
|
||||||
:rules="formRules"
|
|
||||||
label-width="120px"
|
|
||||||
>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="ID" prop="id">
|
|
||||||
<el-input readonly v-model="formData.id" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="任务名称" prop="task.title">
|
|
||||||
<el-input readonly v-model="formData.task.title" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="任务金额" prop="task.money">
|
|
||||||
<el-input readonly v-model="formData.task.money" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="所属公司" prop="company_name">
|
|
||||||
<el-input readonly v-model="formData.company_name" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="任务描述" prop="task.content">
|
|
||||||
<el-input
|
|
||||||
readonly
|
|
||||||
v-model="formData.task.content"
|
|
||||||
clearable
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="任务提交时间" prop="id">
|
|
||||||
<el-input readonly v-model="formData.task.update_time" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="片区经理" prop="flow_cate">
|
|
||||||
<el-input readonly v-model="formData.area_manager" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-divider />
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="详情描述" prop="remark">
|
|
||||||
<el-input
|
|
||||||
readonly
|
|
||||||
:value="formData.task?.extend?.other?.note"
|
|
||||||
clearable
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="图片附件">
|
|
||||||
<el-image
|
|
||||||
class="attachment"
|
|
||||||
v-for="(item, index) in formData.task?.extend?.other?.annex"
|
|
||||||
:key="index"
|
|
||||||
:src="item"
|
|
||||||
:preview-src-list="formData.task?.extend?.other?.annex"
|
|
||||||
:initial-index="index"
|
|
||||||
fit="cover"
|
|
||||||
></el-image>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="视频附件">
|
|
||||||
<video
|
|
||||||
class="video"
|
|
||||||
:src="item"
|
|
||||||
v-for="(item, index) in formData.task?.extend?.other
|
|
||||||
?.video_annex"
|
|
||||||
:key="index"
|
|
||||||
controls
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-divider />
|
|
||||||
<!-- <el-col :span="24">
|
|
||||||
<el-form-item label="">
|
|
||||||
<el-timeline>
|
|
||||||
<el-timeline-item
|
|
||||||
v-for="(activity, index) in activities"
|
|
||||||
:key="index"
|
|
||||||
:type="activity.type"
|
|
||||||
:hollow="activity.hollow"
|
|
||||||
:timestamp="activity.timestamp"
|
|
||||||
>
|
|
||||||
{{ activity.content }}
|
|
||||||
</el-timeline-item>
|
|
||||||
</el-timeline>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
label="审核"
|
|
||||||
prop="check_status"
|
|
||||||
clearable
|
|
||||||
:style="{ width: '100%' }"
|
|
||||||
>
|
|
||||||
<el-radio-group
|
|
||||||
:disabled="mode == 'details'"
|
|
||||||
v-model="formData.check_status"
|
|
||||||
>
|
|
||||||
<el-radio :label="2">通过</el-radio>
|
|
||||||
<el-radio :label="3">驳回</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-row>
|
|
||||||
<el-col>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input
|
|
||||||
:readonly="mode == 'details'"
|
|
||||||
v-model="formData.remark"
|
|
||||||
clearable
|
|
||||||
type="textarea"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</popup>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup name="flowEdit">
|
|
||||||
import type { FormInstance } from "element-plus";
|
|
||||||
import Popup from "@/components/popup/index.vue";
|
|
||||||
import { apiApproveAudit } from "@/api/shareholdingReview";
|
|
||||||
import { timeFormat } from "@/utils/util";
|
|
||||||
import type { PropType } from "vue";
|
|
||||||
defineProps({
|
|
||||||
dictData: {
|
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const isCompany = ref(false);
|
|
||||||
const emit = defineEmits(["success", "close"]);
|
|
||||||
const formRef = shallowRef<FormInstance>();
|
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
|
||||||
const mode = ref("add");
|
|
||||||
|
|
||||||
// 弹窗标题
|
|
||||||
const popupTitle = computed(() => {
|
|
||||||
return mode.value == "edit" ? "审核" : "详情";
|
|
||||||
});
|
|
||||||
|
|
||||||
const activities = ref([
|
|
||||||
{
|
|
||||||
content: "任务完成",
|
|
||||||
timestamp: "2023-8-28 13:30:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
content: "张三三审核",
|
|
||||||
timestamp: "2023-8-28 13:30:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
content: "李思思审核",
|
|
||||||
timestamp: "2023-8-28 13:30:00",
|
|
||||||
type: "primary",
|
|
||||||
hollow: true,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
// 表单数据
|
|
||||||
const formData = reactive({
|
|
||||||
id: "",
|
|
||||||
task: {},
|
|
||||||
company_name: "",
|
|
||||||
area_manager: "",
|
|
||||||
check_status: 1,
|
|
||||||
remark: "",
|
|
||||||
});
|
|
||||||
|
|
||||||
// 表单验证
|
|
||||||
const formRules = reactive<any>({
|
|
||||||
check_status: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
validator: (rules: any, value: any, callback: any) => {
|
|
||||||
if (value != 2 && value != 3) callback("请选择审核状态");
|
|
||||||
else callback();
|
|
||||||
},
|
|
||||||
trigger: ["blur"],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
// remark: [
|
|
||||||
// {
|
|
||||||
// required: false,
|
|
||||||
// validator: (rules: any, value: any, callback: any) => {
|
|
||||||
// if (formData.check_status == 3) callback("请填写备注");
|
|
||||||
// else callback();
|
|
||||||
// },
|
|
||||||
// trigger: ["blur"],
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
});
|
|
||||||
function customEvent(data: any) {
|
|
||||||
isCompany.value = false;
|
|
||||||
}
|
|
||||||
// 获取详情
|
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
|
||||||
// let res = await apiFlowDetil(data.id);
|
|
||||||
for (const key in formData) {
|
|
||||||
if (data[key] != null && data[key] != undefined) {
|
|
||||||
//@ts-ignore
|
|
||||||
formData[key] = data[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
|
||||||
// const data = await apiFlowDetail({
|
|
||||||
// id: row.id,
|
|
||||||
// });
|
|
||||||
// setFormData(data);
|
|
||||||
};
|
|
||||||
// 提交按钮
|
|
||||||
const handleSubmit = async () => {
|
|
||||||
await formRef.value?.validate();
|
|
||||||
if (formData.check_status == 3 && formData.remark == "")
|
|
||||||
return ElMessage.error("驳回必须填写备注");
|
|
||||||
await apiApproveAudit({
|
|
||||||
id: formData.id,
|
|
||||||
check_status: formData.check_status,
|
|
||||||
remark: formData.remark,
|
|
||||||
});
|
|
||||||
popupRef.value?.close();
|
|
||||||
emit("success");
|
|
||||||
};
|
|
||||||
|
|
||||||
//打开弹窗
|
|
||||||
const open = (type = "add") => {
|
|
||||||
mode.value = type;
|
|
||||||
popupRef.value?.open();
|
|
||||||
};
|
|
||||||
|
|
||||||
// 关闭回调
|
|
||||||
const handleClose = () => {
|
|
||||||
emit("close");
|
|
||||||
};
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
open,
|
|
||||||
setFormData,
|
|
||||||
getDetail,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
:deep(.el-timeline-item__wrapper) {
|
|
||||||
top: -8px !important;
|
|
||||||
}
|
|
||||||
.attachment {
|
|
||||||
width: 150px;
|
|
||||||
height: 150px;
|
|
||||||
/* background-color: red; */
|
|
||||||
margin-right: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.video {
|
|
||||||
width: 300px;
|
|
||||||
height: 150px;
|
|
||||||
/* background-color: red; */
|
|
||||||
margin-right: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -89,15 +89,8 @@
|
|||||||
<pagination v-model="pager" @change="getLists" />
|
<pagination v-model="pager" @change="getLists" />
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<audit-other-popup
|
|
||||||
v-if="showEdit && showAuditOther"
|
|
||||||
ref="auditOtherRef"
|
|
||||||
:dict-data="dictData"
|
|
||||||
@success="getLists"
|
|
||||||
@close="showEdit = false"
|
|
||||||
/>
|
|
||||||
<audit-town-market-popup
|
<audit-town-market-popup
|
||||||
v-else-if="showEdit "
|
v-if="showEdit "
|
||||||
ref="auditTownMarketRef"
|
ref="auditTownMarketRef"
|
||||||
:dict-data="dictData"
|
:dict-data="dictData"
|
||||||
@success="getLists"
|
@success="getLists"
|
||||||
@ -111,11 +104,8 @@
|
|||||||
import { useDictData } from "@/hooks/useDictOptions";
|
import { useDictData } from "@/hooks/useDictOptions";
|
||||||
import { apiApproveLists } from "@/api/shareholdingReview";
|
import { apiApproveLists } from "@/api/shareholdingReview";
|
||||||
import {getShareholderMoneyTaskApproveTypeList} from "@/api/setting/dict";
|
import {getShareholderMoneyTaskApproveTypeList} from "@/api/setting/dict";
|
||||||
import feedback from "@/utils/feedback";
|
|
||||||
import auditOtherPopup from "./components/audit_other.vue";
|
|
||||||
import auditTownMarketPopup from "./components/audit_town_market.vue";
|
import auditTownMarketPopup from "./components/audit_town_market.vue";
|
||||||
|
|
||||||
const auditOtherRef = shallowRef<InstanceType<typeof auditOtherPopup>>();
|
|
||||||
const auditTownMarketRef =
|
const auditTownMarketRef =
|
||||||
shallowRef<InstanceType<typeof auditTownMarketPopup>>();
|
shallowRef<InstanceType<typeof auditTownMarketPopup>>();
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
@ -163,14 +153,6 @@
|
|||||||
fetchFun: apiApproveLists,
|
fetchFun: apiApproveLists,
|
||||||
params: queryParams,
|
params: queryParams,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 添加
|
|
||||||
const handleAdd = async () => {
|
|
||||||
showEdit.value = true;
|
|
||||||
await nextTick();
|
|
||||||
auditOtherRef.value?.open("add");
|
|
||||||
};
|
|
||||||
|
|
||||||
// 编辑
|
// 编辑
|
||||||
const handleEdit = async (data: any, type = "edit") => {
|
const handleEdit = async (data: any, type = "edit") => {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user