Merge branch 'feature' of https://gitea.lihaink.cn/mkm/TaskSystem-admin
This commit is contained in:
commit
ae923ec83c
26
src/api/company_complaint_feedback.ts
Normal file
26
src/api/company_complaint_feedback.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 投诉反馈列表
|
||||
export function apiCompanyComplaintFeedbackLists(params: any) {
|
||||
return request.get({ url: '/company_complaint_feedback/lists', params })
|
||||
}
|
||||
|
||||
// 添加投诉反馈
|
||||
export function apiCompanyComplaintFeedbackAdd(params: any) {
|
||||
return request.post({ url: '/company_complaint_feedback/add', params })
|
||||
}
|
||||
|
||||
// 编辑投诉反馈
|
||||
export function apiCompanyComplaintFeedbackEdit(params: any) {
|
||||
return request.post({ url: '/company_complaint_feedback/edit', params })
|
||||
}
|
||||
|
||||
// 删除投诉反馈
|
||||
export function apiCompanyComplaintFeedbackDelete(params: any) {
|
||||
return request.post({ url: '/company_complaint_feedback/delete', params })
|
||||
}
|
||||
|
||||
// 投诉反馈详情
|
||||
export function apiCompanyComplaintFeedbackDetail(params: any) {
|
||||
return request.get({ url: '/company_complaint_feedback/detail', params })
|
||||
}
|
@ -28,3 +28,14 @@ export function apiFlowStatus(params: any) {
|
||||
export function apiFlowDetil(params: any) {
|
||||
return request.get({ url: "/flow/view", params });
|
||||
}
|
||||
|
||||
// 任务
|
||||
// 任务审批列表(待审批列表)
|
||||
export function apiApproveList(params: any) {
|
||||
return request.get({ url: "/approve.approve/lists", params });
|
||||
}
|
||||
|
||||
// 任务审批(待审批列表)
|
||||
export function apiApproveAudit(params: any) {
|
||||
return request.get({ url: "/approve.approve/audit", params });
|
||||
}
|
||||
|
@ -5,6 +5,11 @@ export function accountLog(params?: any) {
|
||||
return request.get({ url: '/finance.account_log/lists', params })
|
||||
}
|
||||
|
||||
// 成员信息
|
||||
export function getCompanyUserList(params?: any) {
|
||||
return request.get({ url: '/finance.account_log/getCompanyUserList', params })
|
||||
}
|
||||
|
||||
// 充值记录
|
||||
export function rechargeLists(params?: any) {
|
||||
return request.get({ url: '/recharge.recharge/lists', params }, { ignoreCancelToken: true })
|
||||
|
@ -43,4 +43,9 @@ export function apiShopSendMsgApi(params: any) {
|
||||
//请求证据包下载地址
|
||||
export function contractEvidence(params: any) {
|
||||
return request.get({ url: "/shop_contract/evidence", params });
|
||||
}
|
||||
|
||||
// 设置备注
|
||||
export function apiShopContractAddNotes(params: any) {
|
||||
return request.post({ url: '/shop_contract/addNote', params })
|
||||
}
|
@ -23,4 +23,9 @@ export function apiTaskTemplateDelete(params: any) {
|
||||
// 任务安排详情
|
||||
export function apiTaskTemplateDetail(params: any) {
|
||||
return request.get({ url: '/task_template.task_template/detail', params })
|
||||
}
|
||||
}
|
||||
|
||||
// 任务类型
|
||||
export function apiTaskTypeList(params: any) {
|
||||
return request.get({ url: '/setting.dict.dict_data/lists', params })
|
||||
}
|
||||
|
@ -53,11 +53,13 @@
|
||||
class="upload-demo"
|
||||
style="width: 100%"
|
||||
drag
|
||||
accept=".apk, .ipa, .wgt"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/file'"
|
||||
:limit="1"
|
||||
:on-success="handleFile"
|
||||
:on-exceed="handleExceed"
|
||||
:before-upload="handleBeforeUpload"
|
||||
ref="upload"
|
||||
>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
@ -140,6 +142,18 @@ const handleExceed = (files: any) => {
|
||||
upload.value!.submit();
|
||||
};
|
||||
|
||||
const appTypeList = [".apk", ".ipa", ".wgt"];
|
||||
const handleBeforeUpload = (e: any) => {
|
||||
let a = appTypeList.find((item: any) => {
|
||||
return item == e?.name?.substring(e.name.length - 4, e.name.length);
|
||||
});
|
||||
if (a) return true;
|
||||
else {
|
||||
ElMessage.error("仅支持上传APK/IPA/WGT文件");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == "edit" ? "编辑app更新" : "新增app更新";
|
||||
|
@ -1,338 +0,0 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="90px"
|
||||
:rules="formRules"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<div class="tit">公司信息</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="公司名称" prop="company_name">
|
||||
<el-input
|
||||
v-model="formData.company_b_name"
|
||||
placeholder="请输入公司名称"
|
||||
clearable
|
||||
:disabled="isDisabled"
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="社会代码" prop="organization_code">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_b_code"
|
||||
placeholder="请输入社会代码"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<div class="tit">主要联系人</div>
|
||||
<el-row>
|
||||
<div style="display: flex; justify-content: left">
|
||||
<!-- <div class="headimg">
|
||||
<el-upload
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.avatar"
|
||||
class="avatar-uploader-head"
|
||||
:data="{ cid: 1 }"
|
||||
action="https://worker-task.lihaink.cn/api/upload/image"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessAvatar"
|
||||
>
|
||||
<img
|
||||
v-if="formData.avatar"
|
||||
:src="formData.avatar"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</div> -->
|
||||
<div class="right">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="姓名" prop="master_name">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_b_user"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="手机" prop="master_phone">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_b_phone"
|
||||
placeholder="请输入手机"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮箱">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_b_email"
|
||||
placeholder="请输入邮箱"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="10">
|
||||
<el-form-item label="片区经理" prop="area_manager_name">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.area_manager_name"
|
||||
placeholder="选择片区经理"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
@click="isAreaManager = true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
|
||||
<!-- <div style="font-size: 1.2rem; margin: 10px 0">资质信息</div> -->
|
||||
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<div class="tit">租赁信息</div>
|
||||
<!-- {{ formData.car_inf }} -->
|
||||
<el-row v-for="(item, index) in formData.cars_info">
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="120px" label="车牌号"
|
||||
><el-input
|
||||
v-model="item.license"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="120px" label="使用公司"
|
||||
><el-input
|
||||
v-model="formData.company_b_name"
|
||||
placeholder="请输入使用公司"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="120px" label="签约时间">
|
||||
<el-input
|
||||
v-model="formData.update_time"
|
||||
placeholder="请输入签约时间"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input
|
||||
></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-form>
|
||||
|
||||
<!-- <el-button @click="create">完成</el-button> -->
|
||||
<el-button
|
||||
v-if="formData.status == 1"
|
||||
type="primary"
|
||||
:disabled="isDisabled"
|
||||
size="medium"
|
||||
@click="create"
|
||||
>发送合同</el-button
|
||||
><el-button
|
||||
v-if="formData.status == 2"
|
||||
type="primary"
|
||||
:disabled="num"
|
||||
size="medium"
|
||||
@click="sendAgain"
|
||||
>重新发送{{ num ? num + "s" : "" }}</el-button
|
||||
>
|
||||
|
||||
<el-button type="primary" @click="checkContract" v-if="formData.file"
|
||||
>查看合同</el-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { reactive, ref } from "vue";
|
||||
// import { contractDetail, sendContract, sendMsg } from "@/api/contract";
|
||||
import feedback from "@/utils/feedback";
|
||||
import { leaseContractDetail } from "@/api/contract";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const formData = reactive({
|
||||
id: 8,
|
||||
contract_no: "",
|
||||
company_a_name: "",
|
||||
company_a_code: "",
|
||||
company_a_user: "",
|
||||
company_a_phone: "",
|
||||
company_a_email: "",
|
||||
company_b_id: 165,
|
||||
company_b_name: "",
|
||||
company_b_user: "",
|
||||
company_b_phone: "",
|
||||
company_b_code: "",
|
||||
company_b_email: "",
|
||||
num: 1,
|
||||
cars_info: [
|
||||
{
|
||||
id: 20,
|
||||
license: "",
|
||||
},
|
||||
],
|
||||
status: 0,
|
||||
file: "",
|
||||
contract_url: "",
|
||||
signing_timer: 0,
|
||||
url: null,
|
||||
create_time: "",
|
||||
update_time: "",
|
||||
});
|
||||
const num = ref(0);
|
||||
// route.query.flag
|
||||
|
||||
leaseContractDetail({ id: route.query.id }).then((res) => {
|
||||
for (let key in formData) {
|
||||
formData[key] = res[key];
|
||||
}
|
||||
|
||||
// formData.cars_info = JSON.parse(formData.cars_info) || "";
|
||||
// console.log(formData.cars_info);
|
||||
});
|
||||
const checkContract = () => {
|
||||
window.open(formData.contract_url, "_blank");
|
||||
};
|
||||
const timeFn = () => {
|
||||
const timers = setInterval(() => {
|
||||
num.value--;
|
||||
if (num.value <= 0) {
|
||||
clearInterval(timeFn);
|
||||
}
|
||||
}, 1000);
|
||||
};
|
||||
const create = () => {
|
||||
sendContract({
|
||||
id: route.query.id,
|
||||
}).then((res) => {
|
||||
formData.status = 2;
|
||||
feedback.msgSuccess("发送成功");
|
||||
num.value = 10;
|
||||
timeFn();
|
||||
});
|
||||
};
|
||||
const sendAgain = () => {
|
||||
sendMsg({ id: route.query.id }).then((res) => {
|
||||
feedback.msgSuccess("发送成功");
|
||||
num.value = 10;
|
||||
timeFn();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2rem;
|
||||
translate: 1vw -1vw;
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload {
|
||||
width: 10vw;
|
||||
height: 6.3vw;
|
||||
background-color: #fff;
|
||||
border: 1px dashed var(--el-border-color);
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: var(--el-transition-duration-fast);
|
||||
}
|
||||
|
||||
.headimg {
|
||||
margin-left: 18px;
|
||||
margin-bottom: 18px;
|
||||
width: 120px;
|
||||
height: 140px;
|
||||
overflow: hidden;
|
||||
border: 1px dashed var(--el-border-color);
|
||||
border-radius: 6px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.avatar-uploader-head .el-upload {
|
||||
width: 120px;
|
||||
height: 140px;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: var(--el-transition-duration-fast);
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
.el-icon.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.el-icon.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.otherimg {
|
||||
img {
|
||||
width: 10vw;
|
||||
height: 6.3vw;
|
||||
border-radius: 5px;
|
||||
margin-left: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-card {
|
||||
margin-bottom: 10px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.others {
|
||||
width: 100% !important;
|
||||
}
|
||||
</style>
|
@ -1,195 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-form class="mb-[-16px]" 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="contract_no">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.company_b_user"
|
||||
clearable
|
||||
placeholder="请输入联系人"
|
||||
/> </el-form-item
|
||||
><el-form-item label="联系方式" prop="status">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.company_b_phone"
|
||||
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>
|
||||
<div class="mt-4">
|
||||
<el-table
|
||||
:data="pager.lists"
|
||||
:default-sort="{ prop: 'create_time', order: 'descending' }"
|
||||
>
|
||||
<el-table-column
|
||||
label="公司名称"
|
||||
:width="250"
|
||||
prop="company_b_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="社会代码"
|
||||
prop="company_b_code"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="主要联系人"
|
||||
prop="company_b_user"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="联系方式"
|
||||
prop="company_b_phone"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="租车数量"
|
||||
prop="num"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="合同状态"
|
||||
prop="num"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{ row.status >= 3 ? "已签约" : "未签约" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="auto"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link>
|
||||
<router-link
|
||||
:to="{
|
||||
path: '/contract/card_detail',
|
||||
query: {
|
||||
id: row.id,
|
||||
},
|
||||
}"
|
||||
>查看</router-link
|
||||
>
|
||||
</el-button>
|
||||
|
||||
<!-- <el-button type="primary" link @click="test(row.id)">
|
||||
查看
|
||||
</el-button> -->
|
||||
<el-button
|
||||
v-if="row.status == 1"
|
||||
type="primary"
|
||||
link
|
||||
@click="sendContractFn(row.id)"
|
||||
>发送合同</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="row.status == 2"
|
||||
:disabled="row.nums > 0"
|
||||
@click="sendAgain(row.id)"
|
||||
link
|
||||
type="primary"
|
||||
>重新发送{{ row.nums ? row.nums + "s" : "" }}</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"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="flowTypeLists">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
// import { contractList, sendContract, sendMsg } from "@/api/contract";
|
||||
import { apiContractLists, sendContract, sendMsg } from "@/api/car_contract";
|
||||
import feedback from "@/utils/feedback";
|
||||
|
||||
const sendAgain = (id: number) => {
|
||||
sendMsg({ id }).then((res) => {
|
||||
var inde = pager.lists.findIndex(function (element) {
|
||||
return element.id === id;
|
||||
});
|
||||
index.value = inde;
|
||||
pager.lists[index.value].nums = 10;
|
||||
timeFn(index.value);
|
||||
});
|
||||
};
|
||||
const timeFn = (i: number) => {
|
||||
const timers = setInterval(() => {
|
||||
pager.lists[i].nums--;
|
||||
if (pager.lists[i].nums <= 0) {
|
||||
clearInterval(timers);
|
||||
}
|
||||
}, 1000);
|
||||
};
|
||||
const index = ref(0);
|
||||
|
||||
const sendContractFn = (id: number) => {
|
||||
sendContract({ id }).then((res) => {
|
||||
feedback.msgSuccess("发送成功");
|
||||
var inde = pager.lists.findIndex(function (element) {
|
||||
return element.id === id;
|
||||
});
|
||||
index.value = inde;
|
||||
pager.lists[index.value].status = 2;
|
||||
pager.lists[index.value].nums = 10;
|
||||
timeFn(index.value);
|
||||
});
|
||||
};
|
||||
const test = () => {
|
||||
// console.log(5454);
|
||||
};
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
company_name: "",
|
||||
company_b_user: "",
|
||||
company_b_phone: "",
|
||||
});
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiContractLists,
|
||||
params: queryParams,
|
||||
});
|
||||
// console.log(pager.lists);
|
||||
|
||||
const handleView = async (data: any) => {
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open(data.id);
|
||||
};
|
||||
getLists().then((res) => {
|
||||
pager.lists.forEach((item, index) => {
|
||||
item.nums = 0;
|
||||
});
|
||||
});
|
||||
</script>
|
@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="管理员名称" prop="name">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.name"
|
||||
clearable
|
||||
placeholder="请输入管理员名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="请选择管理员角色" prop="role_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.role_id">
|
||||
<div>
|
||||
<el-card class="!border-none" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="管理员名称" prop="name">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.name"
|
||||
clearable
|
||||
placeholder="请输入管理员名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="请选择管理员角色" prop="role_id">
|
||||
<el-select class="w-[280px]" v-model="queryParams.role_id">
|
||||
<el-option label="全部" value />
|
||||
<el-option
|
||||
v-for="(item, index) in optionsData.role"
|
||||
@ -20,38 +20,55 @@
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</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-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="账号" prop="account" min-width="120" />
|
||||
<el-table-column label="名称" prop="name" min-width="100" />
|
||||
<el-table-column label="角色" prop="role_name" min-width="100" show-tooltip-when-overflow />
|
||||
<el-table-column label="部门" prop="dept_name" min-width="100" show-tooltip-when-overflow />
|
||||
<el-table-column label="创建时间" prop="create_time" min-width="180" />
|
||||
<el-table-column label="最近登录时间" prop="login_time" min-width="180" />
|
||||
<el-table-column
|
||||
label="角色"
|
||||
prop="role_name"
|
||||
min-width="100"
|
||||
show-tooltip-when-overflow
|
||||
/>
|
||||
<el-table-column
|
||||
label="部门"
|
||||
prop="dept_name"
|
||||
min-width="100"
|
||||
show-tooltip-when-overflow
|
||||
/>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
min-width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最近登录时间"
|
||||
prop="login_time"
|
||||
min-width="180"
|
||||
/>
|
||||
<el-table-column label="最近登录IP" prop="login_ip" min-width="120" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</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 { usePaging } from "@/hooks/usePaging";
|
||||
import { roleAll } from "@/api/perms/role";
|
||||
import { useDictData,useDictOptions } from '@/hooks/useDictOptions'
|
||||
import { adminLists} from "@/api/perms/admin";
|
||||
import { defineEmits, defineProps } from 'vue'
|
||||
import { useDictData, useDictOptions } from "@/hooks/useDictOptions";
|
||||
import { adminLists } from "@/api/perms/admin";
|
||||
const { optionsData } = useDictOptions<{
|
||||
role: any[];
|
||||
}>({
|
||||
@ -61,34 +78,34 @@ const { optionsData } = useDictOptions<{
|
||||
});
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
name: "",
|
||||
role_id: "",
|
||||
})
|
||||
name: "",
|
||||
role_id: "",
|
||||
});
|
||||
|
||||
const props = defineProps({
|
||||
type: {
|
||||
type: Number,
|
||||
defualt: 0
|
||||
}
|
||||
})
|
||||
type: {
|
||||
type: Number,
|
||||
defualt: 0,
|
||||
},
|
||||
});
|
||||
|
||||
if(props.type==8){
|
||||
queryParams.role_id = 8
|
||||
if (props.type == 8) {
|
||||
queryParams.role_id = 8;
|
||||
}
|
||||
|
||||
// 选中数据
|
||||
const emits = defineEmits(['customEvent'])
|
||||
const emits = defineEmits(["customEvent"]);
|
||||
|
||||
// 选中数据子父传递
|
||||
const handleCurrentChange = (value: any) => {
|
||||
emits('customEvent', value)
|
||||
}
|
||||
emits("customEvent", value);
|
||||
};
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: adminLists,
|
||||
params: queryParams
|
||||
})
|
||||
fetchFun: adminLists,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
getLists()
|
||||
getLists();
|
||||
</script>
|
||||
|
@ -10,217 +10,186 @@
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<div class="tit">公司基本信息创建</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="公司名称" prop="company_name">
|
||||
<el-input
|
||||
v-model="formData.company_name"
|
||||
placeholder="请输入公司名称"
|
||||
clearable
|
||||
:disabled="isDisabled"
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="社会代码" prop="organization_code">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.organization_code"
|
||||
placeholder="请输入社会代码"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item
|
||||
label="公司类型"
|
||||
:rules="[
|
||||
{ required: true, message: '不可为空', trigger: 'blur' },
|
||||
]"
|
||||
prop="company_type"
|
||||
<el-form-item label="公司名称" prop="company_name">
|
||||
<el-input
|
||||
v-model="formData.company_name"
|
||||
placeholder="请输入公司名称"
|
||||
clearable
|
||||
:disabled="isDisabled"
|
||||
:style="{ width: '300px' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="社会代码" prop="organization_code">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.organization_code"
|
||||
placeholder="请输入社会代码"
|
||||
clearable
|
||||
:style="{ width: '300px' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="公司类型"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="company_type"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_type"
|
||||
placeholder="请选择公司类型"
|
||||
clearable
|
||||
@change="company_type_change"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_type"
|
||||
placeholder="请选择公司类型"
|
||||
clearable
|
||||
@change="company_type_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.dictTypeLists"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item
|
||||
label="省"
|
||||
:rules="[
|
||||
{ required: true, message: '不可为空', trigger: 'blur' },
|
||||
]"
|
||||
prop="province"
|
||||
<el-option
|
||||
v-for="(item, index) in datas.dictTypeLists"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="省"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="province"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.province"
|
||||
placeholder="请选择省"
|
||||
clearable
|
||||
@change="province_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.province"
|
||||
placeholder="请选择省"
|
||||
clearable
|
||||
@change="province_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.provinceOptions"
|
||||
:key="index"
|
||||
:label="item.province_name"
|
||||
:value="item.province_code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item
|
||||
label="市"
|
||||
:rules="[
|
||||
{ required: true, message: '不可为空', trigger: 'blur' },
|
||||
]"
|
||||
prop="city"
|
||||
<el-option
|
||||
v-for="(item, index) in datas.provinceOptions"
|
||||
:key="index"
|
||||
:label="item.province_name"
|
||||
:value="item.province_code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="市"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="city"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.city"
|
||||
placeholder="请选择市"
|
||||
clearable
|
||||
@change="city_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.city"
|
||||
placeholder="请选择市"
|
||||
clearable
|
||||
@change="city_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.cityOptions"
|
||||
:key="index"
|
||||
:label="item.city_name"
|
||||
:value="item.city_code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3" v-if="isArea">
|
||||
<el-form-item
|
||||
label="区"
|
||||
:rules="[
|
||||
{ required: true, message: '不可为空', trigger: 'blur' },
|
||||
]"
|
||||
prop="area"
|
||||
<el-option
|
||||
v-for="(item, index) in datas.cityOptions"
|
||||
:key="index"
|
||||
:label="item.city_name"
|
||||
:value="item.city_code"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="isArea"
|
||||
label="区"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="area"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.area"
|
||||
placeholder="请选择区"
|
||||
clearable
|
||||
@change="area_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.area"
|
||||
placeholder="请选择区"
|
||||
clearable
|
||||
@change="area_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.areaOptions"
|
||||
:key="index"
|
||||
:label="item.area_name"
|
||||
:value="item.area_code"
|
||||
:disabled="item.disabled"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3" v-if="isStreet">
|
||||
<el-form-item
|
||||
label="镇"
|
||||
:rules="[
|
||||
{ required: true, message: '不可为空', trigger: 'blur' },
|
||||
]"
|
||||
prop="street"
|
||||
<el-option
|
||||
v-for="(item, index) in datas.areaOptions"
|
||||
:key="index"
|
||||
:label="item.area_name"
|
||||
:value="item.area_code"
|
||||
:disabled="item.disabled"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="isStreet"
|
||||
label="镇"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="street"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.street"
|
||||
placeholder="请选择镇"
|
||||
clearable
|
||||
@change="street_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.street"
|
||||
placeholder="请选择镇"
|
||||
clearable
|
||||
@change="street_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.streetOptions"
|
||||
:key="index"
|
||||
:label="item.street_name"
|
||||
:value="item.street_code"
|
||||
:disabled="item.disabled"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3" v-if="isVillage">
|
||||
<el-form-item
|
||||
label="村"
|
||||
:rules="[
|
||||
{ required: true, message: '不可为空', trigger: 'blur' },
|
||||
]"
|
||||
prop="village"
|
||||
<el-option
|
||||
v-for="(item, index) in datas.streetOptions"
|
||||
:key="index"
|
||||
:label="item.street_name"
|
||||
:value="item.street_code"
|
||||
:disabled="item.disabled"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="isVillage"
|
||||
label="村"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="village"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.village"
|
||||
placeholder="请选择村"
|
||||
clearable
|
||||
@change="village_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.village"
|
||||
placeholder="请选择村"
|
||||
clearable
|
||||
@change="village_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.villageOptions"
|
||||
:key="index"
|
||||
:label="item.village_name"
|
||||
:value="item.village_code"
|
||||
:disabled="item.disabled"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3" v-if="isBrigade">
|
||||
<el-form-item
|
||||
label="队"
|
||||
:rules="[
|
||||
{ required: true, message: '不可为空', trigger: 'blur' },
|
||||
]"
|
||||
prop="brigade"
|
||||
<el-option
|
||||
v-for="(item, index) in datas.villageOptions"
|
||||
:key="index"
|
||||
:label="item.village_name"
|
||||
:value="item.village_code"
|
||||
:disabled="item.disabled"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="isBrigade"
|
||||
label="队"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="brigade"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.brigade"
|
||||
placeholder="请选择队"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.brigade"
|
||||
placeholder="请选择队"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.brigadeOptions"
|
||||
:key="index"
|
||||
:label="item.brigade_name"
|
||||
:value="item.id"
|
||||
:disabled="item.disabled"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.address"
|
||||
placeholder="请输入地址"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.brigadeOptions"
|
||||
:key="index"
|
||||
:label="item.brigade_name"
|
||||
:value="item.id"
|
||||
:disabled="item.disabled"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.address"
|
||||
placeholder="请输入地址"
|
||||
clearable
|
||||
:style="{ width: '300px' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-col :span="23">
|
||||
<el-form-item label="负责区域" prop="region">
|
||||
<el-checkbox-group
|
||||
@ -266,6 +235,7 @@
|
||||
<div class="headimg" style="margin-left: 5px">
|
||||
<el-upload
|
||||
:disabled="isDisabled"
|
||||
:accept="acceptFileTypes"
|
||||
v-model="formData.avatar"
|
||||
class="avatar-uploader-head"
|
||||
:data="{ cid: 1 }"
|
||||
@ -290,88 +260,76 @@
|
||||
<el-main>
|
||||
<el-row>
|
||||
<div style="display: flex; justify-content: left">
|
||||
<div class="right">
|
||||
<div class="right" style="max-width: 1100px">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="姓名" prop="master_name">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.master_name"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="职务" prop="master_position">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.master_position"
|
||||
placeholder="请输入职务"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="手机" prop="master_phone">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.master_phone"
|
||||
placeholder="请输入手机"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="邮箱">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="formData.master_email"
|
||||
placeholder="邮箱将由系统自动生成"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.sex"
|
||||
placeholder="请选择性别"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option label="男" value="1" />
|
||||
<el-option label="女" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="身份证">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.id_card"
|
||||
placeholder="请输入身份证"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="10">
|
||||
<el-form-item label="姓名" prop="master_name">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.master_name"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
:style="{ width: '450px' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="职务" prop="master_position">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.master_position"
|
||||
placeholder="请输入职务"
|
||||
clearable
|
||||
:style="{ width: '450px' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机" prop="master_phone">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.master_phone"
|
||||
placeholder="请输入手机"
|
||||
clearable
|
||||
:style="{ width: '450px' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="formData.master_email"
|
||||
placeholder="邮箱将由系统自动生成"
|
||||
clearable
|
||||
:style="{ width: '450px' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-select
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.sex"
|
||||
placeholder="请选择性别"
|
||||
:style="{ width: '450px' }"
|
||||
>
|
||||
<el-option label="男" value="1" />
|
||||
<el-option label="女" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.id_card"
|
||||
placeholder="请输入身份证"
|
||||
clearable
|
||||
:style="{ width: '450px' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!--
|
||||
<el-form-item label="片区经理" prop="area_manager_name">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.area_manager_name"
|
||||
placeholder="选择片区经理"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
:style="{ width: '300px' }"
|
||||
@click="isAreaManager = true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
-->
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
@ -463,6 +421,7 @@
|
||||
<el-form-item label="公司资质" required>
|
||||
<el-upload
|
||||
:disabled="isDisabled"
|
||||
:accept="acceptFileTypes"
|
||||
v-model="formData.qualification.business_license"
|
||||
class="avatar-uploader pl-3"
|
||||
:data="{ cid: 1 }"
|
||||
@ -491,6 +450,7 @@
|
||||
</div>
|
||||
<el-upload
|
||||
v-if="imgflag"
|
||||
:accept="acceptFileTypes"
|
||||
:disabled="isDisabled"
|
||||
class="avatar-uploader pl-3"
|
||||
:data="{ cid: 1 }"
|
||||
@ -510,6 +470,7 @@
|
||||
<el-form-item label-width="120px" label="开户许可证" required>
|
||||
<el-upload
|
||||
:disabled="isDisabled"
|
||||
:accept="acceptFileTypes"
|
||||
v-model="formData.qualification.business_licenseB"
|
||||
class="avatar-uploader pl-3"
|
||||
:data="{ cid: 1 }"
|
||||
@ -713,6 +674,8 @@ if (route.query.isshow) {
|
||||
imgflag = false;
|
||||
isDisabled = true;
|
||||
}
|
||||
|
||||
const acceptFileTypes = ref(".png, .jpg, .jpeg, image/png, image/jpeg");
|
||||
console.log(isDisabled);
|
||||
// 公司类型
|
||||
const indexType = ref(0);
|
||||
|
113
src/views/company_complaint_feedback/edit.vue
Normal file
113
src/views/company_complaint_feedback/edit.vue
Normal file
@ -0,0 +1,113 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="公司" prop="company_id">
|
||||
<el-input v-model="formData.company_id" clearable placeholder="请输入公司" />
|
||||
</el-form-item>
|
||||
<el-form-item label="内容" prop="content">
|
||||
<el-input v-model="formData.content" clearable placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="companyComplaintFeedbackEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCompanyComplaintFeedbackAdd, apiCompanyComplaintFeedbackEdit, apiCompanyComplaintFeedbackDetail } from '@/api/company_complaint_feedback'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
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')
|
||||
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑投诉反馈' : '新增投诉反馈'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
company_id: '',
|
||||
content: '',
|
||||
})
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
content: [{
|
||||
required: true,
|
||||
message: '请输入内容',
|
||||
trigger: ['blur']
|
||||
}],
|
||||
})
|
||||
|
||||
|
||||
// 获取详情
|
||||
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]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiCompanyComplaintFeedbackDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiCompanyComplaintFeedbackEdit(data)
|
||||
: await apiCompanyComplaintFeedbackAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
161
src/views/company_complaint_feedback/index.vue
Normal file
161
src/views/company_complaint_feedback/index.vue
Normal file
@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<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="content">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.content"
|
||||
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">
|
||||
<el-button
|
||||
v-perms="['company_complaint_feedback/add']"
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
>
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['company_complaint_feedback/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<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="id"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="公司"
|
||||
prop="company_name"
|
||||
width="220"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="内容" prop="content" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['company_complaint_feedback/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['company_complaint_feedback/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="companyComplaintFeedbackLists">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import {
|
||||
apiCompanyComplaintFeedbackLists,
|
||||
apiCompanyComplaintFeedbackDelete,
|
||||
} from "@/api/company_complaint_feedback";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
import EditPopup from "./edit.vue";
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false);
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
company_id: "",
|
||||
content: "",
|
||||
});
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
};
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData("");
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiCompanyComplaintFeedbackLists,
|
||||
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 apiCompanyComplaintFeedbackDelete({ id });
|
||||
getLists();
|
||||
};
|
||||
|
||||
getLists();
|
||||
</script>
|
||||
|
@ -1,133 +1,170 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="" prop="company_name">
|
||||
<el-input v-model="formData.company_name" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="organization_code">
|
||||
<el-input v-model="formData.organization_code" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="address">
|
||||
<el-input v-model="formData.address" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="master_name">
|
||||
<el-input v-model="formData.master_name" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="type">
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="90px"
|
||||
:rules="formRules"
|
||||
>
|
||||
<el-form-item label="商户名称" prop="company_name">
|
||||
<el-input
|
||||
v-model="formData.company_name"
|
||||
clearable
|
||||
placeholder="请输入商户名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="社会信用统一代码" prop="organization_code">
|
||||
<el-input
|
||||
v-model="formData.organization_code"
|
||||
clearable
|
||||
placeholder="请输入社会信用统一代码"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="详细地址" prop="address">
|
||||
<el-input
|
||||
v-model="formData.address"
|
||||
clearable
|
||||
placeholder="请输入详细地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="法人名称" prop="master_name">
|
||||
<el-input
|
||||
v-model="formData.master_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="master_email">
|
||||
<el-input v-model="formData.master_email" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="notes">
|
||||
<el-input v-model="formData.notes" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="type_two">
|
||||
<el-input v-model="formData.type_two" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="法人邮箱" prop="master_email">
|
||||
<el-input
|
||||
v-model="formData.master_email"
|
||||
clearable
|
||||
placeholder="请输入法人邮箱"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="notes">
|
||||
<el-input v-model="formData.notes" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="companyFormEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiCompanyFormAdd, apiCompanyFormEdit, apiCompanyFormDetail } from '@/api/company_form'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
import type { FormInstance } from "element-plus";
|
||||
import Popup from "@/components/popup/index.vue";
|
||||
import {
|
||||
apiCompanyFormAdd,
|
||||
apiCompanyFormEdit,
|
||||
apiCompanyFormDetail,
|
||||
} from "@/api/company_form";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import type { PropType } from "vue";
|
||||
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 popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑公司认证表格' : '新增公司认证表格'
|
||||
})
|
||||
return mode.value == "edit" ? "编辑公司认证表格" : "新增公司认证表格";
|
||||
});
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
company_name: '',
|
||||
organization_code: '',
|
||||
address: '',
|
||||
master_name: '',
|
||||
type: '',
|
||||
master_email: '',
|
||||
notes: '',
|
||||
type_two: '',
|
||||
})
|
||||
|
||||
id: "",
|
||||
company_name: "",
|
||||
organization_code: "",
|
||||
address: "",
|
||||
master_name: "",
|
||||
type: "",
|
||||
master_email: "",
|
||||
notes: "",
|
||||
});
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
company_name: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入商户名称",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
organization_code: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入社会信用统一代码",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
master_name: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入法人名称",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// 获取详情
|
||||
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 apiCompanyFormDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
const data = await apiCompanyFormDetail({
|
||||
id: row.id,
|
||||
});
|
||||
setFormData(data);
|
||||
};
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiCompanyFormEdit(data)
|
||||
: await apiCompanyFormAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
await formRef.value?.validate();
|
||||
const data = { ...formData };
|
||||
mode.value == "edit"
|
||||
? await apiCompanyFormEdit(data)
|
||||
: await apiCompanyFormAdd(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>
|
||||
|
@ -1,43 +1,56 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" 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="organization_code">
|
||||
<el-input class="w-[280px]" v-model="queryParams.organization_code" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="address">
|
||||
<el-input class="w-[280px]" v-model="queryParams.address" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="master_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.master_name" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="type">
|
||||
<el-input class="w-[280px]" v-model="queryParams.type" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="master_email">
|
||||
<el-input class="w-[280px]" v-model="queryParams.master_email" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="notes">
|
||||
<el-input class="w-[280px]" v-model="queryParams.notes" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="type_two">
|
||||
<el-input class="w-[280px]" v-model="queryParams.type_two" 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">
|
||||
<el-button v-perms="['company_form/add']" type="primary" @click="handleAdd">
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" 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="organization_code">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.organization_code"
|
||||
clearable
|
||||
placeholder="请输入社会代码"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="详细地址" prop="address">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.address"
|
||||
clearable
|
||||
placeholder="请输入详细地址"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="法人名称" prop="master_name">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.master_name"
|
||||
clearable
|
||||
placeholder="请输入法人名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="法人邮箱" prop="master_email">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.master_email"
|
||||
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">
|
||||
<!-- <el-button v-perms="['company_form/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
@ -49,112 +62,139 @@
|
||||
@click="handleDelete(selectData)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="" prop="company_name" show-overflow-tooltip />
|
||||
<el-table-column label="" prop="organization_code" show-overflow-tooltip />
|
||||
<el-table-column label="" prop="address" show-overflow-tooltip />
|
||||
<el-table-column label="" prop="master_name" show-overflow-tooltip />
|
||||
<el-table-column label="" prop="type" show-overflow-tooltip />
|
||||
<el-table-column label="" prop="master_email" show-overflow-tooltip />
|
||||
<el-table-column label="" prop="notes" show-overflow-tooltip />
|
||||
<el-table-column label="" prop="type_two" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['company_form/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['company_form/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>
|
||||
</el-button> -->
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
label="ID"
|
||||
prop="id"
|
||||
width="150px"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="商户名称"
|
||||
width="330px"
|
||||
prop="company_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="社会代码"
|
||||
prop="organization_code"
|
||||
width="250px"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="详细地址"
|
||||
width="350px"
|
||||
prop="address"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="法人名称"
|
||||
width="120px"
|
||||
prop="master_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="法人邮箱"
|
||||
prop="master_email"
|
||||
show-overflow-tooltip
|
||||
/> -->
|
||||
<el-table-column label="备注" prop="notes" show-overflow-tooltip />
|
||||
|
||||
<!-- <el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link>
|
||||
<router-link
|
||||
:to="{
|
||||
path: '',
|
||||
query: {
|
||||
id: row.id,
|
||||
},
|
||||
}"
|
||||
>详情</router-link
|
||||
>
|
||||
</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="companyFormLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiCompanyFormLists, apiCompanyFormDelete } from '@/api/company_form'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import { apiCompanyFormLists, apiCompanyFormDelete } from "@/api/company_form";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
import EditPopup from "./edit.vue";
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const showEdit = ref(false);
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
company_name: '',
|
||||
organization_code: '',
|
||||
address: '',
|
||||
master_name: '',
|
||||
type: '',
|
||||
master_email: '',
|
||||
notes: '',
|
||||
type_two: ''
|
||||
})
|
||||
company_name: "",
|
||||
organization_code: "",
|
||||
address: "",
|
||||
master_name: "",
|
||||
type: "",
|
||||
master_email: "",
|
||||
notes: "",
|
||||
});
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
};
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('')
|
||||
const { dictData } = useDictData("");
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiCompanyFormLists,
|
||||
params: queryParams
|
||||
})
|
||||
fetchFun: apiCompanyFormLists,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
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)
|
||||
}
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("edit");
|
||||
editRef.value?.setFormData(data);
|
||||
};
|
||||
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiCompanyFormDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
await feedback.confirm("确定要删除?");
|
||||
await apiCompanyFormDelete({ id });
|
||||
getLists();
|
||||
};
|
||||
|
||||
getLists()
|
||||
getLists();
|
||||
</script>
|
||||
|
||||
|
@ -96,7 +96,12 @@
|
||||
>
|
||||
<el-form-item label="公司资质" prop="contract_type" required>
|
||||
<div class="company">
|
||||
<img :src="compenyimg.business_license" />
|
||||
<el-image
|
||||
:src="compenyimg.business_license"
|
||||
:preview-src-list="[compenyimg.business_license]"
|
||||
:initial-index="0"
|
||||
fit="cover"
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -106,7 +111,12 @@
|
||||
required
|
||||
>
|
||||
<div class="company">
|
||||
<img :src="compenyimg.business_licenseB" />
|
||||
<el-image
|
||||
:src="compenyimg.business_licenseB"
|
||||
:preview-src-list="[compenyimg.business_licenseB]"
|
||||
:initial-index="0"
|
||||
fit="cover"
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -121,7 +131,12 @@
|
||||
v-for="(v, i) in compenyimg.other_qualifications"
|
||||
:key="i"
|
||||
>
|
||||
<img :src="v" />
|
||||
<el-image
|
||||
:src="v"
|
||||
:preview-src-list="compenyimg.other_qualifications"
|
||||
:initial-index="i"
|
||||
fit="cover"
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -217,7 +232,12 @@
|
||||
>
|
||||
<el-form-item label="公司资质" prop="contract_type" required>
|
||||
<div class="company">
|
||||
<img :src="compenyBimg.business_license" />
|
||||
<el-image
|
||||
:src="compenyBimg.business_license"
|
||||
:preview-src-list="[compenyBimg.business_license]"
|
||||
:initial-index="0"
|
||||
fit="cover"
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -227,7 +247,12 @@
|
||||
required
|
||||
>
|
||||
<div class="company">
|
||||
<img :src="compenyBimg.business_licenseB" />
|
||||
<el-image
|
||||
:src="compenyBimg.business_licenseB"
|
||||
:preview-src-list="[compenyBimg.business_licenseB]"
|
||||
:initial-index="0"
|
||||
fit="cover"
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -242,7 +267,12 @@
|
||||
v-for="(v, i) in compenyBimg.other_qualifications"
|
||||
:key="i"
|
||||
>
|
||||
<img :src="v" />
|
||||
<el-image
|
||||
:src="v"
|
||||
:preview-src-list="compenyBimg.other_qualifications"
|
||||
:initial-index="i"
|
||||
fit="cover"
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -386,6 +416,7 @@
|
||||
prop="field127"
|
||||
>
|
||||
<el-upload
|
||||
accept=".pdf"
|
||||
:headers="{ Token: userStore.token }"
|
||||
class="upload-demo"
|
||||
:action="base_url + '/upload/file'"
|
||||
@ -410,7 +441,12 @@
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isshow || formData.status == 0">
|
||||
<el-button v-perms="['contract.contract/wind_control']" type="primary" @click="submitContract">确定</el-button>
|
||||
<el-button
|
||||
v-perms="['contract.contract/wind_control']"
|
||||
type="primary"
|
||||
@click="submitContract"
|
||||
>确定</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="formData.file && formData.status">
|
||||
<a
|
||||
@ -551,7 +587,7 @@ const handleAvatarSuccess_four: UploadProps["onSuccess"] = (
|
||||
|
||||
const router = useRouter();
|
||||
const submitContract = () => {
|
||||
if (!formData.file) ElMessage.error("请先上传合同!");
|
||||
if (!formData.file) return ElMessage.error("请先上传合同!");
|
||||
upContact({ file: formData.file, id: route.query.id });
|
||||
removeTab();
|
||||
router.back();
|
||||
@ -589,7 +625,7 @@ onMounted(async () => {
|
||||
.company {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
img {
|
||||
.el-image {
|
||||
width: 10vw;
|
||||
height: 6.3vw;
|
||||
margin-right: 10px;
|
||||
|
@ -164,7 +164,11 @@
|
||||
v-perms="['contract.contract/contract_send_again']"
|
||||
type="primary"
|
||||
link
|
||||
@click="(showPop = true), (contractId = row.party_b)"
|
||||
@click="
|
||||
(showPop = true),
|
||||
(party_b_id = row.party_b),
|
||||
(contract_id = row.id)
|
||||
"
|
||||
>发送短信</el-button
|
||||
>
|
||||
</template>
|
||||
@ -236,24 +240,32 @@ const datalist = ref([]);
|
||||
const showPop = ref(false);
|
||||
const showConctactPop = ref(false);
|
||||
// 发送合同的id
|
||||
const contractId = ref("");
|
||||
const contract_id = ref("");
|
||||
const party_b_id = ref("");
|
||||
// 发送合同
|
||||
const showCreateConctPop = (row) => {
|
||||
const showCreateConctPop = (row: any) => {
|
||||
(showPop.value = true),
|
||||
(showConctactPop.value = true),
|
||||
(contractId.value = row.party_b);
|
||||
(contract_id.value = row.id),
|
||||
(party_b_id.value = row.party_b);
|
||||
};
|
||||
const offPop = () => {
|
||||
showPop.value = false;
|
||||
showConctactPop.value = false;
|
||||
};
|
||||
const creContct = async () => {
|
||||
await generateGontract({ id: contractId.value });
|
||||
await generateGontract({
|
||||
id: party_b_id.value,
|
||||
contract_id: contract_id.value,
|
||||
});
|
||||
getLists();
|
||||
offPop();
|
||||
};
|
||||
const sendMsg = async () => {
|
||||
await sendMsgApi({ id: contractId.value });
|
||||
await sendMsgApi({
|
||||
id: party_b_id.value,
|
||||
contract_id: contract_id.value,
|
||||
});
|
||||
getLists();
|
||||
offPop();
|
||||
};
|
||||
|
@ -1,262 +1,156 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="90px"
|
||||
:rules="formRules"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<div class="tit">甲方信息</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="公司名称" prop="company_name">
|
||||
<el-input
|
||||
v-model="formData.company_a_name"
|
||||
placeholder="请输入公司名称"
|
||||
clearable
|
||||
:disabled="isDisabled"
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="社会代码" prop="organization_code">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_a_code"
|
||||
placeholder="请输入社会代码"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<div class="tit">主要联系人</div>
|
||||
<el-row>
|
||||
<div style="display: flex; justify-content: left">
|
||||
<div class="right">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="姓名" prop="master_name">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_a_user"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<div class="edit-popup">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules" :disabled="true">
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<div class="tit">甲方信息</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="公司名称" prop="company_name">
|
||||
<el-input v-model="formData.company_a_name" placeholder="请输入公司名称" clearable
|
||||
:disabled="isDisabled" :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="社会代码" prop="organization_code">
|
||||
<el-input :disabled="isDisabled" v-model="formData.company_a_code" placeholder="请输入社会代码"
|
||||
clearable :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<div class="tit">主要联系人</div>
|
||||
<el-row>
|
||||
<div style="display: flex; justify-content: left">
|
||||
<div class="right">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="姓名" prop="master_name">
|
||||
<el-input :disabled="isDisabled" v-model="formData.company_a_user"
|
||||
placeholder="请输入姓名" clearable :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="手机" prop="master_phone">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_a_phone"
|
||||
placeholder="请输入手机"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮箱">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_a_email"
|
||||
placeholder="请输入邮箱"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<div class="tit">乙方信息</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="公司名称" prop="company_name">
|
||||
<el-input
|
||||
v-model="formData.company_b_name"
|
||||
placeholder="请输入公司名称"
|
||||
clearable
|
||||
:disabled="isDisabled"
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="社会代码" prop="organization_code">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_b_code"
|
||||
placeholder="请输入社会代码"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<div class="tit">主要联系人</div>
|
||||
<el-row>
|
||||
<div style="display: flex; justify-content: left">
|
||||
<div class="right">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="姓名" prop="master_name">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_b_user"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="手机" prop="master_phone">
|
||||
<el-input :disabled="isDisabled" v-model="formData.company_a_phone"
|
||||
placeholder="请输入手机" clearable :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮箱">
|
||||
<el-input :disabled="isDisabled" v-model="formData.company_a_email"
|
||||
placeholder="请输入邮箱" clearable :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<div class="tit">乙方信息</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="公司名称" prop="company_name">
|
||||
<el-input v-model="formData.company_b_name" placeholder="请输入公司名称" clearable
|
||||
:disabled="isDisabled" :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="社会代码" prop="organization_code">
|
||||
<el-input :disabled="isDisabled" v-model="formData.company_b_code" placeholder="请输入社会代码"
|
||||
clearable :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="24" class="el-card pt-6">
|
||||
<div class="tit">主要联系人</div>
|
||||
<el-row>
|
||||
<div style="display: flex; justify-content: left">
|
||||
<div class="right">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="姓名" prop="master_name">
|
||||
<el-input :disabled="isDisabled" v-model="formData.company_b_user"
|
||||
placeholder="请输入姓名" clearable :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="手机" prop="master_phone">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_b_phone"
|
||||
placeholder="请输入手机"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮箱">
|
||||
<el-input
|
||||
:disabled="isDisabled"
|
||||
v-model="formData.company_b_email"
|
||||
placeholder="请输入邮箱"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<!-- -->
|
||||
<el-col :span="24" class="el-card pt-6" v-if="formData.cars_info">
|
||||
<div class="tit">租赁信息</div>
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="120px" label="车牌号"
|
||||
><el-input
|
||||
v-model="formData.cars_info.license"
|
||||
placeholder="请输入车牌号"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="手机" prop="master_phone">
|
||||
<el-input :disabled="isDisabled" v-model="formData.company_b_phone"
|
||||
placeholder="请输入手机" clearable :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="邮箱">
|
||||
<el-input :disabled="isDisabled" v-model="formData.company_b_email"
|
||||
placeholder="请输入邮箱" clearable :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="120px" label="车辆类型">
|
||||
<el-input
|
||||
v-model="formData.type"
|
||||
placeholder="请输入车辆类型"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input
|
||||
></el-form-item>
|
||||
<!-- -->
|
||||
<el-col :span="24" class="el-card pt-6" v-if="formData.cars_info">
|
||||
<div class="tit">租赁信息</div>
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="120px" label="车牌号"><el-input v-model="formData.cars_info.license"
|
||||
placeholder="请输入车牌号" clearable :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="120px" label="车辆类型">
|
||||
<el-input v-model="formData.type" placeholder="请输入车辆类型" clearable
|
||||
:style="{ width: '100%' }"></el-input></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="120px" label="使用公司"><el-input v-model="formData.company_b_name"
|
||||
placeholder="请输入使用公司" clearable :style="{ width: '100%' }"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="120px" label="签约时间">
|
||||
<el-input v-model="formData.update_time" placeholder="请输入签约时间" clearable
|
||||
:style="{ width: '100%' }"></el-input></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="120px" label="使用公司"
|
||||
><el-input
|
||||
v-model="formData.company_b_name"
|
||||
placeholder="请输入使用公司"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="120px" label="签约时间">
|
||||
<el-input
|
||||
v-model="formData.update_time"
|
||||
placeholder="请输入签约时间"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
></el-input
|
||||
></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<!-- 小组公司申请车辆 -->
|
||||
<!-- {{ formData.contract_logistic_id }}
|
||||
</el-form>
|
||||
<!-- 小组公司申请车辆 -->
|
||||
<!-- {{ formData.contract_logistic_id }}
|
||||
{{ formData.type }} -->
|
||||
<div
|
||||
v-if="formData.contract_logistic_id && formData.type == '租赁车辆'"
|
||||
class="el-card pt-6"
|
||||
>
|
||||
<div class="tit">租赁信息</div>
|
||||
<div v-if="formData.contract_logistic_id && formData.type == '租赁车辆'" class="el-card pt-6">
|
||||
<div class="tit">租赁信息</div>
|
||||
|
||||
<div style="padding: 0 2vw">
|
||||
<el-checkbox-group
|
||||
:max="formData.num"
|
||||
v-model="checkList"
|
||||
@change="handChangeFn"
|
||||
>
|
||||
<el-checkbox
|
||||
:label="item.license"
|
||||
v-for="(item, index) in formData.car_list"
|
||||
:key="index"
|
||||
/>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div style="padding: 0 2vw">
|
||||
<el-checkbox-group :max="formData.num" v-model="checkList" @change="handChangeFn">
|
||||
<el-checkbox :label="item.license" v-for="(item, index) in formData.car_list" :key="index" />
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="el-card pt-6">
|
||||
<el-upload style="display: inline-block" :headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/file'" :on-success="handleAvatarSuccess_three"
|
||||
:before-upload="handleBeforeUpload" :limit="1" v-if="formData?.status == 0" :on-exceed="handleExceed"
|
||||
ref="upload">
|
||||
<el-button type="primary">{{
|
||||
formData.file ? "重新上传" : "上传合同"
|
||||
}}</el-button>
|
||||
</el-upload>
|
||||
<a v-if="formData.file && formData?.status == 0" style="margin-left: 10px; color: #4a5dff" :href="formData.file"
|
||||
target="_blank">合同已上传,点击查看</a>
|
||||
<a style="margin-left: 10px; color: #4a5dff" :href="formData.file" v-if="formData.status > 0">查看合同</a>
|
||||
</div>
|
||||
<el-button type="primary" v-if="formData.status == 0" @click="create">确定</el-button>
|
||||
</div>
|
||||
<div class="el-card pt-6">
|
||||
<el-upload
|
||||
style="display: inline-block"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/file'"
|
||||
:on-success="handleAvatarSuccess_three"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:limit="1"
|
||||
v-if="formData?.status == 0"
|
||||
:on-exceed="handleExceed"
|
||||
ref="upload"
|
||||
>
|
||||
<el-button type="primary">{{
|
||||
formData.file ? "重新上传" : "上传合同"
|
||||
}}</el-button>
|
||||
</el-upload>
|
||||
<a
|
||||
v-if="formData.file && formData?.status == 0"
|
||||
style="margin-left: 10px; color: #4a5dff"
|
||||
:href="formData.file"
|
||||
target="_blank"
|
||||
>合同已上传,点击查看</a
|
||||
>
|
||||
<a
|
||||
style="margin-left: 10px; color: #4a5dff"
|
||||
:href="formData.file"
|
||||
v-if="formData.status > 0"
|
||||
>查看合同</a
|
||||
>
|
||||
</div>
|
||||
<el-button type="primary" v-if="formData.status == 0" @click="create"
|
||||
>确定</el-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { reactive, ref, inject } from "vue";
|
||||
@ -267,158 +161,160 @@ const router = useRouter();
|
||||
const route = useRoute();
|
||||
const checkList = ref([]);
|
||||
const formData = reactive({
|
||||
contract_logistic_id: "",
|
||||
contract_no: "",
|
||||
company_a_id: "",
|
||||
company_a_name: "",
|
||||
company_a_code: "",
|
||||
company_a_user: "",
|
||||
company_a_phone: "",
|
||||
company_a_email: "@service.ebaoquan.org",
|
||||
company_b_id: "",
|
||||
company_b_name: "",
|
||||
company_b_user: "",
|
||||
company_b_phone: "",
|
||||
company_b_code: "",
|
||||
company_b_email: "@service.ebaoquan.org",
|
||||
num: "",
|
||||
cars_info: {
|
||||
id: "",
|
||||
license: "",
|
||||
},
|
||||
car_list: [],
|
||||
type: 0,
|
||||
status: 0,
|
||||
file: "",
|
||||
contract_url: "",
|
||||
signing_timer: 0,
|
||||
url: null,
|
||||
create_time: "2023-08-31 14:26:42",
|
||||
update_time: "2023-08-31 14:26:49",
|
||||
reject_message: "",
|
||||
contract_logistic_id: "",
|
||||
contract_no: "",
|
||||
company_a_id: "",
|
||||
company_a_name: "",
|
||||
company_a_code: "",
|
||||
company_a_user: "",
|
||||
company_a_phone: "",
|
||||
company_a_email: "@service.ebaoquan.org",
|
||||
company_b_id: "",
|
||||
company_b_name: "",
|
||||
company_b_user: "",
|
||||
company_b_phone: "",
|
||||
company_b_code: "",
|
||||
company_b_email: "@service.ebaoquan.org",
|
||||
num: "",
|
||||
cars_info: {
|
||||
id: "",
|
||||
license: "",
|
||||
},
|
||||
car_list: [],
|
||||
type: 0,
|
||||
status: 0,
|
||||
file: "",
|
||||
contract_url: "",
|
||||
signing_timer: 0,
|
||||
url: null,
|
||||
create_time: "2023-08-31 14:26:42",
|
||||
update_time: "2023-08-31 14:26:49",
|
||||
reject_message: "",
|
||||
});
|
||||
let arrs = [];
|
||||
|
||||
const base_url = inject("base_url");
|
||||
const handChangeFn = (e) => {
|
||||
arrs = [];
|
||||
e.map((item) => {
|
||||
formData.car_list.forEach((element) => {
|
||||
if (element.license == item) {
|
||||
arrs.push(element);
|
||||
}
|
||||
arrs = [];
|
||||
e.map((item) => {
|
||||
formData.car_list.forEach((element) => {
|
||||
if (element.license == item) {
|
||||
arrs.push(element);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
const test = () => {
|
||||
window.open(formData.file, "_blank");
|
||||
window.open(formData.file, "_blank");
|
||||
};
|
||||
leaseContractDetail({ id: route.query.id }).then((res) => {
|
||||
for (let key in formData) {
|
||||
formData[key] = res[key];
|
||||
}
|
||||
formData.type ? (formData.type = "自有车辆") : (formData.type = "租赁车辆");
|
||||
for (let key in formData) {
|
||||
formData[key] = res[key];
|
||||
}
|
||||
formData.type ? (formData.type = "自有车辆") : (formData.type = "租赁车辆");
|
||||
});
|
||||
|
||||
const handleAvatarSuccess_three = (response, uploadFile) => {
|
||||
formData.file = response.data.uri;
|
||||
formData.file = response.data.uri;
|
||||
};
|
||||
|
||||
const create = () => {
|
||||
leaseUpContract({
|
||||
id: route.query.id,
|
||||
file: formData.file,
|
||||
cars: JSON.stringify(arrs),
|
||||
}).then((res) => {
|
||||
setTimeout(() => {
|
||||
router.go(-1);
|
||||
}, 1000);
|
||||
// console.log(res);
|
||||
});
|
||||
leaseUpContract({
|
||||
id: route.query.id,
|
||||
file: formData.file,
|
||||
cars: JSON.stringify(arrs),
|
||||
}).then((res) => {
|
||||
setTimeout(() => {
|
||||
router.go(-1);
|
||||
}, 1000);
|
||||
// console.log(res);
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.tit {
|
||||
font-size: 1.2rem;
|
||||
translate: 1vw -1vw;
|
||||
font-size: 1.2rem;
|
||||
translate: 1vw -1vw;
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload {
|
||||
width: 10vw;
|
||||
height: 6.3vw;
|
||||
background-color: #fff;
|
||||
border: 1px dashed var(--el-border-color);
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: var(--el-transition-duration-fast);
|
||||
width: 10vw;
|
||||
height: 6.3vw;
|
||||
background-color: #fff;
|
||||
border: 1px dashed var(--el-border-color);
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: var(--el-transition-duration-fast);
|
||||
}
|
||||
|
||||
.headimg {
|
||||
margin-left: 18px;
|
||||
margin-bottom: 18px;
|
||||
width: 120px;
|
||||
height: 140px;
|
||||
overflow: hidden;
|
||||
border: 1px dashed var(--el-border-color);
|
||||
border-radius: 6px;
|
||||
flex-shrink: 0;
|
||||
margin-left: 18px;
|
||||
margin-bottom: 18px;
|
||||
width: 120px;
|
||||
height: 140px;
|
||||
overflow: hidden;
|
||||
border: 1px dashed var(--el-border-color);
|
||||
border-radius: 6px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.upload-demo {
|
||||
display: flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.avatar-uploader-head .el-upload {
|
||||
width: 120px;
|
||||
height: 140px;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: var(--el-transition-duration-fast);
|
||||
width: 120px;
|
||||
height: 140px;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: var(--el-transition-duration-fast);
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: var(--el-color-primary);
|
||||
border-color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
.el-icon.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.el-icon.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.otherimg {
|
||||
img {
|
||||
width: 10vw;
|
||||
height: 6.3vw;
|
||||
border-radius: 5px;
|
||||
margin-left: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
img {
|
||||
width: 10vw;
|
||||
height: 6.3vw;
|
||||
border-radius: 5px;
|
||||
margin-left: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-card {
|
||||
margin-bottom: 10px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 10px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.tit {
|
||||
margin-top: 15px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.others {
|
||||
width: 100% !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,198 +1,96 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-form class="mb-[-16px]" 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="contract_no">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.contract_no"
|
||||
clearable
|
||||
placeholder="请输入合同编号"
|
||||
/> </el-form-item
|
||||
><el-form-item label="合同状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择合同类型"
|
||||
clearable
|
||||
class="w-[280px]"
|
||||
>
|
||||
<el-option label="未上传" :value="0"></el-option>
|
||||
<el-option label="已上传" :value="1"></el-option>
|
||||
</el-select>
|
||||
</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>
|
||||
<div class="mt-4">
|
||||
<el-table
|
||||
:data="pager.lists"
|
||||
:default-sort="{ prop: 'create_time', order: 'descending' }"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="id" prop="id" />
|
||||
<el-table-column label="合同类型" align="center">
|
||||
<template #default="{ row }">
|
||||
{{ typeFn(row.type) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="合同编号"
|
||||
prop="contract_no"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="甲方"
|
||||
prop="company_a_name"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="乙方"
|
||||
prop="company_b_name"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="类型"
|
||||
prop="product_count"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }"> 公司 </template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="租车数量(辆)"
|
||||
prop="num"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
prop="product_count"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span :style="`color:${statusFn(row.status).color}`">
|
||||
{{ statusFn(row.status).tit }}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="auto"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
v-perms="['contract.contract/wind_control']"
|
||||
v-if="row.status == 0"
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
path: 'vehicle_detail',
|
||||
query: {
|
||||
id: row.id,
|
||||
},
|
||||
}"
|
||||
>审核</router-link
|
||||
>
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
v-perms="['contract.contract/wind_control']"
|
||||
v-if="row.status > 0"
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
path: 'vehicle_detail',
|
||||
query: {
|
||||
id: row.id,
|
||||
},
|
||||
}"
|
||||
>详情</router-link
|
||||
>
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
v-if="row.status == 1"
|
||||
type="primary"
|
||||
link
|
||||
@click="sendContractPopFn(row.id)"
|
||||
>发送合同</el-button
|
||||
> -->
|
||||
<el-button
|
||||
v-if="row.status == 1 && row.contract_logistic_id != 0"
|
||||
type="primary"
|
||||
link
|
||||
@click="sendContractPopFn(row.id)"
|
||||
>发送合同</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="row.status == 2"
|
||||
:disabled="row.nums > 0"
|
||||
@click="sendAgaintPopFn(row.id)"
|
||||
link
|
||||
type="primary"
|
||||
>重新发送{{ row.nums ? row.nums + "s" : "" }}</el-button
|
||||
>
|
||||
<el-button v-if="row.status == 3" type="primary" link>
|
||||
<a :href="JSON.parse(row.contract_evidence).party_a"
|
||||
>下载证据</a
|
||||
>
|
||||
</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"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
/> -->
|
||||
<el-dialog v-model="showPop" @close="offPop">
|
||||
<h1>重要提醒</h1>
|
||||
<!-- <div class="content" v-if="showConctactPop"> -->
|
||||
<div class="content" v-if="!sendAgainPop">
|
||||
请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
|
||||
</div>
|
||||
<div class="content" v-else>
|
||||
确认签约短信将在60秒后发送,请注意查收,并点击短信链接进行线上合同签约
|
||||
</div>
|
||||
<p class="btn_menu">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="large"
|
||||
v-if="!sendAgainPop"
|
||||
@click="sendContractFn"
|
||||
>确认</el-button
|
||||
>
|
||||
<el-button type="primary" size="large" v-else @click="sendAgain"
|
||||
>重新发送</el-button
|
||||
>
|
||||
<el-button type="info" size="large" @click="offPop">返回</el-button>
|
||||
</p>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<div>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<el-form class="mb-[-16px]" 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="contract_no">
|
||||
<el-input class="w-[280px]" v-model="queryParams.contract_no" clearable placeholder="请输入合同编号" />
|
||||
</el-form-item><el-form-item label="合同状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择合同类型" clearable class="w-[280px]">
|
||||
<el-option label="未上传" :value="0"></el-option>
|
||||
<el-option label="已上传" :value="1"></el-option>
|
||||
</el-select>
|
||||
</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>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" :default-sort="{ prop: 'create_time', order: 'descending' }"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column label="id" prop="id" />
|
||||
<el-table-column label="合同类型" align="center">
|
||||
<template #default="{ row }">
|
||||
{{ typeFn(row.type) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" prop="contract_no" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="甲方" prop="company_a_name" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="乙方" prop="company_b_name" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="类型" prop="product_count" align="center" show-overflow-tooltip>
|
||||
<template #default="{ row }"> 公司 </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="租车数量(辆)" prop="num" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="状态" prop="product_count" align="center" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span :style="`color:${statusFn(row.status).color}`">
|
||||
{{ statusFn(row.status).tit }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="auto" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link v-perms="['contract.contract/wind_control']"
|
||||
v-if="row.status == 0">
|
||||
<router-link :to="{
|
||||
path: 'vehicle_detail',
|
||||
query: {
|
||||
id: row.id,
|
||||
},
|
||||
}">审核</router-link>
|
||||
</el-button>
|
||||
<el-button type="primary" link v-perms="['contract.contract/wind_control']"
|
||||
v-if="row.status > 0">
|
||||
<router-link :to="{
|
||||
path: 'vehicle_detail',
|
||||
query: {
|
||||
id: row.id,
|
||||
},
|
||||
}">详情</router-link>
|
||||
</el-button>
|
||||
<el-button v-if="row.status == 1 && row.contract_logistic_id != 0" type="primary" link
|
||||
@click="sendContractPopFn(row.id)">发送合同</el-button>
|
||||
<el-button v-if="row.status == 2" :disabled="row.nums > 0" @click="sendAgaintPopFn(row.id)" link
|
||||
type="primary">重新发送{{ row.nums ? row.nums + "s" : "" }}</el-button>
|
||||
<el-button v-if="row.status == 3" type="primary" link>
|
||||
<a :href="JSON.parse(row.contract_evidence).party_a">下载证据</a>
|
||||
</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>
|
||||
|
||||
<el-dialog v-model="showPop" @close="offPop">
|
||||
<h1>重要提醒</h1>
|
||||
<div class="content" v-if="!sendAgainPop">
|
||||
请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
|
||||
</div>
|
||||
<div class="content" v-else>
|
||||
确认签约短信将在60秒后发送,请注意查收,并点击短信链接进行线上合同签约
|
||||
</div>
|
||||
<p class="btn_menu">
|
||||
<el-button type="primary" size="large" v-if="!sendAgainPop" @click="sendContractFn">确认</el-button>
|
||||
<el-button type="primary" size="large" v-else @click="sendAgain">重新发送</el-button>
|
||||
<el-button type="info" size="large" @click="offPop">返回</el-button>
|
||||
</p>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="flowTypeLists">
|
||||
@ -209,126 +107,127 @@ var contractId = 0;
|
||||
const showPop = ref(false);
|
||||
const sendAgainPop = ref(false);
|
||||
const sendAgain = () => {
|
||||
sendMsg({ id: contractId }).then((res) => {
|
||||
var inde = pager.lists.findIndex(function (element) {
|
||||
return element.id === contractId;
|
||||
sendMsg({ id: contractId }).then((res) => {
|
||||
var inde = pager.lists.findIndex(function (element) {
|
||||
return element.id === contractId;
|
||||
});
|
||||
index.value = inde;
|
||||
pager.lists[index.value].nums = 10;
|
||||
timeFn(index.value);
|
||||
});
|
||||
index.value = inde;
|
||||
pager.lists[index.value].nums = 10;
|
||||
timeFn(index.value);
|
||||
});
|
||||
};
|
||||
const timeFn = (i: number) => {
|
||||
const timers = setInterval(() => {
|
||||
pager.lists[i].nums--;
|
||||
if (pager.lists[i].nums <= 0) {
|
||||
clearInterval(timers);
|
||||
}
|
||||
}, 1000);
|
||||
const timers = setInterval(() => {
|
||||
pager.lists[i].nums--;
|
||||
if (pager.lists[i].nums <= 0) {
|
||||
clearInterval(timers);
|
||||
}
|
||||
}, 1000);
|
||||
};
|
||||
const sendContractPopFn = (id: number) => {
|
||||
(showPop.value = true), (sendAgainPop.value = true), (contractId = id);
|
||||
(showPop.value = true), (sendAgainPop.value = true), (contractId = id);
|
||||
};
|
||||
const sendAgaintPopFn = (id: number) => {
|
||||
(showPop.value = true), (contractId = id);
|
||||
(showPop.value = true), (contractId = id);
|
||||
};
|
||||
const sendContractFn = () => {
|
||||
sendContract({ id: contractId }).then((res) => {
|
||||
feedback.msgSuccess("发送成功");
|
||||
var inde = pager.lists.findIndex(function (element) {
|
||||
return element.id === contractId;
|
||||
sendContract({ id: contractId }).then((res) => {
|
||||
feedback.msgSuccess("发送成功");
|
||||
var inde = pager.lists.findIndex(function (element) {
|
||||
return element.id === contractId;
|
||||
});
|
||||
index.value = inde;
|
||||
showPop.value = false;
|
||||
pager.lists[index.value].status = 2;
|
||||
pager.lists[index.value].nums = 10;
|
||||
timeFn(index.value);
|
||||
});
|
||||
index.value = inde;
|
||||
showPop.value = false;
|
||||
pager.lists[index.value].status = 2;
|
||||
pager.lists[index.value].nums = 10;
|
||||
timeFn(index.value);
|
||||
});
|
||||
};
|
||||
|
||||
const offPop = () => {
|
||||
showPop.value = false;
|
||||
// showConctactPop.value = false;
|
||||
showPop.value = false;
|
||||
// showConctactPop.value = false;
|
||||
};
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
company_name: "",
|
||||
contract_no: "",
|
||||
status: "",
|
||||
company_name: "",
|
||||
contract_no: "",
|
||||
status: "",
|
||||
});
|
||||
const statusFn = (status: number) => {
|
||||
switch (status) {
|
||||
case 0:
|
||||
return { tit: "待上传", color: "rgb(238, 190, 119)" };
|
||||
case 1:
|
||||
return { tit: "已上传", color: "rgb(103, 194, 58)" };
|
||||
case 2:
|
||||
return { tit: "签约中", color: "red" };
|
||||
case 3:
|
||||
return { tit: "已签约", color: "rgb(103, 194, 58)" };
|
||||
// default:
|
||||
// return { tit: "审核通过", color: "green" };
|
||||
}
|
||||
switch (status) {
|
||||
case 0:
|
||||
return { tit: "待上传", color: "rgb(238, 190, 119)" };
|
||||
case 1:
|
||||
return { tit: "已上传", color: "rgb(103, 194, 58)" };
|
||||
case 2:
|
||||
return { tit: "签约中", color: "red" };
|
||||
case 3:
|
||||
return { tit: "已签约", color: "rgb(103, 194, 58)" };
|
||||
// default:
|
||||
// return { tit: "审核通过", color: "green" };
|
||||
}
|
||||
};
|
||||
const typeFn = (status: number) => {
|
||||
switch (status) {
|
||||
case 0:
|
||||
return "租赁合同";
|
||||
switch (status) {
|
||||
case 0:
|
||||
return "租赁合同";
|
||||
|
||||
case 1:
|
||||
return "自由车辆合同";
|
||||
case 1:
|
||||
return "自由车辆合同";
|
||||
|
||||
case 2:
|
||||
return "解除合同";
|
||||
default:
|
||||
}
|
||||
case 2:
|
||||
return "解除合同";
|
||||
default:
|
||||
}
|
||||
};
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
};
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData("");
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: leaseContractList,
|
||||
params: queryParams,
|
||||
fetchFun: leaseContractList,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
getLists();
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.btn {
|
||||
position: absolute;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
color: red;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
color: red;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.content {
|
||||
font-size: 20px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.info {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.btn_menu {
|
||||
margin-top: 10vh;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-top: 10vh;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,98 +1,113 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="任务名称" prop="name">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.name"
|
||||
clearable
|
||||
placeholder="请输入任务名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核状态" prop="name">
|
||||
<el-select
|
||||
v-model="queryParams.check_status"
|
||||
placeholder="请选择审核状态"
|
||||
clearable
|
||||
class="w-[280px]"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in checkStatusList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</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">
|
||||
<!-- <el-button v-perms="['flow/add']" type="primary" @click="handleAdd">
|
||||
<template #icon>
|
||||
<icon name="el-icon-Plus" />
|
||||
</template>
|
||||
新增
|
||||
</el-button> -->
|
||||
<!-- <el-button
|
||||
v-perms="['flow/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)"
|
||||
>
|
||||
删除
|
||||
</el-button> -->
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="ID" prop="id" />
|
||||
<el-table-column label="任务名称" prop="name" show-overflow-tooltip />
|
||||
<el-table-column label="任务描述" prop="remark" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务金额" prop="remark" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="任务完成时间"
|
||||
prop="remark"
|
||||
label="任务名称"
|
||||
prop="task.title"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="任务描述"
|
||||
prop="task.content"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属公司" prop="remark" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="片区经理" prop="remark" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="当前审核人"
|
||||
prop="department"
|
||||
label="任务金额"
|
||||
prop="task.money"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核状态" prop="status" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.status == 2" style="color: #f56c6c">未通过</span>
|
||||
<span v-if="row.status == 1" style="color: #67c23a">已通过</span>
|
||||
<span v-if="row.status == 0" style="color: #e6a23c">未审核</span>
|
||||
</template>
|
||||
<el-table-column
|
||||
label="任务提交时间"
|
||||
prop="task.update_time"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="状态" prop="status" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.status == 1">启用</span>
|
||||
<span v-if="row.status == 0">禁用</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column
|
||||
label="账号状态"
|
||||
min-width="100"
|
||||
v-perms="['auth.admin/edit']"
|
||||
<el-table-column
|
||||
label="公司名称"
|
||||
prop="company_name"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="片区经理"
|
||||
prop="area_manager"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="审核状态"
|
||||
prop="check_status"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-switch
|
||||
v-if="row.root != 1"
|
||||
v-model="row.status"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
@change="changeStatus(row)"
|
||||
/>
|
||||
<span v-if="row.check_status == 3" style="color: #f56c6c"
|
||||
>未通过</span
|
||||
>
|
||||
<span v-if="row.check_status == 2" style="color: #67c23a"
|
||||
>已通过</span
|
||||
>
|
||||
<span v-if="row.check_status == 1" style="color: #e6a23c"
|
||||
>待审核</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="row.check_status <= 1"
|
||||
v-perms="['flow/edit']"
|
||||
type="primary"
|
||||
link
|
||||
v-if="row.status == 0"
|
||||
@click="handleEdit(row)"
|
||||
@click="handleEdit(row, 'edit')"
|
||||
>
|
||||
审核
|
||||
</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
link
|
||||
v-else
|
||||
@click="handleEdit(row, 'details')"
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
v-perms="['flow/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -111,13 +126,13 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="flowLists">
|
||||
<script lang="ts" setup name="flowLists">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import { apiFlowLists, apiFlowDetil, apiFlowStatus } from "@/api/examined";
|
||||
import { apiApproveList } from "@/api/examined";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
import EditPopup from "./examined_popup.vue";
|
||||
import EditPopup from "./index_list_popup.vue";
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
// 是否显示编辑框
|
||||
@ -126,18 +141,25 @@ const showEdit = ref(false);
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
name: "",
|
||||
check_type: "",
|
||||
type: "",
|
||||
flow_cate: "",
|
||||
department_ids: "",
|
||||
copy_uids: "",
|
||||
remark: "",
|
||||
flow_list: "",
|
||||
admin_id: "",
|
||||
status: "",
|
||||
delete_user_id: "",
|
||||
check_status: "",
|
||||
type: 1,
|
||||
});
|
||||
|
||||
const checkStatusList = ref([
|
||||
{
|
||||
id: 1,
|
||||
name: "待审核",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "已通过",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "未通过",
|
||||
},
|
||||
]);
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
@ -151,7 +173,7 @@ const { dictData } = useDictData("");
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiFlowLists,
|
||||
fetchFun: apiApproveList,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
@ -169,11 +191,6 @@ const handleEdit = async (data: any, type = "edit") => {
|
||||
editRef.value?.open(type);
|
||||
editRef.value?.setFormData(data);
|
||||
};
|
||||
// 状态
|
||||
const changeStatus = (row: any) => {
|
||||
console.log(row.status);
|
||||
apiFlowStatus({ id: row.id, status: row.status });
|
||||
};
|
||||
|
||||
// 删除
|
||||
// const handleDelete = async (id: number | any[]) => {
|
||||
|
@ -23,38 +23,38 @@
|
||||
</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 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="flow_cate">
|
||||
<el-input readonly v-model="formData.flow_cate" />
|
||||
<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="name">
|
||||
<el-input readonly v-model="formData.name" />
|
||||
<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="remark">
|
||||
<el-form-item label="任务描述" prop="task.content">
|
||||
<el-input
|
||||
readonly
|
||||
v-model="formData.remark"
|
||||
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.id" />
|
||||
<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.flow_cate" />
|
||||
<el-input readonly v-model="formData.area_manager" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -64,28 +64,39 @@
|
||||
<el-form-item label="详情描述" prop="remark">
|
||||
<el-input
|
||||
readonly
|
||||
v-model="formData.remark"
|
||||
:value="formData.task?.extend.other.note"
|
||||
clearable
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="flow_cate">
|
||||
<el-form-item label="图片附件">
|
||||
<el-image
|
||||
class="attachment"
|
||||
v-for="(item, index) in 5"
|
||||
v-for="(item, index) in formData.task.extend.other.annex"
|
||||
:key="index"
|
||||
src=""
|
||||
:preview-src-list="[]"
|
||||
: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-col :span="24">
|
||||
<el-form-item label="">
|
||||
<el-timeline>
|
||||
<el-timeline-item
|
||||
@ -99,20 +110,20 @@
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="审核"
|
||||
prop="flow_detail.check_type"
|
||||
prop="check_status"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-radio-group
|
||||
:disabled="mode == 'details'"
|
||||
v-model="formData.flow_detail.type"
|
||||
v-model="formData.check_status"
|
||||
>
|
||||
<el-radio :label="1">通过</el-radio>
|
||||
<el-radio :label="2">驳回</el-radio>
|
||||
<el-radio :label="2">通过</el-radio>
|
||||
<el-radio :label="3">驳回</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -136,7 +147,7 @@
|
||||
<script lang="ts" setup name="flowEdit">
|
||||
import type { FormInstance } from "element-plus";
|
||||
import Popup from "@/components/popup/index.vue";
|
||||
import { apiFlowCreat, apiFlowDetil } from "@/api/examined";
|
||||
import { apiApproveAudit } from "@/api/examined";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import type { PropType } from "vue";
|
||||
defineProps({
|
||||
@ -176,32 +187,47 @@ const activities = ref([
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
name: "",
|
||||
check_type: "",
|
||||
type: "",
|
||||
flow_cate: "",
|
||||
task: {},
|
||||
company_name: "",
|
||||
area_manager: "",
|
||||
check_status: 1,
|
||||
remark: "",
|
||||
flow_detail: {
|
||||
type: 1,
|
||||
step: [{ type: "", user: [{ id: "", name: "" }] }],
|
||||
},
|
||||
copy_to: [{ id: "", name: "" }],
|
||||
});
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({});
|
||||
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);
|
||||
// let res = await apiFlowDetil(data.id);
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
formData[key] = res[key];
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
formData.flow_detail.type = Number(formData.flow_detail.type);
|
||||
};
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
@ -213,9 +239,13 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate();
|
||||
mode.value == "edit"
|
||||
? await apiFlowCreat(formData)
|
||||
: await apiFlowCreat(formData);
|
||||
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");
|
||||
};
|
||||
@ -249,4 +279,11 @@ defineExpose({
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.video {
|
||||
width: 300px;
|
||||
height: 150px;
|
||||
/* background-color: red; */
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
@ -94,6 +94,11 @@
|
||||
prop="create_time"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
prop="deny_desc"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<!-- <el-button
|
||||
|
@ -7,6 +7,7 @@
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
:button="mode == 'audit'"
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
@ -30,7 +31,17 @@
|
||||
placeholder="请输入提现金额"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="amount">
|
||||
<el-form-item label="电子发票" prop="invoice">
|
||||
<el-button
|
||||
v-if="formData.invoice"
|
||||
type="primary"
|
||||
link
|
||||
@click="openTransfer(formData.invoice)"
|
||||
>查看发票</el-button
|
||||
>
|
||||
<el-button v-else link>暂无发票</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="余额详情" prop="amount">
|
||||
<el-button type="primary" link>
|
||||
<router-link
|
||||
:to="{
|
||||
@ -46,12 +57,17 @@
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核" prop="status">
|
||||
<el-radio-group v-model="formData.status">
|
||||
<el-radio-group v-model="formData.status" :disabled="mode != 'audit'">
|
||||
<el-radio :label="1">通过</el-radio>
|
||||
<el-radio :label="2">拒绝</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formData.status == 2" label="备注" prop="deny_desc">
|
||||
<el-form-item
|
||||
v-if="formData.status == 2"
|
||||
label="备注"
|
||||
prop="deny_desc"
|
||||
:readonly="mode != 'audit'"
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.deny_desc"
|
||||
clearable
|
||||
@ -65,6 +81,7 @@
|
||||
class="upload-demo"
|
||||
style="width: 100%"
|
||||
drag
|
||||
:accept="fileTypeList.join(', ')"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="actionUrl"
|
||||
:limit="1"
|
||||
@ -79,7 +96,12 @@
|
||||
<div class="el-upload__tip">请上传JPG/JPEG/PNG/GIF/PDF文件</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
<el-button v-else type="primary" link @click="openTransfer">
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
link
|
||||
@click="openTransfer(formData.transfer_voucher)"
|
||||
>
|
||||
查看凭证
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
@ -135,6 +157,7 @@ const formData = reactive({
|
||||
company_name: "",
|
||||
s_date: "",
|
||||
e_date: "",
|
||||
invoice: "",
|
||||
});
|
||||
|
||||
// 表单验证
|
||||
@ -177,6 +200,8 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
formData[key] = data[key];
|
||||
}
|
||||
}
|
||||
formData.invoice =
|
||||
"https://ceshi-worker-task.lihaink.cn/uploads/files/20230918/20230918093829d92260738.pdf";
|
||||
};
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
@ -229,8 +254,8 @@ const handleFile = (e: any) => {
|
||||
};
|
||||
|
||||
// 查看凭证
|
||||
const openTransfer = () => {
|
||||
window.open(formData.transfer_voucher);
|
||||
const openTransfer = (uri: any) => {
|
||||
window.open(uri);
|
||||
};
|
||||
|
||||
// 提交按钮
|
||||
|
@ -1,11 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<people />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<people />
|
||||
<el-col :span="8" v-for="item in userList" :key="item.id">
|
||||
<people :datas="item" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@ -133,11 +130,12 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup name="articleLists">
|
||||
import { getUmChangeType, accountLog } from "@/api/finance";
|
||||
import { getUmChangeType, accountLog, getCompanyUserList } from "@/api/finance";
|
||||
import { useDictOptions } from "@/hooks/useDictOptions";
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useRoute } from "vue-router";
|
||||
import people from "@/views/finance/component/people.vue";
|
||||
import { apiUserRoleLists } from "@/api/user_role";
|
||||
|
||||
const route = useRoute();
|
||||
// console.log("company_id", route.query?.company_id);
|
||||
@ -153,6 +151,21 @@ if (route.query?.company_id) queryParams.company_id = route.query?.company_id;
|
||||
if (route.query?.s_date) queryParams.start_time = route.query?.s_date;
|
||||
if (route.query?.e_date) queryParams.end_time = route.query?.e_date;
|
||||
|
||||
const userList = ref([]);
|
||||
const initUserList = async () => {
|
||||
let res = await getCompanyUserList({
|
||||
company_id: queryParams.company_id,
|
||||
});
|
||||
let role = await apiUserRoleLists({});
|
||||
res = res.map((item: any) => {
|
||||
let p = role.lists.find((e: any) => e.id == item.group_id);
|
||||
p.name ? (item.group_name = p.name) : (item.group_name = "暂无角色");
|
||||
return item;
|
||||
});
|
||||
userList.value = res;
|
||||
};
|
||||
initUserList();
|
||||
|
||||
const { pager, getLists, resetPage, resetParams } = usePaging({
|
||||
fetchFun: accountLog,
|
||||
params: queryParams,
|
||||
|
@ -1,20 +1,24 @@
|
||||
<template>
|
||||
<el-card class="!border-none" shadow="never">
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-avatar
|
||||
:size="80"
|
||||
src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
|
||||
style="margin-right: 16px"
|
||||
/>
|
||||
<el-avatar :size="80" :src="datas.avatar" style="margin-right: 16px" />
|
||||
<el-row>
|
||||
<el-col :span="12">姓名: 张三三</el-col>
|
||||
<el-col :span="12">电话: 1888888888888</el-col>
|
||||
<el-col :span="24">角色: 超级管理员</el-col>
|
||||
<el-col :span="12">姓名: {{ datas.nickname }}</el-col>
|
||||
<el-col :span="12">电话: {{ datas.mobile }}</el-col>
|
||||
<el-col :span="24">角色: {{ datas.group_name }}</el-col>
|
||||
<el-col :span="12"
|
||||
>押金: <span style="color: #e6a23c; font-weight: bold">0.00</span>元
|
||||
>押金:
|
||||
<span style="color: #e6a23c; font-weight: bold">{{
|
||||
datas.deposit
|
||||
}}</span
|
||||
>元
|
||||
</el-col>
|
||||
<el-col :span="12"
|
||||
>收益: <span style="color: #67c23a; font-weight: bold">0.00</span>元
|
||||
>收益:
|
||||
<span style="color: #67c23a; font-weight: bold">{{
|
||||
datas.income
|
||||
}}</span
|
||||
>元
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@ -22,6 +26,12 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="peopleMoney">
|
||||
defineProps({
|
||||
datas: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -197,7 +197,12 @@
|
||||
>
|
||||
<el-form-item class="other" label="资质信息" prop="contract_no" required>
|
||||
<div class="company" v-for="(v, i) in compenyBimg" :key="i">
|
||||
<img :src="v" />
|
||||
<el-image
|
||||
:src="v"
|
||||
:preview-src-list="compenyBimg"
|
||||
:initial-index="i"
|
||||
fit="cover"
|
||||
/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="公司资质" prop="contract_type" required>
|
||||
@ -361,6 +366,10 @@
|
||||
placeholder="商户入驻合同"
|
||||
/>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item v-if="formData.notes" label="备注">
|
||||
<el-input v-model="formData.notes" :readonly="true" type="textarea" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="合同编号" prop="contract_no">
|
||||
<el-input
|
||||
v-model="formData.party_b_name"
|
||||
@ -378,6 +387,7 @@
|
||||
prop="field127"
|
||||
>
|
||||
<el-upload
|
||||
accept=".pdf"
|
||||
:headers="{ Token: userStore.token }"
|
||||
class="upload-demo"
|
||||
:action="base_url + '/upload/file'"
|
||||
@ -466,6 +476,7 @@ const formData = reactive({
|
||||
url: "",
|
||||
status_name: "",
|
||||
signed_contract_url: "",
|
||||
notes: "",
|
||||
});
|
||||
const fileList = ref<UploadUserFile[]>([]);
|
||||
const basicdata = ref({});
|
||||
@ -557,7 +568,7 @@ const handleAvatarSuccess_four: UploadProps["onSuccess"] = (
|
||||
|
||||
const router = useRouter();
|
||||
const submitContract = () => {
|
||||
if (!formData.file) ElMessage.error("请先上传合同!");
|
||||
if (!formData.file) return ElMessage.error("请先上传合同!");
|
||||
apiShopWindControl({ file: formData.file, id: route.query.id });
|
||||
removeTab();
|
||||
router.back();
|
||||
@ -600,6 +611,11 @@ onMounted(async () => {
|
||||
height: 6.3vw;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.el-image {
|
||||
width: 10vw;
|
||||
height: 6.3vw;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.persenal {
|
||||
display: flex;
|
||||
|
@ -110,8 +110,10 @@
|
||||
<span v-else style="color: #fe0000">未签约</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="notes" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="220" fixed="right">
|
||||
<el-table-column label="操作" width="280" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -126,6 +128,14 @@
|
||||
>{{ row.status ? "详情" : "审核" }}</router-link
|
||||
>
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-perms="['shop_contract/details']"
|
||||
link
|
||||
@click="addNotes(row)"
|
||||
>
|
||||
设置备注
|
||||
</el-button>
|
||||
<template v-if="row.status == 0">
|
||||
<el-button
|
||||
v-perms="['shop_contract/details']"
|
||||
@ -220,6 +230,19 @@
|
||||
<el-button type="info" size="large" @click="offPop">返回</el-button>
|
||||
</p>
|
||||
</el-dialog>
|
||||
<popup
|
||||
ref="notesRef"
|
||||
title="设置备注"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
>
|
||||
<el-form :model="formData" :rules="noteRules">
|
||||
<el-form-item label="备注" prop="notes">
|
||||
<el-input v-model="formData.notes" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -232,10 +255,12 @@ import {
|
||||
apiShopDraftingcontracts,
|
||||
apiShopSendMsgApi,
|
||||
contractEvidence,
|
||||
apiShopContractAddNotes,
|
||||
} from "@/api/shop_contract";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
import EditPopup from "./edit.vue";
|
||||
import Popup from "@/components/popup/index.vue";
|
||||
|
||||
const statusdata = reactive([
|
||||
{ id: "1", name: "已签约" },
|
||||
@ -246,6 +271,37 @@ const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false);
|
||||
|
||||
// 设置备注
|
||||
const formData = ref({
|
||||
id: "",
|
||||
notes: "",
|
||||
});
|
||||
const noteRules = reactive({
|
||||
notes: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入备注",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
});
|
||||
const notesRef = shallowRef();
|
||||
const addNotes = (row: any) => {
|
||||
let arr = Object.keys(formData.value);
|
||||
arr.forEach((key: any) => {
|
||||
formData.value[key] = row[key];
|
||||
});
|
||||
notesRef.value.open();
|
||||
};
|
||||
const handleSubmit = async () => {
|
||||
await apiShopContractAddNotes({ ...formData.value });
|
||||
getLists();
|
||||
notesRef.value.close();
|
||||
};
|
||||
const handleClose = () => {
|
||||
notesRef.value.close();
|
||||
};
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
contract_no: "",
|
||||
|
@ -7,7 +7,7 @@
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.company_name"
|
||||
clearable
|
||||
placeholder="请输入公司名称"
|
||||
placeholder="请输入商户名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="主联系人姓名" prop="master_name">
|
||||
@ -61,12 +61,12 @@
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="公司名称"
|
||||
label="商户名称"
|
||||
prop="company_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="组织机构代码"
|
||||
label="社会代码"
|
||||
prop="organization_code"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
|
@ -22,7 +22,7 @@
|
||||
:disabled="true"
|
||||
v-model="formData.id"
|
||||
clearable
|
||||
placeholder="请输入任务安排"
|
||||
placeholder="请输入任务ID"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务日期" prop="datetime">
|
||||
@ -50,10 +50,131 @@
|
||||
<el-form-item label="任务描述" v-if="formData.template_name">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="formData.content"
|
||||
v-model="formData.templateInfo.content"
|
||||
placeholder="没有任务描述"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="一阶段天数">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="formData.templateInfo.stage_day_one"
|
||||
clearable
|
||||
placeholder="请输入天数"
|
||||
type="number"
|
||||
>
|
||||
<template #append>天</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="一阶段金额">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="formData.templateInfo.money"
|
||||
clearable
|
||||
placeholder="请输入金额"
|
||||
type="number"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="二阶段天数">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="formData.templateInfo.stage_day_two"
|
||||
clearable
|
||||
placeholder="请输入天数"
|
||||
type="number"
|
||||
>
|
||||
<template #append>天</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="二阶段金额">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="formData.templateInfo.money_two"
|
||||
clearable
|
||||
placeholder="请输入金额"
|
||||
type="number"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="noThreefilter(+formData.templateInfo.type)"
|
||||
label="三阶段天数"
|
||||
>
|
||||
<el-input
|
||||
disabled
|
||||
v-model="formData.templateInfo.stage_day_three"
|
||||
clearable
|
||||
placeholder="请输入天数"
|
||||
type="number"
|
||||
>
|
||||
<template #append>天</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="noThreefilter(+formData.templateInfo.type)"
|
||||
label="三阶段金额"
|
||||
>
|
||||
<el-input
|
||||
disabled
|
||||
v-model="formData.templateInfo.new_money_three"
|
||||
clearable
|
||||
placeholder="请输入金额"
|
||||
type="number"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="长期金额" v-if="+formData.templateInfo.types == 2">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="formData.templateInfo.money_three"
|
||||
clearable
|
||||
placeholder="请输入金额"
|
||||
type="number"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formData.templateInfo.type == 32" label="中转点">
|
||||
<el-input
|
||||
disabled
|
||||
placeholder="请选择中转点"
|
||||
:value="formData.templateInfo?.extend?.transfer?.address"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formData.templateInfo.type == 32" label="终点">
|
||||
<el-input
|
||||
disabled
|
||||
placeholder="请选择终点"
|
||||
:value="formData.templateInfo?.extend?.terminus?.address"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item
|
||||
v-if="formData.templateInfo.type == 35"
|
||||
label="负责人"
|
||||
prop="task_admin"
|
||||
@click="clickTaskAdmin"
|
||||
>
|
||||
<el-input
|
||||
placeholder="请选择负责人"
|
||||
readonly
|
||||
v-model="formData.task_admin_name"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item
|
||||
v-if="formData.templateInfo.type == 35"
|
||||
label="充值金额(元)"
|
||||
prop="recharge"
|
||||
>
|
||||
<el-input
|
||||
disabled
|
||||
placeholder="请输入充值金额(元)"
|
||||
v-model="formData.templateInfo.recharge"
|
||||
type="number"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item v-if="mode == 'show'" label="">
|
||||
<el-button type="primary" @click="clickUpdate"> 修改 </el-button>
|
||||
<el-button type="danger" @click="clickDelete"> 删除 </el-button>
|
||||
@ -100,6 +221,7 @@ const formData = reactive({
|
||||
end_time: "",
|
||||
datetime: "",
|
||||
content: "",
|
||||
templateInfo: {},
|
||||
});
|
||||
|
||||
interface RuleForm {
|
||||
@ -116,6 +238,13 @@ const rules = reactive<FormRules<RuleForm>>({
|
||||
},
|
||||
});
|
||||
|
||||
// 没有三阶段的任务类型ID, 使用以下方法过滤
|
||||
const noThreeList = reactive([31, 32, 33, 34, 35, 45, 48, 49]);
|
||||
const noThreefilter = (id: number) => {
|
||||
if (noThreeList.includes(id)) return false;
|
||||
else return true;
|
||||
};
|
||||
|
||||
function customEvent(data: any) {
|
||||
isShow.value = false;
|
||||
formData.template_id = data.id;
|
||||
|
@ -100,7 +100,7 @@ const queryParams = reactive({
|
||||
start_time: "",
|
||||
end_time: "",
|
||||
page_no: 1,
|
||||
pageSize: 150,
|
||||
page_size: 300,
|
||||
});
|
||||
if (route.query.id) {
|
||||
queryParams.scheduling_id = route.query.id.toString();
|
||||
|
@ -1,31 +1,38 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px] formtabel" :model="queryParams" inline label-width="100px">
|
||||
<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="公司" prop="company_id">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.company_id"
|
||||
clearable
|
||||
placeholder="请输入公司"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button class="el-btn" 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">
|
||||
<!-- <el-button
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form
|
||||
class="mb-[-16px] formtabel"
|
||||
:model="queryParams"
|
||||
inline
|
||||
label-width="100px"
|
||||
>
|
||||
<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="公司" prop="company_id">
|
||||
<el-input
|
||||
class="w-[280px]"
|
||||
v-model="queryParams.company_id"
|
||||
clearable
|
||||
placeholder="请输入公司"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button class="el-btn" 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">
|
||||
<!-- <el-button
|
||||
v-perms="['task_scheduling.task_scheduling/add']"
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
@ -35,7 +42,7 @@
|
||||
</template>
|
||||
新增
|
||||
</el-button> -->
|
||||
<!--
|
||||
<!--
|
||||
<el-button
|
||||
v-perms="['task_scheduling.task_scheduling/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@ -43,176 +50,192 @@
|
||||
>
|
||||
删除
|
||||
</el-button> -->
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="区域经理" prop="admin_name" show-overflow-tooltip />
|
||||
<el-table-column label="公司" prop="company_name" show-overflow-tooltip />
|
||||
<el-table-column label="每日最大金额" prop="money" show-overflow-tooltip />
|
||||
<el-table-column
|
||||
label="公司类型"
|
||||
prop="company_type_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
min-width="100"
|
||||
v-perms="['task_scheduling.task_scheduling/edit']"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-switch
|
||||
v-model="row.status"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
@change="changeStatus(row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column
|
||||
label="区域经理"
|
||||
prop="admin_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="公司"
|
||||
prop="company_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="每日最大金额"
|
||||
prop="money"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="公司类型"
|
||||
prop="company_type_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
min-width="100"
|
||||
v-perms="['task_scheduling.task_scheduling/edit']"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-switch
|
||||
v-model="row.status"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
@change="changeStatus(row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['task.task_calendar']"
|
||||
@click="moneyAdd(row)"
|
||||
type="primary"
|
||||
link
|
||||
>
|
||||
金额
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['task_template.task_template/lists']"
|
||||
type="primary"
|
||||
link
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('task_template.task_template/lists'),
|
||||
query: {
|
||||
id: row.id,
|
||||
company_id: row.company_id
|
||||
}
|
||||
}"
|
||||
>任务安排</router-link
|
||||
>
|
||||
</el-button>
|
||||
<el-button v-perms="['task.task_calendar']" type="primary" link>
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('task.task_calendar'),
|
||||
query: {
|
||||
id: row.id,
|
||||
company_id: row.company_id
|
||||
}
|
||||
}"
|
||||
>任务日程</router-link
|
||||
>
|
||||
</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"
|
||||
/>
|
||||
<money
|
||||
ref="moneyRef"
|
||||
v-if="moneyShow"
|
||||
@success="getLists"
|
||||
@close="moneyShow = false"
|
||||
></money>
|
||||
</div>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['task.task_calendar']"
|
||||
@click="moneyAdd(row)"
|
||||
type="primary"
|
||||
link
|
||||
>
|
||||
金额
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['task_template.task_template/lists']"
|
||||
type="primary"
|
||||
link
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('task_template.task_template/lists'),
|
||||
query: {
|
||||
id: row.id,
|
||||
company_id: row.company_id,
|
||||
company_type: row.dict_company_type,
|
||||
},
|
||||
}"
|
||||
>任务安排</router-link
|
||||
>
|
||||
</el-button>
|
||||
<el-button v-perms="['task.task_calendar']" type="primary" link>
|
||||
<router-link
|
||||
:to="{
|
||||
path: getRoutePath('task.task_calendar'),
|
||||
query: {
|
||||
id: row.id,
|
||||
company_id: row.company_id,
|
||||
},
|
||||
}"
|
||||
>任务日程</router-link
|
||||
>
|
||||
</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"
|
||||
/>
|
||||
<money
|
||||
ref="moneyRef"
|
||||
v-if="moneyShow"
|
||||
@success="getLists"
|
||||
@close="moneyShow = false"
|
||||
></money>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="taskSchedulingLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiTaskSchedulingLists, apiTaskSchedulingEdit } from '@/api/task_scheduling'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import { dictDataLists } from '@/api/setting/dict'
|
||||
import { getRoutePath } from '@/router'
|
||||
import money from './money.vue'
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { useDictData } from "@/hooks/useDictOptions";
|
||||
import {
|
||||
apiTaskSchedulingLists,
|
||||
apiTaskSchedulingEdit,
|
||||
} from "@/api/task_scheduling";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
import EditPopup from "./edit.vue";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
import { getRoutePath } from "@/router";
|
||||
import money from "./money.vue";
|
||||
|
||||
const datalist = ref([])
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
const moneyRef = shallowRef<InstanceType<typeof money>>()
|
||||
const datalist = ref([]);
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
const moneyRef = shallowRef<InstanceType<typeof money>>();
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
const showEdit = ref(false);
|
||||
// 是否显示金额编辑框
|
||||
const moneyShow = ref(false)
|
||||
const moneyShow = ref(false);
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
create_user_id: '',
|
||||
template_id: '',
|
||||
company_id: '',
|
||||
type: '',
|
||||
status: ''
|
||||
})
|
||||
create_user_id: "",
|
||||
template_id: "",
|
||||
company_id: "",
|
||||
type: "",
|
||||
status: "",
|
||||
});
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
const selectData = ref<any[]>([]);
|
||||
|
||||
// 表格选择后回调事件
|
||||
const handleSelectionChange = (val: any[]) => {
|
||||
selectData.value = val.map(({ id }) => id)
|
||||
}
|
||||
selectData.value = val.map(({ id }) => id);
|
||||
};
|
||||
|
||||
// 获取字典数据
|
||||
const { dictData } = useDictData('')
|
||||
const { dictData } = useDictData("");
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiTaskSchedulingLists,
|
||||
params: queryParams
|
||||
})
|
||||
fetchFun: apiTaskSchedulingLists,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
showEdit.value = true;
|
||||
await nextTick();
|
||||
editRef.value?.open("add");
|
||||
};
|
||||
|
||||
// 设置金额
|
||||
const moneyAdd = async (obj: any) => {
|
||||
moneyShow.value = true
|
||||
await nextTick()
|
||||
moneyRef.value?.open(obj.money ? 'edit' : 'add')
|
||||
moneyRef.value?.setFormData(obj)
|
||||
}
|
||||
moneyShow.value = true;
|
||||
await nextTick();
|
||||
moneyRef.value?.open(obj.money ? "edit" : "add");
|
||||
moneyRef.value?.setFormData(obj);
|
||||
};
|
||||
|
||||
const changeStatus = (data: any) => {
|
||||
apiTaskSchedulingEdit({
|
||||
id: data.id,
|
||||
status: data.status
|
||||
}).finally(() => {
|
||||
getLists()
|
||||
})
|
||||
}
|
||||
apiTaskSchedulingEdit({
|
||||
id: data.id,
|
||||
status: data.status,
|
||||
}).finally(() => {
|
||||
getLists();
|
||||
});
|
||||
};
|
||||
dictDataLists({ type_id: 10 }).then((res) => {
|
||||
datalist.value = res.lists
|
||||
})
|
||||
datalist.value = res.lists;
|
||||
});
|
||||
|
||||
getLists()
|
||||
getLists();
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.formtabel {
|
||||
.el-form-item {
|
||||
width: 20%;
|
||||
.el-form-item {
|
||||
width: 20%;
|
||||
|
||||
.el-btn {
|
||||
margin-left: 100px;
|
||||
}
|
||||
.el-btn {
|
||||
margin-left: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -18,6 +18,7 @@
|
||||
<el-select
|
||||
v-model="formData.type"
|
||||
clearable
|
||||
:disabled="mode != 'add'"
|
||||
placeholder="请输入任务类型"
|
||||
@change="changeTaskType"
|
||||
>
|
||||
@ -82,6 +83,7 @@
|
||||
<el-select
|
||||
v-model="formData.types"
|
||||
clearable
|
||||
:disabled="mode != 'add'"
|
||||
placeholder="请输入阶段类型"
|
||||
>
|
||||
<el-option
|
||||
@ -224,12 +226,14 @@ import {
|
||||
apiTaskTemplateAdd,
|
||||
apiTaskTemplateEdit,
|
||||
apiTaskTemplateDetail,
|
||||
apiTaskTypeList,
|
||||
} from "@/api/task_template";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import type { PropType } from "vue";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
import taskMap from "./map.vue";
|
||||
import personnelPopup from "./dialog_index_personnel.vue";
|
||||
import { number } from "echarts/core";
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
@ -242,6 +246,7 @@ const popupRef = shallowRef<InstanceType<typeof Popup>>();
|
||||
const mode = ref("add");
|
||||
const datalist = ref([]);
|
||||
const route = useRoute();
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == "edit" ? "编辑任务安排" : "新增任务安排";
|
||||
@ -285,7 +290,7 @@ if (route.query.id) {
|
||||
formData.task_scheduling = route.query.id;
|
||||
}
|
||||
//任务类型接口
|
||||
dictDataLists({ type_id: 10 }).then((res) => {
|
||||
apiTaskTypeList({ type_value: "task_type" }).then((res) => {
|
||||
datalist.value = res.lists;
|
||||
});
|
||||
|
||||
|
426
src/views/task_template/edit_admin.vue
Normal file
426
src/views/task_template/edit_admin.vue
Normal file
@ -0,0 +1,426 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="120px"
|
||||
:rules="formRules"
|
||||
>
|
||||
<el-form-item label="任务类型" prop="type">
|
||||
<el-select
|
||||
v-model="formData.type"
|
||||
clearable
|
||||
:disabled="mode != 'add'"
|
||||
placeholder="请输入任务类型"
|
||||
@change="changeTaskType"
|
||||
>
|
||||
<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="types">
|
||||
<div>
|
||||
<el-select
|
||||
v-model="formData.types"
|
||||
clearable
|
||||
:disabled="mode != 'add'"
|
||||
placeholder="请输入阶段类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ label: 1, name: '循环' },
|
||||
{ label: 2, name: '长期' },
|
||||
{ label: 3, name: '单次' },
|
||||
]"
|
||||
:key="item.label"
|
||||
:value="item.label"
|
||||
:label="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
<div
|
||||
v-if="formData.types == 3"
|
||||
style="color: #e6a23c; font-size: 12px"
|
||||
>
|
||||
提示 : 单次任务不会每日结算,而是按阶段合计天数结算
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="一阶段天数">
|
||||
<el-input
|
||||
v-model="formData.stage_day_one"
|
||||
clearable
|
||||
placeholder="请输入天数"
|
||||
type="number"
|
||||
>
|
||||
<template #append>天</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="一阶段金额">
|
||||
<el-input
|
||||
v-model="formData.money"
|
||||
clearable
|
||||
placeholder="请输入金额"
|
||||
type="number"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="二阶段天数">
|
||||
<el-input
|
||||
v-model="formData.stage_day_two"
|
||||
clearable
|
||||
placeholder="请输入天数"
|
||||
type="number"
|
||||
>
|
||||
<template #append>天</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="二阶段金额">
|
||||
<el-input
|
||||
v-model="formData.money_two"
|
||||
clearable
|
||||
placeholder="请输入金额"
|
||||
type="number"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="noThreefilter(+formData.type)" label="三阶段天数">
|
||||
<el-input
|
||||
v-model="formData.stage_day_three"
|
||||
clearable
|
||||
placeholder="请输入天数"
|
||||
type="number"
|
||||
>
|
||||
<template #append>天</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="noThreefilter(+formData.type)" label="三阶段金额">
|
||||
<el-input
|
||||
v-model="formData.new_money_three"
|
||||
clearable
|
||||
placeholder="请输入金额"
|
||||
type="number"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="长期金额" v-if="+formData.types == 2">
|
||||
<el-input
|
||||
v-model="formData.money_three"
|
||||
clearable
|
||||
placeholder="请输入金额"
|
||||
type="number"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
</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-item label="任务描述" prop="content">
|
||||
<el-input
|
||||
v-model="formData.content"
|
||||
clearable
|
||||
placeholder="请输入任务描述"
|
||||
type="textarea"
|
||||
autosize
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-dialog
|
||||
v-model="personnelShow"
|
||||
ref="personnelRef"
|
||||
title="选择负责人"
|
||||
width="60%"
|
||||
>
|
||||
<personnelPopup
|
||||
@custom-event="changePersonner"
|
||||
:company_id="formData.company_id"
|
||||
></personnelPopup>
|
||||
</el-dialog>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="taskTemplateEdit">
|
||||
import type { FormInstance } from "element-plus";
|
||||
import Popup from "@/components/popup/index.vue";
|
||||
import {
|
||||
apiTaskTemplateAdd,
|
||||
apiTaskTemplateEdit,
|
||||
apiTaskTemplateDetail,
|
||||
apiTaskTypeList,
|
||||
} from "@/api/task_template";
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import type { PropType } from "vue";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
import taskMap from "./map.vue";
|
||||
import personnelPopup from "./dialog_index_personnel.vue";
|
||||
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");
|
||||
const datalist = ref([]);
|
||||
const route = useRoute();
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == "edit" ? "编辑任务安排" : "新增任务安排";
|
||||
});
|
||||
|
||||
// 没有三阶段的任务类型ID, 使用以下方法过滤
|
||||
const noThreeList = reactive([45, 48, 49]);
|
||||
const noThreefilter = (id: number) => {
|
||||
if (noThreeList.includes(id)) return false;
|
||||
else return true;
|
||||
};
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
task_scheduling: 0,
|
||||
company_id: "",
|
||||
title: "",
|
||||
admin_id: "",
|
||||
type: "", // 任务类型
|
||||
status: "",
|
||||
content: "",
|
||||
stage_day_one: 0,
|
||||
money: 0, // 一阶段金额
|
||||
stage_day_two: 0,
|
||||
money_two: 0, // 二阶段金额
|
||||
stage_day_three: 0,
|
||||
new_money_three: 0, // 三阶段金额
|
||||
money_three: 0, // 长期金额
|
||||
types: "", //阶段类型
|
||||
task_admin: "", //任务负责人
|
||||
task_admin_name: "", //任务负责人
|
||||
recharge: "",
|
||||
extend: {
|
||||
// origin: {
|
||||
// address: "",
|
||||
// lnglat: [],
|
||||
// }, //起点
|
||||
transfer: {
|
||||
address: "",
|
||||
lnglat: [],
|
||||
}, //中转
|
||||
terminus: {
|
||||
address: "",
|
||||
lnglat: [],
|
||||
}, //终点
|
||||
},
|
||||
});
|
||||
if (route.query.id) {
|
||||
formData.task_scheduling = route.query.id;
|
||||
}
|
||||
//任务类型接口
|
||||
apiTaskTypeList({ type_value: "town_task_type" }).then((res) => {
|
||||
datalist.value = res.lists;
|
||||
});
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
title: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入任务名称",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
admin_id: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入创建人",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
type: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入任务类型",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
status: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择状态",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
types: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入阶段类型",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
task_admin: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择负责人",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
recharge: [
|
||||
{
|
||||
required: true,
|
||||
// message: "请输入充值金额",
|
||||
validator: (rule: any, value: any, callback: any) => {
|
||||
if (value <= 0) callback(new Error("充值金额不能小于0"));
|
||||
else callback();
|
||||
},
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
"extend.origin.address": [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择中转点",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
"extend.transfer.address": [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择中转点",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
"extend.terminus.address": [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择终点",
|
||||
trigger: ["blur"],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// 获取详情
|
||||
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];
|
||||
}
|
||||
}
|
||||
if (formData.type == 32) {
|
||||
mapShow.value = true;
|
||||
}
|
||||
};
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiTaskTemplateDetail({
|
||||
id: row.id,
|
||||
});
|
||||
setFormData(data);
|
||||
};
|
||||
|
||||
// 地图控件
|
||||
const mapShow = ref(false);
|
||||
const mapRef = shallowRef<InstanceType<typeof taskMap>>();
|
||||
|
||||
// 选择任务类型
|
||||
const changeTaskType = async (e: any) => {
|
||||
datalist.value.forEach((item: any) => {
|
||||
if (item.id == e) formData.title = item.name;
|
||||
});
|
||||
if (e == 32) {
|
||||
mapShow.value = true; //为三轮车时
|
||||
// await nextTick();
|
||||
// mapRef.value?.open();
|
||||
}
|
||||
};
|
||||
|
||||
// 当前点击的地图类型(起,转,终)点
|
||||
const mapType = ref("");
|
||||
const changeMap = async (e: number) => {
|
||||
let map_title = "";
|
||||
switch (e) {
|
||||
case 0:
|
||||
mapType.value = "origin";
|
||||
map_title = "起点";
|
||||
break;
|
||||
case 1:
|
||||
mapType.value = "transfer";
|
||||
map_title = "中转点";
|
||||
break;
|
||||
case 2:
|
||||
mapType.value = "terminus";
|
||||
map_title = "终点";
|
||||
break;
|
||||
}
|
||||
await nextTick();
|
||||
mapRef.value?.open(map_title);
|
||||
};
|
||||
|
||||
const setMap = (e: any) => {
|
||||
formData.extend[mapType.value] = e[0];
|
||||
};
|
||||
|
||||
// 选择负责人
|
||||
const personnelShow = ref(false);
|
||||
const personnelRef = shallowRef<InstanceType<typeof personnelPopup>>();
|
||||
const changePersonner = (e: any) => {
|
||||
formData.task_admin = e.id;
|
||||
formData.task_admin_name = e.nickname;
|
||||
personnelShow.value = false;
|
||||
};
|
||||
|
||||
const clickTaskAdmin = async () => {
|
||||
personnelShow.value = true;
|
||||
};
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate();
|
||||
const data = { ...formData };
|
||||
if (data.type != 32) data.extend = {}; // 不为三轮车任务时,过滤三轮车配置
|
||||
mode.value == "edit"
|
||||
? await apiTaskTemplateEdit(data)
|
||||
: await apiTaskTemplateAdd(data);
|
||||
popupRef.value?.close();
|
||||
emit("success");
|
||||
};
|
||||
|
||||
//打开弹窗
|
||||
const open = (type = "add") => {
|
||||
mode.value = type;
|
||||
popupRef.value?.open();
|
||||
};
|
||||
|
||||
// 关闭回调
|
||||
const handleClose = () => {
|
||||
emit("close");
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail,
|
||||
});
|
||||
</script>
|
||||
|
@ -150,7 +150,14 @@
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup
|
||||
v-if="showEdit"
|
||||
v-if="showEdit && taskTypeId != 15"
|
||||
ref="editRef"
|
||||
:dict-data="dictData"
|
||||
@success="getLists"
|
||||
@close="showEdit = false"
|
||||
/>
|
||||
<edit-admin-popup
|
||||
v-else-if="showEdit"
|
||||
ref="editRef"
|
||||
:dict-data="dictData"
|
||||
@success="getLists"
|
||||
@ -169,6 +176,7 @@ import {
|
||||
import { timeFormat } from "@/utils/util";
|
||||
import feedback from "@/utils/feedback";
|
||||
import EditPopup from "./edit.vue";
|
||||
import EditAdminPopup from "./edit_admin.vue";
|
||||
import { dictDataLists } from "@/api/setting/dict";
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||
const datalist = ref([]);
|
||||
@ -188,8 +196,10 @@ const queryParams = reactive({
|
||||
status: "",
|
||||
content: "",
|
||||
});
|
||||
const taskTypeId = ref(10);
|
||||
if (route.query?.id) queryParams.id = route.query.id;
|
||||
if (route.query?.company_id) queryParams.company_id = route.query.company_id;
|
||||
if (route.query?.company_type == 41) taskTypeId.value = 15;
|
||||
const statusdata = reactive([
|
||||
{ id: 1, name: "显示" },
|
||||
{ id: 2, name: "隐藏" },
|
||||
|
@ -89,8 +89,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, defineProps } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
datas: {
|
||||
type: Object,
|
||||
|
@ -89,8 +89,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, defineProps } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
datas: {
|
||||
type: Object,
|
||||
|
@ -93,8 +93,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, defineProps } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
datas: {
|
||||
type: Object,
|
||||
|
@ -97,8 +97,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, defineProps } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
datas: {
|
||||
type: Object,
|
||||
|
@ -101,8 +101,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, defineProps } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
datas: {
|
||||
type: Object,
|
||||
|
@ -217,8 +217,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, defineProps } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
datas: {
|
||||
type: Object,
|
||||
|
@ -124,17 +124,17 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经营类型" prop="manage_type">
|
||||
<el-select
|
||||
v-model="datas.manage_type"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in storeTypeList"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="index + ''"
|
||||
></el-option>
|
||||
</el-select>
|
||||
v-model="datas.manage_type"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in storeTypeList"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="index + ''"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -242,8 +242,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, defineProps } from "vue";
|
||||
|
||||
const storeTypeList = ref([
|
||||
"超市",
|
||||
"生鲜",
|
||||
|
@ -72,8 +72,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, defineProps } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
datas: {
|
||||
type: Object,
|
||||
|
@ -40,8 +40,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, defineProps } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
datas: {
|
||||
type: Object,
|
||||
|
@ -106,8 +106,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, defineProps } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
datas: {
|
||||
type: Object,
|
||||
|
@ -113,8 +113,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, defineProps } from "vue";
|
||||
|
||||
const storeTypeList = ref([
|
||||
"超市",
|
||||
"生鲜",
|
||||
|
@ -256,8 +256,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, defineProps } from "vue";
|
||||
|
||||
const landPlanList = ref(["自己种", "出租", "代种", "租更多地扩大种植"]);
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -164,8 +164,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, defineProps } from "vue";
|
||||
|
||||
const storeTypeList = ref([
|
||||
"超市",
|
||||
"生鲜",
|
||||
|
@ -124,17 +124,17 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经营类型" prop="manage_type">
|
||||
<el-select
|
||||
v-model="datas.manage_type"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in storeTypeList"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="index + ''"
|
||||
></el-option>
|
||||
</el-select>
|
||||
v-model="datas.manage_type"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in storeTypeList"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="index + ''"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -242,8 +242,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
import { ref, defineProps } from "vue";
|
||||
|
||||
const storeTypeList = ref([
|
||||
"超市",
|
||||
"生鲜",
|
||||
|
Loading…
x
Reference in New Issue
Block a user