parent
cb06375025
commit
3feac22f86
File diff suppressed because one or more lines are too long
@ -0,0 +1,52 @@
|
|||||||
|
package jnpf.model.contract;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ContractDTO implements Serializable {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* 合同编号
|
||||||
|
*/
|
||||||
|
private String contractNumber;
|
||||||
|
/**
|
||||||
|
* 合同名称
|
||||||
|
*/
|
||||||
|
private String contractName;
|
||||||
|
/**
|
||||||
|
* 商户id
|
||||||
|
*/
|
||||||
|
private String merchantId;
|
||||||
|
/**
|
||||||
|
* 商户id
|
||||||
|
*/
|
||||||
|
private String merchantName;
|
||||||
|
/**
|
||||||
|
* 空间id
|
||||||
|
*/
|
||||||
|
private String spaceNumber;
|
||||||
|
/**
|
||||||
|
* 空间名称
|
||||||
|
*/
|
||||||
|
private String spaceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
/**
|
||||||
|
* 租金总价
|
||||||
|
*/
|
||||||
|
private BigDecimal totalRentalPrice;
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package jnpf.model.contract;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ContractDevicesDTO implements Serializable {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
/**
|
||||||
|
* 租金总价
|
||||||
|
*/
|
||||||
|
private BigDecimal totalRentalPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租赁单号
|
||||||
|
*/
|
||||||
|
private String leaseNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备编码
|
||||||
|
*/
|
||||||
|
private String equipmentNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备名称
|
||||||
|
*/
|
||||||
|
private String equipmentName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,153 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="选择空间" :close-on-click-modal="false" :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center"
|
||||||
|
lock-scroll append-to-body width="800px">
|
||||||
|
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||||
|
<el-form @submit.native.prevent>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item label="关键词">
|
||||||
|
<el-input v-model="keyword" placeholder="请输入关键词查询" clearable @keyup.enter.native="search()" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="search()">{{ $t('common.search') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button icon="el-icon-refresh-right" @click="refresh()">{{ $t('common.reset') }}
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-form>
|
||||||
|
<div class="JNPF-common-search-box-right">
|
||||||
|
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
|
||||||
|
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="search()" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
<JNPF-table v-loading="listLoading" :data="list" hasC @selection-change="handleSelectionChange" :border="false">
|
||||||
|
<el-table-column prop="leaseNumber" label="租赁单号" align="center" sortable>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="equipmentNumber" label="设备编码" align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="equipmentName" label="设备名称" align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="startTime" label="开始时间" align="center" sortable>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ formatTimestamp(scope.row.startTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="endTime" label="结束时间" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ formatTimestamp(scope.row.endTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="totalRentalPrice" label="租金总价" align="center">
|
||||||
|
</el-table-column>
|
||||||
|
</JNPF-table>
|
||||||
|
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="init" />
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="visible = false">{{ $t('common.cancelButton') }}</el-button>
|
||||||
|
<el-button type="primary" @click="select()">{{ $t('common.confirmButton') }}</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import request from '@/utils/request'
|
||||||
|
import {
|
||||||
|
GoodsList
|
||||||
|
} from '@/api/extend/order'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
listLoading: true,
|
||||||
|
keyword: '',
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
listQuery: {
|
||||||
|
superQueryJson: '',
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
sort: "desc",
|
||||||
|
sidx: "",
|
||||||
|
},
|
||||||
|
excludeIdList: [],
|
||||||
|
checked: [],
|
||||||
|
contractId: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
formatTimestamp(timestamp) {
|
||||||
|
const date = new Date(timestamp);
|
||||||
|
return date.toLocaleString();
|
||||||
|
},
|
||||||
|
init(excludeIdList, contractId) {
|
||||||
|
this.visible = true
|
||||||
|
this.listLoading = true
|
||||||
|
if (excludeIdList && excludeIdList instanceof Array) {
|
||||||
|
this.excludeIdList = excludeIdList;
|
||||||
|
}
|
||||||
|
this.contractId = contractId
|
||||||
|
let query = {
|
||||||
|
...this.listQuery,
|
||||||
|
keyword: this.keyword,
|
||||||
|
excludeIdList: this.excludeIdList,
|
||||||
|
contractId: contractId,
|
||||||
|
}
|
||||||
|
console.log();
|
||||||
|
request({
|
||||||
|
url: `/api/example/Contract/getDevicesById`,
|
||||||
|
method: 'post',
|
||||||
|
data: query,
|
||||||
|
}).then(res => {
|
||||||
|
this.list = res.data.list
|
||||||
|
this.listLoading = false
|
||||||
|
this.total = res.data.list.length
|
||||||
|
if (res.data.list.length != 0) {
|
||||||
|
this.contractId = res.data.list[0].id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.keyword = ''
|
||||||
|
this.listQuery.currentPage = 1
|
||||||
|
this.listQuery.pageSize = 20
|
||||||
|
this.listQuery.sort = "desc"
|
||||||
|
this.listQuery.sidx = ""
|
||||||
|
this.init(this.excludeIdList, this.contractId)
|
||||||
|
},
|
||||||
|
search() {
|
||||||
|
this.listQuery.currentPage = 1
|
||||||
|
this.listQuery.pageSize = 20
|
||||||
|
this.listQuery.sort = "desc"
|
||||||
|
this.listQuery.sidx = ""
|
||||||
|
this.init(this.excludeIdList, this.contractId)
|
||||||
|
},
|
||||||
|
select() {
|
||||||
|
if (!this.checked.length) return
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('refreshDataList', this.checked)
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.checked = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
>>>.el-dialog__body {
|
||||||
|
height: 70vh;
|
||||||
|
padding: 0 0 10px !important;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.JNPF-common-search-box {
|
||||||
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
.JNPF-common-search-box-right {
|
||||||
|
padding: 10px 10px 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,151 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="选择空间" :close-on-click-modal="false" :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center"
|
||||||
|
lock-scroll append-to-body width="800px">
|
||||||
|
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||||
|
<el-form @submit.native.prevent>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item label="关键词">
|
||||||
|
<el-input v-model="keyword" placeholder="请输入关键词查询" clearable @keyup.enter.native="search()" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="search()">{{ $t('common.search') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button icon="el-icon-refresh-right" @click="refresh()">{{ $t('common.reset') }}
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-form>
|
||||||
|
<div class="JNPF-common-search-box-right">
|
||||||
|
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
|
||||||
|
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="search()" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
<JNPF-table v-loading="listLoading" :data="list" hasC @selection-change="handleSelectionChange" :border="false">
|
||||||
|
<el-table-column prop="spaceNumber" label="空间ID" align="center" sortable>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="spaceId" label="空间名称" align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="startTime" label="开始时间" align="center" sortable>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ formatTimestamp(scope.row.startTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="endTime" label="结束时间" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ formatTimestamp(scope.row.endTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="totalRentalPrice" label="租金总价" align="center">
|
||||||
|
</el-table-column>
|
||||||
|
</JNPF-table>
|
||||||
|
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="init" />
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="visible = false">{{ $t('common.cancelButton') }}</el-button>
|
||||||
|
<el-button type="primary" @click="select()">{{ $t('common.confirmButton') }}</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import request from '@/utils/request'
|
||||||
|
import {
|
||||||
|
GoodsList
|
||||||
|
} from '@/api/extend/order'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
listLoading: true,
|
||||||
|
keyword: '',
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
listQuery: {
|
||||||
|
superQueryJson: '',
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
sort: "desc",
|
||||||
|
sidx: "",
|
||||||
|
},
|
||||||
|
excludeIdList: [],
|
||||||
|
checked: [],
|
||||||
|
contractId: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
formatTimestamp(timestamp) {
|
||||||
|
const date = new Date(timestamp);
|
||||||
|
return date.toLocaleString();
|
||||||
|
},
|
||||||
|
init(excludeIdList, contractId) {
|
||||||
|
this.visible = true
|
||||||
|
this.listLoading = true
|
||||||
|
if (excludeIdList && excludeIdList instanceof Array) {
|
||||||
|
this.excludeIdList = excludeIdList;
|
||||||
|
}
|
||||||
|
this.contractId = contractId
|
||||||
|
let query = {
|
||||||
|
...this.listQuery,
|
||||||
|
keyword: this.keyword,
|
||||||
|
excludeIdList: this.excludeIdList,
|
||||||
|
contractId: contractId,
|
||||||
|
}
|
||||||
|
console.log();
|
||||||
|
request({
|
||||||
|
url: `/api/example/Contract/getSpacesById`,
|
||||||
|
method: 'post',
|
||||||
|
data: query,
|
||||||
|
}).then(res => {
|
||||||
|
this.list = res.data.list
|
||||||
|
this.listLoading = false
|
||||||
|
this.total = res.data.list.length
|
||||||
|
if (res.data.list.length != 0) {
|
||||||
|
this.contractId = res.data.list[0].id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.keyword = ''
|
||||||
|
this.listQuery.currentPage = 1
|
||||||
|
this.listQuery.pageSize = 20
|
||||||
|
this.listQuery.sort = "desc"
|
||||||
|
this.listQuery.sidx = ""
|
||||||
|
this.init(this.excludeIdList, this.contractId)
|
||||||
|
},
|
||||||
|
search() {
|
||||||
|
this.listQuery.currentPage = 1
|
||||||
|
this.listQuery.pageSize = 20
|
||||||
|
this.listQuery.sort = "desc"
|
||||||
|
this.listQuery.sidx = ""
|
||||||
|
this.init(this.excludeIdList, this.contractId)
|
||||||
|
},
|
||||||
|
select() {
|
||||||
|
if (!this.checked.length) return
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('refreshDataList', this.checked)
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.checked = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
>>>.el-dialog__body {
|
||||||
|
height: 70vh;
|
||||||
|
padding: 0 0 10px !important;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.JNPF-common-search-box {
|
||||||
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
.JNPF-common-search-box-right {
|
||||||
|
padding: 10px 10px 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue