This commit is contained in:
weipengfei 2023-09-15 10:48:50 +08:00
parent 4f8e8a58c7
commit 3ec8507146
2 changed files with 100 additions and 53 deletions

View File

@ -7,6 +7,8 @@
width="800px"
@confirm="handleSubmit"
@close="handleClose"
:button="mode == 'edit'"
:clickModalClose="mode == 'details'"
>
<el-form
ref="formRef"
@ -14,54 +16,75 @@
:rules="formRules"
label-width="120px"
>
<el-col>
<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="name">
<el-input readonly v-model="formData.name" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务金额" prop="flow_cate">
<el-input readonly v-model="formData.flow_cate" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属公司" prop="name">
<el-input readonly v-model="formData.name" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="任务描述" prop="remark">
<el-input
readonly
v-model="formData.remark"
clearable
type="textarea"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="任务完成时间" prop="id">
<el-input readonly v-model="formData.id" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="片区经理" prop="flow_cate">
<el-input readonly v-model="formData.flow_cate" />
</el-form-item>
</el-col>
</el-row>
</el-col>
<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="name">
<el-input readonly v-model="formData.name" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务金额" prop="flow_cate">
<el-input readonly v-model="formData.flow_cate" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属公司" prop="name">
<el-input readonly v-model="formData.name" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="任务描述" prop="remark">
<el-input
readonly
v-model="formData.remark"
clearable
type="textarea"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务完成时间" prop="id">
<el-input readonly v-model="formData.id" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="片区经理" prop="flow_cate">
<el-input readonly v-model="formData.flow_cate" />
</el-form-item>
</el-col>
</el-row>
<el-divider />
<el-row>
<el-col :span="24">
<el-form-item label="详情描述" prop="remark">
<el-input
readonly
v-model="formData.remark"
clearable
type="textarea"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件" prop="flow_cate">
<el-image
class="attachment"
v-for="(item, index) in 5"
:key="index"
src=""
:preview-src-list="[]"
:initial-index="index"
fit="cover"
></el-image>
</el-form-item>
</el-col>
</el-row>
<el-divider />
<el-col :span="24">
<el-form-item label="">
<el-timeline>
@ -84,7 +107,10 @@
clearable
:style="{ width: '100%' }"
>
<el-radio-group v-model="formData.flow_detail.type">
<el-radio-group
:disabled="mode == 'details'"
v-model="formData.flow_detail.type"
>
<el-radio :label="1">通过</el-radio>
<el-radio :label="2">驳回</el-radio>
</el-radio-group>
@ -93,7 +119,12 @@
<el-row>
<el-col>
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" clearable type="textarea" />
<el-input
:readonly="mode == 'details'"
v-model="formData.remark"
clearable
type="textarea"
/>
</el-form-item>
</el-col>
</el-row>
@ -122,7 +153,7 @@ const mode = ref("add");
//
const popupTitle = computed(() => {
return mode.value == "edit" ? "审核" : "新增";
return mode.value == "edit" ? "审核" : "详情";
});
const activities = ref([
@ -211,4 +242,11 @@ defineExpose({
:deep(.el-timeline-item__wrapper) {
top: -8px !important;
}
.attachment {
width: 150px;
height: 150px;
/* background-color: red; */
margin-right: 10px;
margin-bottom: 10px;
}
</style>

View File

@ -72,10 +72,19 @@
v-perms="['flow/edit']"
type="primary"
link
v-if="row.status == 0"
@click="handleEdit(row)"
>
审核
</el-button>
<el-button
type="primary"
link
v-else
@click="handleEdit(row, 'details')"
>
详情
</el-button>
<!-- <el-button
v-perms="['flow/delete']"
type="danger"
@ -154,10 +163,10 @@ const handleAdd = async () => {
};
//
const handleEdit = async (data: any) => {
const handleEdit = async (data: any, type = "edit") => {
showEdit.value = true;
await nextTick();
editRef.value?.open("edit");
editRef.value?.open(type);
editRef.value?.setFormData(data);
};
//