Commit 965c99e0 authored by huangjie's avatar huangjie

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys...

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys into V20231129-中建一局二公司
parents e2b5a0ca 5738efe0
...@@ -184,6 +184,7 @@ tenant: ...@@ -184,6 +184,7 @@ tenant:
- d_customer_safety_certificate - d_customer_safety_certificate
- d_customer_tax_certificate - d_customer_tax_certificate
- f_supplier_limited - f_supplier_limited
- f_ads_bsi_kpi_proj_two
# MyBatisPlus配置 # MyBatisPlus配置
# https://baomidou.com/config/ # https://baomidou.com/config/
......
package com.dsk.cscec.domain;
import lombok.Data;
import java.util.Date;
import java.io.Serializable;
/**
* (FAdsBsiKpiProjTwo)实体类
*
* @author sxk
* @since 2024-01-12 13:41:23
*/
@Data
public class FAdsBsiKpiProjTwo implements Serializable {
private static final long serialVersionUID = -95800372397949291L;
/**
* 组织机构id
*/
private String orgId;
/**
* 项目id
*/
private String projectId;
/**
* 归属月份
*/
private String monthCode;
/**
* 流程状态
*/
private String flowState;
/**
* 商务状态
*/
private String businessState;
/**
* 项目状态
*/
private String projectState;
/**
* 业主结算状态
*/
private String ownerbalanceState;
/**
* 分包结算状态
*/
private String subbalanceState;
/**
* 财务清算状态
*/
private String financeState;
/**
* 合同签订月份
*/
private String contractSignMonth;
/**
* 合同金额
*/
private Double contractValue;
/**
* 合同自施金额
*/
private Double contractSelfValue;
private Double contractExecuteValue;
private Double sideContractValue;
private Double claimContractValue;
/**
* 商务自施额
*/
private Double businessSelfValue;
/**
* 预收益额
*/
private Double estimatedEarning;
/**
* 预收益率
*/
private Double estimatedEarningRate;
/**
* 实际收益额
*/
private Double actualEarning;
private Double actualEarningRateSelf;
/**
* 实际收益率
*/
private Double actualEarningRate;
private Double monthImagerevenue;
private Double monthImagerevenueExcl;
/**
* 年收入
*/
private Double yearRevenue;
private Double yearRevenueExcl;
private Double ttlImagerevenue;
private Double ttlImagerevenueExcl;
/**
* 月自施收入
*/
private Double monthSelfRevenue;
private Double monthSelfRevenueExcl;
/**
* 年自施收入
*/
private Double yearSelfRevenue;
private Double yearSelfRevenueExcl;
private Double ttlSelfRevenue;
private Double ttlSelfRevenueExcl;
/**
* 业主批量(含税)本月值
*/
private Double monthOwnerconfirm;
private Double monthOwnerconfirmExcl;
/**
* 业主批量(含税)本年值
*/
private Double yearOwnerconfirm;
private Double yearOwnerconfirmExcl;
/**
* 业主批量(含税)累计值
*/
private Double ttlOwnerconfirm;
private Double ttlOwnerConfirmExcl;
/**
* 工程施工成本本月值
*/
private Double monthCost;
private Double monthCostExcl;
/**
* 工程施工成本本年值
*/
private Double yearCost;
private Double yearCostExcl;
/**
* 工程施工成本累计值
*/
private Double ttlCost;
private Double ttlCostExcl;
/**
* 月度总收款
*/
private Double monthIncome;
/**
* 年度总收款
*/
private Double yearIncome;
/**
* 累计总收款
*/
private Double ttlIncome;
/**
* 预收账款余额本月值
*/
private Double monthPreIncome;
/**
* 预收账款余额本年值
*/
private Double yearPreIncome;
/**
* 预收账款余额累计值
*/
private Double ttlPreIncome;
/**
* 预收抵扣余额本月值
*/
private Double monthPrepayIncome;
/**
* 预收抵扣余额本年值
*/
private Double yearPrepayIncome;
/**
* 预收抵扣余额累计值
*/
private Double ttlPrepayIncome;
private Double monthPresettle;
private Double monthPresettleExcl;
private Double yearPresettle;
private Double yearPresettleExcl;
private Double ttlPresettle;
private Double ttlPresettleExcl;
private Double monthPay;
private Double yearPaid;
private Double ttlPay;
private Double ttlUnpaidScontractor;
private Double ttlUnpaidSupplier;
private Double ttlUnpaid;
private Double ttlUnpaidScontractor2;
private Double ttlUnpaidSupplier2;
private Double ttlUnpaid2;
private Double monthPayableScontractor;
private Double monthPayableScontractorExcl;
private Double yearPayableScontractor;
private Double yearPayableScontractorExcl;
private Double ttlPayableScontractor;
private Double ttlPayableScontractorExcl;
private Double monthPayableSupplier;
private Double monthPayableSupplierExcl;
private Double yearPayableSupplier;
private Double yearPayableSupplierExcl;
private Double ttlPayableSupplier;
private Double ttlPayableSupplierExcl;
private Double monthContractReceivable;
private Double ttlContractReceivable;
/**
* 应收账款余额
*/
private Double receivableValue;
/**
* 有收款权的应收账款
*/
private Double hasrightReceivable;
private Double hasrightOverdue;
/**
* 无收款权的应收账款
*/
private Double norightReceivable;
private Double norightGuarateeValue;
private Double norightReceivableOther;
private Double receivableInventory;
private Double unbalancedValue;
private Double unbalancedValueExcl;
private Double inventoryValue;
private Double inventoryValueExcl;
private Double ttlStock;
private Double projectSettleValue;
private Double projectSettleSelfValue;
private Double projectContractValue;
private Double projectContractSelfValue;
private Double settleEarning;
private Double settleEarningSelf;
private Double projectInchargeCost;
private Double projectInchargeCostSelf;
private Double manageEarning;
private Double manageEarningSelf;
private Double projectPlanCost;
private Double projectPlanCostExcl;
private Double operateEarning;
private Double operateEarningSelf;
private Double projectRealCost;
private Double projectRealCostExcl;
private Double subcontractFee;
private Double subcontractFeeExcl;
private Double laborFee;
private Double laborFeeExcl;
private Double materialFee;
private Double materialFeeExcl;
private Double machineFee;
private Double machineFeeExcl;
private Double tmpdeviceFee;
private Double tmpdeviceFeeExcl;
private Double indirectFee;
private Double indirectFeeExcl;
private Double otherFee;
private Double otherFeeExcl;
/**
* 项目人数
*/
private Double personnumProject;
private Double monthOutput;
private Double yearOutput;
private Double ttlOutput;
private Double monthApprovalSelfExcl;
private Double monthApprovalSelf;
private Double yearApprovalSelfExcl;
private Double yearApprovalSelf;
private Double ttlApprovalSelfExcl;
private Double ttlApprovalSelf;
private Double monthCostSelfExcl;
private Double monthCostSelf;
private Double yearCostSelfExcl;
private Double yearCostSelf;
private Double ttlCostSelfExcl;
private Double ttlCostSelf;
private Double costPlanSelfExcl;
private Double costPlanSelf;
private String issumcost;
private String issumcostmonth;
private Double monthApplyValue;
private Double ttlApplyValue;
private Double monthCrPre;
private Double monthCrPrepay;
private Double monthCrStep;
private Double monthCrSettle;
private Double monthCrRepair;
private Double ttlCrPre;
private Double ttlCrPrepay;
private Double ttlCrStep;
private Double ttlCrSettle;
private Double ttlCrRepair;
private Double monthStepIncome;
private Double monthSettleIncome;
private Double monthRepairIncome;
private Double ttlStepIncome;
private Double ttlSettleIncome;
private Double ttlRepairIncome;
/**
* 数据加载时间
*/
private Date loadTime;
}
...@@ -2,22 +2,19 @@ package com.dsk.cscec.domain.vo; ...@@ -2,22 +2,19 @@ package com.dsk.cscec.domain.vo;
import com.dsk.cscec.domain.AdvisoryBody; import com.dsk.cscec.domain.AdvisoryBody;
import com.dsk.cscec.domain.AdvisoryBodyProject; import com.dsk.cscec.domain.AdvisoryBodyProject;
import com.dsk.cscec.domain.DProject;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor; import java.math.BigDecimal;
import java.util.Date;
/** /**
* @author sxk * @author sxk
* @date 2023.12.14 * @date 2023.12.14
* @time 16:18 * @time 16:18
*/ */
@EqualsAndHashCode(callSuper = true)
@Data @Data
@AllArgsConstructor public class ProjectDetailVo {
@NoArgsConstructor //咨询机构结算信息
public class ProjectDetailVo extends DProject {
/** /**
* 咨询机构 * 咨询机构
*/ */
...@@ -34,4 +31,151 @@ public class ProjectDetailVo extends DProject { ...@@ -34,4 +31,151 @@ public class ProjectDetailVo extends DProject {
* 项目信息 * 项目信息
*/ */
private AdvisoryBodyProject advisoryBodyProject; private AdvisoryBodyProject advisoryBodyProject;
//工程基本信息-项目主体
/**
* 业主名称(业主单位)
*/
private String ownerName;
/**
* 承包单位主键(工程承包单位)
*/
private String contractOrgName;
//履约责任单位
//咨询单位
//工程基本信息-工程概况
/**
* 项目经理名称(项目经理)
*/
private String projectManagerName;
//国内外
/**
* 省份名称(省市)
*/
private String provinceName;
/**
* 业主性质(投资来源)
*/
private String ownerNature;
/**
* 是否投资项目(项目承接类型)
*/
private String isinvestproject;
/**
* 合同生效(盖章)日期(合同签订日期)
*/
private Date contractSignDate;
/**
* 合同总工期
*/
private String contractWorkDays;
//开工日期方式
///**
// * 实际开工日期(开工具体时间)备选
// */
//private Date actualStartDate;
/**
* 计划开工日期(开工具体时间)
*/
private Date planStartDate;
//竣工日期方式
///**
// * 实际完工时间(竣工具体时间)备选
// */
//private Date actualEndDate;
/**
* 计划竣工日期
*/
private Date planEndDate;
/**
* 工程类型上级名称(工程类型大类)
*/
private String projectType1;
/**
* 工程类型名称(工程类别明细)
*/
private String projectType2;
/**
* 建筑高度(M)
*/
private String constructHeight;
/**
* 建筑面积
*/
private Double buildingArea;
/**
* 地上层数
*/
private String noOfOverfloor;
/**
* 地下层数
*/
private String noOfUnderfloor;
//目标责任书
/**
* 预收益率
*/
private BigDecimal estimatedEarningRate;
/**
* 预收益额
*/
private BigDecimal estimatedEarning;
//条款内容
/**
* 承包主合同金额(合同金额)
*/
private Double contractOrigValue;
/**
* 承包主合同自施金额(自施部分)
*/
private Double contractOrigSelfvalue;
//计价依据
//预收益率
//业主批量申报日期
//批量时限
//付款时限
//工程预付款
//工程预付款
//支付比例
//工程款项
/**
* 进度款支付方式(支付方式)
*/
private String steppayType;
/**
* 进度款支付比例(按节点支付比例)
*/
private Double steppayScale;
//按月度支付比例
//审核期限
//支付期限
//竣工累计支付
//工程结算后累计支付
//保修金预留比例
//施工完成量业主/建立审核周期是否大于一个月
//履约担保
//担保形式
//担保额度
//竣工结算
//竣工结算审核期限-月
//是否承诺放弃工程价款优先受尝权
//是否以行为事实放弃工程价款优先受偿权
//工期拖期违约金比例
//工期拖期违约金上线
//有/无
//上限比例
//其他信息
//是否分别签订执行和备案合同
//承包单位
//评审级别
//创建日朗
} }
package com.dsk.cscec.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.cscec.domain.FAdsBsiKpiProjTwo;
/**
* (FAdsBsiKpiProjTwo)表数据库访问层
*
* @author sxk
* @since 2024-01-12 13:41:19
*/
public interface FAdsBsiKpiProjTwoMapper extends BaseMapper<FAdsBsiKpiProjTwo> {
}
package com.dsk.cscec.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsk.cscec.domain.FAdsBsiKpiProjTwo;
/**
* (FAdsBsiKpiProjTwo)表服务接口
*
* @author sxk
* @since 2024-01-12 13:41:25
*/
public interface FAdsBsiKpiProjTwoService extends IService<FAdsBsiKpiProjTwo> {
}
package com.dsk.cscec.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.cscec.domain.FAdsBsiKpiProjTwo;
import com.dsk.cscec.mapper.FAdsBsiKpiProjTwoMapper;
import com.dsk.cscec.service.FAdsBsiKpiProjTwoService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* (FAdsBsiKpiProjTwo)表服务实现类
*
* @author sxk
* @since 2024-01-12 13:41:25
*/
@Service("fAdsBsiKpiProjTwoService")
public class FAdsBsiKpiProjTwoServiceImpl extends ServiceImpl<FAdsBsiKpiProjTwoMapper, FAdsBsiKpiProjTwo> implements FAdsBsiKpiProjTwoService {
@Resource
private FAdsBsiKpiProjTwoMapper baseMapper;
}
...@@ -4,7 +4,6 @@ import cn.hutool.core.bean.BeanUtil; ...@@ -4,7 +4,6 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUnit; import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...@@ -79,24 +78,6 @@ public class IDProjectServiceImpl extends ServiceImpl<DProjectMapper, DProject> ...@@ -79,24 +78,6 @@ public class IDProjectServiceImpl extends ServiceImpl<DProjectMapper, DProject>
projectKeys = projectKeys1; projectKeys = projectKeys1;
} }
Page<ProjectSearchVo> page = baseMapper.selectPageProjectList(pageQuery.build(), this.buildProjectQueryWrapper(projectSearchBo, projectKeys));
for (ProjectSearchVo projectSearchVo : page.getRecords()) {
//补充咨询机构信息
projectSearchVo.setAdvisoryBody(this.getAdvisoryBodyByProjectKey(projectSearchVo.getProjectKey()));
//补充项目与咨询机构关联信息
projectSearchVo.setAdvisoryBodyProject(advisoryBodyProjectMapper.selectById(projectSearchVo.getProjectKey()));
//关键字标红
if (StringUtils.isNotBlank(projectSearchBo.getProjectName())) {
projectSearchVo.setProjectName(StringUtils.markInRed(projectSearchVo.getProjectName(), projectSearchBo.getProjectName()));
}
}
return TableDataInfo.build(page);
}
private Wrapper<DProject> buildProjectQueryWrapper(ProjectSearchBo projectSearchBo, List<Long> projectKeys) {
QueryWrapper<DProject> wrapper = Wrappers.query(); QueryWrapper<DProject> wrapper = Wrappers.query();
//咨询机构的项目数据取中建一局集团第二建筑有限公司和他的下级组织 //咨询机构的项目数据取中建一局集团第二建筑有限公司和他的下级组织
wrapper wrapper
...@@ -127,7 +108,21 @@ public class IDProjectServiceImpl extends ServiceImpl<DProjectMapper, DProject> ...@@ -127,7 +108,21 @@ public class IDProjectServiceImpl extends ServiceImpl<DProjectMapper, DProject>
projectSearchBo.getMinContractAmount(), projectSearchBo.getMinContractAmount(),
projectSearchBo.getMaxContractAmount()) projectSearchBo.getMaxContractAmount())
.orderByDesc("p.contract_sign_date"); .orderByDesc("p.contract_sign_date");
return wrapper; Page<ProjectSearchVo> page = baseMapper.selectPageProjectList(pageQuery.build(), wrapper);
for (ProjectSearchVo projectSearchVo : page.getRecords()) {
//补充咨询机构信息
projectSearchVo.setAdvisoryBody(this.getAdvisoryBodyByProjectKey(projectSearchVo.getProjectKey()));
//补充项目与咨询机构关联信息
projectSearchVo.setAdvisoryBodyProject(advisoryBodyProjectMapper.selectById(projectSearchVo.getProjectKey()));
//关键字标红
if (StringUtils.isNotBlank(projectSearchBo.getProjectName())) {
projectSearchVo.setProjectName(StringUtils.markInRed(projectSearchVo.getProjectName(), projectSearchBo.getProjectName()));
}
}
return TableDataInfo.build(page);
} }
/** /**
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsk.cscec.mapper.FAdsBsiKpiProjTwoMapper">
</mapper>
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",
"devmac": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build:prod": "vue-cli-service build", "build:prod": "vue-cli-service build",
"build:test": "vue-cli-service build --mode test", "build:test": "vue-cli-service build --mode test",
"build:stage": "vue-cli-service build --mode staging", "build:stage": "vue-cli-service build --mode staging",
...@@ -29,6 +30,7 @@ ...@@ -29,6 +30,7 @@
"@form-create/element-ui": "^2.5.33", "@form-create/element-ui": "^2.5.33",
"@riophae/vue-treeselect": "0.4.0", "@riophae/vue-treeselect": "0.4.0",
"@vue/composition-api": "^1.7.2", "@vue/composition-api": "^1.7.2",
"async-validator": "^4.2.5",
"axios": "0.24.0", "axios": "0.24.0",
"clipboard": "2.0.8", "clipboard": "2.0.8",
"core-js": "^3.32.2", "core-js": "^3.32.2",
......
<template>
<div class="dsk-email-input-container">
<el-autocomplete :popper-class="popperClass" v-model="comEmailValue" :clearable="clearable" :fetch-suggestions="searchQuery"
:placeholder="placeholder" @select="handleSelect" @input="valueChange">
<template slot-scope="{ item }">
<slot :optionData="item">
<div class="email-type-option">
<div class="email-type-inner">
<div class="email-icon-box"></div>
<div class="email-content-box">{{item.value}}</div>
</div>
<div class="email-vfx-box"></div>
</div>
</slot>
</template>
</el-autocomplete>
</div>
</template>
<script>
const emailTypeList = [
{
value: "@qq.com",
emailIcon: "",
chineseName: "QQ邮箱"
},
{
value: "@163.com",
emailIcon: "",
chineseName: "网易邮箱"
},
{
value: "@126.com",
emailIcon: "",
chineseName: "网易邮箱"
},
{
value: "@yahoo.cn",
emailIcon: "",
chineseName: "雅虎邮箱"
},
{
value: "@sina.com",
emailIcon: "",
chineseName: "搜狐邮箱"
},
{
value: "@outlook.com",
emailIcon: "",
chineseName: "微软邮箱"
},
{
value: "@gmail.com",
emailIcon: "",
chineseName: "谷歌邮箱"
},
{
value: "@163.net",
emailIcon: "",
chineseName: "尊享邮"
}
];
export default {
name: "dskEmailInput",
props: {
emailValue: {
required: true,
type: String,
default: ""
},
placeholder: {
type: String,
default: ""
},
clearable: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
},
popperClass: {
type: String,
default: "dsk-email-options-popper"
}
},
model: {
prop: "emailValue",
event: "update:emailValue"
},
watch: {
emailValue: {
handler(newValue) {
this.comEmailValue = newValue;
},
immediate: true
}
},
data() {
return {
comEmailValue: this.emailValue,
};
},
//可访问data属性
created() {
},
//计算集
computed: {
},
//方法集
methods: {
handleSelect(item) {
this.$emit("select", item);
this.$emit("update:emailValue", item.value);
},
valueChange(value) {
this.$emit("update:emailValue", value);
},
searchQuery(keywords, callback) {
// 空值不联想
if (!keywords?.trim()) {
return callback([]);
}
// 存在字符
/**
* @type {string}
*/
let key = keywords;
const index = key.indexOf("@");
// 检索到@符号进行联想
if (index != -1) {
// 截取@符号前部分
key = key.slice(0, index);
// 只有一个@符号 没有其它值的情况
if (!key) return callback([]);
/**
* @type {Array<{
* value : string;
* emailIcon : string;
* chineseName : string;
* }>}
*/
const emailTyps = JSON.parse(JSON.stringify(emailTypeList));
const _temp = emailTyps.map(item => {
item.value = `${key}${item.value}`;
return item;
});
return callback(_temp);
}
return callback([]);
}
},
}
</script>
<style lang="scss" scoped>
.dsk-email-input-container {
height: 32px;
width: 100%;
position: relative;
::v-deep .el-autocomplete {
width: 100%;
}
}
</style>
<style lang="scss">
.dsk-email-options-popper {
.el-autocomplete-suggestion__wrap {
.el-autocomplete-suggestion__list {
& > [id*="el-autocomplete"] {
padding: 0px 0px;
line-height: 32px;
&:hover {
background: unset;
background-image: linear-gradient(
135deg,
rgba(0, 128, 255, 0.3),
#f5f7fa,
rgba(242, 242, 242, 0.473)
);
}
}
.email-type-option {
display: flex;
align-items: center;
width: 100%;
height: 32px;
padding: 0 16px;
box-sizing: border-box;
position: relative;
overflow: hidden;
.email-type-inner {
width: 100%;
height: 100%;
display: flex;
align-items: center;
position: relative;
z-index: 9;
}
&:hover {
.email-vfx-box {
width: 100%;
height: 32px;
}
}
.email-icon-box {
width: 24px;
height: 24px;
min-width: 24px;
}
.email-content-box {
width: calc(100% - 40px);
height: 100%;
display: flex;
align-items: center;
box-sizing: border-box;
margin-left: 16px;
color: rgba(35, 35, 35, 0.8);
}
}
}
}
}
</style>
...@@ -27,6 +27,13 @@ export default { ...@@ -27,6 +27,13 @@ export default {
default: () => [] default: () => []
} }
}, },
watch: {
currentValue: {
handler(newValue) {
this.initSlidingBar();
}
}
},
model: { model: {
prop: "currentValue", prop: "currentValue",
event: "currentTabChange" event: "currentTabChange"
......
...@@ -8,7 +8,7 @@ export const subfieldModuleTemplate = { ...@@ -8,7 +8,7 @@ export const subfieldModuleTemplate = {
defaultSubfieldModuleName: "", defaultSubfieldModuleName: "",
subfieldModuleName: "", subfieldModuleName: "",
subfieldModuleNameRules: { subfieldModuleNameRules: {
trigger: ["blur", "change"], trigger: ["blur"],
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (!value && !value?.toString()?.trim()) { if (!value && !value?.toString()?.trim()) {
return callback(new Error("请输入分栏名称")); return callback(new Error("请输入分栏名称"));
...@@ -34,6 +34,7 @@ export const defaultComOptions = [ ...@@ -34,6 +34,7 @@ export const defaultComOptions = [
formAttribute: { formAttribute: {
// 验证规则 // 验证规则
rules: {}, rules: {},
designRules: {},
// 是否必填 // 是否必填
required: false, required: false,
// 字段名称 // 字段名称
...@@ -41,7 +42,8 @@ export const defaultComOptions = [ ...@@ -41,7 +42,8 @@ export const defaultComOptions = [
// 展示label // 展示label
label: "单行文本", label: "单行文本",
// 组件宽度 // 组件宽度
width: 100 width: 100,
isError: false
}, },
// 组件属性 // 组件属性
componentAttribute: { componentAttribute: {
...@@ -63,6 +65,7 @@ export const defaultComOptions = [ ...@@ -63,6 +65,7 @@ export const defaultComOptions = [
formAttribute: { formAttribute: {
// 验证规则 // 验证规则
rules: {}, rules: {},
designRules: {},
// 是否必填 // 是否必填
required: false, required: false,
// 字段名称 // 字段名称
...@@ -70,7 +73,8 @@ export const defaultComOptions = [ ...@@ -70,7 +73,8 @@ export const defaultComOptions = [
// 展示label // 展示label
label: "多行文本", label: "多行文本",
// 组件宽度 // 组件宽度
width: 100 width: 100,
isError: false
}, },
// 组件属性 // 组件属性
componentAttribute: { componentAttribute: {
...@@ -96,6 +100,7 @@ export const defaultComOptions = [ ...@@ -96,6 +100,7 @@ export const defaultComOptions = [
message: "请输入选项值", message: "请输入选项值",
trigger: ["change", "blur"] trigger: ["change", "blur"]
}, },
designRules: {},
// 是否必填 // 是否必填
required: false, required: false,
// 字段名称 // 字段名称
...@@ -106,7 +111,8 @@ export const defaultComOptions = [ ...@@ -106,7 +111,8 @@ export const defaultComOptions = [
width: 100, width: 100,
selectOptions: [], selectOptions: [],
// 是否多选 // 是否多选
isMultiple: false isMultiple: false,
isError: false
}, },
// 组件属性 // 组件属性
componentAttribute: { componentAttribute: {
...@@ -128,6 +134,7 @@ export const defaultComOptions = [ ...@@ -128,6 +134,7 @@ export const defaultComOptions = [
formAttribute: { formAttribute: {
// 验证规则 // 验证规则
rules: {}, rules: {},
designRules: {},
// 是否必填 // 是否必填
required: false, required: false,
// 字段名称 // 字段名称
...@@ -135,7 +142,8 @@ export const defaultComOptions = [ ...@@ -135,7 +142,8 @@ export const defaultComOptions = [
// 展示label // 展示label
label: "日期/时间", label: "日期/时间",
// 组件宽度 // 组件宽度
width: 100 width: 100,
isError: false
}, },
// 组件属性 // 组件属性
componentAttribute: { componentAttribute: {
...@@ -157,7 +165,7 @@ export const defaultComOptions = [ ...@@ -157,7 +165,7 @@ export const defaultComOptions = [
formAttribute: { formAttribute: {
// 验证规则 // 验证规则
rules: { rules: {
trigger: ["blur", "change"], trigger: ["blur"],
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
const phoneReg = /^1[3-9]\d{9}$/; const phoneReg = /^1[3-9]\d{9}$/;
if (value && !phoneReg.test(value)) { if (value && !phoneReg.test(value)) {
...@@ -167,7 +175,7 @@ export const defaultComOptions = [ ...@@ -167,7 +175,7 @@ export const defaultComOptions = [
} }
}, },
requiredRules: { requiredRules: {
trigger: ["blur", "change"], trigger: ["blur"],
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
const phoneReg = /^1[3-9]\d{9}$/; const phoneReg = /^1[3-9]\d{9}$/;
if (!value && !value?.toString()?.trim()) { if (!value && !value?.toString()?.trim()) {
...@@ -179,6 +187,16 @@ export const defaultComOptions = [ ...@@ -179,6 +187,16 @@ export const defaultComOptions = [
return callback(); return callback();
} }
}, },
designRules: {
trigger: ["blur"],
validator: (rule, value, callback) => {
const phoneReg = /^1[3-9]\d{9}$/;
if (value && !phoneReg.test(value)) {
return callback(`请输入正确的联系电话`);
}
return callback();
}
},
// 是否必填 // 是否必填
required: false, required: false,
// 字段名称 // 字段名称
...@@ -186,7 +204,8 @@ export const defaultComOptions = [ ...@@ -186,7 +204,8 @@ export const defaultComOptions = [
// 展示label // 展示label
label: "电话", label: "电话",
// 组件宽度 // 组件宽度
width: 100 width: 100,
isError: false
}, },
// 组件属性 // 组件属性
componentAttribute: { componentAttribute: {
...@@ -208,16 +227,27 @@ export const defaultComOptions = [ ...@@ -208,16 +227,27 @@ export const defaultComOptions = [
formAttribute: { formAttribute: {
// 验证规则 // 验证规则
rules: { rules: {
trigger: ["blur", "change"], trigger: ["blur"],
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
console.log("value", value);
if (value && !validEmail(value)) { if (value && !validEmail(value)) {
return callback(new Error(`请输入正确的电子邮箱`)); return callback(new Error(`请输入正确的电子邮箱`));
} }
return callback(); return callback();
} }
}, },
designRules: {
trigger: ["blur"],
validator: (rule, value, callback) => {
console.log("value", value);
if (value && !validEmail(value)) {
return callback(`请输入正确的电子邮箱`);
}
return callback();
}
},
requiredRules: { requiredRules: {
trigger: ["blur", "change"], trigger: ["blur"],
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (!value && !value?.toString()?.trim()) { if (!value && !value?.toString()?.trim()) {
return callback(new Error(`请输入电子邮箱`)); return callback(new Error(`请输入电子邮箱`));
...@@ -235,7 +265,8 @@ export const defaultComOptions = [ ...@@ -235,7 +265,8 @@ export const defaultComOptions = [
// 展示label // 展示label
label: "电子邮箱", label: "电子邮箱",
// 组件宽度 // 组件宽度
width: 100 width: 100,
isError: false
}, },
// 组件属性 // 组件属性
componentAttribute: { componentAttribute: {
...@@ -266,7 +297,8 @@ export const defaultComOptions = [ ...@@ -266,7 +297,8 @@ export const defaultComOptions = [
width: 100, width: 100,
limit: -1, limit: -1,
astrict: false, astrict: false,
fileList: [] fileList: [],
isError: false
}, },
// 组件属性 // 组件属性
componentAttribute: { componentAttribute: {
...@@ -297,7 +329,8 @@ export const defaultComOptions = [ ...@@ -297,7 +329,8 @@ export const defaultComOptions = [
width: 100, width: 100,
limit: -1, limit: -1,
astrict: false, astrict: false,
fileList: [] fileList: [],
isError: false
}, },
// 组件属性 // 组件属性
componentAttribute: { componentAttribute: {
......
...@@ -132,6 +132,9 @@ export default { ...@@ -132,6 +132,9 @@ export default {
//可访问data属性 //可访问data属性
created() { created() {
this.initModule(); this.initModule();
},
beforeDestroy() {
}, },
//计算集 //计算集
computed: { computed: {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="subfield-item-container" :class="classCreate(comChildModuleInfo.comType)" :style="styles" @click="activeSubfieldItem"> <div class="subfield-item-container" :class="classCreate(comChildModuleInfo.comType)" :style="styles" @click="activeSubfieldItem">
<img src="@/assets/images/consultingAgencyManagement/customForm/icon_drag@2x.png" alt="" class="subfield-module-item-dragg-target-icon"> <img src="@/assets/images/consultingAgencyManagement/customForm/icon_drag@2x.png" alt="" class="subfield-module-item-dragg-target-icon">
<el-form-item class="subfield-module-form-item" :class="{'is-required': comChildModuleInfo.formAttribute.required}" <el-form-item class="subfield-module-form-item" :class="{'is-required': comChildModuleInfo.formAttribute.required}"
:label="comChildModuleInfo.formAttribute.label" :rules="comChildModuleInfo.formAttribute.rules" :prop="propValue"> :label="comChildModuleInfo.formAttribute.label" :prop="propValue">
<!-- 单行文本类型 --> <!-- 单行文本类型 -->
<el-input v-model="comChildModuleInfo.componentAttribute.value" :placeholder="comChildModuleInfo.componentAttribute.placeholder" clearable <el-input v-model="comChildModuleInfo.componentAttribute.value" :placeholder="comChildModuleInfo.componentAttribute.placeholder" clearable
v-if="comChildModuleInfo.comType == 'text'" :disabled="isDisabled"></el-input> v-if="comChildModuleInfo.comType == 'text'" :disabled="isDisabled"></el-input>
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
<el-input v-model="comChildModuleInfo.componentAttribute.value" :placeholder="comChildModuleInfo.componentAttribute.placeholder" clearable <el-input v-model="comChildModuleInfo.componentAttribute.value" :placeholder="comChildModuleInfo.componentAttribute.placeholder" clearable
v-if="comChildModuleInfo.comType == 'phone'" :disabled="isDisabled"></el-input> v-if="comChildModuleInfo.comType == 'phone'" :disabled="isDisabled"></el-input>
<!-- 电子邮箱类型 --> <!-- 电子邮箱类型 -->
<el-input v-model="comChildModuleInfo.componentAttribute.value" :placeholder="comChildModuleInfo.componentAttribute.placeholder" clearable <dsk-email-input v-model="comChildModuleInfo.componentAttribute.value" :placeholder="comChildModuleInfo.componentAttribute.placeholder"
v-if="comChildModuleInfo.comType == 'email'" :disabled="isDisabled"></el-input> :clearable="true" :disabled="isDisabled" v-if="comChildModuleInfo.comType == 'email'"></dsk-email-input>
<!-- 图片类型 --> <!-- 图片类型 -->
</el-form-item> </el-form-item>
...@@ -36,8 +36,13 @@ ...@@ -36,8 +36,13 @@
</template> </template>
<script> <script>
import { cloneDeep } from "lodash-es"; import { cloneDeep } from "lodash-es";
import Schema from "async-validator";
import DskEmailInput from "@/components/DskEmailInput";
export default { export default {
name: "subfieldItem", name: "subfieldItem",
components: {
DskEmailInput
},
props: { props: {
childModuleInfo: Object, childModuleInfo: Object,
parentUid: String, parentUid: String,
...@@ -57,6 +62,7 @@ export default { ...@@ -57,6 +62,7 @@ export default {
handler(newValue) { handler(newValue) {
console.log(this.comActiveUid !== this.comChildModuleInfo?.uid, "是否不是更改的当前元素"); console.log(this.comActiveUid !== this.comChildModuleInfo?.uid, "是否不是更改的当前元素");
if (this.comActiveUid !== this.comChildModuleInfo?.uid) return; if (this.comActiveUid !== this.comChildModuleInfo?.uid) return;
this.checkValidator(newValue);
this.$mitt.emit("subfieldItemChange", newValue); this.$mitt.emit("subfieldItemChange", newValue);
}, },
deep: true deep: true
...@@ -117,6 +123,20 @@ export default { ...@@ -117,6 +123,20 @@ export default {
}, },
//方法集 //方法集
methods: { methods: {
// 验证
async checkValidator(item) {
try {
const { formAttribute, componentAttribute } = item;
const validator = new Schema({
value: formAttribute.designRules
});
console.log(validator);
const flag = await validator.validate({ value: componentAttribute.value }, { first: true });
console.log(flag);
} catch (error) {
console.log(error);
}
},
// 根据命中的id 来添加发布订阅 // 根据命中的id 来添加发布订阅
addSubscription(newValue) { addSubscription(newValue) {
if (newValue === this.comChildModuleInfo.uid) return this.$mitt.on("fieldOptionChange", this.setFieldOption); if (newValue === this.comChildModuleInfo.uid) return this.$mitt.on("fieldOptionChange", this.setFieldOption);
...@@ -205,6 +225,10 @@ export default { ...@@ -205,6 +225,10 @@ export default {
.el-form-item__label { .el-form-item__label {
line-height: 22px; line-height: 22px;
} }
.el-form-item__content {
line-height: 32px;
height: unset;
}
.el-textarea { .el-textarea {
.el-textarea__inner { .el-textarea__inner {
resize: unset; resize: unset;
......
...@@ -150,6 +150,15 @@ export default { ...@@ -150,6 +150,15 @@ export default {
flex: 1; flex: 1;
.el-form-item__content { .el-form-item__content {
line-height: 32px; line-height: 32px;
height: 32px;
.el-input {
line-height: 32px;
height: 32px;
.el-input__suffix {
display: flex;
align-items: center;
}
}
} }
.el-input { .el-input {
......
...@@ -190,6 +190,7 @@ export default { ...@@ -190,6 +190,7 @@ export default {
}, },
tableKeyWidth: 0, tableKeyWidth: 0,
searchTimer: null, searchTimer: null,
loading: false
}; };
}, },
//可访问data属性 //可访问data属性
...@@ -241,15 +242,27 @@ export default { ...@@ -241,15 +242,27 @@ export default {
try { try {
if ((keywords || keywords == "0") && keywords?.toString()?.trim() && keywords?.toString()?.trim()?.length >= 1) { if ((keywords || keywords == "0") && keywords?.toString()?.trim() && keywords?.toString()?.trim()?.length >= 1) {
this.clearSearchTimer(); this.clearSearchTimer();
this.searchTimer = setTimeout(async () => { this.loading = true;
const result = await this.searchConsultingHandle(keywords.toString().trim()); this.$emit("searchLoadingChange", this.loading);
if (result) { await new Promise((resolve, reject) => {
this.updateTemplate(result); this.searchTimer = setTimeout(async () => {
} try {
}, 1000); const result = await this.searchConsultingHandle(keywords.toString().trim());
if (result) {
this.updateTemplate(result);
}
resolve();
} catch (error) {
reject(error);
}
}, 1000);
});
} }
} catch (error) { } catch (error) {
console.log(error);
} finally {
this.loading = false;
this.$emit("searchLoadingChange", this.loading);
} }
}, },
async searchConsultingHandle(keywords) { async searchConsultingHandle(keywords) {
...@@ -316,7 +329,7 @@ export default { ...@@ -316,7 +329,7 @@ export default {
if (result.advisoryBodyCid) { if (result.advisoryBodyCid) {
const _temp = JSON.parse(JSON.stringify(this.comProjectDetailInfo)); const _temp = JSON.parse(JSON.stringify(this.comProjectDetailInfo));
const paramsData = { const paramsData = {
isNewAdvisoryBody: _temp.isNewAdvisoryBody, isNewAdvisoryBody: _temp.isNewAdvisoryBody ? _temp.isNewAdvisoryBody : result.isNewAdvisoryBody,
projectKey: _temp.projectKey, projectKey: _temp.projectKey,
advisoryBodyCid: _temp.advisoryBody.advisoryBodyCid, advisoryBodyCid: _temp.advisoryBody.advisoryBodyCid,
advisoryBodyName: _temp.advisoryBody.advisoryBodyName ?? "", advisoryBodyName: _temp.advisoryBody.advisoryBodyName ?? "",
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<el-button type="primary" @click="editProjectDetail">编辑信息</el-button> <el-button type="primary" @click="editProjectDetail">编辑信息</el-button>
</div> </div>
<div class="save-project-detail-container" v-if="currentList === 'consultingAgency' && isModify" :key="'save-project'"> <div class="save-project-detail-container" v-if="currentList === 'consultingAgency' && isModify" :key="'save-project'">
<el-button type="primary" @click="saveProjectDetail">保存</el-button> <el-button type="primary" @click="saveProjectDetail" :disabled="loading">保存</el-button>
<el-button @click="cancelSave">取消</el-button> <el-button @click="cancelSave" :disabled="loading">取消</el-button>
</div> </div>
</transition> </transition>
</div> </div>
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
<basic-engineering-information v-if="currentList === 'project'" :projectDetailInfo="projectDetailInfo"></basic-engineering-information> <basic-engineering-information v-if="currentList === 'project'" :projectDetailInfo="projectDetailInfo"></basic-engineering-information>
<!-- 咨询机构结算信息 --> <!-- 咨询机构结算信息 -->
<consulting-agency v-if="currentList === 'consultingAgency'" :projectDetailInfo="projectDetailInfo" :isModify="isModify" <consulting-agency v-if="currentList === 'consultingAgency'" :projectDetailInfo="projectDetailInfo" :isModify="isModify"
ref="consultingAgency" @editComProjectDetailSuccess="editComProjectDetailSuccess"></consulting-agency> ref="consultingAgency" @editComProjectDetailSuccess="editComProjectDetailSuccess"
@searchLoadingChange="searchLoadingChange"></consulting-agency>
</div> </div>
</div> </div>
...@@ -77,7 +78,8 @@ export default { ...@@ -77,7 +78,8 @@ export default {
projectKey: "", projectKey: "",
advisoryBodyCid: "", advisoryBodyCid: "",
// 咨询机构结算信息 修改 // 咨询机构结算信息 修改
isModify: false isModify: false,
loading: false
}; };
}, },
//可访问data属性 //可访问data属性
...@@ -92,17 +94,21 @@ export default { ...@@ -92,17 +94,21 @@ export default {
methods: { methods: {
async init() { async init() {
try { try {
const advisoryBodyCid = this.$route.query?.advisoryBodyCid; this.advisoryBodyCid = this.$route.query?.advisoryBodyCid ? this.$route.query?.advisoryBodyCid : "";
const projectKey = this.$route.query?.projectKey; this.projectKey = this.$route.query?.projectKey ? this.$route.query?.projectKey : "";
const currentKey = this.$route.query?.currentKey;
// if (!advisoryBodyCid) return this.$message.error("缺少咨询机构ID"); // if (!advisoryBodyCid) return this.$message.error("缺少咨询机构ID");
if (!projectKey) return this.$message.error("缺少项目主键"); if (!this.projectKey) return this.$message.error("缺少项目主键");
const detail = await getConsultingOrgProjectDetailApi({ const detail = await getConsultingOrgProjectDetailApi({
advisoryBodyCid, advisoryBodyCid: this.advisoryBodyCid,
projectKey projectKey: this.projectKey
}); });
if (detail.code == 200 && detail.data) { if (detail.code == 200 && detail.data) {
this.projectDetailInfo = { ...this.projectDetailInfo, ...detail.data }; this.projectDetailInfo = { ...this.projectDetailInfo, ...detail.data };
} }
if (currentKey) {
this.currentList = currentKey;
}
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
...@@ -120,6 +126,14 @@ export default { ...@@ -120,6 +126,14 @@ export default {
if (result.code) { if (result.code) {
this.$message.success("更新咨询机构结算信息成功"); this.$message.success("更新咨询机构结算信息成功");
this.isModify = false; this.isModify = false;
this.$router.push({
path: `/redirect/${"consultingOrgManagement/projectDetail"}`,
query: {
projectKey: this.projectKey,
advisoryBodyCid: this.advisoryBodyCid ? this.advisoryBodyCid : data.advisoryBodyCid,
currentKey: "consultingAgency"
}
});
} }
} catch (error) { } catch (error) {
...@@ -129,6 +143,9 @@ export default { ...@@ -129,6 +143,9 @@ export default {
this.isModify = false; this.isModify = false;
this.$refs["consultingAgency"].cancelModify(); this.$refs["consultingAgency"].cancelModify();
}, },
searchLoadingChange(status) {
this.loading = status;
}
}, },
} }
</script> </script>
...@@ -229,6 +246,13 @@ export default { ...@@ -229,6 +246,13 @@ export default {
background-color: #0081ff; background-color: #0081ff;
border-color: #0081ff; border-color: #0081ff;
} }
&.is-disabled {
color: #c0c4cc;
background-image: none;
background-color: #ffffff;
border-color: #e6ebf5;
}
} }
} }
} }
......
...@@ -343,7 +343,7 @@ export default { ...@@ -343,7 +343,7 @@ export default {
// 跳转到企业详情 // 跳转到企业详情
viewEnterprise(row) { viewEnterprise(row) {
if (!row?.advisoryBody?.advisoryBodyCid) return this.$message.warning("缺少咨询机构id"); if (!row?.advisoryBody?.advisoryBodyCid) return this.$message.warning("缺少咨询机构id");
this.$tab.openPage(row.advisoryBody.advisoryBodyName ? row.advisoryBody.advisoryBodyName : "咨询机构详情", `/enterprise/${encodeStr(row.advisoryBody.advisoryBodyCid)}`); this.$tab.openPage(row.advisoryBody.advisoryBodyName ? row.advisoryBody.advisoryBodyName : "咨询机构详情", `/enterprise/${encodeStr(row.advisoryBody.advisoryBodyCid)}?companyName=${row.advisoryBody.advisoryBodyName}`);
} }
}, },
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment