|
@@ -8,7 +8,7 @@
|
|
|
<meta http-equiv="Cache-Control" content="no-siteapp" />
|
|
|
<link rel="Bookmark" href="/favicon.ico" >
|
|
|
<link rel="Shortcut Icon" href="/favicon.ico" />
|
|
|
-<#include "/base/list_base.ftl">
|
|
|
+<#include "/base/add_base.ftl">
|
|
|
<title>客诉列表</title>
|
|
|
<style>
|
|
|
.tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
|
|
@@ -56,113 +56,187 @@
|
|
|
</head>
|
|
|
<body>
|
|
|
<div class="page-container">
|
|
|
- <div class="text-c">
|
|
|
- <form action="" method="post">
|
|
|
- <div class="row cl">
|
|
|
|
|
|
- <div class="formControls col-1 col-sm-1" style="margin-right: 30px;">
|
|
|
- <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="" name="" onclick="addOrder()">添加订单</button>
|
|
|
- </div>
|
|
|
+ <div class="order-list">
|
|
|
+ <div class="text-c">
|
|
|
+ <form action="" method="post">
|
|
|
+ <div class="row cl">
|
|
|
|
|
|
- <div class="formControls col-2 col-sm-2" > <span class="select-box">
|
|
|
- <select name="" class="select" id="companyId">
|
|
|
- <option value="">销售公司</option>
|
|
|
- <#if companyInfoList?? && (companyInfoList?size > 0) >
|
|
|
- <#list companyInfoList as companyInfo>
|
|
|
- <option value ="${companyInfo.companyId!""}">${companyInfo.companyName!""}</option>
|
|
|
- </#list>
|
|
|
- </#if>
|
|
|
- </select>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div class="formControls col-2 col-sm-2" > <span class="select-box">
|
|
|
- <select name="" class="select" id="storeId">
|
|
|
- </select>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div class="formControls col-2 col-sm-2"> <span class="select-box">
|
|
|
- <select name="" class="select" id="storeId">
|
|
|
- <option value="">所有类型</option>
|
|
|
- <option value="0">取消订单</option>
|
|
|
- <option value="1">待支付</option>
|
|
|
- <option value="2">已支付</option>
|
|
|
- <option value="3">退款申请中</option>
|
|
|
- <option value="4">已退款</option>
|
|
|
- <option value="5">已发货</option>
|
|
|
- <option value="6">申请退货中</option>
|
|
|
- <option value="7">退货中</option>
|
|
|
- <option value="8">订单退货,订单关闭</option>
|
|
|
- <option value="9">换货中</option>
|
|
|
- <option value="10">换货完成</option>
|
|
|
- <option value="11">申请换货中</option>
|
|
|
- <option value="12">已完成</option>
|
|
|
- <option value="13">全额付款</option>
|
|
|
- <option value="14">定金付款</option>
|
|
|
- </select>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div class="formControls col-2 col-sm-2" >
|
|
|
- <input type="text" class="input-text" value="" placeholder="订单编号" id="salesId" name="">
|
|
|
+ <#-- <div class="formControls col-1 col-sm-1" style="margin-right: 30px;">
|
|
|
+ <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="" name="" onclick="addOrder()">添加订单</button>
|
|
|
+ </div>-->
|
|
|
+ <div class="formControls col-2 col-sm-2" > <span class="select-box">
|
|
|
+ <select name="" class="select" id="companyId">
|
|
|
+ <option value="">销售公司</option>
|
|
|
+ <#if companyInfoList?? && (companyInfoList?size > 0) >
|
|
|
+ <#list companyInfoList as companyInfo>
|
|
|
+ <option value ="${companyInfo.companyId!""}">${companyInfo.companyName!""}</option>
|
|
|
+ </#list>
|
|
|
+ </#if>
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-2 col-sm-2" > <span class="select-box">
|
|
|
+ <select name="" class="select" id="storeId">
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-2 col-sm-2"> <span class="select-box">
|
|
|
+ <select name="" class="select" id="storeId">
|
|
|
+ <option value="">所有类型</option>
|
|
|
+ <option value="0">取消订单</option>
|
|
|
+ <option value="1">待支付</option>
|
|
|
+ <option value="2">已支付</option>
|
|
|
+ <option value="3">退款申请中</option>
|
|
|
+ <option value="4">已退款</option>
|
|
|
+ <option value="5">已发货</option>
|
|
|
+ <option value="6">申请退货中</option>
|
|
|
+ <option value="7">退货中</option>
|
|
|
+ <option value="8">订单退货,订单关闭</option>
|
|
|
+ <option value="9">换货中</option>
|
|
|
+ <option value="10">换货完成</option>
|
|
|
+ <option value="11">申请换货中</option>
|
|
|
+ <option value="12">已完成</option>
|
|
|
+ <option value="13">全额付款</option>
|
|
|
+ <option value="14">定金付款</option>
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-2 col-sm-2" >
|
|
|
+ <input type="text" class="input-text" value="" placeholder="订单编号" id="salesId" name="">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <div class="row cl" style="margin-top: 10px;">
|
|
|
+ <div class="row cl" style="margin-top: 10px;">
|
|
|
|
|
|
- <div class="formControls col-2 col-sm-2" >
|
|
|
- <input type="text" class="input-text" value="" placeholder="收货人姓名" id="salesAddressName" name="">
|
|
|
- </div>
|
|
|
- <div class="formControls col-2 col-sm-2">
|
|
|
- <input type="text" class="input-text" value="" placeholder="收货人电话" id="salesAddressTel" name="">
|
|
|
+ <div class="formControls col-2 col-sm-2" >
|
|
|
+ <input type="text" class="input-text" value="" placeholder="收货人姓名" id="salesAddressName" name="">
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-2 col-sm-2">
|
|
|
+ <input type="text" class="input-text" value="" placeholder="收货人电话" id="salesAddressTel" name="">
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-1 col-sm-1">
|
|
|
+ <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="searchOrder" name=""><i class="Hui-iconfont"></i> 搜索</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="formControls col-1 col-sm-1">
|
|
|
- <button type="button" class="btn btn-primary" style="background: #32a3d8;color: #fff;-webkit-transform:translateY(-5%);" id="searchOrder" name=""><i class="Hui-iconfont"></i> 搜索</button>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="mt-20 ">
|
|
|
+ <table class="table table-border table-bordered table-bg table-hover table-sort">
|
|
|
+ <thead>
|
|
|
+ <tr class="text-c">
|
|
|
+ <th width="50">渠道商</th>
|
|
|
+ <th width="60">订单编号</th>
|
|
|
+ <th width="100">收货人姓名</th>
|
|
|
+ <th width="80">收货人电话</th>
|
|
|
+ <th width="80">订单金额</th>
|
|
|
+ <th width="80">购买产品</th>
|
|
|
+ <th width="80">购买日期</th>
|
|
|
+ <th width="100">收货地址</th>
|
|
|
+ <th width="80">操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="orderAll">
|
|
|
+
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="order-add" style="display: none">
|
|
|
+ <form action="${path}/admin/customer/add_order_info" method="post" class="form form-horizontal" id="form-order-add" onkeydown="if(event.keyCode==13)return false;">
|
|
|
+ <div id="addOrder" >
|
|
|
+ <input type="hidden" name="itemJson" id="itemJson" value="">
|
|
|
+ <input type="hidden" name="salesStoreId" id="salesStoreId" value="0">
|
|
|
+ <input type="hidden" name="salesCompanyId" id="salesCompanyId" value="0">
|
|
|
+ <input type="hidden" name="salesPayType" id="salesPayType" value="1">
|
|
|
+ <input type="hidden" name="salesSendType" id="salesSendType" value="2">
|
|
|
+
|
|
|
+ <div style="">
|
|
|
+ <div class="row cl" id="productInfo" style="">
|
|
|
+ <label class="form-label col-1 col-sm-1" style="width: 110px;"><span class="c-red">*</span>购买信息:</label>
|
|
|
+ <div class="formControls col-10 col-sm-10">
|
|
|
+
|
|
|
+ <table class="table table-border table-bg table-bordered">
|
|
|
+ <thead>
|
|
|
+ <tr class="text-c">
|
|
|
+ <th style="text-align: center;" width="60">产品名称</th>
|
|
|
+ <th style="text-align: center;" width="60">产品颜色</th>
|
|
|
+ <th style="text-align: center;" width="60">产品配件</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="addProduct">
|
|
|
+
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="row cl" id="recipientInfo" style=" margin-top: 20px;">
|
|
|
+ <label class="form-label col-1 col-sm-1" style="width: 110px;"><span class="c-red">*</span>购买信息:</label>
|
|
|
+ <div class="formControls col-3 col-sm-3">
|
|
|
+ <input type="text" class="input-text" value="" placeholder="填写收件人姓名" id="sendName" name="salesAddressName" datatype="s1-20" errormsg="联系人格式不正确!" >
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-3 col-sm-3">
|
|
|
+ <input type="text" class="input-text associated-phone" value="" placeholder="填写收件人手机号" id="sendTel" name="salesAddressTel" datatype="m" errormsg="联系人电话格式不正确!">
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-3 col-sm-3">
|
|
|
+ <input type="text" placeholder="购买日期" id="salesPayTime" name="salesPayTime" datatype="*" class="input-text Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt: 'yyyy-MM-dd HH:mm:ss'})" readonly="readonly">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row cl" id="recipientAddress" style=" margin-top: 20px;">
|
|
|
+ <input type="hidden" id="addressInfo">
|
|
|
+ <label class="form-label col-1 col-sm-1" style="width: 110px;"><span class="c-red">*</span>收货地址:</label>
|
|
|
+ <div class="formControls col-3 col-sm-3">
|
|
|
+ <span class="select-box">
|
|
|
+ <select id="province" class="select" name="provinceNumber">
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-3 col-sm-3">
|
|
|
+ <span class="select-box">
|
|
|
+ <select id="city" class="select" name="cityNumber">
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-3 col-sm-3">
|
|
|
+ <span class="select-box">
|
|
|
+ <select id="district" class="select" name="areaNumber">
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <input type="hidden" name="salesAddressInfo" id="salesAddressInfo">
|
|
|
+ </div>
|
|
|
+ <div class="row cl" id="recipientAddressText" style=" margin-top: 20px;">
|
|
|
+ <label class="form-label col-1 col-sm-1" style="width: 110px;"></label>
|
|
|
+ <div class="formControls col-10 col-sm-10">
|
|
|
+ <textarea name="relationSendAddress" id="sendAddress" cols="" rows="2" class="textarea" placeholder="请填写详细地址,最多支持50字符" onKeyUp="$.Huitextarealength(this,50)"></textarea>
|
|
|
+ <span id="addrssMsg"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="row cl" margin-top: 20px;">
|
|
|
+ <label class="form-label col-1 col-sm-1" style="width: 110px;"></label>
|
|
|
+ <div class="formControls col-2 col-sm-2">
|
|
|
+ <button style="height: 40px;font-size: 15px;" class="btn btn-block btn-primary size-XL" type="submit">添加订单</button>
|
|
|
+ </div>
|
|
|
+ <div class="formControls col-2 col-sm-2">
|
|
|
+ <button style="height: 40px;font-size: 15px;" class="btn btn-block btn-primary size-XL" type="button" onclick="toSearch()">去搜索</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
|
|
|
|
- <div class="mt-20">
|
|
|
- <table class="table table-border table-bordered table-bg table-hover table-sort">
|
|
|
- <thead>
|
|
|
- <tr class="text-c">
|
|
|
- <th width="50">渠道商</th>
|
|
|
- <th width="60">订单编号</th>
|
|
|
- <th width="100">收货人姓名</th>
|
|
|
- <th width="80">收货人电话</th>
|
|
|
- <th width="80">订单金额</th>
|
|
|
- <th width="80">购买产品</th>
|
|
|
- <th width="80">购买日期</th>
|
|
|
- <th width="100">收货地址</th>
|
|
|
- <th width="80">操作</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody id="orderAll">
|
|
|
- <#--<#if page.dataList?? && (page.dataList?size > 0) >
|
|
|
- <#list page.dataList as customer>
|
|
|
- <tr class="text-c">
|
|
|
- <#–<td>${customer.customerId!''}</td>–>
|
|
|
- <td>${customer.produceName!''}</td>
|
|
|
- <td>${customer.customerName!''}</td>
|
|
|
- <td>${customer.customerVersion!''}</td>
|
|
|
- <td>${customer.componentsQuantity!'0'}</td>
|
|
|
- <td><#if customer.allComponentsCost?? >${customer.allComponentsCost/100}</#if></td>
|
|
|
- <td><#if customer.allComponentsWeight?? >${customer.allComponentsWeight}</#if></td>
|
|
|
- <td>${customer.customerRemarks!''}</td>
|
|
|
- <td>${(customer.customerUpdateTime?string("yyyy-MM-dd HH:mm:ss"))!''}</td>
|
|
|
- <td>${(customer.customerCreateTime?string("yyyy-MM-dd HH:mm:ss"))!''}</td>
|
|
|
- </tr>
|
|
|
- </#list>
|
|
|
- <#else>
|
|
|
- <tr><td colspan="10" class="td-manage text-c" >暂时没有Customer,请添加!</td></tr>
|
|
|
- </#if>-->
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
<tfoot>
|
|
|
<#--<#include "/base/page_util.ftl">-->
|
|
|
</tfoot>
|
|
@@ -243,7 +317,7 @@
|
|
|
async: true,
|
|
|
success: function(data){
|
|
|
var html = "";
|
|
|
- if (data.returnCode == 200) {
|
|
|
+ if (data.returnCode == 200 && data.returnMsg.salesOrderList.length > 0 ) {
|
|
|
for(var i=0;i<data.returnMsg.salesOrderList.length;i++){
|
|
|
var salesOrder = data.returnMsg.salesOrderList[i];
|
|
|
|
|
@@ -271,8 +345,9 @@
|
|
|
' </tr>';
|
|
|
}
|
|
|
}else{
|
|
|
- html = '';
|
|
|
+ html = "";
|
|
|
}
|
|
|
+ html += '<tr class="text-c"><td colspan="9">没有搜索到订单~ <a src="javascript:void(0)" style="color: #00e;text-decoration: underline;" onclick="addOrder()">去添加</a></td></tr>';
|
|
|
$("#orderAll").html(html);
|
|
|
layer.close(index);
|
|
|
},
|
|
@@ -290,12 +365,255 @@
|
|
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
|
|
}
|
|
|
|
|
|
+ function toSearch(){
|
|
|
+ $(".order-add").hide();
|
|
|
+ $(".order-list").show();
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+
|
|
|
+<script>
|
|
|
+ $(function (){
|
|
|
+ $("#form-order-add").Validform({
|
|
|
+ tiptype: function (msg, o, cssctl) {
|
|
|
+ if (o.type == 3) {//失败
|
|
|
+ layer.msg(msg, {icon: 5, time: 3000});
|
|
|
+ $(window).scrollTop(o.obj.offset().top - 40);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ datatype: {//自定义验证类型
|
|
|
+ },
|
|
|
+ ignoreHidden: true,
|
|
|
+ tipSweep: true, //若为true,则只在表单提交时验证
|
|
|
+ ajaxPost: true, //异步提交
|
|
|
+ beforeCheck: function (curform) { //验证通过之前执行的函数
|
|
|
+ },
|
|
|
+ beforeSubmit: function (curform) { //验证通过之后执行的函数
|
|
|
+ var pro = $("#province").find("option:selected").text();
|
|
|
+ var city = $("#city").find("option:selected").text();
|
|
|
+ var dis = $("#district").find("option:selected").text();
|
|
|
+ var addres = $("#sendAddress").val();
|
|
|
+ if(addres == null || addres == ""){
|
|
|
+ layer.msg("未填写详细地址", {icon: 5, time: 3000});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $("#salesAddressInfo").val(pro + "-" + city + "-" + dis + "-" + addres);
|
|
|
+
|
|
|
+ var itemList = new Array()
|
|
|
+ $("#addProduct").find(".input-color-number").each(function(){
|
|
|
+ var number = $(this).val();
|
|
|
+ if(number != null && number != ""){
|
|
|
+ var salesOrderItem = new Object();
|
|
|
+ salesOrderItem.itemProductId = $(this).parent().find(".input-produce-id").val();
|
|
|
+ salesOrderItem.itemColorId = $(this).parent().find(".input-color-id").val();
|
|
|
+ salesOrderItem.itemNum = number;
|
|
|
+ itemList.push(salesOrderItem);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ $("#itemJson").val(JSON.stringify(itemList));
|
|
|
+ },
|
|
|
+ callback: function (data) {//异步回调函数
|
|
|
+ if (data) {
|
|
|
+ var index = layer.alert(data.resultMsg, function () {
|
|
|
+ if (data.resultCode == 200) {
|
|
|
+ selectOrderInfo(data.returnMsg.orderId);
|
|
|
+ } else {
|
|
|
+ layer.close(index);
|
|
|
+ }
|
|
|
+ return ;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
/**
|
|
|
* 打开添加订单的页面
|
|
|
*/
|
|
|
function addOrder(){
|
|
|
- layer_show("添加订单信息","${path}/admin/customer/add_order","900","380");
|
|
|
+ $(".order-add").show();
|
|
|
+ $(".order-list").hide();
|
|
|
+
|
|
|
+ /*初始化产品*/
|
|
|
+ setProduce();
|
|
|
+
|
|
|
+ var provicesId = setAddressPro();
|
|
|
+ var cityId = setAddressCity(provicesId);
|
|
|
+ setAddressDis(cityId);
|
|
|
+
|
|
|
+ /*监听省选择事件*/
|
|
|
+ $(document).on('change', '#province', function() {
|
|
|
+ var proId = $("#province").val();
|
|
|
+ var city = setAddressCity(proId);
|
|
|
+ setAddressDis(city);
|
|
|
+ });
|
|
|
+
|
|
|
+ /*监听市选择事件*/
|
|
|
+ $(document).on('change', '#city', function() {
|
|
|
+ var city = $("#city").val();
|
|
|
+ setAddressDis(city);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ /*设置省*/
|
|
|
+ function setAddressPro(){
|
|
|
+ var provinceHtml = "";
|
|
|
+ var provices = listProvince();
|
|
|
+ for(var i=0;i<provices.length;i++){
|
|
|
+ provinceHtml += '<option value="'+ provices[i].provinceId +'">'+ provices[i].province +'</option>';
|
|
|
+ }
|
|
|
+ $("#province").html(provinceHtml);
|
|
|
+ return provices[0].provinceId;
|
|
|
}
|
|
|
+
|
|
|
+ /*设置市*/
|
|
|
+ function setAddressCity(proId){
|
|
|
+ var cityHtml = ''
|
|
|
+ var city = listCity( proId,"");
|
|
|
+ for(var i=0;i<city.length;i++){
|
|
|
+ cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
|
|
|
+ }
|
|
|
+ $("#city").html(cityHtml);
|
|
|
+ return city[0].cityId;
|
|
|
+ }
|
|
|
+ /*设置区*/
|
|
|
+ function setAddressDis(cityId){
|
|
|
+ var districtHtml = ''
|
|
|
+ var district = listDistrict(cityId ,"");
|
|
|
+ for(var i=0;i<district.length;i++){
|
|
|
+ districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
|
|
|
+ }
|
|
|
+ $("#district").html(districtHtml);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 展示产品
|
|
|
+ * @param orderItemList
|
|
|
+ */
|
|
|
+ function setProduce() {
|
|
|
+ var productList = getProduct() ; //所有产品
|
|
|
+ var html = "";
|
|
|
+ var productTypeNo = 0;
|
|
|
+
|
|
|
+ for(var i=0;i<productList.length;i++) {
|
|
|
+ var product = productList[i];
|
|
|
+ var produceFittings = getProduceFittings(product.productId); //获取该产品的所有配件
|
|
|
+ var colorList = product.colorList; //该产品的所有颜色
|
|
|
+
|
|
|
+ var productType = product.productType;
|
|
|
+
|
|
|
+ var colorHtml = '';
|
|
|
+ if(colorList != null && colorList.length >0 ){
|
|
|
+ colorHtml += '<table style="height: 100%;">';
|
|
|
+ for(var j=0;j<colorList.length;j++){
|
|
|
+ var number = "";
|
|
|
+ var color = colorList[j];
|
|
|
+// for(var k=0;k<orderItemList.length;k++){
|
|
|
+// var item = orderItemList[k];
|
|
|
+// if(item.itemColorId == color.colorId){
|
|
|
+// number = item.itemNum;
|
|
|
+// }
|
|
|
+// }
|
|
|
+ var fristInputStyle = "border-top: 1px solid #ddd;";
|
|
|
+ if(color.colorProductId == product.productId) {
|
|
|
+ colorHtml += '<tr >' +
|
|
|
+ ' <td width="85" style="border-left: none;text-align: center;'+ fristInputStyle +'">' + color.colorName + '</td>' +
|
|
|
+ ' <td width="15" style="'+ fristInputStyle +'">' +
|
|
|
+ ' <input type="hidden" class="input-produce-id" value="' + color.colorProductId + '">' +
|
|
|
+ ' <input type="hidden" class="input-color-id" value="' + color.colorId + '">' +
|
|
|
+ ' <input type="text" class="input-text input-color-number number-input" style="width: 100%;" value="'+ number +'" placeholder="数量" id="" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
|
|
|
+ ' </td>' +
|
|
|
+ ' </tr>';
|
|
|
+ fristInputStyle = "";
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ colorHtml += '</table>';
|
|
|
+ }else{
|
|
|
+ colorHtml += '<span>暂无该产品的颜色!<span>';
|
|
|
+ }
|
|
|
+
|
|
|
+ var produceFittingsHtml = '';
|
|
|
+ if(produceFittings != null && produceFittings.length > 0){
|
|
|
+ produceFittingsHtml += '<table style="height: 100%;">';
|
|
|
+ for(var m=0;m<produceFittings.length;m++){
|
|
|
+ var produceFit = produceFittings[m];
|
|
|
+ if(produceFit.productId == product.productId) {
|
|
|
+ var fristInputStyle = "border-top: 1px solid #ddd;";
|
|
|
+ produceFittingsHtml += '<tr >' +
|
|
|
+ ' <td width="85" style="border-left: none;text-align: center; '+ fristInputStyle +'">' + produceFit.fittingsName +'</td>' +
|
|
|
+ ' <td width="15" style="'+ fristInputStyle +'">' +
|
|
|
+ ' <input type="hidden" class="input-produce-id" value="' + produceFit.productId + '">' +
|
|
|
+ ' <input type="hidden" class="input-fittings-id" value="' + produceFit.fittingsId +'">' +
|
|
|
+ ' <input type="text" class="input-text input-fittings-number" style="width: 100%;" value="'+ number +'" placeholder="数量" id="" name="" onkeyup="keyFun($(this))" onpaste="keyFun($(this))" >' +
|
|
|
+ ' </td>' +
|
|
|
+ ' </tr>';
|
|
|
+ fristInputStyle = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ produceFittingsHtml += '</table>';
|
|
|
+ }else{
|
|
|
+ produceFittingsHtml += '<span>暂无产品配件!<span>';
|
|
|
+ }
|
|
|
+
|
|
|
+ var produceHtml = '<input type="hidden" value="'+ product.productId +'">' +
|
|
|
+ '<span>'+ product.productName +'</span>';
|
|
|
+
|
|
|
+ html += ' <tr >' +
|
|
|
+ ' <td width="80">'+ produceHtml +'</td>' +
|
|
|
+ ' <td style="padding: 0px;text-align: center;">' +
|
|
|
+ colorHtml +
|
|
|
+ ' </td>' +
|
|
|
+ ' <td style="padding: 0px;text-align: center;">' +
|
|
|
+ produceFittingsHtml +
|
|
|
+ ' </td>' +
|
|
|
+ '</tr>';
|
|
|
+ }
|
|
|
+
|
|
|
+ $("#addProduct").html(html);
|
|
|
+ }
|
|
|
+
|
|
|
+ /*获取产品*/
|
|
|
+ function getProduct(){
|
|
|
+ var productList;
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: {
|
|
|
+ },
|
|
|
+ url: "${path}/admin/customer/select_produce",
|
|
|
+ async: false,
|
|
|
+ success: function(data){
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ productList = data.returnMsg.productList;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return productList;
|
|
|
+ }
|
|
|
+
|
|
|
+ /*获取产品配件*/
|
|
|
+ function getProduceFittings(productId){
|
|
|
+ var produceFittings;
|
|
|
+ $.ajax({
|
|
|
+ type: "get",
|
|
|
+ data: {
|
|
|
+ productId : productId
|
|
|
+ },
|
|
|
+ url: "${path}/admin/customer/select_produce_fittings",
|
|
|
+ async: false,
|
|
|
+ success: function(data){
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ produceFittings = data.returnMsg.produceFittingsList;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return produceFittings;
|
|
|
+ }
|
|
|
+
|
|
|
</script>
|
|
|
</body>
|
|
|
</html>
|