8yue14tiaoz

master
xy 1 year ago
parent 36830ece3b
commit be7fa25fa2

@ -31,7 +31,8 @@ export function sendSms (params) {
return request({
url: "/api/admin/send-sms",
method: "get",
params
params,
isLoading: false
})
}
export function checkSms (params) {

@ -11,6 +11,10 @@
<i :class="icon" style="padding: 0 6px;"></i>
</template>
<span style="margin-left: 5px;line-height: 2;font-size: 16px;">{{text}}</span>
<div style="float: right;">
<slot name="header-right"></slot>
</div>
</div>
<div class="content">
<slot name="content"></slot>

@ -281,6 +281,10 @@ export class CreateDialog {
},
style: {
padding: "0 4px",
color: file.status ===
"success"
? "green"
: "",
},
},
file.original_name || file.name

@ -550,7 +550,7 @@ export default {
{
"prop": "name",
"label": "地块名称",
"width": 0,
"minWidth": 200,
"fixed": "left",
"align": "left"
},
@ -581,49 +581,49 @@ export default {
{
"prop": "yongtu",
"label": "用途",
"width": 0,
"width": 180,
"align": "left"
},
{
"prop": "zhuangtai",
"label": "现状",
"width": 0,
"width": 160,
"align": "left"
},
{
"prop": "dengjishijian",
"label": "登记时间",
"width": 0,
"width": 180,
"align": "center"
},
{
"prop": "dengjimianji",
"label": "登记面积",
"width": 0,
"align": "center"
"width": 160,
"align": "right"
},
{
"prop": "shijimianji",
"label": "实际面积",
"width": 0,
"width": 160,
"align": "center"
},
{
"prop": "ruzhangshijian",
"label": "入账时间",
"width": 0,
"width": 180,
"align": "center"
},
{
"prop": "zhangmianyuanzhi",
"label": "账面原值",
"width": 0,
"width": 160,
"align": "center"
},
{
"prop": "shiyongzhuangtai",
"label": "使用状态",
"width": 0,
"width": 160,
"align": "center"
},
{
@ -1249,13 +1249,13 @@ export default {
}
a {
color: red;
color: $primaryColor;
text-decoration: none;
transition: all 0.2s;
}
a:hover {
color: red;
color: $primaryColor;
text-decoration: underline;
}

@ -762,6 +762,7 @@ export default {
}
this.form.let_id = this.$route.params.letId;
save(Object.assign(this.form, { table_name: "handle_leases" })).then((res) => {
if (this.type !== 'add') {
Promise.all([
@ -787,23 +788,30 @@ export default {
false
);
}
Promise.all(this.nowAssets.map(item => save({
table_name: item.hasOwnProperty('land_id') ? "houses" : "lands",
...item.ORIGINAL_DATA,
id: item.id,
xianzhuang: item._zichanshengyumianji == 0 ? 1 : 2,
shijimianji: item._zichanshengyumianji
})))
//
if (this.type === "change") {
let content = "";
for (let key in this.originalForm) {
if (this.form[key] && this.originalForm[key] !== this.form[key]) {
content += `${key}${this.originalForm[key]}变更为${this.form[key]}\n`;
}
}
save(
{
table_name: "lease_logs",
content,
lease_id: this.id,
},
false
);
}
// if (this.type === "change") {
// let content = "";
// for (let key in this.originalForm) {
// if (this.form[key] && this.originalForm[key] !== this.form[key]) {
// content += `${key}${this.originalForm[key]}${this.form[key]}\n`;
// }
// }
// save(
// {
// table_name: "lease_logs",
// content,
// lease_id: this.id,
// },
// false
// );
// }
this.$Message.success({
content: `${this.type === "add" ? "新增" : "编辑"}成功`,
});
@ -892,6 +900,7 @@ export default {
shijimianji: land.shijimianji,
_zichanshengyumianji: item.zichanshengyumianji||0,
_relation_id: item.id,
ORIGINAL_DATA: land,
});
}
} else {
@ -906,6 +915,7 @@ export default {
_zichanshengyumianji: item.zichanshengyumianji||0,
_relation_id: item.id,
land_id: house.land_id,
ORIGINAL_DATA: house,
});
}
}

@ -28,7 +28,6 @@
<el-descriptions-item
v-for="item in showFields"
:label="item.name"
v-if="!['file', 'picture'].find((j) => j === item.field)"
>
<template v-if="item.edit_input === 'richtext'">
<div v-html="detail[item.field]"></div>

@ -411,6 +411,8 @@ export default {
value: "",
},
],
sort_name: 'xianzhuang',
sort_type: 'asc',
},
form: [],
table: [],
@ -515,16 +517,21 @@ export default {
i._relations = relation.find(
(j) => j.link_table_name.split("_")[1] === i.field
);
if (i.select_item && typeof i.select_item === "object") {
let keys = Object.keys(i.select_item);
i._params = keys.map((key) => {
return {
key,
value: /^\d*$/.test(i.select_item[key])
? Number(i.select_item[key])
: i.select_item[key],
};
});
if (i.select_item && typeof i.select_item === "object" && !(i.select_item instanceof Array)) {
let keys = Object.keys(i.select_item)
if (keys.length > 0) {
i._params = keys.map((key) => {
return {
key,
value: /^\d*$/.test(i.select_item[key])
? Number(i.select_item[key])
: i.select_item[key],
};
});
//select,radio
i.edit_input = 'radio'
}
}
if (i.edit_input === "file" || i.edit_input === "files") {
return;

@ -390,7 +390,7 @@ export default {
value: "",
},
],
sort_name: 'id',
sort_name: 'xianzhuang',
sort_type: 'asc'
},
form: [],
@ -493,16 +493,21 @@ export default {
i._relations = relation.find(
(j) => j.link_table_name.split("_")[1] === i.field
);
if (i.select_item && typeof i.select_item === "object") {
let keys = Object.keys(i.select_item);
i._params = keys.map((key) => {
return {
key,
value: /^\d*$/.test(i.select_item[key])
? Number(i.select_item[key])
: i.select_item[key],
};
});
if (i.select_item && typeof i.select_item === "object" && !(i.select_item instanceof Array)) {
let keys = Object.keys(i.select_item)
if (keys.length > 0) {
i._params = keys.map((key) => {
return {
key,
value: /^\d*$/.test(i.select_item[key])
? Number(i.select_item[key])
: i.select_item[key],
};
});
//select,radio
i.edit_input = 'radio'
}
}
if (i.edit_input === 'file' || i.edit_input === 'files') {
return
@ -647,6 +652,21 @@ export default {
// }
// })
// break;
case "name":
this.table.push({
label: i.name,
width: i.width,
prop: i.field,
customFn: (row) => (
<div>
<span style={{
color: (row.xianzhuang == 1 ? 'red' : '')
}}>{ (row.xianzhuang == 1 ? '【已处置/拆迁】' : '') }</span>
<span>{ row.name }</span>
</div>
)
})
break;
case "fangchanzhuangtai":
this.table.push({
label: i.name,

@ -41,18 +41,67 @@
size="small"
stripe
highlight-row
:height="400"
:height="300"
:data="leases"
:columns="leaseTable"
></Table>
<Page
style="margin-top: 14px; display: flex; justify-content: flex-end"
<div class="page">
<Page
style="margin-top: 14px; display: flex; justify-content: flex-end"
size="small"
:current.sync="leaseSelect.page"
:total="leaseTotal"
show-elevator
show-total
:page-size="leaseSelect.page_size"
@on-change="getLeases"
></Page>
</div>
</div>
<div class="card-title" style="margin-top: 20px;">
<div class="title-icon">
<i class="el-icon-s-claim"></i>
</div>
<p>临期收租</p>
<div
class="lease-status-switch"
:data-status="radio1"
>
<div
v-for="(item, index) in status"
:data-status="index"
:class="{ 'active-switch': radio1 === index }"
@click="radio1Pick(index)"
>
<el-badge :value="statusTotal1[index]" :max="99">
{{ item }}
</el-badge>
</div>
</div>
</div>
<div class="card-content">
<Table
:loading="payTableLoading"
size="small"
:total="leaseTotal"
show-elevator
show-total
:page-size="leaseSelect.page_size"
></Page>
stripe
highlight-row
:height="300"
:data="pays"
:columns="payTable"
></Table>
<div class="page">
<Page
style="margin-top: 14px; display: flex; justify-content: flex-end"
size="small"
:current.sync="paySelect.page"
:total="payTotal"
show-elevator
show-total
:page-size="paySelect.page_size"
@on-change="getLeasePay"
></Page>
</div>
</div>
</Card>
</el-col>
@ -162,6 +211,16 @@ export default {
},
data() {
return {
config: {
lease: {
time: 1,
unit: "months",
},
pay: {
time: 3,
unit: "months",
}
},
statusTotal: [],
status: ["已过期", "临期"], //scss
col: "",
@ -194,11 +253,149 @@ export default {
orderArr: [],
chartData: {},
radio: 0,
config: {
time: 1,
unit: "months",
//pay
statusTotal1: [],
radio1: 0,
payTableLoading: false,
pays: [],
payTotal: 0,
paySelect: {
table_name: "lease_plans",
page: 1,
page_size: 10,
filter: [
{
key: "zujindiyicidaoweishijian",
op: "range",
value: `${this.$moment(0).format('YYYY-MM-DD')},${this.$moment().format('YYYY-MM-DD')}`,
}
]
},
payTable: [
{
title: "序号",
fixed: "left",
align: "center",
width: 60,
render: (h, { row, column, index }) => {
return h(
"div",
{
style: {
height: "18px",
width: "18px",
"border-radius": "100%",
color: "#fff",
background: "#4986cc",
"text-align": "center",
"font-size": "12px",
},
},
index + 1
);
},
},
{
title: "地块名称",
key: "dikuaimingcheng",
width: 200,
fixed: "left",
align: "left",
render: (h, { row }) => {
let tags = [
...row?.land?.map((i) =>
h(
"Tag",
{
props: {
type: "dot",
color: "#3fa45a",
},
style: {
background: "#e5f4ea !important",
},
},
i.name
)
),
...row?.houses?.map((i) =>
h(
"Tag",
{
props: {
type: "dot",
color: "#2254e4",
},
style: {
background: "#e8edfc !important",
},
},
i.name
)
),
];
return h("div", [
...tags.slice(0, 1),
h(
"el-popover",
{
props: {
title: "地块名称",
width: 200,
trigger: "hover",
},
},
[
h(
"el-link",
{
style: {
"word-break": "keep-all",
display: tags.length > 1 ? "inline" : "none",
},
props: {
type: "primary",
},
slot: "reference",
},
"更多"
),
h("div", tags),
]
),
]);
},
},
{
key: "zujindiyicidaoweishijian",
title: "租金到位时间",
width: 180
},
{
key: "yingshou",
title: "应收",
width: 140,
render: (h, { row }) => h('div',{ style: { 'text-align': 'right' } },row.yingshou)
},
{
key: "zulinjieduanjieshuriqi",
title: "租赁阶段结束日期",
width: 160
},
{
key: "zulinjieduankaishiriqi",
title: "租赁阶段开始日期",
width: 160
},
{
key: "weidaoweiyuanyin",
title: "未到位原因",
minWidth: 140
}
],
//lease
radio: 0,
leaseTableLoading: false,
leaseSelect: {
table_name: "leases",
@ -248,7 +445,7 @@ export default {
{
title: "地块名称",
key: "dikuaimingcheng",
width: 260,
width: 200,
fixed: "left",
align: "left",
render: (h, { row }) => {
@ -285,7 +482,7 @@ export default {
),
];
return h("div", [
...tags.slice(0, 3),
...tags.slice(0, 1),
h(
"el-popover",
{
@ -301,7 +498,7 @@ export default {
{
style: {
"word-break": "keep-all",
display: tags.length > 3 ? "inline" : "none",
display: tags.length > 1 ? "inline" : "none",
},
props: {
type: "primary",
@ -565,7 +762,7 @@ export default {
if (this.status[e] === "临期") {
let date = this.$moment();
let preDate = date
.add(this.config.time, this.config.unit)
.add(this.config['lease'].time, this.config['lease'].unit)
.format("YYYY-MM-DD");
this.leaseSelect.filter[0].value = `${this.$moment().format(
"YYYY-MM-DD"
@ -590,20 +787,31 @@ export default {
this.leaseSelect.page = 1;
await this.getLeases();
},
async radio1Pick (e) {
if (this.radio1 === e) return;
this.radio1 = e;
if (this.status[e] === "临期") {
this.paySelect.filter[0].value = `${this.$moment().format('YYYY-MM-DD')},${this.$moment().add(this.config?.pay?.time,this.config?.pay?.unit).format('YYYY-MM-DD')}`;
}
if (this.status[e] === "已过期") {
this.paySelect.filter[0].value = `${this.$moment(0).format('YYYY-MM-DD')},${this.$moment().format('YYYY-MM-DD')}`;
}
this.paySelect.page = 1;
await this.getLeasePay();
},
async getConfig() {
const res = await index({
table_name: "warnings",
filter: [
{
key: "flag",
op: "eq",
value: "contract",
},
],
});
this.config.time = Number(res.data[0]?.time);
this.config.unit = res.data[0]?.unit;
let leaseConfig = res.data.find(i => i.flag === 'contract');
this.config['lease'].time = Number(leaseConfig?.time);
this.config['lease'].unit = leaseConfig?.unit;
let payConfig = res.data.find(i => i.flag === 'pay');
this.config['pay'].time = Number(payConfig?.time);
this.config['pay'].unit = payConfig?.unit;
},
async getNotices() {
@ -638,13 +846,26 @@ export default {
this.leaseTableLoading = false;
}
},
async getLeasePay () {
try {
this.payTableLoading = true;
const res = await index(this.paySelect, false);
this.pays = res.data;
this.payTotal = res.total;
this.statusTotal1[this.radio1] = res.total;
this.payTableLoading = false;
} catch (err) {
this.payTableLoading = false;
}
}
},
created() {
this.getNotices();
this.getSystems();
this.getConfig().then((_) => {
this.getLeases();
this.getAssetSafetyPlan();
this.getLeasePay();
//this.getAssetSafetyPlan();
});
//this.loadData();
},
@ -663,6 +884,10 @@ export default {
</script>
<style lang="scss" scoped>
.page {
display: flex;
justify-content: center;
}
::v-deep .ivu-card-body {
overflow: hidden;
position: relative;

@ -22,7 +22,14 @@ export default {
columns: [
{
key: "name",
title: "资产名称"
title: "资产名称",
render: (h,{ row }) => {
return h('span',{
style: {
'text-align': 'left'
}
},row.name)
}
},
{
key: "shijimianji",
@ -116,5 +123,7 @@ export default {
border-radius: 20px;
}
::v-deep .ivu-table {}
::v-deep .ivu-table-stripe .ivu-table-body tr:nth-child(2n) td,::v-deep .ivu-table th {
background: rgb(236, 242, 241);
}
</style>

@ -15,7 +15,7 @@ export default {
],{}, false)
return (
<div>
<div style="padding: 0 20px">
<el-card style="margin-top: 20px;">
<div slot="header" style="display: flex;align-items: center;">
<i class="el-icon-back"
@ -145,6 +145,7 @@ export default {
</el-card>
<el-drawer title="土地列表"
append-to-body={true}
visible={this.landDialog}
size="64%"
on={{
@ -351,7 +352,7 @@ export default {
zuoluo: row.zuoluo,
zichanweizhi: row.zichanweizhi,
shijimianji: row.shijimianji,
_chuzumianji: 0,
_chuzumianji: row.shijimianji,
_relation_id: "",
})
} else {
@ -371,6 +372,7 @@ export default {
</el-drawer>
<el-drawer title="房产列表"
append-to-body={true}
visible={this.houseDialog}
size="64%"
on={{
@ -531,7 +533,7 @@ export default {
zuoluo: row.zuoluo,
zichanweizhi: row.zichanweizhi,
shijimianji: row.shijimianji,
_chuzumianji: 0,
_chuzumianji: row.shijimianji,
_relation_id: "",
land_id: row.land_id
})

@ -28,7 +28,6 @@
<el-descriptions-item
v-for="item in showFields"
:label="item.name"
v-if="!['file', 'picture'].find((j) => j === item.field)"
>
<template v-if="item.edit_input === 'richtext'">
<div v-html="detail[item.field]"></div>
@ -105,18 +104,18 @@
></xy-table>
</el-card>
<el-card>
<div class="el-descriptions__header el-descriptions__title">
变更记录
</div>
<xy-table
size="mini"
:height="300"
:is-page="false"
:list="logLeases"
:table-item="logLeaseTable"
></xy-table>
</el-card>
<!-- <el-card>-->
<!-- <div class="el-descriptions__header el-descriptions__title">-->
<!-- 变更记录-->
<!-- </div>-->
<!-- <xy-table-->
<!-- size="mini"-->
<!-- :height="300"-->
<!-- :is-page="false"-->
<!-- :list="logLeases"-->
<!-- :table-item="logLeaseTable"-->
<!-- ></xy-table>-->
<!-- </el-card>-->
</el-col>
</el-row>

@ -8,6 +8,12 @@
:text="$route.meta.title"
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
>
<div slot="header-right">
<div class="lease-legend">
<div>临期</div>
<div>到期</div>
</div>
</div>
<div slot="content"></div>
<slot>
<header-content :auths="auths_auth_mixin">
@ -238,6 +244,7 @@
<xy-table
:btn-width="300"
:row-style="rowStyle"
:auths="auths_auth_mixin"
:delay-req="true"
:destroy-action="destroy"
@ -264,12 +271,12 @@
>
<template #rentCollection="{ row }">
<template v-if="$moment().isBetween($moment(row.zulinkaishiqixian),$moment(row.zulinjieshuqixian))">
<Button size="small" type="primary" @click="$refs['payList'].setLeaseId(row.id),$refs['payList'].show()"></Button>
<Button size="small" :type="(row.zulinjieshuqixian && $moment().isBetween($moment(row.zulinjieshuqixian).subtract(config.time,config.unit),$moment(row.zulinjieshuqixian))) ? 'warning' : 'primary'" @click="$refs['payList'].setLeaseId(row.id),$refs['payList'].show()"></Button>
</template>
</template>
<template #expiredLet="{ row }">
<template v-if="$moment().valueOf() > $moment(row.zulinjieshuqixian).valueOf()">
<Button size="small" type="primary" @click="$router.push('/let'+'?renewId='+row.let_id)"></Button>
<Button size="small" type="error" @click="$router.push('/let'+'?renewId='+row.let_id)"></Button>
</template>
</template>
<template #contractChange="{ row }">
@ -320,6 +327,10 @@ export default {
},
data() {
return {
config: {
time: 3,
unit: "months"
},
firstAdjustTable: true,
op,
select: {
@ -613,6 +624,37 @@ export default {
this.firstAdjustTable = false;
})
}
},
async getConfig () {
const res = await index({
table_name: "warnings",
filter: [
{
key: "flag",
op: "eq",
value: "contract"
}
]
});
this.config.time = Number(res.data[0]?.time);
this.config.unit = res.data[0]?.unit;
},
rowStyle ({ row }) {
if (row.zulinjieshuqixian && this.$moment().isBetween(this.$moment(row.zulinjieshuqixian).subtract(this.config.time,this.config.unit),this.$moment(row.zulinjieshuqixian))) {
return {
background: "rgb(255,251,230)"
}
}
else if (row.zulinjieshuqixian && this.$moment().isAfter(this.$moment(row.zulinjieshuqixian))) {
return {
background: "#e5e5e5"
}
} else {
return {
background: "#fff"
}
}
}
},
@ -640,12 +682,45 @@ export default {
}
},
created() {
this.getConfig();
this.getFormDetail();
},
};
</script>
<style scoped lang="scss">
.lease-legend {
display: flex;
align-items: center;
margin-left: auto;
& > div {
font-size: 15px;
color: #595959;
position: relative;
&::before {
content: "";
width: 8px;
height: 8px;
border-radius: 100%;
position: absolute;
left: -14px;
top: calc(50% - 4px);
}
& + div {
margin-left: 35px;
}
}
& > div:nth-child(1)::before {
background: #fefbe8;
border: 1px solid #efde75;
}
& > div:nth-child(2)::before {
background: #e5e5e5;
}
}
.select {
&__item {
& > p {
@ -669,15 +744,4 @@ export default {
padding: 0 10px;
}
}
a {
color: red;
text-decoration: none;
transition: all 0.2s;
}
a:hover {
color: red;
text-decoration: underline;
}
</style>

@ -8,6 +8,12 @@
:text="$route.meta.title"
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
>
<div slot="header-right">
<div class="lease-legend">
<div>临期</div>
<div>到期</div>
</div>
</div>
<div slot="content"></div>
<slot>
<header-content :auths="auths_auth_mixin">
@ -238,6 +244,7 @@
<xy-table
:btn-width="300"
:row-style="rowStyle"
:auths="auths_auth_mixin"
:delay-req="true"
:destroy-action="destroy"
@ -318,6 +325,10 @@ export default {
},
data() {
return {
config: {
time: 1,
unit: "months"
},
firstAdjustTable: true,
op,
select: {
@ -589,12 +600,12 @@ export default {
let tags = [
...row?.land?.map((i) =>
(
<Tag color="primary" style="background: #e5f4ea !important;">{i.name}</Tag>
<Tag color="success" style="background: rgb(65, 100, 227) !important;">{i.name}</Tag>
)
),
...row?.houses?.map((i) =>
(
<Tag color="success" style="background: #e8edfc !important">{i.name}</Tag>
<Tag color="success" style="">{i.name}</Tag>
)
),
]
@ -603,7 +614,7 @@ export default {
{
tags.slice(0, 1)
}
<el-popover>
<el-popover title="地块名称" width={200}>
<el-link slot="reference"
type="primary"
style={{
@ -656,6 +667,37 @@ export default {
this.firstAdjustTable = false;
})
}
},
async getConfig () {
const res = await index({
table_name: "warnings",
filter: [
{
key: "flag",
op: "eq",
value: "pay"
}
]
});
this.config.time = Number(res.data[0]?.time);
this.config.unit = res.data[0]?.unit;
},
rowStyle ({ row }) {
if (row.zujindiyicidaoweishijian && this.$moment().isAfter(this.$moment(row.zujindiyicidaoweishijian))) {
return {
background: "#e5e5e5"
}
}
else if (row.zujindiyicidaoweishijian && this.$moment().isBetween(this.$moment(row.zujindiyicidaoweishijian).subtract(this.config.time,this.config.unit),this.$moment(row.zujindiyicidaoweishijian))) {
return {
background: "rgb(255,251,230)"
}
} else {
return {
background: "#fff"
}
}
}
},
@ -683,12 +725,45 @@ export default {
}
},
created() {
this.getConfig();
this.getFormDetail();
},
};
</script>
<style scoped lang="scss">
.lease-legend {
display: flex;
align-items: center;
margin-left: auto;
& > div {
font-size: 15px;
color: #595959;
position: relative;
&::before {
content: "";
width: 8px;
height: 8px;
border-radius: 100%;
position: absolute;
left: -14px;
top: calc(50% - 4px);
}
& + div {
margin-left: 35px;
}
}
& > div:nth-child(1)::before {
background: #fefbe8;
border: 1px solid #efde75;
}
& > div:nth-child(2)::before {
background: #e5e5e5;
}
}
.select {
&__item {
& > p {
@ -713,14 +788,4 @@ export default {
}
}
a {
color: red;
text-decoration: none;
transition: all 0.2s;
}
a:hover {
color: red;
text-decoration: underline;
}
</style>

@ -34,11 +34,12 @@ export default {
},
}),
},
{
show: this.type !== 'change',
key: "file"
}
],
{
labelReplace: new Map([
["租赁合同", this.type === 'change' ? '补充协议' : '租赁合同']
])
},
false
);

Loading…
Cancel
Save