Browse Source

【机构】-订单3

chao 4 years ago
parent
commit
809e7daa52

+ 1 - 0
src/main/resources/static/css/base/base.h5.css

@@ -151,6 +151,7 @@
 .payAlert p,.payAlert ul{margin-bottom:2vw;}
 .payAlert em{font-style:normal;color:#e15616;}
 .payAlert i{font-style:normal;color:#f55c5c;}
+.payAlert .copy{display:inline-block;height:6.4vw;line-height:6.4vw;padding:0 3vw;color:#FFF;margin-left:2vw;background-color:#ff2929;background-image:linear-gradient(214deg,#ff2929 0%,#ff6d1b 100%)}
 /* 登录弹框 */
 .loginAlert{padding-top:1vw;text-align:center;}
 .loginAlert span{display:block}

+ 1 - 0
src/main/resources/static/css/base/base.pc.css

@@ -231,6 +231,7 @@ header{box-shadow: 0 2px 10px #ebecef;}
 .payAlert p,.payAlert ul{margin-bottom:10px;}
 .payAlert em{font-style:normal;color:#e15616;}
 .payAlert i{font-style:normal;color:#f55c5c;}
+.payAlert .copy{display:inline-block;height:24px;line-height:24px;padding:0 15px;color:#FFF;margin-left:8px;background-color:#ff2929;background-image:linear-gradient(214deg,#ff2929 0%,#ff6d1b 100%)}
 /*分页*/
 .pageWrap{width:1184px;text-align:center;margin:20px auto 36px}
 .pageWrap a{box-sizing:border-box;display:inline-block;width:40px;height:40px;line-height:40px;border:1px solid #EBECEF;font-size:16px;margin:0 5px;color:#2D3036;background:#fff;border-radius:2px}

+ 10 - 2
src/main/resources/static/js/base.js

@@ -256,8 +256,16 @@ $(function(){
         $(this).parents('#topSearch').find('.keyword').val($(this).text());
         $(this).parents('#topSearch').find('.searchBtn').trigger("click");
     });
-
-
+    // 支付弹框复制标识
+    $('body').on("click", '.payAlert .copy',function () {
+        var oInput = document.createElement('textarea');
+        oInput.value = $(this).parents('.payAlert').find('.no').text();
+        document.body.appendChild(oInput);
+        oInput.select(); // 选择对象
+        document.execCommand("Copy"); // 执行浏览器复制命令
+        document.body.removeChild(oInput);
+        CAIMEI.dialog('复制成功');
+    });
 
 });
 // 公共方法

+ 4 - 5
src/main/resources/static/js/user-center/order/detail.js

@@ -137,7 +137,7 @@ var orderPage = new Vue({
                            '<ul><li>开户行:中信银行(深圳泰然支行)</li>' +
                                 '<li>银行卡号:6217 6803 0362 0897</li>' +
                                 '<li>户名:周仁声</li>' +
-                                '<li>订单标识<em>'+this.orderIdentificationId+'</em></li></ul>' +
+                                '<li>订单标识<em class="no">'+this.orderIdentificationId+'</em><em class="copy">复制</em></li></ul>' +
                            '<p><i>请在转账备注中填写上述订单标识,方便财务快速审核,提高发货速度</i></p>' +
                          '</div>',
                 confitmBtnText: '确定',
@@ -160,7 +160,7 @@ var orderPage = new Vue({
                             _self.modelType = 1;
                             CAIMEI.Popup({
                                 content: '<div class="payAlert">您有采美余额<em>¥'+toFloat(r.data.ableUserMoney)+'</em>暂未使用,是否需要抵扣订单? 抵扣后您只需再支付<em>¥'+toFloat(r.data.pendingPayments)+'</em></div>',
-                                confitmBtnText: '抵扣,继续付款',
+                                confitmBtnText: '抵扣',
                                 cancelBtnText: '不抵扣,继续付款'
                             },function(){
                                 // 抵扣,继续付款
@@ -174,15 +174,14 @@ var orderPage = new Vue({
                             _self.modelType = 2;
                             CAIMEI.Popup({
                                 content: '<div class="payAlert">您有采美余额<em>¥'+toFloat(r.data.ableUserMoney)+'</em>暂未使用,是否需要抵扣订单? 抵扣后订单支付完成</div>',
-                                confitmBtnText: '抵扣,继续付款',
+                                confitmBtnText: '抵扣',
                                 cancelBtnText: '不抵扣,继续付款'
                             },function(){
                                 // 抵扣,继续付款
                                 _self.hanldCancelConfirm(1);
                             },function(){
                                 // 不抵扣,继续付款
-                                //_self.hanldCancelConfirm();
-                                _self.showModelTypePop();
+                                _self.hanldCancelConfirm();
                             });
                             break;
                         case -1:

+ 51 - 6
src/main/resources/static/js/user-center/order/list.js

@@ -211,34 +211,77 @@ var orderPage = new Vue({
         hanldDetilsOrderFn:function(orderId){//订单详情
             window.location.href='/user/order/detail.html?orderId='+orderId;
         },
+        showModelTypePop: function(){
+            CAIMEI.Popup({
+                content: '<div class="payAlert">' +
+                           '<p>您已通过线下转账的方式支付了订单部分款项,剩余款项依然需要使用线下转账方式,给您带来的不便敬请谅解</p>' +
+                           '<p>待付金额:<em>¥'+toFloat(this.payModelData.pendingPayments)+'</em></p>' +
+                           '<ul><li>开户行:中信银行(深圳泰然支行)</li>' +
+                                '<li>银行卡号:6217 6803 0362 0897</li>' +
+                                '<li>户名:周仁声</li>' +
+                                '<li>订单标识:<em class="no">'+this.orderIdentificationId+'</em><em class="copy">复制</em></li></ul>' +
+                           '<p><i>请在转账备注中填写上述订单标识,方便财务快速审核,提高发货速度</i></p>' +
+                         '</div>',
+                confitmBtnText: '确定',
+                cancelBtnText: '关闭'
+            },function(){
+                // 确定
+                this.hidePaymentConfirm();
+            },function(){
+                // 关闭
+            });
+        },
         hanldPayOrderFn:function(order,orderId){//支付订单
             var _self = this;
             _self.hanldOrderData = order;
             console.log(_self.hanldOrderData);
             _self.orderIdentificationId = '#'+orderId+'#';
-            OrderApi.OrderPaymentValidation({orderId:orderId},function(response){
-                if(response.code == 0){
-                    var dataCode = response.data.code;
-                    _self.payModelData = response.data;
+            OrderApi.OrderPaymentValidation({orderId:orderId},function(r){
+                if(r.code*1 === 0){
+                    var dataCode = r.data.code;
+                    _self.payModelData = r.data;
                     switch(dataCode){
                         case 1:
                             _self.modelType = 1;
+                            CAIMEI.Popup({
+                                content: '<div class="payAlert">您有采美余额<em>¥'+toFloat(r.data.ableUserMoney)+'</em>暂未使用,是否需要抵扣订单? 抵扣后您只需再支付<em>¥'+toFloat(r.data.pendingPayments)+'</em></div>',
+                                confitmBtnText: '抵扣',
+                                cancelBtnText: '不抵扣,继续付款'
+                            },function(){
+                                // 抵扣,继续付款
+                                _self.hanldCancelConfirm(1)
+                            },function(){
+                                // 不抵扣,继续付款
+                                _self.hanldCancelConfirm()
+                            });
                             break;
                         case 2:
                             _self.modelType = 2;
+                            CAIMEI.Popup({
+                                content: '<div class="payAlert">您有采美余额<em>¥'+toFloat(r.data.ableUserMoney)+'</em>暂未使用,是否需要抵扣订单? 抵扣后订单支付完成</div>',
+                                confitmBtnText: '抵扣',
+                                cancelBtnText: '不抵扣,继续付款'
+                            },function(){
+                                // 抵扣,继续付款
+                                _self.hanldCancelConfirm(1);
+                            },function(){
+                                // 不抵扣,继续付款
+                                _self.hanldCancelConfirm();
+                            });
                             break;
                         case -1:
                             CAIMEI.Alert('订单已申请全部退款,无需再付款!', '确定', false);
                             break;
                         default:
-                            if(response.data.onlinePayFlag == '1'){
+                            if(r.data.onlinePayFlag == '1'){
                                 _self.modelType = 3;
+                                _self.showModelTypePop();
                             }else{
                                 window.location.href = '/pay/caimei-paycash.html?type=payfirm&orderID='+orderId;
                             }
                     }
                 }else{
-                    CAIMEI.Alert(response.msg, '确定', false);
+                    CAIMEI.Alert(r.msg, '确定', false);
                 }
             })
         },
@@ -251,6 +294,7 @@ var orderPage = new Vue({
                     } else {
                         if (data.order.onlinePayFlag === '1') {
                             _self.modelType = 3;
+                            _self.showModelTypePop();
                         } else {
                             window.location.href = '/pay/caimei-paycash.html?type=payfirm&orderID='+_self.hanldOrderData.orderID;
                         }
@@ -264,6 +308,7 @@ var orderPage = new Vue({
             var _self = this;
             if(_self.hanldOrderData.onlinePayFlag == '1'){
                 _self.modelType = 3;
+                _self.showModelTypePop();
             }else{
                 window.location.href = '/pay/caimei-paycash.html?type=payfirm&orderID='+_self.hanldOrderData.orderID;
             }

+ 6 - 6
src/main/resources/templates/user-center/order/list.html

@@ -134,7 +134,7 @@
         </div>
     </div>
     <!--余额可抵扣部分-->
-    <div class="popup" v-if="modelType==1">
+    <!--<div class="popup" v-if="modelType==1">
         <div class="popup-layer bran">
             <div class="popup-title"> <p>提示</p> <i class="popup-close layui-layer-ico" @click="hidePaymentConfirm"></i></div>
             <div class="popup-content">
@@ -145,9 +145,9 @@
                 <div class="btn btn-confim" @click="hanldPaymentConfirm(1)">抵扣,继续付款</div>
             </div>
         </div>
-    </div>
+    </div>-->
     <!--余额可抵扣全部-->
-    <div class="popup" v-if="modelType==2">
+    <!--<div class="popup" v-if="modelType==2">
         <div class="popup-layer bran">
             <div class="popup-title"> <p>提示</p> <i class="popup-close layui-layer-ico" @click="hidePaymentConfirm"></i></div>
             <div class="popup-content">
@@ -158,9 +158,9 @@
                 <div class="btn btn-confim" @click="hanldPaymentConfirm(2)">抵扣</div>
             </div>
         </div>
-    </div>
+    </div>-->
     <!--线下转账提示-->
-    <div class="popup" v-if="modelType==3">
+    <!--<div class="popup" v-if="modelType==3">
         <div class="popup-layer bran">
             <div class="popup-title"> <p>提示</p> <i class="popup-close layui-layer-ico" @click="hidePaymentConfirm"></i></div>
             <div class="popup-content">
@@ -179,7 +179,7 @@
                 <div class="btn btn-onlinePayConfim" @click="hidePaymentConfirm">确定</div>
             </div>
         </div>
-    </div>
+    </div>-->
 </div>
 <!-- 引入底部 -->
 <template th:replace="components/footer"></template>