修改服务时间为服务时长
This commit is contained in:
parent
2f343601b1
commit
9883e9c80f
ruoyi-custom/src/main
ruoyi-ui/src/views/custom/order
@ -158,8 +158,10 @@ public class SysOrder extends BaseEntity {
|
||||
/**
|
||||
* 服务月数
|
||||
*/
|
||||
@Excel(name = "服务月数")
|
||||
private String serveMonth;
|
||||
@Excel(name = "服务时长")
|
||||
private String serveTime;
|
||||
|
||||
private Long serveTimeId;
|
||||
|
||||
@Excel(name = "审核状态", dictType = "cus_review_status")
|
||||
private String reviewStatus;
|
||||
@ -171,6 +173,22 @@ public class SysOrder extends BaseEntity {
|
||||
@Excel(name = "成交日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderTime;
|
||||
|
||||
public String getServeTime() {
|
||||
return serveTime;
|
||||
}
|
||||
|
||||
public void setServeTimeId(Long serveTimeId) {
|
||||
this.serveTimeId = serveTimeId;
|
||||
}
|
||||
|
||||
public Long getServeTimeId() {
|
||||
return serveTimeId;
|
||||
}
|
||||
|
||||
public void setServeTime(String serveTime) {
|
||||
this.serveTime = serveTime;
|
||||
}
|
||||
|
||||
public void setOperatorAssis(String operatorAssis) {
|
||||
this.operatorAssis = operatorAssis;
|
||||
}
|
||||
@ -195,14 +213,6 @@ public class SysOrder extends BaseEntity {
|
||||
this.reviewStatus = reviewStatus;
|
||||
}
|
||||
|
||||
public void setServeMonth(String serveMonth) {
|
||||
this.serveMonth = serveMonth;
|
||||
}
|
||||
|
||||
public String getServeMonth() {
|
||||
return serveMonth;
|
||||
}
|
||||
|
||||
public void setOrderId(Long orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
@ -429,7 +439,8 @@ public class SysOrder extends BaseEntity {
|
||||
.append("operatorAssis", getOperatorAssis())
|
||||
.append("recommender", getRecommender())
|
||||
.append("orderTime", getOrderTime())
|
||||
.append("serveMonth", getServeMonth())
|
||||
.append("serveTimeId", getServeTimeId())
|
||||
.append("serveTime", getServeTime())
|
||||
.append("reviewStatus", getReviewStatus())
|
||||
.toString();
|
||||
}
|
||||
|
@ -28,14 +28,16 @@
|
||||
<result property="operatorAssisId" column="operator_assis_id"/>
|
||||
<result property="recommender" column="recommender"/>
|
||||
<result property="orderTime" column="order_time"/>
|
||||
<result property="serveMonth" column="serve_month"/>
|
||||
<result property="serveTime" column="serve_time"/>
|
||||
<result property="serveTimeId" column="serve_time_id"/>
|
||||
<result property="reviewStatus" column="review_status"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysOrderVo">
|
||||
select o.order_id, o.review_status, o.customer, o.phone, o.amount, o.serve_month, o.pay_type_id, pay.dict_label as pay_type, o.pre_sale_id, o.create_by, o.create_time, o.after_sale_id, o.update_by, o.update_time, o.nutritionist_id, o.remark, o.nutri_assis_id, o.account_id, acc.dict_label as account, o.planner_id, o.planner_assis_id, o.operator_id, o.operator_assis_id, o.recommender, o.order_time from sys_order o
|
||||
select o.order_id, o.review_status, o.customer, o.phone, o.amount, ser.dict_label as serve_time, o.serve_time_id, o.pay_type_id, pay.dict_label as pay_type, o.pre_sale_id, o.create_by, o.create_time, o.after_sale_id, o.update_by, o.update_time, o.nutritionist_id, o.remark, o.nutri_assis_id, o.account_id, acc.dict_label as account, o.planner_id, o.planner_assis_id, o.operator_id, o.operator_assis_id, o.recommender, o.order_time from sys_order o
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_pay_type') AS pay ON pay.dict_value = o.pay_type_id
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_account') AS acc ON acc.dict_value = o.account_id
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_serve_time') AS ser ON ser.dict_value = o.serve_time_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSysOrderList" parameterType="SysOrder" resultMap="SysOrderResult">
|
||||
@ -57,7 +59,7 @@
|
||||
<if test="recommender != null and recommender != ''">and recommender = #{recommender}</if>
|
||||
<if test="beginTime != null and beginTime != ''">and date_format(order_time,'%y%m%d') >= date_format(#{beginTime},'%y%m%d')</if>
|
||||
<if test="endTime != null and endTime != ''">and date_format(order_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')</if>
|
||||
<if test="serveMonth != null ">and serve_month = #{serveMonth}</if>
|
||||
<if test="serveTimeId != null ">and serve_time_id = #{serveTimeId}</if>
|
||||
<if test="reviewStatus != null ">and review_status = #{reviewStatus}</if>
|
||||
</where>
|
||||
order by order_time desc
|
||||
@ -92,7 +94,7 @@
|
||||
<if test="operatorAssisId != null">operator_assis_id,</if>
|
||||
<if test="recommender != null">recommender,</if>
|
||||
<if test="orderTime != null">order_time,</if>
|
||||
<if test="serveMonth != null">serve_month,</if>
|
||||
<if test="serveTimeId != null">serve_time_id,</if>
|
||||
<if test="reviewStatus != null">review_status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
@ -117,7 +119,7 @@
|
||||
<if test="operatorAssisId != null">#{operatorAssisId},</if>
|
||||
<if test="recommender != null">#{recommender},</if>
|
||||
<if test="orderTime != null">#{orderTime},</if>
|
||||
<if test="serveMonth != null">#{serveMonth},</if>
|
||||
<if test="serveTimeId != null">#{serveTimeId},</if>
|
||||
<if test="reviewStatus != null">#{reviewStatus},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
@ -145,7 +147,7 @@
|
||||
<if test="operatorAssisId != null">operator_assis_id = #{operatorAssisId},</if>
|
||||
<if test="recommender != null">recommender = #{recommender},</if>
|
||||
<if test="orderTime != null">order_time = #{orderTime},</if>
|
||||
<if test="serveMonth != null">serve_month = #{serveMonth},</if>
|
||||
<if test="serveTimeId != null">serve_time_id = #{serveTimeId},</if>
|
||||
<if test="reviewStatus != null">review_status = #{reviewStatus},</if>
|
||||
</trim>
|
||||
where order_id = #{orderId}
|
||||
|
@ -219,7 +219,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="电话" align="center" prop="phone" width="120"/>
|
||||
<el-table-column label="服务月数" align="center" prop="serveMonth" width="80"/>
|
||||
<el-table-column label="服务时长" align="center" prop="serveTime" width="80"/>
|
||||
<el-table-column label="收款方式" align="center" prop="payType" width="120"/>
|
||||
<el-table-column label="售前" align="center" prop="preSale" width="120"/>
|
||||
<el-table-column label="售后" align="center" prop="afterSale" width="120"/>
|
||||
@ -306,10 +306,10 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="服务月数" prop="serveMonth">
|
||||
<el-select v-model="form.serveMonth" placeholder="请选服务月数">
|
||||
<el-form-item label="服务时长" prop="serveTime">
|
||||
<el-select v-model="form.serveTimeId" placeholder="请选服务时长">
|
||||
<el-option
|
||||
v-for="dict in serveMonthOption"
|
||||
v-for="dict in serveTimeIdOption"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="parseInt(dict.dictValue)"
|
||||
@ -490,8 +490,8 @@
|
||||
plannerIdOptions: [],
|
||||
// 账号
|
||||
accountIdOptions: [],
|
||||
// 服务月数
|
||||
serveMonthOption: [],
|
||||
// 服务时长
|
||||
serveTimeIdOption: [],
|
||||
// 审核状态
|
||||
reviewStatusOptions: [],
|
||||
// 策划助理字典
|
||||
@ -536,8 +536,8 @@
|
||||
accountId: [
|
||||
{required: true, message: "账号不能为空", trigger: "blur"}
|
||||
],
|
||||
serveMonth: [
|
||||
{required: true, message: "服务月数不能为空", trigger: "blur"}
|
||||
serveTimeId: [
|
||||
{required: true, message: "服务时长不能为空", trigger: "blur"}
|
||||
],
|
||||
// reviewStatus: [
|
||||
// {required: true, message: "请对数据进行审核", trigger: "blur"}
|
||||
@ -597,8 +597,8 @@
|
||||
this.getDicts("cus_account").then(response => {
|
||||
this.accountIdOptions = response.data;
|
||||
});
|
||||
this.getDicts("cus_serve_month").then(response => {
|
||||
this.serveMonthOption = response.data;
|
||||
this.getDicts("cus_serve_time").then(response => {
|
||||
this.serveTimeIdOption = response.data;
|
||||
});
|
||||
this.getDicts("cus_review_status").then(response => {
|
||||
this.reviewStatusOptions = response.data;
|
||||
@ -661,7 +661,7 @@
|
||||
// 表单重置
|
||||
reset() {
|
||||
const defaultPayType = this.payTypeIdOptions.find(opt => opt.remark === 'default');
|
||||
const defaultServeMonth = this.serveMonthOption.find(opt => opt.remark === 'default');
|
||||
const defaultServeTime = this.serveTimeIdOption.find(opt => opt.remark === 'default');
|
||||
const defaultAccount = this.accountIdOptions.find(opt => opt.remark === 'default');
|
||||
const defaultOperator = this.operatorIdOptions.find(opt => opt.remark === 'default');
|
||||
const defaultOperatorAssis = this.operatorAssisIdOptions.find(opt => opt.remark === 'default');
|
||||
@ -693,7 +693,7 @@
|
||||
operatorAssisId: defaultOperatorAssis ? parseInt(defaultOperatorAssis.dictValue) : null,
|
||||
recommender: null,
|
||||
orderTime: null,
|
||||
serveMonth: defaultServeMonth ? parseInt(defaultServeMonth.dictValue) : 1,
|
||||
serveTimeId: defaultServeTime ? parseInt(defaultServeTime.dictValue) : null,
|
||||
reviewStatus: 'no'
|
||||
};
|
||||
this.resetForm("form");
|
||||
|
Loading…
x
Reference in New Issue
Block a user