|
@@ -0,0 +1,246 @@
|
|
|
+<!DOCTYPE HTML>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <meta name="renderer" content="webkit|ie-comp|ie-stand">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
+ <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
|
|
+ <meta http-equiv="Cache-Control" content="no-siteapp" />
|
|
|
+<#include "/base/add_base.ftl">
|
|
|
+ <title>添加拆单策略 - H-ui.filter v2.4</title>
|
|
|
+ <style>
|
|
|
+ .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
|
|
|
+ .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
|
|
|
+ .tit-2{position: relative;font-size: 16px;padding-left: 10px;color: #50a2ea;display: inline-block;}
|
|
|
+ .tit-2:after{content: '';position: absolute;left: 0;top: 50%;height: 6px;width: 6px;border-radius: 6px;margin-top: -3px; background-color: #32a3d8;}
|
|
|
+ .my-title{font-weight: 500;padding-left: 15px;position: relative;}
|
|
|
+ .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
|
|
|
+ .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
|
|
|
+ .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
|
|
|
+ .input-box{margin: 18px 0;}
|
|
|
+ .input-dic{float: left;margin:5px 10px 0 0;font-size: 14px;}
|
|
|
+ .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
|
|
|
+ .add-list>li{margin: 10px 0;}
|
|
|
+ .my-textarea{padding: 5px 10px;width: 77%;border:1px solid rgba(0,0,0,.1);margin-left: 12.5%;}
|
|
|
+ .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
|
|
|
+ .my-btn-submit{padding: 10px 20px;width: 158px; background-color: #50a2ea;color: #fff;border: 1px solid #50a2ea;cursor:pointer;margin: 10px 10px 0 10px;}
|
|
|
+ .my-select {
|
|
|
+ border: 1px solid rgba(0,0,0,.1);
|
|
|
+ padding: 6px 50px 6px 15px;
|
|
|
+ height: 34px;
|
|
|
+ -webkit-appearance: none;
|
|
|
+ appearance: none;
|
|
|
+ background: url(/common/images/pts/select-11.png) right center no-repeat;
|
|
|
+ background-size: auto 100%;
|
|
|
+ }
|
|
|
+ .check-box, .radio-box{padding-left: 0;}
|
|
|
+ input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
|
|
|
+ input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
|
|
|
+ .huanhang{ float:left}
|
|
|
+ input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
|
|
|
+ input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
|
|
|
+ </style>
|
|
|
+ <meta name="keywords" content="${path}">
|
|
|
+ <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<article class="page-container">
|
|
|
+ <form class="form form-horizontal" id="form-admin-add">
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-3">
|
|
|
+ <div class="tit-2">新增拆单策略</div>
|
|
|
+ </label>
|
|
|
+ <div class="formControls col-9">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>添加产品:</label>
|
|
|
+ <div class="formControls col-8 col-sm-8">
|
|
|
+ <input type="button" class="btn btn-primary add-order-button" onclick="add_product()" value="添加产品" >
|
|
|
+ <table class="table table-border table-bg table-bordered" style="margin-top: 10px;display: none;" id="all_add_product">
|
|
|
+ <thead>
|
|
|
+ <tr class="text-c" id="table1">
|
|
|
+ <th style="text-align: center;" width="30" >产品名称</th>
|
|
|
+ <th style="text-align: center;" width="25" >产品颜色</th>
|
|
|
+ <#--<th style="text-align: center;" width="10">售价</th>-->
|
|
|
+ <th style="text-align: center;" width="10">数量</th>
|
|
|
+ <th style="text-align: center;" width="10">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="add_product">
|
|
|
+ <#--<tr><td id="noMachineTr" colspan="4" class="td-manage text-c noMachineTr" >暂时没有产品,请添加!</td></tr>-->
|
|
|
+ <#--<#if complaintSignclosedInfo.signclosedProductInfoList??>
|
|
|
+ <#if (complaintSignclosedInfo.signclosedProductInfoList?size > 0)>
|
|
|
+ <#list complaintSignclosedInfo.signclosedProductInfoList as info>
|
|
|
+ <tr class="text-c">
|
|
|
+ <input type="hidden" class="color_id" id="" value="${info.signclosedProductColor!''}" >
|
|
|
+ <td>${info.productName!''}</td>
|
|
|
+ <td>${info.colorName!''}</td>
|
|
|
+ <#–<td>${info.colorPrice!''}</td>–>
|
|
|
+ <td><input type="text" class="input-text input-number item-num" style="width: 100%;border: none;text-align: center;" name="" id="" placeholder="产品数量" value="${info.productNum!''}" onkeyup="keyFun($(this),999,1)" onpaste="keyFun($(this),999,1)"></td>
|
|
|
+ <td><a href="javascript:void(0)" class="del_product all_down" onclick="delProduct($(this))" >删除</a></td>
|
|
|
+ </tr>
|
|
|
+ </#list>
|
|
|
+ </#if>
|
|
|
+ </#if>-->
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <input type="hidden" id="orderItemString" name="orderItemString" value="" >
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"><span class="c-red">*</span>优先级:</label>
|
|
|
+ <div class="formControls col-5 col-sm-5 huanhang" style="margin: 10px 0px 10px 0;">
|
|
|
+ <input class="my-input" type="text" value="${priorityNum!""}" name="downsingleSorting" id="downsingleSorting" placeholder="请输入优先级" style="width: 78%;"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">备注信息:</label>
|
|
|
+ <div class="formControls col-5 col-sm-5 huanhang" style="margin: 10px 0px 10px 0;">
|
|
|
+ <textarea type="text" placeholder="" id="downsingleDesc" name="downsingleDesc" style="width: 80%;height: 80px;"></textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;"></label>
|
|
|
+ <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px 10px 0;padding-left: 0;">
|
|
|
+ <button type="button" class="my-btn-submit" onclick="addDownsingleRuleInfo();" style="margin-top: 20px;">确认新建</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+</article>
|
|
|
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
|
|
+<script type="text/javascript">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除商品
|
|
|
+ */
|
|
|
+ function delProduct($this){
|
|
|
+ $this.parents("tr").remove();
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 添加产品
|
|
|
+ */
|
|
|
+ function add_product() {
|
|
|
+ layer_show("商品列表", "${path}/admin/salesOrder/to_add_product","1000","500");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 添加
|
|
|
+ */
|
|
|
+ function addDownsingleRuleInfo() {
|
|
|
+
|
|
|
+ var downsingleSorting = $("#downsingleSorting").val();
|
|
|
+ if(downsingleSorting == null || downsingleSorting == ""){
|
|
|
+ layer.msg("优先级不能为空!", {icon: 5, time: 2000});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //选择产品
|
|
|
+ var flag = false;
|
|
|
+ /*封装订单项*/
|
|
|
+ var orderItemArray = new Array();
|
|
|
+ $("#add_product").find("tr").each(function(){
|
|
|
+ var orderItem = new Object();
|
|
|
+ orderItem.itemColorBar = $(this).find(".color_bar").val();
|
|
|
+ orderItem.itemNum = $(this).find(".item-num").val();
|
|
|
+ orderItemArray.push(orderItem);
|
|
|
+ flag = true;
|
|
|
+ })
|
|
|
+ if(!flag){
|
|
|
+ vailErrorMsg($(".add-order-button"),"必须要有一个产品");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ $("#orderItemString").val(JSON.stringify(orderItemArray));
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ cache: true,
|
|
|
+ type: "POST",
|
|
|
+ data: $('#form-admin-add').serialize(),
|
|
|
+ url: "${path}/admin/downsingleRule/addDownsingleRule",
|
|
|
+ async: false,
|
|
|
+ success: function(data){
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ layer.msg("添加成功!", {icon: 1, time: 1000},function () {
|
|
|
+ window.location.href= '${path}/admin/downsingleRule/select_downsingleRule_list';
|
|
|
+ });
|
|
|
+ /*layer.msg("添加成功!", {icon: 1, time: 2000});*/
|
|
|
+ } else {
|
|
|
+ layer.msg("添加失败!", {icon: 5, time: 5000});
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ layer.msg("添加失败!", {icon: 5, time: 2000});
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 选择商品回调
|
|
|
+ * @param colorIds
|
|
|
+ */
|
|
|
+ function setSelectProduct(colorIds){
|
|
|
+ var index = layer.load(1, {
|
|
|
+ shade: [0.5,'#fff'] //0.1透明度的白色背景
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#all_add_product").show();
|
|
|
+
|
|
|
+ var colorIdArray = colorIds.split("_");
|
|
|
+ for(var i=0;i<colorIdArray.length;i++){
|
|
|
+ var colorId = colorIdArray[i];
|
|
|
+ if(colorId == ""){
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ var flag = true;
|
|
|
+ $("#add_product").find("tr").each(function (){
|
|
|
+ var colId = $(this).find(".color_id").eq(0).val();
|
|
|
+ if(colId == colorId){
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(!flag){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: { colorId : colorId},
|
|
|
+ url: "${path}/admin/product/get_product",
|
|
|
+ success: function(data){
|
|
|
+ var html = "";
|
|
|
+ if (data.returnCode == 200 && data.returnMsg.productColorList.length > 0 ) {
|
|
|
+ $("#all_add_product").show();
|
|
|
+ for(var i=0;i<data.returnMsg.productColorList.length;i++){
|
|
|
+ var productColor = data.returnMsg.productColorList[i];
|
|
|
+ html += '<tr class="text-c">' +
|
|
|
+ '<input type="hidden" class="color_bar" id="" value="'+ productColor.colorBar +'" >' +
|
|
|
+ ' <td>'+ cufte(productColor.productName) +'</td>' +
|
|
|
+ ' <td>'+ cufte(productColor.colorName) +'</td>' +
|
|
|
+ /*' <td>'+ cufte(productColor.colorPrice)/100 +'</td>' +*/
|
|
|
+ ' <td><input type="text" class="input-text input-number item-num" style="width: 100%;border: none;text-align: center;" name="" id="" placeholder="产品数量" value="1" onkeyup="keyFun($(this),999,1)" onpaste="keyFun($(this),999,1)"></td>' +
|
|
|
+ ' <td><a href="javascript:void(0)" class="del_product all_down" onclick="delProduct($(this))" >删除</a></td>' +
|
|
|
+ ' </tr>';
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ html = '<tr class="text-c"><td colspan="12">没有搜索到商品,请重试!</td></tr>';
|
|
|
+ }
|
|
|
+ $("#add_product").append(html);
|
|
|
+ /*计算价格*/
|
|
|
+ calculatePrice();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ layer.close(index);
|
|
|
+ }
|
|
|
+</script>
|
|
|
+</body>
|
|
|
+</html>
|