提交 6629b251 authored 作者: 吴德鹏's avatar 吴德鹏

整合首页统计页面

上级 bbfe8ff7
......@@ -9,7 +9,7 @@ import java.util.Date;
* 表名 tb_cf_express_template
*
* @author lipengjun
* @date 2019-09-20 11:03:38
* @date 2020-07-07 14:24:13
*/
public class TbCfExpressTemplateEntity implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -23,25 +23,57 @@ public class TbCfExpressTemplateEntity implements Serializable {
*/
private String templateTitle;
/**
* 商品类型 暂无用,用tb_cf_exp_cat_rel关联
* 计费方式 0:计件 1:计重
*/
private Integer type;
/**
* 商品类型
*/
private String itemCategoryId;
/**
* 起始数量
*/
private Integer startNum;
/**
* 快递费
*/
private BigDecimal expressFee;
/**
* 快递费
* 续件数量
*/
private Integer continuationNum;
/**
* 续件费用
*/
private BigDecimal continuationFee;
/**
* 国家编号
*/
private String countryCode;
/**
* 国家
*/
private String country;
/**
* 状态 0:删除 1:正常
*/
private Integer status;
/**
* 默认模板 0:默认 1:非默认
*/
private Integer isDefault;
/**
* 免邮价格
*/
private BigDecimal postageFreePrice;
/**
* 创建日期
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 设置:模板id
......@@ -56,6 +88,7 @@ public class TbCfExpressTemplateEntity implements Serializable {
public String getTemplateId() {
return templateId;
}
/**
* 设置:模板标题
*/
......@@ -69,19 +102,43 @@ public class TbCfExpressTemplateEntity implements Serializable {
public String getTemplateTitle() {
return templateTitle;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
/**
* 设置:商品类型 暂无用,用tb_cf_exp_cat_rel关联
* 设置:商品类型
*/
public void setItemCategoryId(String itemCategoryId) {
this.itemCategoryId = itemCategoryId;
}
/**
* 获取:商品类型 暂无用,用tb_cf_exp_cat_rel关联
* 获取:商品类型
*/
public String getItemCategoryId() {
return itemCategoryId;
}
/**
* 设置:起始数量
*/
public void setStartNum(Integer startNum) {
this.startNum = startNum;
}
/**
* 获取:起始数量
*/
public Integer getStartNum() {
return startNum;
}
/**
* 设置:快递费
*/
......@@ -95,6 +152,35 @@ public class TbCfExpressTemplateEntity implements Serializable {
public BigDecimal getExpressFee() {
return expressFee;
}
/**
* 设置:续件数量
*/
public void setContinuationNum(Integer continuationNum) {
this.continuationNum = continuationNum;
}
/**
* 获取:续件数量
*/
public Integer getContinuationNum() {
return continuationNum;
}
/**
* 设置:续件费用
*/
public void setContinuationFee(BigDecimal continuationFee) {
this.continuationFee = continuationFee;
}
/**
* 获取:续件费用
*/
public BigDecimal getContinuationFee() {
return continuationFee;
}
/**
* 设置:国家编号
*/
......@@ -108,6 +194,63 @@ public class TbCfExpressTemplateEntity implements Serializable {
public String getCountryCode() {
return countryCode;
}
/**
* 设置:国家
*/
public void setCountry(String country) {
this.country = country;
}
/**
* 获取:国家
*/
public String getCountry() {
return country;
}
/**
* 设置:状态 0:删除 1:正常
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* 获取:状态 0:删除 1:正常
*/
public Integer getStatus() {
return status;
}
/**
* 设置:默认模板 0:默认 1:非默认
*/
public void setIsDefault(Integer isDefault) {
this.isDefault = isDefault;
}
/**
* 获取:默认模板 0:默认 1:非默认
*/
public Integer getIsDefault() {
return isDefault;
}
/**
* 设置:免邮价格
*/
public void setPostageFreePrice(BigDecimal postageFreePrice) {
this.postageFreePrice = postageFreePrice;
}
/**
* 获取:免邮价格
*/
public BigDecimal getPostageFreePrice() {
return postageFreePrice;
}
/**
* 设置:创建日期
*/
......@@ -122,11 +265,17 @@ public class TbCfExpressTemplateEntity implements Serializable {
return createTime;
}
public BigDecimal getContinuationFee() {
return continuationFee;
/**
* 设置:更新时间
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public void setContinuationFee(BigDecimal continuationFee) {
this.continuationFee = continuationFee;
/**
* 获取:更新时间
*/
public Date getUpdateTime() {
return updateTime;
}
}
......@@ -6,102 +6,150 @@
<resultMap type="com.platform.entity.TbCfExpressTemplateEntity" id="tbCfExpressTemplateMap">
<result property="templateId" column="template_id"/>
<result property="templateTitle" column="template_title"/>
<result property="type" column="type"/>
<result property="itemCategoryId" column="item_category_id"/>
<result property="startNum" column="start_num"/>
<result property="expressFee" column="express_fee"/>
<result property="continuationNum" column="continuation_num"/>
<result property="continuationFee" column="continuation_fee"/>
<result property="countryCode" column="country_code"/>
<result property="country" column="country"/>
<result property="status" column="status"/>
<result property="isDefault" column="is_default"/>
<result property="postageFreePrice" column="postage_free_price"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<select id="queryObject" resultType="com.platform.entity.TbCfExpressTemplateEntity">
<select id="queryObject" resultType="com.platform.entity.TbCfExpressTemplateEntity">
select
`template_id`,
`template_title`,
`type`,
`item_category_id`,
`start_num`,
`express_fee`,
`continuation_num`,
`continuation_fee`,
`country_code`,
`country`,
`status`,
`is_default`,
`postage_free_price`,
`create_time`,
`continuation_fee`
`update_time`
from tb_cf_express_template
where template_id = #{id}
</select>
<select id="queryList" resultType="com.platform.entity.TbCfExpressTemplateEntity">
select
`template_id`,
`template_title`,
`item_category_id`,
`express_fee`,
`continuation_fee`,
`country_code`,
`create_time`
from tb_cf_express_template
WHERE 1=1
<if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%')
</if>
<select id="queryList" resultType="com.platform.entity.TbCfExpressTemplateEntity">
select
`template_id`,
`template_title`,
`type`,
`item_category_id`,
`start_num`,
`express_fee`,
`continuation_num`,
`continuation_fee`,
`country_code`,
`country`,
`status`,
`is_default`,
`postage_free_price`,
`create_time`,
`update_time`
from tb_cf_express_template
WHERE 1=1
<if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%')
</if>
<choose>
<when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order}
</when>
<otherwise>
order by cast(template_id as SIGNED)
</otherwise>
<otherwise>
order by is_default
</otherwise>
</choose>
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<select id="queryTotal" resultType="int">
select count(*) from tb_cf_express_template
WHERE 1=1
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<select id="queryTotal" resultType="int">
select count(*) from tb_cf_express_template
WHERE 1=1
<if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert id="save" parameterType="com.platform.entity.TbCfExpressTemplateEntity">
</select>
<insert id="save" parameterType="com.platform.entity.TbCfExpressTemplateEntity">
insert into tb_cf_express_template(
`template_id`,
`template_title`,
`type`,
`item_category_id`,
`start_num`,
`express_fee`,
`continuation_num`,
`continuation_fee`,
`country_code`,
`create_time`)
`country`,
`status`,
`is_default`,
`postage_free_price`,
`create_time`,
`update_time`)
values(
#{templateId},
#{templateTitle},
#{type},
#{itemCategoryId},
#{startNum},
#{expressFee},
#{continuationNum},
#{continuationFee},
#{countryCode},
#{createTime})
#{country},
#{status},
#{isDefault},
#{postageFreePrice},
#{createTime},
#{updateTime})
</insert>
<update id="update" parameterType="com.platform.entity.TbCfExpressTemplateEntity">
update tb_cf_express_template
<set>
<if test="templateTitle != null">`template_title` = #{templateTitle}, </if>
<if test="itemCategoryId != null">`item_category_id` = #{itemCategoryId}, </if>
<if test="expressFee != null">`express_fee` = #{expressFee}, </if>
<if test="continuationFee != null">`continuation_fee` = #{continuationFee}, </if>
<if test="countryCode != null">`country_code` = #{countryCode}, </if>
<if test="createTime != null">`create_time` = #{createTime}</if>
</set>
where template_id = #{templateId}
</update>
<delete id="delete">
<update id="update" parameterType="com.platform.entity.TbCfExpressTemplateEntity">
update tb_cf_express_template
<set>
<if test="templateTitle != null">`template_title` = #{templateTitle},</if>
<if test="type != null">`type` = #{type},</if>
<if test="itemCategoryId != null">`item_category_id` = #{itemCategoryId},</if>
<if test="startNum != null">`start_num` = #{startNum},</if>
<if test="expressFee != null">`express_fee` = #{expressFee},</if>
<if test="continuationNum != null">`continuation_num` = #{continuationNum},</if>
<if test="continuationFee != null">`continuation_fee` = #{continuationFee},</if>
<if test="countryCode != null">`country_code` = #{countryCode},</if>
<if test="country != null">`country` = #{country},</if>
<if test="status != null">`status` = #{status},</if>
<if test="isDefault != null">`is_default` = #{isDefault},</if>
<if test="postageFreePrice != null">`postage_free_price` = #{postageFreePrice},</if>
<if test="createTime != null">`create_time` = #{createTime},</if>
<if test="updateTime != null">`update_time` = #{updateTime}</if>
</set>
where template_id = #{templateId}
</update>
<delete id="delete">
delete from tb_cf_express_template where template_id = #{value}
</delete>
<delete id="deleteBatch">
delete from tb_cf_express_template where template_id in
<foreach item="templateId" collection="array" open="(" separator="," close=")">
#{templateId}
</foreach>
</delete>
<delete id="deleteBatch">
delete from tb_cf_express_template where template_id in
<foreach item="templateId" collection="array" open="(" separator="," close=")">
#{templateId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -3,21 +3,10 @@
<head>
<title>运费模板</title>
#parse("sys/header.html")
<style>
.ui-jqgrid .ui-jqgrid-bdiv{
height:auto!important;
}
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
border-top: 2px solid #e7eaec;
line-height: 1.38857;
padding: 13px;
vertical-align: middle;
}
</style>
</head>
<body>
<div id="rrapp" v-cloak style="height: calc(100% - 15px);">
<div v-show="showList" style="height: 100%;">
<div v-show="showList" style="height: 100%;">
<Row :gutter="16">
<div class="search-group">
<i-col span="4">
......@@ -27,9 +16,9 @@
<i-button @click="reloadSearch">重置</i-button>
</div>
<div class="buttons-group">
<!-- #if($shiro.hasPermission("tbcfcoupon:save"))
#if($shiro.hasPermission("tbcfexpresstemplate:save"))
<i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
#end-->
#end
#if($shiro.hasPermission("tbcfexpresstemplate:update"))
<i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
#end
......@@ -38,41 +27,47 @@
#end
</div>
</Row>
<div id="speedp"></div>
<table id="jqGrid"></table>
<table id="jqGrid"></table>
</div>
<Card v-show="!showList">
<p slot="title">{{title}}</p>
<i-form ref="formValidate" :model="tbCfExpressTemplate" :rules="ruleValidate" :label-width="80">
<Form-item label="模板ID" prop="templateId">
<i-input v-model="tbCfExpressTemplate.templateId" placeholder="模板ID"/>
</Form-item>
<i-form ref="formValidate" :model="tbCfExpressTemplate" :rules="ruleValidate" :label-width="80">
<Form-item label="模板标题" prop="templateTitle">
<i-input v-model="tbCfExpressTemplate.templateTitle" placeholder="模板标题"/>
<i-input v-model="tbCfExpressTemplate.templateTitle" placeholder="模板标题" style="width:300px"/>
</Form-item>
<Form-item label="计费方式" prop="tbCfExpressTemplate.type">
<!--<i-input v-model="tbCfExpressTemplate.type" placeholder="计费方式" style="width:300px"/>-->
<Radio-group v-model="type">
<Radio v-for="e in typeList" :label="e.label" :value="e.value"></Radio>
</Radio-group>
</Form-item>
<Form-item label="起始数量" prop="startNum">
<i-input v-model="tbCfExpressTemplate.startNum" placeholder="起始数量" style="width:300px"/>
</Form-item>
<!--<Form-item label="商品类型 暂无用,用tb_cf_exp_cat_rel关联" prop="itemCategoryId">
<i-input v-model="tbCfExpressTemplate.itemCategoryId" placeholder="商品类型 暂无用,用tb_cf_exp_cat_rel关联"/>
</Form-item>-->
<Form-item label="快递费" prop="expressFee">
<i-input v-model="tbCfExpressTemplate.expressFee" placeholder="快递费"/>
<i-input v-model="tbCfExpressTemplate.expressFee" placeholder="快递费" style="width:300px"/>
</Form-item>
<Form-item label="续件数量" prop="continuationNum">
<i-input v-model="tbCfExpressTemplate.continuationNum" placeholder="续件数量" style="width:300px"/>
</Form-item>
<Form-item label="续件费用" prop="continuationFee">
<i-input v-model="tbCfExpressTemplate.continuationFee" placeholder="续件费用" style="width:300px"/>
</Form-item>
<Form-item label="续件费" prop="expressFee">
<i-input v-model="tbCfExpressTemplate.continuationFee" placeholder="续件费"/>
<Form-item label="国家" prop="country">
<i-input v-model="tbCfExpressTemplate.country" placeholder="国家" style="width:300px"/>
</Form-item>
<!--<Form-item label="国家编号" prop="countryCode">
<i-input v-model="tbCfExpressTemplate.countryCode" placeholder="国家编号"/>
<Form-item label="免邮价格" prop="postageFreePrice">
<i-input v-model="tbCfExpressTemplate.postageFreePrice" placeholder="免邮价格" style="width:300px"/>
</Form-item>
<Form-item label="创建日期" prop="createTime">
<i-input v-model="tbCfExpressTemplate.createTime" placeholder="创建日期"/>
</Form-item>-->
<Form-item>
<i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
<i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
<i-button type="warning" @click="reload" style="margin-left: 8px"/>
返回</i-button>
<i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
</Form-item>
</i-form>
</Card>
</Card>
</div>
<script src="${rc.contextPath}/js/sys/tbcfexpresstemplate.js?_${date.systemTime}"></script>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
差异被折叠。
......@@ -2,115 +2,163 @@ $(function () {
$("#jqGrid").Grid({
url: '../tbcfexpresstemplate/list',
colModel: [
{label: 'templateId', name: 'templateId', index: 'template_id', key: true, hidden: true},
{label: '模板标题', name: 'templateTitle', index: 'template_title', width: 80},
{label: '商品类型 暂无用,用tb_cf_exp_cat_rel关联', name: 'itemCategoryId', index: 'item_category_id', width: 80, hidden: true},
{label: '快递费', name: 'expressFee', index: 'express_fee', width: 80},
{label: '续件费', name: 'continuationFee', index: 'continuation_fee', width: 80},
{label: '国家编号', name: 'countryCode', index: 'country_code', width: 80, hidden: true},
{label: '创建日期', name: 'createTime', index: 'create_time', width: 80, hidden: true}],
shrinkToFit: true,
datatype : "json",
rowNum:15,
rowList:[15,30,45],
mtype: "POST",
rownumbers: true,
rownumWidth: 40,
gridview: true,
pager: '#speedp',
sortname: 'create_time',
viewrecords: true,
sortorder: "desc",
{label: 'templateId', name: 'templateId', index: 'template_id', key: true, hidden: true},
{label: '模板名称', name: 'templateTitle', index: 'template_title', width: 80},
{
label: '计费方式', name: 'type', index: 'type', width: 80, formatter: function (value, options, row) {
if (value === 0) {
return '计件';
} else if (value === 1) {
return '计重';
}
}
},
{label: '国家', name: 'country', index: 'country', width: 80},
{
label: '首件',
name: 'startNum',
index: 'start_num',
width: 80,
formatter: function (value, options, row) {
if (row.type === 0) {
return value + '件';
} else if (row.type === 1) {
return value + 'KG';
}
}
},
{label: '运费(美金)', name: 'expressFee', index: 'express_fee', width: 80},
{
label: '续件',
name: 'continuationNum',
index: 'continuation_num',
width: 80,
formatter: function (value, options, row) {
if (row.type === 0) {
return value + '件';
} else if (row.type === 1) {
return value + 'KG';
}
}
},
{label: '续件运费(美金)', name: 'continuationFee', index: 'continuation_fee', width: 80},
{label: '免邮价格', name: 'postageFreePrice', index: 'postage_free_price', width: 80},
{label: '创建日期', name: 'createTime', index: 'create_time', width: 80},
{label: '最后编辑时间', name: 'updateTime', index: 'update_time', width: 80},
{
label: '操作', index: 'operate', width: 80, formatter: function (value, grid, rows) {
if (rows.type === 0) {
return '<span class="label label-danger pointer" ">默认</span>&nbsp;&nbsp;';
}
return '<span class="label label-info pointer" ">设置默认</span>&nbsp;&nbsp;';
}
}]
});
});
let vm = new Vue({
el: '#rrapp',
data: {
el: '#rrapp',
data: {
type: null,
typeList: [{
label: '计件',
value: '0'
},
{
label: '计重',
value: '1'
}],
showList: true,
title: null,
tbCfExpressTemplate: {},
ruleValidate: {
name: [
{required: true, message: '名称不能为空', trigger: 'blur'}
]
},
q: {
name: ''
}
},
methods: {
query: function () {
vm.reload();
},
add: function () {
vm.showList = false;
vm.title = "新增";
vm.tbCfExpressTemplate = {};
},
update: function (event) {
tbCfExpressTemplate: {},
ruleValidate: {
name: [
{required: true, message: '名称不能为空', trigger: 'blur'}
]
},
q: {
name: ''
}
},
methods: {
query: function () {
vm.reload();
},
add: function () {
vm.showList = false;
vm.title = "新增";
vm.tbCfExpressTemplate = {};
},
update: function (event) {
let templateId = getSelectedRow("#jqGrid");
if (templateId == null) {
return;
}
vm.showList = false;
if (templateId == null) {
return;
}
vm.showList = false;
vm.title = "修改";
vm.getInfo(templateId);
},
saveOrUpdate: function (event) {
},
saveOrUpdate: function (event) {
let url = vm.tbCfExpressTemplate.templateId == null ? "../tbcfexpresstemplate/save" : "../tbcfexpresstemplate/update";
// let type = vm.typeList[0];
// //计件方式
// if (type === 0) {
//
// } else if (type === 1) {
// //计重方式
// }
Ajax.request({
url: url,
url: url,
params: JSON.stringify(vm.tbCfExpressTemplate),
type: "POST",
contentType: "application/json",
contentType: "application/json",
successCallback: function (r) {
alert('操作成功', function (index) {
vm.reload();
});
}
});
},
del: function (event) {
});
},
del: function (event) {
let templateIds = getSelectedRows("#jqGrid");
if (templateIds == null){
return;
}
if (templateIds == null) {
return;
}
confirm('确定要删除选中的记录?', function () {
confirm('确定要删除选中的记录?', function () {
Ajax.request({
url: "../tbcfexpresstemplate/delete",
url: "../tbcfexpresstemplate/delete",
params: JSON.stringify(templateIds),
type: "POST",
contentType: "application/json",
contentType: "application/json",
successCallback: function () {
alert('操作成功', function (index) {
vm.reload();
});
}
});
});
},
getInfo: function(templateId){
}
});
});
},
getInfo: function (templateId) {
Ajax.request({
url: "../tbcfexpresstemplate/info/"+templateId,
url: "../tbcfexpresstemplate/info/" + templateId,
async: true,
successCallback: function (r) {
vm.tbCfExpressTemplate = r.tbCfExpressTemplate;
}
});
},
reload: function (event) {
vm.showList = true;
},
reload: function (event) {
vm.showList = true;
let page = $("#jqGrid").jqGrid('getGridParam', 'page');
$("#jqGrid").jqGrid('setGridParam', {
$("#jqGrid").jqGrid('setGridParam', {
postData: {'name': vm.q.name},
page: page
}).trigger("reloadGrid");
vm.handleReset('formValidate');
},
reloadSearch: function() {
},
reloadSearch: function () {
vm.q = {
name: ''
};
......@@ -124,5 +172,5 @@ let vm = new Vue({
handleReset: function (name) {
handleResetForm(this, name);
}
}
}
});
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论