Browse Source

Merge branch 'master' of http://git.iamberry.com/hexiugang/iamberry-common-parent

# Conflicts:
#	watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SalesOrder.java
liujiankang 5 years ago
parent
commit
a86d0201cb

+ 6 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml

@@ -163,6 +163,7 @@
                 <if test="salesIsSublist != null  and salesIsSublist !=''">
                     AND sales_is_sublist = #{salesIsSublist}
                 </if>
+
             </where>
             GROUP BY
             soi.sales_id
@@ -177,6 +178,11 @@
         LEFT JOIN tb_rst_cm_proc_method pm ON pm.proc_method_id = cr.proc_method_id
         LEFT JOIN tb_rst_cm_proc_type pt ON pt.proc_type_id = pm.proc_type_id
         LEFT JOIN tb_rst_sys_admin ao ON temp.sales_admin_id = ao.admin_id
+        <where>
+            <if test="procTypeId != null  and procTypeId !=''">
+                 pt.proc_type_id = #{procTypeId}
+            </if>
+        </where>
         ORDER BY
           temp.sales_create_time DESC
     </select>

+ 2 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java

@@ -785,12 +785,12 @@ public class AdminSalesOrderController {
         List<SalesOrderItem> salesOrderItemList = (List) JSONArray.toCollection(jsonArray, SalesOrderItem.class);
 
         //根据店铺查询客户是否自营
-        DealerChannel  dealerChannel = new DealerChannel();
+        /*DealerChannel  dealerChannel = new DealerChannel();
         dealerChannel.setStoreId(salesOrder.getSalesStoreId());
         List<DealerChannel> listDealer = dealerChannelService.getDealerChannelList(dealerChannel);
         if(listDealer.size() < 1){
             return  new ResponseJson(500, "未找到店铺客户信息", 500);
-        }
+        }*/
         for (SalesOrderItem salesOrderItem:salesOrderItemList) {
             if(salesOrderItem.getItemNum() > 0 && salesOrderItem.getItemColorId() > 0){
                 ProductColor productColor = productService.getProduceColor(salesOrderItem.getItemColorId());

+ 9 - 6
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminMachineController.java

@@ -589,7 +589,8 @@ public class AdminMachineController {
             }else if(produce.getBerGenerateRules() == 2){
                 berQrcodeNum = berQrcode;
             }else if(produce.getBerGenerateRules() == 3){
-                berQrcodeNum =  generationBarCode(num);
+                String model = produce.getProducePattern() + produce.getProduceModel();
+                berQrcodeNum =  generationBarCode(num,model);
             }
             if(produce.getIsPrintQrcode() == 1) {
                 if (produce.getIsGeneralQrcode() == 2) {
@@ -658,11 +659,11 @@ public class AdminMachineController {
         }
         return barcode;
     }
-    private String productCodeModel = "B10R100AA12";//产品编码型号名
+    private String productCodeModel = "R100AA12";//产品编码型号名
     private Integer years = 2014;//计算年编码需要减去的数字
     private Integer days = 55;//计算日编码需要减去的数字
     //生成博乐宝条形码
-    public String generationBarCode(String serialNumber) {
+    public String generationBarCode(String serialNumber,String model) {
         String barcode = "";
         if(serialNumber.length() < 5){
             serialNumber = "0"+serialNumber;
@@ -710,7 +711,7 @@ public class AdminMachineController {
         }
         int num = (Integer.valueOf(nums[4]) + Integer.valueOf(nums[2]) + Integer.valueOf(nums[0])) * 5 + (Integer.valueOf(nums[3]) + Integer.valueOf(nums[1])) * 3;
         double checkCode = Math.ceil((double)num / 10) * 10 - num;
-        barcode = productCodeModel + dateMonthYear + serialNumber + (int)checkCode;
+        barcode = model + productCodeModel + dateMonthYear + serialNumber + (int)checkCode;
         return barcode;
     }
     /**
@@ -834,7 +835,8 @@ public class AdminMachineController {
                     }else if(produce.getBerGenerateRules() == 2){
                         berQrcodeNum = berQrcode;
                     }else if(produce.getBerGenerateRules() == 3){
-                        berQrcodeNum =  generationBarCode(num);
+                        String model = produce.getProducePattern() + produce.getProduceModel();
+                        berQrcodeNum =  generationBarCode(num,model);
                     }
                     if(produce.getIsPrintQrcode() == 1){
                         if(produce.getIsGeneralQrcode() == 2) {
@@ -879,7 +881,8 @@ public class AdminMachineController {
                     }else if(produce.getBerGenerateRules() == 2){
                         berQrcodeNum = berQrcode;
                     }else if(produce.getBerGenerateRules() == 3){
-                        berQrcodeNum =  generationBarCode(num);
+                        String model = produce.getProducePattern() + produce.getProduceModel();
+                        berQrcodeNum =  generationBarCode(num,model);
                     }
                     if(produce.getIsPrintQrcode() == 1) {
                         if (produce.getIsGeneralQrcode() == 2) {

+ 3 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/base/list_base.ftl

@@ -11,6 +11,7 @@
 <link rel="stylesheet" type="text/css" href="${path}/common/lib/Hui-iconfont/1.0.8/iconfont.css" />
 <link rel="stylesheet" type="text/css" href="${path}/common/static/h-ui.admin/skin/default/skin.css" id="skin" />
 <link rel="stylesheet" type="text/css" href="${path}/common/static/h-ui.admin/css/style.css" />
+<link rel="stylesheet" type="text/css" href="${path}/common/static/chosen/css/chosen.css" />
 
 <link rel="stylesheet" type="text/css" href="${path}/common/css/iconfont/iconfont.css" />
 <!--[if IE 6]>
@@ -35,4 +36,5 @@
 <script type="text/javascript" src="${path}/common/js/common/UnlimitedLevelContact.js"></script>
 
 <script type="text/javascript" src="${path}/common/js/common/address.js"></script>
-<script type="text/javascript" src="${path}/common/js/common/salesChannel.js"></script>
+<script type="text/javascript" src="${path}/common/js/common/salesChannel.js"></script>
+<script type="text/javascript" src="${path}/common/static/chosen/js/chosen.jquery.js"></script>

+ 130 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/perfect_detect.ftl

@@ -69,6 +69,12 @@
     <div class="input-box">
         <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-xs-9 col-sm-9 skin-minimal" style="margin: 10px 0px;padding-left: 0;">
+            <select name="complaintId"  id="complaintId" class="chosen3" style="width: 43px;">
+
+            </select>
+            <select name="smallClassId" id="smallClassId" class="chosen3" style="width: 43px;">
+
+            </select>
             <select id="questionId" name="questionId" class="chosen" style="width: 93%;">
                 <option value="">请选择客户问题</option>
                     <#if (listComplaintQuestionInfo?size > 0)>
@@ -341,6 +347,113 @@
         });
     }
 
+    /*监听问题类型 选择事件*/
+    $("[name='complaintId']").change(function(){
+        initComplaintSmallClassInfo($(this).val());
+    });
+
+    initComplaintTypeInfo();
+    /*初始化问题大类*/
+    function initComplaintTypeInfo() {
+        var customerCounselTypeOverall = null;
+        var complaintType = null;
+        $.ajax({
+            type: "POST",
+            data: {
+                complaintConsultingType : customerCounselTypeOverall,
+                complaintType : complaintType
+            },
+            url: "${path}/admin/complaintQuestion/list_complaintType",
+            async: true,
+            success: function(data){
+                var html = '';
+                var id;
+                if (data.returnCode == 200) {
+                    for(var i=0;i<data.returnMsg.complaintTypeInfoList.length;i++){
+                        var complaintTypeInfo = data.returnMsg.complaintTypeInfoList[i];
+                        if(i == 0 ){
+                            id = complaintTypeInfo.complaintId;
+                        }
+                        html += '<option value="'+ complaintTypeInfo.complaintId +'">'+ complaintTypeInfo.complaintClassName +'</option>';
+                    }
+                }else{
+                    html = '';
+                }
+                $("[name='complaintId']").html(html);
+                $("#complaintId").trigger("chosen:updated");//初始化
+                initComplaintSmallClassInfo(id);
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        });
+    }
+
+    /*显示小类*/
+    function initComplaintSmallClassInfo(complaintId,smallId){
+        if(complaintId == null || complaintId == ""){
+            var html = '';
+            $("[name='smallClassId']").html(html);
+        }else{
+            $.ajax({
+                type: "POST",
+                data: {
+                    complaintId : complaintId
+                },
+                url: "${path}/admin/complaintQuestion/list_complaintSmallClass",
+                async: true,
+                success: function(data){
+                    var html = '';
+                    if (data.returnCode == 200) {
+                        for(var i=0;i<data.returnMsg.complaintSmallClassInfoList.length;i++){
+                            var ComplaintSmallClassInfo = data.returnMsg.complaintSmallClassInfoList[i];
+                            html += '<option value="'+ ComplaintSmallClassInfo.smallClassId +'">'+ ComplaintSmallClassInfo.smallClassName +'</option>';
+                        }
+                    }else{
+                        html = '';
+                    }
+                    $("[name='smallClassId']").html(html);
+                    $("#smallClassId").trigger("chosen:updated");//初始化
+                    if(smallId != null && smallId != "" && typeof(smallId)!="undefined" ){
+                        $("select[name='smallClassId']").val(smallId);
+                    }
+                    listQuestion();
+                },
+                error: function(XmlHttpRequest, textStatus, errorThrown){
+                }
+            });
+        }
+    }
+
+    /*监听问题类型 选择事件*/
+    $("[name='smallClassId']").change(function(){
+        listQuestion();
+    });
+    function listQuestion(){
+        var smallClassId = $("#smallClassId").val();
+        $.ajax({
+            type: "POST",
+            data: {
+                smallClassId : smallClassId
+            },
+            url: "${path}/admin/complaintQuestion/list_question_all",
+            async: false,
+            success: function(data){
+                var html = "";
+                if (data.returnCode == 200) {
+                    for(var i=0;i<data.returnMsg.complaintQuestionInfoList.length;i++){
+                        var complaintQuestion= data.returnMsg.complaintQuestionInfoList[i];
+                        html += '<option value="'+ complaintQuestion.questionId +'">'+ complaintQuestion.questionName +'</option>';
+                    }
+                }else{
+                    html = '';
+                }
+                $("#questionId").html(html);
+                $("#questionId").trigger("chosen:updated");//初始化
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        });
+    }
 
     $('.chosen').chosen({
         no_results_text: "没有找到结果!",//搜索无结果时显示的提示
@@ -358,6 +471,23 @@
         group_search: false, //选项组是否可搜。此处搜索不可搜
         include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
     });
+    $('.chosen3').chosen({
+        no_results_text: "没有找到结果!",//搜索无结果时显示的提示
+        search_contains:true,   //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
+        allow_single_deselect:true, //单选下拉框是否允许取消选择。如果允许,选中选项会有一个x号可以删除选项
+        disable_search: false, //禁用搜索。设置为true,则无法搜索选项。
+        disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
+        inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
+        placeholder_text_single: '选择国家', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
+        width: '120px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
+        max_shown_results: 1000, //下拉框最大显示选项数量
+        display_disabled_options: false,
+        single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除
+        case_sensitive_search: false, //搜索大小写敏感。此处设为不敏感
+        group_search: false, //选项组是否可搜。此处搜索不可搜
+        include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
+    });
+
     $('.chosen2').chosen({
         search_contains:false,
         enable_split_word_search: true //分词搜索,选项词可通过空格或'[]'分隔。search_contains为false时才能看出效果

+ 6 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/list_wait_send_order.ftl

@@ -148,12 +148,16 @@
                 <td style="text-align: left;">
                     <#if o.salesOrderItemList ??>
                         <#list o.salesOrderItemList as d>
-                            <img style="width: 20px;height: 20px;" src="/common/images/zhudindan.png"><span class="label label-success radius">${(d.itemProductName)!}(${(d.itemProductColor)!})*${(d.itemNum)!}</span><br>
+                            <#if d_index == 0><img style="width: 20px;height: 20px;" src="/common/images/zhudindan.png"></#if>
+                            <#if d_index gt 0><span style="margin-left: 23px;" src=""></span></#if>
+                            <span class="label label-success radius">${(d.itemProductName)!}(${(d.itemProductColor)!})*${(d.itemNum)!}</span><br>
                         </#list>
                     </#if>
                     <#if o.suSalesOrderItemList ??>
                         <#list o.suSalesOrderItemList as d>
-                            <img style="width: 20px;height: 20px;" src="/common/images/zidingdan.png"><span class="label label-success radius">${(d.itemProductName)!}(${(d.itemProductColor)!})*${(d.itemNum)!}</span><span style="display: none;">${(d.itemOrderId)!}</span><br>
+                            <#if d_index == 0><img style="width: 20px;height: 20px;" src="/common/images/zidingdan.png"></#if>
+                            <#if d_index gt 0><span style="margin-left: 23px;" src=""></span></#if>
+                            <span class="label label-success radius">${(d.itemProductName)!}(${(d.itemProductColor)!})*${(d.itemNum)!}</span><span style="display: none;">${(d.itemOrderId)!}</span><br>
                         </#list>
                     </#if>
                 </td>

+ 7 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/print_order.ftl

@@ -60,12 +60,17 @@
                                     <td style="text-align: left;">
                                         <#if o.salesOrderItemList ??>
                                             <#list o.salesOrderItemList as d>
-                                                <#if o.suSalesOrderItemList ??><img style="width: 20px;height: 20px;" src="/common/images/zhudindan.png"></#if><span class="label label-success radius">${(d.itemProductName)!}(${(d.itemProductColor)!})*${(d.itemNum)!}</span><br>
+                                                <#if o.suSalesOrderItemList ??>
+                                                    <#if d_index == 0><img style="width: 20px;height: 20px;" src="/common/images/zhudindan.png"></#if>
+                                                    <#if d_index gt 0><span style="margin-left: 24px;" src=""></span></#if>
+                                                </#if><span class="label label-success radius">${(d.itemProductName)!}(${(d.itemProductColor)!})*${(d.itemNum)!}</span><br>
                                             </#list>
                                         </#if>
                                         <#if o.suSalesOrderItemList ??>
                                             <#list o.suSalesOrderItemList as d>
-                                                <img style="width: 20px;height: 20px;" src="/common/images/zidingdan.png"><span class="label label-success radius">${(d.itemProductName)!}(${(d.itemProductColor)!})*${(d.itemNum)!}</span><span style="display: none;">${(d.itemOrderId)!}</span><br>
+                                                <#if d_index == 0><img style="width: 20px;height: 20px;" src="/common/images/zhudindan.png"></#if>
+                                                <#if d_index gt 0><span style="margin-left: 24px;" src=""></span></#if>
+                                                <span class="label label-success radius">${(d.itemProductName)!}(${(d.itemProductColor)!})*${(d.itemNum)!}</span><span style="display: none;">${(d.itemOrderId)!}</span><br>
                                             </#list>
                                         </#if>
                                     </td>

File diff suppressed because it is too large
+ 29 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl


+ 4 - 4
watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_print_List.ftl

@@ -149,7 +149,7 @@
     function code128(barcode){
         $("#codeId").val(barcode);
         $("#bcTarget").empty().barcode($("#codeId").val(), "code128",{
-            barWidth:1, barHeight:43,showHRI:true
+            barWidth:1, barHeight:43,showHRI:true,fontSize: 14
         });
     }
 
@@ -207,7 +207,7 @@
                                     '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;visibility:hidden;">型号:'+producePattern+'-'+produceModel+'</span>' +
                                     '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
                                     '<div style="position: absolute;padding-top: 25px;" id="bcTarget2" class="barcodeImg">'+barcodes2+'</div>' +
-                                     /*'<span style="position: absolute;padding-top: 100px;padding-left: -100px;" id="barcodeId">'+machineBarcode+'</span>' +*/
+                                    /* '<span style="position: absolute;padding-top: 100px;padding-left: -100px;" id="barcodeId">'+machineBarcode+'</span>' +*/
                                     '</div>');
                             // $("#printlist").append();
                         }else{
@@ -225,7 +225,7 @@
                         if(isGeneralQrcode == 1 || berGenerateRules == 2){
                             $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
                                 '<span style="position: absolute;left: 10px;font-size: 14px;"></span>' +
-                                '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;visibility:hidden;">型号:'+producePattern+'-'+produceModel+'</span>' +
+                                '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;">生产日期:'+produceCreateTime+'</span>' +
                                 '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
                                 '<div style="position: absolute;left: 5px;top: 64px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
                                 '<span style="position: absolute;top: 85px;left: 10px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +
@@ -434,7 +434,7 @@
                 if(isGeneralQrcode == 1 || berGenerateRules == 2){
                     $("#printlist").append('<div style="width: 242px;height: 120px;position: relative;">' +
                             '<span style="position: absolute;left: 10px;font-size: 14px;"></span>' +
-                            '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;visibility:hidden;">型号:'+producePattern+'-'+produceModel+'</span>' +
+                            '<span style="position: absolute;top: 25px;left: 10px;font-size: 12px;">生产日期:'+produceCreateTime+'</span>' +
                             '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
                             '<div style="position: absolute;left: 5px;top: 64px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
                             '<span style="position: absolute;top: 85px;left: 10px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +