更改三轮车合同
This commit is contained in:
parent
32013bca9b
commit
481767169c
@ -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,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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user