亚健康合同
This commit is contained in:
parent
0479cfe4ae
commit
ffa2544215
BIN
running/pdf/contract_3.pdf
Normal file
BIN
running/pdf/contract_3.pdf
Normal file
Binary file not shown.
@ -1,6 +1,7 @@
|
||||
package com.stdiet.web.controller.custom;
|
||||
|
||||
import com.stdiet.common.annotation.Log;
|
||||
import com.stdiet.common.constant.ContractContants;
|
||||
import com.stdiet.common.core.controller.BaseController;
|
||||
import com.stdiet.common.core.domain.AjaxResult;
|
||||
import com.stdiet.common.core.page.TableDataInfo;
|
||||
@ -109,11 +110,22 @@ public class SysContractController extends BaseController {
|
||||
} else {
|
||||
Map<String, String> data = new HashMap<>();
|
||||
data.put("id", contract.getId().toString());
|
||||
data.put("projectId", contract.getProjectId().toString());
|
||||
data.put("projectName", contract.getProjectName());
|
||||
data.put("amount", contract.getAmount().toString());
|
||||
data.put("serveTime", contract.getServeTime() + "");
|
||||
data.put("tutor", contract.getTutor());
|
||||
data.put("servePromise", contract.getServePromise());
|
||||
data.put("remark", contract.getRemark());
|
||||
data.put("companyName", ContractContants.companyName);
|
||||
data.put("companyLegalPerson", ContractContants.companyLegalPerson);
|
||||
data.put("companyAddress", ContractContants.companyAddress);
|
||||
data.put("companyPhone", ContractContants.companyPhone);
|
||||
data.put("bankName", ContractContants.bankName);
|
||||
data.put("bankAccount", ContractContants.bankAccount);
|
||||
data.put("hourDay", ContractContants.hourDay);
|
||||
data.put("dayWeek", ContractContants.dayWeek);
|
||||
data.put("replyIntervalTime", ContractContants.replyIntervalTime);
|
||||
ajax.put("data", data);
|
||||
}
|
||||
return ajax;
|
||||
|
@ -5,14 +5,7 @@ import java.util.List;
|
||||
import com.stdiet.common.utils.StringUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.stdiet.common.annotation.Log;
|
||||
import com.stdiet.common.core.controller.BaseController;
|
||||
import com.stdiet.common.core.domain.AjaxResult;
|
||||
@ -77,7 +70,11 @@ public class SysCustomerHealthyController extends BaseController
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(sysCustomerHealthyService.selectSysCustomerHealthyById(id));
|
||||
SysCustomerHealthy sysCustomerHealthy = sysCustomerHealthyService.selectSysCustomerHealthyById(id);
|
||||
if(sysCustomerHealthy != null && StringUtils.isNotEmpty(sysCustomerHealthy.getPhone())){
|
||||
sysCustomerHealthy.setPhone(StringUtils.hiddenPhoneNumber(sysCustomerHealthy.getPhone()));
|
||||
}
|
||||
return AjaxResult.success(sysCustomerHealthy);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,57 @@
|
||||
package com.stdiet.common.constant;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 合同相关常量
|
||||
*/
|
||||
public class ContractContants {
|
||||
|
||||
//public static final Map<String,Object> CONTRACT_BASE = new HashMap<>();
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
public static final String companyName = "深圳市胜唐科技有限公司";
|
||||
|
||||
/**
|
||||
* 公司法人
|
||||
*/
|
||||
public static final String companyLegalPerson = "张玉";
|
||||
|
||||
/**
|
||||
* 公司地址
|
||||
*/
|
||||
public static final String companyAddress = "深圳市宝安区西乡街道宝民二路缤纷时代广场3楼318";
|
||||
|
||||
/**
|
||||
* 公司联系电话
|
||||
*/
|
||||
public static final String companyPhone = "深圳市宝安区西乡街道宝民二路缤纷时代广场3楼318";
|
||||
|
||||
/**
|
||||
* 最长回复间隔
|
||||
*/
|
||||
public static final String replyIntervalTime = "3.5";
|
||||
|
||||
/**
|
||||
* 银行名称
|
||||
*/
|
||||
public static final String bankName = "平安银行深圳新城支行";
|
||||
|
||||
/**
|
||||
* 银行账户
|
||||
*/
|
||||
public static final String bankAccount = "15000102247278";
|
||||
|
||||
/**
|
||||
* 每天服务时间(小时)
|
||||
*/
|
||||
public static final String hourDay = "10.5";
|
||||
|
||||
/**
|
||||
* 每周服务天数(天)
|
||||
*/
|
||||
public static final String dayWeek = "6";
|
||||
}
|
@ -6,6 +6,8 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 合同对象 sys_contract
|
||||
@ -22,6 +24,16 @@ public class SysContract extends BaseEntity {
|
||||
@Excel(name = "合同编号")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 调理项目ID
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 调理项目名称
|
||||
*/
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 客户姓名
|
||||
*/
|
||||
@ -197,6 +209,22 @@ public class SysContract extends BaseEntity {
|
||||
this.serveTimeStr = serveTimeStr;
|
||||
}
|
||||
|
||||
public Long getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(Long projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
@ -3,6 +3,7 @@ package com.stdiet.custom.service.impl;
|
||||
import com.itextpdf.text.Document;
|
||||
import com.itextpdf.text.DocumentException;
|
||||
import com.itextpdf.text.pdf.*;
|
||||
import com.stdiet.common.constant.ContractContants;
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import com.stdiet.common.utils.StringUtils;
|
||||
import com.stdiet.custom.domain.SysContract;
|
||||
@ -16,6 +17,8 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -123,6 +126,7 @@ public class SysContractServiceImpl implements ISysContractService {
|
||||
AcroFields form = stamper.getAcroFields();
|
||||
|
||||
form.addSubstitutionFont(BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED));
|
||||
if(sysContract.getProjectId().intValue() == 0){
|
||||
form.setField("name", sysContract.getSignName(), true);
|
||||
form.setField("serveTime", sysContract.getServeTimeStr(), true);
|
||||
//form.setField("tutor", sysContract.getTutor(), true);
|
||||
@ -136,8 +140,25 @@ public class SysContractServiceImpl implements ISysContractService {
|
||||
if (StringUtils.isNotEmpty(sysContract.getRemark())) {
|
||||
form.setField("remark", "(备注:" + sysContract.getRemark() + ")", true);
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
form.setField("companyName", ContractContants.companyName, true);
|
||||
form.setField("companyLegalPerson", ContractContants.companyLegalPerson, true);
|
||||
form.setField("name", sysContract.getSignName(), true);
|
||||
form.setField("cusId", sysContract.getCusId(), true);
|
||||
form.setField("phone", sysContract.getPhone(), true);
|
||||
DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
form.setField("expireTime", LocalDate.now().plusMonths(sysContract.getServeTime()/30).format(fmt), true);
|
||||
form.setField("amount", sysContract.getAmount().intValue()+"", true);
|
||||
form.setField("amountCapital", sysContract.getAmountUpper(), true);
|
||||
form.setField("serveTime", sysContract.getServeTime()/30+"", true);
|
||||
form.setField("bankName", ContractContants.bankName, true);
|
||||
form.setField("bankAccount", ContractContants.bankAccount, true);
|
||||
form.setField("hourDay", ContractContants.hourDay, true);
|
||||
form.setField("dayWeek", ContractContants.dayWeek, true);
|
||||
form.setField("replyIntervalTime", ContractContants.replyIntervalTime, true);
|
||||
form.setField("tutor", sysContract.getTutor(), true);
|
||||
form.setField("signTime", DateUtils.getDate(), true);
|
||||
}
|
||||
stamper.setFormFlattening(true);// 如果为false那么生成的PDF文件还能编辑,一定要设为true
|
||||
stamper.close();
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
<resultMap type="SysContract" id="SysContractResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="projectId" column="project_id"></result>
|
||||
<result property="status" column="status"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="signName" column="sign_name"/>
|
||||
@ -21,33 +22,39 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<!-- 非持久化字段 -->
|
||||
<result property="projectName" column="project_name"></result>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysContractVo">
|
||||
select id, status, name, sign_name, phone, cus_id, serve_time, tutor, serve_promise, amount, path, create_by, create_time, update_by, update_time, remark from sys_contract
|
||||
select sc.id, sc.project_id, sc.status, sc.name, sc.sign_name, sc.phone, sc.cus_id, sc.serve_time, sc.tutor, sc.serve_promise, sc.amount,
|
||||
sc.path, sc.create_by, sc.create_time, sc.update_by, sc.update_time, sc.remark,cp.dict_label as project_name
|
||||
from sys_contract as sc
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'conditioning_project') as cp ON cp.dict_value = sc.project_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSysContractList" parameterType="SysContract" resultMap="SysContractResult">
|
||||
<include refid="selectSysContractVo"/>
|
||||
<where>
|
||||
<if test="id != null ">and id = #{id}</if>
|
||||
<if test="status != null ">and status = #{status}</if>
|
||||
<if test="tutor != null and tutor != '' ">and tutor = #{tutor}</if>
|
||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="phone != null and phone != ''">and phone = #{phone}</if>
|
||||
<if test="id != null ">and sc.id = #{id}</if>
|
||||
<if test="status != null ">and sc.status = #{status}</if>
|
||||
<if test="tutor != null and tutor != '' ">and sc.tutor = #{tutor}</if>
|
||||
<if test="name != null and name != ''">and sc.name like concat('%', #{name}, '%')</if>
|
||||
<if test="phone != null and phone != ''">and sc.phone = #{phone}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectSysContractById" parameterType="Long" resultMap="SysContractResult">
|
||||
<include refid="selectSysContractVo"/>
|
||||
where id = #{id}
|
||||
where sc.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysContract" parameterType="SysContract" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_contract
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="signName != null and signName != ''">sign_name,</if>
|
||||
@ -66,6 +73,7 @@
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="signName != null and signName != ''">#{signName},</if>
|
||||
@ -87,6 +95,7 @@
|
||||
<update id="updateSysContract" parameterType="SysContract">
|
||||
update sys_contract
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="signName != null and signName != ''">sign_name = #{signName},</if>
|
||||
|
@ -117,6 +117,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="center" prop="amount" width="100"/>
|
||||
<el-table-column label="调理项目" align="center" prop="projectName" width="100"/>
|
||||
<el-table-column label="签订时间" align="center" prop="updateTime" width="180"/>
|
||||
<el-table-column label="合同地址" align="center" prop="path" width="80">
|
||||
<template slot-scope="scope">
|
||||
@ -159,13 +160,21 @@
|
||||
<!-- 添加或修改合同对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="550px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="调理项目" prop="projectId">
|
||||
<el-select v-model="form.projectId" placeholder="请选择调理项目" filterable clearable size="small">
|
||||
<el-option v-for="dict in conditioningProjectIdOption"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="parseInt(dict.dictValue)"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入客户姓名"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="金额" prop="amount">
|
||||
<el-input v-model="form.amount" placeholder="请输入金额"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务承诺" prop="servePromise">
|
||||
<el-form-item label="服务承诺" prop="servePromise" v-show="form.projectId == 0">
|
||||
<el-input style="width: 193px; margin-right: 12px" v-model="form.servePromise" placeholder="请输入服务承诺"/>
|
||||
斤
|
||||
</el-form-item>
|
||||
@ -209,6 +218,12 @@
|
||||
export default {
|
||||
name: "Contract",
|
||||
data() {
|
||||
const checkServePromise = (rule, value, callback) => {
|
||||
if (this.form.projectId == 0 && !value) {
|
||||
return callback(new Error('请输入服务承诺'))
|
||||
}
|
||||
callback();
|
||||
};
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -234,6 +249,8 @@
|
||||
serveTimeOptions: [],
|
||||
// 签约状态字典
|
||||
signStatusOptions: [],
|
||||
//调理项目字典
|
||||
conditioningProjectIdOption:[],
|
||||
//
|
||||
copyValue: '',
|
||||
// 查询参数
|
||||
@ -249,14 +266,23 @@
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
projectId:[
|
||||
{required: true, message: "请选择调理项目", trigger: "blur"}
|
||||
],
|
||||
name: [
|
||||
{required: true, message: "请输入客户姓名", trigger: "blur"}
|
||||
],
|
||||
amount: [
|
||||
{required: true, message: "请输入签订金额", trigger: "blur"}
|
||||
{required: true, message: "请输入签订金额", trigger: "blur"},
|
||||
{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
pattern: /^[1-9]\d*$/,
|
||||
message: "签订金额格式不正确",
|
||||
},
|
||||
],
|
||||
servePromise: [
|
||||
{required: true, message: "请输入承诺效果", trigger: "blur"}
|
||||
{required: true, trigger: "blur", validator: checkServePromise}
|
||||
],
|
||||
serveTime: [
|
||||
{required: true, message: "请选择服务时间", trigger: "blur"}
|
||||
@ -285,6 +311,9 @@
|
||||
this.getDicts("cus_sign_status").then(response => {
|
||||
this.signStatusOptions = response.data;
|
||||
});
|
||||
this.getDicts("conditioning_project").then(response => {
|
||||
this.conditioningProjectIdOption = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询合同列表 */
|
||||
@ -311,9 +340,11 @@
|
||||
// 表单重置
|
||||
reset() {
|
||||
const defaultNutritionist = this.nutritionistIdOptions.find(opt => opt.remark === 'default');
|
||||
const defaultProjectIdOption = this.conditioningProjectIdOption.find(opt => opt.remark === 'default');
|
||||
|
||||
this.form = {
|
||||
id: null,
|
||||
projectId: defaultProjectIdOption ? parseInt(defaultProjectIdOption.dictValue) : null,
|
||||
name: null,
|
||||
phone: null,
|
||||
serveTime: null,
|
||||
@ -378,6 +409,9 @@
|
||||
// });
|
||||
// } else {
|
||||
this.form.tutor = this.selectDictLabel(this.nutritionistIdOptions, this.form.nutritionistId)
|
||||
if(this.form.projectId != 0 && this.form.projectId != 3){
|
||||
return;
|
||||
}
|
||||
addContract(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
|
@ -10,7 +10,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="调理项目" prop="conditioningProjectId">
|
||||
<el-select v-model="queryParams.conditioningProjectId" placeholder="请选择">
|
||||
<el-select v-model="queryParams.conditioningProjectId" filterable clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in conditioningProjectIdOption"
|
||||
:key="dict.dictValue"
|
||||
@ -485,12 +485,21 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 查看详情 -->
|
||||
<el-dialog title="客户健康评估表" v-if="healthyDetailOpen" :visible.sync="healthyDetailOpen" width="1000px" style="overflow: auto;" append-to-body>
|
||||
<div v-for="(item,index) in healthyDetailList" :class="index != 0 ? 'margin-top-20' : ''" v-show="titleShowArray[index]" style="margin-bottom: 50px;">
|
||||
<el-dialog title="客户健康评估表" v-if="healthyDetailOpen" :visible.sync="healthyDetailOpen" width="1000px" append-to-body>
|
||||
<!-- 基础信息 -->
|
||||
<div v-for="(item,index) in healthyDetailList.slice(0,1)" style="margin-bottom: 50px;">
|
||||
<div>
|
||||
<p class="p_title_1" style="margin-top: 5px;">{{titleArray[index]}}</p>
|
||||
<TableDetailMessage :data="item" v-if="index != healthyDetailList.length-1"></TableDetailMessage>
|
||||
<el-table :show-header="false" v-if="index == healthyDetailList.length-1" :data="item" border :cell-style="columnStyle" style="width: 100%;">
|
||||
<TableDetailMessage :data="item" ></TableDetailMessage>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 剩余其他信息 -->
|
||||
<div style="height:400px;overflow: auto">
|
||||
<div v-for="(item,index) in healthyDetailList.slice(1,10)" v-show="titleShowArray[index]" style="margin-bottom: 50px;">
|
||||
<div>
|
||||
<p class="p_title_1" style="margin-top: 5px;">{{titleArray[index+1]}}</p>
|
||||
<TableDetailMessage :data="item" v-if="index != healthyDetailList.length-2"></TableDetailMessage>
|
||||
<el-table :show-header="false" v-if="index == healthyDetailList.length-2" :data="item" border :cell-style="columnStyle" style="width: 100%;">
|
||||
<el-table-column width="140" prop="attr_name_one">
|
||||
</el-table-column>
|
||||
<el-table-column prop="value_one">
|
||||
@ -515,9 +524,10 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="float:right;margin-top:25px;" v-if="index == (groupShowArray[avtiveStep - 1][groupShowArray[avtiveStep - 1].length-1] - 1)">
|
||||
<!--<div style="float:right;margin-top:25px;" v-if="index == (groupShowArray[avtiveStep - 1][groupShowArray[avtiveStep - 1].length-1] - 1)">
|
||||
<el-button @click="nextStep(avtiveStep - 1)" v-show="avtiveStep != 1">上一页</el-button>
|
||||
<el-button type="primary" @click="nextStep(avtiveStep + 1)" v-show="avtiveStep != groupShowArray.length">下一页</el-button>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -537,7 +547,7 @@
|
||||
//title
|
||||
titleArray: healthyData['titleArray'],
|
||||
//每个模块显示
|
||||
titleShowArray:[true,true,false,false,false,false,false,false,false],
|
||||
titleShowArray:[true,true,true,true,true,true,true,true,true],
|
||||
//分组
|
||||
groupShowArray:[[1],[2,3],[4],[5,6],[7,8],[9]],
|
||||
//当前页码
|
||||
@ -680,7 +690,7 @@
|
||||
handleLookDetail(row) {
|
||||
const id = row.id || this.ids
|
||||
getHealthy(id).then(response => {
|
||||
this.nextStep(1);
|
||||
//this.nextStep(1);
|
||||
let detailHealthy = this.dealHealthy(response.data);
|
||||
//性别
|
||||
detailHealthy.sex = detailHealthy.sex == 0 ? "男" : (detailHealthy.sex == 1 ? "女" : "未知");
|
||||
@ -769,10 +779,10 @@
|
||||
let physicalSigns = "";
|
||||
if(detailHealthy.signList != null && detailHealthy.signList.length > 0){
|
||||
detailHealthy.signList.forEach(function (sign, index) {
|
||||
physicalSigns += "," + sign.name;
|
||||
physicalSigns += "," + sign.name;
|
||||
})
|
||||
}
|
||||
physicalSigns += "," + (detailHealthy.otherPhysicalSigns ? detailHealthy.otherPhysicalSigns : "");
|
||||
physicalSigns += "," + (detailHealthy.otherPhysicalSigns ? detailHealthy.otherPhysicalSigns : "");
|
||||
detailHealthy.physicalSigns = this.trimComma(physicalSigns);
|
||||
|
||||
detailHealthy.familyIllnessHistory += detailHealthy.otherFamilyIllnessHistory ? ("," + detailHealthy.otherFamilyIllnessHistory) : "";
|
||||
@ -784,6 +794,7 @@
|
||||
|
||||
detailHealthy.allergyFlag = detailHealthy.allergyFlag == 1 ? "有" : "无";
|
||||
detailHealthy.allergen += detailHealthy.otherAllergen ? ("," +detailHealthy.otherAllergen) : "";
|
||||
detailHealthy.allergen = this.trimComma(detailHealthy.allergen);
|
||||
|
||||
let medicalReportPathArray = detailHealthy.medicalReport ? detailHealthy.medicalReport.split(",") : [];
|
||||
let medicalReportNameArray = detailHealthy.medicalReportName ? detailHealthy.medicalReportName.split(",") : [];
|
||||
|
@ -8,6 +8,9 @@
|
||||
<el-form-item label="导师" style="margin: 0">
|
||||
<span>{{form.tutor}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="调理项目" style="margin: 0">
|
||||
<span>{{form.projectName}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务费" style="margin: 0">
|
||||
<span>¥{{form.amount}}</span>
|
||||
</el-form-item>
|
||||
@ -46,12 +49,13 @@
|
||||
</div>
|
||||
<el-button type="primary" style="width: 100%" @click="submitForm" :disabled="!read">提交签约</el-button>
|
||||
<el-dialog
|
||||
title="营养减脂服务合同"
|
||||
:title="titleArray[this.form.projectId]"
|
||||
:visible.sync="dialogVisible"
|
||||
width="90%"
|
||||
custom-class="contract_dialog"
|
||||
center>
|
||||
<div class="dialog-detail">
|
||||
<div v-show="this.form.projectId == 0">
|
||||
<p>
|
||||
<div>甲方:胜唐体控(深圳市胜唐科技有限公司)</div>
|
||||
<div>公司地址:深圳市宝安区西乡街道宝民二路缤纷时代广场3楼318</div>
|
||||
@ -118,11 +122,117 @@
|
||||
<div class="line-rule">1、如因本合同发生争议,双方应协商解决,如协商不成,双方可向甲方所在地法院提起诉讼解决。</div>
|
||||
<div class="line-rule">2、本合同经双方线上签字盖章后生效。</div>
|
||||
</p>
|
||||
</div>
|
||||
<div v-show="this.form.projectId == 3">
|
||||
<p>
|
||||
<p>
|
||||
<div>服务公司(以下简称甲方):{{form.companyName}}</div>
|
||||
<div>法定代表人:{{form.companyLegalPerson}}</div>
|
||||
</p>
|
||||
<p>
|
||||
<div>用户(以下简称乙方):<b>{{form.signName}}</b></div>
|
||||
<div>身份证号:<b>{{form.cusId}}</b></div>
|
||||
<div>联系电话:<b>{{form.phone}}</b></div>
|
||||
</p>
|
||||
<p>
|
||||
<div>经甲乙方双方协商同意,签定服务合同,在合同有效期间,甲、乙双方必须遵守国 家法律、法规,以保护甲乙双方合法权益不受侵犯。</div>
|
||||
</p>
|
||||
<p>
|
||||
一、本合同服务期限自合同成立并生效之日开始,至 <b>{{form.expireTime}}</b> 日终止。
|
||||
</p>
|
||||
<p>
|
||||
二、服务费: <b>{{form.amount}}</b> 元人民币(大写: <b>{{form.amountUpper}}</b>)。
|
||||
</p>
|
||||
<p>
|
||||
三、支付方式
|
||||
<div class="line-rule">1.乙方一次性付清服务费用以人民币形式通过银行转账或其他支付向甲方支付共计 <b>{{form.serveTime/30}}</b> 个月服务费。</div>
|
||||
<div class="line-rule">2.甲方账户信息<br>
|
||||
<div style="padding-left: 10px;">甲方名称:{{form.companyName}}</div>
|
||||
<div style="padding-left: 10px;">开户行:{{form.bankName}}</div>
|
||||
<div style="padding-left: 10px;">银行账号:{{form.bankAccount}}</div>
|
||||
</div>
|
||||
<div class="line-rule">
|
||||
3. 墨迹商城胜唐体控收款
|
||||
</div>
|
||||
<div class="line-rule">
|
||||
4. 微信转账与支付宝转账
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
四、服务事项
|
||||
<div class="line-rule">1.乙方需提供以下筛查报告<br>
|
||||
<div style="padding-left: 10px;">1).男性激素六项、女性激素六项、衣原体抗原、优生五项、AMH(抗缪勒管激素)、 抗精子抗体、抗子宫内膜抗体、抗卵巢抗体、血常规(五分类)、贫血三项。 </div>
|
||||
<div style="padding-left: 10px;">2).过往疾病史病历、在使用或服用药物。</div>
|
||||
<div style="padding-left: 10px;">3).过往是否使用过激素类药物或保健药品,附加详细说明。 </div>
|
||||
</div>
|
||||
<div class="line-rule">2、服务时间<br>
|
||||
<div style="padding-left: 10px;">1).在指导调理期内,专业营养师的指导时间为一天 <b>{{form.hourDay}} </b>小时,一周 <b>{{form.dayWeek}}</b> 天。 </div>
|
||||
<div style="padding-left: 10px;">2).营养师回复消息时间不超过 <b>{{form.replyIntervalTime}}</b> 小时,国家法定节假日期间暂停服务。</div>
|
||||
<div style="padding-left: 10px;">3).每日服务时间为:早9:30——12:00,晚13:30——19:00</div>
|
||||
</div>
|
||||
<div class="line-rule">3、服务指导方式<br>
|
||||
<div style="padding-left: 10px;">1).以线上饮食指导为主,线下指导可进行预约至甲方办公所在地进行面对面咨询 指导。 </div>
|
||||
<div style="padding-left: 10px;">2).线上指导方式为添加指定营养师{{form.tutor}}联系方式(微信),或至线下咨询。 </div>
|
||||
<div style="padding-left: 10px;">3).一对一指导定制乙方可以指定甲方营养师团队任意营养师,做咨询指导服务, 若需要多位营养师同时进行指导,相关服务费用按标准收取。 </div>
|
||||
<div style="padding-left: 10px;">4).在指定服务期内,每日的饮食指导食谱,按周发送,每周七天,每天包含三餐 的饮食指导。</div>
|
||||
<div style="padding-left: 10px;">5).指导服务周期自合同签订之日起,指导范围不包括药物指导,医用级配方,处 方性,涉及医疗及专业药学范围。 </div>
|
||||
</div>
|
||||
<div class="line-rule">4、服务效果及保障<br>
|
||||
<div style="padding-left: 10px;">1).可改善效果:<br>改善双方体质,改善妇科问题,增加受孕几率 预防妊娠糖尿病及孕期高血压。 </div>
|
||||
<div style="padding-left: 10px;">2).预期调理结果: <br>1-3个月,双方体质得到明显改善,女性妇科炎症得到缓解,男性体力得到提升, 疲惫感降低。<br>
|
||||
4-6个月,女性卵巢功能得到改善,卵子质量,精子活力得到提升,提高受孕几率。</div>
|
||||
<div style="padding-left: 10px;">3).调理意义:<br>提示男性体内激素水平是否正常、提示女性体内激素水平是否正常、 阳性结果结合临床可确定沙眼衣原体感染、阴性时不能完全排除、可用细胞培养 法确定,妊娠早期感染可引起流产、死胎、胎儿畸形等.显示女性卵巢内含有的原 始卵泡的数量和质量、是反映女性生育能力的一个重要指标、检测男女生育能力、 检测女性生育能力,通过检测血液细胞的计数及不同种类细胞、成分的分类来反映 身体状况,
|
||||
如:贫血、感染、血液系统疾病、物理化学因素损伤等、提示贫血类 型。</div>
|
||||
<div style="padding-left: 10px;">4).需调理周期<b> {{form.serveTime/30}}</b> 个月</div>
|
||||
<div style="padding-left: 10px;">5).服务暂停:<br>乙方因个人原因无法按照指导服务进行调理时,应当提前一周向甲 方申请暂停服务,暂停期间不计入有效服务周期内。</div>
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
五、争议及提前结束服务
|
||||
<div class="line-rule">1.服务时间阶段(服务指导期、服务跟踪期、免费咨询期以下称为服务时间阶段) 具体安排,由甲方根据乙方的实际情况与乙方协商确定。</div>
|
||||
<div class="line-rule">2.如不可抗拒的因素(如意外怀孕等)而暂停服务指导,其后续服务期限由甲乙 双方协商确定。</div>
|
||||
<div class="line-rule">3.若非甲方技术问题的情况下,乙方未执行营养师的指导,因此未达到预期效果, 甲方不进行延期服务。 </div>
|
||||
<div class="line-rule">4.乙方未按照甲方为其制定方案执行,所带来的的后果由乙方自行承担,甲方不 承担责任。 </div>
|
||||
<div class="line-rule">5.乙方在服务期内享有 2 次暂停服务的机会,暂停前应与甲方沟通。暂停结束后, 重新与甲方汇报当前身体状况。 </div>
|
||||
<div class="line-rule">6.乙方隐瞒病情或身体情况误导营养师,造成的后果由乙方自行承担且甲方不予 退款。</div>
|
||||
<div class="line-rule">7.乙方同意且理解甲方定制营养方案付出的时间和智力成本,乙方在第一周营养 方案定制交付之前申请退款可退款 90%。在第一周营养方案定制交付之后,因个 人原因不履行本合同的,则不予退款。 </div>
|
||||
<div class="line-rule">8.若乙方具有特殊病史或使用激素药物、中药及其他疗程性药物等影响甲方提供 服务的情况,需在购买调理服务前告知甲方,以便于合理安排调理计划,若乙方 未告知甲方相关的疾病史以及药物使用情况,因此造成的负面效果由乙方自行承 担。 </div>
|
||||
<div class="line-rule">9.甲方在乙方告知所有身体情况及药物服用情况,甲方仍未做出合理安排,对乙 方的身体及心理造成影响时,乙方可申请扣除已进行服务期外相应的服务款项, 退还未进行服务期对应款项。
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
六、 保密条款
|
||||
<div class="line-rule">1.甲方为乙方的资料保密,包括:姓名、性别、身份证号、联系电话、过往病 史、过敏史等。 </div>
|
||||
<div class="line-rule">2.甲方不可把资料泄露给第三方,只允许把信息透露给甲方相对应负责人。</div>
|
||||
<div class="line-rule">3.乙方为甲方的营养方案保密,包括:一对一定制方案、体检安排、文字或 语音解答、各类指导等。</div>
|
||||
<div class="line-rule">4.乙方不可把资料泄露给第三方,若泄露给他人,造成的损失由乙方承担。 </div>
|
||||
<div class="line-rule">5.乙方不得为以下行为: <br>
|
||||
<div style="padding-left: 10px;">1).将甲方资料提供给他人阅读、复制、传递</div>
|
||||
<div style="padding-left: 10px;">2).未经甲方授权,以甲方的名义或以甲方员工身份对外发布; </div>
|
||||
<div style="padding-left: 10px;">3).将甲方资料以口头、书面或者其他形式直接或间接的传递给甲方的竞 争对手。 </div>
|
||||
</div>
|
||||
<div class="line-rule">6.若乙方违反保密义务,给甲方造成名誉损失或经济损失,需承担赔偿责任。
|
||||
</div>
|
||||
</p>
|
||||
<p>
|
||||
七、合同签订与解除
|
||||
<div class="line-rule">1.本合同经甲乙双方线上签订电子版之日起生效。</div>
|
||||
</p>
|
||||
<p>
|
||||
八、其他
|
||||
<div class="line-rule">1.甲乙双方任何一方违约,需向守约方赔偿2个月的服务费,如果违约金不足以弥 补对方损失的,违约方还需补足守约方的实际损失。</div>
|
||||
<div class="line-rule">2.因履行本合同发生的争议,经友好协商不能解决的,协商不能解决的,任何一方 均可向甲方(或乙方)住所地有管辖权的人民法院提起诉讼。</div>
|
||||
<div class="line-rule">3.本合同一式二份,甲方执一份乙方执一份,具有同等法律效力。本合同未经事宜, 双方可以签订补充协议,补充协议与原合同约定不一致的,以补充协议为准。</div>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleConfirm">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@ -131,6 +241,7 @@
|
||||
|
||||
import {getFile, signContract} from "@/api/custom/contract";
|
||||
import {digitUppercase, validatorIDCard} from "../../../utils/ruoyi";
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
export default {
|
||||
name: 'sign',
|
||||
@ -217,7 +328,8 @@
|
||||
cusId: [
|
||||
{required: false, trigger: "blur", validator: checkcusId}
|
||||
]
|
||||
}
|
||||
},
|
||||
titleArray:["营养减脂服务合同","","","备孕营养调理指导服务合同",""]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -238,16 +350,15 @@
|
||||
this.form = result.data;
|
||||
this.form.amount = parseInt(result.data.amount);
|
||||
this.form.amountUpper = digitUppercase(this.form.amount);
|
||||
this.form.serveTimeStr = this.serveTimeIdOption.find(obj => obj.value === parseInt(result.data.serveTime)).label
|
||||
this.form.serveTimeStr = this.serveTimeIdOption.find(obj => obj.value === parseInt(result.data.serveTime)).label;
|
||||
this.form.expireTime = dayjs().add(this.form.serveTime/30, 'month').format('YYYY-MM-DD');
|
||||
this.show = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
submitForm() {
|
||||
console.log("chdkscjksdc1");
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
console.log("chdkscjksdc2");
|
||||
signContract(this.form).then(result => {
|
||||
if (result.code === 200) {
|
||||
window.location.href = window.location.origin + result.url;
|
||||
|
@ -34,7 +34,7 @@
|
||||
<el-input type="number" v-model="form.phone" placeholder="请输入手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="调理项目" prop="conditioningProjectId">
|
||||
<el-select v-model="form.conditioningProjectId" placeholder="请选择">
|
||||
<el-select v-model="form.conditioningProjectId" filterable clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in conditioningProjectIdOption"
|
||||
:key="dict.dictValue"
|
||||
@ -618,8 +618,10 @@
|
||||
:data="upload.data"
|
||||
:auto-upload="false">
|
||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
||||
<el-button style="margin-left: 10px;" size="small" ref="removeFile" @click="upload.fileList = []">移除文件</el-button>
|
||||
<div slot="tip" class="el-upload__tip">提示:最多可上传三份,且每份文件不超过20M</div>
|
||||
<el-button style="margin-left: 10px;" size="small" @click="upload.fileList = []">移除文件</el-button>
|
||||
<div slot="tip" class="el-upload__tip">1、最多可上传三份,且每份文件不超过20M
|
||||
<br>2、仅支持bmp,gif, jpg, jpeg, png, doc, docx, xls, xlsx, ppt, pptx, html, htm, txt, rar, zip, gz, bz2, pdf格式文件
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</div>
|
||||
@ -797,6 +799,7 @@ export default {
|
||||
//是否支持同时选择多张
|
||||
multiple: true
|
||||
},
|
||||
timer: null,
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, trigger: "blur", message: "请填写姓名" },
|
||||
@ -853,7 +856,7 @@ export default {
|
||||
submit(){
|
||||
if (this.submitFlag) {
|
||||
this.$message({
|
||||
message: "请勿重复提交",
|
||||
message: "请勿重复提交,1分钟后重试",
|
||||
type: "warning",
|
||||
});
|
||||
return;
|
||||
@ -863,7 +866,7 @@ export default {
|
||||
this.submitFlag = true;
|
||||
this.form.medicalReport = [];
|
||||
if(this.upload.fileList.length > 0){
|
||||
this.$refs.upload.submit();removeFile
|
||||
this.$refs.upload.submit();
|
||||
}else{
|
||||
this.addCustomerHealthy();
|
||||
}
|
||||
@ -882,6 +885,7 @@ export default {
|
||||
this.healthyData['arrayName'].forEach(function (item, index) {
|
||||
cusMessage[item] = cusMessage[item] != null ? cusMessage[item].join(",") : null;
|
||||
});
|
||||
this.timer = setTimeout(this.fail,1000*60);
|
||||
addCustomerHealthy(cusMessage).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.$notify({
|
||||
@ -889,11 +893,15 @@ export default {
|
||||
message: "",
|
||||
type: "success",
|
||||
});
|
||||
}else{
|
||||
}
|
||||
}).catch(function() {
|
||||
console.log("error");
|
||||
});
|
||||
},
|
||||
fail(){
|
||||
console.log("fail");
|
||||
this.submitFlag = false;
|
||||
this.upload.isUploading = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
nextStep(step){
|
||||
this.$refs.form.validate((valid) => {
|
||||
@ -954,7 +962,7 @@ export default {
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
console.log(file.name);
|
||||
//console.log(file.name);
|
||||
if(response != null && response.code === 200){
|
||||
this.form.medicalReport.push(response.fileName);
|
||||
this.form.medicalReportName.push(file.name);
|
||||
@ -963,16 +971,14 @@ export default {
|
||||
this.addCustomerHealthy();
|
||||
}
|
||||
}else{
|
||||
this.upload.isUploading = false;
|
||||
this.submitFlag = false;
|
||||
this.fail();
|
||||
this.$message.error('文件上传失败,请检查文件格式');
|
||||
}
|
||||
},
|
||||
// 文件上传失败处理
|
||||
handleFileFail(err, file, fileList){
|
||||
this.$message.error('文件上传失败,请检查文件格式');
|
||||
this.upload.isUploading = false;
|
||||
this.submitFlag = false;
|
||||
this.fail();
|
||||
},
|
||||
//获取湿气
|
||||
getMoistureDictData() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user