浏览代码

增加工厂报价和客户报价字段

liujiankang 6 年之前
父节点
当前提交
4a54b228fb

+ 21 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerCommon.java

@@ -95,6 +95,11 @@ public class CustomerCommon implements Serializable {
     private String salesOrderId;
     //是否需要添加订单
     private Integer isNeedSelectOrder;
+
+    //工厂维修报价
+    private Integer relationFactoryCosts;
+    //客户报价
+    private Integer relationCustomerCosts;
     //签收时间
     @DateTimeFormat(pattern="yyyy-MM-dd")
     private Date relationBackReceiptDate;
@@ -448,4 +453,20 @@ public class CustomerCommon implements Serializable {
     public void setSalesOrderList(List<SalesOrder> salesOrderList) {
         this.salesOrderList = salesOrderList;
     }
+
+    public Integer getRelationFactoryCosts() {
+        return relationFactoryCosts;
+    }
+
+    public void setRelationFactoryCosts(Integer relationFactoryCosts) {
+        this.relationFactoryCosts = relationFactoryCosts;
+    }
+
+    public Integer getRelationCustomerCosts() {
+        return relationCustomerCosts;
+    }
+
+    public void setRelationCustomerCosts(Integer relationCustomerCosts) {
+        this.relationCustomerCosts = relationCustomerCosts;
+    }
 }

+ 16 - 6
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Repair.java

@@ -71,12 +71,14 @@ public class Repair implements Serializable {
     //20180327 当前邮费默认为  0 不需要
     //是否已转账邮费  0:不需要 10:需要转账
     private Integer repairIsTransfer;
-    //维修费用
-    private Integer repairCosts;
     //  创建时间 
     private Date repairCreateTime;
     //  修改时间 ,
     private Date repairUpdateTime;
+    //工厂维修报价
+    private Integer repairFactoryCosts;
+    //客户报价
+    private Integer repairCustomerCosts;
     //  签收日期 ,
     @DateTimeFormat(pattern="yyyy-MM-dd")
     private Date repairBackReceiptDate;
@@ -507,11 +509,19 @@ public class Repair implements Serializable {
         this.repairBackReceiptDate = repairBackReceiptDate;
     }
 
-    public Integer getRepairCosts() {
-        return repairCosts;
+    public Integer getRepairFactoryCosts() {
+        return repairFactoryCosts;
     }
 
-    public void setRepairCosts(Integer repairCosts) {
-        this.repairCosts = repairCosts;
+    public void setRepairFactoryCosts(Integer repairFactoryCosts) {
+        this.repairFactoryCosts = repairFactoryCosts;
+    }
+
+    public Integer getRepairCustomerCosts() {
+        return repairCustomerCosts;
+    }
+
+    public void setRepairCustomerCosts(Integer repairCustomerCosts) {
+        this.repairCustomerCosts = repairCustomerCosts;
     }
 }

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

@@ -102,7 +102,8 @@
       repair_update_time,
       repair_alipay_name,
       repair_back_receipt_date,
-      repair_costs
+      repair_factory_costs,
+      repair_customer_costs
     from
       tb_rst_repair
     <where>
@@ -149,7 +150,8 @@
     <result column="repair_create_time" property="repairCreateTime"/>
     <result column="repair_update_time" property="repairUpdateTime"/>
     <result column="repair_back_receipt_date" property="repairBackReceiptDate"/>
-    <result column="repair_costs" property="repairCosts"/>
+    <result column="repair_factory_costs" property="repairFactoryCosts"/>
+    <result column="repair_customer_costs " property="repairCustomerCosts"/>
     <collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>
   </resultMap>
 
@@ -195,7 +197,7 @@
       area_number, repair_send_merge_address, repair_send_address, 
       repair_send_logistics_company, repair_send_logistics_no, 
       repair_desc, repair_state, repair_alipay, repair_alipay_name,
-      repair_is_transfer
+      repair_is_transfer,repair_factory_costs,repair_customer_costs
       )
     values (#{customerId,jdbcType=INTEGER}, #{orderId,jdbcType=INTEGER},
       #{signclosedId,jdbcType=INTEGER}, #{repairBackEfastOrderId,jdbcType=VARCHAR}, #{repairBackStatus,jdbcType=BIT}, 
@@ -206,7 +208,7 @@
       #{areaNumber,jdbcType=VARCHAR}, #{repairSendMergeAddress,jdbcType=VARCHAR}, #{repairSendAddress,jdbcType=VARCHAR}, 
       #{repairSendLogisticsCompany,jdbcType=VARCHAR}, #{repairSendLogisticsNo,jdbcType=VARCHAR}, 
       #{repairDesc,jdbcType=VARCHAR}, #{repairState,jdbcType=BIT}, #{repairAlipay,jdbcType=VARCHAR}, #{repairAlipayName,jdbcType=VARCHAR},
-      #{repairIsTransfer,jdbcType=BIT}
+      #{repairIsTransfer,jdbcType=BIT},#{repairFactoryCosts,jdbcType=INTEGER},#{repairCustomerCosts,jdbcType=INTEGER}
       )
   </insert>
 
@@ -301,8 +303,11 @@
       <if test="repairBackReceiptDate != null" >
         repair_back_receipt_date = #{repairBackReceiptDate},
       </if>
-      <if test="repairCosts != null" >
-        repair_costs = #{repairCosts}
+      <if test="repairFactoryCosts != null" >
+        repair_factory_costs = #{repairFactoryCosts},
+      </if>
+      <if test="repairCustomerCosts != null" >
+        repair_customer_costs  = #{repairCustomerCosts}
       </if>
     </set>
     where repair_id = #{repairId}

+ 4 - 0
watero-rst-service/src/main/java/com/iamberry/rst/util/CustomerCommonUtil.java

@@ -76,6 +76,8 @@ public class CustomerCommonUtil {
                 repair.setRepairIsTransfer(c.getRelationIsTransfer());
                 repair.setRepairCreateTime(c.getRelationCreateTime());
                 repair.setRepairUpdateTime(c.getRelationUpdateTime());
+                repair.setRepairFactoryCosts(c.getRelationFactoryCosts()*100);
+                repair.setRepairCustomerCosts(c.getRelationCustomerCosts()*100);
                 return repair;
             case 5://补发
                 Reissue reissue = new Reissue();
@@ -226,6 +228,8 @@ public class CustomerCommonUtil {
                 customerCommon.setRelationUpdateTime(repair.getRepairUpdateTime());
                 customerCommon.setMaintenanceIsRepair(repair.getMaintenanceIsRepair());
                 customerCommon.setDetectState(repair.getDetectState());
+                customerCommon.setRelationFactoryCosts(repair.getRepairFactoryCosts()== null ? null: repair.getRepairFactoryCosts()/100);
+                customerCommon.setRelationCustomerCosts(repair.getRepairCustomerCosts() == null ? null:repair.getRepairCustomerCosts()/100);
                 break;
             case 5://补发
                 Reissue reissue = (Reissue)object;

+ 10 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/add_customer.ftl

@@ -526,7 +526,16 @@
                     &nbsp;&nbsp;&nbsp;&nbsp;<span id="DTS-in"></span>&nbsp;&nbsp;  <span id="DTS-out"></span>
                 </div>
             </div>
-
+            <div class="row cl" id="customerCostsDiv" style="display: none;">
+                  <label class="form-label col-1 col-sm-1">工厂报价:</label>
+                  <div class="col-2 col-sm-2">
+                     <input type="text" class="input-text trim_input" placeholder="工厂报价" id="relationFactoryCosts" name="relationFactoryCosts" value="">
+                  </div>
+                  <label class="form-label col-1 col-sm-1">给客户报价:</label>
+                  <div class="col-2 col-sm-2">
+                    <input type="text" class="input-text trim_input" placeholder="客户报价" id="relationCustomerCosts" name="relationCustomerCosts" value="">
+                  </div>
+            </div>
             <div class="row cl" id="sendAddressInfo">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>寄回信息:</label>
                 <div class="formControls col-5 col-sm-5" style="height: 240px" id="sendAddressSmsHtml">

+ 11 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_customer.ftl

@@ -654,6 +654,17 @@
                     &nbsp;&nbsp;&nbsp;&nbsp;<span id="DTS-in"><#if customerInfo.customerInTDS??>进水:${customerInfo.customerInTDS} PPM</#if></span>&nbsp;&nbsp;  <span id="DTS-out"><#if customerInfo.customerOutTDS??>出水:${customerInfo.customerOutTDS} PPM</#if></span>
                 </div>
             </div>
+            <div class="row cl" id="customerCostsDiv" style="display: none;">
+                            <label class="form-label col-1 col-sm-1">工厂报价:</label>
+                    <div class="col-2 col-sm-2">
+                            <input type="text" class="input-text trim_input" placeholder="工厂报价" id="relationFactoryCosts" name="relationFactoryCosts" value="${customerCommon.relationFactoryCosts!''}">
+                            </div>
+                            <label class="form-label col-1 col-sm-1">给客户报价:</label>
+                    <div class="col-2 col-sm-2">
+                  <input type="text" class="input-text trim_input" placeholder="客户报价" id="relationCustomerCosts" name="relationCustomerCosts" value="${customerCommon.relationCustomerCosts!''}">
+               </div>
+            </div>
+
             <div class="row cl" id="sendAddressInfo">
                 <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>寄回信息:</label>
                 <div class="formControls col-5 col-sm-5" style="height: 250px" id="sendAddressSmsHtml">

+ 6 - 2
watero-rst-web/src/main/webapp/common/js/customer/customer.js

@@ -435,7 +435,7 @@ function initProcessResult(type,allCustomerInfoType){
         $("#reissue").hide();
         $("#backGoods").hide();
         $("#noReasonBack").hide();
-
+        $("#customerCostsDiv").hide();
         switch(type)
         {
             case 1:
@@ -452,7 +452,7 @@ function initProcessResult(type,allCustomerInfoType){
                 break;
         }
     }else if(allCustomerInfoType == 2){ //售后
-
+        $("#customerCostsDiv").hide();
         if(!isInitSendAddressSms){
             initComplaintQuestionInfo("m");
             isInitSendAddressSms = true;
@@ -541,6 +541,7 @@ function initProcessResult(type,allCustomerInfoType){
                     $("#salesChannelsSelect").show();  //展示销售公司
                     $("#TDScollect").show();
                 }
+                $("#customerCostsDiv").show();
                 break;
             case 5://补发
                 result = isSolve.reissue;
@@ -569,6 +570,7 @@ function initProcessResult(type,allCustomerInfoType){
                     $("#salesChannelsSelect").show();  //展示销售公司
                     $("#TDScollect").show();
                 }
+                $("#customerCostsDiv").hide();
                 break;
             case 6: //退货
                 result = isSolve.backGoods;
@@ -597,6 +599,7 @@ function initProcessResult(type,allCustomerInfoType){
                     $("#salesChannelsSelect").show();  //展示销售公司
                     $("#TDScollect").show();
                 }
+                $("#customerCostsDiv").hide();
                 break;
             case 7://无理由退货
                 result = isSolve.noReasonBack;
@@ -625,6 +628,7 @@ function initProcessResult(type,allCustomerInfoType){
                     $("#salesChannelsSelect").show();  //展示销售公司
                     $("#TDScollect").show();
                 }
+                $("#customerCostsDiv").hide();
                 break;
             default:
                 break;