JIALDemo/target/classes/backend/page/hearCase/add.html

766 lines
23 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!-- 引入样式 -->
<link rel="stylesheet" href="../../plugins/element-ui/index.css" />
<link rel="stylesheet" href="../../styles/common.css" />
<link rel="stylesheet" href="../../styles/page.css" />
<link rel="stylesheet" href="../../styles/hearCaseAdd.css" />
<style>
.selectInput {
position: relative;
width: 100%;
min-width: 100px;
}
.selectInput .flavorSelect {
position: absolute;
width: 100%;
padding: 0 10px;
border-radius: 3px;
border: solid 1px #FF903D;
line-height: 30px;
text-align: center;
background: #fff;
top: 50px;
z-index: 99;
}
.selectInput .flavorSelect .items {
cursor: pointer;
display: inline-block;
width: 100%;
line-height: 35px;
border-bottom: solid 1px #f4f4f4;
color: #666;
}
.selectInput .flavorSelect .none {
font-size: 14px;
}
#hearCase-add-app .uploadImg .el-form-item__label::before{
content: '*';
color: #F56C6C;
margin-right: 4px;
}
#hearCase-add-app .plaintiff .el-form-item__label::before{
content: '*';
color: #F56C6C;
margin-right: 4px;
}
.addPlaintiff .el-input {
width: 130px;
}
.addPlaintiff .el-input-number__increase {
border-left: solid 1px #FFE1CA;
background: #fff3ea;
}
.addPlaintiff .el-input-number__decrease {
border-right: solid 1px #FFE1CA;
background: #fff3ea;
}
.addPlaintiff input {
border: 1px solid #ffe1ca;
}
.addPlaintiff .table {
border: solid 1px #EBEEF5;
border-radius: 3px;
}
.addPlaintiff .table th {
padding: 5px 0;
}
.addPlaintiff .table td {
padding: 7px 0;
}
.addPlaintiffList .searchPlaintiff {
position: absolute;
top: 10px;
right: 20px;
}
.addPlaintiffList .el-dialog__body {
padding: 0;
border-bottom: solid 1px #ccc;
}
.addPlaintiffList .el-dialog__footer {
padding-top: 27px;
}
.addPlaintiff {
width: 777px;
}
.addPlaintiff .addBut {
background: #ffc200;
display: inline-block;
padding: 0px 20px;
border-radius: 3px;
line-height: 40px;
cursor: pointer;
border-radius: 4px;
color: #333333;
font-weight: 500;
}
.addPlaintiff .content {
background: #fafafb;
padding: 20px;
border: solid 1px #ccc;
border-radius: 3px;
}
.addPlaintiffCon {
padding: 0 20px;
display: flex;
line-height: 40px;
}
.addPlaintiffCon .leftCont {
display: flex;
border-right: solid 2px #E4E7ED;
width: 60%;
padding: 15px;
}
.addPlaintiffCon .leftCont .tabBut {
width: 110px;
}
.addPlaintiffCon .leftCont .tabBut span {
display: block;
text-align: center;
border-right: solid 2px #f4f4f4;
cursor: pointer;
}
.addPlaintiffCon .leftCont .act {
border-color: #FFC200 !important;
color: #FFC200 !important;
}
.addPlaintiffCon .leftCont .tabList {
flex: 1;
padding: 15px;
}
.addPlaintiffCon .leftCont .tabList .table {
border: solid 1px #f4f4f4;
border-bottom: solid 1px #f4f4f4;
}
.addPlaintiffCon .leftCont .tabList .table .items {
border-bottom: solid 1px #f4f4f4;
padding: 0 10px;
display: flex;
}
.addPlaintiffCon .leftCont .tabList .table .items .el-checkbox, .addPlaintiffCon .leftCont .tabList .table .items .el-checkbox__label {
width: 100%;
}
.addPlaintiffCon .leftCont .tabList .table .items .item {
display: flex;
padding-right: 20px;
}
.addPlaintiffCon .leftCont .tabList .table .items .item span {
display: inline-block;
text-align: center;
flex: 1;
}
.addPlaintiffCon .ritCont {
width: 40%;
padding: 0 15px;
}
.addPlaintiffCon .ritCont .item {
box-shadow: 0px 1px 4px 3px rgba(0, 0, 0, 0.03);
display: flex;
text-align: center;
padding: 0 10px;
margin-bottom: 20px;
border-radius: 6px;
color: #818693;
}
.addPlaintiffCon .ritCont .item span:first-child {
text-align: left;
color: #20232A;
}
.addPlaintiffCon .ritCont .item .price {
display: inline-block;
flex: 1;
}
.addPlaintiffCon .ritCont .item .del {
cursor: pointer;
}
.addPlaintiffCon .ritCont .item .del img {
position: relative;
top: 5px;
width: 20px;
}
.addPlaintiffCon .el-checkbox__label{
width: 100%;
}
.addDefendant .el-input {
width: 130px;
}
.addDefendant .el-input-number__increase {
border-left: solid 1px #FFE1CA;
background: #fff3ea;
}
.addDefendant .el-input-number__decrease {
border-right: solid 1px #FFE1CA;
background: #fff3ea;
}
.addDefendant input {
border: 1px solid #ffe1ca;
}
.addDefendant .table {
border: solid 1px #EBEEF5;
border-radius: 3px;
}
.addDefendant .table th {
padding: 5px 0;
}
.addDefendant .table td {
padding: 7px 0;
}
.addDefendantList .searchDefendant {
position: absolute;
top: 10px;
right: 20px;
}
.addDefendantList .el-dialog__body {
padding: 0;
border-bottom: solid 1px #ccc;
}
.addDefendantList .el-dialog__footer {
padding-top: 27px;
}
.addDefendant {
width: 777px;
}
.addDefendant .addBut {
background: #ffc200;
display: inline-block;
padding: 0px 20px;
border-radius: 3px;
line-height: 40px;
cursor: pointer;
border-radius: 4px;
color: #333333;
font-weight: 500;
}
.addDefendant .content {
background: #fafafb;
padding: 20px;
border: solid 1px #ccc;
border-radius: 3px;
}
.addDefendantCon {
padding: 0 20px;
display: flex;
line-height: 40px;
}
.addDefendantCon .leftCont {
display: flex;
border-right: solid 2px #E4E7ED;
width: 60%;
padding: 15px;
}
.addDefendantCon .leftCont .tabBut {
width: 110px;
}
.addDefendantCon .leftCont .tabBut span {
display: block;
text-align: center;
border-right: solid 2px #f4f4f4;
cursor: pointer;
}
.addDefendantCon .leftCont .act {
border-color: #FFC200 !important;
color: #FFC200 !important;
}
.addDefendantCon .leftCont .tabList {
flex: 1;
padding: 15px;
}
.addDefendantCon .leftCont .tabList .table {
border: solid 1px #f4f4f4;
border-bottom: solid 1px #f4f4f4;
}
.addDefendantCon .leftCont .tabList .table .items {
border-bottom: solid 1px #f4f4f4;
padding: 0 10px;
display: flex;
}
.addDefendantCon .leftCont .tabList .table .items .el-checkbox,
.addDefendantCon .leftCont .tabList .table .items .el-checkbox__label {
width: 100%;
}
.addDefendantCon .leftCont .tabList .table .items .item {
display: flex;
padding-right: 20px;
}
.addDefendantCon .leftCont .tabList .table .items .item span {
display: inline-block;
text-align: center;
flex: 1;
}
.addDefendantCon .ritCont {
width: 40%;
padding: 0 15px;
}
.addDefendantCon .ritCont .item {
box-shadow: 0px 1px 4px 3px rgba(0, 0, 0, 0.03);
display: flex;
text-align: center;
padding: 0 10px;
margin-bottom: 20px;
border-radius: 6px;
color: #818693;
}
.addDefendantCon .ritCont .item span:first-child {
text-align: left;
color: #20232A;
}
.addDefendantCon .ritCont .item .price {
display: inline-block;
flex: 1;
}
.addDefendantCon .ritCont .item .del {
cursor: pointer;
}
.addDefendantCon .ritCont .item .del img {
position: relative;
top: 5px;
width: 20px;
}
.addDefendantCon .el-checkbox__label {
width: 100%;
}
</style>
</head>
<body>
<div class="addBrand-container" id="hearCase-add-app">
<div class = "container">
<el-form
ref="ruleForm"
:model="ruleForm"
:rules="rules"
:inline="true"
label-width="180px"
class="demo-ruleForm"
>
<div>
<el-form-item
label="案件号:"
prop="caseNum"
>
<el-input
v-model="ruleForm.caseNum"
placeholder="请填写案件号"
maxlength="20"
/>
</el-form-item>
<el-form-item
label="案件类别:"
prop="caseType"
>
<el-select
v-model="ruleForm.caseType"
placeholder="请选择案件类别"
>
<el-option v-for="item in caseTypeList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</div>
<div>
<el-form-item
label="法院名称:"
prop="court"
>
<el-input
v-model="ruleForm.court"
placeholder="请填写法院名称:"
maxlength="20"
/>
</el-form-item>
</div>
<div>
<el-form-item
label="法官姓名:"
prop="judgeName"
>
<el-input
v-model="ruleForm.judgeName"
placeholder="请填写法官姓名:"
maxlength="20"
/>
</el-form-item>
<el-form-item
label="法官联系方式:"
prop="judgePhone"
>
<el-input
v-model="ruleForm.judgePhone"
placeholder="请填写法官联系方式:"
maxlength="20"
/>
</el-form-item>
</div>
<div>
<el-form-item label="原告信息:" class="plaintiff">
<el-form-item>
<div class = "addPlaintiff">
<span v-if="plaintiffTable.length == 0" class="addBut" @click="openAddPlaintiff"> + 添加原告</span>
<div v-if="plaintiffTable.length != 0" class="content">
<div class="addBut" style="margin-bottom: 20px" @click="openAddPlaintiff">+ 添加原告</div>
<div class="table">
<el-table :data="plaintiffTable" style="width:100%">
<el-table-column prop="unitName" label="单位名称" width="180" align="center"></el-table-column>
<el-table-column prop="unitLocation" label="单位所在地" width="180" align="center"></el-table-column>
<el-table-column prop="licenseNum" label="证件号码" width="180" align="center"></el-table-column>
<el-table-column prop="address" label="操作" width="180px" align="center">
<template slot-scope="scope">
<el-button type="text" size="small" @click="delPlaintiffHandle(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</el-form-item>
</el-form-item>
</div>
<div>
<el-form-item label="被告信息:" class="defendant">
<el-form-item>
<div class="addDefendant">
<span v-if="defendantTable.length == 0" class="addBut" @click="openAddDefendant"> + 添加被告</span>
<div v-if="defendantTable.length !== 0" class="content">
<div class="addBut" style="margin-bottom: 20px" @click="openAddDefendant">+ 添加被告</div>
<div class="table">
<el-table :data="defendantTable" style="width:100%">
<el-table-column prop="unitName" label="单位名称" width="180" align="center"></el-table-column>
<el-table-column prop="unitLocation" label="单位所在地" width="180" align="center"></el-table-column>
<el-table-column prop="licenseNum" label="证件号码" width="180" align="center"></el-table-column>
<el-table-column prop="address" label="操作" width="180px" align="center">
<template slot-scope="scope">
<el-button type="text" size="small" @click="delDefendantHandle(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</el-form-item>
</el-form-item>
</div>
<el-dialog
v-model="value"
ref="plaintiffDialog"
class="addPlaintiffList"
:visible.sync="dialogVisiblePlaintiff"
width="80%"
:before-close="handleClose"
>
<el-input
v-model="value"
class="searchPlaintiff"
placeholder="请输入原告单位名称进行搜索"
style="width: 250px"
size="small"
clearable
>
<i slot="prefix" class="el-input__icon el-icon-search" style="cursor: pointer" @click="searchHandle"></i>
</el-input>
<div class="addPlaintiffCon">
<div class="leftCont">
<el-table
:data="plaintiffAddList"
style="width: 100%"
:row-key="row => row.id"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="unitName" label="单位名称"></el-table-column>
<el-table-column prop="licenseNum" label="证件号"></el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[6, 12, 24]"
:page-size="pageSize"
:total="plaintiffAddList.length"
/>
</div>
<div class="ritCont">
<div class="title">
已选原告信息({{checkedList.length}})
</div>
<div
v-for="(item, ind) in checkedList"
:key="ind"
class="item"
>
<span>{{item.unitName}}</span>
<span>{{item.licenseNum}}</span>
<span
class="del"
@click="delCheck(ind)"
>
</span>
</div>
</div>
</div>
</el-dialog>
<el-dialog
v-model="dialogVisibleDefendant"
ref="defendantDialog"
class="addDefendantList"
:visible.sync="dialogVisibleDefendant"
width="80%"
:before-close="handleClose"
>
<el-input
v-model="value"
class="searchDefendant"
placeholder="请输入被告单位名称进行搜索"
style="width: 250px"
size="small"
clearable
>
<i slot="prefix" class="el-input__icon el-icon-search" style="cursor: pointer" @click="searchDefendantHandle"></i>
</el-input>
<div class="addDefendantCon">
<div class="leftCont">
<el-table
:data="defendantAddList"
style="width: 100%"
:row-key="row => row.id"
@selection-change="handleDefendantSelectionChange"
>
<!-- 省略其他列 -->
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="unitName" label="单位名称"></el-table-column>
<el-table-column prop="licenseNum" label="证件号"></el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[6, 12, 24]"
:page-size="pageSize"
:total="defendantAddList.length"
/>
</div>
<div class="ritCont">
<div class="title">
已选被告信息({{ checkedDefendantList.length }})
</div>
<div
v-for="(item, ind) in checkedDefendantList"
:key="ind"
class="item"
>
<span>{{ item.unitName }}</span>
<span>{{ item.licenseNum }}</span>
<span
class="del"
@click="delCheckedDefendant(ind)"
>
</span>
</div>
</div>
</div>
</el-dialog>
</el-form>
</div>
</div>
<!-- 开发环境版本,包含了有帮助的命令行警告 -->
<script src="../../plugins/vue/vue.js"></script>
<!-- 引入组件库 -->
<script src="../../plugins/element-ui/index.js"></script>
<!-- 引入axios -->
<script src="../../plugins/axios/axios.min.js"></script>
<script src="../../js/request.js"></script>
<script src="../../js/validate.js"></script>
<script src="../../js/index.js"></script>
<script src="../../api/food.js"></script>
<script>
new Vue({
el: '#hearCase-add-app',
data() {
return {
caseTypeList: [
{id : 1, name : "审理案件"},
{id : 2, name : "执行案件"}
],
plaintiffTable: [
{ unitName: '原告1公司', unitLocation: '地点1', licenseNum: '证件号1', address: '地址1' },
{ unitName: '原告2公司', unitLocation: '地点2', licenseNum: '证件号2', address: '地址2' },
// 添加更多原告数据...
],
defendantTable: [
{ unitName: '被告1公司', unitLocation: '地点1', licenseNum: '证件号1', address: '地址1' },
{ unitName: '被告2公司', unitLocation: '地点2', licenseNum: '证件号2', address: '地址2' },
// 添加更多被告数据...
],
ruleForm : {
'caseNum': '',
caseType: '',
},
plaintiffAddList: [
{ id: 1, unitName: '原告1公司', licenseNum: '证件号1' },
{ id: 2, unitName: '原告2公司', licenseNum: '证件号2' },
{ id: 3, unitName: '原告3公司', licenseNum: '证件号3' },
// 添加更多原告可选项...
],
defendantAddList: [
{ id: 1, unitName: '被告1公司', licenseNum: '证件号1' },
{ id: 2, unitName: '被告2公司', licenseNum: '证件号2' },
{ id: 3, unitName: '被告3公司', licenseNum: '证件号3' },
// 添加更多被告可选项...
],
searchValue: [],
checkedList: [],
searchKey: "",
keyInd: 0,
currentPage: 1, // 当前页数
pageSize: 6, // 每页显示条数
value: "",
dialogVisiblePlaintiff: false, // 控制原告dialog显示/隐藏
dialogVisibleDefendant: false, // 控制被告dialog显示/隐藏
checkedDefendantList: [],
checkedPlaintiffList: [],
}
},
computed: {
rules () {
return {
}
}
},
created() {
this.id = requestUrlParam('id')
this.actionType = this.id ? 'edit' : 'add'
if (this.id) {
this.init()
}
},
mounted() {
},
methods: {
async init () {
},
handleSelectionChange(val) {
this.checkedList = val;
},
handleSizeChange(val) {
this.pageSize = val;
this.currentPage = 1;
},
handleCurrentChange(val) {
this.currentPage = val;
},
openAddPlaintiff() {
this.searchKey = " "
this.value = " "
this.keyInd = 0
this.dialogVisiblePlaintiff = true;
},
handleClosePlaintiff(done) {
// 处理关闭原告dialog的逻辑
this.dialogVisiblePlaintiff = false;
done(); // 关闭弹窗
},
handleCloseDefendant(done) {
// 处理关闭被告dialog的逻辑
this.dialogVisibleDefendant = false;
done(); // 关闭弹窗
},
searchHandle() {
// 处理搜索逻辑,可根据需求自行实现
// 例如:调用接口进行搜索
},
delPlaintiffHandle(index) {
// 处理删除原告的逻辑,可根据需求自行实现
this.plaintiffTable.splice(index, 1);
},
delCheck(index) {
// 处理删除已选原告的逻辑,可根据需求自行实现
this.checkedList.splice(index, 1);
},
openAddDefendant() {
// 初始化被告相关数据
this.searchKey = " ";
this.value = " ";
this.keyInd = 0;
this.dialogVisibleDefendant = true;
},
searchDefendantHandle() {
// 处理搜索被告逻辑
// 例如:调用接口进行搜索
},
delCheckedDefendant(index) {
// 处理删除已选被告的逻辑
this.checkedDefendantList.splice(index, 1);
},
delDefendantHandle(index) {
// 处理删除被告的逻辑
this.defendantTable.splice(index, 1);
},
goBack(){
window.parent.menuHandle({
id: '3',
url: '/backend/page/food/list.html',
name: '案件管理'
},false)
}
}
})
</script>
</body>
</html>