暂存
This commit is contained in:
parent
1b6a654b8d
commit
ed07eaad43
Binary file not shown.
@ -104,6 +104,7 @@ public class SysContractController extends BaseController {
|
|||||||
data.put("name", contract.getName());
|
data.put("name", contract.getName());
|
||||||
data.put("amount", contract.getAmount().toString());
|
data.put("amount", contract.getAmount().toString());
|
||||||
data.put("serveTime", contract.getServeTime() + "");
|
data.put("serveTime", contract.getServeTime() + "");
|
||||||
|
data.put("tutor", contract.getTutor());
|
||||||
data.put("servePromise", contract.getServePromise());
|
data.put("servePromise", contract.getServePromise());
|
||||||
ajax.put("data", data);
|
ajax.put("data", data);
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,8 @@ public class SysContract extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String signDate;
|
private String signDate;
|
||||||
|
|
||||||
|
private String tutor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同状态
|
* 合同状态
|
||||||
* 0-未签订;1-已签订
|
* 0-未签订;1-已签订
|
||||||
@ -74,6 +76,14 @@ public class SysContract extends BaseEntity {
|
|||||||
|
|
||||||
private String servePromise;
|
private String servePromise;
|
||||||
|
|
||||||
|
public String getTutor() {
|
||||||
|
return tutor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTutor(String tutor) {
|
||||||
|
this.tutor = tutor;
|
||||||
|
}
|
||||||
|
|
||||||
public void setServePromise(String servePromise) {
|
public void setServePromise(String servePromise) {
|
||||||
this.servePromise = servePromise;
|
this.servePromise = servePromise;
|
||||||
}
|
}
|
||||||
@ -185,6 +195,7 @@ public class SysContract extends BaseEntity {
|
|||||||
.append("signDate", getSignDate())
|
.append("signDate", getSignDate())
|
||||||
.append("path", getPath())
|
.append("path", getPath())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
|
.append("tutor", getTutor())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", getUpdateBy())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
@ -125,6 +125,7 @@ public class SysContractServiceImpl implements ISysContractService {
|
|||||||
|
|
||||||
form.setField("name", sysContract.getName(), true);
|
form.setField("name", sysContract.getName(), true);
|
||||||
form.setField("time", sysContract.getServeTimeStr(), true);
|
form.setField("time", sysContract.getServeTimeStr(), true);
|
||||||
|
form.setField("tutor", sysContract.getServeTimeStr(), true);
|
||||||
form.setField("moneyUpper", sysContract.getAmountUpper(), true);
|
form.setField("moneyUpper", sysContract.getAmountUpper(), true);
|
||||||
form.setField("money", sysContract.getAmount().intValue() + "", true);
|
form.setField("money", sysContract.getAmount().intValue() + "", true);
|
||||||
form.setField("phone", sysContract.getPhone(), true);
|
form.setField("phone", sysContract.getPhone(), true);
|
||||||
|
@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="name" column="name" />
|
<result property="name" column="name" />
|
||||||
<result property="cusId" column="cus_id" />
|
<result property="cusId" column="cus_id" />
|
||||||
<result property="phone" column="phone" />
|
<result property="phone" column="phone" />
|
||||||
|
<result property="tutor" column="tutor" />
|
||||||
<result property="serveTime" column="serve_time" />
|
<result property="serveTime" column="serve_time" />
|
||||||
<result property="servePromise" column="serve_promise" />
|
<result property="servePromise" column="serve_promise" />
|
||||||
<result property="amount" column="amount" />
|
<result property="amount" column="amount" />
|
||||||
@ -22,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSysContractVo">
|
<sql id="selectSysContractVo">
|
||||||
select id, status, name, phone, cus_id, serve_time, serve_promise, amount, path, create_by, create_time, update_by, update_time, remark from sys_contract
|
select id, status, name, phone, cus_id, serve_time, tutor, serve_promise, amount, path, create_by, create_time, update_by, update_time, remark from sys_contract
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSysContractList" parameterType="SysContract" resultMap="SysContractResult">
|
<select id="selectSysContractList" parameterType="SysContract" resultMap="SysContractResult">
|
||||||
@ -30,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<where>
|
<where>
|
||||||
<if test="id != null "> and id = #{id}</if>
|
<if test="id != null "> and id = #{id}</if>
|
||||||
<if test="status != null "> and status = #{status}</if>
|
<if test="status != null "> and status = #{status}</if>
|
||||||
|
<if test="tutor != null "> and tutor = #{tutor}</if>
|
||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</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="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||||
</where>
|
</where>
|
||||||
@ -47,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="id != null">id,</if>
|
<if test="id != null">id,</if>
|
||||||
<if test="status != null">status,</if>
|
<if test="status != null">status,</if>
|
||||||
<if test="name != null and name != ''">name,</if>
|
<if test="name != null and name != ''">name,</if>
|
||||||
|
<if test="tutor != null and tutor != ''">tutor,</if>
|
||||||
<if test="cusId != null and cusId != ''">cus_id,</if>
|
<if test="cusId != null and cusId != ''">cus_id,</if>
|
||||||
<if test="phone != null">phone,</if>
|
<if test="phone != null">phone,</if>
|
||||||
<if test="serveTime != null">serve_time,</if>
|
<if test="serveTime != null">serve_time,</if>
|
||||||
@ -63,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="id != null">#{id},</if>
|
<if test="id != null">#{id},</if>
|
||||||
<if test="status != null">#{status},</if>
|
<if test="status != null">#{status},</if>
|
||||||
<if test="name != null and name != ''">#{name},</if>
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
|
<if test="tutor != null and tutor != ''">#{tutor},</if>
|
||||||
<if test="cusId != null and cusId != ''">#{cusId},</if>
|
<if test="cusId != null and cusId != ''">#{cusId},</if>
|
||||||
<if test="phone != null">#{phone},</if>
|
<if test="phone != null">#{phone},</if>
|
||||||
<if test="serveTime != null">#{serveTime},</if>
|
<if test="serveTime != null">#{serveTime},</if>
|
||||||
@ -82,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="status != null">status = #{status},</if>
|
<if test="status != null">status = #{status},</if>
|
||||||
<if test="name != null and name != ''">name = #{name},</if>
|
<if test="name != null and name != ''">name = #{name},</if>
|
||||||
|
<if test="tutor != null and tutor != ''">tutor = #{tutor},</if>
|
||||||
<if test="cusId != null and cusId != ''">cus_id = #{cusId},</if>
|
<if test="cusId != null and cusId != ''">cus_id = #{cusId},</if>
|
||||||
<if test="phone != null">phone = #{phone},</if>
|
<if test="phone != null">phone = #{phone},</if>
|
||||||
<if test="serveTime != null">serve_time = #{serveTime},</if>
|
<if test="serveTime != null">serve_time = #{serveTime},</if>
|
||||||
|
@ -28,6 +28,14 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="主营养师" prop="nutritionistId">
|
||||||
|
<el-select v-model="queryParams.nutritionistId" placeholder="请选择主营养师" clearable size="small">
|
||||||
|
<el-option v-for="dict in nutritionistIdOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="parseInt(dict.dictValue)"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="合同状态" prop="status">
|
<el-form-item label="合同状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择合同状态">
|
<el-select v-model="queryParams.status" placeholder="请选择合同状态">
|
||||||
<el-option
|
<el-option
|
||||||
@ -154,9 +162,14 @@
|
|||||||
<el-form-item label="客户姓名" prop="name">
|
<el-form-item label="客户姓名" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入客户姓名"/>
|
<el-input v-model="form.name" placeholder="请输入客户姓名"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="电话" prop="phone">-->
|
<el-form-item label="营养师" prop="nutritionistId">
|
||||||
<!-- <el-input v-model="form.phone" placeholder="请输入电话"/>-->
|
<el-select v-model="form.nutritionistId" placeholder="请选择营养师" clearable size="small">
|
||||||
<!-- </el-form-item>-->
|
<el-option v-for="dict in nutritionistIdOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="parseInt(dict.dictValue)"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="金额" prop="amount">
|
<el-form-item label="金额" prop="amount">
|
||||||
<el-input v-model="form.amount" placeholder="请输入金额"/>
|
<el-input v-model="form.amount" placeholder="请输入金额"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -195,6 +208,8 @@
|
|||||||
updateContract
|
updateContract
|
||||||
} from "@/api/custom/contract";
|
} from "@/api/custom/contract";
|
||||||
|
|
||||||
|
import {getOptions} from "@/api/custom/order";
|
||||||
|
|
||||||
import Clipboard from 'clipboard';
|
import Clipboard from 'clipboard';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -215,6 +230,8 @@
|
|||||||
total: 0,
|
total: 0,
|
||||||
// 合同表格数据
|
// 合同表格数据
|
||||||
contractList: [],
|
contractList: [],
|
||||||
|
// 营养师
|
||||||
|
nutritionistIdOptions: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
@ -255,6 +272,16 @@
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
getOptions().then(response => {
|
||||||
|
const options = response.data.reduce((opts, cur) => {
|
||||||
|
if (!opts[cur.postCode]) {
|
||||||
|
opts[cur.postCode] = [{dictValue: 0, dictLabel: ' ', remark: null}];
|
||||||
|
}
|
||||||
|
opts[cur.postCode].push({dictValue: cur.userId, dictLabel: cur.userName, remark: cur.remark})
|
||||||
|
return opts;
|
||||||
|
}, {})
|
||||||
|
this.nutritionistIdOptions = options['nutri'] || [];
|
||||||
|
})
|
||||||
this.getDicts("cus_serve_time").then(response => {
|
this.getDicts("cus_serve_time").then(response => {
|
||||||
this.serveTimeOptions = response.data;
|
this.serveTimeOptions = response.data;
|
||||||
});
|
});
|
||||||
@ -286,6 +313,8 @@
|
|||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
|
const defaultNutritionist = this.nutritionistIdOptions.find(opt => opt.remark === 'default');
|
||||||
|
|
||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
id: null,
|
||||||
name: null,
|
name: null,
|
||||||
@ -294,6 +323,7 @@
|
|||||||
amount: null,
|
amount: null,
|
||||||
path: null,
|
path: null,
|
||||||
createBy: null,
|
createBy: null,
|
||||||
|
nutritionistId: defaultNutritionist ? parseInt(defaultNutritionist.dictValue) : null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
@ -301,6 +331,10 @@
|
|||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
// 主营养师字典翻译
|
||||||
|
nutritionistIdFormat(row, column) {
|
||||||
|
return this.selectDictLabel(this.nutritionistIdOptions, row.nutritionistId);
|
||||||
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user