vayne 3 months ago
commit 6cedb8e83d

@ -2,7 +2,9 @@ package jnpf.service;
import jnpf.model.enterprisemerchants.*; import jnpf.model.enterprisemerchants.*;
import jnpf.entity.*; import jnpf.entity.*;
import java.util.*; import java.util.*;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -32,4 +34,12 @@ public interface EnterpriseMerchantsService extends IService<EnterpriseMerchants
void saveOrUpdate(EnterpriseMerchantsForm enterpriseMerchantsForm, String id, boolean isSave) throws Exception; void saveOrUpdate(EnterpriseMerchantsForm enterpriseMerchantsForm, String id, boolean isSave) throws Exception;
/**
*
*
* @param contractStatus
* @param contractName id
* @param parkId id
*/
void updateStatus(String contractStatus, String contractName, String parkId);
} }

@ -17,6 +17,7 @@ import jnpf.model.QueryModel;
import jnpf.model.contract.*; import jnpf.model.contract.*;
import jnpf.permission.entity.UserEntity; import jnpf.permission.entity.UserEntity;
import jnpf.service.ContractService; import jnpf.service.ContractService;
import jnpf.service.EnterpriseMerchantsService;
import jnpf.service.SpacecontractService; import jnpf.service.SpacecontractService;
import jnpf.util.*; import jnpf.util.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -25,10 +26,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -51,6 +54,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
@Autowired @Autowired
private SpacecontractService spacecontractService; private SpacecontractService spacecontractService;
@Resource
private EnterpriseMerchantsService enterpriseMerchantsService;
@Override @Override
public List<ContractEntity> getList(ContractPagination contractPagination) { public List<ContractEntity> getList(ContractPagination contractPagination) {
return getTypeList(contractPagination, contractPagination.getDataType()); return getTypeList(contractPagination, contractPagination.getDataType());
@ -387,6 +393,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
@Override @Override
public void create(ContractEntity entity) { public void create(ContractEntity entity) {
entity.setCreateBy(userProvider.get().getUserId());
this.save(entity); this.save(entity);
} }
@ -541,18 +548,33 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
LambdaQueryWrapper<ContractEntity> eq = new LambdaQueryWrapper<>(ContractEntity.class) LambdaQueryWrapper<ContractEntity> eq = new LambdaQueryWrapper<>(ContractEntity.class)
.eq(ContractEntity::getId, request.getId()); .eq(ContractEntity::getId, request.getId());
ContractEntity contract = this.getOne(eq); ContractEntity contract = this.getOne(eq);
if (!"10".equals(contract.getContractStatus()) || !"21".equals(contract.getContractStatus())) { if ("10".equals(contract.getContractStatus()) || "21".equals(contract.getContractStatus())) {
return "该合同处于已确认状态,不允许再次确认"; //todo 查询空间判断 如果空间状态存在不是待租状态 就提示
}
//todo 查询空间判断
//todo 需要处理别的逻辑
contract.setContractStatus(request.getContractStatus()); contract.setContractStatus(request.getContractStatus());
contract.setApproveDate(DateUtil.getNowDate()); contract.setApproveDate(DateUtil.getNowDate());
contract.setApprovedBy(userProvider.get().getUserId()); contract.setApprovedBy(userProvider.get().getUserId());
contract.setApproveRemarks(StringUtils.isNoneBlank(request.getApproveRemarks()) ? request.getApproveRemarks() : "同意"); String remarks;
if (StringUtils.isBlank(request.getApproveRemarks()) && "20".equals(contract.getContractStatus())) {
remarks = "同意";
} else if (StringUtils.isBlank(request.getApproveRemarks()) && "10".equals(contract.getContractStatus())) {
remarks = "驳回";
} else {
remarks = request.getApproveRemarks();
}
contract.setApproveRemarks(remarks);
boolean result = this.updateById(contract);
if (result) {
//todo 需要处理空间逻辑
//异步处理商户信息
CompletableFuture.runAsync(() -> enterpriseMerchantsService.updateStatus(request.getContractStatus(), contract.getContractName(), contract.getParkId()));
}
return "合同确认成功"; return "合同确认成功";
} }
return "该合同处于已确认状态,不允许再次确认";
}
@Override @Override
public String finish(ContractRequest request) { public String finish(ContractRequest request) {
@ -562,11 +584,18 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
ContractEntity contract = this.getOne(eq); ContractEntity contract = this.getOne(eq);
if (!"20".equals(contract.getContractStatus())) { if (!"20".equals(contract.getContractStatus())) {
return "该合同没有确认,不允许结束!"; return "该合同没有确认,不允许结束!";
} else if ("30".equals(contract.getContractStatus())) {
return "该合同已结案!";
} }
//todo 需要处理别的逻辑
contract.setContractStatus(request.getContractStatus()); contract.setContractStatus(request.getContractStatus());
contract.setRemarks(StringUtils.isNoneBlank(request.getApproveRemarks()) ? request.getApproveRemarks() : "同意"); contract.setRemarks(StringUtils.isNoneBlank(request.getApproveRemarks()) ? request.getApproveRemarks() : "同意");
this.updateById(contract); boolean result = this.updateById(contract);
if (result) {
//todo 需要处理空间逻辑
//异步处理商户信息
CompletableFuture.runAsync(() -> enterpriseMerchantsService.updateStatus(request.getContractStatus(), contract.getContractName(), null));
}
return "合同结束成功"; return "合同结束成功";
} }
} }

@ -5,19 +5,28 @@ import jnpf.mapper.EnterpriseMerchantsMapper;
import jnpf.service.*; import jnpf.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.model.enterprisemerchants.*; import jnpf.model.enterprisemerchants.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import jnpf.permission.model.authorize.AuthorizeConditionModel; import jnpf.permission.model.authorize.AuthorizeConditionModel;
import jnpf.util.GeneraterSwapUtil; import jnpf.util.GeneraterSwapUtil;
import jnpf.database.model.superQuery.SuperQueryJsonModel; import jnpf.database.model.superQuery.SuperQueryJsonModel;
import jnpf.database.model.superQuery.ConditionJsonModel; import jnpf.database.model.superQuery.ConditionJsonModel;
import jnpf.database.model.superQuery.SuperQueryConditionModel; import jnpf.database.model.superQuery.SuperQueryConditionModel;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import jnpf.model.QueryModel; import jnpf.model.QueryModel;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import jnpf.base.model.ColumnDataModel; import jnpf.base.model.ColumnDataModel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import jnpf.database.model.superQuery.SuperJsonModel; import jnpf.database.model.superQuery.SuperJsonModel;
@ -25,13 +34,17 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import jnpf.util.*; import jnpf.util.*;
import java.util.*; import java.util.*;
import jnpf.base.UserInfo; import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity; import jnpf.permission.entity.UserEntity;
/** /**
*
* EnterpriseMerchants * EnterpriseMerchants
* V3.5 * V3.5
* https://www.jnpfsoft.com * https://www.jnpfsoft.com
@ -39,6 +52,7 @@ import jnpf.permission.entity.UserEntity;
* 2024-07-15 * 2024-07-15
*/ */
@Service @Service
@Slf4j
public class EnterpriseMerchantsServiceImpl extends ServiceImpl<EnterpriseMerchantsMapper, EnterpriseMerchantsEntity> implements EnterpriseMerchantsService { public class EnterpriseMerchantsServiceImpl extends ServiceImpl<EnterpriseMerchantsMapper, EnterpriseMerchantsEntity> implements EnterpriseMerchantsService {
@Autowired @Autowired
private GeneraterSwapUtil generaterSwapUtil; private GeneraterSwapUtil generaterSwapUtil;
@ -50,7 +64,10 @@ public class EnterpriseMerchantsServiceImpl extends ServiceImpl<EnterpriseMercha
public List<EnterpriseMerchantsEntity> getList(EnterpriseMerchantsPagination enterpriseMerchantsPagination) { public List<EnterpriseMerchantsEntity> getList(EnterpriseMerchantsPagination enterpriseMerchantsPagination) {
return getTypeList(enterpriseMerchantsPagination, enterpriseMerchantsPagination.getDataType()); return getTypeList(enterpriseMerchantsPagination, enterpriseMerchantsPagination.getDataType());
} }
/** 列表查询 */
/**
*
*/
@Override @Override
public List<EnterpriseMerchantsEntity> getTypeList(EnterpriseMerchantsPagination enterpriseMerchantsPagination, String dataType) { public List<EnterpriseMerchantsEntity> getTypeList(EnterpriseMerchantsPagination enterpriseMerchantsPagination, String dataType) {
String userId = userProvider.get().getUserId(); String userId = userProvider.get().getUserId();
@ -279,27 +296,34 @@ public class EnterpriseMerchantsServiceImpl extends ServiceImpl<EnterpriseMercha
return this.list(enterpriseMerchantsQueryWrapper); return this.list(enterpriseMerchantsQueryWrapper);
} }
} }
@Override @Override
public EnterpriseMerchantsEntity getInfo(String id) { public EnterpriseMerchantsEntity getInfo(String id) {
QueryWrapper<EnterpriseMerchantsEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<EnterpriseMerchantsEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(EnterpriseMerchantsEntity::getId, id); queryWrapper.lambda().eq(EnterpriseMerchantsEntity::getId, id);
return this.getOne(queryWrapper); return this.getOne(queryWrapper);
} }
@Override @Override
public void create(EnterpriseMerchantsEntity entity) { public void create(EnterpriseMerchantsEntity entity) {
this.save(entity); this.save(entity);
} }
@Override @Override
public boolean update(String id, EnterpriseMerchantsEntity entity) { public boolean update(String id, EnterpriseMerchantsEntity entity) {
return this.updateById(entity); return this.updateById(entity);
} }
@Override @Override
public void delete(EnterpriseMerchantsEntity entity) { public void delete(EnterpriseMerchantsEntity entity) {
if (entity != null) { if (entity != null) {
this.removeById(entity.getId()); this.removeById(entity.getId());
} }
} }
/** 验证表单唯一字段,正则,非空 i-0新增-1修改*/
/**
* i-0-1
*/
@Override @Override
public String checkForm(EnterpriseMerchantsForm form, int i) { public String checkForm(EnterpriseMerchantsForm form, int i) {
boolean isUp = StringUtil.isNotEmpty(form.getId()) && !form.getId().equals("0"); boolean isUp = StringUtil.isNotEmpty(form.getId()) && !form.getId().equals("0");
@ -362,8 +386,10 @@ public class EnterpriseMerchantsServiceImpl extends ServiceImpl<EnterpriseMercha
} }
return countRecover; return countRecover;
} }
/** /**
* () * ()
*
* @param id * @param id
* @param enterpriseMerchantsForm * @param enterpriseMerchantsForm
* @return * @return
@ -386,4 +412,21 @@ public class EnterpriseMerchantsServiceImpl extends ServiceImpl<EnterpriseMercha
this.saveOrUpdate(entity); this.saveOrUpdate(entity);
} }
@Override
public void updateStatus(String contractStatus, String contractName, String parkId) {
log.info("合同状态变更及时更新商户状态,变更状态:{}商户id{}园区id{}", contractStatus, contractName, parkId);
EnterpriseMerchantsEntity entity = this.getById(contractName);
if (ObjectUtil.isNull(entity)) {
return;
}
//如果是合同确认 并且状态是同意的 驳回不更改状态
if ("20".equals(contractStatus)) {
entity.setEntryStatus("2");
} else if ("30".equals(contractStatus)) {
entity.setEntryStatus("1");
}
entity.setParkId(parkId);
this.updateById(entity);
}
} }

@ -0,0 +1,935 @@
<template>
<transition name="el-zoom-in-center">
<div class="JNPF-preview-main">
<div class="JNPF-common-page-header">
<el-page-header @back="goBack"/>变更合同
<div class="options">
<el-dropdown class="dropdown" placement="bottom">
<el-button style="width:70px">
<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<template v-if="dataForm.id">
<el-dropdown-item @click.native="prev" :disabled='prevDis'>
{{ '上一条' }}
</el-dropdown-item>
<el-dropdown-item @click.native="next" :disabled='nextDis'>
{{ '下一条' }}
</el-dropdown-item>
</template>
<el-dropdown-item type="primary" @click.native="dataFormSubmit(2)"
:loading="continueBtnLoading" :disabled='btnLoading'>
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"
:disabled='continueBtnLoading'>
</el-button>
<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" :rules="dataRule" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<!-- 具体表单 -->
<el-col :span="8">
<jnpf-form-tip-item label="合同编号" prop="contractNumber">
<JnpfInput v-model="dataForm.contractNumber" @change="changeData('contractNumber', -1)"
placeholder="自动生成" disabled :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="合同名称" prop="contractName">
<JnpfInput v-model="dataForm.contractName" @change="changeData('contractName', -1)"
placeholder="请输入合同名称" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="计价方式" prop="pricingMethod">
<JnpfSelect v-model="dataForm.pricingMethod" @change="changeData('pricingMethod', -1)"
placeholder="请选择计价方式" clearable :style='{ "width": "100%" }'
:options="pricingMethodOptions" :props="pricingMethodProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="签订日期" prop="signingDate">
<JnpfDatePicker v-model="dataForm.signingDate" disabled @change="changeData('signingDate', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择签订日期" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="园区名称" prop="parkId">
<JnpfSelect v-model="dataForm.parkId" @change="changeData('parkId', -1)"
placeholder="请选择园区" clearable :style='{ "width": "100%" }' :options="parkIdOptions"
:props="parkIdProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="商户名称" prop="merchantName">
<JnpfSelect v-model="dataForm.merchantName" disabled @change="changeData('merchantName', -1)"
placeholder="请选择" clearable :style='{ "width": "100%" }' filterable
:options="merchantNameOptions" :props="merchantNameProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="租金总价" prop="totalRentalPrice">
<JnpfInput v-model="dataForm.totalRentalPrice"
@change="changeData('totalRentalPrice', -1)" placeholder="请输入租金总价" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="押金总计" prop="totalDeposit">
<JnpfInput v-model="dataForm.totalDeposit" @change="changeData('totalDeposit', -1)"
placeholder="请输入押金总计" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="支付方式" prop="payDeposit">
<JnpfSelect v-model="dataForm.payDeposit" @change="changeData('payDeposit', -1)"
placeholder="请选择押金支付方式" clearable :style='{ "width": "100%" }'
:options="payDepositOptions" :props="payDepositProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="退还方式" prop="returnDeposit">
<JnpfSelect v-model="dataForm.returnDeposit" @change="changeData('returnDeposit', -1)"
placeholder="请选择押金退还方式" clearable :style='{ "width": "100%" }'
:options="returnDepositOptions" :props="returnDepositProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="开始时间" prop="startTime">
<JnpfDatePicker v-model="dataForm.startTime" @change="changeData('startTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择开始时间" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="结束时间" prop="endTime">
<JnpfDatePicker v-model="dataForm.endTime" @change="changeData('endTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择结束时间" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="租期" prop="leaseTerm">
<JnpfInput v-model="dataForm.leaseTerm" @change="changeData('leaseTerm', -1)"
placeholder="自动生成" disabled addonAfter="月" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="联系人" prop="contacts">
<JnpfInput v-model="dataForm.contacts" @change="changeData('contacts', -1)"
placeholder="请输入联系人" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="联系电话" prop="contactsPhone">
<JnpfInput v-model="dataForm.contactsPhone" @change="changeData('contactsPhone', -1)"
placeholder="请输入联系电话" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="合同状态" prop="contractStatus">
<JnpfSelect v-model="dataForm.contractStatus" @change="changeData('contractStatus', -1)"
placeholder="请选择" disabled clearable :style='{ "width": "100%" }'
:options="contractStatusOptions" :props="contractStatusProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="合同说明" prop="contractExplain">
<JnpfTextarea v-model="dataForm.contractExplain"
@change="changeData('contractExplain', -1)" placeholder="请输入合同说明"
:style='{ "width": "100%" }' true type="textarea"
:autosize='{ "minRows": 4, "maxRows": 4 }'>
</JnpfTextarea>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="合同附件" prop="contractEnclosure">
<JnpfUploadFile v-model="dataForm.contractEnclosure"
@change="changeData('contractEnclosure', -1)" :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.spacecontractList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="合同行号" tipLabel="后台自动生成" prop="contractLineNumber">
<template slot="header" v-if="false">
<span class="required-sign">*</span>合同行号
<span slot="label">
<el-tooltip placement="top" content='后台自动生成'>
<a class='el-icon-question tooltip-question'></a>
</el-tooltip>
</span>
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.contractLineNumber"
@change="changeData('spacecontract-contractLineNumber', scope.$index)"
placeholder="合同行号" disabled clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="空间名称" prop="spaceName">
<template slot="header" v-if="false">
<span class="required-sign">*</span>空间名称
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.spaceName"
@change="changeData('spacecontract-spaceName', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.spacecontractspaceName" placeholder="请选择"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='name' :field="'spaceName' + scope.$index"
interfaceId="582491427901014533" :pageSize="20"
:columnOptions="spacecontractspaceNamecolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="空间面积" prop="spaceArea">
<template slot="header" v-if="false">
<span class="required-sign">*</span>空间面积
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spaceArea"
@change="changeData('spacecontract-spaceArea', scope.$index)"
placeholder="请输入空间面积" disabled clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="租金总价" prop="totalRentalPrice">
<template slot="header" v-if="false">
<span class="required-sign">*</span>租金总价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.totalRentalPrice"
@change="changeData('spacecontract-totalRentalPrice', scope.$index)"
placeholder="请输入租金总价" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delspacecontractList(scope.$index)">删除</el-button>
</template>
</el-table-column> -->
</el-table>
<!-- <div class="table-actions" @click="addspacecontractList()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div> -->
</jnpf-form-tip-item>
</el-col>
<!-- 表单结束 -->
</template>
</el-form>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog"
@select="addForSelect" @close="selectDialogVisible = false" />
</el-row>
</div>
</transition>
</template>
<script>
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
import { thousandsFormat } from "@/components/Generator/utils/index"
export default {
components: {},
props: [],
data() {
return {
dataFormSubmitType: 0,
continueBtnLoading: false,
index: 0,
prevDis: false,
nextDis: false,
allList: [],
visible: false,
loading: false,
btnLoading: false,
formRef: 'formRef',
setting: {},
eventType: '',
userBoxVisible: false,
selectDialogVisible: false,
currTableConf: {},
dataValueAll: {},
addTableConf: {
spacecontractList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
},
//
ableAll: {
},
tableRows: {
spacecontractList: {
contractLineNumber: '',
contractLineNumberOptions: [],
spaceName: '',
spaceNameOptions: [],
spaceArea: '',
spaceAreaOptions: [],
totalRentalPrice: '',
totalRentalPriceOptions: [],
enabledmark: undefined
},
},
Vmodel: "",
currVmodel: "",
dataForm: {
contractNumber: undefined,
contractName: undefined,
pricingMethod: undefined,
signingDate: undefined,
parkId: undefined,
merchantName: undefined,
totalRentalPrice: undefined,
totalDeposit: undefined,
payDeposit: undefined,
returnDeposit: undefined,
startTime: undefined,
endTime: undefined,
leaseTerm: undefined,
contacts: undefined,
contactsPhone: undefined,
contractStatus: "10",
creationTime: undefined,
contractExplain: undefined,
contractEnclosure: [],
spacecontractList: [],
version: 0,
},
tableRequiredData: {},
dataRule:
{
contractName: [
{
required: true,
message: '请输入合同名称',
trigger: 'blur'
},
],
pricingMethod: [
{
required: true,
message: '请选择计价方式',
trigger: 'change'
},
],
signingDate: [
{
required: true,
message: '请选择签订日期',
trigger: 'change'
},
],
parkId: [
{
required: true,
message: '请选择园区',
trigger: 'change'
},
],
merchantName: [
{
required: true,
message: '请选择',
trigger: 'change'
},
],
totalRentalPrice: [
{
required: true,
message: '请输入租金总价',
trigger: 'blur'
},
{
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
message: '请输入正确的金额',
trigger: 'blur'
},
],
totalDeposit: [
{
required: true,
message: '请输入押金总计',
trigger: 'blur'
},
{
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
message: '请输入正确的金额',
trigger: 'blur'
},
],
payDeposit: [
{
required: true,
message: '请选择押金支付方式',
trigger: 'change'
},
],
returnDeposit: [
{
required: true,
message: '请选择押金退还方式',
trigger: 'change'
},
],
startTime: [
{
required: true,
message: '请选择',
trigger: 'change'
},
],
endTime: [
{
required: true,
message: '请选择',
trigger: 'change'
},
],
leaseTerm: [
{
required: true,
message: '自动生成',
trigger: 'blur'
},
],
contacts: [
{
required: true,
message: '请输入联系人',
trigger: 'blur'
},
],
contactsPhone: [
{
required: true,
message: '请输入联系电话',
trigger: 'blur'
},
],
contractStatus: [
{
required: true,
message: '请至少选择一个',
trigger: 'change'
},
],
contractEnclosure: [
{
required: true,
message: '请至少选择一个',
trigger: 'change'
},
],
},
pricingMethodOptions: [{ "fullName": "月付", "id": "1" }, { "fullName": "季付", "id": "2" }, { "fullName": "年付", "id": "3" }],
pricingMethodProps: { "label": "fullName", "value": "id" },
parkIdOptions: [],
parkIdProps: { "label": "park_name", "value": "park_number" },
merchantNameOptions: [],
merchantNameProps: { "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" },
spacecontractspaceNamecolumnOptions: [{ "label": "园区编码", "value": "code" }, { "label": "园区名称", "value": "name" },],
childIndex: -1,
isEdit: false,
interfaceRes: {
contractNumber: [],
contractName: [],
pricingMethod: [],
signingDate: [],
parkId: [],
merchantName: [],
totalRentalPrice: [],
totalDeposit: [],
payDeposit: [],
returnDeposit: [],
startTime: [],
endTime: [],
leaseTerm: [],
contacts: [],
contactsPhone: [],
contractStatus: [],
creationTime: [],
contractExplain: [],
contractEnclosure: [],
spacecontractcontractLineNumber: [],
spacecontractspaceName: [],
spacecontractspaceArea: [],
spacecontracttotalRentalPrice: [],
},
}
},
computed: {
...mapGetters(['userInfo'])
},
watch: {},
created() {
this.dataAll()
this.initDefaultData()
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
},
mounted() { },
methods: {
prev() {
this.index--
if (this.index === 0) {
this.prevDis = true
}
this.nextDis = false
for (let index = 0; index < this.allList.length; index++) {
const element = this.allList[index];
if (this.index == index) {
this.getInfo(element.id)
}
}
},
next() {
this.index++
if (this.index === this.allList.length - 1) {
this.nextDis = true
}
this.prevDis = false
for (let index = 0; index < this.allList.length; index++) {
const element = this.allList[index];
if (this.index == index) {
this.getInfo(element.id)
}
}
},
getInfo(id) {
request({
url: '/api/example/Contract/' + id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
});
},
goBack() {
this.visible = false
this.$emit('refreshDataList', true)
},
changeData(model, index) {
if (model == 'startTime' && this.dataForm.endTime != undefined) {
const date1 = new Date(this.dataForm.startTime);
const date2 = new Date(this.dataForm.endTime);
let yearsDiff = date2.getFullYear() - date1.getFullYear();
let monthsDiff = date2.getMonth() - date1.getMonth();
if (monthsDiff < 0) {
monthsDiff += 12;
yearsDiff--;
}
const daysDiff = date2.getDate() - date1.getDate();
if (daysDiff > 0) {
monthsDiff++;
}
this.dataForm.leaseTerm = yearsDiff * 12 + monthsDiff;
}
if (model == 'endTime' && this.dataForm.startTime != undefined) {
const date1 = new Date(this.dataForm.startTime);
const date2 = new Date(this.dataForm.endTime);
let yearsDiff = date2.getFullYear() - date1.getFullYear();
let monthsDiff = date2.getMonth() - date1.getMonth();
if (monthsDiff < 0) {
monthsDiff += 12;
yearsDiff--;
}
const daysDiff = date2.getDate() - date1.getDate();
if (daysDiff > 0) {
monthsDiff++;
}
this.dataForm.leaseTerm = yearsDiff * 12 + monthsDiff;
}
this.isEdit = false
this.childIndex = index
let modelAll = model.split("-");
let faceMode = "";
for (let i = 0; i < modelAll.length; i++) {
faceMode += modelAll[i];
}
for (let key in this.interfaceRes) {
if (key != faceMode) {
let faceReList = this.interfaceRes[key]
for (let i = 0; i < faceReList.length; i++) {
if (faceReList[i].relationField == model) {
let options = 'get' + key + 'Options';
if (this[options]) {
this[options]()
}
this.changeData(key, index)
}
}
}
}
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
for (let i = 0; i < this.dataForm[data].length; i++) {
if (index == -1) {
this.dataForm[data][i][model] = defaultValue
} else if (index == i) {
this.dataForm[data][i][model] = defaultValue
}
}
} else {
this.dataForm[data] = defaultValue
}
}
},
dataAll() {
this.getparkIdOptions();
this.getmerchantNameOptions();
},
spacecontractExist() {
let isOk = true;
for (let i = 0; i < this.dataForm.spacecontractList.length; i++) {
const e = this.dataForm.spacecontractList[i];
if (e.totalRentalPrice) {
var regPos = [{ "pattern": "/^([1-9][\\d]*|0)(\\.[\\d]+)?$/", "message": "请输入正确的金额" }]
for (let i = 0; i < regPos.length; i++) {
const element = regPos[i];
if (element.pattern && !eval(element.pattern).test(e.totalRentalPrice)) {
this.$message({
message: element.message,
type: 'error',
duration: 1000
});
isOk = false
break;
}
}
}
}
return isOk;
},
getparkIdOptions() {
const index = this.childIndex
let templateJsonList = JSON.parse(JSON.stringify(this.interfaceRes.parkId))
for (let i = 0; i < templateJsonList.length; i++) {
let json = templateJsonList[i];
if (json.relationField) {
let relationFieldAll = json.relationField.split("-");
let val = json.defaultValue;
if (relationFieldAll.length > 1 && index > -1) {
val = this.dataForm[relationFieldAll[0] + 'List'] && this.dataForm[relationFieldAll[0] + 'List'].length ? this.dataForm[relationFieldAll[0] + 'List'][index][relationFieldAll[1]] : ''
} else {
val = this.dataForm[relationFieldAll]
}
json.defaultValue = val
}
}
let template = {
paramList: templateJsonList
}
getDataInterfaceRes('582491427901014533', template).then(res => {
let data = res.data
this.parkIdOptions = data
this.changeDataFormData(1, 'parkId', 'parkId', index, '')
})
},
getmerchantNameOptions() {
const index = this.childIndex
let templateJsonList = JSON.parse(JSON.stringify(this.interfaceRes.merchantName))
for (let i = 0; i < templateJsonList.length; i++) {
let json = templateJsonList[i];
if (json.relationField) {
let relationFieldAll = json.relationField.split("-");
let val = json.defaultValue;
if (relationFieldAll.length > 1 && index > -1) {
val = this.dataForm[relationFieldAll[0] + 'List'] && this.dataForm[relationFieldAll[0] + 'List'].length ? this.dataForm[relationFieldAll[0] + 'List'][index][relationFieldAll[1]] : ''
} else {
val = this.dataForm[relationFieldAll]
}
json.defaultValue = val
}
}
let template = {
paramList: templateJsonList
}
getDataInterfaceRes('582842667524685829', template).then(res => {
let data = res.data
this.merchantNameOptions = data
this.changeDataFormData(1, 'merchantName', 'merchantName', index, '')
})
},
goBack() {
this.$emit('refresh')
},
clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
},
init(id, isDetail, allList) {
this.prevDis = false
this.nextDis = false
this.allList = allList || []
if (allList.length) {
this.index = this.allList.findIndex(item => item.id === id)
if (this.index == 0) {
this.prevDis = true
}
if (this.index == this.allList.length - 1) {
this.nextDis = true
}
} else {
this.prevDis = true
this.nextDis = true
}
this.dataForm.id = id || 0;
this.visible = true;
this.$nextTick(() => {
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/example/Contract/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
} else {
this.clearData()
this.initDefaultData()
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
initDefaultData() {
},
//
dataFormSubmit(type) {
this.dataFormSubmitType = type ? type : 0
this.$refs['formRef'].validate((valid) => {
if (valid) {
if (!this.spacecontractExist()) return
this.request()
}
})
},
request() {
let _data = this.dataList()
if (this.dataFormSubmitType == 2) {
this.continueBtnLoading = true
} else {
this.btnLoading = true
}
if (!this.dataForm.id) {
request({
url: '/api/example/Contract',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (this.dataFormSubmitType == 2) {
this.$nextTick(() => {
this.clearData()
this.initDefaultData()
})
this.continueBtnLoading = false
return
}
this.visible = false
this.btnLoading = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.btnLoading = false
this.continueBtnLoading = false
})
} else {
request({
url: '/api/example/Contract/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (this.dataFormSubmitType == 2) return this.continueBtnLoading = false
this.visible = false
this.btnLoading = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.btnLoading = false
this.continueBtnLoading = false
})
}
},
addspacecontractList() {
let item = {
contractLineNumber: undefined,
spaceName: '',
spaceArea: undefined,
totalRentalPrice: undefined,
}
this.getspacecontractList(item)
},
delspacecontractList(index) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.dataForm.spacecontractList.splice(index, 1);
}).catch(() => {
});
},
getspacecontractList(value) {
let item = { ...this.tableRows.spacecontractList, ...value }
this.dataForm.spacecontractList.push(item)
this.childIndex = this.dataForm.spacecontractList.length - 1
this.isEdit = true
this.isEdit = false
this.childIndex = -1
},
openSelectDialog(key) {
this.currTableConf = this.addTableConf[key]
this.currVmodel = key
this.selectDialogVisible = true
this.$nextTick(() => {
this.$refs.selectDialog.init()
})
},
addForSelect(data) {
for (let i = 0; i < data.length; i++) {
let t = data[i]
if (this['get' + this.currVmodel]) {
this['get' + this.currVmodel](t)
}
}
},
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
let timeDataValue = null;
let timeValue = Number(timeValueData)
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = new Date().getTime()
} else if (timeType == 4) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getBeforeData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
}
} else if (timeType == 5) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getLaterData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
}
}
}
return timeDataValue;
},
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
let timeDataValue = null
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue || '00:00:00'
if (timeDataValue.split(':').length == 3) {
timeDataValue = timeDataValue
} else {
timeDataValue = timeDataValue + ':00'
}
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = this.jnpf.toDate(new Date(), format)
} else if (timeType == 4) {
let previousDate = '';
previousDate = getBeforeTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
} else if (timeType == 5) {
let previousDate = '';
previousDate = getLaterTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
}
}
return timeDataValue;
},
dataList() {
var _data = this.dataForm;
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
this.isEdit = true
this.dataAll()
for (let i = 0; i < _dataAll.spacecontractList.length; i++) {
this.childIndex = i
}
this.childIndex = -1
},
},
}
</script>

@ -138,12 +138,13 @@
<el-button type="text" v-show="scope.row.contractStatus === ''" <el-button type="text" v-show="scope.row.contractStatus === ''"
@click="addOrUpdateHandle(scope.row)">编辑 @click="addOrUpdateHandle(scope.row)">编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button type="text" class="JNPF-table-delBtn"
@click="handleDel(scope.row.id, scope.row.contractStatus)">删除
</el-button> </el-button>
<el-button type="text" @click="goDetail(scope.row.id)"> <el-button type="text" @click="goDetail(scope.row.id)">
</el-button> </el-button>
<el-button type="text" v-show="scope.row.contractStatus === ''" <el-button type="text" v-show="scope.row.contractStatus === ''"
@click="addOrUpdateHandle(scope.row)">变更合同 @click="changeHandle(scope.row)">变更合同
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -154,10 +155,6 @@
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" /> <ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" /> <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" /> <ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" />
@ -167,6 +164,7 @@
:onRollback="rollback" /> :onRollback="rollback" />
<DialogEndComponent :showEndDialog.sync="showEndDialog" @update:showEndDialog="showEndDialog = $event" <DialogEndComponent :showEndDialog.sync="showEndDialog" @update:showEndDialog="showEndDialog = $event"
:onEndSubmit="handleEndSubmit" /> :onEndSubmit="handleEndSubmit" />
<Change v-if="changeVisible" ref="Change" @refresh="refresh" />
</div> </div>
</div> </div>
</template> </template>
@ -177,6 +175,7 @@ import request from '@/utils/request'
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './form' import JNPFForm from './form'
import Change from './change'
import Detail from './Detail' import Detail from './Detail'
import ExportBox from '@/components/ExportBox' import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail' import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
@ -196,6 +195,7 @@ export default {
DialogComponent, DialogComponent,
DialogEndComponent, DialogEndComponent,
JNPFForm, JNPFForm,
Change,
Detail, Detail,
ExportBox, ToFormDetail, SuperQuery ExportBox, ToFormDetail, SuperQuery
}, },
@ -245,6 +245,7 @@ export default {
sidx: "", sidx: "",
}, },
formVisible: false, formVisible: false,
changeVisible: false,
flowVisible: false, flowVisible: false,
flowListVisible: false, flowListVisible: false,
flowList: [], flowList: [],
@ -490,7 +491,11 @@ export default {
this.listLoading = false this.listLoading = false
}) })
}, },
handleDel(id) { handleDel(id, contractStatus) {
if (contractStatus != '待确认') {
this.$message.error('该合同状态不是待确认状态,不允许删除!');
return;
}
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
@ -533,6 +538,13 @@ export default {
this.$refs.JNPFForm.init(id, isDetail, this.list) this.$refs.JNPFForm.init(id, isDetail, this.list)
}) })
}, },
changeHandle(row, isDetail) {
let id = row ? row.id : ""
this.changeVisible = true
this.$nextTick(() => {
this.$refs.Change.init(id, isDetail, this.list)
})
},
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true
this.$nextTick(() => { this.$nextTick(() => {
@ -561,6 +573,7 @@ export default {
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false
this.changeVisible = false
if (isrRefresh) this.reset() if (isrRefresh) this.reset()
}, },
reset() { reset() {
@ -572,85 +585,73 @@ export default {
if (isrRefresh) this.reset() if (isrRefresh) this.reset()
}, },
handleSubmit(rows) { handleSubmit(rows) {
// if (this.selectedIds.length == 0) { if (this.selectedRowId == null || this.selectedRowId == undefined) {
// this.$message.error(""); this.$message.error("请选择要确认的合同!");
// return; return;
// } }
// if (rows.adjustComm == null || rows.adjustComm == "") { let _query = {
// this.$message.error(""); contractStatus: 20,
// return; id: this.selectedRowId,
// } approveRemarks: rows.approveRemarks
// let _query = { };
// adjustStatus: 1, request({
// ids: this.selectedIds, url: `/api/example/Contract/confirmation`,
// adjustComm: rows.adjustComm method: "post",
// }; data: _query
// request({ }).then(res => {
// url: `/api/scm/RecycleDeliveryOrder/auditBatch`, this.$message({
// method: "post", message: res.msg,
// data: _query type: "success",
// }).then(res => { duration: 1000
// this.$message({ });
// message: res.msg, this.initData();
// type: "success", });
// duration: 1000
// });
// this.initData();
// });
}, },
rollback(rows) { rollback(rows) {
// if (this.selectedIds.length == 0) { if (this.selectedRowId == null || this.selectedRowId == undefined) {
// this.$message.error(""); this.$message.error("请选择要确认的合同!");
// return; return;
// } }
// if (rows.adjustComm == null || rows.adjustComm == "") { let _query = {
// this.$message.error(""); contractStatus: 10,
// return; id: this.selectedRowId,
// } approveRemarks: rows.approveRemarks
// let _query = { };
// adjustStatus: 1, request({
// ids: this.selectedIds, url: `/api/example/Contract/confirmation`,
// adjustComm: rows.adjustComm method: "post",
// }; data: _query
// request({ }).then(res => {
// url: `/api/scm/RecycleDeliveryOrder/auditBatch`, this.$message({
// method: "post", message: res.msg,
// data: _query type: "success",
// }).then(res => { duration: 1000
// this.$message({ });
// message: res.msg, this.initData();
// type: "success", });
// duration: 1000
// });
// this.initData();
// });
}, },
handleEndSubmit(rows) { handleEndSubmit(rows) {
// if (this.selectedIds.length == 0) { if (this.selectedRowId == null || this.selectedRowId == undefined) {
// this.$message.error(""); this.$message.error("请选择要结束的合同!");
// return; return;
// } }
// if (rows.adjustComm == null || rows.adjustComm == "") { let _query = {
// this.$message.error(""); contractStatus: 30,
// return; id: this.selectedRowId,
// } approveRemarks: rows.approveRemarks
// let _query = { };
// adjustStatus: 1, request({
// ids: this.selectedIds, url: `/api/example/Contract/finish`,
// adjustComm: rows.adjustComm method: "post",
// }; data: _query
// request({ }).then(res => {
// url: `/api/scm/RecycleDeliveryOrder/auditBatch`, this.$message({
// method: "post", message: res.msg,
// data: _query type: "success",
// }).then(res => { duration: 1000
// this.$message({ });
// message: res.msg, this.initData();
// type: "success", });
// duration: 1000
// });
// this.initData();
// });
} }
} }
} }

Loading…
Cancel
Save