Răsfoiți Sursa

上传代码

wangn 5 ani în urmă
părinte
comite
9270128f61
2 a modificat fișierele cu 165 adăugiri și 161 ștergeri
  1. 162 159
      ghsApp/src/pagesOrder/components/stepShip.vue
  2. 3 2
      ghsApp/src/pagesOrder/ship.vue

+ 162 - 159
ghsApp/src/pagesOrder/components/stepShip.vue

@@ -32,7 +32,7 @@
                                 <button @click="selfSend" class="admin-button-com blue big">
                                     本店送
                                 </button>
-                                <button @click="sendParcel" class="admin-button-com blue big">
+                                <button @click="sendParcel" class="admin-button-com blue big" v-if="orderComData.customId != '0'">
                                     发快递
                                 </button>
                             </view>
@@ -72,178 +72,181 @@
 </template>
 
 <script>
-    export default {
-        name:'stepShip',
-        comments:{
-        },
-        props:{
-            orderComData:{
-                type:Array,
-                default:()=>[]
-            }
-        },
-        data(){
-            return {
+export default {
+  name:'stepShip',
+  comments:{
+  },
+  props:{
+    orderComData:{
+      type:Object,
+      default:()=>{}
+    }
+  },
+  data(){
+    return {
 
-            }
-        },
-        methods:{
-												// type 本店送-发快递
-												// 确认送达
-												sendConfirm(type){
-													let self = this;
-													uni.showModal({
-														title: '提示',content: type=='本店送'?'确认送到了?':'快递送到后会自动确认,需要自己确定?',
-														success: function (res) {
-															if (res.confirm) {
-																self.$emit('sendConfirm',type)
-															}
-														}
-													});
-												},
-            // 发快递
-            sendParcel(){
-                this.$emit('sendParcel')
-            }, // 本店送
-            selfSend(){
-                this.$emit('selfSend',{
-                    type:0,
-                    text:'确认自己送货?'
-                })
-            }, //确认送达
-            affirmSend(){
-                //  "option": 【0没有选择 1本店送 2发快递】
-                this.$emit('affirmSend',{
-                    type:1,
-                    text: item.option == 1?'确认送到了吗?':'快递送到后会自动帮你确认,确认要自己操作吗?'
-                })
-            }
+    }
+  },
+  mounted() {
+    console.log('this.orderComData===>',this.orderComData)
+  },
+  methods:{
+    // type 本店送-发快递
+    // 确认送达
+    sendConfirm(type){
+      let self = this;
+      uni.showModal({
+        title: '提示',content: type=='本店送'?'确认送到了?':'快递送到后会自动确认,需要自己确定?',
+        success: function (res) {
+          if (res.confirm) {
+            self.$emit('sendConfirm',type)
+          }
         }
+      });
+    },
+    // 发快递
+    sendParcel(){
+        this.$emit('sendParcel')
+    }, 
+    // 本店送
+    selfSend(){
+        this.$emit('selfSend',{
+            type:0,
+            text:'确认自己送货?'
+        })
+    }, 
+    //确认送达
+    affirmSend(){
+        //  "option": 【0没有选择 1本店送 2发快递】
+        this.$emit('affirmSend',{
+            type:1,
+            text: item.option == 1?'确认送到了吗?':'快递送到后会自动帮你确认,确认要自己操作吗?'
+        })
     }
+  }
+}
 </script>
 
 <style lang="scss" scoped>
-    .step-content_box {
-        padding-bottom: 50upx;
-    }
-    .step-view_box {
-        margin-top: 20px;
-        padding:40px 25px 0px 20px;
-        background-color: #FFFFFF;
-        & .step-li_box {
-            display: flex;
-            & > .step-head_box {
-                position: relative;
-                & > .step-icon-def {
-                    width: 40px;
-                    height: 40px;
-                    background-color: transparent;
-                    position: relative;
-                    & .dot {
-                        width: 12upx;
-                        height: 12upx;
-                        background-color: #D8D8D8;
-                        border-radius: 50%;
-                        position: absolute;
-                        left: 50%;
-                        top: 50%;
-                        transform: translate(-50%,-50%);
-                    }
-
-                }
-                & > .step-icon_num {
-                    width: 40px;
-                    height: 40px;
-                    border-radius: 50%;
-                    background-color: #FDC3B8;
-                    // color: #FFFFFF;
-                    // font-size: 28px;
-                    position: relative;
-                    z-index: 50;
-                    & > .dot {
-                        width: 22upx;
-                        height: 22upx;
-                        border-radius: 50%;
-                        background-color: #F51608;
-                        position: absolute;
-                        left: 50%;
-                        top: 50%;
-                        transform: translate(-50%,-50%);
-                    }
+.step-content_box {
+  padding-bottom: 50upx;
+}
+.step-view_box {
+  margin-top: 20px;
+  padding:40px 25px 0px 20px;
+  background-color: #FFFFFF;
+    & .step-li_box {
+      display: flex;
+        & > .step-head_box {
+          position: relative;
+            & > .step-icon-def {
+              width: 40px;
+              height: 40px;
+              background-color: transparent;
+              position: relative;
+                & .dot {
+                  width: 12upx;
+                  height: 12upx;
+                  background-color: #D8D8D8;
+                  border-radius: 50%;
+                  position: absolute;
+                  left: 50%;
+                  top: 50%;
+                  transform: translate(-50%,-50%);
                 }
-                & > .step-line {
-                    height: 100%;
-                    width: 0px;
-                    border-left: 1px solid #E2E4E8;;
-                    position: absolute;
-                    left: 50%;
-                    top: 50%;
-                    transform: translate(-50%, -50%);
-                    z-index: 45;
 
-                }
             }
-            & > .step-main_box {
-                flex: 1;
-                padding-left: 20px;
-                & .step-tit {
-                    color: #141F25;
-                    font-size: 32px;
-                    font-weight: 600;
-                }
-                & .step-content_box {
-                    & .reach-content_box {
-                        padding:40upx 0 0upx;
-                        & > .admin-button-com {
-                            width: 100%;
-                        }
-                        & > .reach-time_box {
-                            color: #333333;
-                            font-size: 24;
-                            font-weight: 600;
-                        }
-                    }
-                    & .deliver-opiton_0 {
-                        padding: 60px 0 0px;
-                        & > .admin-button-com:nth-child(1){
-                            margin-right: 20px;
-                        }
-                        & > .admin-button-com {
-                            width: 310px;
-                            height: 90px;
-                            padding: 0;
-                            line-height: 90px;
-                            text-align: center;
+          & > .step-icon_num {
+            width: 40px;
+            height: 40px;
+            border-radius: 50%;
+            background-color: #FDC3B8;
+            // color: #FFFFFF;
+            // font-size: 28px;
+            position: relative;
+            z-index: 50;
+              & > .dot {
+                width: 22upx;
+                height: 22upx;
+                border-radius: 50%;
+                background-color: #F51608;
+                position: absolute;
+                left: 50%;
+                top: 50%;
+                transform: translate(-50%,-50%);
+              }
+          }
+          & > .step-line {
+            height: 100%;
+            width: 0px;
+            border-left: 1px solid #E2E4E8;;
+            position: absolute;
+            left: 50%;
+            top: 50%;
+            transform: translate(-50%, -50%);
+            z-index: 45;
 
-                        }
+          }
+        }
+        & > .step-main_box {
+          flex: 1;
+          padding-left: 20px;
+            & .step-tit {
+              color: #141F25;
+              font-size: 32px;
+              font-weight: 600;
+            }
+            & .step-content_box {
+              & .reach-content_box {
+                padding:40upx 0 0upx;
+                  & > .admin-button-com {
+                    width: 100%;
+                  }
+                  & > .reach-time_box {
+                    color: #333333;
+                    font-size: 24;
+                    font-weight: 600;
+                  }
+              }
+              & .deliver-opiton_0 {
+                padding: 60px 0 0px;
+                  & > .admin-button-com:nth-child(1){
+                    margin-right: 20px;
+                  }
+                  & > .admin-button-com {
+                    width: 310px;
+                    height: 90px;
+                    padding: 0;
+                    line-height: 90px;
+                    text-align: center;
+                  }
+              }
+              & .shipments-status_box {
+                padding-top: 20px;
+                  & > view {
+                    color: #666666;
+                    font-size: 24px;
+                    font-weight: 400;
+                    line-height: 50px;
+                    &.reach-time_box{
+                      font-weight: 600;
                     }
-                    & .shipments-status_box {
-                        padding-top: 20px;
-                        & > view {
-                            color: #666666;
-                            font-size: 24px;
-                            font-weight: 400;
-                            line-height: 50px;
-																												&.reach-time_box{
-																													font-weight: 600;
-																												}
-                            .colorRed {
-                                color: #F51608;
-                            }
-                            .colorBlue{
-                                color: #049E2C;
-                            }
-                        }
+                    .colorRed {
+                      color: #F51608;
                     }
-                    & .placeOrder-cotent_box {
-                        color: #666666;
-                        font-size: 24upx;
-                        font-weight: 600;
-                        padding-top: 20upx;
+                    .colorBlue{
+                      color: #049E2C;
                     }
-
-                }
+                  }
+              }
+              & .placeOrder-cotent_box {
+                color: #666666;
+                font-size: 24upx;
+                font-weight: 600;
+                padding-top: 20upx;
+              }
             }
         }
     }
+}
 </style>

+ 3 - 2
ghsApp/src/pagesOrder/ship.vue

@@ -62,7 +62,7 @@ export default {
 			showSubmitModel: false,
 			titText:'',
 			orderInfo: {},
-			orderComData: [],
+			orderComData: {},
 			shipModal: false,
                 form:{
                     sendTime:'',
@@ -128,7 +128,7 @@ export default {
 		// this.init()
 	},
 	onShow(){
-		this.init()
+		// this.init()
 	},
 	methods: {
 		init() {
@@ -147,6 +147,7 @@ export default {
 			// this.option.id
 			return getDetB({ id: this.option.id }).then(res => {
 				this.orderInfo = res.data
+        console.log('res.data===>', res.data, this.orderInfo)
 			})
 		},
 		_orderComDet() {