feat():测试问题修复以及代码优化调整;

master
jiyufei 3 months ago
parent c32383ce5b
commit eb68453c50

@ -3,6 +3,7 @@ package jnpf.service;
import jnpf.model.park.*;
import jnpf.entity.*;
import java.math.BigDecimal;
import java.util.*;
import com.baomidou.mybatisplus.extension.service.IService;
@ -60,7 +61,16 @@ public interface ParkService extends IService<ParkEntity> {
/**
*
*
* @return
*/
List<ParkDTO> tree();
/**
*
*
* @param id
* @return
*/
BigDecimal getAreaById(String id);
}

@ -613,7 +613,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
//异步处理空间信息
CompletableFuture.runAsync(() -> parkService.updateStatus(contract.getParkId(), "20"));
//异步处理商户信息
CompletableFuture.runAsync(() -> enterpriseMerchantsService.updateStatus(request.getContractStatus(), contract.getContractName(), contract.getParkId()));
CompletableFuture.runAsync(() -> enterpriseMerchantsService.updateStatus(request.getContractStatus(), contract.getMerchantId(), contract.getParkId()));
}
return "合同确认成功";
}
@ -641,7 +641,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
//异步处理空间信息
CompletableFuture.runAsync(() -> parkService.updateStatus(contract.getParkId(), "10"));
//异步处理商户信息
CompletableFuture.runAsync(() -> enterpriseMerchantsService.updateStatus(request.getContractStatus(), contract.getContractName(), null));
CompletableFuture.runAsync(() -> enterpriseMerchantsService.updateStatus(request.getContractStatus(), contract.getMerchantId(), null));
}
return "合同结束成功";
}

@ -27,6 +27,7 @@ import java.util.stream.Collectors;
import jnpf.base.model.ColumnDataModel;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import jnpf.database.model.superQuery.SuperJsonModel;
@ -44,6 +45,8 @@ import java.util.*;
import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity;
import javax.annotation.Resource;
/**
* EnterpriseMerchants
* V3.5
@ -60,6 +63,9 @@ public class EnterpriseMerchantsServiceImpl extends ServiceImpl<EnterpriseMercha
@Autowired
private UserProvider userProvider;
@Resource
private ParkService parkService;
@Override
public List<EnterpriseMerchantsEntity> getList(EnterpriseMerchantsPagination enterpriseMerchantsPagination) {
return getTypeList(enterpriseMerchantsPagination, enterpriseMerchantsPagination.getDataType());
@ -420,6 +426,10 @@ public class EnterpriseMerchantsServiceImpl extends ServiceImpl<EnterpriseMercha
if (ObjectUtil.isNull(entity)) {
return;
}
String parkName = null;
if (StringUtils.isNoneBlank(parkId)) {
parkName = parkService.findNameById(parkId);
}
//如果是合同确认 并且状态是同意的 驳回不更改状态
if ("20".equals(contractStatus)) {
entity.setEntryStatus("2");
@ -427,6 +437,7 @@ public class EnterpriseMerchantsServiceImpl extends ServiceImpl<EnterpriseMercha
entity.setEntryStatus("1");
}
entity.setParkId(parkId);
entity.setParkName(parkName);
this.updateById(entity);
}

@ -3,6 +3,8 @@ package jnpf.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import java.math.BigDecimal;
import java.util.regex.Pattern;
import jnpf.entity.AreaEntity;
@ -368,6 +370,12 @@ public class ParkServiceImpl extends ServiceImpl<ParkMapper, ParkEntity> impleme
return buildTree(map, root);
}
@Override
public BigDecimal getAreaById(String id) {
ParkEntity entity = this.getById(id);
return entity.getSpaceArea();
}
private List<ParkDTO> buildTree(Map<String, List<ParkDTO>> map, List<ParkDTO> root) {
for (ParkDTO parkDTO : root) {
List<ParkDTO> list = map.get(parkDTO.getId());

@ -84,6 +84,7 @@ public class ParkController {
@Autowired
private AreaService areaService;
/**
*
*
@ -425,10 +426,10 @@ public class ParkController {
List<String> idList = JsonUtil.getJsonToList(ids, String.class);
for (String allId : idList) {
QueryWrapper<AreaEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(AreaEntity::getPid,allId);
queryWrapper.lambda().eq(AreaEntity::getPid, allId);
queryWrapper.lambda().isNull(AreaEntity::getDeleteMark);
long lenght = areaService.count(queryWrapper);
if (lenght > 0){
if (lenght > 0) {
return ActionResult.fail("该园区已配置区域数据,不能删除,请确认!");
}
}
@ -485,12 +486,12 @@ public class ParkController {
@Transactional
public ActionResult delete(@PathVariable("id") String id) {
QueryWrapper<AreaEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(AreaEntity::getPid,id);
queryWrapper.lambda().eq(AreaEntity::getPid, id);
queryWrapper.lambda().isNull(AreaEntity::getDeleteMark);
long lenght = areaService.count(queryWrapper);
if (lenght > 0){
if (lenght > 0) {
return ActionResult.fail("该园区已配置区域数据,不能删除,请确认!");
}else {
} else {
ParkEntity entity = parkService.getInfo(id);
if (entity != null) {
//假删除
@ -550,4 +551,10 @@ public class ParkController {
public ActionResult tree() {
return ActionResult.success(parkService.tree());
}
@Operation(summary = "获取面积")
@GetMapping("/getAreaById/{id}")
public ActionResult getAreaById(@PathVariable String id) {
return ActionResult.success(parkService.getAreaById(id));
}
}

@ -2,12 +2,12 @@ package jnpf.entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.util.Date;
import java.math.BigDecimal;
import java.math.BigDecimal;
/**
*
*
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
@ -15,56 +15,56 @@ import java.math.BigDecimal;
*/
@Data
@TableName("yq_enterprise_merchants")
public class EnterpriseMerchantsEntity {
@TableId(value ="ID" )
public class EnterpriseMerchantsEntity {
@TableId(value = "ID")
private String id;
@TableField(value = "CMP_NO" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "CMP_NO", updateStrategy = FieldStrategy.IGNORED)
private String cmpNo;
@TableField(value = "CMP_NM" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "CMP_NM", updateStrategy = FieldStrategy.IGNORED)
private String cmpNm;
@TableField(value = "COMP_TYPE" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "COMP_TYPE", updateStrategy = FieldStrategy.IGNORED)
private String compType;
@TableField(value = "COMPANY_REGISTRATION_NUMBER" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "COMPANY_REGISTRATION_NUMBER", updateStrategy = FieldStrategy.IGNORED)
private String companyRegistrationNumber;
@TableField(value = "INCORPORATION_DATE" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "INCORPORATION_DATE", updateStrategy = FieldStrategy.IGNORED)
private Date incorporationDate;
@TableField(value = "REGISTERED_ADDRESS" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "REGISTERED_ADDRESS", updateStrategy = FieldStrategy.IGNORED)
private String registeredAddress;
@TableField(value = "OFFICE_ADDRESS" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "OFFICE_ADDRESS", updateStrategy = FieldStrategy.IGNORED)
private String officeAddress;
@TableField(value = "USER_NM" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "USER_NM", updateStrategy = FieldStrategy.IGNORED)
private String userNm;
@TableField(value = "CONTACT_NUMBER" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "CONTACT_NUMBER", updateStrategy = FieldStrategy.IGNORED)
private String contactNumber;
@TableField(value = "MAILBOX" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "MAILBOX", updateStrategy = FieldStrategy.IGNORED)
private String mailbox;
@TableField(value = "LG_PERSON_NM" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "LG_PERSON_NM", updateStrategy = FieldStrategy.IGNORED)
private String lgPersonNm;
@TableField(value = "INDUSTRY" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "INDUSTRY", updateStrategy = FieldStrategy.IGNORED)
private String industry;
@TableField(value = "COMPANY_SIZE" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "COMPANY_SIZE", updateStrategy = FieldStrategy.IGNORED)
private String companySize;
@TableField(value = "REGISTERED_CAPITAL" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "REGISTERED_CAPITAL", updateStrategy = FieldStrategy.IGNORED)
private BigDecimal registeredCapital;
@TableField(value = "REGISTERED_CAPITAL_UNIT" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "REGISTERED_CAPITAL_UNIT", updateStrategy = FieldStrategy.IGNORED)
private String registeredCapitalUnit;
@TableField(value = "NATURE_OF_BUSINESS" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "NATURE_OF_BUSINESS", updateStrategy = FieldStrategy.IGNORED)
private String natureObusiness;
@TableField(value = "COMPANY_STATUS" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "COMPANY_STATUS", updateStrategy = FieldStrategy.IGNORED)
private String companyStatus;
@TableField(value = "BUSINESS_LICENSE_PHOTO" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "BUSINESS_LICENSE_PHOTO", updateStrategy = FieldStrategy.IGNORED)
private String businessLicensePhoto;
@TableField(value = "UNIFIED_SOCIAL_CREDIT_CODE" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "UNIFIED_SOCIAL_CREDIT_CODE", updateStrategy = FieldStrategy.IGNORED)
private String unifiedSocialCreditCode;
@TableField(value = "BANK_ACCOUNT" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "BANK_ACCOUNT", updateStrategy = FieldStrategy.IGNORED)
private Integer bankAccount;
@TableField(value = "OPENING_BANK" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "OPENING_BANK", updateStrategy = FieldStrategy.IGNORED)
private String openingBank;
@TableField("FUND_BALANCE")
private BigDecimal fundBalance;
@TableField(value = "ENTRY_STATUS" , updateStrategy = FieldStrategy.IGNORED)
@TableField(value = "ENTRY_STATUS", updateStrategy = FieldStrategy.IGNORED)
private String entryStatus;
@TableField("PARK_ID")
@TableField(value = "PARK_ID", updateStrategy = FieldStrategy.IGNORED)
private String parkId;
@TableField("PARK_NAME")
private String parkName;

@ -411,6 +411,9 @@ export default {
},
//
async initSearchData() {
let date = new Date();
let dateWithoutTime = new Date(date.getFullYear(), date.getMonth(), date.getDate());
this.query.creationTime = [dateWithoutTime.getTime(), dateWithoutTime.getTime()]
},
initData() {
this.listLoading = true;

@ -1,269 +1,249 @@
<template>
<transition name="el-zoom-in-center">
<div class="JNPF-preview-main">
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
<div class="JNPF-common-page-header">
<el-page-header @back="goBack"
content="详情"/>
<div class="options">
<el-button @click="goBack"> </el-button>
</div>
</div>
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
<el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
<el-col :span="8" >
<jnpf-form-tip-item label="合同编号"
prop="contractNumber" >
<p>{{dataForm.contractNumber}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="合同名称"
prop="contractName" >
<p>{{dataForm.contractName}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="计价方式"
prop="pricingMethod" >
<p>{{ dataForm.pricingMethod }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="签订日期"
prop="signingDate" >
<p>{{dataForm.signingDate}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="园区名称"
prop="parkId" >
<p>{{dataForm.parkId}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="商户名称"
prop="merchantId" >
<p>{{dataForm.merchantId}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="租金总价"
prop="totalRentalPrice" >
<p>{{dataForm.totalRentalPrice}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="押金总计"
prop="totalDeposit" >
<p>{{dataForm.totalDeposit}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="支付方式"
prop="payDeposit" >
<p>{{ dataForm.payDeposit }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="退还方式"
prop="returnDeposit" >
<p>{{ dataForm.returnDeposit }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="开始时间"
prop="startTime" >
<p>{{dataForm.startTime}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="结束时间"
prop="endTime" >
<p>{{dataForm.endTime}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="租期"
prop="leaseTerm" >
<p>{{dataForm.leaseTerm}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="联系人"
prop="contacts" >
<p>{{dataForm.contacts}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="联系电话"
prop="contactsPhone" >
<p>{{dataForm.contactsPhone}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="合同状态"
prop="contractStatus" >
<p>{{ dataForm.contractStatus }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item label="合同说明"
prop="contractExplain" >
<p>{{dataForm.contractExplain}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item label="合同附件"
prop="contractEnclosure" >
<JnpfUploadFile v-model="dataForm.contractEnclosure"
disabled
detailed :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0" buttonText="点击上传" >
</JnpfUploadFile>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2>空间列表</h2>
<transition name="el-zoom-in-center">
<div class="JNPF-preview-main">
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
<div class="JNPF-common-page-header">
<el-page-header @back="goBack" content="详情" />
<div class="options">
<el-button @click="goBack"> </el-button>
</div>
</div>
<el-table :data="dataForm.tableField130" size='mini' >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="contractLineNumber" label="合同行号" >
<template slot="header">
合同行号
<span slot="label">
<el-tooltip placement="top" content='后台自动生成'>
<a class='el-icon-question tooltip-question'></a>
</el-tooltip>
</span>
</template>
<template slot-scope="scope">
<p>{{scope.row.contractLineNumber}}</p>
</template>
</el-table-column>
<el-table-column prop="spaceId" label="空间名称" >
<template slot-scope="scope">
<p>{{scope.row.spaceId}}</p>
</template>
</el-table-column>
<el-table-column prop="spaceArea" label="空间面积" >
<template slot-scope="scope">
<p>{{scope.row.spaceArea}}</p>
</template>
</el-table-column>
<el-table-column prop="totalRentalPrice" label="租金总价" >
<template slot-scope="scope">
<p>{{scope.row.totalRentalPrice}}</p>
</template>
</el-table-column>
</el-table>
</jnpf-form-tip-item>
</el-col>
</template>
</el-form>
</el-row>
</div>
</transition>
<el-row :gutter="15" class=" main" :style="{ margin: '0 auto', width: '100%' }">
<el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right">
<template v-if="!loading">
<el-col :span="8">
<jnpf-form-tip-item label="合同编号" prop="contractNumber">
<p>{{ dataForm.contractNumber }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="合同名称" prop="contractName">
<p>{{ dataForm.contractName }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="计价方式" prop="pricingMethod">
<p>{{ dataForm.pricingMethod }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="签订日期" prop="signingDate">
<p>{{ dataForm.signingDate }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="园区名称" prop="parkId">
<p>{{ dataForm.parkId }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="商户名称" prop="merchantName">
<p>{{ dataForm.merchantName }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="租金总价" prop="totalRentalPrice">
<p>{{ dataForm.totalRentalPrice }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="押金总计" prop="totalDeposit">
<p>{{ dataForm.totalDeposit }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="支付方式" prop="payDeposit">
<p>{{ dataForm.payDeposit }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="退还方式" prop="returnDeposit">
<p>{{ dataForm.returnDeposit }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="开始时间" prop="startTime">
<p>{{ dataForm.startTime }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="结束时间" prop="endTime">
<p>{{ dataForm.endTime }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="租期" prop="leaseTerm">
<p>{{ dataForm.leaseTerm }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="联系人" prop="contacts">
<p>{{ dataForm.contacts }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="联系电话" prop="contactsPhone">
<p>{{ dataForm.contactsPhone }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="合同状态" prop="contractStatus">
<p>{{ dataForm.contractStatus }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="合同说明" prop="contractExplain">
<p>{{ dataForm.contractExplain }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="合同附件" prop="contractEnclosure">
<JnpfUploadFile v-model="dataForm.contractEnclosure" disabled detailed :fileSize="10"
sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0" buttonText="点击上传">
</JnpfUploadFile>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2>空间列表</h2>
</div>
<el-table :data="dataForm.tableField130" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="contractLineNumber" label="合同行号">
<template slot="header">
合同行号
<span slot="label">
<el-tooltip placement="top" content='后台自动生成'>
<a class='el-icon-question tooltip-question'></a>
</el-tooltip>
</span>
</template>
<template slot-scope="scope">
<p>{{ scope.row.contractLineNumber }}</p>
</template>
</el-table-column>
<el-table-column prop="spaceId" label="空间名称">
<template slot-scope="scope">
<p>{{ scope.row.spaceId }}</p>
</template>
</el-table-column>
<el-table-column prop="spaceArea" label="空间面积">
<template slot-scope="scope">
<p>{{ scope.row.spaceArea }}</p>
</template>
</el-table-column>
<el-table-column prop="totalRentalPrice" label="租金总价">
<template slot-scope="scope">
<p>{{ scope.row.totalRentalPrice }}</p>
</template>
</el-table-column>
</el-table>
</jnpf-form-tip-item>
</el-col>
</template>
</el-form>
</el-row>
</div>
</transition>
</template>
<script>
import request from '@/utils/request'
import request from '@/utils/request'
import { getConfigData } from '@/api/onlineDev/visualDev'
import jnpf from '@/utils/jnpf'
import Detail from '@/views/basic/dynamicModel/list/detail'
import { thousandsFormat } from "@/components/Generator/utils/index"
export default {
components: { Detail},
props: [],
data() {
return {
visible: false,
detailVisible: false,
loading: false,
import { getConfigData } from '@/api/onlineDev/visualDev'
import jnpf from '@/utils/jnpf'
import Detail from '@/views/basic/dynamicModel/list/detail'
import { thousandsFormat } from "@/components/Generator/utils/index"
export default {
components: { Detail },
props: [],
data() {
return {
visible: false,
detailVisible: false,
loading: false,
dataForm: {
id :'',
contractNumber : '',
contractName : '',
pricingMethod : "",
signingDate : '',
parkId : "",
merchantId : "",
totalRentalPrice : "",
totalDeposit : '',
payDeposit : "",
returnDeposit : "",
startTime : '',
endTime : '',
leaseTerm : '',
contacts : '',
contactsPhone : '',
contractStatus : "10",
creationTime : "",
contractExplain : '',
contractEnclosure : [],
spacecontractList:[],
id: '',
contractNumber: '',
contractName: '',
pricingMethod: "",
signingDate: '',
parkId: "",
merchantId: "",
totalRentalPrice: "",
totalDeposit: '',
payDeposit: "",
returnDeposit: "",
startTime: '',
endTime: '',
leaseTerm: '',
contacts: '',
contactsPhone: '',
contractStatus: "10",
creationTime: "",
contractExplain: '',
contractEnclosure: [],
spacecontractList: [],
},
pricingMethodOptions:[{"fullName":"月付","id":"1"},{"fullName":"季付","id":"2"},{"fullName":"年付","id":"3"}],
pricingMethodProps:{"label":"fullName","value":"id" },
parkIdProps:{"label":"name","value":"code" },
merchantIdProps:{"label":"cmp_nm","value":"id" },
payDepositOptions:[{"fullName":"选项1","id":"1"},{"fullName":"选项2","id":"2"}],
payDepositProps:{"label":"fullName","value":"id" },
returnDepositOptions:[{"fullName":"选项一","id":"1"},{"fullName":"选项二","id":"2"}],
returnDepositProps:{"label":"fullName","value":"id" },
contractStatusOptions:[{"fullName":"待确认","id":"10"},{"fullName":"已确认","id":"20"},{"fullName":"已结案","id":"30"},{"fullName":"合同变更","id":"21"}],
contractStatusProps:{"label":"fullName","value":"id" },
pricingMethodOptions: [{ "fullName": "月付", "id": "1" }, { "fullName": "季付", "id": "2" }, { "fullName": "年付", "id": "3" }],
pricingMethodProps: { "label": "fullName", "value": "id" },
parkIdProps: { "label": "name", "value": "code" },
merchantIdProps: { "label": "cmp_nm", "value": "id" },
payDepositOptions: [{ "fullName": "选项1", "id": "1" }, { "fullName": "选项2", "id": "2" }],
payDepositProps: { "label": "fullName", "value": "id" },
returnDepositOptions: [{ "fullName": "选项一", "id": "1" }, { "fullName": "选项二", "id": "2" }],
returnDepositProps: { "label": "fullName", "value": "id" },
contractStatusOptions: [{ "fullName": "待确认", "id": "10" }, { "fullName": "已确认", "id": "20" }, { "fullName": "已结案", "id": "30" }, { "fullName": "合同变更", "id": "21" }],
contractStatusProps: { "label": "fullName", "value": "id" },
}
},
computed: {},
watch: {},
created() {
},
mounted() { },
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(formData, modelId, defaultValue)
})
})
},
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
},
computed: {},
watch: {},
created() {
goBack() {
this.$emit('refresh')
},
mounted() {},
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(formData, modelId, defaultValue)
init(id) {
this.dataForm.id = id || 0;
this.visible = true;
this.$nextTick(() => {
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/example/Contract/detail/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
})
})
},
dataInfo(dataAll){
let _dataAll =dataAll
this.dataForm = _dataAll
},
goBack() {
this.$emit('refresh')
},
init(id) {
this.dataForm.id = id || 0;
this.visible = true;
this.$nextTick(() => {
if(this.dataForm.id){
this.loading = true
request({
url: '/api/example/Contract/detail/'+this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
})
}
}
})
},
})
},
}
},
}
</script>

@ -207,14 +207,14 @@
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.spaceId"
@change="changeData('spacecontract-spaceId', scope.$index)"
@change="changeData('spacecontract-spaceId', scope.$index, scope.row)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.spacecontractspaceId" placeholder="请选择空间"
hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='name' :field="'spaceId' + scope.$index"
interfaceId="584015452494104389" :pageSize="20"
:columnOptions="spacecontractspaceIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
popupType="dialog" relationField='name'
:field="'spaceId' + scope.$index" interfaceId="584015452494104389"
:pageSize="20" :columnOptions="spacecontractspaceIdcolumnOptions"
clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
@ -225,7 +225,7 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spaceArea"
@change="changeData('spacecontract-spaceArea', scope.$index)"
placeholder="选择空间自动生成" disabled clearable :style='{ "width": "100%" }'>
placeholder="选择空间自动生成" disabled clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
@ -467,7 +467,7 @@ export default {
pricingMethodOptions: [{ "fullName": "月付", "id": "1" }, { "fullName": "季付", "id": "2" }, { "fullName": "年付", "id": "3" }],
pricingMethodProps: { "label": "fullName", "value": "id" },
parkIdOptions: [],
parkIdProps: { "label": "name", "value": "code" },
parkIdProps: { "label": "name", "value": "id" },
merchantIdOptions: [],
merchantIdProps: { "label": "cmp_nm", "value": "id" },
payDepositOptions: [{ "fullName": "选项1", "id": "1" }, { "fullName": "选项2", "id": "2" }],
@ -476,7 +476,7 @@ export default {
returnDepositProps: { "label": "fullName", "value": "id" },
contractStatusOptions: [{ "fullName": "待确认", "id": "10" }, { "fullName": "已确认", "id": "20" }, { "fullName": "已结案", "id": "30" }, { "fullName": "合同变更", "id": "21" }],
contractStatusProps: { "label": "fullName", "value": "id" },
spacecontractspaceIdcolumnOptions: [{ "label": "空间名称", "value": "name" }, { "label": "园区名称", "value": "park_name" }, { "label": "区域名称", "value": "area_name" },],
spacecontractspaceIdcolumnOptions: [{ "label": "空间名称", "value": "name" }, { "label": "园区名称", "value": "park_name" }, { "label": "区域名称", "value": "area_name" }, { "label": "空间面积", "value": "space_area" }],
childIndex: -1,
isEdit: false,
interfaceRes: {
@ -555,7 +555,18 @@ export default {
this.visible = false
this.$emit('refreshDataList', true)
},
changeData(model, index) {
getRowData(index) {
return this.dataForm[index];
},
changeData(model, index, row) {
if (model == 'spacecontract-spaceId' && (row.spaceId != null || row.spaceId != undefined)) {
request({
url: '/api/example/Park/getAreaById/' + row.spaceId,
method: 'get'
}).then(res => {
this.$set(row, 'spaceArea', res.data);
});
}
if (model == 'startTime' && this.dataForm.endTime != undefined) {
const date1 = new Date(this.dataForm.startTime);
const date2 = new Date(this.dataForm.endTime);

@ -68,19 +68,19 @@
<el-button type="success" icon="icon-ym el-icon-check" @click="showEndDialog = true"">合同结束
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true">
<el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false"
@click="openSuperQuery()" />
</el-tooltip>
<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="initData()" />
</el-tooltip>
<div class=" JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true">
<el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false"
@click="openSuperQuery()" />
</el-tooltip>
<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="initData()" />
</el-tooltip>
</div>
</div>
<el-table v-loading="listLoading" :data="list" @sort-change='sortChange'
:span-method="arraySpanMethod" @row-click="handleRowClick" border>
<el-table v-loading="listLoading" :data="list" @sort-change='sortChange' :span-method="arraySpanMethod"
@row-click="handleRowClick" border>
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
<el-table-column width="50" align="center" fixed="left">
<template slot-scope="scope">
@ -88,53 +88,53 @@
@change="handleSelectionChange">
</template>
</el-table-column>
<el-table-column prop="contractNumber" label="合同编号" align="center"width="150"fixed="left">
<el-table-column prop="contractNumber" label="合同编号" align="center" width="150" fixed="left">
</el-table-column>
<el-table-column prop="contractName" label="合同名称" align="center"width="150"fixed="left">
<el-table-column prop="contractName" label="合同名称" align="center" width="150" fixed="left">
</el-table-column>
<el-table-column label="合同状态" prop="contractStatus" align="center"width="150"fixed="left">
<el-table-column label="合同状态" prop="contractStatus" align="center" width="150" fixed="left">
<template slot-scope="scope">
{{ scope.row.contractStatus }}
</template>
</el-table-column>
<el-table-column prop="parkId" label="园区名称" align="center"width="150">
<el-table-column prop="parkId" label="园区名称" align="center" width="150">
</el-table-column>
<el-table-column prop="merchantName" label="商户名称" align="center"width="150">
<el-table-column prop="merchantName" label="商户名称" align="center" width="150">
</el-table-column>
<el-table-column prop="signingDate" label="签订日期" align="center"width="150">
<el-table-column prop="signingDate" label="签订日期" align="center" width="150">
</el-table-column>
<el-table-column prop="leaseTerm" label="租期" align="center"width="150">
<el-table-column prop="leaseTerm" label="租期" align="center" width="150">
</el-table-column>
<el-table-column prop="startTime" label="开始时间" align="center"width="150">
<el-table-column prop="startTime" label="开始时间" align="center" width="150">
</el-table-column>
<el-table-column prop="endTime" label="结束时间" align="center"width="150">
<el-table-column prop="endTime" label="结束时间" align="center" width="150">
</el-table-column>
<el-table-column prop="contacts" label="联系人" align="center"width="150">
<el-table-column prop="contacts" label="联系人" align="center" width="150">
</el-table-column>
<el-table-column prop="contactsPhone" label="联系电话" align="center"width="150">
<el-table-column prop="contactsPhone" label="联系电话" align="center" width="150">
</el-table-column>
<el-table-column prop="totalRentalPrice" label="租金总价" align="center"width="150">
<el-table-column prop="totalRentalPrice" label="租金总价" align="center" width="150">
</el-table-column>
<el-table-column label="计价方式" prop="pricingMethod" align="center"width="150">
<el-table-column label="计价方式" prop="pricingMethod" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.pricingMethod }}
</template>
</el-table-column>
<el-table-column prop="totalDeposit" label="押金总计" align="center"width="150">
<el-table-column prop="totalDeposit" label="押金总计" align="center" width="150">
</el-table-column>
<el-table-column label="支付方式" prop="payDeposit" align="center"width="150">
<el-table-column label="支付方式" prop="payDeposit" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.payDeposit }}
</template>
</el-table-column>
<el-table-column label="退还方式" prop="returnDeposit" align="center"width="150">
<el-table-column label="退还方式" prop="returnDeposit" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.returnDeposit }}
</template>
</el-table-column>
<el-table-column prop="contractExplain" label="合同说明" align="center"width="300">
<el-table-column prop="contractExplain" label="合同说明" align="center" width="300">
</el-table-column>
<el-table-column label="操作" fixed="right" width="180"align="center">
<el-table-column label="操作" fixed="right" width="180" align="center">
<template slot-scope="scope">
<el-button type="text" v-show="scope.row.contractStatus === ''"
@click="addOrUpdateHandle(scope.row)">编辑
@ -277,7 +277,7 @@ export default {
},
created() {
this.getColumnList(),
this.initSearchDataAndListData()
this.initSearchDataAndListData()
this.getmerchantNameOptions();
this.getparkIdOptions();
this.queryData = JSON.parse(JSON.stringify(this.query))
@ -466,6 +466,9 @@ export default {
},
//
async initSearchData() {
let date = new Date();
let dateWithoutTime = new Date(date.getFullYear(), date.getMonth(), date.getDate());
this.query.creationTime = [dateWithoutTime.getTime(), dateWithoutTime.getTime()]
},
initData() {
this.listLoading = true;

@ -380,6 +380,9 @@ export default {
},
//
async initSearchData() {
let date = new Date();
let dateWithoutTime = new Date(date.getFullYear(), date.getMonth(), date.getDate());
this.query.creationTime = [dateWithoutTime.getTime(), dateWithoutTime.getTime()]
},
initData() {
this.listLoading = true;

@ -391,6 +391,9 @@ export default {
},
//
async initSearchData() {
let date = new Date();
let dateWithoutTime = new Date(date.getFullYear(), date.getMonth(), date.getDate());
this.query.creationTime = [dateWithoutTime.getTime(), dateWithoutTime.getTime()]
},
initData() {
this.listLoading = true;

@ -369,6 +369,9 @@ export default {
},
//
async initSearchData() {
let date = new Date();
let dateWithoutTime = new Date(date.getFullYear(), date.getMonth(), date.getDate());
this.query.creationTime = [dateWithoutTime.getTime(), dateWithoutTime.getTime()]
},
initData() {
this.listLoading = true;

Loading…
Cancel
Save