浏览代码

订单模块修改

zhengjinyi 3 年之前
父节点
当前提交
40efb102a6

+ 8 - 5
src/main/resources/static/css/supplier-center/order/detail.css

@@ -21,7 +21,8 @@
     .pro-information li {width: 100%;padding: 10px 0;}
     .pro-information li div {display: inline-block;width:20%;text-align: center;color: #627386;}
      .pro-information li div:last-child{width: 12%}
-    .pro-information li div.product-img {width: 46%;text-align: left;}
+    .pro-information li div.product-img {width: 46%;text-align: left;position: relative;}
+    .product-img .tips{width: 40px;height: 20px;border-radius: 2px;font-size: 12px;line-height: 20px;text-align: center;display: block;position: absolute;top: 0;left: 0;color: #FFFFFF; background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);}
     .product-img img {width: 70px;height: 70px;border: solid 1px #e2e7ef;}
     .product-img h3 {display: inline-block;width: 300px;margin-left: 10px;font-size: 16px;color: #22272e;vertical-align: middle;word-break: break-all;overflow: hidden;text-overflow: ellipsis;display: -webkit-inline-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical}
     .info-title {color: #22272e;font-size: 16px;padding: 15px;}
@@ -34,9 +35,10 @@
     .order-info .content {background: #fff;padding: 15px;box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.07);}
     .order-item.pay span {color: #e15616;}
     .sett-re {margin-top: 20px}
-    .sett-re div:nth-child(1) {color: #22272e;font-size: 16px;padding: 15px}
-    .sett-re div:nth-child(2) {background: #fff;height: 72px;line-height: 72px;padding-left: 15px;color: #22272e}
-    .sett-re div:nth-child(2) p {display: inline-block;margin-right: 15px}
+    .sett-re .title{color: #22272e;font-size: 16px;padding: 15px}
+    .sett-re .payShopRecord {background: #fff;height: auto;line-height: 72px;padding-left: 15px;color: #22272e;padding:20px;}
+    .sett-re .payShopRecord div{width: 100%;height: 40px;float: left;}
+    .sett-re .payShopRecord p {display: inline-block;margin-right: 15px;line-height: 40px;float: left;}
     .NoText{color: #627386}
     .section-botton {width: 100%;height: 76px;box-sizing: border-box;float: left;padding: 20px;background-color: #FFFFFF;margin-top: 20px}
     .section-botton .inner .btn {width: 90px;height: 36px;background-color: #ffe6dc;border-radius: 2px;border: solid 1px #e15616;text-align: center;line-height: 36px;color: #e15616;display: inline-block;margin-right: 16px;float: right;}
@@ -71,8 +73,9 @@
     .product-title li:nth-child(2) {text-align: left}
     .pro-information li {width: 100%;padding: 2.7vw 0;list-style: none;}
     .pro-information li div {display: inline-block;text-align: center;top: 9.6vw;width: 30%;position: relative}
-    .pro-information li div.product-img {width: 100%;text-align: left;top: 0}
+    .pro-information li div.product-img {width: 100%;text-align: left;top: 0;position: relative;}
     .pro-information li div:nth-child(2){text-align: left;}
+    .product-img .tips{position:absolute;background:#ff4500;line-height:5vw;height:5vw;padding:0 2vw;white-space:nowrap;font-size:3.1vw;color:#FFF;top:0;left:0}
     .product-img img {width: 15vw;height: 15vw;border: solid 1px #e2e7ef}
     .product-img h3 {width: 36.8vw;font-size: 3.4vw;letter-spacing: .27vw;white-space: normal;vertical-align: middle;word-break: break-all;overflow: hidden;text-overflow: ellipsis;display: -webkit-inline-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical}
     .info-title {color: #22272e;font-size: 3.4vw;padding: 4vw;}

+ 4 - 2
src/main/resources/static/css/supplier-center/order/orderlist.css

@@ -20,7 +20,8 @@ input::placeholder{color: #9aa5b5;font-size: 12px;}
 .order-botton{width: 100%;overflow: hidden;height: 60px;line-height: 60px;}
 .order-botton div{float: right;}
 .order-botton a{width: 90px;height: 36px;background-color: #ffe6dc;border-radius: 2px;border: solid 1px #e15616;text-align: center;line-height: 36px;color: #e15616;display: inline-block;margin-right: 16px;}
-.order-product .product-img{width: 100px;height: 100px;border: solid 1px #e2e7ef;float: left;}
+.order-product .product-img{width: 100px;height: 100px;border: solid 1px #e2e7ef;float: left;position: relative;}
+.order-product .product-img .tips{width: 40px;height: 20px;border-radius: 2px;font-size: 12px;line-height: 20px;text-align: center;display: block;position: absolute;top: 0;left: 0;color: #FFFFFF; background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);}
 .product-info .num{margin-right: 80px;}
 .order-product .product-img img{width: 100%;height: 100%;}
 .order-product .product-info{float: right;width: 87%;}
@@ -59,9 +60,10 @@ input::placeholder{color: #9aa5b5;}
 .order-botton div{float: right;}
 .order-botton a{margin-left: 2.7vw;width: 22.4vw;height: 9.6vw;background-color: #ffe6dc;border-radius: .53vw;border: solid .27vw #e15616;text-align: center;line-height: 9.6vw;color: #e15616;display: inline-block}
 .order-botton .deatil{border: .27vw solid #1890f9;line-height: 7.2vw;right: 5.7vw;position: absolute;top: 10vw;width: 22.4vw;height: 7.2vw;border-radius: 3.6vw;color: #1890f9;background: #e0f1ff}
-.order-product .product-img{width: 28VW;height: 28VW;border: solid 1px #e2e7ef;float: left;}
+.order-product .product-img{width: 28VW;height: 28VW;border: solid 1px #e2e7ef;float: left;position: relative;}
 .product-info .num:nth-child(1){float: left;}
 .product-info .num:nth-child(2){float: right;}
+.order-product .product-img .tips{position:absolute;background:#ff4500;line-height:5vw;height:5vw;padding:0 2vw;white-space:nowrap;font-size:3.1vw;color:#FFF;top:0;left:0}
 .order-product .product-img img{width: 100%;height: 100%;}
 .order-product .product-info{float: right;width: 65%;}
 .order-product{overflow: hidden;margin-bottom: 1.9vw;}

+ 1 - 1
src/main/resources/static/js/common/ajax.service.js

@@ -45,7 +45,7 @@ var Http = {
                 if(res.code== -99){
                     CAIMEI.Storage.clear();
                     setBeforeUrl();
-                    location.href = "/login.html";
+                    // location.href = "/login.html";
                 }else{
                     def.resolve(res);
                 }

+ 3 - 2
src/main/resources/static/js/common/serviceapi/shopping.service.js

@@ -113,10 +113,11 @@ var ShoppingApi = {
          */
         ShoppingAddCart:function (params, callback) {
             Http.AjaxService({
-                url:'/shoppingCart/addCart',
+                url:'/order/club/cart/add',
                 type:'post',
                 data:params,
-                json:false
+                json:false,
+                isHost:true
             })
             .then(function(res){
                 callback(res);

+ 9 - 3
src/main/resources/static/js/shopping/cart.js

@@ -148,7 +148,7 @@ var shoppingCart = new Vue({
                 if (_self.allChecked) {
                     _self.submitIds = [];
                     _self.listData.forEach(function(supplier){
-                        supplier.checked = true;
+                        supplier.isChecked = true;
                         if(supplier.cartList.length>0){
                             supplier.cartList.forEach(function(cartItem){
                                 _self.submitIds.push(cartItem.productId);
@@ -158,7 +158,7 @@ var shoppingCart = new Vue({
                 }else{
                     _self.submitIds = [];
                     _self.listData.forEach(function(supplier){
-                        supplier.checked = false;
+                        supplier.isChecked = false;
                     });
                 }
                 _self.computedPrice();
@@ -271,8 +271,10 @@ var shoppingCart = new Vue({
                 shop.cartList.forEach(function(pros){
                     if(_self.submitIds.includes(pros.productId*1)){
                         _self.totalCouponList.forEach(function (coupon,index){//循环优惠券
+                            console.log('asdasdasdada')
                             switch(coupon.couponType){
                                 case 0:// 活动券
+                                    console.log('00000000000')
                                     if(coupon.productType == 1){// 活动券-全商城商品
                                         if(_self.totalPrice >= coupon.touchPrice){
                                             eligibleCoupons.push(coupon)
@@ -286,6 +288,7 @@ var shoppingCart = new Vue({
                                     }
                                     break;
                                 case 1:// 品类券适用于产品或者仪器 categoryType(commodityType) : 1 产品  2 仪器
+                                    console.log('111111111111')
                                     if( coupon.categoryType && coupon.categoryType == pros.commodityType){
                                         if(_self.totalPrice >= coupon.touchPrice){
                                             eligibleCoupons.push(coupon)
@@ -293,18 +296,21 @@ var shoppingCart = new Vue({
                                     }
                                     break;
                                 case 2:// 用户专享券 适用于商城全部商品
+                                    console.log('2222222222')
                                     if(_self.totalPrice >= coupon.touchPrice){
                                         eligibleCoupons.push(coupon)
                                     }
                                     break;
                                 case 3:// 店铺券适用于某个供应商的全部商品
-                                    if(coupon.shopId && pros.supplierId == coupon.shopId){
+                                    if(coupon.shopId && pros.shopId == coupon.shopId){
+                                        console.log('33333333333')
                                         if(_self.totalPrice >= coupon.touchPrice){
                                             eligibleCoupons.push(coupon)
                                         }
                                     }
                                     break;
                                 case 4://新用户券 适用于商城全部商品
+                                    console.log('444444444444')
                                     if(_self.totalPrice >= coupon.touchPrice){
                                         eligibleCoupons.push(coupon)
                                     }

+ 6 - 10
src/main/resources/static/js/supplier-center/order/delivergoods.js

@@ -6,7 +6,6 @@ var delivergoods = new Vue({
         userInfo: {},
         productList: [],
         submitIds: [],//去结算商品Ids
-        inputVal:'',
         allChecked: false,
         check:false,
         open: false,
@@ -65,24 +64,22 @@ var delivergoods = new Vue({
         },
         changeCountSub:function(order) {//商品数量减
             var _this = this;
-            if(_this.inputVal > 1) {
-                _this.inputVal--;
+            if(order.inputVal > 1) {
+                order.inputVal--;
             }
-            order.inputVal =_this.inputVal;
         },
         changeaddCount:function (order) {//商品数量加
             var _this = this;
             var num=order.notOutStore - order.actualCancelNum;
-            if(_this.inputVal>=num){
-                _this.inputVal =num
+            if(order.inputVal>=num){
+                order.inputVal =num
             }else {
-             _this.inputVal++
+                order.inputVal++
             }
-            order.inputVal = _this.inputVal;
         },
         numberChange: function(order){
             var _this = this;
-           order.inputVal = _this.inputVal
+            console.log('监听手动输入发货数量')
         },
         getDataInfo:function (){
             var _self = this;
@@ -92,7 +89,6 @@ var delivergoods = new Vue({
                     _self.userInfo = data.userInfo;
                     data.orderProductList.forEach(function(order){
                         order.inputVal = order.notOutStore - order.actualCancelNum;
-                        _self.inputVal=order.inputVal
                     });
                     _self.productList = data.orderProductList;
                 }

+ 3 - 2
src/main/resources/static/js/supplier-center/order/logistics.js

@@ -67,6 +67,7 @@ var logistics = new Vue({
             var _this = this;
             var obj = {number:''};
             item.numList.push(obj);
+            console.log('logisticList',_this.logisticList)
         },
         subBtn:function (list) {
             var _this = this;
@@ -79,6 +80,7 @@ var logistics = new Vue({
         parameter:function(){//参数信息
             var _this = this;
             var record=[];
+            var logisticsArray = [];
             $('.pro-information li').each(function(){//发货数
                 var productobj={};
                 productobj.orderProductId = Number($(this).attr('orderproductid'));
@@ -92,7 +94,6 @@ var logistics = new Vue({
                 var Code = pros.value;
                 var yName = pros.name;
                 var numList = pros.numList;
-                var logisticsArray = [];
                 numList.forEach(function (item) {
                     var logisNum = item.number;
                     obj={
@@ -106,10 +107,10 @@ var logistics = new Vue({
                          CAIMEI.dialog('请输入快递单号',false);
                     }else {
                         logisticsArray.push(obj);
-                        _this.params.logistics = JSON.stringify(logisticsArray)
                     }
                 })
             })
+            _this.params.logistics = JSON.stringify(logisticsArray);
         },
         ChangeLogistics:function(event,item,index){
              var donClass = '#logistics'+index;

+ 1 - 1
src/main/resources/static/js/supplier-center/order/qualifications.js

@@ -196,7 +196,7 @@ var addlogistics = new Vue({
         },
         editButtonCanel:function(){//暂不填写
             var _this = this;
-            window.location.href = '/supplier/order/delivery_record.html?shopOrderID='+_this.shopOrderId;
+            window.location.href = '/supplier/order/delivery_record.html?shopOrderId='+_this.shopOrderId;
         }
     },
     mounted:function () {

+ 4 - 3
src/main/resources/static/js/user-center/collection/collection.js

@@ -103,9 +103,10 @@ var orderPage = new Vue({
             var _self = this;
             ShoppingApi.ShoppingAddCart(
                 {
-                    userID:_self.listQuery.userId,
-                    productID:pros.productId,
-                    productCount:pros.minBuyNumber
+                    productCount:pros.minBuyNumber,
+                    productId:pros.productId,
+                    userId:_self.listQuery.userId,
+                    source:1
                 },
                 function (response) {
                     if(response.code === 0){

+ 2 - 2
src/main/resources/templates/components/header.html

@@ -4,9 +4,9 @@
         <div class="wrap clear">
             <div class="header_top_left">欢迎来到采美采购服务平台</div>
             <div class="header_top_left"></div>
-            <ul class="header_top_ul">
+            <ul class="header_top_ul" >
                 <li class="headCart">
-                    <a href="javascript:void(0)" class="addBtn icon" @click="goCartsLinkFn" onclick="_czc.push(['_trackEvent','顶部导航','购物车','点击','','Um_Event_Cart'])">购物车<em v-text="'('+headCart.cartCount+')'"></em></a>
+                    <a v-if="userIdentity!=3" href="javascript:void(0)" class="addBtn icon" @click="goCartsLinkFn" onclick="_czc.push(['_trackEvent','顶部导航','购物车','点击','','Um_Event_Cart'])">购物车<em v-text="'('+headCart.cartCount+')'"></em></a>
                     <div class="cartData">
                         <div v-if="headCart.cartCount>0">
                             <div class="cartMain">

+ 1 - 1
src/main/resources/templates/supplier-center/order/delivery.html

@@ -68,7 +68,7 @@
                                         <div class="delivery-number">
                                             <span class="red">*</span>本次发货:
                                             <span class="sp-delivery-cal sp-delivery-reduce" @click="changeCountSub(order)">-</span>
-                                            <input type="number" class="del-num" v-model="inputVal" @change="numberChange(order)"/>
+                                            <input type="number" class="del-num" v-model="order.inputVal" @change="numberChange(order)"/>
                                             <span class="sp-delivery-cal sp-delivery-add" @click="changeaddCount(order)">+</span>
                                         </div>
                                     </div>

+ 5 - 4
src/main/resources/templates/supplier-center/order/detail.html

@@ -50,17 +50,18 @@
                         <ul class="product-title">
                             <li>商品信息</li>
                             <li>单价</li>
-                            <li>数量(赠品数)</li>
+                            <li>数量</li>
                             <li>总价</li>
                         </ul>
                         <ul class="pro-information">
                             <li v-for="pro in orderList ">
                                 <div class="product-img">
+                                    <span class="tips" v-if="pro.productType==2||pro.productType==1">赠品</span>
                                     <img :src="pro.image"/>
                                     <h3>{{pro.name}}</h3>
                                 </div>
                                 <div>¥{{pro.price}}</div>
-                                <div>{{pro.num}}({{pro.presentNum}})</div>
+                                <div>{{pro.num}}</div>
                                 <div>¥{{pro.totalAmount}}</div>
                             </li>
                         </ul>
@@ -93,8 +94,8 @@
                          </div>
                     </div>
                     <div class="sett-re">
-                        <div>结算记录</div>
-                        <div class="shadow" v-if="payShopRecord !=''">
+                        <div class="title">结算记录</div>
+                        <div class="payShopRecord shadow clear" v-if="payShopRecord !=''">
                              <div v-for="pay in payShopRecord">
                                  <p>{{pay.status}}.结算时间:{{pay.payTime}}</p>
                                  <p>结算金额:¥{{pay.payAmount}}</p>

+ 2 - 1
src/main/resources/templates/supplier-center/order/list.html

@@ -31,7 +31,7 @@
                 <div class="new-s-item">
                         <form action="">
                             <div class='order-border'><span>订单编号:</span><input type="text" id="order-number" v-model="params.shopOrderNo" class="Buyer" placeholder="请输入订单编号"></div>
-                            <div class='order-border'><span>买家名称:</span><input type="text" id="name-buyer" v-model="params.receiver" class="Buyer" placeholder="请输入买家名称"> </div>
+                            <div class='order-border'><span>收货人名称:</span><input type="text" id="name-buyer" v-model="params.receiver" class="Buyer" placeholder="请输入收货人名称"> </div>
                             <div>
                                 结算状态:
                                 <select name="" id="settlement-status" class="state" @change="getpayStatus($event)">
@@ -83,6 +83,7 @@
                                     <div class="order-product" v-for="proitem in order.orderProductList">
                                         <div class="product-img">
                                             <img :src="proitem.image"/>
+                                            <span class="tips" v-if="proitem.productType==2||proitem.productType==1">赠品</span>
                                         </div>
                                         <div class="product-info">
                                             <h3>{{proitem.name}}</h3>