8.11更新
This commit is contained in:
parent
c513ea534d
commit
269457045e
@ -332,14 +332,22 @@
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label prop="field126">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="isDisabled"
|
||||
size="medium"
|
||||
@click="other"
|
||||
>其他联系人</el-button
|
||||
>添加联系人</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="formData.other_contacts.length"
|
||||
type="primary"
|
||||
:disabled="isDisabled"
|
||||
size="medium"
|
||||
@click="otherdelete"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -373,7 +381,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item class="others" label="其他资质">
|
||||
<div
|
||||
v-for="(v, i) in formData.qualification.bank_account"
|
||||
v-for="(v, i) in formData.qualification.qualifications"
|
||||
:key="i"
|
||||
class="otherimg"
|
||||
>
|
||||
@ -645,8 +653,9 @@ const formData = reactive({
|
||||
qualification: {
|
||||
business_license: "",
|
||||
business_licenseB: "",
|
||||
bank_account: [],
|
||||
qualifications: [],
|
||||
bank_accountB: [],
|
||||
bank_account: [],
|
||||
},
|
||||
contract: {
|
||||
contract_type: "",
|
||||
@ -807,7 +816,7 @@ const handleAvatarSuccess_two: UploadProps["onSuccess"] = (
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formData.qualification.bank_account.push(response.data.uri);
|
||||
formData.qualification.qualifications.push(response.data.uri);
|
||||
};
|
||||
const handleAvatarSuccess_twoB: UploadProps["onSuccess"] = (
|
||||
response,
|
||||
@ -843,6 +852,15 @@ function other() {
|
||||
email: "",
|
||||
});
|
||||
}
|
||||
//删除其他联系人
|
||||
function otherdelete() {
|
||||
formData.other_contacts.pop({
|
||||
name: "",
|
||||
position: "",
|
||||
phone: "",
|
||||
email: "",
|
||||
});
|
||||
}
|
||||
function company_type_change(type: any) {
|
||||
//区
|
||||
const arr = [30, 14, 15];
|
||||
@ -963,21 +981,21 @@ const getDetails = async () => {
|
||||
];
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
formData[key] = data[key];
|
||||
if (key == "qualification" && formData.qualification.bank_account) {
|
||||
if (key == "qualification" && formData.qualification.qualifications) {
|
||||
try {
|
||||
if (Array.isArray(JSON.parse(formData.qualification.bank_account))) {
|
||||
formData.qualification.bank_account = JSON.parse(
|
||||
formData.qualification.bank_account
|
||||
if (Array.isArray(JSON.parse(formData.qualification.qualifications))) {
|
||||
formData.qualification.qualifications = JSON.parse(
|
||||
formData.qualification.qualifications
|
||||
);
|
||||
} else {
|
||||
const str = formData.qualification.bank_account;
|
||||
formData.qualification.bank_account = [];
|
||||
formData.qualification.bank_account.push(str);
|
||||
const str = formData.qualification.qualifications;
|
||||
formData.qualification.qualifications = [];
|
||||
formData.qualification.qualifications.push(str);
|
||||
}
|
||||
} catch (error) {
|
||||
const str = formData.qualification.bank_account;
|
||||
formData.qualification.bank_account = [];
|
||||
formData.qualification.bank_account.push(str);
|
||||
const str = formData.qualification.qualifications;
|
||||
formData.qualification.qualifications = [];
|
||||
formData.qualification.qualifications.push(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -999,7 +1017,7 @@ const getDetails = async () => {
|
||||
};
|
||||
const clickdelete = (index) => {
|
||||
if (!route.query.read) {
|
||||
formData.qualification.bank_account.splice(index, 1);
|
||||
formData.qualification.qualifications.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
@ -1019,8 +1037,8 @@ const handleAvatarSuccessAvatar: UploadProps["onSuccess"] = (
|
||||
const create = async () => {
|
||||
await formRef.value?.validate();
|
||||
const data = JSON.parse(JSON.stringify({ ...formData }));
|
||||
data.qualification.bank_account = JSON.stringify(
|
||||
data.qualification.bank_account
|
||||
data.qualification.qualifications = JSON.stringify(
|
||||
data.qualification.qualifications
|
||||
);
|
||||
if (route.query.id) {
|
||||
await apiCompanyEdit(data);
|
||||
|
@ -169,7 +169,7 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item class="other" label="其他资质" prop="contract_no" required>
|
||||
<div class="company" v-for="(v,i) in compenyBimg.bank_account" :key="i">
|
||||
<div class="company" v-for="(v,i) in compenyBimg.qualifications" :key="i">
|
||||
<img :src="v" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
@ -355,8 +355,8 @@ async function render() {
|
||||
res.party_a_info.qualification.bank_account
|
||||
)
|
||||
compenyimg.value = res.party_a_info.qualification
|
||||
res.party_b_info.qualification.bank_account = JSON.parse(
|
||||
res.party_b_info.qualification.bank_account
|
||||
res.party_b_info.qualification.qualifications = JSON.parse(
|
||||
res.party_b_info.qualification.qualifications
|
||||
)
|
||||
compenyBimg.value = res.party_b_info.qualification
|
||||
} catch (error) {}
|
||||
|
@ -10,7 +10,13 @@
|
||||
>
|
||||
<el-form class="formdata" :model="detailsdt" label-width="120px">
|
||||
<el-form-item class="datatime" label="时间日程范围">
|
||||
<el-input v-model="detailsdt.start_time" />
|
||||
<el-date-picker
|
||||
v-model="datetime"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="日程内容">
|
||||
<el-input v-model="detailsdt.task_info.content"/>
|
||||
@ -49,20 +55,21 @@ const emit = defineEmits(["success", "close"]);
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
||||
const mode = ref("add");
|
||||
const datetime = ref(null);
|
||||
const detailsdt = ref({});
|
||||
const defaultTime = ref({
|
||||
starttime:"",
|
||||
endtime:""
|
||||
});
|
||||
const datetime = ref([]);
|
||||
// 弹窗标题
|
||||
// const popupTitle = computed(() => {
|
||||
// return mode.value == "edit" ? "创建日程安排" : "新增任务";
|
||||
// });
|
||||
|
||||
onUpdated(() => {
|
||||
detailsdt.value=props.detailsdata
|
||||
});
|
||||
onUpdated(() => {
|
||||
watchEffect(()=>{
|
||||
detailsdt.value=props.detailsdata
|
||||
const startTime=new Date(props.detailsdata.start_time)
|
||||
const endTime=new Date(props.detailsdata.end_time)
|
||||
datetime.value=[startTime,endTime]
|
||||
})
|
||||
});
|
||||
|
||||
const priorityList = reactive([
|
||||
{
|
||||
|
@ -1,159 +1,196 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['flow_type/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
<div>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-button v-perms="['flow_type/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
v-perms="['flow_type/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)"
|
||||
>
|
||||
删除
|
||||
</el-button> -->
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
{{ pager }}
|
||||
<el-table-column
|
||||
label="id"
|
||||
prop="id"
|
||||
show-overflow-tooltip
|
||||
width="60"
|
||||
/>
|
||||
<el-table-column label="名称" prop="title" show-overflow-tooltip />
|
||||
<el-table-column label="优先级" prop="title" width="90" show-overflow-tooltip >
|
||||
<template #default="{ row }">
|
||||
<span :class="{'one':row.priority==1,'tow':row.priority==2,'the':row.priority==3,'fou':row.priority==4}">{{row.priority_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="负责人" prop="director_name" width="90" show-overflow-tooltip />
|
||||
<el-table-column label="协作人" prop="assist_admin_names" width="90" show-overflow-tooltip />
|
||||
<el-table-column label="审查人" prop="assist_check_names" width="90" show-overflow-tooltip />
|
||||
<el-table-column label="开始时间" prop="start_time" show-overflow-tooltip />
|
||||
<el-table-column label="结束时间" prop="end_time" show-overflow-tooltip />
|
||||
<el-table-column label="审查时间" prop="check_time" show-overflow-tooltip />
|
||||
<el-table-column label="状态" prop="status" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.status == 1" style="color: #67c23a">正常</span>
|
||||
<span v-else style="color: #fe0000">禁用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="auto"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['flow/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['flow/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup
|
||||
v-if="showEdit"
|
||||
ref="editRef"
|
||||
:dict-data="dictData"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
{{ pager }}
|
||||
<el-table-column
|
||||
label="id"
|
||||
prop="id"
|
||||
show-overflow-tooltip
|
||||
width="60"
|
||||
/>
|
||||
<el-table-column label="名称" prop="title" show-overflow-tooltip />
|
||||
<el-table-column
|
||||
label="优先级"
|
||||
prop="title"
|
||||
width="90"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span
|
||||
:class="{
|
||||
one: row.priority == 1,
|
||||
tow: row.priority == 2,
|
||||
the: row.priority == 3,
|
||||
fou: row.priority == 4,
|
||||
}"
|
||||
>{{ row.priority_name }}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="负责人"
|
||||
prop="director_name"
|
||||
width="90"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="协作人"
|
||||
prop="assist_admin_names"
|
||||
width="90"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="审查人"
|
||||
prop="assist_check_names"
|
||||
width="90"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="开始时间"
|
||||
prop="start_time"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="结束时间"
|
||||
prop="end_time"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="审查时间"
|
||||
prop="check_time"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="状态" prop="status" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.status == 1" style="color: #67c23a">正常</span>
|
||||
<span v-else style="color: #fe0000">禁用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="auto"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['flow/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['flow/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup
|
||||
v-if="showEdit"
|
||||
ref="editRef"
|
||||
:dict-data="dictData"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="flowTypeLists">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import { apiTaskIndex } from "@/api/task";
|
||||
<script lang="ts" >
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import { apiTaskIndex } from "@/api/task";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
// import { getRoutePath } from "router";
|
||||
import EditPopup from "./edit.vue";
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false);
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
|
||||
});
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
};
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData("");
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiTaskIndex,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("add");
|
||||
};
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("edit");
|
||||
editRef.value?.setFormData(data);
|
||||
};
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm("确定要删除?");
|
||||
await apiFlowTypeDelete({ id });
|
||||
getLists();
|
||||
};
|
||||
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false);
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({});
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
};
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData("");
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiTaskIndex,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("add");
|
||||
};
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("edit");
|
||||
editRef.value?.setFormData(data);
|
||||
};
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm("确定要删除?");
|
||||
await apiFlowTypeDelete({ id });
|
||||
getLists();
|
||||
</script>
|
||||
};
|
||||
|
||||
getLists();
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.one{
|
||||
color: #F7BA2A;
|
||||
.one {
|
||||
color: #f7ba2a;
|
||||
}
|
||||
.the{
|
||||
color: #ff5100;
|
||||
.the {
|
||||
color: #ff5100;
|
||||
}
|
||||
.tow{
|
||||
color: #f38200;
|
||||
.tow {
|
||||
color: #f38200;
|
||||
}
|
||||
.fou{
|
||||
color: red;
|
||||
.fou {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
|
101
src/views/task_scheduling/dialog_index.vue
Normal file
101
src/views/task_scheduling/dialog_index.vue
Normal file
@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="公司名称" prop="company_name">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.company_name"
|
||||
clearable
|
||||
placeholder="请输入公司名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="公司类型" prop="company_type">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.company_type"
|
||||
clearable
|
||||
placeholder="请输入公司类型"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
||||
<el-table-column label="公司名称" property="company_name" />
|
||||
<el-table-column label="公司类型" property="company_type" />
|
||||
<el-table-column label="区县" property="area" />
|
||||
<el-table-column label="乡镇" property="street" />
|
||||
<el-table-column label="主联系人" property="master_name" />
|
||||
<el-table-column label="联系方式" property="master_phone" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="companyLists">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import { apiCompanyLists, apiCompanyDelete } from "@/api/company";
|
||||
import { defineEmits } from "vue";
|
||||
|
||||
// 当前类型
|
||||
const props = defineProps({
|
||||
type: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
});
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
level_two: "",
|
||||
level_one: "",
|
||||
company_name: "",
|
||||
organization_code: "",
|
||||
city: "",
|
||||
area: "",
|
||||
street: "",
|
||||
company_type: "",
|
||||
master_name: "",
|
||||
master_position: "",
|
||||
master_phone: "",
|
||||
master_email: "",
|
||||
other_contacts: "",
|
||||
area_manager: "",
|
||||
is_contract: "",
|
||||
account: "",
|
||||
password: "",
|
||||
deposit: "",
|
||||
deposit_time: "",
|
||||
qualification: "",
|
||||
status: "",
|
||||
});
|
||||
|
||||
if (props.type) queryParams.company_type = props.type;
|
||||
|
||||
// 选中数据
|
||||
const emits = defineEmits(["customEvent"]);
|
||||
|
||||
// 选中数据子父传递
|
||||
const handleCurrentChange = (value: any) => {
|
||||
emits("customEvent", value);
|
||||
};
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiCompanyLists,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
getLists();
|
||||
</script>
|
@ -1,125 +1,158 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="500px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" label-width="100px" :rules="formRules">
|
||||
<el-form-item label="创建人id" prop="create_user_id">
|
||||
<el-input v-model="formData.create_user_id" clearable placeholder="请输入创建人id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="模板id" prop="template_id">
|
||||
<el-input v-model="formData.template_id" clearable placeholder="请输入模板id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司id" prop="company_id">
|
||||
<el-input v-model="formData.company_id" clearable placeholder="请输入公司id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="下发公司类型" prop="type">
|
||||
<el-input v-model="formData.type" clearable placeholder="请输入下发公司类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="500px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="100px"
|
||||
:rules="formRules"
|
||||
>
|
||||
<el-form-item label="模板" prop="template_id">
|
||||
<el-select v-model="formData.template_id" clearable placeholder="请输入任务类型" >
|
||||
<el-option
|
||||
v-for="item in datalist"
|
||||
:key="item.label"
|
||||
:value="item.id"
|
||||
:label="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="公司" prop="company_id">
|
||||
<el-input
|
||||
@click="openCompany"
|
||||
v-model="formData.company_name"
|
||||
clearable
|
||||
placeholder="请输入公司"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="下发公司类型" prop="type">
|
||||
<el-input
|
||||
v-model="formData.type"
|
||||
clearable
|
||||
placeholder="请输入下发公司类型"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
<el-dialog v-model="isCompany" title="选择签约方" width="60%">
|
||||
<DialogIndex @customEvent="customEvent" :type="indexType" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup name="taskSchedulingEdit">
|
||||
// <el-input v-model="formData.status" clearable placeholder="请输入状态" />
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiTaskSchedulingAdd, apiTaskSchedulingEdit, apiTaskSchedulingDetail } from '@/api/task_scheduling'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
import type { FormInstance } from "element-plus";
|
||||
import Popup from "@/components/popup/index.vue";
|
||||
import {
|
||||
apiTaskSchedulingAdd,
|
||||
apiTaskSchedulingEdit,
|
||||
apiTaskSchedulingDetail,
|
||||
} from "@/api/task_scheduling";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import type { PropType } from "vue";
|
||||
import DialogIndex from "./dialog_index.vue";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["success", "close"]);
|
||||
const formRef = shallowRef<FormInstance>();
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
||||
const mode = ref("add");
|
||||
const isCompany = ref(false);
|
||||
const datalist=ref([])
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑任务公司排期' : '新增任务公司排期'
|
||||
})
|
||||
return mode.value == "edit" ? "编辑任务公司排期" : "新增任务公司排期";
|
||||
});
|
||||
|
||||
function openCompany() {
|
||||
isCompany.value = true;
|
||||
}
|
||||
|
||||
function customEvent(data: any) {
|
||||
isCompany.value = false;
|
||||
formData.company_id = data.id;
|
||||
formData.company_name = data.company_name;
|
||||
}
|
||||
|
||||
dictDataLists({ type_id: 10 }).then((res) => {
|
||||
datalist.value = res.lists;
|
||||
});
|
||||
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
create_user_id: '',
|
||||
template_id: '',
|
||||
company_id: '',
|
||||
type: '',
|
||||
status: '',
|
||||
})
|
||||
|
||||
id: "",
|
||||
template_id: "",
|
||||
company_id: "",
|
||||
company_name: "",
|
||||
type: "",
|
||||
status: "",
|
||||
});
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
const formRules = reactive<any>({});
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
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 apiTaskSchedulingDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
const data = await apiTaskSchedulingDetail({
|
||||
id: row.id,
|
||||
});
|
||||
setFormData(data);
|
||||
};
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiTaskSchedulingEdit(data)
|
||||
: await apiTaskSchedulingAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
await formRef.value?.validate();
|
||||
const data = { ...formData };
|
||||
mode.value == "edit"
|
||||
? await apiTaskSchedulingEdit(data)
|
||||
: await apiTaskSchedulingAdd(data);
|
||||
popupRef.value?.close();
|
||||
emit("success");
|
||||
};
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
const open = (type = "add") => {
|
||||
mode.value = type;
|
||||
popupRef.value?.open();
|
||||
};
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
emit("close");
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
open,
|
||||
setFormData,
|
||||
getDetail,
|
||||
});
|
||||
</script>
|
||||
|
@ -7,17 +7,24 @@
|
||||
inline
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="创建人id" prop="create_user_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.create_user_id" clearable placeholder="请输入创建人id" />
|
||||
<el-form-item label="创建人" prop="create_user_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.create_user_id" clearable placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="模板id" prop="template_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.template_id" clearable placeholder="请输入模板id" />
|
||||
<el-form-item label="模板" prop="template_id">
|
||||
<el-select v-model="queryParams.template_id" clearable placeholder="请输入模板" >
|
||||
<el-option
|
||||
v-for="item in datalist"
|
||||
:key="item.label"
|
||||
:value="item.id"
|
||||
:label="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="公司id" prop="company_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.company_id" clearable placeholder="请输入公司id" />
|
||||
<el-form-item label="公司" prop="company_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.company_id" clearable placeholder="请输入公司" />
|
||||
</el-form-item>
|
||||
<el-form-item label="下发公司类型" prop="type">
|
||||
<el-input class="w-[280px]" v-model="queryParams.type" clearable placeholder="请输入下发公司类型" />
|
||||
<el-input class="w-[280px]" v-model="queryParams.template_id" clearable placeholder="请输入下发公司类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" clearable placeholder="请选择状态">
|
||||
@ -52,10 +59,10 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="创建人id" prop="create_user_id" show-overflow-tooltip />
|
||||
<el-table-column label="模板id" prop="template_id" show-overflow-tooltip />
|
||||
<el-table-column label="公司id" prop="company_id" show-overflow-tooltip />
|
||||
<el-table-column label="下发公司类型" prop="type" show-overflow-tooltip />
|
||||
<el-table-column label="创建人" prop="admin_name" show-overflow-tooltip />
|
||||
<el-table-column label="模板" prop="type_name" show-overflow-tooltip />
|
||||
<el-table-column label="公司" prop="company_name" show-overflow-tooltip />
|
||||
<el-table-column label="下发公司类型" prop="template_name" show-overflow-tooltip />
|
||||
<el-table-column label="状态" prop="status" show-overflow-tooltip>
|
||||
<template #default="{row}">
|
||||
<span>{{row.status=="1"?"显示":"隐藏"}}</span>
|
||||
@ -98,7 +105,8 @@ import { apiTaskSchedulingLists, apiTaskSchedulingDelete } from '@/api/task_sche
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
const datalist=ref([])
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
@ -158,6 +166,9 @@ const handleDelete = async (id: number | any[]) => {
|
||||
await apiTaskSchedulingDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
dictDataLists({ type_id: 10 }).then((res) => {
|
||||
datalist.value = res.lists;
|
||||
});
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
@ -12,11 +12,8 @@
|
||||
<el-form-item label="主题" prop="title">
|
||||
<el-input v-model="formData.title" clearable placeholder="请输入主题" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="admin_id">
|
||||
<el-input v-model="formData.admin_id" clearable placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="金额" prop="moeny">
|
||||
<el-input v-model="formData.moeny" clearable placeholder="请输入金额" />
|
||||
<el-input v-model="formData.money" clearable placeholder="请输入金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="任务类型" prop="type">
|
||||
<el-select v-model="formData.type" clearable placeholder="请输入任务类型" >
|
||||
@ -68,10 +65,9 @@ const popupTitle = computed(() => {
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
title: '',
|
||||
admin_id: '',
|
||||
moeny: '',
|
||||
money: '',
|
||||
type: '',
|
||||
status: '',
|
||||
content: '',
|
||||
|
@ -12,8 +12,8 @@
|
||||
<el-form-item label-width="100px" label="创建人" prop="admin_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.admin_id" clearable placeholder="请输入创建人" />
|
||||
</el-form-item>
|
||||
<el-form-item label-width="100px" label="金额" prop="moeny">
|
||||
<el-input class="w-[280px]" v-model="queryParams.moeny" clearable placeholder="请输入金额" />
|
||||
<el-form-item label-width="100px" label="金额" prop="money">
|
||||
<el-input class="w-[280px]" v-model="queryParams.money" clearable placeholder="请输入金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label-width="100px" label="任务类型" prop="type">
|
||||
<el-select v-model="queryParams.type" clearable placeholder="请输入任务类型" >
|
||||
@ -62,8 +62,8 @@
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="主题" prop="title" show-overflow-tooltip />
|
||||
<el-table-column label="创建人" prop="admin_id" show-overflow-tooltip />
|
||||
<el-table-column label="金额" prop="moeny" show-overflow-tooltip />
|
||||
<el-table-column label="创建人" prop="admin_name" show-overflow-tooltip />
|
||||
<el-table-column label="金额" prop="money" show-overflow-tooltip />
|
||||
<el-table-column label="任务类型" prop="type_name" show-overflow-tooltip />
|
||||
<el-table-column label="状态" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
@ -119,14 +119,14 @@ const showEdit = ref(false)
|
||||
const queryParams = reactive({
|
||||
title: '',
|
||||
admin_id: '',
|
||||
moeny: '',
|
||||
money: '',
|
||||
type: '',
|
||||
status: '',
|
||||
content: ''
|
||||
})
|
||||
const statusdata=reactive([
|
||||
{id:1,name:"显示"},
|
||||
{id:0,name:"隐藏"}
|
||||
{id:2,name:"隐藏"}
|
||||
])
|
||||
|
||||
// 选中数据
|
||||
|
Loading…
x
Reference in New Issue
Block a user