Merge remote-tracking branch 'origin/release-v0.0.1' into release-v0.0.1
This commit is contained in:
commit
a0cf596da0
|
|
@ -40,6 +40,10 @@ public class BizProduct extends BaseEntity
|
||||||
@Excel(name = "产品单价")
|
@Excel(name = "产品单价")
|
||||||
private Long amount;
|
private Long amount;
|
||||||
|
|
||||||
|
/** 产品返现 */
|
||||||
|
@Excel(name = "产品单价")
|
||||||
|
private Long cashbackAmount;
|
||||||
|
|
||||||
/** 排序 */
|
/** 排序 */
|
||||||
@Excel(name = "排序")
|
@Excel(name = "排序")
|
||||||
private Long sort;
|
private Long sort;
|
||||||
|
|
@ -119,7 +123,15 @@ public class BizProduct extends BaseEntity
|
||||||
this.sort = sort;
|
this.sort = sort;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getSort()
|
public Long getCashbackAmount() {
|
||||||
|
return cashbackAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCashbackAmount(Long cashbackAmount) {
|
||||||
|
this.cashbackAmount = cashbackAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSort()
|
||||||
{
|
{
|
||||||
return sort;
|
return sort;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="productTypeId" column="product_type_id" />
|
<result property="productTypeId" column="product_type_id" />
|
||||||
<result property="productClass" column="product_class" />
|
<result property="productClass" column="product_class" />
|
||||||
<result property="amount" column="amount" />
|
<result property="amount" column="amount" />
|
||||||
|
<result property="cashbackAmount" column="cashback_amount" />
|
||||||
<result property="sort" column="sort" />
|
<result property="sort" column="sort" />
|
||||||
<result property="onlineStatus" column="online_status" />
|
<result property="onlineStatus" column="online_status" />
|
||||||
<result property="onlineTime" column="online_time" />
|
<result property="onlineTime" column="online_time" />
|
||||||
|
|
@ -30,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectBizProductVo">
|
<sql id="selectBizProductVo">
|
||||||
select product_id, product_code, product_name, product_type_id, product_class, amount, sort, online_status, online_time, offline_time, remark, create_by, create_time, update_by, update_time from biz_product
|
select product_id, product_code, product_name, product_type_id, product_class, amount, cashback_amount, sort, online_status, online_time, offline_time, remark, create_by, create_time, update_by, update_time from biz_product
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectBizProductList" parameterType="BizProduct" resultMap="BizProductResult">
|
<select id="selectBizProductList" parameterType="BizProduct" resultMap="BizProductResult">
|
||||||
|
|
@ -49,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectBizProductImageList" parameterType="Long" resultMap="BizProductImageResult">
|
<select id="selectBizProductImageList" parameterType="Long" resultMap="BizProductImageResult">
|
||||||
select product_image_id, product_id, image_type, b.image_url
|
select product_image_id, product_id, image_type, image_url
|
||||||
from biz_product_image
|
from biz_product_image
|
||||||
where product_id = #{productId}
|
where product_id = #{productId}
|
||||||
order by product_image_id
|
order by product_image_id
|
||||||
|
|
@ -63,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="productTypeId != null">product_type_id,</if>
|
<if test="productTypeId != null">product_type_id,</if>
|
||||||
<if test="productClass != null">product_class,</if>
|
<if test="productClass != null">product_class,</if>
|
||||||
<if test="amount != null">amount,</if>
|
<if test="amount != null">amount,</if>
|
||||||
|
<if test="cashbackAmount != null">cashback_amount,</if>
|
||||||
<if test="sort != null">sort,</if>
|
<if test="sort != null">sort,</if>
|
||||||
<if test="onlineStatus != null">online_status,</if>
|
<if test="onlineStatus != null">online_status,</if>
|
||||||
<if test="onlineTime != null">online_time,</if>
|
<if test="onlineTime != null">online_time,</if>
|
||||||
|
|
@ -79,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="productTypeId != null">#{productTypeId},</if>
|
<if test="productTypeId != null">#{productTypeId},</if>
|
||||||
<if test="productClass != null">#{productClass},</if>
|
<if test="productClass != null">#{productClass},</if>
|
||||||
<if test="amount != null">#{amount},</if>
|
<if test="amount != null">#{amount},</if>
|
||||||
|
<if test="cashbackAmount != null">#{cashbackAmount},</if>
|
||||||
<if test="sort != null">#{sort},</if>
|
<if test="sort != null">#{sort},</if>
|
||||||
<if test="onlineStatus != null">#{onlineStatus},</if>
|
<if test="onlineStatus != null">#{onlineStatus},</if>
|
||||||
<if test="onlineTime != null">#{onlineTime},</if>
|
<if test="onlineTime != null">#{onlineTime},</if>
|
||||||
|
|
@ -99,6 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="productTypeId != null">product_type_id = #{productTypeId},</if>
|
<if test="productTypeId != null">product_type_id = #{productTypeId},</if>
|
||||||
<if test="productClass != null">product_class = #{productClass},</if>
|
<if test="productClass != null">product_class = #{productClass},</if>
|
||||||
<if test="amount != null">amount = #{amount},</if>
|
<if test="amount != null">amount = #{amount},</if>
|
||||||
|
<if test="cashbackAmount != null">cashback_amount = #{cashbackAmount},</if>
|
||||||
<if test="sort != null">sort = #{sort},</if>
|
<if test="sort != null">sort = #{sort},</if>
|
||||||
<if test="onlineStatus != null">online_status = #{onlineStatus},</if>
|
<if test="onlineStatus != null">online_status = #{onlineStatus},</if>
|
||||||
<if test="onlineTime != null">online_time = #{onlineTime},</if>
|
<if test="onlineTime != null">online_time = #{onlineTime},</if>
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,12 @@
|
||||||
<input name="amount" class="form-control" type="text" required digits="true" min="0" max="100000">
|
<input name="amount" class="form-control" type="text" required digits="true" min="0" max="100000">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">产品返现金额:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="cashbackAmount" class="form-control" type="text" required digits="true" min="0" max="100000">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">排序:</label>
|
<label class="col-sm-3 control-label is-required">排序:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
|
|
||||||
|
|
@ -2,195 +2,195 @@
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
<head>
|
<head>
|
||||||
<th:block th:include="include :: header('修改产品')" />
|
<th:block th:include="include :: header('修改产品')" />
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
||||||
</head>
|
</head>
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<form class="form-horizontal m" id="form-product-edit" >
|
||||||
<form class="form-horizontal m" id="form-product-edit" th:object="${bizProduct}">
|
<input name="productId" th:field="*{bizProduct.productId}" type="hidden">
|
||||||
<h4 class="form-header h4">产品信息</h4>
|
<input id="hiddenDetail" th:value="*{bizProduct.detailImages}" type="hidden">
|
||||||
<input name="productId" th:field="*{productId}" type="hidden">
|
<input id="hiddenLoop" th:value="*{bizProduct.loopImages}" type="hidden">
|
||||||
<div class="form-group">
|
<div class="tabs-container">
|
||||||
<label class="col-sm-3 control-label is-required">产品名称:</label>
|
<ul class="nav nav-tabs">
|
||||||
<div class="col-sm-8">
|
<li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">1产品基础信息</a>
|
||||||
<input name="productName" th:field="*{productName}" class="form-control" type="text" required>
|
</li>
|
||||||
</div>
|
<li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">2产品相关图片</a>
|
||||||
</div>
|
</li>
|
||||||
<div class="form-group">
|
</ul>
|
||||||
<label class="col-sm-3 control-label is-required">产品分类:</label>
|
<div class="tab-content">
|
||||||
<div class="col-sm-8">
|
<div id="tab-1" class="tab-pane active">
|
||||||
<select name="productTypeId" class="form-control m-b" required>
|
<div class="panel-body">
|
||||||
<option value="">所有</option>
|
<div class="form-group">
|
||||||
</select>
|
<label class="col-sm-3 control-label is-required">产品名称:</label>
|
||||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
<div class="col-sm-8">
|
||||||
</div>
|
<input name="productName" th:field="*{bizProduct.productName}" class="form-control" type="text" required maxlength="20">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label class="col-sm-3 control-label is-required">产品类型:</label>
|
<div class="form-group">
|
||||||
<div class="col-sm-8">
|
<label class="col-sm-3 control-label is-required">产品分类:</label>
|
||||||
<select name="productClass" class="form-control m-b" required>
|
<div class="col-sm-8">
|
||||||
<option value="">所有</option>
|
<select th:field="*{bizProduct.productTypeId}" name="productTypeId" class="form-control m-b" required>
|
||||||
</select>
|
<option th:each="ptype:${productTypeList}" th:value="*{ptype.productTypeId}" th:text="*{ptype.productTypeName}"></option>
|
||||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">产品单价:</label>
|
<label class="col-sm-3 control-label is-required">产品类型:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="amount" th:field="*{amount}" class="form-control" type="text" required>
|
<select th:field="*{bizProduct.productClass}" name="productClass" class="form-control m-b" required>
|
||||||
</div>
|
<option th:each="dict:${@dict.getType('busi_product_class')}" th:value="*{dict.dictCode}" th:text="*{dict.dictLabel}"></option>
|
||||||
</div>
|
</select>
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label class="col-sm-3 control-label is-required">排序:</label>
|
</div>
|
||||||
<div class="col-sm-8">
|
<div class="form-group">
|
||||||
<input name="sort" th:field="*{sort}" class="form-control" type="text" required>
|
<label class="col-sm-3 control-label is-required">产品单价:</label>
|
||||||
</div>
|
<div class="col-sm-8">
|
||||||
</div>
|
<input name="amount" th:field="*{bizProduct.amount}" class="form-control" type="text" required digits="true" min="0" max="100000">
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label class="col-sm-3 control-label">是否上架:</label>
|
</div>
|
||||||
<div class="col-sm-8">
|
<div class="form-group">
|
||||||
<label class="check-box">
|
<label class="col-sm-3 control-label is-required">产品返现金额:</label>
|
||||||
<input name="onlineStatus" type="checkbox" required> 无
|
<div class="col-sm-8">
|
||||||
</label>
|
<input name="cashbackAmount" th:field="*{bizProduct.cashbackAmount}" class="form-control" type="text" required digits="true" min="0" max="100000">
|
||||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<label class="col-sm-3 control-label is-required">排序:</label>
|
||||||
<label class="col-sm-3 control-label is-required">产品描述:</label>
|
<div class="col-sm-8">
|
||||||
<div class="col-sm-8">
|
<input name="sort" th:field="*{bizProduct.sort}" class="form-control" type="text" digits="true" min="0" max="100">
|
||||||
<input name="remark" th:field="*{remark}" class="form-control" type="text" required>
|
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 排序数字越大排列越靠前</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h4 class="form-header h4">产品图片信息</h4>
|
<div class="form-group">
|
||||||
<div class="row">
|
<label class="col-sm-3 control-label">是否上架:</label>
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-8">
|
||||||
<button type="button" class="btn btn-white btn-sm" onclick="addColumn()"><i class="fa fa-plus"> 增加</i></button>
|
<div class="radio-box">
|
||||||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delColumn()"><i class="fa fa-minus"> 删除</i></button>
|
<input type="radio" name="onlineStatus" th:checked="*{bizProduct.onlineStatus==1}" value="1">
|
||||||
<div class="col-sm-12 select-table table-striped">
|
<label th:for="onlineStatus" th:text="是"></label>
|
||||||
<table id="bootstrap-table"></table>
|
</div>
|
||||||
|
<div class="radio-box">
|
||||||
|
<input type="radio" name="onlineStatus" th:checked="*{bizProduct.onlineStatus==0}" value="0">
|
||||||
|
<label th:for="onlineStatus" th:text="否"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">产品描述:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<textarea name="remark" th:field="*{bizProduct.remark}" class="form-control" required maxlength="80"></textarea>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
<div id="tab-2" class="tab-pane">
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">产品主图:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="hidden" name="mainImage" th:value="*{bizProduct.mainImage}">
|
||||||
|
<div class="file-loading">
|
||||||
|
<input class="form-control file-upload" id="mainImage" name="file" type="file">
|
||||||
|
</div>
|
||||||
|
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 只能上传png jpg gif图片且大小不能超过200KB</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">产品详情图(最多20张):</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="file-loading">
|
||||||
|
<input class="form-control file-upload" id="detailImages" multiple name="file" type="file">
|
||||||
|
</div>
|
||||||
|
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 只能上传png jpg gif图片且大小不能超过200KB</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">产品轮播图(最多5张):</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="file-loading">
|
||||||
|
<input class="form-control file-upload" id="loopImages" multiple name="file" type="file">
|
||||||
|
</div>
|
||||||
|
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 只能上传png jpg gif图片且大小不能超过200KB</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<th:block th:include="include :: footer" />
|
</form>
|
||||||
<script th:inline="javascript">
|
<style>
|
||||||
var prefix = ctx + "business/product";
|
.file-drop-zone-title{padding:45px 10px}
|
||||||
$("#form-product-edit").validate({
|
.file-thumbnail-footer{height:30px !important;}
|
||||||
focusCleanup: true
|
.file-footer-caption{margin-bottom:0 !important;}
|
||||||
});
|
.kv-file-content{width: 150px !important;height: 100px !important;}
|
||||||
|
</style>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "business/product";
|
||||||
|
$("#form-product-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
function submitHandler() {
|
var detailStr = $("#hiddenDetail").val().replace(/[\[\]]/g, "");
|
||||||
if ($.validate.form()) {
|
var loopStr = $("#hiddenLoop").val().replace(/[\[\]]/g, "");
|
||||||
$.operate.save(prefix + "/edit", $('#form-product-edit').serialize());
|
var detailImagesArr = detailStr.length ? detailStr.split(",") : [];
|
||||||
|
var loopImagesArr = loopStr.length ? loopStr.split(",") : [];
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
let saveData = $('#form-product-edit').serialize();
|
||||||
|
if(detailImagesArr.length > 0){
|
||||||
|
detailImagesArr.forEach((url)=>saveData += "&detailImages=" + url);
|
||||||
}
|
}
|
||||||
|
if(loopImagesArr.length > 0){
|
||||||
|
loopImagesArr.forEach((url)=>saveData += "&loopImages=" + url);
|
||||||
|
}
|
||||||
|
$.operate.save(prefix + "/edit", saveData);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$(function() {
|
$("#mainImage").fileinput({
|
||||||
var options = {
|
uploadUrl: '/common/upload',
|
||||||
data: [[${bizProduct.bizProductImageList}]],
|
initialPreviewAsData: true,
|
||||||
pagination: false,
|
initialPreview: [$("input[name=mainImage]").val()],
|
||||||
showSearch: false,
|
maxFileCount: 1,
|
||||||
showRefresh: false,
|
maxFileSize: 200,
|
||||||
showToggle: false,
|
allowedFileTypes: ['image'],
|
||||||
showColumns: false,
|
allowedFileExtensions: ['jpg','png','gif','jpeg'],
|
||||||
sidePagination: "client",
|
autoReplace: true
|
||||||
columns: [{
|
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||||
checkbox: true
|
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
|
||||||
},
|
}).on('fileremoved', function (event, id, index) {
|
||||||
{
|
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||||
field: 'index',
|
});
|
||||||
align: 'center',
|
|
||||||
title: "序号",
|
|
||||||
formatter: function (value, row, index) {
|
|
||||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
|
||||||
return columnIndex + $.table.serialNumber(index);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'imageType',
|
|
||||||
align: 'center',
|
|
||||||
title: '附件类型:0-主图,1-详情图,2-轮播图',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='bizProductImageList[%s].imageType' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'imageName',
|
|
||||||
align: 'center',
|
|
||||||
title: '附件名称',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='bizProductImageList[%s].imageName' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'imageUrl',
|
|
||||||
align: 'center',
|
|
||||||
title: '附件地址',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='bizProductImageList[%s].imageUrl' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'createBy',
|
|
||||||
align: 'center',
|
|
||||||
title: '创建者',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='bizProductImageList[%s].createBy' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'createTime',
|
|
||||||
align: 'center',
|
|
||||||
title: '创建时间',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='bizProductImageList[%s].createTime' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'updateBy',
|
|
||||||
align: 'center',
|
|
||||||
title: '更新者',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='bizProductImageList[%s].updateBy' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'updateTime',
|
|
||||||
align: 'center',
|
|
||||||
title: '更新时间',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='bizProductImageList[%s].updateTime' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
|
|
||||||
}]
|
|
||||||
};
|
|
||||||
$.table.init(options);
|
|
||||||
});
|
|
||||||
|
|
||||||
function addColumn() {
|
$("#detailImages").fileinput({
|
||||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
uploadUrl: '/common/upload',
|
||||||
sub.editColumn();
|
initialPreviewAsData: true,
|
||||||
|
initialPreview: detailImagesArr,
|
||||||
$("#" + table.options.id).bootstrapTable('insertRow', {
|
maxFileCount: 20,
|
||||||
index: count,
|
maxFilesNum : 20,
|
||||||
row: {
|
maxFileSize: 200,
|
||||||
index: $.table.serialNumber(count),
|
allowedFileTypes: ['image'],
|
||||||
imageType: "",
|
allowedFileExtensions: ['jpg','png','gif','jpeg']
|
||||||
imageName: "",
|
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||||
imageUrl: "",
|
detailImagesArr.push(data.response.url);
|
||||||
createBy: "",
|
}).on('fileremoved', function (event, id, index) {
|
||||||
createTime: "",
|
detailImagesArr.splice(detailImagesArr.indexOf(data.response.url), 1);
|
||||||
updateBy: "",
|
});
|
||||||
updateTime: ""
|
|
||||||
}
|
$("#loopImages").fileinput({
|
||||||
});
|
uploadUrl: '/common/upload',
|
||||||
}
|
initialPreviewAsData: true,
|
||||||
</script>
|
initialPreview: loopImagesArr,
|
||||||
|
maxFileCount: 5,
|
||||||
|
maxFilesNum : 5,
|
||||||
|
maxFileSize: 200,
|
||||||
|
allowedFileTypes: ['image'],
|
||||||
|
allowedFileExtensions: ['jpg','png','gif','jpeg']
|
||||||
|
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||||
|
loopImagesArr.push(data.response.url);
|
||||||
|
}).on('fileremoved', function (event, id, index) {
|
||||||
|
loopImagesArr.splice(loopImagesArr.indexOf(data.response.url), 1);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue